<?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: Kafka Hive integration error related most possibly to different guava versions in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/304047#M221853</link>
    <description>&lt;P&gt;Thanks a lot &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/31438"&gt;@TimothySpann&lt;/a&gt; for your time and insight. Your advice saves me from future futile efforts to hack/mess up with guava jar libs. I will probably try different approach to load Kafka topics into Hive. Thanks again.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2020 21:18:25 GMT</pubDate>
    <dc:creator>Yavor</dc:creator>
    <dc:date>2020-10-07T21:18:25Z</dc:date>
    <item>
      <title>Kafka Hive integration error related most possibly to different guava versions</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/303933#M221795</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to search Hive related topics but did not find the issue I face so I wanted to ask here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is CDH 6.3.2 (Parcels) on Linux (CentOS)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have Kafka and Hive and I am able to create external Kafka tables after putting&amp;nbsp;&lt;STRONG&gt;hive-exec-3.1.3000.7.1.3.0-100.jar&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;kafka-handler-3.1.3000.7.1.3.0-100.jar&amp;nbsp;&lt;/STRONG&gt;in Hive under&amp;nbsp;&lt;STRONG&gt;Hive Auxiliary JARs Directory&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to select data from the external table I get this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;0: jdbc:hive2://localhost:10000/testdb&amp;gt; select * from kafka_table;
Error: java.io.IOException: java.io.IOException: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;JJ)V (state=,code=0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After looking for this error I've found that it is most likely related to issues with different versions of guava in Hadoop and Hive:&amp;nbsp;&lt;A href="https://issues.apache.org/jira/browse/HIVE-22915" target="_self"&gt;https://issues.apache.org/jira/browse/HIVE-22915&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see that Hadoop is using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop/client/guava.jar
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop/client/guava-11.0.2.jar
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop/lib/guava-11.0.2.jar
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hadoop-hdfs/lib/guava-11.0.2.jar&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And Hive is using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hive/lib/guava-14.0.2.jar&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And Kafka is using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/kafka/libs/guava-20.0.jar&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However following the advice from the HIVE Jira above if I equalize Hive and Hadoop versions (either downgrade Hive to guava-11.0.2.jar or upgrade Hadoop in all locations above to guava-14.0.2.jar) the errors persist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I upgrade Hive to guava-20.0.jar I get multiple issues and I am not even able to read local tables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;0: jdbc:hive2://localhost:10000/testdb&amp;gt; desc kafka_table;
Error: Error running query: java.lang.IllegalAccessError: tried to access method com.google.common.collect.Iterators.emptyIterator()Lcom/google/common/collect/UnmodifiableIterator; from class org.apache.hadoop.hive.ql.exec.FetchOperator (state=,code=0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I restore Hive to either&amp;nbsp;guava-11.0.2.jar or guava-14.0.2.jar I am again able to select data from tables but initial error is still in place and I cannot read Kafka topic messages in Hive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone else faced this already and if yes what is recommended way to resolve this in Cloudera environment?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt;Yavor&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 20:17:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/303933#M221795</guid>
      <dc:creator>Yavor</dc:creator>
      <dc:date>2020-10-05T20:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka Hive integration error related most possibly to different guava versions</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/303987#M221828</link>
      <description>&lt;P&gt;I believe you need to be running HDP 3.1 or CDP for the Hive-Kafka integration since it's part of Hive 3.x and CDH has Hive 1 or 2.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 02:00:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/303987#M221828</guid>
      <dc:creator>TimothySpann</dc:creator>
      <dc:date>2020-10-07T02:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka Hive integration error related most possibly to different guava versions</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/303988#M221829</link>
      <description>&lt;P&gt;&lt;A href="https://docs.cloudera.com/runtime/7.2.1/integrating-hive-and-bi/topics/hive-kafka-integration.html" target="_blank"&gt;https://docs.cloudera.com/runtime/7.2.1/integrating-hive-and-bi/topics/hive-kafka-integration.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 02:01:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/303988#M221829</guid>
      <dc:creator>TimothySpann</dc:creator>
      <dc:date>2020-10-07T02:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka Hive integration error related most possibly to different guava versions</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/304047#M221853</link>
      <description>&lt;P&gt;Thanks a lot &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/31438"&gt;@TimothySpann&lt;/a&gt; for your time and insight. Your advice saves me from future futile efforts to hack/mess up with guava jar libs. I will probably try different approach to load Kafka topics into Hive. Thanks again.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 21:18:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-Hive-integration-error-related-most-possibly-to/m-p/304047#M221853</guid>
      <dc:creator>Yavor</dc:creator>
      <dc:date>2020-10-07T21:18:25Z</dc:date>
    </item>
  </channel>
</rss>

