<?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: Hive  org.apache.hadoop.hive.ql.exec.tez.TezTask exception in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169971#M57745</link>
    <description>&lt;P&gt;I configured the execution engine to MapReduce instead of Tez, this works for me. Since I´m only testing and learning some stuff its ok for me.. (I did not know hive got several engines)&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2017 22:19:10 GMT</pubDate>
    <dc:creator>morten_riedel</dc:creator>
    <dc:date>2017-03-23T22:19:10Z</dc:date>
    <item>
      <title>Hive  org.apache.hadoop.hive.ql.exec.tez.TezTask exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169967#M57741</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I´m using the vm´s of ambari and installed a cluster of 5 nodes (c7001 - c7005). I imported a csv file into HBase and mapped a Hive table to it. I want to write a Java programm which executes some simple queries like count, read, filters, group by..&lt;/P&gt;&lt;P&gt;I get the following exception:&lt;/P&gt;&lt;PRE&gt;[hive@c7002 vagrant]$ java -cp SparkThesisTest-4.3.0-SNAPSHOT-jar-with-dependencies.jar thesis.test.sparkthesistest.hbase.read.HiveRead
log4j:WARN No appenders could be found for logger (org.apache.hive.jdbc.Utils).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See &lt;A href="http://logging.apache.org/log4j/1.2/faq.html#noconfig" target="_blank"&gt;http://logging.apache.org/log4j/1.2/faq.html#noconfig&lt;/A&gt; for more info.
Exception in thread "main" java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask
        at org.apache.hive.jdbc.HiveStatement.waitForOperationToComplete(HiveStatement.java:348)
        at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:251)
        at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:434)
        at thesis.test.sparkthesistest.hbase.read.HiveRead.main(HiveRead.java:35)
&lt;/PRE&gt;&lt;P&gt;The Java Code is simple and looks like:&lt;/P&gt;&lt;PRE&gt;      // Register driver and create driver instance
      Class.forName("org.apache.hive.jdbc.HiveDriver");
      // get connection
      Connection con = DriverManager.getConnection("jdbc:hive2://localhost:10000/default", "hive", ""); 
      // create statement
      Statement stmt = con.createStatement();      
      // execute statement
      stmt.executeQuery("INSERT OVERWRITE DIRECTORY '/tmp/hive_read_countries.csv' ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' select distinct City, Country from hbase_table_climate where country like \"Germany\"");
      con.close();
&lt;/PRE&gt;&lt;P&gt;Im executing the Java Application on c7002. This is where the HiveServer2 runs.&lt;/P&gt;&lt;P&gt;Im using maven and installed the following dependency:&lt;/P&gt;&lt;PRE&gt;        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.apache.hive&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;hive-jdbc&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;2.1.0&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;
&lt;/PRE&gt;&lt;P&gt;If execute the exact same query through the "Hive View" or inside the "Hive Shell" it works&lt;/P&gt;&lt;PRE&gt;INSERT OVERWRITE DIRECTORY '/tmp/hive_read_countries.csv' ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' select Country from hbase_table_climate&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2017 20:03:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169967#M57741</guid>
      <dc:creator>morten_riedel</dc:creator>
      <dc:date>2017-03-22T20:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Hive  org.apache.hadoop.hive.ql.exec.tez.TezTask exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169968#M57742</link>
      <description>&lt;P&gt;I just found that if I adjust the code like the following, the execution works:&lt;/P&gt;&lt;PRE&gt;        // execute statement
        ResultSet res = stmt.executeQuery("select Country from hbase_table_climate");
        while (res.next()) {
            System.out.println(res.getString(1));
         }
&lt;/PRE&gt;&lt;P&gt;If I adjust a little bit more complex select statement it crashes with the mentioned exception:&lt;/P&gt;&lt;PRE&gt;        ResultSet res = stmt.executeQuery("select distinct City, Country from hbase_table_climate where country like \"Germany\"");
&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2017 20:44:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169968#M57742</guid>
      <dc:creator>morten_riedel</dc:creator>
      <dc:date>2017-03-22T20:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hive  org.apache.hadoop.hive.ql.exec.tez.TezTask exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169969#M57743</link>
      <description>&lt;P&gt;@Morten R., It is difficult to get to the root cause from the error message that you have provided.  Can you share detailed error message from the hiveserver2 log and application log? You can generate application log by running 'yarn logs -applicationId &amp;lt;application_id&amp;gt;'.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 03:47:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169969#M57743</guid>
      <dc:creator>jvaria</dc:creator>
      <dc:date>2017-03-23T03:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hive  org.apache.hadoop.hive.ql.exec.tez.TezTask exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169970#M57744</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/16026/morten-riedel.html" nodeid="16026"&gt;@Morten R.&lt;/A&gt;&lt;P&gt; What do you see in HS2 logs and also the application logs? Can you change the log level to DEBUG and then try to get the error stacktrace?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 10:09:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169970#M57744</guid>
      <dc:creator>vgumashta</dc:creator>
      <dc:date>2017-03-23T10:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hive  org.apache.hadoop.hive.ql.exec.tez.TezTask exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169971#M57745</link>
      <description>&lt;P&gt;I configured the execution engine to MapReduce instead of Tez, this works for me. Since I´m only testing and learning some stuff its ok for me.. (I did not know hive got several engines)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 22:19:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-org-apache-hadoop-hive-ql-exec-tez-TezTask-exception/m-p/169971#M57745</guid>
      <dc:creator>morten_riedel</dc:creator>
      <dc:date>2017-03-23T22:19:10Z</dc:date>
    </item>
  </channel>
</rss>

