<?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 hive JDBC : update and delete not woking in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-JDBC-update-and-delete-not-woking/m-p/115907#M54978</link>
    <description>&lt;P&gt;I am using HDP 2.3&lt;/P&gt;&lt;P&gt;JDBC CODE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;// 1. check the connection&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                Connection con = DriverManager.getConnection("jdbc:hive2://ppp.qqq.net:10000/default", "hive",&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;"hive");&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                Statement stmt = con.createStatement();&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;// 2.Find Time Stamp&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                ResultSet res_max = stmt.executeQuery(history_max_time_stamp_query);&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;if (res_max.next()) {&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;// System.out.println(res.getString(1) + "\t" + res.getString(2));&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                        time_stamp = res_max.getString(1);&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                        System.out.println(res_max.getString(1));&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                }&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;  //3 while (history_delete_res1.next()) {&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;String delete = "delete from "+orc_table_name +" where "+primary_key +"=" +value;
&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                        System.out.println("delete:  " + delete);&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                        System.out.println("=====================");&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;//System.out.println(kamrepcd +" "+ kamrepnm );&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;stmt.executeQuery(delete);
&lt;/BLOCKQUOTE&gt;&lt;P&gt;JARS used :&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;javac -cp /usr/hdp/2.3.4.7-4/hadoop/hadoop-common-2.7.1.2.3.4.7-4.jar:/usr/hdp/2.3.4.7-4/hive/lib/hive-common-1.2.1.2.3.4.7-4.jar:/usr/hdp/2.3.4.7-4/hive/lib/hive-jdbc-1.2.1.2.3.4.7-4-standalone.jar:.  hive_connection.java &lt;/P&gt;&lt;P&gt;java -cp /usr/hdp/2.3.4.7-4/hadoop/hadoop-common-2.7.1.2.3.4.7-4.jar:/usr/hdp/2.3.4.7-4/hive/lib/hive-common-1.2.1.2.3.4.7-4.jar:/usr/hdp/2.3.4.7-4/hive/lib/hive-jdbc-1.2.1.2.3.4.7-4-standalone.jar:.  hive_connection&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Table description :ORC with transaction true (I am able to delete record through hive shell)&lt;/P&gt;&lt;P&gt;ERROR:&lt;/P&gt;&lt;PRE&gt;Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10294]: Attempt to do update or delete using transaction manager that does not support these operations.&lt;/PRE&gt;&lt;P&gt;I am able to delete data through hive shell  but not through jdbc connection &lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2017 12:41:09 GMT</pubDate>
    <dc:creator>vijay1</dc:creator>
    <dc:date>2017-02-21T12:41:09Z</dc:date>
    <item>
      <title>hive JDBC : update and delete not woking</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-JDBC-update-and-delete-not-woking/m-p/115907#M54978</link>
      <description>&lt;P&gt;I am using HDP 2.3&lt;/P&gt;&lt;P&gt;JDBC CODE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;// 1. check the connection&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                Connection con = DriverManager.getConnection("jdbc:hive2://ppp.qqq.net:10000/default", "hive",&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;"hive");&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                Statement stmt = con.createStatement();&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;// 2.Find Time Stamp&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                ResultSet res_max = stmt.executeQuery(history_max_time_stamp_query);&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;if (res_max.next()) {&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;// System.out.println(res.getString(1) + "\t" + res.getString(2));&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                        time_stamp = res_max.getString(1);&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                        System.out.println(res_max.getString(1));&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                }&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;  //3 while (history_delete_res1.next()) {&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;String delete = "delete from "+orc_table_name +" where "+primary_key +"=" +value;
&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                        System.out.println("delete:  " + delete);&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;                        System.out.println("=====================");&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;//System.out.println(kamrepcd +" "+ kamrepnm );&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;stmt.executeQuery(delete);
&lt;/BLOCKQUOTE&gt;&lt;P&gt;JARS used :&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;javac -cp /usr/hdp/2.3.4.7-4/hadoop/hadoop-common-2.7.1.2.3.4.7-4.jar:/usr/hdp/2.3.4.7-4/hive/lib/hive-common-1.2.1.2.3.4.7-4.jar:/usr/hdp/2.3.4.7-4/hive/lib/hive-jdbc-1.2.1.2.3.4.7-4-standalone.jar:.  hive_connection.java &lt;/P&gt;&lt;P&gt;java -cp /usr/hdp/2.3.4.7-4/hadoop/hadoop-common-2.7.1.2.3.4.7-4.jar:/usr/hdp/2.3.4.7-4/hive/lib/hive-common-1.2.1.2.3.4.7-4.jar:/usr/hdp/2.3.4.7-4/hive/lib/hive-jdbc-1.2.1.2.3.4.7-4-standalone.jar:.  hive_connection&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Table description :ORC with transaction true (I am able to delete record through hive shell)&lt;/P&gt;&lt;P&gt;ERROR:&lt;/P&gt;&lt;PRE&gt;Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10294]: Attempt to do update or delete using transaction manager that does not support these operations.&lt;/PRE&gt;&lt;P&gt;I am able to delete data through hive shell  but not through jdbc connection &lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 12:41:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-JDBC-update-and-delete-not-woking/m-p/115907#M54978</guid>
      <dc:creator>vijay1</dc:creator>
      <dc:date>2017-02-21T12:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: hive JDBC : update and delete not woking</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-JDBC-update-and-delete-not-woking/m-p/115908#M54979</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/10672/vijay.html" nodeid="10672"&gt;@Raj Kadel&lt;/A&gt;&lt;P&gt;The issue might be due to incorrect parameters for ACID, try below set:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.txn.manager"&gt;hive.txn.manager&lt;/A&gt;=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.compactor.initiator.on"&gt;hive.compactor.initiator.on&lt;/A&gt;=true.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.compactor.worker.threads"&gt;hive.compactor.worker.threads&lt;/A&gt;=10&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.support.concurrency"&gt;hive.support.concurrency&lt;/A&gt;=true&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 12:47:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-JDBC-update-and-delete-not-woking/m-p/115908#M54979</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2017-02-21T12:47:43Z</dc:date>
    </item>
  </channel>
</rss>

