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

Andy Braslavskiy commented on HIVE-15100:
-----------------------------------------

This problem may be related to Hue.

I found hack in Hortonworks community: 
https://community.hortonworks.com/answers/51998/view.html

By doing some research, I've found that in sasl library that is used in Hue for 
working with Kerberos, there is buffer with default size equals to 65535 bytes.
But sometimes, Hive produces more than 64 kilobytes of data (i.e. for query 
"SET -v").
So this problem may be caused by buffer overflow in sasl library.

For me this problem was fixed by modifying 
desktop/core/src/desktop/lib/thrift_util.py.
Inside function
{quote}
def connect_to_thrift(conf):
{quote}
after saslc creation
{quote}
saslc = sasl.Client()
{quote}
i've added
{quote}
saslc.setAttr("maxbufsize", 2**17 - 1)
{quote}


> HiveSQLException: Invalid OperationHandle: OperationHandle 
> [opType=EXECUTE_STATEMENT, getHandleIdentifier
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-15100
>                 URL: https://issues.apache.org/jira/browse/HIVE-15100
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 1.2.1
>            Reporter: Will Chen
>
> I am using hue + hiveserver2. 
> First I execute sql through Hue, this can be done correctly. But when I 
> export the result as csv file or excel file, an exception will appear in 
> hiveserver2.log:
> 2016-11-01 14:54:11,622 WARN  [HiveServer2-Handler-Pool: Thread-47]: 
> thrift.ThriftCLIService (ThriftCLIService.java:FetchResults(681)) - Error 
> fetching results: 
> org.apache.hive.service.cli.HiveSQLException: Invalid OperationHandle: 
> OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=feb55386-72f0-445c-9774-dd8780acf442]
>       at 
> org.apache.hive.service.cli.operation.OperationManager.getOperation(OperationManager.java:154)
>       at 
> org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:456)
>       at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:672)
>       at 
> org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1557)
>       at 
> org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1542)
>       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:285)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)
> I add a few session related configurations:
> hive.server2.idle.operatoin.timeout = 1 day
> hive.server2.idle.session.timeout = 3 days
> hive.server2.session.check.interval = 1 hour
> And my operations log config like this:
> hive.server2.loggging.operation.enabled=true
> hive.server2.loggging.operation.log.location=/tmp/hive/operation_logs
> I try to remove all files in my operation_logs dir(/tmp/hive/operation_logs), 
> and clean all session data in hue tables(beeswax_session, django_session), 
> then restart hiveserver2 and hue. But nothing getting better..
> Begging for ur help~
> Thanks.



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

Reply via email to