Exception in thread "main" org.apache.hive.service.cli.HiveSQLException: java.io.IOException: org.

在hive命令行中执行  hive和hbase整合的表 hhh_tj_atmosphere_history 可以正常执行,但是通过java jdbc hiveserver2  就不可以(通过hiveserver2访问hive自建表就可以,就是不能访问整合后的表)。


Running:select * from hhh_tj_atmosphere_history
执行“select * query”运行结果:
Exception in thread "main" org.apache.hive.service.cli.HiveSQLException: java.io.IOException: org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:
Sat Jun 17 16:09:48 CST 2017, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=68116: row 'hhh_tj_atmosphere_history,,00000000000000' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=slave3,16020,1497683020356, seqNum=0

at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:266)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:252)
at org.apache.hive.jdbc.HiveQueryResultSet.next(HiveQueryResultSet.java:373)
at com.hive.client.HiveJdbcClient.selectTable(HiveJdbcClient.java:124)
at com.hive.client.HiveJdbcClient.main(HiveJdbcClient.java:31)
Caused by: org.apache.hive.service.cli.HiveSQLException: java.io.IOException: org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:
Sat Jun 17 16:09:48 CST 2017, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=68116: row 'hhh_tj_atmosphere_history,,00000000000000' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=slave3,16020,1497683020356, seqNum=0

at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:484)
at org.apache.hive.service.cli.operation.OperationManager.getOperationNextRowSet(OperationManager.java:308)
at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:847)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)
at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)
at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)
at com.sun.proxy.$Proxy38.fetchResults(Unknown Source)
at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:505)
at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:698)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1717)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1702)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:
Sat Jun 17 16:09:48 CST 2017, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=68116: row 'hhh_tj_atmosphere_history,,00000000000000' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=slave3,16020,1497683020356, seqNum=0

在hive中的conf目录下配置:
hive-site.xml


    hive.server2.enable.doAs
    false

本人踩了三天的坑才发现的,希望能帮助遇到同样错误的人

你可能感兴趣的:(大数据)