[ 
https://issues.apache.org/jira/browse/HIVE-8529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14550853#comment-14550853
 ] 

Yongzhi Chen commented on HIVE-8529:
------------------------------------

The client use getQueryLog method to get log information, the check is within 
the getQueryLog method for the fix. So client will not get the exception when 
try to getQueryLog. 
But when hive.server2.logging.operation.enabled is false, but less responsible 
still want to fetchresult by LOG (by setting fetchtype to LOG):
tFetchResultsReq.setFetchType((short)1);  
We should find a way to tell the client it is wrong,  throw Exception is common 
way for hive to handle error condition, so I think old way of throwing 
HiveSQLException is fine.
How do you think [~xuefuz]? Thanks 


> HiveSessionImpl#fetchResults should not try to fetch operation log when 
> hive.server2.logging.operation.enabled is false.
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-8529
>                 URL: https://issues.apache.org/jira/browse/HIVE-8529
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2, JDBC
>    Affects Versions: 1.0.0, 1.2.0, 1.1.0, 1.3.0
>            Reporter: Vaibhav Gumashta
>            Assignee: Yongzhi Chen
>         Attachments: HIVE-8529.1.patch
>
>
> Throws this even when it is disabled:
> {code}
> 14/10/20 15:53:14 [HiveServer2-Handler-Pool: Thread-53]: DEBUG 
> security.UserGroupInformation: PrivilegedActionException as:vgumashta 
> (auth:SIMPLE) cause:org.apache.hive.service.cli.HiveSQLException: Couldn't 
> find log associated with operation handle: OperationHandle 
> [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b3d05ca6-e3e8-4bef-b869-0ea0732c3ac5]
> 14/10/20 15:53:14 [HiveServer2-Handler-Pool: Thread-53]: WARN 
> thrift.ThriftCLIService: Error fetching results: 
> org.apache.hive.service.cli.HiveSQLException: Couldn't find log associated 
> with operation handle: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b3d05ca6-e3e8-4bef-b869-0ea0732c3ac5]
>       at 
> org.apache.hive.service.cli.operation.OperationManager.getOperationLogRowSet(OperationManager.java:240)
>       at 
> org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:665)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:79)
>       at 
> org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:37)
>       at 
> org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:64)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:394)
>       at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
>       at 
> org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShimsSecure.java:508)
>       at 
> org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:60)
>       at com.sun.proxy.$Proxy20.fetchResults(Unknown Source)
>       at 
> org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:427)
>       at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:582)
>       at 
> org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1553)
>       at 
> org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1538)
>       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:206)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>       at java.lang.Thread.run(Thread.java:695)
> 14/10/20 15:53:14 [HiveServer2-Handler-Pool: Thread-53]: DEBUG 
> transport.TSaslTransport: writing data length: 2525
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to