hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject hive git commit: HIVE-11939: TxnDbUtil should turn off jdbc auto commit (Jimmy, reviewed by Alan)
Date Fri, 25 Sep 2015 15:33:26 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1 17347f969 -> e76295a90


HIVE-11939: TxnDbUtil should turn off jdbc auto commit (Jimmy, reviewed by Alan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e76295a9
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e76295a9
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e76295a9

Branch: refs/heads/branch-1
Commit: e76295a9041d4231ca1b24399439fd9c3780c46e
Parents: 17347f9
Author: Jimmy Xiang <jxiang@cloudera.com>
Authored: Wed Sep 23 13:41:49 2015 -0700
Committer: Jimmy Xiang <jxiang@cloudera.com>
Committed: Fri Sep 25 08:26:35 2015 -0700

----------------------------------------------------------------------
 .../src/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e76295a9/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java
index 37808ce..c465c84 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java
@@ -229,7 +229,9 @@ public final class TxnDbUtil {
       ShimLoader.getHadoopShims().getPassword(conf, HiveConf.ConfVars.METASTOREPWD.varname);
     prop.setProperty("user", user);
     prop.setProperty("password", passwd);
-    return driver.connect(driverUrl, prop);
+    Connection conn = driver.connect(driverUrl, prop);
+    conn.setAutoCommit(false);
+    return conn;
   }
 
   private static void closeResources(Connection conn, Statement stmt, ResultSet rs) {


Mime
View raw message