emr配置单元odbc连接错误:hivesqlexception:预期状态:[已完成],但发现正在运行

x6yk4ghg  于 2021-06-27  发布在  Hive
关注(0)|答案(1)|浏览(548)

我正在尝试将powerbi连接到aws emr配置单元,并从表中检索表列表和数据。
检索表列表工作正常。但是,当我单击某个特定表时,在power bi ui中会出现以下异常:

DataSource.Error: ODBC: ERROR [HY000] [Amazon][Hardy] (35) Error from server: error code: '0' error message: 'Expected states: [FINISHED], but found RUNNING'. Details:
    DataSourceKind=Odbc
    DataSourcePath=dsn=test emr aws
    OdbcErrors=[Table]

以及配置单元日志中的以下错误:(错误关闭操作:java.nio.bufferunderflowexception)

2019-09-22T09:43:25,731 WARN  [HiveServer2-Handler-Pool: Thread-44([])]: thrift.ThriftCLIService (ThriftCLIService.java:GetResultSetMetadata(735)) - Error getting result set metadata:
org.apache.hive.service.cli.HiveSQLException: Expected states: [FINISHED], but found RUNNING
        at org.apache.hive.service.cli.operation.Operation.assertState(Operation.java:203) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.operation.GetPrimaryKeysOperation.getResultSetSchema(GetPrimaryKeysOperation.java:110) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.operation.OperationManager.getOperationResultSetSchema(OperationManager.java:302) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.session.HiveSessionImpl.getResultSetMetadata(HiveSessionImpl.java:866) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]
        at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_222]
        at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_222]
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1844) ~[hadoop-common-2.8.5-amzn-4.jar:?]
        at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at com.sun.proxy.$Proxy41.getResultSetMetadata(Unknown Source) ~[?:?]
        at org.apache.hive.service.cli.CLIService.getResultSetMetadata(CLIService.java:540) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.thrift.ThriftCLIService.GetResultSetMetadata(ThriftCLIService.java:731) [hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.rpc.thrift.TCLIService$Processor$GetResultSetMetadata.getResult(TCLIService.java:1697) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.rpc.thrift.TCLIService$Processor$GetResultSetMetadata.getResult(TCLIService.java:1682) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) [hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2019-09-22T09:43:25,820 WARN  [HiveServer2-Handler-Pool: Thread-44([])]: thrift.ThriftCLIService (ThriftCLIService.java:CloseOperation(720)) - Error closing operation:
java.nio.BufferUnderflowException
        at java.nio.Buffer.nextGetIndex(Buffer.java:506) ~[?:1.8.0_222]
        at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:412) ~[?:1.8.0_222]
        at org.apache.hive.service.cli.HandleIdentifier.<init>(HandleIdentifier.java:46) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.Handle.<init>(Handle.java:38) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.OperationHandle.<init>(OperationHandle.java:41) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.OperationHandle.<init>(OperationHandle.java:37) ~[hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.cli.thrift.ThriftCLIService.CloseOperation(ThriftCLIService.java:717) [hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.rpc.thrift.TCLIService$Processor$CloseOperation.getResult(TCLIService.java:1677) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.rpc.thrift.TCLIService$Processor$CloseOperation.getResult(TCLIService.java:1662) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) [hive-service-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) [hive-exec-2.3.5-amzn-0.jar:2.3.5-amzn-0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

有什么问题吗?数据在色调和15秒以下检索良好。
奇怪的是odbc驱动程序中的sql查询工作正常。只有当表格被选中时,才会出现上述错误。

ffvjumwh

ffvjumwh1#

我有一个理论。。。通过读取堆栈跟踪,hive似乎试图通过调用handleidentifier来读取表id,在下一次调用(java.nio.heapbytebuffer.getlong)之前它看起来像一个long。你试过增加hadoop的缓冲区大小吗?默认值为4kb( "io.file.buffer.size": "4096" )--尝试至少8kb,这是java原语的大小。
我从这里得到了缓冲区的洞察力:https://docs.aws.amazon.com/datapipeline/latest/developerguide/dp-object-emrconfiguration.html
以下是官方的emr应用程序配置指南:https://docs.aws.amazon.com/emr/latest/releaseguide/emr-configure-apps.html
希望有帮助!

相关问题