You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Jegan <je...@gmail.com> on 2014/03/10 17:15:21 UTC
Error SQLState:08S01 while connecting to remote Hive through Thrift API
Hi All,
I am trying to fetch some data from a remote hive server using thrift API.
I am running the following hive script to fetch the data.
add jar ${hiveconf:JAR_LOCATION};
drop table if exists monitor_event;
create external table monitor_event (ec string, dt string, ip string, seq
string) partitioned by (mi string) ROW FORMAT SERDE "com.tfsc.ilabs.nemo.
reporting.serde.NemoInteractionSerde" WITH SERDEPROPERTIES
("regex.json"="(.*)","jsonNames"="e.ec,e.st,e.ip,e.tseq");
alter table monitor_event add partition(mi="00") location
'${hiveconf:LOG_LOCATION}/mi=00';
alter table monitor_event add partition(mi="30") location
'${hiveconf:LOG_LOCATION}/mi=30';
select * from monitor_event where ec = 111111;
This script works fine with my local hadoop environment (hortonworks vm).
But in the production environment it fails with the below error. I am not
able to get much information about this error. Request your help in moving
in the right direction for solving this.
org.springframework.dao.NonTransientDataAccessResourceException: Query
returned non-zero code: 9, cause: FAILED: Execution Error, return code 1
from org.apache.hadoop.hive.ql.exec.DDLTask; nested exception is
HiveServerException(message:Query returned non-zero code: 9, cause: FAILED:
Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask,
errorCode:9, SQLState:08S01)
at
org.springframework.data.hadoop.hive.HiveUtils.convert(HiveUtils.java:115)
at
org.springframework.data.hadoop.hive.HiveUtils.convert(HiveUtils.java:66)
at
org.springframework.data.hadoop.hive.HiveTemplate.convertHiveAccessException(HiveTemplate.java:99)
at
org.springframework.data.hadoop.hive.HiveTemplate.execute(HiveTemplate.java:82)
at
org.springframework.data.hadoop.hive.HiveTemplate.executeScript(HiveTemplate.java:261)
at
org.springframework.data.hadoop.hive.HiveTemplate.executeScript(HiveTemplate.java:249)
at
com.tfsc.monitoring.monitor.persistence.BdpRepositoryImpl.executeScript(BdpRepositoryImpl.java:84)
at
com.tfsc.monitoring.monitor.persistence.BdpRepositoryImpl.getMonitorEvents(BdpRepositoryImpl.java:53)
at
com.tfsc.monitoring.monitor.reader.HdfsHourlyPartitionReader.readToBuffer(HdfsHourlyPartitionReader.java:54)
at
com.tfsc.monitoring.monitor.reader.DataReaderForClient.run(ClientAwareAsynchronousReader.java:96)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: HiveServerException(message:Query returned non-zero code: 9,
cause: FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask, errorCode:9, SQLState:08S01)
at
org.apache.hadoop.hive.service.ThriftHive$execute_result$execute_resultStandardScheme.read(ThriftHive.java:1494)
at
org.apache.hadoop.hive.service.ThriftHive$execute_result$execute_resultStandardScheme.read(ThriftHive.java:1480)
at
org.apache.hadoop.hive.service.ThriftHive$execute_result.read(ThriftHive.java:1430)
at
org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
at
org.apache.hadoop.hive.service.ThriftHive$Client.recv_execute(ThriftHive.java:116)
at
org.apache.hadoop.hive.service.ThriftHive$Client.execute(ThriftHive.java:103)
at
org.springframework.data.hadoop.hive.HiveUtils.runCommand(HiveUtils.java:251)
at
org.springframework.data.hadoop.hive.HiveUtils.run(HiveUtils.java:228)
at
org.springframework.data.hadoop.hive.HiveUtils.run(HiveUtils.java:160)
at
org.springframework.data.hadoop.hive.HiveTemplate$1.doInHive(HiveTemplate.java:264)
at
org.springframework.data.hadoop.hive.HiveTemplate$1.doInHive(HiveTemplate.java:261)
at
org.springframework.data.hadoop.hive.HiveTemplate.execute(HiveTemplate.java:80)
... 12 more
Thanks,
- Jegan