hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [8/8] hive git commit: HIVE-12634 : Add command to kill an ACID transacton (Wei Zheng, reviewed by Eugene Koifman)
Date Tue, 10 May 2016 18:06:01 GMT
HIVE-12634 : Add command to kill an ACID transacton (Wei Zheng, reviewed by Eugene Koifman)


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

Branch: refs/heads/branch-1
Commit: aecb0c02eaf7b2ee5e448c3aaa8bda1274de78cf
Parents: f1950fc
Author: Wei Zheng <weiz@apache.org>
Authored: Tue May 10 11:05:30 2016 -0700
Committer: Wei Zheng <weiz@apache.org>
Committed: Tue May 10 11:05:30 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hive/common/JavaUtils.java    |    5 +
 metastore/if/hive_metastore.thrift              |    5 +
 .../gen/thrift/gen-cpp/ThriftHiveMetastore.cpp  | 2195 ++++++-----
 .../gen/thrift/gen-cpp/ThriftHiveMetastore.h    |  125 +
 .../ThriftHiveMetastore_server.skeleton.cpp     |    5 +
 .../gen/thrift/gen-cpp/hive_metastore_types.cpp | 1060 +++---
 .../gen/thrift/gen-cpp/hive_metastore_types.h   |   42 +
 .../hive/metastore/api/AbortTxnsRequest.java    |  438 +++
 .../metastore/api/AddDynamicPartitions.java     |   32 +-
 .../hive/metastore/api/FireEventRequest.java    |   32 +-
 .../metastore/api/GetAllFunctionsResponse.java  |   36 +-
 .../api/HeartbeatTxnRangeResponse.java          |   64 +-
 .../metastore/api/InsertEventRequestData.java   |   32 +-
 .../hadoop/hive/metastore/api/LockRequest.java  |   36 +-
 .../api/NotificationEventResponse.java          |   36 +-
 .../hive/metastore/api/ShowCompactResponse.java |   36 +-
 .../hive/metastore/api/ShowLocksResponse.java   |   36 +-
 .../hive/metastore/api/ThriftHiveMetastore.java | 3588 +++++++++++-------
 .../gen-php/metastore/ThriftHiveMetastore.php   | 1311 ++++---
 .../src/gen/thrift/gen-php/metastore/Types.php  |  307 +-
 .../hive_metastore/ThriftHiveMetastore-remote   |    7 +
 .../hive_metastore/ThriftHiveMetastore.py       |  931 +++--
 .../gen/thrift/gen-py/hive_metastore/ttypes.py  |  205 +-
 .../gen/thrift/gen-rb/hive_metastore_types.rb   |   17 +
 .../gen/thrift/gen-rb/thrift_hive_metastore.rb  |   58 +
 .../hadoop/hive/metastore/HiveMetaStore.java    |    6 +
 .../hive/metastore/HiveMetaStoreClient.java     |    6 +
 .../hadoop/hive/metastore/IMetaStoreClient.java |    6 +
 .../hadoop/hive/metastore/txn/TxnHandler.java   |   69 +-
 .../hadoop/hive/metastore/txn/TxnStore.java     |    9 +
 .../org/apache/hadoop/hive/ql/exec/DDLTask.java |   13 +-
 .../apache/hadoop/hive/ql/metadata/Hive.java    |    9 +
 .../hive/ql/parse/DDLSemanticAnalyzer.java      |   19 +
 .../org/apache/hadoop/hive/ql/parse/HiveLexer.g |    1 +
 .../apache/hadoop/hive/ql/parse/HiveParser.g    |   11 +
 .../hadoop/hive/ql/parse/IdentifiersParser.g    |    2 +-
 .../hive/ql/parse/SemanticAnalyzerFactory.java  |    2 +
 .../hadoop/hive/ql/plan/AbortTxnsDesc.java      |   36 +
 .../org/apache/hadoop/hive/ql/plan/DDLWork.java |   16 +
 .../hadoop/hive/ql/plan/HiveOperation.java      |    4 +-
 .../authorization/plugin/HiveOperationType.java |    1 +
 .../plugin/sqlstd/Operation2Privilege.java      |    3 +-
 .../queries/clientpositive/dbtxnmgr_abort.q     |    6 +
 .../results/clientpositive/dbtxnmgr_abort.q.out |    8 +
 44 files changed, 6842 insertions(+), 4024 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/aecb0c02/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java b/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java
index dc3a4ae..5bdf6f4 100644
--- a/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java
+++ b/common/src/java/org/apache/hadoop/hive/common/JavaUtils.java
@@ -26,6 +26,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.URLClassLoader;
 import java.util.Arrays;
+import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -151,6 +152,10 @@ public final class JavaUtils {
     return "txnid:" + txnId;
   }
 
+  public static String txnIdsToString(List<Long> txnIds) {
+    return "Transactions requested to be aborted: " + txnIds.toString();
+  }
+
   private JavaUtils() {
     // prevent instantiation
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/aecb0c02/metastore/if/hive_metastore.thrift
----------------------------------------------------------------------
diff --git a/metastore/if/hive_metastore.thrift b/metastore/if/hive_metastore.thrift
index f84b2a9..4b5d207 100755
--- a/metastore/if/hive_metastore.thrift
+++ b/metastore/if/hive_metastore.thrift
@@ -573,6 +573,10 @@ struct AbortTxnRequest {
     1: required i64 txnid,
 }
 
+struct AbortTxnsRequest {
+    1: required list<i64> txn_ids,
+}
+
 struct CommitTxnRequest {
     1: required i64 txnid,
 }
@@ -1203,6 +1207,7 @@ service ThriftHiveMetastore extends fb303.FacebookService
   GetOpenTxnsInfoResponse get_open_txns_info()
   OpenTxnsResponse open_txns(1:OpenTxnRequest rqst)
   void abort_txn(1:AbortTxnRequest rqst) throws (1:NoSuchTxnException o1)
+  void abort_txns(1:AbortTxnsRequest rqst) throws (1:NoSuchTxnException o1)
   void commit_txn(1:CommitTxnRequest rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException
o2)
   LockResponse lock(1:LockRequest rqst) throws (1:NoSuchTxnException o1, 2:TxnAbortedException
o2)
   LockResponse check_lock(1:CheckLockRequest rqst)


Mime
View raw message