在Hadoop上运行的所有配置单元查询上出错。
只需从存在的表中运行select语句并获得以下结果:
Fetching results ran into the following error(s):
Couldn't find log associated with operation handle:
OperationHandle[opType=EXECUTE_STATEMENT,
getHandleIdentifier()=263df9c3-c076-454f-a025-23f5b919e957]
查询的伴随日志是:
请求TFetchResultsReq的错误状态(fetchType = 1, operationHandle = TOperationHandle(hasResultSet =假, modifiedRowCount = None,operationType = 0, operationId = THandleIdentifier(秘密='%\ X1D \ X0F \ X11 \ XCE \ xf4B \ XD6 \ XB8 \ XB5 \ x8ddv \ xceKV&#39 ;, GUID =" \ xbc5 \ xd9 | \ XFA \ x13J' \ 86 \ x8e4 \ XB3 \的x87 \ XA0 \ XF4 \ X05&#34)), orientation = 4,maxRows = -1): TFetchResultsResp(status = TStatus(errorCode = 0,errorMessage =" couldn&t; t 查找与操作句柄关联的日志:OperationHandle [OPTYPE = EXECUTE_STATEMENT, getHandleIdentifier()= bc35d97c-fa13-4a27-868e-34b387a0f405]&#34 ;, SQLSTATE =无, infoMessages = [" * org.apache.hive.service.cli.HiveSQLException:Couldn'吨 查找与操作句柄关联的日志:OperationHandle [OPTYPE = EXECUTE_STATEMENT, getHandleIdentifier()= bc35d97c-fa13-4a27-868e-34b387a0f405]:25:24&#34 ;, ' org.apache.hive.service.cli.operation.OperationManager:getOperationLogRowSet:OperationManager.java:257&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionImpl:fetchResults:HiveSessionImpl.java:656&#39 ;, ' sun.reflect.GeneratedMethodAccessor29:调用:: - 1&#39 ;, ' sun.reflect.DelegatingMethodAccessorImpl:调用:DelegatingMethodAccessorImpl.java:43&#39 ;, ' java.lang.reflect.Method中:调用:Method.java:606&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:调用:HiveSessionProxy.java:79&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:访问$ 000:HiveSessionProxy.java:37&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy $ 1:运行:HiveSessionProxy.java:64&#39 ;, ' java.security.AccessController:doPrivileged的:AccessController.java:-2&#39 ;, ' javax.security.auth.Subject:差分吸收光谱:Subject.java:415&#39 ;, ' org.apache.hadoop.security.UserGroupInformation:差分吸收光谱:UserGroupInformation.java:1628&#39 ;, ' org.apache.hadoop.hive.shims.HadoopShimsSecure:差分吸收光谱:HadoopShimsSecure.java:536&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:调用:HiveSessionProxy.java:60&#39 ;, 。' com.sun.proxy $ Proxy28:fetchResults :: - 1&#39 ;, ' org.apache.hive.service.cli.CLIService:fetchResults:CLIService.java:427&#39 ;, ' org.apache.hive.service.cli.thrift.ThriftCLIService:FetchResults:ThriftCLIService.java:587&#39 ;, ' org.apache.hive.service.cli.thrift.TCLIService $ $处理器FetchResults:的getResult:TCLIService.java:1553&#39 ;, ' org.apache.hive.service.cli.thrift.TCLIService $ $处理器FetchResults:的getResult:TCLIService.java:1538&#39 ;, ' org.apache.thrift.ProcessFunction:过程:ProcessFunction.java:39&#39 ;, ' org.apache.thrift.TBaseProcessor:过程:TBaseProcessor.java:39&#39 ;, ' org.apache.hive.service.auth.TSetIpAddressProcessor:过程:TSetIpAddressProcessor.java:56&#39 ;, ' org.apache.thrift.server.TThreadPoolServer $ WorkerProcess:运行:TThreadPoolServer.java:206&#39 ;, ' java.util.concurrent.ThreadPoolExecutor中:runWorker:ThreadPoolExecutor.java:1145&#39 ;, ' java.util.concurrent.ThreadPoolExecutor中的$工人:运行:ThreadPoolExecutor.java:615&#39 ;, ' java.lang.Thread:run:Thread.java:744'],statusCode = 3),results = None, hasMoreRows = None)请求TFetchResultsReq的错误状态(fetchType = 1, operationHandle = TOperationHandle(hasResultSet =假, modifiedRowCount = None,operationType = 0, operationId = THandleIdentifier(秘密=' C ^ \ XDF \ XFE \ XB7 \ x8a \ X10D \ XEA \ xbaD \ X93}乙\ XB5 \ XC3 \ XE7&#39 ;, guid ='& = \ xf9 \ xc3 \ xc0vEO \ xa0%#\ xf5 \ xb9 \ x19 \ xe9W')),orientation = 0, maxRows = -1):TFetchResultsResp(status = TStatus(errorCode = 0, errorMessage ="无法找到与操作句柄关联的日志: OperationHandle [opType = EXECUTE_STATEMENT, getHandleIdentifier()= 263df9c3-c076-454f-a025-23f5b919e957]&#34 ;, SQLSTATE =无, infoMessages = [" * org.apache.hive.service.cli.HiveSQLException:Couldn'吨 查找与操作句柄关联的日志:OperationHandle [OPTYPE = EXECUTE_STATEMENT, getHandleIdentifier()= 263df9c3-c076-454f-a025-23f5b919e957]:25:24&#34 ;, ' org.apache.hive.service.cli.operation.OperationManager:getOperationLogRowSet:OperationManager.java:257&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionImpl:fetchResults:HiveSessionImpl.java:656&#39 ;, ' sun.reflect.GeneratedMethodAccessor29:调用:: - 1&#39 ;, ' sun.reflect.DelegatingMethodAccessorImpl:调用:DelegatingMethodAccessorImpl.java:43&#39 ;, ' java.lang.reflect.Method中:调用:Method.java:606&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:调用:HiveSessionProxy.java:79&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:访问$ 000:HiveSessionProxy.java:37&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy $ 1:运行:HiveSessionProxy.java:64&#39 ;, ' java.security.AccessController:doPrivileged的:AccessController.java:-2&#39 ;, ' javax.security.auth.Subject:差分吸收光谱:Subject.java:415&#39 ;, ' org.apache.hadoop.security.UserGroupInformation:差分吸收光谱:UserGroupInformation.java:1628&#39 ;, ' org.apache.hadoop.hive.shims.HadoopShimsSecure:差分吸收光谱:HadoopShimsSecure.java:536&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:调用:HiveSessionProxy.java:60&#39 ;, 。' com.sun.proxy $ Proxy28:fetchResults :: - 1&#39 ;, ' org.apache.hive.service.cli.CLIService:fetchResults:CLIService.java:427&#39 ;, ' org.apache.hive.service.cli.thrift.ThriftCLIService:FetchResults:ThriftCLIService.java:587&#39 ;, ' org.apache.hive.service.cli.thrift.TCLIService $ $处理器FetchResults:的getResult:TCLIService.java:1553&#39 ;, ' org.apache.hive.service.cli.thrift.TCLIService $ $处理器FetchResults:的getResult:TCLIService.java:1538&#39 ;, ' org.apache.thrift.ProcessFunction:过程:ProcessFunction.java:39&#39 ;, ' org.apache.thrift.TBaseProcessor:过程:TBaseProcessor.java:39&#39 ;, ' org.apache.hive.service.auth.TSetIpAddressProcessor:过程:TSetIpAddressProcessor.java:56&#39 ;, ' org.apache.thrift.server.TThreadPoolServer $ WorkerProcess:运行:TThreadPoolServer.java:206&#39 ;, ' java.util.concurrent.ThreadPoolExecutor中:runWorker:ThreadPoolExecutor.java:1145&#39 ;, ' java.util.concurrent.ThreadPoolExecutor中的$工人:运行:ThreadPoolExecutor.java:615&#39 ;, ' java.lang.Thread:run:Thread.java:744'],statusCode = 3),results = None, hasMoreRows = None)请求TFetchResultsReq的错误状态(fetchType = 1, operationHandle = TOperationHandle(hasResultSet =假, modifiedRowCount = None,operationType = 0, operationId = THandleIdentifier(秘密=' C ^ \ XDF \ XFE \ XB7 \ x8a \ X10D \ XEA \ xbaD \ X93}乙\ XB5 \ XC3 \ XE7&#39 ;, guid ='& = \ xf9 \ xc3 \ xc0vEO \ xa0%#\ xf5 \ xb9 \ x19 \ xe9W')),orientation = 0, maxRows = -1):TFetchResultsResp(status = TStatus(errorCode = 0, errorMessage ="无法找到与操作句柄关联的日志: OperationHandle [opType = EXECUTE_STATEMENT, getHandleIdentifier()= 263df9c3-c076-454f-a025-23f5b919e957]&#34 ;, SQLSTATE =无, infoMessages = [" * org.apache.hive.service.cli.HiveSQLException:Couldn'吨 查找与操作句柄关联的日志:OperationHandle [OPTYPE = EXECUTE_STATEMENT, getHandleIdentifier()= 263df9c3-c076-454f-a025-23f5b919e957]:25:24&#34 ;, ' org.apache.hive.service.cli.operation.OperationManager:getOperationLogRowSet:OperationManager.java:257&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionImpl:fetchResults:HiveSessionImpl.java:656&#39 ;, ' sun.reflect.GeneratedMethodAccessor29:调用:: - 1&#39 ;, ' sun.reflect.DelegatingMethodAccessorImpl:调用:DelegatingMethodAccessorImpl.java:43&#39 ;, ' java.lang.reflect.Method中:调用:Method.java:606&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:调用:HiveSessionProxy.java:79&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:访问$ 000:HiveSessionProxy.java:37&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy $ 1:运行:HiveSessionProxy.java:64&#39 ;, ' java.security.AccessController:doPrivileged的:AccessController.java:-2&#39 ;, ' javax.security.auth.Subject:差分吸收光谱:Subject.java:415&#39 ;, ' org.apache.hadoop.security.UserGroupInformation:差分吸收光谱:UserGroupInformation.java:1628&#39 ;, ' org.apache.hadoop.hive.shims.HadoopShimsSecure:差分吸收光谱:HadoopShimsSecure.java:536&#39 ;, ' org.apache.hive.service.cli.session.HiveSessionProxy:调用:HiveSessionProxy.java:60&#39 ;, 。' com.sun.proxy $ Proxy28:fetchResults :: - 1&#39 ;, ' org.apache.hive.service.cli.CLIService:fetchResults:CLIService.java:427&#39 ;, ' org.apache.hive.service.cli.thrift.ThriftCLIService:FetchResults:ThriftCLIService.java:587&#39 ;, ' org.apache.hive.service.cli.thrift.TCLIService $ $处理器FetchResults:的getResult:TCLIService.java:1553&#39 ;, ' org.apache.hive.service.cli.thrift.TCLIService $ $处理器FetchResults:的getResult:TCLIService.java:1538&#39 ;, ' org.apache.thrift.ProcessFunction:过程:ProcessFunction.java:39&#39 ;, ' org.apache.thrift.TBaseProcessor:过程:TBaseProcessor.java:39&#39 ;, ' org.apache.hive.service.auth.TSetIpAddressProcessor:过程:TSetIpAddressProcessor.java:56&#39 ;, ' org.apache.thrift.server.TThreadPoolServer $ WorkerProcess:运行:TThreadPoolServer.java:206&#39 ;, ' java.util.concurrent.ThreadPoolExecutor中:runWorker:ThreadPoolExecutor.java:1145&#39 ;, ' java.util.concurrent.ThreadPoolExecutor中的$工人:运行:ThreadPoolExecutor.java:615&#39 ;, ' java.lang.Thread:run:Thread.java:744'],statusCode = 3),results = None, hasMoreRows =无)
答案 0 :(得分:8)
如果您在使用Hue时在Cloudera发行版中看到此内容,请在Cloudera Manager中将以下内容添加到 Hive服务高级配置代码段(安全阀)以获取hive-site.xml (或直接到其他发行版的hive-site.xml:
<property>
<name>hive.server2.logging.operation.enabled</name>
<value>true</value>
</property>
答案 1 :(得分:5)
即(“hive.server2.logging.operation.log.location”)指向写入日志不存在的位置时,可能会发生此错误。
查看 OperationManager.java
中的代码SELECT COUNT(*)
FROM sg_examinations e
JOIN sg_exam_types t
ON t.id = e.exam_name
LEFT
JOIN sg_courses c
ON c.id = e.course_id
WHERE e.branch_id = 1
AND e.academic_year = 2
GROUP
BY e.exam_name
, e.course_id
答案 2 :(得分:1)
如果您使用的是AWS EMR,请将以下内容添加到/etc/hive/conf.dist/hive-site.xml
的hive-site.xml文件中:
<property>
<name>hive.server2.logging.operation.enabled</name>
<value>true</value>
</property>
然后登录主节点并重新启动hue和hive服务器
sudo stop hive-server2
sudo stop hue
sudo start hue
sudo start hive-server2
这为我修复了它(在发布标签emr-4.6.0
中测试过)。
答案 3 :(得分:1)
如果由于shell脚本或Java程序而遇到此问题,那么您需要检查的第一件事是连接字符串,几个月前,当我在脚本中运行查询时,我也遇到了类似的问题以这种方式:
beeline -u jdbc:hive2:// -e "show databases;"
这是由于缺少正确的Hive连接字符串,一旦我更正了连接字符串并运行了查询,它就没有任何问题了:
beeline -u jdbc:hive2://server.enterprise.org:10000/default -e "show databases;"
此答案仅适用于正在使用脚本或代码的开发人员,有关Hue / Cloudera发行版,请参考上述答案。
干杯!
答案 4 :(得分:0)
在Windows 8.1中,我在hive
查询部分 -
org.apache.hive.service.cli.HiveSQLException: Couldn't find log associated with operation handle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=230485c4-a1be-4a17-94c8-a1ebce426319]
因此,我转到了%HIVE_HOME%/conf/hive-site.xml
并将属性名称hive.server2.logging.operation.log.location
更改为${system:user.name}/operation_logs
更早的值,如下所示 -
<property>
<name>hive.server2.logging.operation.log.location</name>
<value>/tmp/${user.name}/operation_logs</value>
<description>Top level directory where operation logs are stored if logging functionality is enabled</description>
</property>
并且还将包含${system:user.name}
的所有值替换为/tmp/${user.name}
,这让我了解了hive中的作业日志问题,谢谢。
答案 5 :(得分:0)
您可以在Azure中使用
beeline -u 'jdbc:hive2://headnodehost:10001/;transportMode=http'
答案 6 :(得分:0)
创建表时,使用以下代码-
1:many
答案 7 :(得分:0)
选择是否使用 Hive 0.14 之前的旧 GetLog() thrift 调用来检索日志。 如果为 false,请改用 Hive 1.0 或更高版本中的 FetchResults() 节俭调用
use_get_log_api=false
真为假