<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Invalid OperationHandle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Invalid-OperationHandle-OperationHandle-opType-EXECUTE/m-p/361926#M238672</link>
    <description>&lt;P&gt;Invalid OperationHandle: OperationHandle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This exception occurs when there are multiple HiveServer2 instances and access them using Zookeeper/Knox with failover configured&lt;/LI&gt;&lt;LI&gt;When a query(irrespective of number of rows) took more time and HS2 is not able to respond within the defined timeout, ZK/KNOX will do a failover to the next available HS2&lt;/LI&gt;&lt;LI&gt;Since the other HS2 is unaware of the Query/Operation Handle, it throws Invalid OperationHandle exception&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To solve this problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Check if we can optimize the query to run faster either by adding a filter or splitting the available data into multiple tables and then query them in separate queries etc&lt;/LI&gt;&lt;LI&gt;Check if HS2 is utilized beyond its capacity like&lt;UL&gt;&lt;LI&gt;using 200 connections at a given point in time for a 24GB heap of HS2/HMS&lt;/LI&gt;&lt;LI&gt;HMS backend database not able to cope up to serve requests from HMS&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Check yarn queue has enough capacity to serve the query otherwise query will be in waiting state&lt;/LI&gt;&lt;LI&gt;Check if HDFS is healthy and Namenode is able to respond to the requests without delays&lt;/LI&gt;&lt;LI&gt;Sometimes if Ranger needs to check too many files/directories in HDFS before the query gets executed&lt;/LI&gt;&lt;LI&gt;If Load balancer is used, sticky sessions should be enabled so that one-one relationship gets established for opened connections avoiding failover to another HS2 instance&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;The above explanation holds good for any version of Hive&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2023 16:08:23 GMT</pubDate>
    <dc:creator>tarak271</dc:creator>
    <dc:date>2023-01-20T16:08:23Z</dc:date>
    <item>
      <title>Invalid OperationHandle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Invalid-OperationHandle-OperationHandle-opType-EXECUTE/m-p/350638#M236037</link>
      <description>&lt;P&gt;Hello cloudera community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we have the following problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are using powerbi with hortonworks odbc driver to connect to hive in cluster ambari 2.6.2.2, hdp 2.6.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the connection is made successfully, but when making a query on a table that has 23 thousand rows, it returns the following error below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Erro do OLE DB ou do ODBC : [DataSource.Error] ERROR [HY000] [Hortonworks][Hardy] (35) Error from server: error code: '0' error message: 'Invalid OperationHandle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=0345789f-6c9a-4990-adf5-f823232338]'..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if we make a query putting a limiter of at most 10,000 thousand lines in the select, the result is ok&lt;/P&gt;&lt;P&gt;what could be causing this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: there are queries in powerbi with the same ODBC in other tables that have more than 200 thousand rows and the result is OK too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 14:47:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Invalid-OperationHandle-OperationHandle-opType-EXECUTE/m-p/350638#M236037</guid>
      <dc:creator>yagoaparecidoti</dc:creator>
      <dc:date>2022-08-23T14:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid OperationHandle: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Invalid-OperationHandle-OperationHandle-opType-EXECUTE/m-p/361926#M238672</link>
      <description>&lt;P&gt;Invalid OperationHandle: OperationHandle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This exception occurs when there are multiple HiveServer2 instances and access them using Zookeeper/Knox with failover configured&lt;/LI&gt;&lt;LI&gt;When a query(irrespective of number of rows) took more time and HS2 is not able to respond within the defined timeout, ZK/KNOX will do a failover to the next available HS2&lt;/LI&gt;&lt;LI&gt;Since the other HS2 is unaware of the Query/Operation Handle, it throws Invalid OperationHandle exception&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To solve this problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Check if we can optimize the query to run faster either by adding a filter or splitting the available data into multiple tables and then query them in separate queries etc&lt;/LI&gt;&lt;LI&gt;Check if HS2 is utilized beyond its capacity like&lt;UL&gt;&lt;LI&gt;using 200 connections at a given point in time for a 24GB heap of HS2/HMS&lt;/LI&gt;&lt;LI&gt;HMS backend database not able to cope up to serve requests from HMS&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Check yarn queue has enough capacity to serve the query otherwise query will be in waiting state&lt;/LI&gt;&lt;LI&gt;Check if HDFS is healthy and Namenode is able to respond to the requests without delays&lt;/LI&gt;&lt;LI&gt;Sometimes if Ranger needs to check too many files/directories in HDFS before the query gets executed&lt;/LI&gt;&lt;LI&gt;If Load balancer is used, sticky sessions should be enabled so that one-one relationship gets established for opened connections avoiding failover to another HS2 instance&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;The above explanation holds good for any version of Hive&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 16:08:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Invalid-OperationHandle-OperationHandle-opType-EXECUTE/m-p/361926#M238672</guid>
      <dc:creator>tarak271</dc:creator>
      <dc:date>2023-01-20T16:08:23Z</dc:date>
    </item>
  </channel>
</rss>

