Grokbase Groups Hive commits May 2016
FAQ
Repository: hive
Updated Branches:
   refs/heads/master ffa69a22d -> f25b86520


http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
----------------------------------------------------------------------
diff --git a/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java b/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
index 80e3cd6..f513d0f 100644
--- a/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
+++ b/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
@@ -23,6 +23,7 @@ import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions;
  import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
  import org.apache.hadoop.hive.metastore.api.CompactionRequest;
  import org.apache.hadoop.hive.metastore.api.CompactionType;
+import org.apache.hadoop.hive.metastore.api.DataOperationType;
  import org.apache.hadoop.hive.metastore.api.GetOpenTxnsResponse;
  import org.apache.hadoop.hive.metastore.api.LockComponent;
  import org.apache.hadoop.hive.metastore.api.LockLevel;
@@ -286,12 +287,14 @@ public class TestCompactionTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB,
          "mydb");
      comp.setTablename("mytable");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB,
          "mydb");
      comp.setTablename("yourtable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.UPDATE);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
      req.setTxnid(txnid);
@@ -322,6 +325,7 @@ public class TestCompactionTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB,
          "mydb");
      comp.setTablename("mytable");
+ comp.setOperationType(DataOperationType.INSERT);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -333,6 +337,7 @@ public class TestCompactionTxnHandler {
      txnid = openTxn();
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("yourtable");
+ comp.setOperationType(DataOperationType.DELETE);
      components = new ArrayList<LockComponent>(1);
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -345,6 +350,7 @@ public class TestCompactionTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("foo");
      comp.setPartitionname("bar");
+ comp.setOperationType(DataOperationType.UPDATE);
      components = new ArrayList<LockComponent>(1);
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -355,6 +361,7 @@ public class TestCompactionTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("foo");
      comp.setPartitionname("baz");
+ comp.setOperationType(DataOperationType.UPDATE);
      components = new ArrayList<LockComponent>(1);
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -411,13 +418,17 @@ public class TestCompactionTxnHandler {
      // lock a table, as in dynamic partitions
      LockComponent lc = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, dbName);
      lc.setTablename(tableName);
+ DataOperationType dop = DataOperationType.UPDATE;
+ lc.setOperationType(dop);
      LockRequest lr = new LockRequest(Arrays.asList(lc), "me", "localhost");
      lr.setTxnid(txnId);
      LockResponse lock = txnHandler.lock(lr);
      assertEquals(LockState.ACQUIRED, lock.getState());

- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnId, dbName, tableName,
- Arrays.asList("ds=yesterday", "ds=today")));
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnId, dbName, tableName,
+ Arrays.asList("ds=yesterday", "ds=today"));
+ adp.setOperationType(dop);
+ txnHandler.addDynamicPartitions(adp);
      txnHandler.commitTxn(new CommitTxnRequest(txnId));

      Set<CompactionInfo> potentials = txnHandler.findPotentialCompactions(1000);

http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
----------------------------------------------------------------------
diff --git a/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java b/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
index 1a118a9..2804e21 100644
--- a/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
+++ b/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
@@ -23,6 +23,7 @@ import org.apache.hadoop.hive.metastore.api.CheckLockRequest;
  import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
  import org.apache.hadoop.hive.metastore.api.CompactionRequest;
  import org.apache.hadoop.hive.metastore.api.CompactionType;
+import org.apache.hadoop.hive.metastore.api.DataOperationType;
  import org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse;
  import org.apache.hadoop.hive.metastore.api.GetOpenTxnsResponse;
  import org.apache.hadoop.hive.metastore.api.HeartbeatRequest;
@@ -216,6 +217,7 @@ public class TestTxnHandler {
    public void testLockDifferentDBs() throws Exception {
      // Test that two different databases don't collide on their locks
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -223,6 +225,7 @@ public class TestTxnHandler {
      assertTrue(res.getState() == LockState.ACQUIRED);

      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "yourdb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -234,6 +237,7 @@ public class TestTxnHandler {
    public void testLockSameDB() throws Exception {
      // Test that two different databases don't collide on their locks
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -241,6 +245,7 @@ public class TestTxnHandler {
      assertTrue(res.getState() == LockState.ACQUIRED);

      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -252,6 +257,7 @@ public class TestTxnHandler {
    public void testLockDbLocksTable() throws Exception {
      // Test that locking a database prevents locking of tables in the database
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -259,6 +265,7 @@ public class TestTxnHandler {
      assertTrue(res.getState() == LockState.ACQUIRED);

      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      comp.setTablename("mytable");
      components.clear();
      components.add(comp);
@@ -271,6 +278,7 @@ public class TestTxnHandler {
    public void testLockDbDoesNotLockTableInDifferentDB() throws Exception {
      // Test that locking a database prevents locking of tables in the database
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -278,6 +286,7 @@ public class TestTxnHandler {
      assertTrue(res.getState() == LockState.ACQUIRED);

      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "yourdb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      comp.setTablename("mytable");
      components.clear();
      components.add(comp);
@@ -290,6 +299,7 @@ public class TestTxnHandler {
    public void testLockDifferentTables() throws Exception {
      // Test that two different tables don't collide on their locks
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      comp.setTablename("mytable");
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
@@ -298,6 +308,7 @@ public class TestTxnHandler {
      assertTrue(res.getState() == LockState.ACQUIRED);

      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      comp.setTablename("yourtable");
      components.clear();
      components.add(comp);
@@ -311,6 +322,7 @@ public class TestTxnHandler {
      // Test that two different tables don't collide on their locks
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -319,6 +331,7 @@ public class TestTxnHandler {

      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -331,6 +344,7 @@ public class TestTxnHandler {
      // Test that locking a table prevents locking of partitions of the table
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -340,6 +354,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -352,6 +367,7 @@ public class TestTxnHandler {
      // Test that locking a table prevents locking of partitions of the table
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -361,6 +377,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("yourtable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -374,6 +391,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -383,6 +401,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("yourpartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -396,6 +415,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -405,6 +425,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -418,6 +439,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.INSERT);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -427,6 +449,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.SELECT);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -440,6 +463,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -449,6 +473,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.INSERT);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -458,6 +483,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.SELECT);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -471,6 +497,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.INSERT);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -480,6 +507,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -494,6 +522,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -503,6 +532,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.SELECT);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -512,6 +542,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.UPDATE);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -526,6 +557,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.SELECT);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -535,6 +567,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -548,6 +581,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -557,6 +591,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.SELECT);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -566,6 +601,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -579,6 +615,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -589,6 +626,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.SELECT);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -602,6 +640,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -612,6 +651,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -622,6 +662,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.INSERT);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -630,11 +671,31 @@ public class TestTxnHandler {
    }

    @Test
+ public void testWrongLockForOperation() throws Exception {
+ LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
+ comp.setTablename("mytable");
+ comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
+ List<LockComponent> components = new ArrayList<LockComponent>(1);
+ components.add(comp);
+ LockRequest req = new LockRequest(components, "me", "localhost");
+ req.setTxnid(openTxn());
+ Exception expectedError = null;
+ try {
+ LockResponse res = txnHandler.lock(req);
+ }
+ catch(Exception e) {
+ expectedError = e;
+ }
+ Assert.assertTrue(expectedError != null && expectedError.getMessage().contains("Unexpected DataOperationType"));
+ }
+ @Test
    public void testLockSWSWSW() throws Exception {
      // Test that write blocks two writes
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -645,6 +706,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -655,6 +717,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -669,6 +732,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -678,6 +742,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -687,6 +752,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -701,6 +767,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -710,6 +777,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -719,6 +787,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.SELECT);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -731,6 +800,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -743,6 +813,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.UPDATE);
      components.clear();
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -772,6 +843,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -794,12 +866,14 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(2);
      components.add(comp);

      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("anotherpartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
      LockResponse res = txnHandler.lock(req);
@@ -817,12 +891,14 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(2);
      components.add(comp);

      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("anotherpartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
      LockResponse res = txnHandler.lock(req);
@@ -833,6 +909,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      components = new ArrayList<LockComponent>(1);
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -852,6 +929,7 @@ public class TestTxnHandler {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
+ comp.setOperationType(DataOperationType.DELETE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -867,6 +945,7 @@ public class TestTxnHandler {
      // Test that committing unlocks
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -886,6 +965,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.DELETE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -932,6 +1012,7 @@ public class TestTxnHandler {
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
      comp.setTablename("mytable");
      comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -996,6 +1077,7 @@ public class TestTxnHandler {
        LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
        comp.setTablename("mytable");
        comp.setPartitionname("mypartition");
+ comp.setOperationType(DataOperationType.NO_TXN);
        List<LockComponent> components = new ArrayList<LockComponent>(1);
        components.add(comp);
        LockRequest req = new LockRequest(components, "me", "localhost");
@@ -1083,6 +1165,7 @@ public class TestTxnHandler {
    public void showLocks() throws Exception {
      long begining = System.currentTimeMillis();
      LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
+ comp.setOperationType(DataOperationType.NO_TXN);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -1092,6 +1175,7 @@ public class TestTxnHandler {
      long txnid = openTxn();
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "mydb");
      comp.setTablename("mytable");
+ comp.setOperationType(DataOperationType.SELECT);
      components = new ArrayList<LockComponent>(1);
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -1103,6 +1187,7 @@ public class TestTxnHandler {
      comp = new LockComponent(LockType.SHARED_READ, LockLevel.PARTITION, "yourdb");
      comp.setTablename("yourtable");
      comp.setPartitionname("yourpartition");
+ comp.setOperationType(DataOperationType.INSERT);
      components.add(comp);
      req = new LockRequest(components, "you", "remotehost");
      res = txnHandler.lock(req);

http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
index 21aa315..aeaae6b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
@@ -429,7 +429,8 @@ public class MoveTask extends Task<MoveWork> implements Serializable {
                  dpCtx.getNumDPCols(),
                  isSkewedStoredAsDirs(tbd),
                  work.getLoadTableWork().getWriteType() != AcidUtils.Operation.NOT_ACID,
- SessionState.get().getTxnMgr().getCurrentTxnId(), hasFollowingStatsTask());
+ SessionState.get().getTxnMgr().getCurrentTxnId(), hasFollowingStatsTask(),
+ work.getLoadTableWork().getWriteType());

              console.printInfo("\t Time taken to load dynamic partitions: " +
                  (System.currentTimeMillis() - startTime)/1000.0 + " seconds");

http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
index 9446876..bac38ce 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
@@ -18,6 +18,7 @@

  package org.apache.hadoop.hive.ql.io;

+import org.apache.hadoop.hive.metastore.api.DataOperationType;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  import org.apache.hadoop.conf.Configuration;
@@ -221,7 +222,20 @@ public class AcidUtils {
      return result;
    }

- public enum Operation { NOT_ACID, INSERT, UPDATE, DELETE }
+ public enum Operation {
+ NOT_ACID(DataOperationType.UNSET),
+ INSERT(DataOperationType.INSERT),
+ UPDATE(DataOperationType.UPDATE),
+ DELETE(DataOperationType.DELETE);
+
+ private final DataOperationType dop;
+ private Operation(DataOperationType dop) {
+ this.dop = dop;
+ }
+ public DataOperationType toDataOperationType() {
+ return dop;
+ }
+ }

    public static interface Directory {


http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java
index 9ab6169..9988eec 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java
@@ -162,7 +162,7 @@ public class DbTxnManager extends HiveTxnManagerImpl {

      boolean atLeastOneLock = false;

- LockRequestBuilder rqstBuilder = new LockRequestBuilder();
+ LockRequestBuilder rqstBuilder = new LockRequestBuilder(plan.getQueryId());
      //link queryId to txnId
      LOG.info("Setting lock request transaction to " + JavaUtils.txnIdToString(txnId) + " for queryId=" + plan.getQueryId());
      rqstBuilder.setTransactionId(txnId)
@@ -178,6 +178,7 @@ public class DbTxnManager extends HiveTxnManagerImpl {
        }
        LockComponentBuilder compBuilder = new LockComponentBuilder();
        compBuilder.setShared();
+ compBuilder.setOperationType(DataOperationType.SELECT);

        Table t = null;
        switch (input.getType()) {
@@ -203,6 +204,9 @@ public class DbTxnManager extends HiveTxnManagerImpl {
            // This is a file or something we don't hold locks for.
            continue;
        }
+ if(t != null && AcidUtils.isAcidTable(t)) {
+ compBuilder.setIsAcid(true);
+ }
        LockComponent comp = compBuilder.build();
        LOG.debug("Adding lock component to lock request " + comp.toString());
        rqstBuilder.addLockComponent(comp);
@@ -226,27 +230,35 @@ public class DbTxnManager extends HiveTxnManagerImpl {
          case DDL_EXCLUSIVE:
          case INSERT_OVERWRITE:
            compBuilder.setExclusive();
+ compBuilder.setOperationType(DataOperationType.NO_TXN);
            break;

          case INSERT:
- t = output.getTable();
- if(t == null) {
- throw new IllegalStateException("No table info for " + output);
- }
+ t = getTable(output);
            if(AcidUtils.isAcidTable(t)) {
              compBuilder.setShared();
+ compBuilder.setIsAcid(true);
            }
            else {
              compBuilder.setExclusive();
+ compBuilder.setIsAcid(false);
            }
+ compBuilder.setOperationType(DataOperationType.INSERT);
            break;
          case DDL_SHARED:
            compBuilder.setShared();
+ compBuilder.setOperationType(DataOperationType.NO_TXN);
            break;

          case UPDATE:
+ compBuilder.setSemiShared();
+ compBuilder.setOperationType(DataOperationType.UPDATE);
+ t = getTable(output);
+ break;
          case DELETE:
            compBuilder.setSemiShared();
+ compBuilder.setOperationType(DataOperationType.DELETE);
+ t = getTable(output);
            break;

          case DDL_NO_LOCK:
@@ -280,12 +292,15 @@ public class DbTxnManager extends HiveTxnManagerImpl {
            // This is a file or something we don't hold locks for.
            continue;
        }
+ if(t != null && AcidUtils.isAcidTable(t)) {
+ compBuilder.setIsAcid(true);
+ }
        LockComponent comp = compBuilder.build();
        LOG.debug("Adding lock component to lock request " + comp.toString());
        rqstBuilder.addLockComponent(comp);
        atLeastOneLock = true;
      }
-
+ //plan
      // Make sure we need locks. It's possible there's nothing to lock in
      // this operation.
      if (!atLeastOneLock) {
@@ -301,6 +316,13 @@ public class DbTxnManager extends HiveTxnManagerImpl {
      ctx.setHiveLocks(locks);
      return lockState;
    }
+ private static Table getTable(WriteEntity we) {
+ Table t = we.getTable();
+ if(t == null) {
+ throw new IllegalStateException("No table info for " + we);
+ }
+ return t;
+ }
    /**
     * This is for testing only.
     * @param delay time to delay for first heartbeat

http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index dcfc2b5..3fa1233 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -1695,7 +1695,8 @@ private void constructOneLBLocationMap(FileStatus fSta,
     */
    public Map<Map<String, String>, Partition> loadDynamicPartitions(Path loadPath,
        String tableName, Map<String, String> partSpec, boolean replace,
- int numDP, boolean listBucketingEnabled, boolean isAcid, long txnId, boolean hasFollowingStatsTask)
+ int numDP, boolean listBucketingEnabled, boolean isAcid, long txnId, boolean hasFollowingStatsTask,
+ AcidUtils.Operation operation)
        throws HiveException {

      Set<Path> validPartitions = new HashSet<Path>();
@@ -1758,7 +1759,8 @@ private void constructOneLBLocationMap(FileStatus fSta,
          for (Partition p : partitionsMap.values()) {
            partNames.add(p.getName());
          }
- metaStoreClient.addDynamicPartitions(txnId, tbl.getDbName(), tbl.getTableName(), partNames);
+ metaStoreClient.addDynamicPartitions(txnId, tbl.getDbName(), tbl.getTableName(),
+ partNames, operation.toDataOperationType());
        }
        return partitionsMap;
      } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java b/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
index 8840fd9..4782213 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
@@ -18,6 +18,7 @@
  package org.apache.hadoop.hive.ql.lockmgr;

  import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions;
+import org.apache.hadoop.hive.metastore.api.DataOperationType;
  import org.apache.hadoop.hive.metastore.txn.TxnStore;
  import org.apache.hadoop.hive.metastore.txn.TxnUtils;
  import org.apache.hadoop.hive.ql.TestTxnCommands2;
@@ -866,8 +867,10 @@ public class TestDbTxnManager2 {
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", null, locks.get(1));
      //update stmt has p=blah, thus nothing is actually update and we generate empty dyn part list
      Assert.assertEquals(0, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET"));
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
- "default", "tab2", Collections.EMPTY_LIST));
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
+ "default", "tab2", Collections.EMPTY_LIST);
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr2.commitTxn();
      //Short Running updated nothing, so we expect 0 rows in WRITE_SET
      Assert.assertEquals( 0, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET"));
@@ -881,8 +884,10 @@ public class TestDbTxnManager2 {
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", null, locks.get(1));//since TAB2 is empty
      //update stmt has p=blah, thus nothing is actually update and we generate empty dyn part list
      Assert.assertEquals(0, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET"));
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
- "default", "tab2", Collections.singletonList("p=two")));//simulate partition update
+ adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
+ "default", "tab2", Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);//simulate partition update
      txnMgr2.commitTxn();
      Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
        1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET"));
@@ -894,8 +899,10 @@ public class TestDbTxnManager2 {
      checkCmdOnDriver(driver.compileAndRespond("update TAB2 set b = 17 where a = 1"));//no rows match
      txnMgr.acquireLocks(driver.getPlan(), ctx, "Long Running");
      //so generate empty Dyn Part call
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(),
- "default", "tab2", Collections.EMPTY_LIST));
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(),
+ "default", "tab2", Collections.EMPTY_LIST);
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr.commitTxn();

      locks = getLocks(txnMgr);
@@ -996,16 +1003,20 @@ public class TestDbTxnManager2 {
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", "p=one", locks.get(1));

      //this simulates the completion of txnid:2
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab2",
- Collections.singletonList("p=two")));
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab2",
+ Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr2.commitTxn();//txnid:2

      locks = getLocks(txnMgr2);
      Assert.assertEquals("Unexpected lock count", 1, locks.size());
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", "p=one", locks.get(0));
      //completion of txnid:3
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab2",
- Collections.singletonList("p=one")));
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab2",
+ Collections.singletonList("p=one"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr.commitTxn();//txnid:3
      //now both txns concurrently updated TAB2 but different partitions.

@@ -1043,8 +1054,10 @@ public class TestDbTxnManager2 {
      checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=one", locks.get(3));

      //this simulates the completion of txnid:5
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=one")));
+ adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=one"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr2.commitTxn();//txnid:5

      ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
@@ -1053,8 +1066,10 @@ public class TestDbTxnManager2 {
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(1));
      //completion of txnid:6
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=two")));
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr.commitTxn();//txnid:6

      Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
@@ -1094,8 +1109,10 @@ public class TestDbTxnManager2 {
      checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(2));

      //this simulates the completion of txnid:2
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=one")));
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=one"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr2.commitTxn();//txnid:2

      ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
@@ -1103,8 +1120,10 @@ public class TestDbTxnManager2 {
      Assert.assertEquals("Unexpected lock count", 1, locks.size());
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
      //completion of txnid:3
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=two")));
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr.commitTxn();//txnid:3

      Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
@@ -1143,8 +1162,10 @@ public class TestDbTxnManager2 {
      checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(2));

      //this simulates the completion of txnid:2
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=one")));
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=one"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr2.commitTxn();//txnid:2

      ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
@@ -1152,14 +1173,22 @@ public class TestDbTxnManager2 {
      Assert.assertEquals("Unexpected lock count", 1, locks.size());
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
      //completion of txnid:3
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=two")));
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.DELETE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr.commitTxn();//txnid:3

+ Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
+ 2, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=1 and ctc_table='tab1'"));
+ Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
+ 1, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=2 and ctc_table='tab1' and ctc_partition='p=one'"));
+ Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
+ 1, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=3 and ctc_table='tab1' and ctc_partition='p=two'"));
      Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
        1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=one' and ws_operation_type='u' and ws_table='tab1'"));
      Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
- 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='u' and ws_table='tab1'"));
+ 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1'"));
      Assert.assertEquals("COMPLETED_TXN_COMPONENTS mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
        4, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_table='tab1' and ctc_partition is not null"));
    }
@@ -1192,8 +1221,10 @@ public class TestDbTxnManager2 {
      checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(2));

      //this simulates the completion of txnid:2
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=two")));
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.UPDATE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr2.commitTxn();//txnid:2

      ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
@@ -1201,8 +1232,10 @@ public class TestDbTxnManager2 {
      Assert.assertEquals("Unexpected lock count", 1, locks.size());
      checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
      //completion of txnid:3
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=two")));
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.DELETE);
+ txnHandler.addDynamicPartitions(adp);
      LockException exception = null;
      try {
        txnMgr.commitTxn();//txnid:3
@@ -1222,11 +1255,7 @@ public class TestDbTxnManager2 {
    }
    /**
     * Concurrent delte/detele of same partition - should pass
- * This test doesn't work yet, because we don't yet pass in operation type
- *
- * todo: Concurrent insert/update of same partition - should pass
     */
- @Ignore("HIVE-13622")
    @Test
    public void testWriteSetTracking11() throws Exception {
      CommandProcessorResponse cpr = driver.run("create table if not exists tab1 (a int, b int) partitioned by (p string) " +
@@ -1244,46 +1273,86 @@ public class TestDbTxnManager2 {

      //now start concurrent txn
      txnMgr.openTxn("T3");
+ checkCmdOnDriver(driver.compileAndRespond("select * from tab1 where b=1 and p='one'"));
+ ((DbTxnManager)txnMgr).acquireLocks(driver.getPlan(), ctx, "T3", false);
      checkCmdOnDriver(driver.compileAndRespond("delete from tab1 where p='two' and b=2"));
      ((DbTxnManager)txnMgr).acquireLocks(driver.getPlan(), ctx, "T3", false);
      locks = getLocks(txnMgr);
- Assert.assertEquals("Unexpected lock count", 3, locks.size());
- checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
- checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(1));
- checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(2));
+ Assert.assertEquals("Unexpected lock count", 5, locks.size());
+ checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", null, locks.get(0));
+ checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(1));
+ checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(2));
+ checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(3));
+ checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(4));

      //this simulates the completion of txnid:2
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=two")));
+ AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.DELETE);
+ txnHandler.addDynamicPartitions(adp);
      txnMgr2.commitTxn();//txnid:2

- ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
+ ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(4).getLockid());//retest WAITING locks (both have same ext id)
      locks = getLocks(txnMgr);
- Assert.assertEquals("Unexpected lock count", 1, locks.size());
- checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
+ Assert.assertEquals("Unexpected lock count", 3, locks.size());
+ checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", null, locks.get(0));
+ checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(1));
+ checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(2));
      //completion of txnid:3
- txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
- Collections.singletonList("p=two")));
- LockException exception = null;
- try {
- txnMgr.commitTxn();//txnid:3
- }
- catch(LockException e) {
- exception = e;
- }
- Assert.assertNotEquals("Expected exception", null, exception);
- Assert.assertEquals("Exception msg doesn't match",
- "Aborting [txnid:3,3] due to a write conflict on default/tab1/p=two committed by [txnid:2,3]",
- exception.getCause().getMessage());
+ adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
+ Collections.singletonList("p=two"));
+ adp.setOperationType(DataOperationType.DELETE);
+ txnHandler.addDynamicPartitions(adp);
+ txnMgr.commitTxn();//txnid:3

- //todo: this currently fails since we don't yet set operation type properly
      Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
- 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1'"));
+ 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1' and ws_txnid=2"));
      Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
- 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1'"));
+ 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1' and ws_txnid=3"));
+ Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
+ 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1' and ws_txnid=2"));
+ Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
+ 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1' and ws_txnid=3"));
      Assert.assertEquals("COMPLETED_TXN_COMPONENTS mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
        4, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_table='tab1' and ctc_partition is not null"));
    }
+ @Test
+ public void testCompletedTxnComponents() throws Exception {
+ CommandProcessorResponse cpr = driver.run("create table if not exists tab1 (a int, b int) partitioned by (p string) " +
+ "clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true')");
+ checkCmdOnDriver(cpr);
+ cpr = driver.run("create table if not exists tab_not_acid2 (a int, b int)");
+ checkCmdOnDriver(cpr);
+ checkCmdOnDriver(driver.run("insert into tab_not_acid2 values(1,1),(2,2)"));
+ //writing both acid and non-acid resources in the same txn
+ checkCmdOnDriver(driver.run("from tab_not_acid2 insert into tab1 partition(p='two')(a,b) select a,b insert into tab_not_acid2(a,b) select a,b "));//txnid:1
+ Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
+ 1, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS"));
+ //only expect transactional components to be in COMPLETED_TXN_COMPONENTS
+ Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
+ 1, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=1 and ctc_table='tab1'"));
+ }
+ @Test
+ public void testMultiInsert() throws Exception {
+ CommandProcessorResponse cpr = driver.run("create table if not exists tab1 (a int, b int) partitioned by (p string) " +
+ "clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true')");
+ checkCmdOnDriver(cpr);
+ cpr = driver.run("create table if not exists tab_not_acid (a int, b int, p string)");
+ checkCmdOnDriver(cpr);
+ checkCmdOnDriver(driver.run("insert into tab_not_acid values(1,1,'one'),(2,2,'two')"));
+ checkCmdOnDriver(driver.run("insert into tab1 partition(p) values(3,3,'one'),(4,4,'two')"));//txinid:1
+ //writing both acid and non-acid resources in the same txn
+ //tab1 write is a dynamic partition insert
+ checkCmdOnDriver(driver.run("from tab_not_acid insert into tab1 partition(p)(a,b,p) select a,b,p insert into tab_not_acid(a,b) select a,b where p='two'"));//txnid:2
+ Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
+ 4, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS"));
+ //only expect transactional components to be in COMPLETED_TXN_COMPONENTS
+ Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
+ 2, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=2"));
+ Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
+ 2, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=2 and ctc_table='tab1'"));
+ }
+ //todo: Concurrent insert/update of same partition - should pass

    private List<ShowLocksResponseElement> getLocksWithFilterOptions(HiveTxnManager txnMgr,
        String dbName, String tblName, Map<String, String> partSpec) throws Exception {

http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
index 1578bfb..44dd99b 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
@@ -21,6 +21,7 @@ import org.apache.hadoop.fs.Path;
  import org.apache.hadoop.hive.conf.HiveConf;
  import org.apache.hadoop.hive.metastore.api.CompactionRequest;
  import org.apache.hadoop.hive.metastore.api.CompactionType;
+import org.apache.hadoop.hive.metastore.api.DataOperationType;
  import org.apache.hadoop.hive.metastore.api.LockComponent;
  import org.apache.hadoop.hive.metastore.api.LockLevel;
  import org.apache.hadoop.hive.metastore.api.LockRequest;
@@ -222,6 +223,7 @@ public class TestCleaner extends CompactorTest {

      LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "default");
      comp.setTablename("bblt");
+ comp.setOperationType(DataOperationType.SELECT);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -260,6 +262,7 @@ public class TestCleaner extends CompactorTest {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
      comp.setTablename("bblp");
      comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.DELETE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -302,6 +305,7 @@ public class TestCleaner extends CompactorTest {

      LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "default");
      comp.setTablename("bblt");
+ comp.setOperationType(DataOperationType.INSERT);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -325,6 +329,7 @@ public class TestCleaner extends CompactorTest {
      // clean request
      LockComponent comp2 = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "default");
      comp2.setTablename("bblt");
+ comp.setOperationType(DataOperationType.SELECT);
      List<LockComponent> components2 = new ArrayList<LockComponent>(1);
      components2.add(comp2);
      LockRequest req2 = new LockRequest(components, "me", "localhost");
@@ -374,6 +379,7 @@ public class TestCleaner extends CompactorTest {
      LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.PARTITION, "default");
      comp.setTablename("bblt");
      comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.INSERT);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -399,6 +405,7 @@ public class TestCleaner extends CompactorTest {
      LockComponent comp2 = new LockComponent(LockType.SHARED_READ, LockLevel.PARTITION, "default");
      comp2.setTablename("bblt");
      comp2.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.SELECT);
      List<LockComponent> components2 = new ArrayList<LockComponent>(1);
      components2.add(comp2);
      LockRequest req2 = new LockRequest(components, "me", "localhost");

http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
index a31e2d1..a11fe86 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
@@ -22,6 +22,7 @@ import org.apache.hadoop.hive.metastore.api.AbortTxnRequest;
  import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
  import org.apache.hadoop.hive.metastore.api.CompactionRequest;
  import org.apache.hadoop.hive.metastore.api.CompactionType;
+import org.apache.hadoop.hive.metastore.api.DataOperationType;
  import org.apache.hadoop.hive.metastore.api.GetOpenTxnsResponse;
  import org.apache.hadoop.hive.metastore.api.LockComponent;
  import org.apache.hadoop.hive.metastore.api.LockLevel;
@@ -123,6 +124,7 @@ public class TestInitiator extends CompactorTest {
        long txnid = openTxn();
        LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
        comp.setTablename("mcottma");
+ comp.setOperationType(DataOperationType.UPDATE);
        List<LockComponent> components = new ArrayList<LockComponent>(1);
        components.add(comp);
        LockRequest req = new LockRequest(components, "me", "localhost");
@@ -153,6 +155,7 @@ public class TestInitiator extends CompactorTest {
        LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
        comp.setTablename("mcoptma");
        comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.DELETE);
        List<LockComponent> components = new ArrayList<LockComponent>(1);
        components.add(comp);
        LockRequest req = new LockRequest(components, "me", "localhost");
@@ -186,6 +189,7 @@ public class TestInitiator extends CompactorTest {
        LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
        comp.setTablename("ncomdpa");
        comp.setPartitionname("ds=day-" + i);
+ comp.setOperationType(DataOperationType.UPDATE);
        List<LockComponent> components = new ArrayList<LockComponent>(1);
        components.add(comp);
        LockRequest req = new LockRequest(components, "me", "localhost");
@@ -210,6 +214,7 @@ public class TestInitiator extends CompactorTest {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
      comp.setTablename("ceat");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -242,6 +247,7 @@ public class TestInitiator extends CompactorTest {
        long txnid = openTxn();
        LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
        comp.setTablename("ncwncs");
+ comp.setOperationType(DataOperationType.UPDATE);
        List<LockComponent> components = new ArrayList<LockComponent>(1);
        components.add(comp);
        LockRequest req = new LockRequest(components, "me", "localhost");
@@ -267,6 +273,7 @@ public class TestInitiator extends CompactorTest {
      for (int i = 0; i < 11; i++) {
        long txnid = openTxn();
        LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
+ comp.setOperationType(DataOperationType.DELETE);
        comp.setTablename("ncwncs");
        List<LockComponent> components = new ArrayList<LockComponent>(1);
        components.add(comp);
@@ -292,6 +299,7 @@ public class TestInitiator extends CompactorTest {
        long txnid = openTxn();
        LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
        comp.setTablename("ncwcas");
+ comp.setOperationType(DataOperationType.UPDATE);
        List<LockComponent> components = new ArrayList<LockComponent>(1);
        components.add(comp);
        LockRequest req = new LockRequest(components, "me", "localhost");
@@ -332,6 +340,7 @@ public class TestInitiator extends CompactorTest {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
      comp.setTablename("cthdp");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -364,6 +373,7 @@ public class TestInitiator extends CompactorTest {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
      comp.setTablename("cphdp");
      comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -395,6 +405,7 @@ public class TestInitiator extends CompactorTest {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
      comp.setTablename("nctdpnhe");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -430,6 +441,7 @@ public class TestInitiator extends CompactorTest {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
      comp.setTablename("cttmd");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -471,6 +483,7 @@ public class TestInitiator extends CompactorTest {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
      comp.setTablename("cptmd");
      comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -502,6 +515,7 @@ public class TestInitiator extends CompactorTest {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
      comp.setTablename("nctned");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -537,6 +551,7 @@ public class TestInitiator extends CompactorTest {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
      comp.setTablename("cmomwbv");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -577,6 +592,7 @@ public class TestInitiator extends CompactorTest {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
      comp.setTablename("ednb");
      comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.DELETE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -610,6 +626,7 @@ public class TestInitiator extends CompactorTest {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
      comp.setTablename("ttospgocr");
      comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -621,6 +638,7 @@ public class TestInitiator extends CompactorTest {
      comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
      comp.setTablename("ttospgocr");
      comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.UPDATE);
      components = new ArrayList<LockComponent>(1);
      components.add(comp);
      req = new LockRequest(components, "me", "localhost");
@@ -653,6 +671,7 @@ public class TestInitiator extends CompactorTest {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
      comp.setTablename("nctdp");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -680,6 +699,7 @@ public class TestInitiator extends CompactorTest {
      long txnid = openTxn();
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
      comp.setTablename("dt");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");
@@ -711,6 +731,7 @@ public class TestInitiator extends CompactorTest {
      LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
      comp.setTablename("dp");
      comp.setPartitionname("ds=today");
+ comp.setOperationType(DataOperationType.UPDATE);
      List<LockComponent> components = new ArrayList<LockComponent>(1);
      components.add(comp);
      LockRequest req = new LockRequest(components, "me", "localhost");

Search Discussions

  • Ekoifman at May 19, 2016 at 7:29 pm
    HIVE-13622 WriteSet tracking optimizations (Eugene Koifman, reviewed by Alan Gates)


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

    Branch: refs/heads/master
    Commit: f25b86520d8af5cfad3a0311281bc8e70117baa4
    Parents: ffa69a2
    Author: Eugene Koifman <ekoifman@hortonworks.com>
    Authored: Thu May 19 11:59:45 2016 -0700
    Committer: Eugene Koifman <ekoifman@hortonworks.com>
    Committed: Thu May 19 11:59:45 2016 -0700

    ----------------------------------------------------------------------
      .../hive/hcatalog/streaming/HiveEndPoint.java | 4 +-
      .../streaming/mutate/client/lock/Lock.java | 7 +-
      .../streaming/mutate/client/lock/TestLock.java | 11 +
      .../hive/metastore/TestHiveMetaStoreTxns.java | 7 +
      metastore/if/hive_metastore.thrift | 12 +
      .../gen/thrift/gen-cpp/ThriftHiveMetastore.cpp | 2020 +++++------
      .../gen/thrift/gen-cpp/hive_metastore_types.cpp | 1245 +++----
      .../gen/thrift/gen-cpp/hive_metastore_types.h | 52 +-
      .../metastore/api/AddDynamicPartitions.java | 127 +-
      .../hive/metastore/api/DataOperationType.java | 57 +
      .../hive/metastore/api/LockComponent.java | 234 +-
      .../src/gen/thrift/gen-php/metastore/Types.php | 86 +
      .../gen/thrift/gen-py/hive_metastore/ttypes.py | 69 +-
      .../gen/thrift/gen-rb/hive_metastore_types.rb | 27 +-
      .../hive/metastore/HiveMetaStoreClient.java | 9 +
      .../hadoop/hive/metastore/IMetaStoreClient.java | 10 +-
      .../hive/metastore/LockComponentBuilder.java | 10 +
      .../hive/metastore/LockRequestBuilder.java | 9 +
      .../hadoop/hive/metastore/txn/TxnHandler.java | 108 +-
      .../hive/metastore/txn/TxnHandler.java.orig | 3233 ++++++++++++++++++
      .../metastore/txn/TestCompactionTxnHandler.java | 15 +-
      .../hive/metastore/txn/TestTxnHandler.java | 85 +
      .../apache/hadoop/hive/ql/exec/MoveTask.java | 3 +-
      .../org/apache/hadoop/hive/ql/io/AcidUtils.java | 16 +-
      .../hadoop/hive/ql/lockmgr/DbTxnManager.java | 34 +-
      .../apache/hadoop/hive/ql/metadata/Hive.java | 6 +-
      .../hive/ql/lockmgr/TestDbTxnManager2.java | 181 +-
      .../hive/ql/txn/compactor/TestCleaner.java | 7 +
      .../hive/ql/txn/compactor/TestInitiator.java | 21 +
      29 files changed, 5992 insertions(+), 1713 deletions(-)
    ----------------------------------------------------------------------


    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java
    ----------------------------------------------------------------------
    diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java
    index db9fd72..cb64fff 100644
    --- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java
    +++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/HiveEndPoint.java
    @@ -19,6 +19,7 @@
      package org.apache.hive.hcatalog.streaming;

      import org.apache.hadoop.fs.FileSystem;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.slf4j.Logger;
      import org.slf4j.LoggerFactory;
      import org.apache.hadoop.hive.cli.CliSessionState;
    @@ -964,7 +965,8 @@ public class HiveEndPoint {
            LockComponentBuilder lockCompBuilder = new LockComponentBuilder()
                    .setDbName(hiveEndPoint.database)
                    .setTableName(hiveEndPoint.table)
    - .setShared();
    + .setShared()
    + .setOperationType(DataOperationType.INSERT);
            if (partNameForLock!=null && !partNameForLock.isEmpty() ) {
                lockCompBuilder.setPartitionName(partNameForLock);
            }

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/lock/Lock.java
    ----------------------------------------------------------------------
    diff --git a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/lock/Lock.java b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/lock/Lock.java
    index 17fa91a..c272837 100644
    --- a/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/lock/Lock.java
    +++ b/hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/mutate/client/lock/Lock.java
    @@ -31,6 +31,7 @@ import org.apache.hadoop.hive.conf.HiveConf;
      import org.apache.hadoop.hive.metastore.IMetaStoreClient;
      import org.apache.hadoop.hive.metastore.LockComponentBuilder;
      import org.apache.hadoop.hive.metastore.LockRequestBuilder;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.LockComponent;
      import org.apache.hadoop.hive.metastore.api.LockRequest;
      import org.apache.hadoop.hive.metastore.api.LockResponse;
    @@ -178,10 +179,12 @@ public class Lock {
          for (Table table : tables) {
            LockComponentBuilder componentBuilder = new LockComponentBuilder().setDbName(table.getDbName()).setTableName(
                table.getTableName());
    + //todo: DataOperationType is set conservatively here, we'd really want to distinguish update/delete
    + //and insert/select and if resource (that is written to) is ACID or not
            if (sinks.contains(table)) {
    - componentBuilder.setSemiShared();
    + componentBuilder.setSemiShared().setOperationType(DataOperationType.UPDATE).setIsAcid(true);
            } else {
    - componentBuilder.setShared();
    + componentBuilder.setShared().setOperationType(DataOperationType.INSERT).setIsAcid(true);
            }
            LockComponent component = componentBuilder.build();
            requestBuilder.addLockComponent(component);

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/lock/TestLock.java
    ----------------------------------------------------------------------
    diff --git a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/lock/TestLock.java b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/lock/TestLock.java
    index cf56176..e454942 100644
    --- a/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/lock/TestLock.java
    +++ b/hcatalog/streaming/src/test/org/apache/hive/hcatalog/streaming/mutate/client/lock/TestLock.java
    @@ -43,6 +43,7 @@ import java.util.Timer;

      import org.apache.hadoop.hive.conf.HiveConf;
      import org.apache.hadoop.hive.metastore.IMetaStoreClient;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.LockComponent;
      import org.apache.hadoop.hive.metastore.api.LockLevel;
      import org.apache.hadoop.hive.metastore.api.LockRequest;
    @@ -174,10 +175,14 @@ public class TestLock {

          LockComponent expected1 = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "DB");
          expected1.setTablename("SOURCE_1");
    + expected1.setOperationType(DataOperationType.INSERT);
    + expected1.setIsAcid(true);
          assertTrue(components.contains(expected1));

          LockComponent expected2 = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "DB");
          expected2.setTablename("SOURCE_2");
    + expected2.setOperationType(DataOperationType.INSERT);
    + expected2.setIsAcid(true);
          assertTrue(components.contains(expected2));
        }

    @@ -197,14 +202,20 @@ public class TestLock {

          LockComponent expected1 = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "DB");
          expected1.setTablename("SOURCE_1");
    + expected1.setOperationType(DataOperationType.INSERT);
    + expected1.setIsAcid(true);
          assertTrue(components.contains(expected1));

          LockComponent expected2 = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "DB");
          expected2.setTablename("SOURCE_2");
    + expected2.setOperationType(DataOperationType.INSERT);
    + expected2.setIsAcid(true);
          assertTrue(components.contains(expected2));

          LockComponent expected3 = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "DB");
          expected3.setTablename("SINK");
    + expected3.setOperationType(DataOperationType.UPDATE);
    + expected3.setIsAcid(true);
          assertTrue(components.contains(expected3));
        }


    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
    ----------------------------------------------------------------------
    diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
    index 22354ab..997f73e 100644
    --- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
    +++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
    @@ -22,6 +22,7 @@ import junit.framework.Assert;
      import org.apache.hadoop.hive.common.ValidTxnList;
      import org.apache.hadoop.hive.common.ValidReadTxnList;
      import org.apache.hadoop.hive.conf.HiveConf;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeResponse;
      import org.apache.hadoop.hive.metastore.api.LockResponse;
      import org.apache.hadoop.hive.metastore.api.LockState;
    @@ -152,14 +153,17 @@ public class TestHiveMetaStoreTxns {
              .setTableName("mytable")
              .setPartitionName("mypartition")
              .setExclusive()
    + .setOperationType(DataOperationType.NO_TXN)
              .build());
          rqstBuilder.addLockComponent(new LockComponentBuilder()
              .setDbName("mydb")
              .setTableName("yourtable")
              .setSemiShared()
    + .setOperationType(DataOperationType.NO_TXN)
              .build());
          rqstBuilder.addLockComponent(new LockComponentBuilder()
              .setDbName("yourdb")
    + .setOperationType(DataOperationType.NO_TXN)
              .setShared()
              .build());
          rqstBuilder.setUser("fred");
    @@ -188,15 +192,18 @@ public class TestHiveMetaStoreTxns {
              .setTableName("mytable")
              .setPartitionName("mypartition")
              .setSemiShared()
    + .setOperationType(DataOperationType.UPDATE)
              .build())
            .addLockComponent(new LockComponentBuilder()
              .setDbName("mydb")
              .setTableName("yourtable")
              .setSemiShared()
    + .setOperationType(DataOperationType.UPDATE)
              .build())
            .addLockComponent(new LockComponentBuilder()
              .setDbName("yourdb")
              .setShared()
    + .setOperationType(DataOperationType.SELECT)
              .build())
            .setUser("fred");


    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/if/hive_metastore.thrift
    ----------------------------------------------------------------------
    diff --git a/metastore/if/hive_metastore.thrift b/metastore/if/hive_metastore.thrift
    index f8e56c7..738456c 100755
    --- a/metastore/if/hive_metastore.thrift
    +++ b/metastore/if/hive_metastore.thrift
    @@ -134,6 +134,15 @@ enum GrantRevokeType {
          REVOKE = 2,
      }

    +enum DataOperationType {
    + SELECT = 1,
    + INSERT = 2
    + UPDATE = 3,
    + DELETE = 4,
    + UNSET = 5,//this is the default to distinguish from NULL from old clients
    + NO_TXN = 6,//drop table, insert overwrite, etc - something non-transactional
    +}
    +
      // Types of events the client can request that the metastore fire. For now just support DML operations, as the metastore knows
      // about DDL operations and there's no reason for the client to request such an event.
      enum EventRequestType {
    @@ -657,6 +666,8 @@ struct LockComponent {
          3: required string dbname,
          4: optional string tablename,
          5: optional string partitionname,
    + 6: optional DataOperationType operationType = DataOperationType.UNSET,
    + 7: optional bool isAcid = false
      }

      struct LockRequest {
    @@ -762,6 +773,7 @@ struct AddDynamicPartitions {
          2: required string dbname,
          3: required string tablename,
          4: required list<string> partitionnames,
    + 5: optional DataOperationType operationType = DataOperationType.UNSET
      }

      struct NotificationEventRequest {
  • Ekoifman at May 19, 2016 at 7:29 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    index 618c3ac..298384c 100644
    --- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    +++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    @@ -1240,14 +1240,14 @@ uint32_t ThriftHiveMetastore_get_databases_result::read(::apache::thrift::protoc
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size771;
    - ::apache::thrift::protocol::TType _etype774;
    - xfer += iprot->readListBegin(_etype774, _size771);
    - this->success.resize(_size771);
    - uint32_t _i775;
    - for (_i775 = 0; _i775 < _size771; ++_i775)
    + uint32_t _size773;
    + ::apache::thrift::protocol::TType _etype776;
    + xfer += iprot->readListBegin(_etype776, _size773);
    + this->success.resize(_size773);
    + uint32_t _i777;
    + for (_i777 = 0; _i777 < _size773; ++_i777)
                  {
    - xfer += iprot->readString(this->success[_i775]);
    + xfer += iprot->readString(this->success[_i777]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -1286,10 +1286,10 @@ uint32_t ThriftHiveMetastore_get_databases_result::write(::apache::thrift::proto
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter776;
    - for (_iter776 = this->success.begin(); _iter776 != this->success.end(); ++_iter776)
    + std::vector<std::string> ::const_iterator _iter778;
    + for (_iter778 = this->success.begin(); _iter778 != this->success.end(); ++_iter778)
            {
    - xfer += oprot->writeString((*_iter776));
    + xfer += oprot->writeString((*_iter778));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -1334,14 +1334,14 @@ uint32_t ThriftHiveMetastore_get_databases_presult::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size777;
    - ::apache::thrift::protocol::TType _etype780;
    - xfer += iprot->readListBegin(_etype780, _size777);
    - (*(this->success)).resize(_size777);
    - uint32_t _i781;
    - for (_i781 = 0; _i781 < _size777; ++_i781)
    + uint32_t _size779;
    + ::apache::thrift::protocol::TType _etype782;
    + xfer += iprot->readListBegin(_etype782, _size779);
    + (*(this->success)).resize(_size779);
    + uint32_t _i783;
    + for (_i783 = 0; _i783 < _size779; ++_i783)
                  {
    - xfer += iprot->readString((*(this->success))[_i781]);
    + xfer += iprot->readString((*(this->success))[_i783]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -1458,14 +1458,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::read(::apache::thrift::pr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size782;
    - ::apache::thrift::protocol::TType _etype785;
    - xfer += iprot->readListBegin(_etype785, _size782);
    - this->success.resize(_size782);
    - uint32_t _i786;
    - for (_i786 = 0; _i786 < _size782; ++_i786)
    + uint32_t _size784;
    + ::apache::thrift::protocol::TType _etype787;
    + xfer += iprot->readListBegin(_etype787, _size784);
    + this->success.resize(_size784);
    + uint32_t _i788;
    + for (_i788 = 0; _i788 < _size784; ++_i788)
                  {
    - xfer += iprot->readString(this->success[_i786]);
    + xfer += iprot->readString(this->success[_i788]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -1504,10 +1504,10 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::write(::apache::thrift::p
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter787;
    - for (_iter787 = this->success.begin(); _iter787 != this->success.end(); ++_iter787)
    + std::vector<std::string> ::const_iterator _iter789;
    + for (_iter789 = this->success.begin(); _iter789 != this->success.end(); ++_iter789)
            {
    - xfer += oprot->writeString((*_iter787));
    + xfer += oprot->writeString((*_iter789));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -1552,14 +1552,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_presult::read(::apache::thrift::p
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size788;
    - ::apache::thrift::protocol::TType _etype791;
    - xfer += iprot->readListBegin(_etype791, _size788);
    - (*(this->success)).resize(_size788);
    - uint32_t _i792;
    - for (_i792 = 0; _i792 < _size788; ++_i792)
    + uint32_t _size790;
    + ::apache::thrift::protocol::TType _etype793;
    + xfer += iprot->readListBegin(_etype793, _size790);
    + (*(this->success)).resize(_size790);
    + uint32_t _i794;
    + for (_i794 = 0; _i794 < _size790; ++_i794)
                  {
    - xfer += iprot->readString((*(this->success))[_i792]);
    + xfer += iprot->readString((*(this->success))[_i794]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -2621,17 +2621,17 @@ uint32_t ThriftHiveMetastore_get_type_all_result::read(::apache::thrift::protoco
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  this->success.clear();
    - uint32_t _size793;
    - ::apache::thrift::protocol::TType _ktype794;
    - ::apache::thrift::protocol::TType _vtype795;
    - xfer += iprot->readMapBegin(_ktype794, _vtype795, _size793);
    - uint32_t _i797;
    - for (_i797 = 0; _i797 < _size793; ++_i797)
    + uint32_t _size795;
    + ::apache::thrift::protocol::TType _ktype796;
    + ::apache::thrift::protocol::TType _vtype797;
    + xfer += iprot->readMapBegin(_ktype796, _vtype797, _size795);
    + uint32_t _i799;
    + for (_i799 = 0; _i799 < _size795; ++_i799)
                  {
    - std::string _key798;
    - xfer += iprot->readString(_key798);
    - Type& _val799 = this->success[_key798];
    - xfer += _val799.read(iprot);
    + std::string _key800;
    + xfer += iprot->readString(_key800);
    + Type& _val801 = this->success[_key800];
    + xfer += _val801.read(iprot);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -2670,11 +2670,11 @@ uint32_t ThriftHiveMetastore_get_type_all_result::write(::apache::thrift::protoc
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
          {
            xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::map<std::string, Type> ::const_iterator _iter800;
    - for (_iter800 = this->success.begin(); _iter800 != this->success.end(); ++_iter800)
    + std::map<std::string, Type> ::const_iterator _iter802;
    + for (_iter802 = this->success.begin(); _iter802 != this->success.end(); ++_iter802)
            {
    - xfer += oprot->writeString(_iter800->first);
    - xfer += _iter800->second.write(oprot);
    + xfer += oprot->writeString(_iter802->first);
    + xfer += _iter802->second.write(oprot);
            }
            xfer += oprot->writeMapEnd();
          }
    @@ -2719,17 +2719,17 @@ uint32_t ThriftHiveMetastore_get_type_all_presult::read(::apache::thrift::protoc
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  (*(this->success)).clear();
    - uint32_t _size801;
    - ::apache::thrift::protocol::TType _ktype802;
    - ::apache::thrift::protocol::TType _vtype803;
    - xfer += iprot->readMapBegin(_ktype802, _vtype803, _size801);
    - uint32_t _i805;
    - for (_i805 = 0; _i805 < _size801; ++_i805)
    + uint32_t _size803;
    + ::apache::thrift::protocol::TType _ktype804;
    + ::apache::thrift::protocol::TType _vtype805;
    + xfer += iprot->readMapBegin(_ktype804, _vtype805, _size803);
    + uint32_t _i807;
    + for (_i807 = 0; _i807 < _size803; ++_i807)
                  {
    - std::string _key806;
    - xfer += iprot->readString(_key806);
    - Type& _val807 = (*(this->success))[_key806];
    - xfer += _val807.read(iprot);
    + std::string _key808;
    + xfer += iprot->readString(_key808);
    + Type& _val809 = (*(this->success))[_key808];
    + xfer += _val809.read(iprot);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -2883,14 +2883,14 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(::apache::thrift::protocol:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size808;
    - ::apache::thrift::protocol::TType _etype811;
    - xfer += iprot->readListBegin(_etype811, _size808);
    - this->success.resize(_size808);
    - uint32_t _i812;
    - for (_i812 = 0; _i812 < _size808; ++_i812)
    + uint32_t _size810;
    + ::apache::thrift::protocol::TType _etype813;
    + xfer += iprot->readListBegin(_etype813, _size810);
    + this->success.resize(_size810);
    + uint32_t _i814;
    + for (_i814 = 0; _i814 < _size810; ++_i814)
                  {
    - xfer += this->success[_i812].read(iprot);
    + xfer += this->success[_i814].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -2945,10 +2945,10 @@ uint32_t ThriftHiveMetastore_get_fields_result::write(::apache::thrift::protocol
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<FieldSchema> ::const_iterator _iter813;
    - for (_iter813 = this->success.begin(); _iter813 != this->success.end(); ++_iter813)
    + std::vector<FieldSchema> ::const_iterator _iter815;
    + for (_iter815 = this->success.begin(); _iter815 != this->success.end(); ++_iter815)
            {
    - xfer += (*_iter813).write(oprot);
    + xfer += (*_iter815).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -3001,14 +3001,14 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(::apache::thrift::protocol
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size814;
    - ::apache::thrift::protocol::TType _etype817;
    - xfer += iprot->readListBegin(_etype817, _size814);
    - (*(this->success)).resize(_size814);
    - uint32_t _i818;
    - for (_i818 = 0; _i818 < _size814; ++_i818)
    + uint32_t _size816;
    + ::apache::thrift::protocol::TType _etype819;
    + xfer += iprot->readListBegin(_etype819, _size816);
    + (*(this->success)).resize(_size816);
    + uint32_t _i820;
    + for (_i820 = 0; _i820 < _size816; ++_i820)
                  {
    - xfer += (*(this->success))[_i818].read(iprot);
    + xfer += (*(this->success))[_i820].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3194,14 +3194,14 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::read(::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size819;
    - ::apache::thrift::protocol::TType _etype822;
    - xfer += iprot->readListBegin(_etype822, _size819);
    - this->success.resize(_size819);
    - uint32_t _i823;
    - for (_i823 = 0; _i823 < _size819; ++_i823)
    + uint32_t _size821;
    + ::apache::thrift::protocol::TType _etype824;
    + xfer += iprot->readListBegin(_etype824, _size821);
    + this->success.resize(_size821);
    + uint32_t _i825;
    + for (_i825 = 0; _i825 < _size821; ++_i825)
                  {
    - xfer += this->success[_i823].read(iprot);
    + xfer += this->success[_i825].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3256,10 +3256,10 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::write(:
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<FieldSchema> ::const_iterator _iter824;
    - for (_iter824 = this->success.begin(); _iter824 != this->success.end(); ++_iter824)
    + std::vector<FieldSchema> ::const_iterator _iter826;
    + for (_iter826 = this->success.begin(); _iter826 != this->success.end(); ++_iter826)
            {
    - xfer += (*_iter824).write(oprot);
    + xfer += (*_iter826).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -3312,14 +3312,14 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_presult::read(:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size825;
    - ::apache::thrift::protocol::TType _etype828;
    - xfer += iprot->readListBegin(_etype828, _size825);
    - (*(this->success)).resize(_size825);
    - uint32_t _i829;
    - for (_i829 = 0; _i829 < _size825; ++_i829)
    + uint32_t _size827;
    + ::apache::thrift::protocol::TType _etype830;
    + xfer += iprot->readListBegin(_etype830, _size827);
    + (*(this->success)).resize(_size827);
    + uint32_t _i831;
    + for (_i831 = 0; _i831 < _size827; ++_i831)
                  {
    - xfer += (*(this->success))[_i829].read(iprot);
    + xfer += (*(this->success))[_i831].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3489,14 +3489,14 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(::apache::thrift::protocol:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size830;
    - ::apache::thrift::protocol::TType _etype833;
    - xfer += iprot->readListBegin(_etype833, _size830);
    - this->success.resize(_size830);
    - uint32_t _i834;
    - for (_i834 = 0; _i834 < _size830; ++_i834)
    + uint32_t _size832;
    + ::apache::thrift::protocol::TType _etype835;
    + xfer += iprot->readListBegin(_etype835, _size832);
    + this->success.resize(_size832);
    + uint32_t _i836;
    + for (_i836 = 0; _i836 < _size832; ++_i836)
                  {
    - xfer += this->success[_i834].read(iprot);
    + xfer += this->success[_i836].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3551,10 +3551,10 @@ uint32_t ThriftHiveMetastore_get_schema_result::write(::apache::thrift::protocol
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<FieldSchema> ::const_iterator _iter835;
    - for (_iter835 = this->success.begin(); _iter835 != this->success.end(); ++_iter835)
    + std::vector<FieldSchema> ::const_iterator _iter837;
    + for (_iter837 = this->success.begin(); _iter837 != this->success.end(); ++_iter837)
            {
    - xfer += (*_iter835).write(oprot);
    + xfer += (*_iter837).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -3607,14 +3607,14 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(::apache::thrift::protocol
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size836;
    - ::apache::thrift::protocol::TType _etype839;
    - xfer += iprot->readListBegin(_etype839, _size836);
    - (*(this->success)).resize(_size836);
    - uint32_t _i840;
    - for (_i840 = 0; _i840 < _size836; ++_i840)
    + uint32_t _size838;
    + ::apache::thrift::protocol::TType _etype841;
    + xfer += iprot->readListBegin(_etype841, _size838);
    + (*(this->success)).resize(_size838);
    + uint32_t _i842;
    + for (_i842 = 0; _i842 < _size838; ++_i842)
                  {
    - xfer += (*(this->success))[_i840].read(iprot);
    + xfer += (*(this->success))[_i842].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3800,14 +3800,14 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::read(::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size841;
    - ::apache::thrift::protocol::TType _etype844;
    - xfer += iprot->readListBegin(_etype844, _size841);
    - this->success.resize(_size841);
    - uint32_t _i845;
    - for (_i845 = 0; _i845 < _size841; ++_i845)
    + uint32_t _size843;
    + ::apache::thrift::protocol::TType _etype846;
    + xfer += iprot->readListBegin(_etype846, _size843);
    + this->success.resize(_size843);
    + uint32_t _i847;
    + for (_i847 = 0; _i847 < _size843; ++_i847)
                  {
    - xfer += this->success[_i845].read(iprot);
    + xfer += this->success[_i847].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3862,10 +3862,10 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::write(:
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<FieldSchema> ::const_iterator _iter846;
    - for (_iter846 = this->success.begin(); _iter846 != this->success.end(); ++_iter846)
    + std::vector<FieldSchema> ::const_iterator _iter848;
    + for (_iter848 = this->success.begin(); _iter848 != this->success.end(); ++_iter848)
            {
    - xfer += (*_iter846).write(oprot);
    + xfer += (*_iter848).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -3918,14 +3918,14 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_presult::read(:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size847;
    - ::apache::thrift::protocol::TType _etype850;
    - xfer += iprot->readListBegin(_etype850, _size847);
    - (*(this->success)).resize(_size847);
    - uint32_t _i851;
    - for (_i851 = 0; _i851 < _size847; ++_i851)
    + uint32_t _size849;
    + ::apache::thrift::protocol::TType _etype852;
    + xfer += iprot->readListBegin(_etype852, _size849);
    + (*(this->success)).resize(_size849);
    + uint32_t _i853;
    + for (_i853 = 0; _i853 < _size849; ++_i853)
                  {
    - xfer += (*(this->success))[_i851].read(iprot);
    + xfer += (*(this->success))[_i853].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -4518,14 +4518,14 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::read(::apache::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->primaryKeys.clear();
    - uint32_t _size852;
    - ::apache::thrift::protocol::TType _etype855;
    - xfer += iprot->readListBegin(_etype855, _size852);
    - this->primaryKeys.resize(_size852);
    - uint32_t _i856;
    - for (_i856 = 0; _i856 < _size852; ++_i856)
    + uint32_t _size854;
    + ::apache::thrift::protocol::TType _etype857;
    + xfer += iprot->readListBegin(_etype857, _size854);
    + this->primaryKeys.resize(_size854);
    + uint32_t _i858;
    + for (_i858 = 0; _i858 < _size854; ++_i858)
                  {
    - xfer += this->primaryKeys[_i856].read(iprot);
    + xfer += this->primaryKeys[_i858].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -4538,14 +4538,14 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::read(::apache::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->foreignKeys.clear();
    - uint32_t _size857;
    - ::apache::thrift::protocol::TType _etype860;
    - xfer += iprot->readListBegin(_etype860, _size857);
    - this->foreignKeys.resize(_size857);
    - uint32_t _i861;
    - for (_i861 = 0; _i861 < _size857; ++_i861)
    + uint32_t _size859;
    + ::apache::thrift::protocol::TType _etype862;
    + xfer += iprot->readListBegin(_etype862, _size859);
    + this->foreignKeys.resize(_size859);
    + uint32_t _i863;
    + for (_i863 = 0; _i863 < _size859; ++_i863)
                  {
    - xfer += this->foreignKeys[_i861].read(iprot);
    + xfer += this->foreignKeys[_i863].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -4578,10 +4578,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::write(::apache:
        xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 2);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->primaryKeys.size()));
    - std::vector<SQLPrimaryKey> ::const_iterator _iter862;
    - for (_iter862 = this->primaryKeys.begin(); _iter862 != this->primaryKeys.end(); ++_iter862)
    + std::vector<SQLPrimaryKey> ::const_iterator _iter864;
    + for (_iter864 = this->primaryKeys.begin(); _iter864 != this->primaryKeys.end(); ++_iter864)
          {
    - xfer += (*_iter862).write(oprot);
    + xfer += (*_iter864).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -4590,10 +4590,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_args::write(::apache:
        xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->foreignKeys.size()));
    - std::vector<SQLForeignKey> ::const_iterator _iter863;
    - for (_iter863 = this->foreignKeys.begin(); _iter863 != this->foreignKeys.end(); ++_iter863)
    + std::vector<SQLForeignKey> ::const_iterator _iter865;
    + for (_iter865 = this->foreignKeys.begin(); _iter865 != this->foreignKeys.end(); ++_iter865)
          {
    - xfer += (*_iter863).write(oprot);
    + xfer += (*_iter865).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -4621,10 +4621,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_pargs::write(::apache
        xfer += oprot->writeFieldBegin("primaryKeys", ::apache::thrift::protocol::T_LIST, 2);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->primaryKeys)).size()));
    - std::vector<SQLPrimaryKey> ::const_iterator _iter864;
    - for (_iter864 = (*(this->primaryKeys)).begin(); _iter864 != (*(this->primaryKeys)).end(); ++_iter864)
    + std::vector<SQLPrimaryKey> ::const_iterator _iter866;
    + for (_iter866 = (*(this->primaryKeys)).begin(); _iter866 != (*(this->primaryKeys)).end(); ++_iter866)
          {
    - xfer += (*_iter864).write(oprot);
    + xfer += (*_iter866).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -4633,10 +4633,10 @@ uint32_t ThriftHiveMetastore_create_table_with_constraints_pargs::write(::apache
        xfer += oprot->writeFieldBegin("foreignKeys", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->foreignKeys)).size()));
    - std::vector<SQLForeignKey> ::const_iterator _iter865;
    - for (_iter865 = (*(this->foreignKeys)).begin(); _iter865 != (*(this->foreignKeys)).end(); ++_iter865)
    + std::vector<SQLForeignKey> ::const_iterator _iter867;
    + for (_iter867 = (*(this->foreignKeys)).begin(); _iter867 != (*(this->foreignKeys)).end(); ++_iter867)
          {
    - xfer += (*_iter865).write(oprot);
    + xfer += (*_iter867).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -6055,14 +6055,14 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(::apache::thrift::protocol:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size866;
    - ::apache::thrift::protocol::TType _etype869;
    - xfer += iprot->readListBegin(_etype869, _size866);
    - this->success.resize(_size866);
    - uint32_t _i870;
    - for (_i870 = 0; _i870 < _size866; ++_i870)
    + uint32_t _size868;
    + ::apache::thrift::protocol::TType _etype871;
    + xfer += iprot->readListBegin(_etype871, _size868);
    + this->success.resize(_size868);
    + uint32_t _i872;
    + for (_i872 = 0; _i872 < _size868; ++_i872)
                  {
    - xfer += iprot->readString(this->success[_i870]);
    + xfer += iprot->readString(this->success[_i872]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -6101,10 +6101,10 @@ uint32_t ThriftHiveMetastore_get_tables_result::write(::apache::thrift::protocol
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter871;
    - for (_iter871 = this->success.begin(); _iter871 != this->success.end(); ++_iter871)
    + std::vector<std::string> ::const_iterator _iter873;
    + for (_iter873 = this->success.begin(); _iter873 != this->success.end(); ++_iter873)
            {
    - xfer += oprot->writeString((*_iter871));
    + xfer += oprot->writeString((*_iter873));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -6149,14 +6149,14 @@ uint32_t ThriftHiveMetastore_get_tables_presult::read(::apache::thrift::protocol
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size872;
    - ::apache::thrift::protocol::TType _etype875;
    - xfer += iprot->readListBegin(_etype875, _size872);
    - (*(this->success)).resize(_size872);
    - uint32_t _i876;
    - for (_i876 = 0; _i876 < _size872; ++_i876)
    + uint32_t _size874;
    + ::apache::thrift::protocol::TType _etype877;
    + xfer += iprot->readListBegin(_etype877, _size874);
    + (*(this->success)).resize(_size874);
    + uint32_t _i878;
    + for (_i878 = 0; _i878 < _size874; ++_i878)
                  {
    - xfer += iprot->readString((*(this->success))[_i876]);
    + xfer += iprot->readString((*(this->success))[_i878]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -6231,14 +6231,14 @@ uint32_t ThriftHiveMetastore_get_table_meta_args::read(::apache::thrift::protoco
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->tbl_types.clear();
    - uint32_t _size877;
    - ::apache::thrift::protocol::TType _etype880;
    - xfer += iprot->readListBegin(_etype880, _size877);
    - this->tbl_types.resize(_size877);
    - uint32_t _i881;
    - for (_i881 = 0; _i881 < _size877; ++_i881)
    + uint32_t _size879;
    + ::apache::thrift::protocol::TType _etype882;
    + xfer += iprot->readListBegin(_etype882, _size879);
    + this->tbl_types.resize(_size879);
    + uint32_t _i883;
    + for (_i883 = 0; _i883 < _size879; ++_i883)
                  {
    - xfer += iprot->readString(this->tbl_types[_i881]);
    + xfer += iprot->readString(this->tbl_types[_i883]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -6275,10 +6275,10 @@ uint32_t ThriftHiveMetastore_get_table_meta_args::write(::apache::thrift::protoc
        xfer += oprot->writeFieldBegin("tbl_types", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->tbl_types.size()));
    - std::vector<std::string> ::const_iterator _iter882;
    - for (_iter882 = this->tbl_types.begin(); _iter882 != this->tbl_types.end(); ++_iter882)
    + std::vector<std::string> ::const_iterator _iter884;
    + for (_iter884 = this->tbl_types.begin(); _iter884 != this->tbl_types.end(); ++_iter884)
          {
    - xfer += oprot->writeString((*_iter882));
    + xfer += oprot->writeString((*_iter884));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -6310,10 +6310,10 @@ uint32_t ThriftHiveMetastore_get_table_meta_pargs::write(::apache::thrift::proto
        xfer += oprot->writeFieldBegin("tbl_types", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->tbl_types)).size()));
    - std::vector<std::string> ::const_iterator _iter883;
    - for (_iter883 = (*(this->tbl_types)).begin(); _iter883 != (*(this->tbl_types)).end(); ++_iter883)
    + std::vector<std::string> ::const_iterator _iter885;
    + for (_iter885 = (*(this->tbl_types)).begin(); _iter885 != (*(this->tbl_types)).end(); ++_iter885)
          {
    - xfer += oprot->writeString((*_iter883));
    + xfer += oprot->writeString((*_iter885));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -6354,14 +6354,14 @@ uint32_t ThriftHiveMetastore_get_table_meta_result::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size884;
    - ::apache::thrift::protocol::TType _etype887;
    - xfer += iprot->readListBegin(_etype887, _size884);
    - this->success.resize(_size884);
    - uint32_t _i888;
    - for (_i888 = 0; _i888 < _size884; ++_i888)
    + uint32_t _size886;
    + ::apache::thrift::protocol::TType _etype889;
    + xfer += iprot->readListBegin(_etype889, _size886);
    + this->success.resize(_size886);
    + uint32_t _i890;
    + for (_i890 = 0; _i890 < _size886; ++_i890)
                  {
    - xfer += this->success[_i888].read(iprot);
    + xfer += this->success[_i890].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -6400,10 +6400,10 @@ uint32_t ThriftHiveMetastore_get_table_meta_result::write(::apache::thrift::prot
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<TableMeta> ::const_iterator _iter889;
    - for (_iter889 = this->success.begin(); _iter889 != this->success.end(); ++_iter889)
    + std::vector<TableMeta> ::const_iterator _iter891;
    + for (_iter891 = this->success.begin(); _iter891 != this->success.end(); ++_iter891)
            {
    - xfer += (*_iter889).write(oprot);
    + xfer += (*_iter891).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -6448,14 +6448,14 @@ uint32_t ThriftHiveMetastore_get_table_meta_presult::read(::apache::thrift::prot
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size890;
    - ::apache::thrift::protocol::TType _etype893;
    - xfer += iprot->readListBegin(_etype893, _size890);
    - (*(this->success)).resize(_size890);
    - uint32_t _i894;
    - for (_i894 = 0; _i894 < _size890; ++_i894)
    + uint32_t _size892;
    + ::apache::thrift::protocol::TType _etype895;
    + xfer += iprot->readListBegin(_etype895, _size892);
    + (*(this->success)).resize(_size892);
    + uint32_t _i896;
    + for (_i896 = 0; _i896 < _size892; ++_i896)
                  {
    - xfer += (*(this->success))[_i894].read(iprot);
    + xfer += (*(this->success))[_i896].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -6593,14 +6593,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size895;
    - ::apache::thrift::protocol::TType _etype898;
    - xfer += iprot->readListBegin(_etype898, _size895);
    - this->success.resize(_size895);
    - uint32_t _i899;
    - for (_i899 = 0; _i899 < _size895; ++_i899)
    + uint32_t _size897;
    + ::apache::thrift::protocol::TType _etype900;
    + xfer += iprot->readListBegin(_etype900, _size897);
    + this->success.resize(_size897);
    + uint32_t _i901;
    + for (_i901 = 0; _i901 < _size897; ++_i901)
                  {
    - xfer += iprot->readString(this->success[_i899]);
    + xfer += iprot->readString(this->success[_i901]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -6639,10 +6639,10 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::write(::apache::thrift::prot
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter900;
    - for (_iter900 = this->success.begin(); _iter900 != this->success.end(); ++_iter900)
    + std::vector<std::string> ::const_iterator _iter902;
    + for (_iter902 = this->success.begin(); _iter902 != this->success.end(); ++_iter902)
            {
    - xfer += oprot->writeString((*_iter900));
    + xfer += oprot->writeString((*_iter902));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -6687,14 +6687,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_presult::read(::apache::thrift::prot
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size901;
    - ::apache::thrift::protocol::TType _etype904;
    - xfer += iprot->readListBegin(_etype904, _size901);
    - (*(this->success)).resize(_size901);
    - uint32_t _i905;
    - for (_i905 = 0; _i905 < _size901; ++_i905)
    + uint32_t _size903;
    + ::apache::thrift::protocol::TType _etype906;
    + xfer += iprot->readListBegin(_etype906, _size903);
    + (*(this->success)).resize(_size903);
    + uint32_t _i907;
    + for (_i907 = 0; _i907 < _size903; ++_i907)
                  {
    - xfer += iprot->readString((*(this->success))[_i905]);
    + xfer += iprot->readString((*(this->success))[_i907]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -7004,14 +7004,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::read(::apache::thri
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->tbl_names.clear();
    - uint32_t _size906;
    - ::apache::thrift::protocol::TType _etype909;
    - xfer += iprot->readListBegin(_etype909, _size906);
    - this->tbl_names.resize(_size906);
    - uint32_t _i910;
    - for (_i910 = 0; _i910 < _size906; ++_i910)
    + uint32_t _size908;
    + ::apache::thrift::protocol::TType _etype911;
    + xfer += iprot->readListBegin(_etype911, _size908);
    + this->tbl_names.resize(_size908);
    + uint32_t _i912;
    + for (_i912 = 0; _i912 < _size908; ++_i912)
                  {
    - xfer += iprot->readString(this->tbl_names[_i910]);
    + xfer += iprot->readString(this->tbl_names[_i912]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -7044,10 +7044,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thr
        xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->tbl_names.size()));
    - std::vector<std::string> ::const_iterator _iter911;
    - for (_iter911 = this->tbl_names.begin(); _iter911 != this->tbl_names.end(); ++_iter911)
    + std::vector<std::string> ::const_iterator _iter913;
    + for (_iter913 = this->tbl_names.begin(); _iter913 != this->tbl_names.end(); ++_iter913)
          {
    - xfer += oprot->writeString((*_iter911));
    + xfer += oprot->writeString((*_iter913));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -7075,10 +7075,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::th
        xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->tbl_names)).size()));
    - std::vector<std::string> ::const_iterator _iter912;
    - for (_iter912 = (*(this->tbl_names)).begin(); _iter912 != (*(this->tbl_names)).end(); ++_iter912)
    + std::vector<std::string> ::const_iterator _iter914;
    + for (_iter914 = (*(this->tbl_names)).begin(); _iter914 != (*(this->tbl_names)).end(); ++_iter914)
          {
    - xfer += oprot->writeString((*_iter912));
    + xfer += oprot->writeString((*_iter914));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -7119,14 +7119,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::read(::apache::th
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size913;
    - ::apache::thrift::protocol::TType _etype916;
    - xfer += iprot->readListBegin(_etype916, _size913);
    - this->success.resize(_size913);
    - uint32_t _i917;
    - for (_i917 = 0; _i917 < _size913; ++_i917)
    + uint32_t _size915;
    + ::apache::thrift::protocol::TType _etype918;
    + xfer += iprot->readListBegin(_etype918, _size915);
    + this->success.resize(_size915);
    + uint32_t _i919;
    + for (_i919 = 0; _i919 < _size915; ++_i919)
                  {
    - xfer += this->success[_i917].read(iprot);
    + xfer += this->success[_i919].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -7181,10 +7181,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::write(::apache::t
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Table> ::const_iterator _iter918;
    - for (_iter918 = this->success.begin(); _iter918 != this->success.end(); ++_iter918)
    + std::vector<Table> ::const_iterator _iter920;
    + for (_iter920 = this->success.begin(); _iter920 != this->success.end(); ++_iter920)
            {
    - xfer += (*_iter918).write(oprot);
    + xfer += (*_iter920).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -7237,14 +7237,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_presult::read(::apache::t
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size919;
    - ::apache::thrift::protocol::TType _etype922;
    - xfer += iprot->readListBegin(_etype922, _size919);
    - (*(this->success)).resize(_size919);
    - uint32_t _i923;
    - for (_i923 = 0; _i923 < _size919; ++_i923)
    + uint32_t _size921;
    + ::apache::thrift::protocol::TType _etype924;
    + xfer += iprot->readListBegin(_etype924, _size921);
    + (*(this->success)).resize(_size921);
    + uint32_t _i925;
    + for (_i925 = 0; _i925 < _size921; ++_i925)
                  {
    - xfer += (*(this->success))[_i923].read(iprot);
    + xfer += (*(this->success))[_i925].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -7430,14 +7430,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::read(::apache::th
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size924;
    - ::apache::thrift::protocol::TType _etype927;
    - xfer += iprot->readListBegin(_etype927, _size924);
    - this->success.resize(_size924);
    - uint32_t _i928;
    - for (_i928 = 0; _i928 < _size924; ++_i928)
    + uint32_t _size926;
    + ::apache::thrift::protocol::TType _etype929;
    + xfer += iprot->readListBegin(_etype929, _size926);
    + this->success.resize(_size926);
    + uint32_t _i930;
    + for (_i930 = 0; _i930 < _size926; ++_i930)
                  {
    - xfer += iprot->readString(this->success[_i928]);
    + xfer += iprot->readString(this->success[_i930]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -7492,10 +7492,10 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::write(::apache::t
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter929;
    - for (_iter929 = this->success.begin(); _iter929 != this->success.end(); ++_iter929)
    + std::vector<std::string> ::const_iterator _iter931;
    + for (_iter931 = this->success.begin(); _iter931 != this->success.end(); ++_iter931)
            {
    - xfer += oprot->writeString((*_iter929));
    + xfer += oprot->writeString((*_iter931));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -7548,14 +7548,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_presult::read(::apache::t
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size930;
    - ::apache::thrift::protocol::TType _etype933;
    - xfer += iprot->readListBegin(_etype933, _size930);
    - (*(this->success)).resize(_size930);
    - uint32_t _i934;
    - for (_i934 = 0; _i934 < _size930; ++_i934)
    + uint32_t _size932;
    + ::apache::thrift::protocol::TType _etype935;
    + xfer += iprot->readListBegin(_etype935, _size932);
    + (*(this->success)).resize(_size932);
    + uint32_t _i936;
    + for (_i936 = 0; _i936 < _size932; ++_i936)
                  {
    - xfer += iprot->readString((*(this->success))[_i934]);
    + xfer += iprot->readString((*(this->success))[_i936]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -8889,14 +8889,14 @@ uint32_t ThriftHiveMetastore_add_partitions_args::read(::apache::thrift::protoco
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->new_parts.clear();
    - uint32_t _size935;
    - ::apache::thrift::protocol::TType _etype938;
    - xfer += iprot->readListBegin(_etype938, _size935);
    - this->new_parts.resize(_size935);
    - uint32_t _i939;
    - for (_i939 = 0; _i939 < _size935; ++_i939)
    + uint32_t _size937;
    + ::apache::thrift::protocol::TType _etype940;
    + xfer += iprot->readListBegin(_etype940, _size937);
    + this->new_parts.resize(_size937);
    + uint32_t _i941;
    + for (_i941 = 0; _i941 < _size937; ++_i941)
                  {
    - xfer += this->new_parts[_i939].read(iprot);
    + xfer += this->new_parts[_i941].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -8925,10 +8925,10 @@ uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protoc
        xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->new_parts.size()));
    - std::vector<Partition> ::const_iterator _iter940;
    - for (_iter940 = this->new_parts.begin(); _iter940 != this->new_parts.end(); ++_iter940)
    + std::vector<Partition> ::const_iterator _iter942;
    + for (_iter942 = this->new_parts.begin(); _iter942 != this->new_parts.end(); ++_iter942)
          {
    - xfer += (*_iter940).write(oprot);
    + xfer += (*_iter942).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -8952,10 +8952,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::proto
        xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->new_parts)).size()));
    - std::vector<Partition> ::const_iterator _iter941;
    - for (_iter941 = (*(this->new_parts)).begin(); _iter941 != (*(this->new_parts)).end(); ++_iter941)
    + std::vector<Partition> ::const_iterator _iter943;
    + for (_iter943 = (*(this->new_parts)).begin(); _iter943 != (*(this->new_parts)).end(); ++_iter943)
          {
    - xfer += (*_iter941).write(oprot);
    + xfer += (*_iter943).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -9164,14 +9164,14 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_args::read(::apache::thrift::p
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->new_parts.clear();
    - uint32_t _size942;
    - ::apache::thrift::protocol::TType _etype945;
    - xfer += iprot->readListBegin(_etype945, _size942);
    - this->new_parts.resize(_size942);
    - uint32_t _i946;
    - for (_i946 = 0; _i946 < _size942; ++_i946)
    + uint32_t _size944;
    + ::apache::thrift::protocol::TType _etype947;
    + xfer += iprot->readListBegin(_etype947, _size944);
    + this->new_parts.resize(_size944);
    + uint32_t _i948;
    + for (_i948 = 0; _i948 < _size944; ++_i948)
                  {
    - xfer += this->new_parts[_i946].read(iprot);
    + xfer += this->new_parts[_i948].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -9200,10 +9200,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_args::write(::apache::thrift::
        xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->new_parts.size()));
    - std::vector<PartitionSpec> ::const_iterator _iter947;
    - for (_iter947 = this->new_parts.begin(); _iter947 != this->new_parts.end(); ++_iter947)
    + std::vector<PartitionSpec> ::const_iterator _iter949;
    + for (_iter949 = this->new_parts.begin(); _iter949 != this->new_parts.end(); ++_iter949)
          {
    - xfer += (*_iter947).write(oprot);
    + xfer += (*_iter949).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -9227,10 +9227,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_pargs::write(::apache::thrift:
        xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->new_parts)).size()));
    - std::vector<PartitionSpec> ::const_iterator _iter948;
    - for (_iter948 = (*(this->new_parts)).begin(); _iter948 != (*(this->new_parts)).end(); ++_iter948)
    + std::vector<PartitionSpec> ::const_iterator _iter950;
    + for (_iter950 = (*(this->new_parts)).begin(); _iter950 != (*(this->new_parts)).end(); ++_iter950)
          {
    - xfer += (*_iter948).write(oprot);
    + xfer += (*_iter950).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -9455,14 +9455,14 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size949;
    - ::apache::thrift::protocol::TType _etype952;
    - xfer += iprot->readListBegin(_etype952, _size949);
    - this->part_vals.resize(_size949);
    - uint32_t _i953;
    - for (_i953 = 0; _i953 < _size949; ++_i953)
    + uint32_t _size951;
    + ::apache::thrift::protocol::TType _etype954;
    + xfer += iprot->readListBegin(_etype954, _size951);
    + this->part_vals.resize(_size951);
    + uint32_t _i955;
    + for (_i955 = 0; _i955 < _size951; ++_i955)
                  {
    - xfer += iprot->readString(this->part_vals[_i953]);
    + xfer += iprot->readString(this->part_vals[_i955]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -9499,10 +9499,10 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::prot
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter954;
    - for (_iter954 = this->part_vals.begin(); _iter954 != this->part_vals.end(); ++_iter954)
    + std::vector<std::string> ::const_iterator _iter956;
    + for (_iter956 = this->part_vals.begin(); _iter956 != this->part_vals.end(); ++_iter956)
          {
    - xfer += oprot->writeString((*_iter954));
    + xfer += oprot->writeString((*_iter956));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -9534,10 +9534,10 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::pro
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter955;
    - for (_iter955 = (*(this->part_vals)).begin(); _iter955 != (*(this->part_vals)).end(); ++_iter955)
    + std::vector<std::string> ::const_iterator _iter957;
    + for (_iter957 = (*(this->part_vals)).begin(); _iter957 != (*(this->part_vals)).end(); ++_iter957)
          {
    - xfer += oprot->writeString((*_iter955));
    + xfer += oprot->writeString((*_iter957));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -10009,14 +10009,14 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::rea
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size956;
    - ::apache::thrift::protocol::TType _etype959;
    - xfer += iprot->readListBegin(_etype959, _size956);
    - this->part_vals.resize(_size956);
    - uint32_t _i960;
    - for (_i960 = 0; _i960 < _size956; ++_i960)
    + uint32_t _size958;
    + ::apache::thrift::protocol::TType _etype961;
    + xfer += iprot->readListBegin(_etype961, _size958);
    + this->part_vals.resize(_size958);
    + uint32_t _i962;
    + for (_i962 = 0; _i962 < _size958; ++_i962)
                  {
    - xfer += iprot->readString(this->part_vals[_i960]);
    + xfer += iprot->readString(this->part_vals[_i962]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -10061,10 +10061,10 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::wri
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter961;
    - for (_iter961 = this->part_vals.begin(); _iter961 != this->part_vals.end(); ++_iter961)
    + std::vector<std::string> ::const_iterator _iter963;
    + for (_iter963 = this->part_vals.begin(); _iter963 != this->part_vals.end(); ++_iter963)
          {
    - xfer += oprot->writeString((*_iter961));
    + xfer += oprot->writeString((*_iter963));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -10100,10 +10100,10 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_pargs::wr
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter962;
    - for (_iter962 = (*(this->part_vals)).begin(); _iter962 != (*(this->part_vals)).end(); ++_iter962)
    + std::vector<std::string> ::const_iterator _iter964;
    + for (_iter964 = (*(this->part_vals)).begin(); _iter964 != (*(this->part_vals)).end(); ++_iter964)
          {
    - xfer += oprot->writeString((*_iter962));
    + xfer += oprot->writeString((*_iter964));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -10906,14 +10906,14 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(::apache::thrift::protoco
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size963;
    - ::apache::thrift::protocol::TType _etype966;
    - xfer += iprot->readListBegin(_etype966, _size963);
    - this->part_vals.resize(_size963);
    - uint32_t _i967;
    - for (_i967 = 0; _i967 < _size963; ++_i967)
    + uint32_t _size965;
    + ::apache::thrift::protocol::TType _etype968;
    + xfer += iprot->readListBegin(_etype968, _size965);
    + this->part_vals.resize(_size965);
    + uint32_t _i969;
    + for (_i969 = 0; _i969 < _size965; ++_i969)
                  {
    - xfer += iprot->readString(this->part_vals[_i967]);
    + xfer += iprot->readString(this->part_vals[_i969]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -10958,10 +10958,10 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protoc
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter968;
    - for (_iter968 = this->part_vals.begin(); _iter968 != this->part_vals.end(); ++_iter968)
    + std::vector<std::string> ::const_iterator _iter970;
    + for (_iter970 = this->part_vals.begin(); _iter970 != this->part_vals.end(); ++_iter970)
          {
    - xfer += oprot->writeString((*_iter968));
    + xfer += oprot->writeString((*_iter970));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -10997,10 +10997,10 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::proto
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter969;
    - for (_iter969 = (*(this->part_vals)).begin(); _iter969 != (*(this->part_vals)).end(); ++_iter969)
    + std::vector<std::string> ::const_iterator _iter971;
    + for (_iter971 = (*(this->part_vals)).begin(); _iter971 != (*(this->part_vals)).end(); ++_iter971)
          {
    - xfer += oprot->writeString((*_iter969));
    + xfer += oprot->writeString((*_iter971));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -11209,14 +11209,14 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::read(
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size970;
    - ::apache::thrift::protocol::TType _etype973;
    - xfer += iprot->readListBegin(_etype973, _size970);
    - this->part_vals.resize(_size970);
    - uint32_t _i974;
    - for (_i974 = 0; _i974 < _size970; ++_i974)
    + uint32_t _size972;
    + ::apache::thrift::protocol::TType _etype975;
    + xfer += iprot->readListBegin(_etype975, _size972);
    + this->part_vals.resize(_size972);
    + uint32_t _i976;
    + for (_i976 = 0; _i976 < _size972; ++_i976)
                  {
    - xfer += iprot->readString(this->part_vals[_i974]);
    + xfer += iprot->readString(this->part_vals[_i976]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -11269,10 +11269,10 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::write
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter975;
    - for (_iter975 = this->part_vals.begin(); _iter975 != this->part_vals.end(); ++_iter975)
    + std::vector<std::string> ::const_iterator _iter977;
    + for (_iter977 = this->part_vals.begin(); _iter977 != this->part_vals.end(); ++_iter977)
          {
    - xfer += oprot->writeString((*_iter975));
    + xfer += oprot->writeString((*_iter977));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -11312,10 +11312,10 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_pargs::writ
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter976;
    - for (_iter976 = (*(this->part_vals)).begin(); _iter976 != (*(this->part_vals)).end(); ++_iter976)
    + std::vector<std::string> ::const_iterator _iter978;
    + for (_iter978 = (*(this->part_vals)).begin(); _iter978 != (*(this->part_vals)).end(); ++_iter978)
          {
    - xfer += oprot->writeString((*_iter976));
    + xfer += oprot->writeString((*_iter978));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12321,14 +12321,14 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(::apache::thrift::protocol
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size977;
    - ::apache::thrift::protocol::TType _etype980;
    - xfer += iprot->readListBegin(_etype980, _size977);
    - this->part_vals.resize(_size977);
    - uint32_t _i981;
    - for (_i981 = 0; _i981 < _size977; ++_i981)
    + uint32_t _size979;
    + ::apache::thrift::protocol::TType _etype982;
    + xfer += iprot->readListBegin(_etype982, _size979);
    + this->part_vals.resize(_size979);
    + uint32_t _i983;
    + for (_i983 = 0; _i983 < _size979; ++_i983)
                  {
    - xfer += iprot->readString(this->part_vals[_i981]);
    + xfer += iprot->readString(this->part_vals[_i983]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -12365,10 +12365,10 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protoco
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter982;
    - for (_iter982 = this->part_vals.begin(); _iter982 != this->part_vals.end(); ++_iter982)
    + std::vector<std::string> ::const_iterator _iter984;
    + for (_iter984 = this->part_vals.begin(); _iter984 != this->part_vals.end(); ++_iter984)
          {
    - xfer += oprot->writeString((*_iter982));
    + xfer += oprot->writeString((*_iter984));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12400,10 +12400,10 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protoc
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter983;
    - for (_iter983 = (*(this->part_vals)).begin(); _iter983 != (*(this->part_vals)).end(); ++_iter983)
    + std::vector<std::string> ::const_iterator _iter985;
    + for (_iter985 = (*(this->part_vals)).begin(); _iter985 != (*(this->part_vals)).end(); ++_iter985)
          {
    - xfer += oprot->writeString((*_iter983));
    + xfer += oprot->writeString((*_iter985));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12592,17 +12592,17 @@ uint32_t ThriftHiveMetastore_exchange_partition_args::read(::apache::thrift::pro
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  this->partitionSpecs.clear();
    - uint32_t _size984;
    - ::apache::thrift::protocol::TType _ktype985;
    - ::apache::thrift::protocol::TType _vtype986;
    - xfer += iprot->readMapBegin(_ktype985, _vtype986, _size984);
    - uint32_t _i988;
    - for (_i988 = 0; _i988 < _size984; ++_i988)
    + uint32_t _size986;
    + ::apache::thrift::protocol::TType _ktype987;
    + ::apache::thrift::protocol::TType _vtype988;
    + xfer += iprot->readMapBegin(_ktype987, _vtype988, _size986);
    + uint32_t _i990;
    + for (_i990 = 0; _i990 < _size986; ++_i990)
                  {
    - std::string _key989;
    - xfer += iprot->readString(_key989);
    - std::string& _val990 = this->partitionSpecs[_key989];
    - xfer += iprot->readString(_val990);
    + std::string _key991;
    + xfer += iprot->readString(_key991);
    + std::string& _val992 = this->partitionSpecs[_key991];
    + xfer += iprot->readString(_val992);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -12663,11 +12663,11 @@ uint32_t ThriftHiveMetastore_exchange_partition_args::write(::apache::thrift::pr
        xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionSpecs.size()));
    - std::map<std::string, std::string> ::const_iterator _iter991;
    - for (_iter991 = this->partitionSpecs.begin(); _iter991 != this->partitionSpecs.end(); ++_iter991)
    + std::map<std::string, std::string> ::const_iterator _iter993;
    + for (_iter993 = this->partitionSpecs.begin(); _iter993 != this->partitionSpecs.end(); ++_iter993)
          {
    - xfer += oprot->writeString(_iter991->first);
    - xfer += oprot->writeString(_iter991->second);
    + xfer += oprot->writeString(_iter993->first);
    + xfer += oprot->writeString(_iter993->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -12707,11 +12707,11 @@ uint32_t ThriftHiveMetastore_exchange_partition_pargs::write(::apache::thrift::p
        xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->partitionSpecs)).size()));
    - std::map<std::string, std::string> ::const_iterator _iter992;
    - for (_iter992 = (*(this->partitionSpecs)).begin(); _iter992 != (*(this->partitionSpecs)).end(); ++_iter992)
    + std::map<std::string, std::string> ::const_iterator _iter994;
    + for (_iter994 = (*(this->partitionSpecs)).begin(); _iter994 != (*(this->partitionSpecs)).end(); ++_iter994)
          {
    - xfer += oprot->writeString(_iter992->first);
    - xfer += oprot->writeString(_iter992->second);
    + xfer += oprot->writeString(_iter994->first);
    + xfer += oprot->writeString(_iter994->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -12956,17 +12956,17 @@ uint32_t ThriftHiveMetastore_exchange_partitions_args::read(::apache::thrift::pr
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  this->partitionSpecs.clear();
    - uint32_t _size993;
    - ::apache::thrift::protocol::TType _ktype994;
    - ::apache::thrift::protocol::TType _vtype995;
    - xfer += iprot->readMapBegin(_ktype994, _vtype995, _size993);
    - uint32_t _i997;
    - for (_i997 = 0; _i997 < _size993; ++_i997)
    + uint32_t _size995;
    + ::apache::thrift::protocol::TType _ktype996;
    + ::apache::thrift::protocol::TType _vtype997;
    + xfer += iprot->readMapBegin(_ktype996, _vtype997, _size995);
    + uint32_t _i999;
    + for (_i999 = 0; _i999 < _size995; ++_i999)
                  {
    - std::string _key998;
    - xfer += iprot->readString(_key998);
    - std::string& _val999 = this->partitionSpecs[_key998];
    - xfer += iprot->readString(_val999);
    + std::string _key1000;
    + xfer += iprot->readString(_key1000);
    + std::string& _val1001 = this->partitionSpecs[_key1000];
    + xfer += iprot->readString(_val1001);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -13027,11 +13027,11 @@ uint32_t ThriftHiveMetastore_exchange_partitions_args::write(::apache::thrift::p
        xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionSpecs.size()));
    - std::map<std::string, std::string> ::const_iterator _iter1000;
    - for (_iter1000 = this->partitionSpecs.begin(); _iter1000 != this->partitionSpecs.end(); ++_iter1000)
    + std::map<std::string, std::string> ::const_iterator _iter1002;
    + for (_iter1002 = this->partitionSpecs.begin(); _iter1002 != this->partitionSpecs.end(); ++_iter1002)
          {
    - xfer += oprot->writeString(_iter1000->first);
    - xfer += oprot->writeString(_iter1000->second);
    + xfer += oprot->writeString(_iter1002->first);
    + xfer += oprot->writeString(_iter1002->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -13071,11 +13071,11 @@ uint32_t ThriftHiveMetastore_exchange_partitions_pargs::write(::apache::thrift::
        xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->partitionSpecs)).size()));
    - std::map<std::string, std::string> ::const_iterator _iter1001;
    - for (_iter1001 = (*(this->partitionSpecs)).begin(); _iter1001 != (*(this->partitionSpecs)).end(); ++_iter1001)
    + std::map<std::string, std::string> ::const_iterator _iter1003;
    + for (_iter1003 = (*(this->partitionSpecs)).begin(); _iter1003 != (*(this->partitionSpecs)).end(); ++_iter1003)
          {
    - xfer += oprot->writeString(_iter1001->first);
    - xfer += oprot->writeString(_iter1001->second);
    + xfer += oprot->writeString(_iter1003->first);
    + xfer += oprot->writeString(_iter1003->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -13132,14 +13132,14 @@ uint32_t ThriftHiveMetastore_exchange_partitions_result::read(::apache::thrift::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size1002;
    - ::apache::thrift::protocol::TType _etype1005;
    - xfer += iprot->readListBegin(_etype1005, _size1002);
    - this->success.resize(_size1002);
    - uint32_t _i1006;
    - for (_i1006 = 0; _i1006 < _size1002; ++_i1006)
    + uint32_t _size1004;
    + ::apache::thrift::protocol::TType _etype1007;
    + xfer += iprot->readListBegin(_etype1007, _size1004);
    + this->success.resize(_size1004);
    + uint32_t _i1008;
    + for (_i1008 = 0; _i1008 < _size1004; ++_i1008)
                  {
    - xfer += this->success[_i1006].read(iprot);
    + xfer += this->success[_i1008].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13202,10 +13202,10 @@ uint32_t ThriftHiveMetastore_exchange_partitions_result::write(::apache::thrift:
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Partition> ::const_iterator _iter1007;
    - for (_iter1007 = this->success.begin(); _iter1007 != this->success.end(); ++_iter1007)
    + std::vector<Partition> ::const_iterator _iter1009;
    + for (_iter1009 = this->success.begin(); _iter1009 != this->success.end(); ++_iter1009)
            {
    - xfer += (*_iter1007).write(oprot);
    + xfer += (*_iter1009).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -13262,14 +13262,14 @@ uint32_t ThriftHiveMetastore_exchange_partitions_presult::read(::apache::thrift:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size1008;
    - ::apache::thrift::protocol::TType _etype1011;
    - xfer += iprot->readListBegin(_etype1011, _size1008);
    - (*(this->success)).resize(_size1008);
    - uint32_t _i1012;
    - for (_i1012 = 0; _i1012 < _size1008; ++_i1012)
    + uint32_t _size1010;
    + ::apache::thrift::protocol::TType _etype1013;
    + xfer += iprot->readListBegin(_etype1013, _size1010);
    + (*(this->success)).resize(_size1010);
    + uint32_t _i1014;
    + for (_i1014 = 0; _i1014 < _size1010; ++_i1014)
                  {
    - xfer += (*(this->success))[_i1012].read(iprot);
    + xfer += (*(this->success))[_i1014].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13368,14 +13368,14 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size1013;
    - ::apache::thrift::protocol::TType _etype1016;
    - xfer += iprot->readListBegin(_etype1016, _size1013);
    - this->part_vals.resize(_size1013);
    - uint32_t _i1017;
    - for (_i1017 = 0; _i1017 < _size1013; ++_i1017)
    + uint32_t _size1015;
    + ::apache::thrift::protocol::TType _etype1018;
    + xfer += iprot->readListBegin(_etype1018, _size1015);
    + this->part_vals.resize(_size1015);
    + uint32_t _i1019;
    + for (_i1019 = 0; _i1019 < _size1015; ++_i1019)
                  {
    - xfer += iprot->readString(this->part_vals[_i1017]);
    + xfer += iprot->readString(this->part_vals[_i1019]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13396,14 +13396,14 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->group_names.clear();
    - uint32_t _size1018;
    - ::apache::thrift::protocol::TType _etype1021;
    - xfer += iprot->readListBegin(_etype1021, _size1018);
    - this->group_names.resize(_size1018);
    - uint32_t _i1022;
    - for (_i1022 = 0; _i1022 < _size1018; ++_i1022)
    + uint32_t _size1020;
    + ::apache::thrift::protocol::TType _etype1023;
    + xfer += iprot->readListBegin(_etype1023, _size1020);
    + this->group_names.resize(_size1020);
    + uint32_t _i1024;
    + for (_i1024 = 0; _i1024 < _size1020; ++_i1024)
                  {
    - xfer += iprot->readString(this->group_names[_i1022]);
    + xfer += iprot->readString(this->group_names[_i1024]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13440,10 +13440,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrif
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter1023;
    - for (_iter1023 = this->part_vals.begin(); _iter1023 != this->part_vals.end(); ++_iter1023)
    + std::vector<std::string> ::const_iterator _iter1025;
    + for (_iter1025 = this->part_vals.begin(); _iter1025 != this->part_vals.end(); ++_iter1025)
          {
    - xfer += oprot->writeString((*_iter1023));
    + xfer += oprot->writeString((*_iter1025));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -13456,10 +13456,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrif
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->group_names.size()));
    - std::vector<std::string> ::const_iterator _iter1024;
    - for (_iter1024 = this->group_names.begin(); _iter1024 != this->group_names.end(); ++_iter1024)
    + std::vector<std::string> ::const_iterator _iter1026;
    + for (_iter1026 = this->group_names.begin(); _iter1026 != this->group_names.end(); ++_iter1026)
          {
    - xfer += oprot->writeString((*_iter1024));
    + xfer += oprot->writeString((*_iter1026));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -13491,10 +13491,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thri
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter1025;
    - for (_iter1025 = (*(this->part_vals)).begin(); _iter1025 != (*(this->part_vals)).end(); ++_iter1025)
    + std::vector<std::string> ::const_iterator _iter1027;
    + for (_iter1027 = (*(this->part_vals)).begin(); _iter1027 != (*(this->part_vals)).end(); ++_iter1027)
          {
    - xfer += oprot->writeString((*_iter1025));
    + xfer += oprot->writeString((*_iter1027));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -13507,10 +13507,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thri
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->group_names)).size()));
    - std::vector<std::string> ::const_iterator _iter1026;
    - for (_iter1026 = (*(this->group_names)).begin(); _iter1026 != (*(this->group_names)).end(); ++_iter1026)
    + std::vector<std::string> ::const_iterator _iter1028;
    + for (_iter1028 = (*(this->group_names)).begin(); _iter1028 != (*(this->group_names)).end(); ++_iter1028)
          {
    - xfer += oprot->writeString((*_iter1026));
    + xfer += oprot->writeString((*_iter1028));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14069,14 +14069,14 @@ uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size1027;
    - ::apache::thrift::protocol::TType _etype1030;
    - xfer += iprot->readListBegin(_etype1030, _size1027);
    - this->success.resize(_size1027);
    - uint32_t _i1031;
    - for (_i1031 = 0; _i1031 < _size1027; ++_i1031)
    + uint32_t _size1029;
    + ::apache::thrift::protocol::TType _etype1032;
    + xfer += iprot->readListBegin(_etype1032, _size1029);
    + this->success.resize(_size1029);
    + uint32_t _i1033;
    + for (_i1033 = 0; _i1033 < _size1029; ++_i1033)
                  {
    - xfer += this->success[_i1031].read(iprot);
    + xfer += this->success[_i1033].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14123,10 +14123,10 @@ uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::prot
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Partition> ::const_iterator _iter1032;
    - for (_iter1032 = this->success.begin(); _iter1032 != this->success.end(); ++_iter1032)
    + std::vector<Partition> ::const_iterator _iter1034;
    + for (_iter1034 = this->success.begin(); _iter1034 != this->success.end(); ++_iter1034)
            {
    - xfer += (*_iter1032).write(oprot);
    + xfer += (*_iter1034).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -14175,14 +14175,14 @@ uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::prot
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size1033;
    - ::apache::thrift::protocol::TType _etype1036;
    - xfer += iprot->readListBegin(_etype1036, _size1033);
    - (*(this->success)).resize(_size1033);
    - uint32_t _i1037;
    - for (_i1037 = 0; _i1037 < _size1033; ++_i1037)
    + uint32_t _size1035;
    + ::apache::thrift::protocol::TType _etype1038;
    + xfer += iprot->readListBegin(_etype1038, _size1035);
    + (*(this->success)).resize(_size1035);
    + uint32_t _i1039;
    + for (_i1039 = 0; _i1039 < _size1035; ++_i1039)
                  {
    - xfer += (*(this->success))[_i1037].read(iprot);
    + xfer += (*(this->success))[_i1039].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14281,14 +14281,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::read(::apache::thrif
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->group_names.clear();
    - uint32_t _size1038;
    - ::apache::thrift::protocol::TType _etype1041;
    - xfer += iprot->readListBegin(_etype1041, _size1038);
    - this->group_names.resize(_size1038);
    - uint32_t _i1042;
    - for (_i1042 = 0; _i1042 < _size1038; ++_i1042)
    + uint32_t _size1040;
    + ::apache::thrift::protocol::TType _etype1043;
    + xfer += iprot->readListBegin(_etype1043, _size1040);
    + this->group_names.resize(_size1040);
    + uint32_t _i1044;
    + for (_i1044 = 0; _i1044 < _size1040; ++_i1044)
                  {
    - xfer += iprot->readString(this->group_names[_i1042]);
    + xfer += iprot->readString(this->group_names[_i1044]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14333,10 +14333,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thri
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->group_names.size()));
    - std::vector<std::string> ::const_iterator _iter1043;
    - for (_iter1043 = this->group_names.begin(); _iter1043 != this->group_names.end(); ++_iter1043)
    + std::vector<std::string> ::const_iterator _iter1045;
    + for (_iter1045 = this->group_names.begin(); _iter1045 != this->group_names.end(); ++_iter1045)
          {
    - xfer += oprot->writeString((*_iter1043));
    + xfer += oprot->writeString((*_iter1045));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14376,10 +14376,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thr
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->group_names)).size()));
    - std::vector<std::string> ::const_iterator _iter1044;
    - for (_iter1044 = (*(this->group_names)).begin(); _iter1044 != (*(this->group_names)).end(); ++_iter1044)
    + std::vector<std::string> ::const_iterator _iter1046;
    + for (_iter1046 = (*(this->group_names)).begin(); _iter1046 != (*(this->group_names)).end(); ++_iter1046)
          {
    - xfer += oprot->writeString((*_iter1044));
    + xfer += oprot->writeString((*_iter1046));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14420,14 +14420,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::read(::apache::thr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size1045;
    - ::apache::thrift::protocol::TType _etype1048;
    - xfer += iprot->readListBegin(_etype1048, _size1045);
    - this->success.resize(_size1045);
    - uint32_t _i1049;
    - for (_i1049 = 0; _i1049 < _size1045; ++_i1049)
    + uint32_t _size1047;
    + ::apache::thrift::protocol::TType _etype1050;
    + xfer += iprot->readListBegin(_etype1050, _size1047);
    + this->success.resize(_size1047);
    + uint32_t _i1051;
    + for (_i1051 = 0; _i1051 < _size1047; ++_i1051)
                  {
    - xfer += this->success[_i1049].read(iprot);
    + xfer += this->success[_i1051].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14474,10 +14474,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::write(::apache::th
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Partition> ::const_iterator _iter1050;
    - for (_iter1050 = this->success.begin(); _iter1050 != this->success.end(); ++_iter1050)
    + std::vector<Partition> ::const_iterator _iter1052;
    + for (_iter1052 = this->success.begin(); _iter1052 != this->success.end(); ++_iter1052)
            {
    - xfer += (*_iter1050).write(oprot);
    + xfer += (*_iter1052).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -14526,14 +14526,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_presult::read(::apache::th
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size1051;
    - ::apache::thrift::protocol::TType _etype1054;
    - xfer += iprot->readListBegin(_etype1054, _size1051);
    - (*(this->success)).resize(_size1051);
    - uint32_t _i1055;
    - for (_i1055 = 0; _i1055 < _size1051; ++_i1055)
    + uint32_t _size1053;
    + ::apache::thrift::protocol::TType _etype1056;
    + xfer += iprot->readListBegin(_etype1056, _size1053);
    + (*(this->success)).resize(_size1053);
    + uint32_t _i1057;
    + for (_i1057 = 0; _i1057 < _size1053; ++_i1057)
                  {
    - xfer += (*(this->success))[_i1055].read(iprot);
    + xfer += (*(this->success))[_i1057].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14711,14 +14711,14 @@ uint32_t ThriftHiveMetastore_get_partitions_pspec_result::read(::apache::thrift:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size1056;
    - ::apache::thrift::protocol::TType _etype1059;
    - xfer += iprot->readListBegin(_etype1059, _size1056);
    - this->success.resize(_size1056);
    - uint32_t _i1060;
    - for (_i1060 = 0; _i1060 < _size1056; ++_i1060)
    + uint32_t _size1058;
    + ::apache::thrift::protocol::TType _etype1061;
    + xfer += iprot->readListBegin(_etype1061, _size1058);
    + this->success.resize(_size1058);
    + uint32_t _i1062;
    + for (_i1062 = 0; _i1062 < _size1058; ++_i1062)
                  {
    - xfer += this->success[_i1060].read(iprot);
    + xfer += this->success[_i1062].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14765,10 +14765,10 @@ uint32_t ThriftHiveMetastore_get_partitions_pspec_result::write(::apache::thrift
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<PartitionSpec> ::const_iterator _iter1061;
    - for (_iter1061 = this->success.begin(); _iter1061 != this->success.end(); ++_iter1061)
    + std::vector<PartitionSpec> ::const_iterator _iter1063;
    + for (_iter1063 = this->success.begin(); _iter1063 != this->success.end(); ++_iter1063)
            {
    - xfer += (*_iter1061).write(oprot);
    + xfer += (*_iter1063).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -14817,14 +14817,14 @@ uint32_t ThriftHiveMetastore_get_partitions_pspec_presult::read(::apache::thrift
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size1062;
    - ::apache::thrift::protocol::TType _etype1065;
    - xfer += iprot->readListBegin(_etype1065, _size1062);
    - (*(this->success)).resize(_size1062);
    - uint32_t _i1066;
    - for (_i1066 = 0; _i1066 < _size1062; ++_i1066)
    + uint32_t _size1064;
    + ::apache::thrift::protocol::TType _etype1067;
    + xfer += iprot->readListBegin(_etype1067, _size1064);
    + (*(this->success)).resize(_size1064);
    + uint32_t _i1068;
    + for (_i1068 = 0; _i1068 < _size1064; ++_i1068)
                  {
    - xfer += (*(this->success))[_i1066].read(iprot);
    + xfer += (*(this->success))[_i1068].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -15002,14 +15002,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size1067;
    - ::apache::thrift::protocol::TType _etype1070;
    - xfer += iprot->readListBegin(_etype1070, _size1067);
    - this->success.resize(_size1067);
    - uint32_t _i1071;
    - for (_i1071 = 0; _i1071 < _size1067; ++_i1071)
    + uint32_t _size1069;
    + ::apache::thrift::protocol::TType _etype1072;
    + xfer += iprot->readListBegin(_etype1072, _size1069);
    + this->success.resize(_size1069);
    + uint32_t _i1073;
    + for (_i1073 = 0; _i1073 < _size1069; ++_i1073)
                  {
    - xfer += iprot->readString(this->success[_i1071]);
    + xfer += iprot->readString(this->success[_i1073]);
                  }

    <TRUNCATED>
  • Ekoifman at May 19, 2016 at 7:29 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
    index cd8c552..f8ca7cd 100644
    --- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
    +++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
    @@ -119,6 +119,24 @@ const char* _kGrantRevokeTypeNames[] = {
      };
      const std::map<int, const char*> _GrantRevokeType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kGrantRevokeTypeValues, _kGrantRevokeTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

    +int _kDataOperationTypeValues[] = {
    + DataOperationType::SELECT,
    + DataOperationType::INSERT,
    + DataOperationType::UPDATE,
    + DataOperationType::DELETE,
    + DataOperationType::UNSET,
    + DataOperationType::NO_TXN
    +};
    +const char* _kDataOperationTypeNames[] = {
    + "SELECT",
    + "INSERT",
    + "UPDATE",
    + "DELETE",
    + "UNSET",
    + "NO_TXN"
    +};
    +const std::map<int, const char*> _DataOperationType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kDataOperationTypeValues, _kDataOperationTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
    +
      int _kEventRequestTypeValues[] = {
        EventRequestType::INSERT,
        EventRequestType::UPDATE,
    @@ -12578,6 +12596,16 @@ void LockComponent::__set_partitionname(const std::string& val) {
      __isset.partitionname = true;
      }

    +void LockComponent::__set_operationType(const DataOperationType::type val) {
    + this->operationType = val;
    +__isset.operationType = true;
    +}
    +
    +void LockComponent::__set_isAcid(const bool val) {
    + this->isAcid = val;
    +__isset.isAcid = true;
    +}
    +
      uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
    @@ -12646,6 +12674,24 @@ uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {
                xfer += iprot->skip(ftype);
              }
              break;
    + case 6:
    + if (ftype == ::apache::thrift::protocol::T_I32) {
    + int32_t ecast550;
    + xfer += iprot->readI32(ecast550);
    + this->operationType = (DataOperationType::type)ecast550;
    + this->__isset.operationType = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + case 7:
    + if (ftype == ::apache::thrift::protocol::T_BOOL) {
    + xfer += iprot->readBool(this->isAcid);
    + this->__isset.isAcid = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
            default:
              xfer += iprot->skip(ftype);
              break;
    @@ -12691,6 +12737,16 @@ uint32_t LockComponent::write(::apache::thrift::protocol::TProtocol* oprot) cons
          xfer += oprot->writeString(this->partitionname);
          xfer += oprot->writeFieldEnd();
        }
    + if (this->__isset.operationType) {
    + xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 6);
    + xfer += oprot->writeI32((int32_t)this->operationType);
    + xfer += oprot->writeFieldEnd();
    + }
    + if (this->__isset.isAcid) {
    + xfer += oprot->writeFieldBegin("isAcid", ::apache::thrift::protocol::T_BOOL, 7);
    + xfer += oprot->writeBool(this->isAcid);
    + xfer += oprot->writeFieldEnd();
    + }
        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
        return xfer;
    @@ -12703,24 +12759,30 @@ void swap(LockComponent &a, LockComponent &b) {
        swap(a.dbname, b.dbname);
        swap(a.tablename, b.tablename);
        swap(a.partitionname, b.partitionname);
    + swap(a.operationType, b.operationType);
    + swap(a.isAcid, b.isAcid);
        swap(a.__isset, b.__isset);
      }

    -LockComponent::LockComponent(const LockComponent& other550) {
    - type = other550.type;
    - level = other550.level;
    - dbname = other550.dbname;
    - tablename = other550.tablename;
    - partitionname = other550.partitionname;
    - __isset = other550.__isset;
    -}
    -LockComponent& LockComponent::operator=(const LockComponent& other551) {
    +LockComponent::LockComponent(const LockComponent& other551) {
        type = other551.type;
        level = other551.level;
        dbname = other551.dbname;
        tablename = other551.tablename;
        partitionname = other551.partitionname;
    + operationType = other551.operationType;
    + isAcid = other551.isAcid;
        __isset = other551.__isset;
    +}
    +LockComponent& LockComponent::operator=(const LockComponent& other552) {
    + type = other552.type;
    + level = other552.level;
    + dbname = other552.dbname;
    + tablename = other552.tablename;
    + partitionname = other552.partitionname;
    + operationType = other552.operationType;
    + isAcid = other552.isAcid;
    + __isset = other552.__isset;
        return *this;
      }
      void LockComponent::printTo(std::ostream& out) const {
    @@ -12731,6 +12793,8 @@ void LockComponent::printTo(std::ostream& out) const {
        out << ", " << "dbname=" << to_string(dbname);
        out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "<null>"));
        out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "<null>"));
    + out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "<null>"));
    + out << ", " << "isAcid="; (__isset.isAcid ? (out << to_string(isAcid)) : (out << "<null>"));
        out << ")";
      }

    @@ -12789,14 +12853,14 @@ uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->component.clear();
    - uint32_t _size552;
    - ::apache::thrift::protocol::TType _etype555;
    - xfer += iprot->readListBegin(_etype555, _size552);
    - this->component.resize(_size552);
    - uint32_t _i556;
    - for (_i556 = 0; _i556 < _size552; ++_i556)
    + uint32_t _size553;
    + ::apache::thrift::protocol::TType _etype556;
    + xfer += iprot->readListBegin(_etype556, _size553);
    + this->component.resize(_size553);
    + uint32_t _i557;
    + for (_i557 = 0; _i557 < _size553; ++_i557)
                  {
    - xfer += this->component[_i556].read(iprot);
    + xfer += this->component[_i557].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -12863,10 +12927,10 @@ uint32_t LockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const
        xfer += oprot->writeFieldBegin("component", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->component.size()));
    - std::vector<LockComponent> ::const_iterator _iter557;
    - for (_iter557 = this->component.begin(); _iter557 != this->component.end(); ++_iter557)
    + std::vector<LockComponent> ::const_iterator _iter558;
    + for (_iter558 = this->component.begin(); _iter558 != this->component.end(); ++_iter558)
          {
    - xfer += (*_iter557).write(oprot);
    + xfer += (*_iter558).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12905,21 +12969,21 @@ void swap(LockRequest &a, LockRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -LockRequest::LockRequest(const LockRequest& other558) {
    - component = other558.component;
    - txnid = other558.txnid;
    - user = other558.user;
    - hostname = other558.hostname;
    - agentInfo = other558.agentInfo;
    - __isset = other558.__isset;
    -}
    -LockRequest& LockRequest::operator=(const LockRequest& other559) {
    +LockRequest::LockRequest(const LockRequest& other559) {
        component = other559.component;
        txnid = other559.txnid;
        user = other559.user;
        hostname = other559.hostname;
        agentInfo = other559.agentInfo;
        __isset = other559.__isset;
    +}
    +LockRequest& LockRequest::operator=(const LockRequest& other560) {
    + component = other560.component;
    + txnid = other560.txnid;
    + user = other560.user;
    + hostname = other560.hostname;
    + agentInfo = other560.agentInfo;
    + __isset = other560.__isset;
        return *this;
      }
      void LockRequest::printTo(std::ostream& out) const {
    @@ -12979,9 +13043,9 @@ uint32_t LockResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
              break;
            case 2:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast560;
    - xfer += iprot->readI32(ecast560);
    - this->state = (LockState::type)ecast560;
    + int32_t ecast561;
    + xfer += iprot->readI32(ecast561);
    + this->state = (LockState::type)ecast561;
                isset_state = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -13027,13 +13091,13 @@ void swap(LockResponse &a, LockResponse &b) {
        swap(a.state, b.state);
      }

    -LockResponse::LockResponse(const LockResponse& other561) {
    - lockid = other561.lockid;
    - state = other561.state;
    -}
    -LockResponse& LockResponse::operator=(const LockResponse& other562) {
    +LockResponse::LockResponse(const LockResponse& other562) {
        lockid = other562.lockid;
        state = other562.state;
    +}
    +LockResponse& LockResponse::operator=(const LockResponse& other563) {
    + lockid = other563.lockid;
    + state = other563.state;
        return *this;
      }
      void LockResponse::printTo(std::ostream& out) const {
    @@ -13155,17 +13219,17 @@ void swap(CheckLockRequest &a, CheckLockRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -CheckLockRequest::CheckLockRequest(const CheckLockRequest& other563) {
    - lockid = other563.lockid;
    - txnid = other563.txnid;
    - elapsed_ms = other563.elapsed_ms;
    - __isset = other563.__isset;
    -}
    -CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other564) {
    +CheckLockRequest::CheckLockRequest(const CheckLockRequest& other564) {
        lockid = other564.lockid;
        txnid = other564.txnid;
        elapsed_ms = other564.elapsed_ms;
        __isset = other564.__isset;
    +}
    +CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other565) {
    + lockid = other565.lockid;
    + txnid = other565.txnid;
    + elapsed_ms = other565.elapsed_ms;
    + __isset = other565.__isset;
        return *this;
      }
      void CheckLockRequest::printTo(std::ostream& out) const {
    @@ -13249,11 +13313,11 @@ void swap(UnlockRequest &a, UnlockRequest &b) {
        swap(a.lockid, b.lockid);
      }

    -UnlockRequest::UnlockRequest(const UnlockRequest& other565) {
    - lockid = other565.lockid;
    -}
    -UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other566) {
    +UnlockRequest::UnlockRequest(const UnlockRequest& other566) {
        lockid = other566.lockid;
    +}
    +UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other567) {
    + lockid = other567.lockid;
        return *this;
      }
      void UnlockRequest::printTo(std::ostream& out) const {
    @@ -13392,19 +13456,19 @@ void swap(ShowLocksRequest &a, ShowLocksRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other567) {
    - dbname = other567.dbname;
    - tablename = other567.tablename;
    - partname = other567.partname;
    - isExtended = other567.isExtended;
    - __isset = other567.__isset;
    -}
    -ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other568) {
    +ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other568) {
        dbname = other568.dbname;
        tablename = other568.tablename;
        partname = other568.partname;
        isExtended = other568.isExtended;
        __isset = other568.__isset;
    +}
    +ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other569) {
    + dbname = other569.dbname;
    + tablename = other569.tablename;
    + partname = other569.partname;
    + isExtended = other569.isExtended;
    + __isset = other569.__isset;
        return *this;
      }
      void ShowLocksRequest::printTo(std::ostream& out) const {
    @@ -13557,9 +13621,9 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i
              break;
            case 5:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast569;
    - xfer += iprot->readI32(ecast569);
    - this->state = (LockState::type)ecast569;
    + int32_t ecast570;
    + xfer += iprot->readI32(ecast570);
    + this->state = (LockState::type)ecast570;
                isset_state = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -13567,9 +13631,9 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i
              break;
            case 6:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast570;
    - xfer += iprot->readI32(ecast570);
    - this->type = (LockType::type)ecast570;
    + int32_t ecast571;
    + xfer += iprot->readI32(ecast571);
    + this->type = (LockType::type)ecast571;
                isset_type = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -13785,26 +13849,7 @@ void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b) {
        swap(a.__isset, b.__isset);
      }

    -ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other571) {
    - lockid = other571.lockid;
    - dbname = other571.dbname;
    - tablename = other571.tablename;
    - partname = other571.partname;
    - state = other571.state;
    - type = other571.type;
    - txnid = other571.txnid;
    - lastheartbeat = other571.lastheartbeat;
    - acquiredat = other571.acquiredat;
    - user = other571.user;
    - hostname = other571.hostname;
    - heartbeatCount = other571.heartbeatCount;
    - agentInfo = other571.agentInfo;
    - blockedByExtId = other571.blockedByExtId;
    - blockedByIntId = other571.blockedByIntId;
    - lockIdInternal = other571.lockIdInternal;
    - __isset = other571.__isset;
    -}
    -ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other572) {
    +ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other572) {
        lockid = other572.lockid;
        dbname = other572.dbname;
        tablename = other572.tablename;
    @@ -13822,6 +13867,25 @@ ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksRes
        blockedByIntId = other572.blockedByIntId;
        lockIdInternal = other572.lockIdInternal;
        __isset = other572.__isset;
    +}
    +ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other573) {
    + lockid = other573.lockid;
    + dbname = other573.dbname;
    + tablename = other573.tablename;
    + partname = other573.partname;
    + state = other573.state;
    + type = other573.type;
    + txnid = other573.txnid;
    + lastheartbeat = other573.lastheartbeat;
    + acquiredat = other573.acquiredat;
    + user = other573.user;
    + hostname = other573.hostname;
    + heartbeatCount = other573.heartbeatCount;
    + agentInfo = other573.agentInfo;
    + blockedByExtId = other573.blockedByExtId;
    + blockedByIntId = other573.blockedByIntId;
    + lockIdInternal = other573.lockIdInternal;
    + __isset = other573.__isset;
        return *this;
      }
      void ShowLocksResponseElement::printTo(std::ostream& out) const {
    @@ -13880,14 +13944,14 @@ uint32_t ShowLocksResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->locks.clear();
    - uint32_t _size573;
    - ::apache::thrift::protocol::TType _etype576;
    - xfer += iprot->readListBegin(_etype576, _size573);
    - this->locks.resize(_size573);
    - uint32_t _i577;
    - for (_i577 = 0; _i577 < _size573; ++_i577)
    + uint32_t _size574;
    + ::apache::thrift::protocol::TType _etype577;
    + xfer += iprot->readListBegin(_etype577, _size574);
    + this->locks.resize(_size574);
    + uint32_t _i578;
    + for (_i578 = 0; _i578 < _size574; ++_i578)
                  {
    - xfer += this->locks[_i577].read(iprot);
    + xfer += this->locks[_i578].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13916,10 +13980,10 @@ uint32_t ShowLocksResponse::write(::apache::thrift::protocol::TProtocol* oprot)
        xfer += oprot->writeFieldBegin("locks", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->locks.size()));
    - std::vector<ShowLocksResponseElement> ::const_iterator _iter578;
    - for (_iter578 = this->locks.begin(); _iter578 != this->locks.end(); ++_iter578)
    + std::vector<ShowLocksResponseElement> ::const_iterator _iter579;
    + for (_iter579 = this->locks.begin(); _iter579 != this->locks.end(); ++_iter579)
          {
    - xfer += (*_iter578).write(oprot);
    + xfer += (*_iter579).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -13936,13 +14000,13 @@ void swap(ShowLocksResponse &a, ShowLocksResponse &b) {
        swap(a.__isset, b.__isset);
      }

    -ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other579) {
    - locks = other579.locks;
    - __isset = other579.__isset;
    -}
    -ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other580) {
    +ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other580) {
        locks = other580.locks;
        __isset = other580.__isset;
    +}
    +ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other581) {
    + locks = other581.locks;
    + __isset = other581.__isset;
        return *this;
      }
      void ShowLocksResponse::printTo(std::ostream& out) const {
    @@ -14043,15 +14107,15 @@ void swap(HeartbeatRequest &a, HeartbeatRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other581) {
    - lockid = other581.lockid;
    - txnid = other581.txnid;
    - __isset = other581.__isset;
    -}
    -HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other582) {
    +HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other582) {
        lockid = other582.lockid;
        txnid = other582.txnid;
        __isset = other582.__isset;
    +}
    +HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other583) {
    + lockid = other583.lockid;
    + txnid = other583.txnid;
    + __isset = other583.__isset;
        return *this;
      }
      void HeartbeatRequest::printTo(std::ostream& out) const {
    @@ -14154,13 +14218,13 @@ void swap(HeartbeatTxnRangeRequest &a, HeartbeatTxnRangeRequest &b) {
        swap(a.max, b.max);
      }

    -HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other583) {
    - min = other583.min;
    - max = other583.max;
    -}
    -HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other584) {
    +HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other584) {
        min = other584.min;
        max = other584.max;
    +}
    +HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other585) {
    + min = other585.min;
    + max = other585.max;
        return *this;
      }
      void HeartbeatTxnRangeRequest::printTo(std::ostream& out) const {
    @@ -14211,15 +14275,15 @@ uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol*
              if (ftype == ::apache::thrift::protocol::T_SET) {
                {
                  this->aborted.clear();
    - uint32_t _size585;
    - ::apache::thrift::protocol::TType _etype588;
    - xfer += iprot->readSetBegin(_etype588, _size585);
    - uint32_t _i589;
    - for (_i589 = 0; _i589 < _size585; ++_i589)
    + uint32_t _size586;
    + ::apache::thrift::protocol::TType _etype589;
    + xfer += iprot->readSetBegin(_etype589, _size586);
    + uint32_t _i590;
    + for (_i590 = 0; _i590 < _size586; ++_i590)
                  {
    - int64_t _elem590;
    - xfer += iprot->readI64(_elem590);
    - this->aborted.insert(_elem590);
    + int64_t _elem591;
    + xfer += iprot->readI64(_elem591);
    + this->aborted.insert(_elem591);
                  }
                  xfer += iprot->readSetEnd();
                }
    @@ -14232,15 +14296,15 @@ uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol*
              if (ftype == ::apache::thrift::protocol::T_SET) {
                {
                  this->nosuch.clear();
    - uint32_t _size591;
    - ::apache::thrift::protocol::TType _etype594;
    - xfer += iprot->readSetBegin(_etype594, _size591);
    - uint32_t _i595;
    - for (_i595 = 0; _i595 < _size591; ++_i595)
    + uint32_t _size592;
    + ::apache::thrift::protocol::TType _etype595;
    + xfer += iprot->readSetBegin(_etype595, _size592);
    + uint32_t _i596;
    + for (_i596 = 0; _i596 < _size592; ++_i596)
                  {
    - int64_t _elem596;
    - xfer += iprot->readI64(_elem596);
    - this->nosuch.insert(_elem596);
    + int64_t _elem597;
    + xfer += iprot->readI64(_elem597);
    + this->nosuch.insert(_elem597);
                  }
                  xfer += iprot->readSetEnd();
                }
    @@ -14273,10 +14337,10 @@ uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol*
        xfer += oprot->writeFieldBegin("aborted", ::apache::thrift::protocol::T_SET, 1);
        {
          xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->aborted.size()));
    - std::set<int64_t> ::const_iterator _iter597;
    - for (_iter597 = this->aborted.begin(); _iter597 != this->aborted.end(); ++_iter597)
    + std::set<int64_t> ::const_iterator _iter598;
    + for (_iter598 = this->aborted.begin(); _iter598 != this->aborted.end(); ++_iter598)
          {
    - xfer += oprot->writeI64((*_iter597));
    + xfer += oprot->writeI64((*_iter598));
          }
          xfer += oprot->writeSetEnd();
        }
    @@ -14285,10 +14349,10 @@ uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol*
        xfer += oprot->writeFieldBegin("nosuch", ::apache::thrift::protocol::T_SET, 2);
        {
          xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->nosuch.size()));
    - std::set<int64_t> ::const_iterator _iter598;
    - for (_iter598 = this->nosuch.begin(); _iter598 != this->nosuch.end(); ++_iter598)
    + std::set<int64_t> ::const_iterator _iter599;
    + for (_iter599 = this->nosuch.begin(); _iter599 != this->nosuch.end(); ++_iter599)
          {
    - xfer += oprot->writeI64((*_iter598));
    + xfer += oprot->writeI64((*_iter599));
          }
          xfer += oprot->writeSetEnd();
        }
    @@ -14305,13 +14369,13 @@ void swap(HeartbeatTxnRangeResponse &a, HeartbeatTxnRangeResponse &b) {
        swap(a.nosuch, b.nosuch);
      }

    -HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other599) {
    - aborted = other599.aborted;
    - nosuch = other599.nosuch;
    -}
    -HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other600) {
    +HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other600) {
        aborted = other600.aborted;
        nosuch = other600.nosuch;
    +}
    +HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other601) {
    + aborted = other601.aborted;
    + nosuch = other601.nosuch;
        return *this;
      }
      void HeartbeatTxnRangeResponse::printTo(std::ostream& out) const {
    @@ -14399,9 +14463,9 @@ uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
              break;
            case 4:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast601;
    - xfer += iprot->readI32(ecast601);
    - this->type = (CompactionType::type)ecast601;
    + int32_t ecast602;
    + xfer += iprot->readI32(ecast602);
    + this->type = (CompactionType::type)ecast602;
                isset_type = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -14475,21 +14539,21 @@ void swap(CompactionRequest &a, CompactionRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -CompactionRequest::CompactionRequest(const CompactionRequest& other602) {
    - dbname = other602.dbname;
    - tablename = other602.tablename;
    - partitionname = other602.partitionname;
    - type = other602.type;
    - runas = other602.runas;
    - __isset = other602.__isset;
    -}
    -CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other603) {
    +CompactionRequest::CompactionRequest(const CompactionRequest& other603) {
        dbname = other603.dbname;
        tablename = other603.tablename;
        partitionname = other603.partitionname;
        type = other603.type;
        runas = other603.runas;
        __isset = other603.__isset;
    +}
    +CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other604) {
    + dbname = other604.dbname;
    + tablename = other604.tablename;
    + partitionname = other604.partitionname;
    + type = other604.type;
    + runas = other604.runas;
    + __isset = other604.__isset;
        return *this;
      }
      void CompactionRequest::printTo(std::ostream& out) const {
    @@ -14552,11 +14616,11 @@ void swap(ShowCompactRequest &a, ShowCompactRequest &b) {
        (void) b;
      }

    -ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other604) {
    - (void) other604;
    -}
    -ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other605) {
    +ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other605) {
        (void) other605;
    +}
    +ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other606) {
    + (void) other606;
        return *this;
      }
      void ShowCompactRequest::printTo(std::ostream& out) const {
    @@ -14677,9 +14741,9 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol*
              break;
            case 4:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast606;
    - xfer += iprot->readI32(ecast606);
    - this->type = (CompactionType::type)ecast606;
    + int32_t ecast607;
    + xfer += iprot->readI32(ecast607);
    + this->type = (CompactionType::type)ecast607;
                isset_type = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -14852,22 +14916,7 @@ void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) {
        swap(a.__isset, b.__isset);
      }

    -ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other607) {
    - dbname = other607.dbname;
    - tablename = other607.tablename;
    - partitionname = other607.partitionname;
    - type = other607.type;
    - state = other607.state;
    - workerid = other607.workerid;
    - start = other607.start;
    - runAs = other607.runAs;
    - hightestTxnId = other607.hightestTxnId;
    - metaInfo = other607.metaInfo;
    - endTime = other607.endTime;
    - hadoopJobId = other607.hadoopJobId;
    - __isset = other607.__isset;
    -}
    -ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other608) {
    +ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other608) {
        dbname = other608.dbname;
        tablename = other608.tablename;
        partitionname = other608.partitionname;
    @@ -14881,6 +14930,21 @@ ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowComp
        endTime = other608.endTime;
        hadoopJobId = other608.hadoopJobId;
        __isset = other608.__isset;
    +}
    +ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other609) {
    + dbname = other609.dbname;
    + tablename = other609.tablename;
    + partitionname = other609.partitionname;
    + type = other609.type;
    + state = other609.state;
    + workerid = other609.workerid;
    + start = other609.start;
    + runAs = other609.runAs;
    + hightestTxnId = other609.hightestTxnId;
    + metaInfo = other609.metaInfo;
    + endTime = other609.endTime;
    + hadoopJobId = other609.hadoopJobId;
    + __isset = other609.__isset;
        return *this;
      }
      void ShowCompactResponseElement::printTo(std::ostream& out) const {
    @@ -14936,14 +15000,14 @@ uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot)
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->compacts.clear();
    - uint32_t _size609;
    - ::apache::thrift::protocol::TType _etype612;
    - xfer += iprot->readListBegin(_etype612, _size609);
    - this->compacts.resize(_size609);
    - uint32_t _i613;
    - for (_i613 = 0; _i613 < _size609; ++_i613)
    + uint32_t _size610;
    + ::apache::thrift::protocol::TType _etype613;
    + xfer += iprot->readListBegin(_etype613, _size610);
    + this->compacts.resize(_size610);
    + uint32_t _i614;
    + for (_i614 = 0; _i614 < _size610; ++_i614)
                  {
    - xfer += this->compacts[_i613].read(iprot);
    + xfer += this->compacts[_i614].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14974,10 +15038,10 @@ uint32_t ShowCompactResponse::write(::apache::thrift::protocol::TProtocol* oprot
        xfer += oprot->writeFieldBegin("compacts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->compacts.size()));
    - std::vector<ShowCompactResponseElement> ::const_iterator _iter614;
    - for (_iter614 = this->compacts.begin(); _iter614 != this->compacts.end(); ++_iter614)
    + std::vector<ShowCompactResponseElement> ::const_iterator _iter615;
    + for (_iter615 = this->compacts.begin(); _iter615 != this->compacts.end(); ++_iter615)
          {
    - xfer += (*_iter614).write(oprot);
    + xfer += (*_iter615).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14993,11 +15057,11 @@ void swap(ShowCompactResponse &a, ShowCompactResponse &b) {
        swap(a.compacts, b.compacts);
      }

    -ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other615) {
    - compacts = other615.compacts;
    -}
    -ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other616) {
    +ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other616) {
        compacts = other616.compacts;
    +}
    +ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other617) {
    + compacts = other617.compacts;
        return *this;
      }
      void ShowCompactResponse::printTo(std::ostream& out) const {
    @@ -15028,6 +15092,11 @@ void AddDynamicPartitions::__set_partitionnames(const std::vector<std::string> &
        this->partitionnames = val;
      }

    +void AddDynamicPartitions::__set_operationType(const DataOperationType::type val) {
    + this->operationType = val;
    +__isset.operationType = true;
    +}
    +
      uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
    @@ -15081,14 +15150,14 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->partitionnames.clear();
    - uint32_t _size617;
    - ::apache::thrift::protocol::TType _etype620;
    - xfer += iprot->readListBegin(_etype620, _size617);
    - this->partitionnames.resize(_size617);
    - uint32_t _i621;
    - for (_i621 = 0; _i621 < _size617; ++_i621)
    + uint32_t _size618;
    + ::apache::thrift::protocol::TType _etype621;
    + xfer += iprot->readListBegin(_etype621, _size618);
    + this->partitionnames.resize(_size618);
    + uint32_t _i622;
    + for (_i622 = 0; _i622 < _size618; ++_i622)
                  {
    - xfer += iprot->readString(this->partitionnames[_i621]);
    + xfer += iprot->readString(this->partitionnames[_i622]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -15097,6 +15166,16 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
                xfer += iprot->skip(ftype);
              }
              break;
    + case 5:
    + if (ftype == ::apache::thrift::protocol::T_I32) {
    + int32_t ecast623;
    + xfer += iprot->readI32(ecast623);
    + this->operationType = (DataOperationType::type)ecast623;
    + this->__isset.operationType = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
            default:
              xfer += iprot->skip(ftype);
              break;
    @@ -15137,15 +15216,20 @@ uint32_t AddDynamicPartitions::write(::apache::thrift::protocol::TProtocol* opro
        xfer += oprot->writeFieldBegin("partitionnames", ::apache::thrift::protocol::T_LIST, 4);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionnames.size()));
    - std::vector<std::string> ::const_iterator _iter622;
    - for (_iter622 = this->partitionnames.begin(); _iter622 != this->partitionnames.end(); ++_iter622)
    + std::vector<std::string> ::const_iterator _iter624;
    + for (_iter624 = this->partitionnames.begin(); _iter624 != this->partitionnames.end(); ++_iter624)
          {
    - xfer += oprot->writeString((*_iter622));
    + xfer += oprot->writeString((*_iter624));
          }
          xfer += oprot->writeListEnd();
        }
        xfer += oprot->writeFieldEnd();

    + if (this->__isset.operationType) {
    + xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 5);
    + xfer += oprot->writeI32((int32_t)this->operationType);
    + xfer += oprot->writeFieldEnd();
    + }
        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
        return xfer;
    @@ -15157,19 +15241,25 @@ void swap(AddDynamicPartitions &a, AddDynamicPartitions &b) {
        swap(a.dbname, b.dbname);
        swap(a.tablename, b.tablename);
        swap(a.partitionnames, b.partitionnames);
    + swap(a.operationType, b.operationType);
    + swap(a.__isset, b.__isset);
      }

    -AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other623) {
    - txnid = other623.txnid;
    - dbname = other623.dbname;
    - tablename = other623.tablename;
    - partitionnames = other623.partitionnames;
    +AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other625) {
    + txnid = other625.txnid;
    + dbname = other625.dbname;
    + tablename = other625.tablename;
    + partitionnames = other625.partitionnames;
    + operationType = other625.operationType;
    + __isset = other625.__isset;
      }
    -AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other624) {
    - txnid = other624.txnid;
    - dbname = other624.dbname;
    - tablename = other624.tablename;
    - partitionnames = other624.partitionnames;
    +AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other626) {
    + txnid = other626.txnid;
    + dbname = other626.dbname;
    + tablename = other626.tablename;
    + partitionnames = other626.partitionnames;
    + operationType = other626.operationType;
    + __isset = other626.__isset;
        return *this;
      }
      void AddDynamicPartitions::printTo(std::ostream& out) const {
    @@ -15179,6 +15269,7 @@ void AddDynamicPartitions::printTo(std::ostream& out) const {
        out << ", " << "dbname=" << to_string(dbname);
        out << ", " << "tablename=" << to_string(tablename);
        out << ", " << "partitionnames=" << to_string(partitionnames);
    + out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "<null>"));
        out << ")";
      }

    @@ -15274,15 +15365,15 @@ void swap(NotificationEventRequest &a, NotificationEventRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other625) {
    - lastEvent = other625.lastEvent;
    - maxEvents = other625.maxEvents;
    - __isset = other625.__isset;
    +NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other627) {
    + lastEvent = other627.lastEvent;
    + maxEvents = other627.maxEvents;
    + __isset = other627.__isset;
      }
    -NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other626) {
    - lastEvent = other626.lastEvent;
    - maxEvents = other626.maxEvents;
    - __isset = other626.__isset;
    +NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other628) {
    + lastEvent = other628.lastEvent;
    + maxEvents = other628.maxEvents;
    + __isset = other628.__isset;
        return *this;
      }
      void NotificationEventRequest::printTo(std::ostream& out) const {
    @@ -15464,23 +15555,23 @@ void swap(NotificationEvent &a, NotificationEvent &b) {
        swap(a.__isset, b.__isset);
      }

    -NotificationEvent::NotificationEvent(const NotificationEvent& other627) {
    - eventId = other627.eventId;
    - eventTime = other627.eventTime;
    - eventType = other627.eventType;
    - dbName = other627.dbName;
    - tableName = other627.tableName;
    - message = other627.message;
    - __isset = other627.__isset;
    -}
    -NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other628) {
    - eventId = other628.eventId;
    - eventTime = other628.eventTime;
    - eventType = other628.eventType;
    - dbName = other628.dbName;
    - tableName = other628.tableName;
    - message = other628.message;
    - __isset = other628.__isset;
    +NotificationEvent::NotificationEvent(const NotificationEvent& other629) {
    + eventId = other629.eventId;
    + eventTime = other629.eventTime;
    + eventType = other629.eventType;
    + dbName = other629.dbName;
    + tableName = other629.tableName;
    + message = other629.message;
    + __isset = other629.__isset;
    +}
    +NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other630) {
    + eventId = other630.eventId;
    + eventTime = other630.eventTime;
    + eventType = other630.eventType;
    + dbName = other630.dbName;
    + tableName = other630.tableName;
    + message = other630.message;
    + __isset = other630.__isset;
        return *this;
      }
      void NotificationEvent::printTo(std::ostream& out) const {
    @@ -15530,14 +15621,14 @@ uint32_t NotificationEventResponse::read(::apache::thrift::protocol::TProtocol*
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->events.clear();
    - uint32_t _size629;
    - ::apache::thrift::protocol::TType _etype632;
    - xfer += iprot->readListBegin(_etype632, _size629);
    - this->events.resize(_size629);
    - uint32_t _i633;
    - for (_i633 = 0; _i633 < _size629; ++_i633)
    + uint32_t _size631;
    + ::apache::thrift::protocol::TType _etype634;
    + xfer += iprot->readListBegin(_etype634, _size631);
    + this->events.resize(_size631);
    + uint32_t _i635;
    + for (_i635 = 0; _i635 < _size631; ++_i635)
                  {
    - xfer += this->events[_i633].read(iprot);
    + xfer += this->events[_i635].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -15568,10 +15659,10 @@ uint32_t NotificationEventResponse::write(::apache::thrift::protocol::TProtocol*
        xfer += oprot->writeFieldBegin("events", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->events.size()));
    - std::vector<NotificationEvent> ::const_iterator _iter634;
    - for (_iter634 = this->events.begin(); _iter634 != this->events.end(); ++_iter634)
    + std::vector<NotificationEvent> ::const_iterator _iter636;
    + for (_iter636 = this->events.begin(); _iter636 != this->events.end(); ++_iter636)
          {
    - xfer += (*_iter634).write(oprot);
    + xfer += (*_iter636).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -15587,11 +15678,11 @@ void swap(NotificationEventResponse &a, NotificationEventResponse &b) {
        swap(a.events, b.events);
      }

    -NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other635) {
    - events = other635.events;
    +NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other637) {
    + events = other637.events;
      }
    -NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other636) {
    - events = other636.events;
    +NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other638) {
    + events = other638.events;
        return *this;
      }
      void NotificationEventResponse::printTo(std::ostream& out) const {
    @@ -15673,11 +15764,11 @@ void swap(CurrentNotificationEventId &a, CurrentNotificationEventId &b) {
        swap(a.eventId, b.eventId);
      }

    -CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other637) {
    - eventId = other637.eventId;
    +CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other639) {
    + eventId = other639.eventId;
      }
    -CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other638) {
    - eventId = other638.eventId;
    +CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other640) {
    + eventId = other640.eventId;
        return *this;
      }
      void CurrentNotificationEventId::printTo(std::ostream& out) const {
    @@ -15722,14 +15813,14 @@ uint32_t InsertEventRequestData::read(::apache::thrift::protocol::TProtocol* ipr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->filesAdded.clear();
    - uint32_t _size639;
    - ::apache::thrift::protocol::TType _etype642;
    - xfer += iprot->readListBegin(_etype642, _size639);
    - this->filesAdded.resize(_size639);
    - uint32_t _i643;
    - for (_i643 = 0; _i643 < _size639; ++_i643)
    + uint32_t _size641;
    + ::apache::thrift::protocol::TType _etype644;
    + xfer += iprot->readListBegin(_etype644, _size641);
    + this->filesAdded.resize(_size641);
    + uint32_t _i645;
    + for (_i645 = 0; _i645 < _size641; ++_i645)
                  {
    - xfer += iprot->readString(this->filesAdded[_i643]);
    + xfer += iprot->readString(this->filesAdded[_i645]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -15760,10 +15851,10 @@ uint32_t InsertEventRequestData::write(::apache::thrift::protocol::TProtocol* op
        xfer += oprot->writeFieldBegin("filesAdded", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->filesAdded.size()));
    - std::vector<std::string> ::const_iterator _iter644;
    - for (_iter644 = this->filesAdded.begin(); _iter644 != this->filesAdded.end(); ++_iter644)
    + std::vector<std::string> ::const_iterator _iter646;
    + for (_iter646 = this->filesAdded.begin(); _iter646 != this->filesAdded.end(); ++_iter646)
          {
    - xfer += oprot->writeString((*_iter644));
    + xfer += oprot->writeString((*_iter646));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -15779,11 +15870,11 @@ void swap(InsertEventRequestData &a, InsertEventRequestData &b) {
        swap(a.filesAdded, b.filesAdded);
      }

    -InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other645) {
    - filesAdded = other645.filesAdded;
    +InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other647) {
    + filesAdded = other647.filesAdded;
      }
    -InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other646) {
    - filesAdded = other646.filesAdded;
    +InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other648) {
    + filesAdded = other648.filesAdded;
        return *this;
      }
      void InsertEventRequestData::printTo(std::ostream& out) const {
    @@ -15863,13 +15954,13 @@ void swap(FireEventRequestData &a, FireEventRequestData &b) {
        swap(a.__isset, b.__isset);
      }

    -FireEventRequestData::FireEventRequestData(const FireEventRequestData& other647) {
    - insertData = other647.insertData;
    - __isset = other647.__isset;
    +FireEventRequestData::FireEventRequestData(const FireEventRequestData& other649) {
    + insertData = other649.insertData;
    + __isset = other649.__isset;
      }
    -FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other648) {
    - insertData = other648.insertData;
    - __isset = other648.__isset;
    +FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other650) {
    + insertData = other650.insertData;
    + __isset = other650.__isset;
        return *this;
      }
      void FireEventRequestData::printTo(std::ostream& out) const {
    @@ -15966,14 +16057,14 @@ uint32_t FireEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->partitionVals.clear();
    - uint32_t _size649;
    - ::apache::thrift::protocol::TType _etype652;
    - xfer += iprot->readListBegin(_etype652, _size649);
    - this->partitionVals.resize(_size649);
    - uint32_t _i653;
    - for (_i653 = 0; _i653 < _size649; ++_i653)
    + uint32_t _size651;
    + ::apache::thrift::protocol::TType _etype654;
    + xfer += iprot->readListBegin(_etype654, _size651);
    + this->partitionVals.resize(_size651);
    + uint32_t _i655;
    + for (_i655 = 0; _i655 < _size651; ++_i655)
                  {
    - xfer += iprot->readString(this->partitionVals[_i653]);
    + xfer += iprot->readString(this->partitionVals[_i655]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -16025,10 +16116,10 @@ uint32_t FireEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) c
          xfer += oprot->writeFieldBegin("partitionVals", ::apache::thrift::protocol::T_LIST, 5);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionVals.size()));
    - std::vector<std::string> ::const_iterator _iter654;
    - for (_iter654 = this->partitionVals.begin(); _iter654 != this->partitionVals.end(); ++_iter654)
    + std::vector<std::string> ::const_iterator _iter656;
    + for (_iter656 = this->partitionVals.begin(); _iter656 != this->partitionVals.end(); ++_iter656)
            {
    - xfer += oprot->writeString((*_iter654));
    + xfer += oprot->writeString((*_iter656));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -16049,21 +16140,21 @@ void swap(FireEventRequest &a, FireEventRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -FireEventRequest::FireEventRequest(const FireEventRequest& other655) {
    - successful = other655.successful;
    - data = other655.data;
    - dbName = other655.dbName;
    - tableName = other655.tableName;
    - partitionVals = other655.partitionVals;
    - __isset = other655.__isset;
    -}
    -FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other656) {
    - successful = other656.successful;
    - data = other656.data;
    - dbName = other656.dbName;
    - tableName = other656.tableName;
    - partitionVals = other656.partitionVals;
    - __isset = other656.__isset;
    +FireEventRequest::FireEventRequest(const FireEventRequest& other657) {
    + successful = other657.successful;
    + data = other657.data;
    + dbName = other657.dbName;
    + tableName = other657.tableName;
    + partitionVals = other657.partitionVals;
    + __isset = other657.__isset;
    +}
    +FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other658) {
    + successful = other658.successful;
    + data = other658.data;
    + dbName = other658.dbName;
    + tableName = other658.tableName;
    + partitionVals = other658.partitionVals;
    + __isset = other658.__isset;
        return *this;
      }
      void FireEventRequest::printTo(std::ostream& out) const {
    @@ -16126,11 +16217,11 @@ void swap(FireEventResponse &a, FireEventResponse &b) {
        (void) b;
      }

    -FireEventResponse::FireEventResponse(const FireEventResponse& other657) {
    - (void) other657;
    +FireEventResponse::FireEventResponse(const FireEventResponse& other659) {
    + (void) other659;
      }
    -FireEventResponse& FireEventResponse::operator=(const FireEventResponse& other658) {
    - (void) other658;
    +FireEventResponse& FireEventResponse::operator=(const FireEventResponse& other660) {
    + (void) other660;
        return *this;
      }
      void FireEventResponse::printTo(std::ostream& out) const {
    @@ -16230,15 +16321,15 @@ void swap(MetadataPpdResult &a, MetadataPpdResult &b) {
        swap(a.__isset, b.__isset);
      }

    -MetadataPpdResult::MetadataPpdResult(const MetadataPpdResult& other659) {
    - metadata = other659.metadata;
    - includeBitset = other659.includeBitset;
    - __isset = other659.__isset;
    +MetadataPpdResult::MetadataPpdResult(const MetadataPpdResult& other661) {
    + metadata = other661.metadata;
    + includeBitset = other661.includeBitset;
    + __isset = other661.__isset;
      }
    -MetadataPpdResult& MetadataPpdResult::operator=(const MetadataPpdResult& other660) {
    - metadata = other660.metadata;
    - includeBitset = other660.includeBitset;
    - __isset = other660.__isset;
    +MetadataPpdResult& MetadataPpdResult::operator=(const MetadataPpdResult& other662) {
    + metadata = other662.metadata;
    + includeBitset = other662.includeBitset;
    + __isset = other662.__isset;
        return *this;
      }
      void MetadataPpdResult::printTo(std::ostream& out) const {
    @@ -16289,17 +16380,17 @@ uint32_t GetFileMetadataByExprResult::read(::apache::thrift::protocol::TProtocol
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  this->metadata.clear();
    - uint32_t _size661;
    - ::apache::thrift::protocol::TType _ktype662;
    - ::apache::thrift::protocol::TType _vtype663;
    - xfer += iprot->readMapBegin(_ktype662, _vtype663, _size661);
    - uint32_t _i665;
    - for (_i665 = 0; _i665 < _size661; ++_i665)
    + uint32_t _size663;
    + ::apache::thrift::protocol::TType _ktype664;
    + ::apache::thrift::protocol::TType _vtype665;
    + xfer += iprot->readMapBegin(_ktype664, _vtype665, _size663);
    + uint32_t _i667;
    + for (_i667 = 0; _i667 < _size663; ++_i667)
                  {
    - int64_t _key666;
    - xfer += iprot->readI64(_key666);
    - MetadataPpdResult& _val667 = this->metadata[_key666];
    - xfer += _val667.read(iprot);
    + int64_t _key668;
    + xfer += iprot->readI64(_key668);
    + MetadataPpdResult& _val669 = this->metadata[_key668];
    + xfer += _val669.read(iprot);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -16340,11 +16431,11 @@ uint32_t GetFileMetadataByExprResult::write(::apache::thrift::protocol::TProtoco
        xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I64, ::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->metadata.size()));
    - std::map<int64_t, MetadataPpdResult> ::const_iterator _iter668;
    - for (_iter668 = this->metadata.begin(); _iter668 != this->metadata.end(); ++_iter668)
    + std::map<int64_t, MetadataPpdResult> ::const_iterator _iter670;
    + for (_iter670 = this->metadata.begin(); _iter670 != this->metadata.end(); ++_iter670)
          {
    - xfer += oprot->writeI64(_iter668->first);
    - xfer += _iter668->second.write(oprot);
    + xfer += oprot->writeI64(_iter670->first);
    + xfer += _iter670->second.write(oprot);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -16365,13 +16456,13 @@ void swap(GetFileMetadataByExprResult &a, GetFileMetadataByExprResult &b) {
        swap(a.isSupported, b.isSupported);
      }

    -GetFileMetadataByExprResult::GetFileMetadataByExprResult(const GetFileMetadataByExprResult& other669) {
    - metadata = other669.metadata;
    - isSupported = other669.isSupported;
    +GetFileMetadataByExprResult::GetFileMetadataByExprResult(const GetFileMetadataByExprResult& other671) {
    + metadata = other671.metadata;
    + isSupported = other671.isSupported;
      }
    -GetFileMetadataByExprResult& GetFileMetadataByExprResult::operator=(const GetFileMetadataByExprResult& other670) {
    - metadata = other670.metadata;
    - isSupported = other670.isSupported;
    +GetFileMetadataByExprResult& GetFileMetadataByExprResult::operator=(const GetFileMetadataByExprResult& other672) {
    + metadata = other672.metadata;
    + isSupported = other672.isSupported;
        return *this;
      }
      void GetFileMetadataByExprResult::printTo(std::ostream& out) const {
    @@ -16432,14 +16523,14 @@ uint32_t GetFileMetadataByExprRequest::read(::apache::thrift::protocol::TProtoco
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->fileIds.clear();
    - uint32_t _size671;
    - ::apache::thrift::protocol::TType _etype674;
    - xfer += iprot->readListBegin(_etype674, _size671);
    - this->fileIds.resize(_size671);
    - uint32_t _i675;
    - for (_i675 = 0; _i675 < _size671; ++_i675)
    + uint32_t _size673;
    + ::apache::thrift::protocol::TType _etype676;
    + xfer += iprot->readListBegin(_etype676, _size673);
    + this->fileIds.resize(_size673);
    + uint32_t _i677;
    + for (_i677 = 0; _i677 < _size673; ++_i677)
                  {
    - xfer += iprot->readI64(this->fileIds[_i675]);
    + xfer += iprot->readI64(this->fileIds[_i677]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -16466,9 +16557,9 @@ uint32_t GetFileMetadataByExprRequest::read(::apache::thrift::protocol::TProtoco
              break;
            case 4:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast676;
    - xfer += iprot->readI32(ecast676);
    - this->type = (FileMetadataExprType::type)ecast676;
    + int32_t ecast678;
    + xfer += iprot->readI32(ecast678);
    + this->type = (FileMetadataExprType::type)ecast678;
                this->__isset.type = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -16498,10 +16589,10 @@ uint32_t GetFileMetadataByExprRequest::write(::apache::thrift::protocol::TProtoc
        xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size()));
    - std::vector<int64_t> ::const_iterator _iter677;
    - for (_iter677 = this->fileIds.begin(); _iter677 != this->fileIds.end(); ++_iter677)
    + std::vector<int64_t> ::const_iterator _iter679;
    + for (_iter679 = this->fileIds.begin(); _iter679 != this->fileIds.end(); ++_iter679)
          {
    - xfer += oprot->writeI64((*_iter677));
    + xfer += oprot->writeI64((*_iter679));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -16535,19 +16626,19 @@ void swap(GetFileMetadataByExprRequest &a, GetFileMetadataByExprRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -GetFileMetadataByExprRequest::GetFileMetadataByExprRequest(const GetFileMetadataByExprRequest& other678) {
    - fileIds = other678.fileIds;
    - expr = other678.expr;
    - doGetFooters = other678.doGetFooters;
    - type = other678.type;
    - __isset = other678.__isset;
    +GetFileMetadataByExprRequest::GetFileMetadataByExprRequest(const GetFileMetadataByExprRequest& other680) {
    + fileIds = other680.fileIds;
    + expr = other680.expr;
    + doGetFooters = other680.doGetFooters;
    + type = other680.type;
    + __isset = other680.__isset;
      }
    -GetFileMetadataByExprRequest& GetFileMetadataByExprRequest::operator=(const GetFileMetadataByExprRequest& other679) {
    - fileIds = other679.fileIds;
    - expr = other679.expr;
    - doGetFooters = other679.doGetFooters;
    - type = other679.type;
    - __isset = other679.__isset;
    +GetFileMetadataByExprRequest& GetFileMetadataByExprRequest::operator=(const GetFileMetadataByExprRequest& other681) {
    + fileIds = other681.fileIds;
    + expr = other681.expr;
    + doGetFooters = other681.doGetFooters;
    + type = other681.type;
    + __isset = other681.__isset;
        return *this;
      }
      void GetFileMetadataByExprRequest::printTo(std::ostream& out) const {
    @@ -16600,17 +16691,17 @@ uint32_t GetFileMetadataResult::read(::apache::thrift::protocol::TProtocol* ipro
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  this->metadata.clear();
    - uint32_t _size680;
    - ::apache::thrift::protocol::TType _ktype681;
    - ::apache::thrift::protocol::TType _vtype682;
    - xfer += iprot->readMapBegin(_ktype681, _vtype682, _size680);
    - uint32_t _i684;
    - for (_i684 = 0; _i684 < _size680; ++_i684)
    + uint32_t _size682;
    + ::apache::thrift::protocol::TType _ktype683;
    + ::apache::thrift::protocol::TType _vtype684;
    + xfer += iprot->readMapBegin(_ktype683, _vtype684, _size682);
    + uint32_t _i686;
    + for (_i686 = 0; _i686 < _size682; ++_i686)
                  {
    - int64_t _key685;
    - xfer += iprot->readI64(_key685);
    - std::string& _val686 = this->metadata[_key685];
    - xfer += iprot->readBinary(_val686);
    + int64_t _key687;
    + xfer += iprot->readI64(_key687);
    + std::string& _val688 = this->metadata[_key687];
    + xfer += iprot->readBinary(_val688);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -16651,11 +16742,11 @@ uint32_t GetFileMetadataResult::write(::apache::thrift::protocol::TProtocol* opr
        xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I64, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->metadata.size()));
    - std::map<int64_t, std::string> ::const_iterator _iter687;
    - for (_iter687 = this->metadata.begin(); _iter687 != this->metadata.end(); ++_iter687)
    + std::map<int64_t, std::string> ::const_iterator _iter689;
    + for (_iter689 = this->metadata.begin(); _iter689 != this->metadata.end(); ++_iter689)
          {
    - xfer += oprot->writeI64(_iter687->first);
    - xfer += oprot->writeBinary(_iter687->second);
    + xfer += oprot->writeI64(_iter689->first);
    + xfer += oprot->writeBinary(_iter689->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -16676,13 +16767,13 @@ void swap(GetFileMetadataResult &a, GetFileMetadataResult &b) {
        swap(a.isSupported, b.isSupported);
      }

    -GetFileMetadataResult::GetFileMetadataResult(const GetFileMetadataResult& other688) {
    - metadata = other688.metadata;
    - isSupported = other688.isSupported;
    +GetFileMetadataResult::GetFileMetadataResult(const GetFileMetadataResult& other690) {
    + metadata = other690.metadata;
    + isSupported = other690.isSupported;
      }
    -GetFileMetadataResult& GetFileMetadataResult::operator=(const GetFileMetadataResult& other689) {
    - metadata = other689.metadata;
    - isSupported = other689.isSupported;
    +GetFileMetadataResult& GetFileMetadataResult::operator=(const GetFileMetadataResult& other691) {
    + metadata = other691.metadata;
    + isSupported = other691.isSupported;
        return *this;
      }
      void GetFileMetadataResult::printTo(std::ostream& out) const {
    @@ -16728,14 +16819,14 @@ uint32_t GetFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* ipr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->fileIds.clear();
    - uint32_t _size690;
    - ::apache::thrift::protocol::TType _etype693;
    - xfer += iprot->readListBegin(_etype693, _size690);
    - this->fileIds.resize(_size690);
    - uint32_t _i694;
    - for (_i694 = 0; _i694 < _size690; ++_i694)
    + uint32_t _size692;
    + ::apache::thrift::protocol::TType _etype695;
    + xfer += iprot->readListBegin(_etype695, _size692);
    + this->fileIds.resize(_size692);
    + uint32_t _i696;
    + for (_i696 = 0; _i696 < _size692; ++_i696)
                  {
    - xfer += iprot->readI64(this->fileIds[_i694]);
    + xfer += iprot->readI64(this->fileIds[_i696]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -16766,10 +16857,10 @@ uint32_t GetFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* op
        xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size()));
    - std::vector<int64_t> ::const_iterator _iter695;
    - for (_iter695 = this->fileIds.begin(); _iter695 != this->fileIds.end(); ++_iter695)
    + std::vector<int64_t> ::const_iterator _iter697;
    + for (_iter697 = this->fileIds.begin(); _iter697 != this->fileIds.end(); ++_iter697)
          {
    - xfer += oprot->writeI64((*_iter695));
    + xfer += oprot->writeI64((*_iter697));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -16785,11 +16876,11 @@ void swap(GetFileMetadataRequest &a, GetFileMetadataRequest &b) {
        swap(a.fileIds, b.fileIds);
      }

    -GetFileMetadataRequest::GetFileMetadataRequest(const GetFileMetadataRequest& other696) {
    - fileIds = other696.fileIds;
    +GetFileMetadataRequest::GetFileMetadataRequest(const GetFileMetadataRequest& other698) {
    + fileIds = other698.fileIds;
      }
    -GetFileMetadataRequest& GetFileMetadataRequest::operator=(const GetFileMetadataRequest& other697) {
    - fileIds = other697.fileIds;
    +GetFileMetadataRequest& GetFileMetadataRequest::operator=(const GetFileMetadataRequest& other699) {
    + fileIds = other699.fileIds;
        return *this;
      }
      void GetFileMetadataRequest::printTo(std::ostream& out) const {
    @@ -16848,11 +16939,11 @@ void swap(PutFileMetadataResult &a, PutFileMetadataResult &b) {
        (void) b;
      }

    -PutFileMetadataResult::PutFileMetadataResult(const PutFileMetadataResult& other698) {
    - (void) other698;
    +PutFileMetadataResult::PutFileMetadataResult(const PutFileMetadataResult& other700) {
    + (void) other700;
      }
    -PutFileMetadataResult& PutFileMetadataResult::operator=(const PutFileMetadataResult& other699) {
    - (void) other699;
    +PutFileMetadataResult& PutFileMetadataResult::operator=(const PutFileMetadataResult& other701) {
    + (void) other701;
        return *this;
      }
      void PutFileMetadataResult::printTo(std::ostream& out) const {
    @@ -16906,14 +16997,14 @@ uint32_t PutFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* ipr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->fileIds.clear();
    - uint32_t _size700;
    - ::apache::thrift::protocol::TType _etype703;
    - xfer += iprot->readListBegin(_etype703, _size700);
    - this->fileIds.resize(_size700);
    - uint32_t _i704;
    - for (_i704 = 0; _i704 < _size700; ++_i704)
    + uint32_t _size702;
    + ::apache::thrift::protocol::TType _etype705;
    + xfer += iprot->readListBegin(_etype705, _size702);
    + this->fileIds.resize(_size702);
    + uint32_t _i706;
    + for (_i706 = 0; _i706 < _size702; ++_i706)
                  {
    - xfer += iprot->readI64(this->fileIds[_i704]);
    + xfer += iprot->readI64(this->fileIds[_i706]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -16926,14 +17017,14 @@ uint32_t PutFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* ipr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->metadata.clear();
    - uint32_t _size705;
    - ::apache::thrift::protocol::TType _etype708;
    - xfer += iprot->readListBegin(_etype708, _size705);
    - this->metadata.resize(_size705);
    - uint32_t _i709;
    - for (_i709 = 0; _i709 < _size705; ++_i709)
    + uint32_t _size707;
    + ::apache::thrift::protocol::TType _etype710;
    + xfer += iprot->readListBegin(_etype710, _size707);
    + this->metadata.resize(_size707);
    + uint32_t _i711;
    + for (_i711 = 0; _i711 < _size707; ++_i711)
                  {
    - xfer += iprot->readBinary(this->metadata[_i709]);
    + xfer += iprot->readBinary(this->metadata[_i711]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -16944,9 +17035,9 @@ uint32_t PutFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* ipr
              break;
            case 3:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast710;
    - xfer += iprot->readI32(ecast710);
    - this->type = (FileMetadataExprType::type)ecast710;
    + int32_t ecast712;
    + xfer += iprot->readI32(ecast712);
    + this->type = (FileMetadataExprType::type)ecast712;
                this->__isset.type = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -16976,10 +17067,10 @@ uint32_t PutFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* op
        xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size()));
    - std::vector<int64_t> ::const_iterator _iter711;
    - for (_iter711 = this->fileIds.begin(); _iter711 != this->fileIds.end(); ++_iter711)
    + std::vector<int64_t> ::const_iterator _iter713;
    + for (_iter713 = this->fileIds.begin(); _iter713 != this->fileIds.end(); ++_iter713)
          {
    - xfer += oprot->writeI64((*_iter711));
    + xfer += oprot->writeI64((*_iter713));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -16988,10 +17079,10 @@ uint32_t PutFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* op
        xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_LIST, 2);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->metadata.size()));
    - std::vector<std::string> ::const_iterator _iter712;
    - for (_iter712 = this->metadata.begin(); _iter712 != this->metadata.end(); ++_iter712)
    + std::vector<std::string> ::const_iterator _iter714;
    + for (_iter714 = this->metadata.begin(); _iter714 != this->metadata.end(); ++_iter714)
          {
    - xfer += oprot->writeBinary((*_iter712));
    + xfer += oprot->writeBinary((*_iter714));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -17015,17 +17106,17 @@ void swap(PutFileMetadataRequest &a, PutFileMetadataRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -PutFileMetadataRequest::PutFileMetadataRequest(const PutFileMetadataRequest& other713) {
    - fileIds = other713.fileIds;
    - metadata = other713.metadata;
    - type = other713.type;
    - __isset = other713.__isset;
    +PutFileMetadataRequest::PutFileMetadataRequest(const PutFileMetadataRequest& other715) {
    + fileIds = other715.fileIds;
    + metadata = other715.metadata;
    + type = other715.type;
    + __isset = other715.__isset;
      }
    -PutFileMetadataRequest& PutFileMetadataRequest::operator=(const PutFileMetadataRequest& other714) {
    - fileIds = other714.fileIds;
    - metadata = other714.metadata;
    - type = other714.type;
    - __isset = other714.__isset;
    +PutFileMetadataRequest& PutFileMetadataRequest::operator=(const PutFileMetadataRequest& other716) {
    + fileIds = other716.fileIds;
    + metadata = other716.metadata;
    + type = other716.type;
    + __isset = other716.__isset;
        return *this;
      }
      void PutFileMetadataRequest::printTo(std::ostream& out) const {
    @@ -17086,11 +17177,11 @@ void swap(ClearFileMetadataResult &a, ClearFileMetadataResult &b) {
        (void) b;
      }

    -ClearFileMetadataResult::ClearFileMetadataResult(const ClearFileMetadataResult& other715) {
    - (void) other715;
    +ClearFileMetadataResult::ClearFileMetadataResult(const ClearFileMetadataResult& other717) {
    + (void) other717;
      }
    -ClearFileMetadataResult& ClearFileMetadataResult::operator=(const ClearFileMetadataResult& other716) {
    - (void) other716;
    +ClearFileMetadataResult& ClearFileMetadataResult::operator=(const ClearFileMetadataResult& other718) {
    + (void) other718;
        return *this;
      }
      void ClearFileMetadataResult::printTo(std::ostream& out) const {
    @@ -17134,14 +17225,14 @@ uint32_t ClearFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* i
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->fileIds.clear();
    - uint32_t _size717;
    - ::apache::thrift::protocol::TType _etype720;
    - xfer += iprot->readListBegin(_etype720, _size717);
    - this->fileIds.resize(_size717);
    - uint32_t _i721;
    - for (_i721 = 0; _i721 < _size717; ++_i721)
    + uint32_t _size719;
    + ::apache::thrift::protocol::TType _etype722;
    + xfer += iprot->readListBegin(_etype722, _size719);
    + this->fileIds.resize(_size719);
    + uint32_t _i723;
    + for (_i723 = 0; _i723 < _size719; ++_i723)
                  {
    - xfer += iprot->readI64(this->fileIds[_i721]);
    + xfer += iprot->readI64(this->fileIds[_i723]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -17172,10 +17263,10 @@ uint32_t ClearFileMetadataRequest::write(::apache::thrift::protocol::TProtocol*
        xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size()));
    - std::vector<int64_t> ::const_iterator _iter722;
    - for (_iter722 = this->fileIds.begin(); _iter722 != this->fileIds.end(); ++_iter722)
    + std::vector<int64_t> ::const_iterator _iter724;
    + for (_iter724 = this->fileIds.begin(); _iter724 != this->fileIds.end(); ++_iter724)
          {
    - xfer += oprot->writeI64((*_iter722));
    + xfer += oprot->writeI64((*_iter724));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -17191,11 +17282,11 @@ void swap(ClearFileMetadataRequest &a, ClearFileMetadataRequest &b) {
        swap(a.fileIds, b.fileIds);
      }

    -ClearFileMetadataRequest::ClearFileMetadataRequest(const ClearFileMetadataRequest& other723) {
    - fileIds = other723.fileIds;
    +ClearFileMetadataRequest::ClearFileMetadataRequest(const ClearFileMetadataRequest& other725) {
    + fileIds = other725.fileIds;
      }
    -ClearFileMetadataRequest& ClearFileMetadataRequest::operator=(const ClearFileMetadataRequest& other724) {
    - fileIds = other724.fileIds;
    +ClearFileMetadataRequest& ClearFileMetadataRequest::operator=(const ClearFileMetadataRequest& other726) {
    + fileIds = other726.fileIds;
        return *this;
      }
      void ClearFileMetadataRequest::printTo(std::ostream& out) const {
    @@ -17277,11 +17368,11 @@ void swap(CacheFileMetadataResult &a, CacheFileMetadataResult &b) {
        swap(a.isSupported, b.isSupported);
      }

    -CacheFileMetadataResult::CacheFileMetadataResult(const CacheFileMetadataResult& other725) {
    - isSupported = other725.isSupported;
    +CacheFileMetadataResult::CacheFileMetadataResult(const CacheFileMetadataResult& other727) {
    + isSupported = other727.isSupported;
      }
    -CacheFileMetadataResult& CacheFileMetadataResult::operator=(const CacheFileMetadataResult& other726) {
    - isSupported = other726.isSupported;
    +CacheFileMetadataResult& CacheFileMetadataResult::operator=(const CacheFileMetadataResult& other728) {
    + isSupported = other728.isSupported;
        return *this;
      }
      void CacheFileMetadataResult::printTo(std::ostream& out) const {
    @@ -17422,19 +17513,19 @@ void swap(CacheFileMetadataRequest &a, CacheFileMetadataRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -CacheFileMetadataRequest::CacheFileMetadataRequest(const CacheFileMetadataRequest& other727) {
    - dbName = other727.dbName;
    - tblName = other727.tblName;
    - partName = other727.partName;
    - isAllParts = other727.isAllParts;
    - __isset = other727.__isset;
    +CacheFileMetadataRequest::CacheFileMetadataRequest(const CacheFileMetadataRequest& other729) {
    + dbName = other729.dbName;
    + tblName = other729.tblName;
    + partName = other729.partName;
    + isAllParts = other729.isAllParts;
    + __isset = other729.__isset;
      }
    -CacheFileMetadataRequest& CacheFileMetadataRequest::operator=(const CacheFileMetadataRequest& other728) {
    - dbName = other728.dbName;
    - tblName = other728.tblName;
    - partName = other728.partName;
    - isAllParts = other728.isAllParts;
    - __isset = other728.__isset;
    +CacheFileMetadataRequest& CacheFileMetadataRequest::operator=(const CacheFileMetadataRequest& other730) {
    + dbName = other730.dbName;
    + tblName = other730.tblName;
    + partName = other730.partName;
    + isAllParts = other730.isAllParts;
    + __isset = other730.__isset;
        return *this;
      }
      void CacheFileMetadataRequest::printTo(std::ostream& out) const {
    @@ -17482,14 +17573,14 @@ uint32_t GetAllFunctionsResponse::read(::apache::thrift::protocol::TProtocol* ip
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->functions.clear();
    - uint32_t _size729;
    - ::apache::thrift::protocol::TType _etype732;
    - xfer += iprot->readListBegin(_etype732, _size729);
    - this->functions.resize(_size729);
    - uint32_t _i733;
    - for (_i733 = 0; _i733 < _size729; ++_i733)
    + uint32_t _size731;
    + ::apache::thrift::protocol::TType _etype734;
    + xfer += iprot->readListBegin(_etype734, _size731);
    + this->functions.resize(_size731);
    + uint32_t _i735;
    + for (_i735 = 0; _i735 < _size731; ++_i735)
                  {
    - xfer += this->functions[_i733].read(iprot);
    + xfer += this->functions[_i735].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -17519,10 +17610,10 @@ uint32_t GetAllFunctionsResponse::write(::apache::thrift::protocol::TProtocol* o
          xfer += oprot->writeFieldBegin("functions", ::apache::thrift::protocol::T_LIST, 1);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->functions.size()));
    - std::vector<Function> ::const_iterator _iter734;
    - for (_iter734 = this->functions.begin(); _iter734 != this->functions.end(); ++_iter734)
    + std::vector<Function> ::const_iterator _iter736;
    + for (_iter736 = this->functions.begin(); _iter736 != this->functions.end(); ++_iter736)
            {
    - xfer += (*_iter734).write(oprot);
    + xfer += (*_iter736).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -17539,13 +17630,13 @@ void swap(GetAllFunctionsResponse &a, GetAllFunctionsResponse &b) {
        swap(a.__isset, b.__isset);
      }

    -GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other735) {
    - functions = other735.functions;
    - __isset = other735.__isset;
    +GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other737) {
    + functions = other737.functions;
    + __isset = other737.__isset;
      }
    -GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other736) {
    - functions = other736.functions;
    - __isset = other736.__isset;
    +GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other738) {
    + functions = other738.functions;
    + __isset = other738.__isset;
        return *this;
      }
      void GetAllFunctionsResponse::printTo(std::ostream& out) const {
    @@ -17687,19 +17778,19 @@ void swap(TableMeta &a, TableMeta &b) {
        swap(a.__isset, b.__isset);
      }

    -TableMeta::TableMeta(const TableMeta& other737) {
    - dbName = other737.dbName;
    - tableName = other737.tableName;
    - tableType = other737.tableType;
    - comments = other737.comments;
    - __isset = other737.__isset;
    +TableMeta::TableMeta(const TableMeta& other739) {
    + dbName = other739.dbName;
    + tableName = other739.tableName;
    + tableType = other739.tableType;
    + comments = other739.comments;
    + __isset = other739.__isset;
      }
    -TableMeta& TableMeta::operator=(const TableMeta& other738) {
    - dbName = other738.dbName;
    - tableName = other738.tableName;
    - tableType = other738.tableType;
    - comments = other738.comments;
    - __isset = other738.__isset;
    +TableMeta& TableMeta::operator=(const TableMeta& other740) {
    + dbName = other740.dbName;
    + tableName = other740.tableName;
    + tableType = other740.tableType;
    + comments = other740.comments;
    + __isset = other740.__isset;
        return *this;
      }
      void TableMeta::printTo(std::ostream& out) const {
    @@ -17782,13 +17873,13 @@ void swap(MetaException &a, MetaException &b) {
        swap(a.__isset, b.__isset);
      }

    -MetaException::MetaException(const MetaException& other739) : TException() {
    - message = other739.message;
    - __isset = other739.__isset;
    +MetaException::MetaException(const MetaException& other741) : TException() {
    + message = other741.message;
    + __isset = other741.__isset;
      }
    -MetaException& MetaException::operator=(const MetaException& other740) {
    - message = other740.message;
    - __isset = other740.__isset;
    +MetaException& MetaException::operator=(const MetaException& other742) {
    + message = other742.message;
    + __isset = other742.__isset;
        return *this;
      }
      void MetaException::printTo(std::ostream& out) const {
    @@ -17879,13 +17970,13 @@ void swap(UnknownTableException &a, UnknownTableException &b) {
        swap(a.__isset, b.__isset);
      }

    -UnknownTableException::UnknownTableException(const UnknownTableException& other741) : TException() {
    - message = other741.message;
    - __isset = other741.__isset;
    +UnknownTableException::UnknownTableException(const UnknownTableException& other743) : TException() {
    + message = other743.message;
    + __isset = other743.__isset;
      }
    -UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other742) {
    - message = other742.message;
    - __isset = other742.__isset;
    +UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other744) {
    + message = other744.message;
    + __isset = other744.__isset;
        return *this;
      }
      void UnknownTableException::printTo(std::ostream& out) const {
    @@ -17976,13 +18067,13 @@ void swap(UnknownDBException &a, UnknownDBException &b) {
        swap(a.__isset, b.__isset);
      }

    -UnknownDBException::UnknownDBException(const UnknownDBException& other743) : TException() {
    - message = other743.message;
    - __isset = other743.__isset;
    +UnknownDBException::UnknownDBException(const UnknownDBException& other745) : TException() {
    + message = other745.message;
    + __isset = other745.__isset;
      }
    -UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other744) {
    - message = other744.message;
    - __isset = other744.__isset;
    +UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other746) {
    + message = other746.message;
    + __isset = other746.__isset;
        return *this;
      }
      void UnknownDBException::printTo(std::ostream& out) const {
    @@ -18073,13 +18164,13 @@ void swap(AlreadyExistsException &a, AlreadyExistsException &b) {
        swap(a.__isset, b.__isset);
      }

    -AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other745) : TException() {
    - message = other745.message;
    - __isset = other745.__isset;
    +AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other747) : TException() {
    + message = other747.message;
    + __isset = other747.__isset;
      }
    -AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other746) {
    - message = other746.message;
    - __isset = other746.__isset;
    +AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other748) {
    + message = other748.message;
    + __isset = other748.__isset;
        return *this;
      }
      void AlreadyExistsException::printTo(std::ostream& out) const {
    @@ -18170,13 +18261,13 @@ void swap(InvalidPartitionException &a, InvalidPartitionException &b) {
        swap(a.__isset, b.__isset);
      }

    -InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other747) : TException() {
    - message = other747.message;
    - __isset = other747.__isset;
    +InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other749) : TException() {
    + message = other749.message;
    + __isset = other749.__isset;
      }
    -InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other748) {
    - message = other748.message;
    - __isset = other748.__isset;
    +InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other750) {
    + message = other750.message;
    + __isset = other750.__isset;
        return *this;
      }
      void InvalidPartitionException::printTo(std::ostream& out) const {
    @@ -18267,13 +18358,13 @@ void swap(UnknownPartitionException &a, UnknownPartitionException &b) {
        swap(a.__isset, b.__isset);
      }

    -UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other749) : TException() {
    - message = other749.message;
    - __isset = other749.__isset;
    +UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other751) : TException() {
    + message = other751.message;
    + __isset = other751.__isset;
      }
    -UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other750) {
    - message = other750.message;
    - __isset = other750.__isset;
    +UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other752) {
    + message = other752.message;
    + __isset = other752.__isset;
        return *this;
      }
      void UnknownPartitionException::printTo(std::ostream& out) const {
    @@ -18364,13 +18455,13 @@ void swap(InvalidObjectException &a, InvalidObjectException &b) {
        swap(a.__isset, b.__isset);
      }

    -InvalidObjectException::InvalidObjectException(const InvalidObjectException& other751) : TException() {
    - message = other751.message;
    - __isset = other751.__isset;
    +InvalidObjectException::InvalidObjectException(const InvalidObjectException& other753) : TException() {
    + message = other753.message;
    + __isset = other753.__isset;
      }
    -InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other752) {
    - message = other752.message;
    - __isset = other752.__isset;
    +InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other754) {
    + message = other754.message;
    + __isset = other754.__isset;
        return *this;
      }
      void InvalidObjectException::printTo(std::ostream& out) const {
    @@ -18461,13 +18552,13 @@ void swap(NoSuchObjectException &a, NoSuchObjectException &b) {
        swap(a.__isset, b.__isset);
      }

    -NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other753) : TException() {
    - message = other753.message;
    - __isset = other753.__isset;
    +NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other755) : TException() {
    + message = other755.message;
    + __isset = other755.__isset;
      }
    -NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other754) {
    - message = other754.message;
    - __isset = other754.__isset;
    +NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other756) {
    + message = other756.message;
    + __isset = other756.__isset;
        return *this;
      }
      void NoSuchObjectException::printTo(std::ostream& out) const {
    @@ -18558,13 +18649,13 @@ void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b) {
        swap(a.__isset, b.__isset);
      }

    -IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other755) : TException() {
    - message = other755.message;
    - __isset = other755.__isset;
    +IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other757) : TException() {
    + message = other757.message;
    + __isset = other757.__isset;
      }
    -IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other756) {
    - message = other756.message;
    - __isset = other756.__isset;
    +IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other758) {
    + message = other758.message;
    + __isset = other758.__isset;
        return *this;
      }
      void IndexAlreadyExistsException::printTo(std::ostream& out) const {
    @@ -18655,13 +18746,13 @@ void swap(InvalidOperationException &a, InvalidOperationException &b) {
        swap(a.__isset, b.__isset);
      }

    -InvalidOperationException::InvalidOperationException(const InvalidOperationException& other757) : TException() {
    - message = other757.message;
    - __isset = other757.__isset;
    +InvalidOperationException::InvalidOperationException(const InvalidOperationException& other759) : TException() {
    + message = other759.message;
    + __isset = other759.__isset;
      }
    -InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other758) {
    - message = other758.message;
    - __isset = other758.__isset;
    +InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other760) {
    + message = other760.message;
    + __isset = other760.__isset;
        return *this;
      }
      void InvalidOperationException::printTo(std::ostream& out) const {
    @@ -18752,13 +18843,13 @@ void swap(ConfigValSecurityException &a, ConfigValSecurityException &b) {
        swap(a.__isset, b.__isset);
      }

    -ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other759) : TException() {
    - message = other759.message;
    - __isset = other759.__isset;
    +ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other761) : TException() {
    + message = other761.message;
    + __isset = other761.__isset;
      }
    -ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other760) {
    - message = other760.message;
    - __isset = other760.__isset;
    +ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other762) {
    + message = other762.message;
    + __isset = other762.__isset;
        return *this;
      }
      void ConfigValSecurityException::printTo(std::ostream& out) const {
    @@ -18849,13 +18940,13 @@ void swap(InvalidInputException &a, InvalidInputException &b) {
        swap(a.__isset, b.__isset);
      }

    -InvalidInputException::InvalidInputException(const InvalidInputException& other761) : TException() {
    - message = other761.message;
    - __isset = other761.__isset;
    +InvalidInputException::InvalidInputException(const InvalidInputException& other763) : TException() {
    + message = other763.message;
    + __isset = other763.__isset;
      }
    -InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other762) {
    - message = other762.message;
    - __isset = other762.__isset;
    +InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other764) {
    + message = other764.message;
    + __isset = other764.__isset;
        return *this;
      }
      void InvalidInputException::printTo(std::ostream& out) const {
    @@ -18946,13 +19037,13 @@ void swap(NoSuchTxnException &a, NoSuchTxnException &b) {
        swap(a.__isset, b.__isset);
      }

    -NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other763) : TException() {
    - message = other763.message;
    - __isset = other763.__isset;
    +NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other765) : TException() {
    + message = other765.message;
    + __isset = other765.__isset;
      }
    -NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other764) {
    - message = other764.message;
    - __isset = other764.__isset;
    +NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other766) {
    + message = other766.message;
    + __isset = other766.__isset;
        return *this;
      }
      void NoSuchTxnException::printTo(std::ostream& out) const {
    @@ -19043,13 +19134,13 @@ void swap(TxnAbortedException &a, TxnAbortedException &b) {
        swap(a.__isset, b.__isset);
      }

    -TxnAbortedException::TxnAbortedException(const TxnAbortedException& other765) : TException() {
    - message = other765.message;
    - __isset = other765.__isset;
    +TxnAbortedException::TxnAbortedException(const TxnAbortedException& other767) : TException() {
    + message = other767.message;
    + __isset = other767.__isset;
      }
    -TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other766) {
    - message = other766.message;
    - __isset = other766.__isset;
    +TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other768) {
    + message = other768.message;
    + __isset = other768.__isset;
        return *this;
      }
      void TxnAbortedException::printTo(std::ostream& out) const {
    @@ -19140,13 +19231,13 @@ void swap(TxnOpenException &a, TxnOpenException &b) {
        swap(a.__isset, b.__isset);
      }

    -TxnOpenException::TxnOpenException(const TxnOpenException& other767) : TException() {
    - message = other767.message;
    - __isset = other767.__isset;
    +TxnOpenException::TxnOpenException(const TxnOpenException& other769) : TException() {
    + message = other769.message;
    + __isset = other769.__isset;
      }
    -TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other768) {
    - message = other768.message;
    - __isset = other768.__isset;
    +TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other770) {
    + message = other770.message;
    + __isset = other770.__isset;
        return *this;
      }
      void TxnOpenException::printTo(std::ostream& out) const {
    @@ -19237,13 +19328,13 @@ void swap(NoSuchLockException &a, NoSuchLockException &b) {
        swap(a.__isset, b.__isset);
      }

    -NoSuchLockException::NoSuchLockException(const NoSuchLockException& other769) : TException() {
    - message = other769.message;
    - __isset = other769.__isset;
    +NoSuchLockException::NoSuchLockException(const NoSuchLockException& other771) : TException

    <TRUNCATED>
  • Ekoifman at May 19, 2016 at 7:29 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
    index 883f266..00f017b 100644
    --- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
    +++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
    @@ -109,6 +109,19 @@ struct GrantRevokeType {

      extern const std::map<int, const char*> _GrantRevokeType_VALUES_TO_NAMES;

    +struct DataOperationType {
    + enum type {
    + SELECT = 1,
    + INSERT = 2,
    + UPDATE = 3,
    + DELETE = 4,
    + UNSET = 5,
    + NO_TXN = 6
    + };
    +};
    +
    +extern const std::map<int, const char*> _DataOperationType_VALUES_TO_NAMES;
    +
      struct EventRequestType {
        enum type {
          INSERT = 1,
    @@ -5137,9 +5150,11 @@ inline std::ostream& operator<<(std::ostream& out, const CommitTxnRequest& obj)
      }

      typedef struct _LockComponent__isset {
    - _LockComponent__isset() : tablename(false), partitionname(false) {}
    + _LockComponent__isset() : tablename(false), partitionname(false), operationType(true), isAcid(true) {}
        bool tablename :1;
        bool partitionname :1;
    + bool operationType :1;
    + bool isAcid :1;
      } _LockComponent__isset;

      class LockComponent {
    @@ -5147,7 +5162,9 @@ class LockComponent {

        LockComponent(const LockComponent&);
        LockComponent& operator=(const LockComponent&);
    - LockComponent() : type((LockType::type)0), level((LockLevel::type)0), dbname(), tablename(), partitionname() {
    + LockComponent() : type((LockType::type)0), level((LockLevel::type)0), dbname(), tablename(), partitionname(), operationType((DataOperationType::type)5), isAcid(false) {
    + operationType = (DataOperationType::type)5;
    +
        }

        virtual ~LockComponent() throw();
    @@ -5156,6 +5173,8 @@ class LockComponent {
        std::string dbname;
        std::string tablename;
        std::string partitionname;
    + DataOperationType::type operationType;
    + bool isAcid;

        _LockComponent__isset __isset;

    @@ -5169,6 +5188,10 @@ class LockComponent {

        void __set_partitionname(const std::string& val);

    + void __set_operationType(const DataOperationType::type val);
    +
    + void __set_isAcid(const bool val);
    +
        bool operator == (const LockComponent & rhs) const
        {
          if (!(type == rhs.type))
    @@ -5185,6 +5208,14 @@ class LockComponent {
            return false;
          else if (__isset.partitionname && !(partitionname == rhs.partitionname))
            return false;
    + if (__isset.operationType != rhs.__isset.operationType)
    + return false;
    + else if (__isset.operationType && !(operationType == rhs.operationType))
    + return false;
    + if (__isset.isAcid != rhs.__isset.isAcid)
    + return false;
    + else if (__isset.isAcid && !(isAcid == rhs.isAcid))
    + return false;
          return true;
        }
        bool operator != (const LockComponent &rhs) const {
    @@ -6105,13 +6136,19 @@ inline std::ostream& operator<<(std::ostream& out, const ShowCompactResponse& ob
        return out;
      }

    +typedef struct _AddDynamicPartitions__isset {
    + _AddDynamicPartitions__isset() : operationType(true) {}
    + bool operationType :1;
    +} _AddDynamicPartitions__isset;

      class AddDynamicPartitions {
       public:

        AddDynamicPartitions(const AddDynamicPartitions&);
        AddDynamicPartitions& operator=(const AddDynamicPartitions&);
    - AddDynamicPartitions() : txnid(0), dbname(), tablename() {
    + AddDynamicPartitions() : txnid(0), dbname(), tablename(), operationType((DataOperationType::type)5) {
    + operationType = (DataOperationType::type)5;
    +
        }

        virtual ~AddDynamicPartitions() throw();
    @@ -6119,6 +6156,9 @@ class AddDynamicPartitions {
        std::string dbname;
        std::string tablename;
        std::vector<std::string> partitionnames;
    + DataOperationType::type operationType;
    +
    + _AddDynamicPartitions__isset __isset;

        void __set_txnid(const int64_t val);

    @@ -6128,6 +6168,8 @@ class AddDynamicPartitions {

        void __set_partitionnames(const std::vector<std::string> & val);

    + void __set_operationType(const DataOperationType::type val);
    +
        bool operator == (const AddDynamicPartitions & rhs) const
        {
          if (!(txnid == rhs.txnid))
    @@ -6138,6 +6180,10 @@ class AddDynamicPartitions {
            return false;
          if (!(partitionnames == rhs.partitionnames))
            return false;
    + if (__isset.operationType != rhs.__isset.operationType)
    + return false;
    + else if (__isset.operationType && !(operationType == rhs.operationType))
    + return false;
          return true;
        }
        bool operator != (const AddDynamicPartitions &rhs) const {

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
    index 544eff1..734a6df 100644
    --- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
    +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
    @@ -42,6 +42,7 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
        private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)2);
        private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)3);
        private static final org.apache.thrift.protocol.TField PARTITIONNAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionnames", org.apache.thrift.protocol.TType.LIST, (short)4);
    + private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)5);

        private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
        static {
    @@ -53,13 +54,19 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
        private String dbname; // required
        private String tablename; // required
        private List<String> partitionnames; // required
    + private DataOperationType operationType; // optional

        /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
        public enum _Fields implements org.apache.thrift.TFieldIdEnum {
          TXNID((short)1, "txnid"),
          DBNAME((short)2, "dbname"),
          TABLENAME((short)3, "tablename"),
    - PARTITIONNAMES((short)4, "partitionnames");
    + PARTITIONNAMES((short)4, "partitionnames"),
    + /**
    + *
    + * @see DataOperationType
    + */
    + OPERATION_TYPE((short)5, "operationType");

          private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    @@ -82,6 +89,8 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
                return TABLENAME;
              case 4: // PARTITIONNAMES
                return PARTITIONNAMES;
    + case 5: // OPERATION_TYPE
    + return OPERATION_TYPE;
              default:
                return null;
            }
    @@ -124,6 +133,7 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
        // isset id assignments
        private static final int __TXNID_ISSET_ID = 0;
        private byte __isset_bitfield = 0;
    + private static final _Fields optionals[] = {_Fields.OPERATION_TYPE};
        public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
        static {
          Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    @@ -136,11 +146,15 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          tmpMap.put(_Fields.PARTITIONNAMES, new org.apache.thrift.meta_data.FieldMetaData("partitionnames", org.apache.thrift.TFieldRequirementType.REQUIRED,
              new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
                  new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    + tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
    + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataOperationType.class)));
          metaDataMap = Collections.unmodifiableMap(tmpMap);
          org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddDynamicPartitions.class, metaDataMap);
        }

        public AddDynamicPartitions() {
    + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET;
    +
        }

        public AddDynamicPartitions(
    @@ -173,6 +187,9 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
            List<String> __this__partitionnames = new ArrayList<String>(other.partitionnames);
            this.partitionnames = __this__partitionnames;
          }
    + if (other.isSetOperationType()) {
    + this.operationType = other.operationType;
    + }
        }

        public AddDynamicPartitions deepCopy() {
    @@ -186,6 +203,8 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          this.dbname = null;
          this.tablename = null;
          this.partitionnames = null;
    + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET;
    +
        }

        public long getTxnid() {
    @@ -294,6 +313,37 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          }
        }

    + /**
    + *
    + * @see DataOperationType
    + */
    + public DataOperationType getOperationType() {
    + return this.operationType;
    + }
    +
    + /**
    + *
    + * @see DataOperationType
    + */
    + public void setOperationType(DataOperationType operationType) {
    + this.operationType = operationType;
    + }
    +
    + public void unsetOperationType() {
    + this.operationType = null;
    + }
    +
    + /** Returns true if field operationType is set (has been assigned a value) and false otherwise */
    + public boolean isSetOperationType() {
    + return this.operationType != null;
    + }
    +
    + public void setOperationTypeIsSet(boolean value) {
    + if (!value) {
    + this.operationType = null;
    + }
    + }
    +
        public void setFieldValue(_Fields field, Object value) {
          switch (field) {
          case TXNID:
    @@ -328,6 +378,14 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
            }
            break;

    + case OPERATION_TYPE:
    + if (value == null) {
    + unsetOperationType();
    + } else {
    + setOperationType((DataOperationType)value);
    + }
    + break;
    +
          }
        }

    @@ -345,6 +403,9 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          case PARTITIONNAMES:
            return getPartitionnames();

    + case OPERATION_TYPE:
    + return getOperationType();
    +
          }
          throw new IllegalStateException();
        }
    @@ -364,6 +425,8 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
            return isSetTablename();
          case PARTITIONNAMES:
            return isSetPartitionnames();
    + case OPERATION_TYPE:
    + return isSetOperationType();
          }
          throw new IllegalStateException();
        }
    @@ -417,6 +480,15 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
              return false;
          }

    + boolean this_present_operationType = true && this.isSetOperationType();
    + boolean that_present_operationType = true && that.isSetOperationType();
    + if (this_present_operationType || that_present_operationType) {
    + if (!(this_present_operationType && that_present_operationType))
    + return false;
    + if (!this.operationType.equals(that.operationType))
    + return false;
    + }
    +
          return true;
        }

    @@ -444,6 +516,11 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          if (present_partitionnames)
            list.add(partitionnames);

    + boolean present_operationType = true && (isSetOperationType());
    + list.add(present_operationType);
    + if (present_operationType)
    + list.add(operationType.getValue());
    +
          return list.hashCode();
        }

    @@ -495,6 +572,16 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
              return lastComparison;
            }
          }
    + lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType());
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + if (isSetOperationType()) {
    + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType);
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + }
          return 0;
        }

    @@ -542,6 +629,16 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
            sb.append(this.partitionnames);
          }
          first = false;
    + if (isSetOperationType()) {
    + if (!first) sb.append(", ");
    + sb.append("operationType:");
    + if (this.operationType == null) {
    + sb.append("null");
    + } else {
    + sb.append(this.operationType);
    + }
    + first = false;
    + }
          sb.append(")");
          return sb.toString();
        }
    @@ -645,6 +742,14 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
                    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                  }
                  break;
    + case 5: // OPERATION_TYPE
    + if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
    + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
    + struct.setOperationTypeIsSet(true);
    + } else {
    + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    + }
    + break;
                default:
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
    @@ -683,6 +788,13 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
              }
              oprot.writeFieldEnd();
            }
    + if (struct.operationType != null) {
    + if (struct.isSetOperationType()) {
    + oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC);
    + oprot.writeI32(struct.operationType.getValue());
    + oprot.writeFieldEnd();
    + }
    + }
            oprot.writeFieldStop();
            oprot.writeStructEnd();
          }
    @@ -710,6 +822,14 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
                oprot.writeString(_iter536);
              }
            }
    + BitSet optionals = new BitSet();
    + if (struct.isSetOperationType()) {
    + optionals.set(0);
    + }
    + oprot.writeBitSet(optionals, 1);
    + if (struct.isSetOperationType()) {
    + oprot.writeI32(struct.operationType.getValue());
    + }
          }

          @Override
    @@ -732,6 +852,11 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
              }
            }
            struct.setPartitionnamesIsSet(true);
    + BitSet incoming = iprot.readBitSet(1);
    + if (incoming.get(0)) {
    + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
    + struct.setOperationTypeIsSet(true);
    + }
          }
        }


    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java
    new file mode 100644
    index 0000000..15a6e9a
    --- /dev/null
    +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java
    @@ -0,0 +1,57 @@
    +/**
    + * Autogenerated by Thrift Compiler (0.9.3)
    + *
    + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
    + * @generated
    + */
    +package org.apache.hadoop.hive.metastore.api;
    +
    +
    +import java.util.Map;
    +import java.util.HashMap;
    +import org.apache.thrift.TEnum;
    +
    +public enum DataOperationType implements org.apache.thrift.TEnum {
    + SELECT(1),
    + INSERT(2),
    + UPDATE(3),
    + DELETE(4),
    + UNSET(5),
    + NO_TXN(6);
    +
    + private final int value;
    +
    + private DataOperationType(int value) {
    + this.value = value;
    + }
    +
    + /**
    + * Get the integer value of this enum value, as defined in the Thrift IDL.
    + */
    + public int getValue() {
    + return value;
    + }
    +
    + /**
    + * Find a the enum type by its integer value, as defined in the Thrift IDL.
    + * @return null if the value is not found.
    + */
    + public static DataOperationType findByValue(int value) {
    + switch (value) {
    + case 1:
    + return SELECT;
    + case 2:
    + return INSERT;
    + case 3:
    + return UPDATE;
    + case 4:
    + return DELETE;
    + case 5:
    + return UNSET;
    + case 6:
    + return NO_TXN;
    + default:
    + return null;
    + }
    + }
    +}

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
    index adb0c44..26d1b76 100644
    --- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
    +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
    @@ -43,6 +43,8 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
        private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)3);
        private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)4);
        private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)5);
    + private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)6);
    + private static final org.apache.thrift.protocol.TField IS_ACID_FIELD_DESC = new org.apache.thrift.protocol.TField("isAcid", org.apache.thrift.protocol.TType.BOOL, (short)7);

        private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
        static {
    @@ -55,6 +57,8 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
        private String dbname; // required
        private String tablename; // optional
        private String partitionname; // optional
    + private DataOperationType operationType; // optional
    + private boolean isAcid; // optional

        /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
        public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    @@ -70,7 +74,13 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          LEVEL((short)2, "level"),
          DBNAME((short)3, "dbname"),
          TABLENAME((short)4, "tablename"),
    - PARTITIONNAME((short)5, "partitionname");
    + PARTITIONNAME((short)5, "partitionname"),
    + /**
    + *
    + * @see DataOperationType
    + */
    + OPERATION_TYPE((short)6, "operationType"),
    + IS_ACID((short)7, "isAcid");

          private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    @@ -95,6 +105,10 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
                return TABLENAME;
              case 5: // PARTITIONNAME
                return PARTITIONNAME;
    + case 6: // OPERATION_TYPE
    + return OPERATION_TYPE;
    + case 7: // IS_ACID
    + return IS_ACID;
              default:
                return null;
            }
    @@ -135,7 +149,9 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
        }

        // isset id assignments
    - private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTITIONNAME};
    + private static final int __ISACID_ISSET_ID = 0;
    + private byte __isset_bitfield = 0;
    + private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTITIONNAME,_Fields.OPERATION_TYPE,_Fields.IS_ACID};
        public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
        static {
          Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    @@ -149,11 +165,19 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
          tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL,
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    + tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
    + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataOperationType.class)));
    + tmpMap.put(_Fields.IS_ACID, new org.apache.thrift.meta_data.FieldMetaData("isAcid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
    + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
          metaDataMap = Collections.unmodifiableMap(tmpMap);
          org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockComponent.class, metaDataMap);
        }

        public LockComponent() {
    + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET;
    +
    + this.isAcid = false;
    +
        }

        public LockComponent(
    @@ -171,6 +195,7 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
         * Performs a deep copy on <i>other</i>.
         */
        public LockComponent(LockComponent other) {
    + __isset_bitfield = other.__isset_bitfield;
          if (other.isSetType()) {
            this.type = other.type;
          }
    @@ -186,6 +211,10 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          if (other.isSetPartitionname()) {
            this.partitionname = other.partitionname;
          }
    + if (other.isSetOperationType()) {
    + this.operationType = other.operationType;
    + }
    + this.isAcid = other.isAcid;
        }

        public LockComponent deepCopy() {
    @@ -199,6 +228,10 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          this.dbname = null;
          this.tablename = null;
          this.partitionname = null;
    + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET;
    +
    + this.isAcid = false;
    +
        }

        /**
    @@ -332,6 +365,59 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          }
        }

    + /**
    + *
    + * @see DataOperationType
    + */
    + public DataOperationType getOperationType() {
    + return this.operationType;
    + }
    +
    + /**
    + *
    + * @see DataOperationType
    + */
    + public void setOperationType(DataOperationType operationType) {
    + this.operationType = operationType;
    + }
    +
    + public void unsetOperationType() {
    + this.operationType = null;
    + }
    +
    + /** Returns true if field operationType is set (has been assigned a value) and false otherwise */
    + public boolean isSetOperationType() {
    + return this.operationType != null;
    + }
    +
    + public void setOperationTypeIsSet(boolean value) {
    + if (!value) {
    + this.operationType = null;
    + }
    + }
    +
    + public boolean isIsAcid() {
    + return this.isAcid;
    + }
    +
    + public void setIsAcid(boolean isAcid) {
    + this.isAcid = isAcid;
    + setIsAcidIsSet(true);
    + }
    +
    + public void unsetIsAcid() {
    + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACID_ISSET_ID);
    + }
    +
    + /** Returns true if field isAcid is set (has been assigned a value) and false otherwise */
    + public boolean isSetIsAcid() {
    + return EncodingUtils.testBit(__isset_bitfield, __ISACID_ISSET_ID);
    + }
    +
    + public void setIsAcidIsSet(boolean value) {
    + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACID_ISSET_ID, value);
    + }
    +
        public void setFieldValue(_Fields field, Object value) {
          switch (field) {
          case TYPE:
    @@ -374,6 +460,22 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            }
            break;

    + case OPERATION_TYPE:
    + if (value == null) {
    + unsetOperationType();
    + } else {
    + setOperationType((DataOperationType)value);
    + }
    + break;
    +
    + case IS_ACID:
    + if (value == null) {
    + unsetIsAcid();
    + } else {
    + setIsAcid((Boolean)value);
    + }
    + break;
    +
          }
        }

    @@ -394,6 +496,12 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          case PARTITIONNAME:
            return getPartitionname();

    + case OPERATION_TYPE:
    + return getOperationType();
    +
    + case IS_ACID:
    + return isIsAcid();
    +
          }
          throw new IllegalStateException();
        }
    @@ -415,6 +523,10 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            return isSetTablename();
          case PARTITIONNAME:
            return isSetPartitionname();
    + case OPERATION_TYPE:
    + return isSetOperationType();
    + case IS_ACID:
    + return isSetIsAcid();
          }
          throw new IllegalStateException();
        }
    @@ -477,6 +589,24 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
              return false;
          }

    + boolean this_present_operationType = true && this.isSetOperationType();
    + boolean that_present_operationType = true && that.isSetOperationType();
    + if (this_present_operationType || that_present_operationType) {
    + if (!(this_present_operationType && that_present_operationType))
    + return false;
    + if (!this.operationType.equals(that.operationType))
    + return false;
    + }
    +
    + boolean this_present_isAcid = true && this.isSetIsAcid();
    + boolean that_present_isAcid = true && that.isSetIsAcid();
    + if (this_present_isAcid || that_present_isAcid) {
    + if (!(this_present_isAcid && that_present_isAcid))
    + return false;
    + if (this.isAcid != that.isAcid)
    + return false;
    + }
    +
          return true;
        }

    @@ -509,6 +639,16 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          if (present_partitionname)
            list.add(partitionname);

    + boolean present_operationType = true && (isSetOperationType());
    + list.add(present_operationType);
    + if (present_operationType)
    + list.add(operationType.getValue());
    +
    + boolean present_isAcid = true && (isSetIsAcid());
    + list.add(present_isAcid);
    + if (present_isAcid)
    + list.add(isAcid);
    +
          return list.hashCode();
        }

    @@ -570,6 +710,26 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
              return lastComparison;
            }
          }
    + lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType());
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + if (isSetOperationType()) {
    + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType);
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + }
    + lastComparison = Boolean.valueOf(isSetIsAcid()).compareTo(other.isSetIsAcid());
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + if (isSetIsAcid()) {
    + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAcid, other.isAcid);
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + }
          return 0;
        }

    @@ -633,6 +793,22 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            }
            first = false;
          }
    + if (isSetOperationType()) {
    + if (!first) sb.append(", ");
    + sb.append("operationType:");
    + if (this.operationType == null) {
    + sb.append("null");
    + } else {
    + sb.append(this.operationType);
    + }
    + first = false;
    + }
    + if (isSetIsAcid()) {
    + if (!first) sb.append(", ");
    + sb.append("isAcid:");
    + sb.append(this.isAcid);
    + first = false;
    + }
          sb.append(")");
          return sb.toString();
        }
    @@ -664,6 +840,8 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc

        private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
          try {
    + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
    + __isset_bitfield = 0;
            read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
          } catch (org.apache.thrift.TException te) {
            throw new java.io.IOException(te);
    @@ -728,6 +906,22 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
                    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                  }
                  break;
    + case 6: // OPERATION_TYPE
    + if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
    + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
    + struct.setOperationTypeIsSet(true);
    + } else {
    + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    + }
    + break;
    + case 7: // IS_ACID
    + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
    + struct.isAcid = iprot.readBool();
    + struct.setIsAcidIsSet(true);
    + } else {
    + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    + }
    + break;
                default:
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
    @@ -770,6 +964,18 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
                oprot.writeFieldEnd();
              }
            }
    + if (struct.operationType != null) {
    + if (struct.isSetOperationType()) {
    + oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC);
    + oprot.writeI32(struct.operationType.getValue());
    + oprot.writeFieldEnd();
    + }
    + }
    + if (struct.isSetIsAcid()) {
    + oprot.writeFieldBegin(IS_ACID_FIELD_DESC);
    + oprot.writeBool(struct.isAcid);
    + oprot.writeFieldEnd();
    + }
            oprot.writeFieldStop();
            oprot.writeStructEnd();
          }
    @@ -797,13 +1003,25 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            if (struct.isSetPartitionname()) {
              optionals.set(1);
            }
    - oprot.writeBitSet(optionals, 2);
    + if (struct.isSetOperationType()) {
    + optionals.set(2);
    + }
    + if (struct.isSetIsAcid()) {
    + optionals.set(3);
    + }
    + oprot.writeBitSet(optionals, 4);
            if (struct.isSetTablename()) {
              oprot.writeString(struct.tablename);
            }
            if (struct.isSetPartitionname()) {
              oprot.writeString(struct.partitionname);
            }
    + if (struct.isSetOperationType()) {
    + oprot.writeI32(struct.operationType.getValue());
    + }
    + if (struct.isSetIsAcid()) {
    + oprot.writeBool(struct.isAcid);
    + }
          }

          @Override
    @@ -815,7 +1033,7 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            struct.setLevelIsSet(true);
            struct.dbname = iprot.readString();
            struct.setDbnameIsSet(true);
    - BitSet incoming = iprot.readBitSet(2);
    + BitSet incoming = iprot.readBitSet(4);
            if (incoming.get(0)) {
              struct.tablename = iprot.readString();
              struct.setTablenameIsSet(true);
    @@ -824,6 +1042,14 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
              struct.partitionname = iprot.readString();
              struct.setPartitionnameIsSet(true);
            }
    + if (incoming.get(2)) {
    + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
    + struct.setOperationTypeIsSet(true);
    + }
    + if (incoming.get(3)) {
    + struct.isAcid = iprot.readBool();
    + struct.setIsAcidIsSet(true);
    + }
          }
        }


    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-php/metastore/Types.php
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-php/metastore/Types.php b/metastore/src/gen/thrift/gen-php/metastore/Types.php
    index 189894d..5aef35c 100644
    --- a/metastore/src/gen/thrift/gen-php/metastore/Types.php
    +++ b/metastore/src/gen/thrift/gen-php/metastore/Types.php
    @@ -114,6 +114,23 @@ final class GrantRevokeType {
        );
      }

    +final class DataOperationType {
    + const SELECT = 1;
    + const INSERT = 2;
    + const UPDATE = 3;
    + const DELETE = 4;
    + const UNSET = 5;
    + const NO_TXN = 6;
    + static public $__names = array(
    + 1 => 'SELECT',
    + 2 => 'INSERT',
    + 3 => 'UPDATE',
    + 4 => 'DELETE',
    + 5 => 'UNSET',
    + 6 => 'NO_TXN',
    + );
    +}
    +
      final class EventRequestType {
        const INSERT = 1;
        const UPDATE = 2;
    @@ -12625,6 +12642,14 @@ class LockComponent {
         * @var string
         */
        public $partitionname = null;
    + /**
    + * @var int
    + */
    + public $operationType = 5;
    + /**
    + * @var bool
    + */
    + public $isAcid = false;

        public function __construct($vals=null) {
          if (!isset(self::$_TSPEC)) {
    @@ -12649,6 +12674,14 @@ class LockComponent {
                'var' => 'partitionname',
                'type' => TType::STRING,
                ),
    + 6 => array(
    + 'var' => 'operationType',
    + 'type' => TType::I32,
    + ),
    + 7 => array(
    + 'var' => 'isAcid',
    + 'type' => TType::BOOL,
    + ),
              );
          }
          if (is_array($vals)) {
    @@ -12667,6 +12700,12 @@ class LockComponent {
            if (isset($vals['partitionname'])) {
              $this->partitionname = $vals['partitionname'];
            }
    + if (isset($vals['operationType'])) {
    + $this->operationType = $vals['operationType'];
    + }
    + if (isset($vals['isAcid'])) {
    + $this->isAcid = $vals['isAcid'];
    + }
          }
        }

    @@ -12724,6 +12763,20 @@ class LockComponent {
                  $xfer += $input->skip($ftype);
                }
                break;
    + case 6:
    + if ($ftype == TType::I32) {
    + $xfer += $input->readI32($this->operationType);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + case 7:
    + if ($ftype == TType::BOOL) {
    + $xfer += $input->readBool($this->isAcid);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
              default:
                $xfer += $input->skip($ftype);
                break;
    @@ -12762,6 +12815,16 @@ class LockComponent {
            $xfer += $output->writeString($this->partitionname);
            $xfer += $output->writeFieldEnd();
          }
    + if ($this->operationType !== null) {
    + $xfer += $output->writeFieldBegin('operationType', TType::I32, 6);
    + $xfer += $output->writeI32($this->operationType);
    + $xfer += $output->writeFieldEnd();
    + }
    + if ($this->isAcid !== null) {
    + $xfer += $output->writeFieldBegin('isAcid', TType::BOOL, 7);
    + $xfer += $output->writeBool($this->isAcid);
    + $xfer += $output->writeFieldEnd();
    + }
          $xfer += $output->writeFieldStop();
          $xfer += $output->writeStructEnd();
          return $xfer;
    @@ -14954,6 +15017,10 @@ class AddDynamicPartitions {
         * @var string[]
         */
        public $partitionnames = null;
    + /**
    + * @var int
    + */
    + public $operationType = 5;

        public function __construct($vals=null) {
          if (!isset(self::$_TSPEC)) {
    @@ -14978,6 +15045,10 @@ class AddDynamicPartitions {
                  'type' => TType::STRING,
                  ),
                ),
    + 5 => array(
    + 'var' => 'operationType',
    + 'type' => TType::I32,
    + ),
              );
          }
          if (is_array($vals)) {
    @@ -14993,6 +15064,9 @@ class AddDynamicPartitions {
            if (isset($vals['partitionnames'])) {
              $this->partitionnames = $vals['partitionnames'];
            }
    + if (isset($vals['operationType'])) {
    + $this->operationType = $vals['operationType'];
    + }
          }
        }

    @@ -15053,6 +15127,13 @@ class AddDynamicPartitions {
                  $xfer += $input->skip($ftype);
                }
                break;
    + case 5:
    + if ($ftype == TType::I32) {
    + $xfer += $input->readI32($this->operationType);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
              default:
                $xfer += $input->skip($ftype);
                break;
    @@ -15098,6 +15179,11 @@ class AddDynamicPartitions {
            }
            $xfer += $output->writeFieldEnd();
          }
    + if ($this->operationType !== null) {
    + $xfer += $output->writeFieldBegin('operationType', TType::I32, 5);
    + $xfer += $output->writeI32($this->operationType);
    + $xfer += $output->writeFieldEnd();
    + }
          $xfer += $output->writeFieldStop();
          $xfer += $output->writeStructEnd();
          return $xfer;

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
    index 6366a81..4db9680 100644
    --- a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
    +++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
    @@ -168,6 +168,32 @@ class GrantRevokeType:
          "REVOKE": 2,
        }

    +class DataOperationType:
    + SELECT = 1
    + INSERT = 2
    + UPDATE = 3
    + DELETE = 4
    + UNSET = 5
    + NO_TXN = 6
    +
    + _VALUES_TO_NAMES = {
    + 1: "SELECT",
    + 2: "INSERT",
    + 3: "UPDATE",
    + 4: "DELETE",
    + 5: "UNSET",
    + 6: "NO_TXN",
    + }
    +
    + _NAMES_TO_VALUES = {
    + "SELECT": 1,
    + "INSERT": 2,
    + "UPDATE": 3,
    + "DELETE": 4,
    + "UNSET": 5,
    + "NO_TXN": 6,
    + }
    +
      class EventRequestType:
        INSERT = 1
        UPDATE = 2
    @@ -8725,6 +8751,8 @@ class LockComponent:
         - dbname
         - tablename
         - partitionname
    + - operationType
    + - isAcid
        """

        thrift_spec = (
    @@ -8734,14 +8762,18 @@ class LockComponent:
          (3, TType.STRING, 'dbname', None, None, ), # 3
          (4, TType.STRING, 'tablename', None, None, ), # 4
          (5, TType.STRING, 'partitionname', None, None, ), # 5
    + (6, TType.I32, 'operationType', None, 5, ), # 6
    + (7, TType.BOOL, 'isAcid', None, False, ), # 7
        )

    - def __init__(self, type=None, level=None, dbname=None, tablename=None, partitionname=None,):
    + def __init__(self, type=None, level=None, dbname=None, tablename=None, partitionname=None, operationType=thrift_spec[6][4], isAcid=thrift_spec[7][4],):
          self.type = type
          self.level = level
          self.dbname = dbname
          self.tablename = tablename
          self.partitionname = partitionname
    + self.operationType = operationType
    + self.isAcid = isAcid

        def read(self, iprot):
          if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    @@ -8777,6 +8809,16 @@ class LockComponent:
                self.partitionname = iprot.readString()
              else:
                iprot.skip(ftype)
    + elif fid == 6:
    + if ftype == TType.I32:
    + self.operationType = iprot.readI32()
    + else:
    + iprot.skip(ftype)
    + elif fid == 7:
    + if ftype == TType.BOOL:
    + self.isAcid = iprot.readBool()
    + else:
    + iprot.skip(ftype)
            else:
              iprot.skip(ftype)
            iprot.readFieldEnd()
    @@ -8807,6 +8849,14 @@ class LockComponent:
            oprot.writeFieldBegin('partitionname', TType.STRING, 5)
            oprot.writeString(self.partitionname)
            oprot.writeFieldEnd()
    + if self.operationType is not None:
    + oprot.writeFieldBegin('operationType', TType.I32, 6)
    + oprot.writeI32(self.operationType)
    + oprot.writeFieldEnd()
    + if self.isAcid is not None:
    + oprot.writeFieldBegin('isAcid', TType.BOOL, 7)
    + oprot.writeBool(self.isAcid)
    + oprot.writeFieldEnd()
          oprot.writeFieldStop()
          oprot.writeStructEnd()

    @@ -8827,6 +8877,8 @@ class LockComponent:
          value = (value * 31) ^ hash(self.dbname)
          value = (value * 31) ^ hash(self.tablename)
          value = (value * 31) ^ hash(self.partitionname)
    + value = (value * 31) ^ hash(self.operationType)
    + value = (value * 31) ^ hash(self.isAcid)
          return value

        def __repr__(self):
    @@ -10392,6 +10444,7 @@ class AddDynamicPartitions:
         - dbname
         - tablename
         - partitionnames
    + - operationType
        """

        thrift_spec = (
    @@ -10400,13 +10453,15 @@ class AddDynamicPartitions:
          (2, TType.STRING, 'dbname', None, None, ), # 2
          (3, TType.STRING, 'tablename', None, None, ), # 3
          (4, TType.LIST, 'partitionnames', (TType.STRING,None), None, ), # 4
    + (5, TType.I32, 'operationType', None, 5, ), # 5
        )

    - def __init__(self, txnid=None, dbname=None, tablename=None, partitionnames=None,):
    + def __init__(self, txnid=None, dbname=None, tablename=None, partitionnames=None, operationType=thrift_spec[5][4],):
          self.txnid = txnid
          self.dbname = dbname
          self.tablename = tablename
          self.partitionnames = partitionnames
    + self.operationType = operationType

        def read(self, iprot):
          if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    @@ -10442,6 +10497,11 @@ class AddDynamicPartitions:
                iprot.readListEnd()
              else:
                iprot.skip(ftype)
    + elif fid == 5:
    + if ftype == TType.I32:
    + self.operationType = iprot.readI32()
    + else:
    + iprot.skip(ftype)
            else:
              iprot.skip(ftype)
            iprot.readFieldEnd()
    @@ -10471,6 +10531,10 @@ class AddDynamicPartitions:
              oprot.writeString(iter475)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
    + if self.operationType is not None:
    + oprot.writeFieldBegin('operationType', TType.I32, 5)
    + oprot.writeI32(self.operationType)
    + oprot.writeFieldEnd()
          oprot.writeFieldStop()
          oprot.writeStructEnd()

    @@ -10492,6 +10556,7 @@ class AddDynamicPartitions:
          value = (value * 31) ^ hash(self.dbname)
          value = (value * 31) ^ hash(self.tablename)
          value = (value * 31) ^ hash(self.partitionnames)
    + value = (value * 31) ^ hash(self.operationType)
          return value

        def __repr__(self):

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb b/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
    index e8d60d7..c7e7cb4 100644
    --- a/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
    +++ b/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
    @@ -79,6 +79,17 @@ module GrantRevokeType
        VALID_VALUES = Set.new([GRANT, REVOKE]).freeze
      end

    +module DataOperationType
    + SELECT = 1
    + INSERT = 2
    + UPDATE = 3
    + DELETE = 4
    + UNSET = 5
    + NO_TXN = 6
    + VALUE_MAP = {1 => "SELECT", 2 => "INSERT", 3 => "UPDATE", 4 => "DELETE", 5 => "UNSET", 6 => "NO_TXN"}
    + VALID_VALUES = Set.new([SELECT, INSERT, UPDATE, DELETE, UNSET, NO_TXN]).freeze
    +end
    +
      module EventRequestType
        INSERT = 1
        UPDATE = 2
    @@ -1948,13 +1959,17 @@ class LockComponent
        DBNAME = 3
        TABLENAME = 4
        PARTITIONNAME = 5
    + OPERATIONTYPE = 6
    + ISACID = 7

        FIELDS = {
          TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::LockType},
          LEVEL => {:type => ::Thrift::Types::I32, :name => 'level', :enum_class => ::LockLevel},
          DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
          TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true},
    - PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}
    + PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true},
    + OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default => 5, :optional => true, :enum_class => ::DataOperationType},
    + ISACID => {:type => ::Thrift::Types::BOOL, :name => 'isAcid', :default => false, :optional => true}
        }

        def struct_fields; FIELDS; end
    @@ -1969,6 +1984,9 @@ class LockComponent
          unless @level.nil? || ::LockLevel::VALID_VALUES.include?(@level)
            raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field level!')
          end
    + unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType)
    + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!')
    + end
        end

        ::Thrift::Struct.generate_accessors self
    @@ -2330,12 +2348,14 @@ class AddDynamicPartitions
        DBNAME = 2
        TABLENAME = 3
        PARTITIONNAMES = 4
    + OPERATIONTYPE = 5

        FIELDS = {
          TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'},
          DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
          TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
    - PARTITIONNAMES => {:type => ::Thrift::Types::LIST, :name => 'partitionnames', :element => {:type => ::Thrift::Types::STRING}}
    + PARTITIONNAMES => {:type => ::Thrift::Types::LIST, :name => 'partitionnames', :element => {:type => ::Thrift::Types::STRING}},
    + OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default => 5, :optional => true, :enum_class => ::DataOperationType}
        }

        def struct_fields; FIELDS; end
    @@ -2345,6 +2365,9 @@ class AddDynamicPartitions
          raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
          raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename
          raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitionnames is unset!') unless @partitionnames
    + unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType)
    + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!')
    + end
        end

        ::Thrift::Struct.generate_accessors self

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    index 2e83ee0..7d5ddee 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    @@ -46,6 +46,7 @@ import org.apache.hadoop.hive.metastore.api.CompactionRequest;
      import org.apache.hadoop.hive.metastore.api.CompactionType;
      import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException;
      import org.apache.hadoop.hive.metastore.api.CurrentNotificationEventId;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.Database;
      import org.apache.hadoop.hive.metastore.api.DropConstraintRequest;
      import org.apache.hadoop.hive.metastore.api.DropPartitionsExpr;
    @@ -2161,10 +2162,18 @@ public class HiveMetaStoreClient implements IMetaStoreClient {
          return client.show_compact(new ShowCompactRequest());
        }

    + @Deprecated
        @Override
        public void addDynamicPartitions(long txnId, String dbName, String tableName,
                                         List<String> partNames) throws TException {
          client.add_dynamic_partitions(new AddDynamicPartitions(txnId, dbName, tableName, partNames));
    + }
    + @Override
    + public void addDynamicPartitions(long txnId, String dbName, String tableName,
    + List<String> partNames, DataOperationType operationType) throws TException {
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnId, dbName, tableName, partNames);
    + adp.setOperationType(operationType);
    + client.add_dynamic_partitions(adp);
        }

        @InterfaceAudience.LimitedPrivate({"HCatalog"})

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    index f6ec596..06a1b58 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    @@ -32,6 +32,7 @@ import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj;
      import org.apache.hadoop.hive.metastore.api.CompactionType;
      import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException;
      import org.apache.hadoop.hive.metastore.api.CurrentNotificationEventId;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.Database;
      import org.apache.hadoop.hive.metastore.api.EnvironmentContext;
      import org.apache.hadoop.hive.metastore.api.FieldSchema;
    @@ -1447,6 +1448,12 @@ public interface IMetaStoreClient {
        ShowCompactResponse showCompactions() throws TException;

        /**
    + * @deprecated in Hive 1.3.0/2.1.0 - will be removed in 2 releases
    + */
    + @Deprecated
    + void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames)
    + throws TException;
    + /**
         * Send a list of partitions to the metastore to indicate which partitions were loaded
         * dynamically.
         * @param txnId id of the transaction
    @@ -1455,7 +1462,8 @@ public interface IMetaStoreClient {
         * @param partNames partition name, as constructed by Warehouse.makePartName
         * @throws TException
         */
    - void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames)
    + void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames,
    + DataOperationType operationType)
          throws TException;

        /**

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java b/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java
    index acd4653..3e8f193 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java
    @@ -17,6 +17,7 @@
       */
      package org.apache.hadoop.hive.metastore;

    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.LockComponent;
      import org.apache.hadoop.hive.metastore.api.LockLevel;
      import org.apache.hadoop.hive.metastore.api.LockType;
    @@ -70,7 +71,16 @@ public class LockComponentBuilder {
          component.setDbname(dbName);
          return this;
        }
    +
    + public LockComponentBuilder setOperationType(DataOperationType dop) {
    + component.setOperationType(dop);
    + return this;
    + }

    + public LockComponentBuilder setIsAcid(boolean t) {
    + component.setIsAcid(t);
    + return this;
    + }
        /**
         * Set the table name.
         * @param tableName table name

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java b/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
    index 2fa7e07..6317a96 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
    @@ -35,10 +35,19 @@ public class LockRequestBuilder {
        private LockTrie trie;
        private boolean userSet;

    + /**
    + * @deprecated
    + */
        public LockRequestBuilder() {
    + this(null);
    + }
    + public LockRequestBuilder(String agentInfo) {
          req = new LockRequest();
          trie = new LockTrie();
          userSet = false;
    + if(agentInfo != null) {
    + req.setAgentInfo(agentInfo);
    + }
        }

        /**

    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
    index bc818e0..abaff34 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
    @@ -129,7 +129,7 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
        static private boolean doRetryOnConnPool = false;

        private enum OpertaionType {
    - INSERT('i'), UPDATE('u'), DELETE('d');
    + SELECT('s'), INSERT('i'), UPDATE('u'), DELETE('d');
          private final char sqlConst;
          OpertaionType(char sqlConst) {
            this.sqlConst = sqlConst;
    @@ -139,6 +139,8 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
          }
          public static OpertaionType fromString(char sqlConst) {
            switch (sqlConst) {
    + case 's':
    + return SELECT;
              case 'i':
                return INSERT;
              case 'u':
    @@ -149,16 +151,18 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
                throw new IllegalArgumentException(quoteChar(sqlConst));
            }
          }
    - //we should instead just pass in OpertaionType from client (HIVE-13622)
    - @Deprecated
    - public static OpertaionType fromLockType(LockType lockType) {
    - switch (lockType) {
    - case SHARED_READ:
    - return INSERT;
    - case SHARED_WRITE:
    - return UPDATE;
    + public static OpertaionType fromDataOperationType(DataOperationType dop) {
    + switch (dop) {
    + case SELECT:
    + return OpertaionType.SELECT;
    + case INSERT:
    + return OpertaionType.INSERT;
    + case UPDATE:
    + return OpertaionType.UPDATE;
    + case DELETE:
    + return OpertaionType.DELETE;
              default:
    - throw new IllegalArgumentException("Unexpected lock type: " + lockType);
    + throw new IllegalArgumentException("Unexpected value: " + dop);
            }
          }
        }
    @@ -653,20 +657,21 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
              String s = "insert into COMPLETED_TXN_COMPONENTS select tc_txnid, tc_database, tc_table, " +
                "tc_partition from TXN_COMPONENTS where tc_txnid = " + txnid;
              LOG.debug("Going to execute insert <" + s + ">");
    - if (stmt.executeUpdate(s) < 1) {
    + int modCount = 0;
    + if ((modCount = stmt.executeUpdate(s)) < 1) {
                //this can be reasonable for an empty txn START/COMMIT or read-only txn
                LOG.info("Expected to move at least one record from txn_components to " +
                  "completed_txn_components when committing txn! " + JavaUtils.txnIdToString(txnid));
              }
              s = "delete from TXN_COMPONENTS where tc_txnid = " + txnid;
              LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + modCount = stmt.executeUpdate(s);
              s = "delete from HIVE_LOCKS where hl_txnid = " + txnid;
              LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + modCount = stmt.executeUpdate(s);
              s = "delete from TXNS where txn_id = " + txnid;
              LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + modCount = stmt.executeUpdate(s);
              LOG.debug("Going to commit");
              dbConn.commit();
            } catch (SQLException e) {
    @@ -808,7 +813,7 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
              /** Get the next lock id.
               * This has to be atomic with adding entries to HIVE_LOCK entries (1st add in W state) to prevent a race.
               * Suppose ID gen is a separate txn and 2 concurrent lock() methods are running. 1st one generates nl_next=7,
    - * 2nd nl_next=8. Then 8 goes first to insert into HIVE_LOCKS and aquires the locks. Then 7 unblocks,
    + * 2nd nl_next=8. Then 8 goes first to insert into HIVE_LOCKS and acquires the locks. Then 7 unblocks,
               * and add it's W locks but it won't see locks from 8 since to be 'fair' {@link #checkLock(java.sql.Connection, long)}
               * doesn't block on locks acquired later than one it's checking*/
              String s = addForUpdateClause("select nl_next from NEXT_LOCK_ID");
    @@ -826,13 +831,8 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
              stmt.executeUpdate(s);

              if (txnid > 0) {
    - /**DBTxnManager#acquireLocks() knows if it's I/U/D (that's how it decides what lock to get)
    - * So if we add that to LockRequest we'll know that here
    - * Should probably add it to LockComponent so that if in the future we decide wo allow 1 LockRequest
    - * to contain LockComponent for multiple operations.
    - * Deriving it from lock info doesn't distinguish between Update and Delete
    - *
    - * QueryPlan has BaseSemanticAnalyzer which has acidFileSinks list of FileSinkDesc
    + /**
    + * todo QueryPlan has BaseSemanticAnalyzer which has acidFileSinks list of FileSinkDesc
                 * FileSinkDesc.table is ql.metadata.Table
                 * Table.tableSpec which is TableSpec, which has specType which is SpecType
                 * So maybe this can work to know that this is part of dynamic partition insert in which case
    @@ -841,8 +841,35 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
                 */
                // For each component in this lock request,
                // add an entry to the txn_components table
    - // This must be done before HIVE_LOCKS is accessed
                for (LockComponent lc : rqst.getComponent()) {
    + if(lc.isSetIsAcid() && !lc.isIsAcid()) {
    + //we don't prevent using non-acid resources in a txn but we do lock them
    + continue;
    + }
    + boolean updateTxnComponents;
    + if(!lc.isSetOperationType()) {
    + //request came from old version of the client
    + updateTxnComponents = true;//this matches old behavior
    + }
    + else {
    + switch (lc.getOperationType()) {
    + case INSERT:
    + case UPDATE:
    + case DELETE:
    + updateTxnComponents = true;
    + break;
    + case SELECT:
    + updateTxnComponents = false;
    + break;
    + default:
    + //since we have an open transaction, only 4 values above are expected
    + throw new IllegalStateException("Unexpected DataOperationType: " + lc.getOperationType()
    + + " agentInfo=" + rqst.getAgentInfo() + " " + JavaUtils.txnIdToString(txnid));
    + }
    + }
    + if(!updateTxnComponents) {
    + continue;
    + }
                  String dbName = lc.getDbname();
                  String tblName = lc.getTablename();
                  String partName = lc.getPartitionname();
    @@ -851,14 +878,19 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
                    "values (" + txnid + ", '" + dbName + "', " +
                    (tblName == null ? "null" : "'" + tblName + "'") + ", " +
                    (partName == null ? "null" : "'" + partName + "'")+ "," +
    - quoteString(OpertaionType.fromLockType(lc.getType()).toString()) + ")";
    + quoteString(OpertaionType.fromDataOperationType(lc.getOperationType()).toString()) + ")";
                  LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + int modCount = stmt.executeUpdate(s);
                }
              }

              long intLockId = 0;
              for (LockComponent lc : rqst.getComponent()) {
    + if(lc.isSetOperationType() && lc.getOperationType() == DataOperationType.UNSET) {
    + //old version of thrift client should have (lc.isSetOperationType() == false)
    + throw new IllegalStateException("Bug: operationType=" + lc.getOperationType() + " for component "
    + + lc + " agentInfo=" + rqst.getAgentInfo());
    + }
                intLockId++;
                String dbName = lc.getDbname();
                String tblName = lc.getTablename();
    @@ -1433,21 +1465,13 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
                ensureValidTxn(dbConn, rqst.getTxnid(), stmt);
                shouldNeverHappen(rqst.getTxnid());
              }
    - //we should be able to get this from AddDynamicPartitions object longer term; in fact we'd have to
    - //for multi stmt txns if same table is written more than once per tx
    - // MoveTask knows if it's I/U/D
    - // MoveTask calls Hive.loadDynamicPartitions() which calls HiveMetaStoreClient.addDynamicPartitions()
    - // which ends up here so we'd need to add a field to AddDynamicPartitions.
    - String findOperationType = " tc_operation_type from TXN_COMPONENTS where tc_txnid=" + rqst.getTxnid()
    - + " and tc_database=" + quoteString(rqst.getDbname()) + " and tc_table=" + quoteString(rqst.getTablename());
    - //do limit 1 on this; currently they will all have the same operations
    - rs = stmt.executeQuery(addLimitClause(1, findOperationType));
    - if(!rs.next()) {
    - throw new IllegalStateException("Unable to determine tc_operation_type for " + JavaUtils.txnIdToString(rqst.getTxnid()));
    + //for RU this may be null so we should default it to 'u' which is most restrictive
    + OpertaionType ot = OpertaionType.UPDATE;
    + if(rqst.isSetOperationType()) {
    + ot = OpertaionType.fromDataOperationType(rqst.getOperationType());
              }
    - OpertaionType ot = OpertaionType.fromString(rs.getString(1).charAt(0));

    - //what if a txn writes the same table > 1 time... let's go with this for now, but really
    + //what if a txn writes the same table > 1 time...(HIVE-9675) let's go with this for now, but really
              //need to not write this in the first place, i.e. make this delete not needed
              //see enqueueLockWithRetry() - that's where we write to TXN_COMPONENTS
              String deleteSql = "delete from TXN_COMPONENTS where tc_txnid=" + rqst.getTxnid() + " and tc_database=" +
    @@ -1456,14 +1480,14 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
              //much "wider" than necessary in a lot of cases. Here on the other hand, we know exactly which
              //partitions have been written to. w/o this WRITE_SET would contain entries for partitions not actually
              //written to
    - stmt.executeUpdate(deleteSql);
    + int modCount = stmt.executeUpdate(deleteSql);
              for (String partName : rqst.getPartitionnames()) {
                String s =
                  "insert into TXN_COMPONENTS (tc_txnid, tc_database, tc_table, tc_partition, tc_operation_type) values (" +
                    rqst.getTxnid() + "," + quoteString(rqst.getDbname()) + "," + quoteString(rqst.getTablename()) +
                    "," + quoteString(partName) + "," + quoteChar(ot.sqlConst) + ")";
                LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + modCount = stmt.executeUpdate(s);
              }
              LOG.debug("Going to commit");
              dbConn.commit();
    @@ -1483,8 +1507,8 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
        }

        /**
    - * Clean up corresponding records in metastore tables, specifically:
    - * TXN_COMPONENTS, COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPACTIONS
    + * Clean up corresponding records in metastore tables when corresponding object is dropped,
    + * specifically: TXN_COMPONENTS, COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPACTIONS
         */
        public void cleanupRecords(HiveObjectType type, Database db, Table table,
                                   Iterator<Partition> partitionIterator) throws MetaException {
  • Ekoifman at May 19, 2016 at 7:29 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/f25b8652/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java.orig
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java.orig b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java.orig
    new file mode 100644
    index 0000000..bc818e0
    --- /dev/null
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java.orig
    @@ -0,0 +1,3233 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements. See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership. The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License. You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.hadoop.hive.metastore.txn;
    +
    +import com.google.common.annotations.VisibleForTesting;
    +import com.google.common.util.concurrent.Service;
    +import com.jolbox.bonecp.BoneCPConfig;
    +import com.jolbox.bonecp.BoneCPDataSource;
    +import org.apache.commons.dbcp.ConnectionFactory;
    +import org.apache.commons.dbcp.DriverManagerConnectionFactory;
    +import org.apache.commons.dbcp.PoolableConnectionFactory;
    +import org.apache.commons.lang.NotImplementedException;
    +import org.apache.hadoop.hive.common.ServerUtils;
    +import org.apache.hadoop.hive.common.classification.InterfaceAudience;
    +import org.apache.hadoop.hive.common.classification.InterfaceStability;
    +import org.apache.hadoop.hive.metastore.Warehouse;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +import org.apache.commons.dbcp.PoolingDataSource;
    +
    +import org.apache.commons.pool.ObjectPool;
    +import org.apache.commons.pool.impl.GenericObjectPool;
    +import org.apache.hadoop.hive.common.JavaUtils;
    +import org.apache.hadoop.hive.conf.HiveConf;
    +import org.apache.hadoop.hive.metastore.api.*;
    +import org.apache.hadoop.hive.shims.ShimLoader;
    +import org.apache.hadoop.util.StringUtils;
    +
    +import javax.sql.DataSource;
    +
    +import java.io.IOException;
    +import java.sql.*;
    +import java.util.*;
    +import java.util.concurrent.ConcurrentHashMap;
    +import java.util.concurrent.Semaphore;
    +import java.util.concurrent.TimeUnit;
    +import java.util.concurrent.locks.ReentrantLock;
    +import java.util.regex.Pattern;
    +
    +/**
    + * A handler to answer transaction related calls that come into the metastore
    + * server.
    + *
    + * Note on log messages: Please include txnid:X and lockid info using
    + * {@link org.apache.hadoop.hive.common.JavaUtils#txnIdToString(long)}
    + * and {@link org.apache.hadoop.hive.common.JavaUtils#lockIdToString(long)} in all messages.
    + * The txnid:X and lockid:Y matches how Thrift object toString() methods are generated,
    + * so keeping the format consistent makes grep'ing the logs much easier.
    + *
    + * Note on HIVE_LOCKS.hl_last_heartbeat.
    + * For locks that are part of transaction, we set this 0 (would rather set it to NULL but
    + * Currently the DB schema has this NOT NULL) and only update/read heartbeat from corresponding
    + * transaction in TXNS.
    + *
    + * In general there can be multiple metastores where this logic can execute, thus the DB is
    + * used to ensure proper mutexing of operations.
    + * Select ... For Update (or equivalent: either MsSql with(updlock) or actual Update stmt) is
    + * used to properly sequence operations. Most notably:
    + * 1. various sequence IDs are generated with aid of this mutex
    + * 2. ensuring that each (Hive) Transaction state is transitioned atomically. Transaction state
    + * includes its actual state (Open, Aborted) as well as it's lock list/component list. Thus all
    + * per transaction ops, either start by update/delete of the relevant TXNS row or do S4U on that row.
    + * This allows almost all operations to run at READ_COMMITTED and minimizes DB deadlocks.
    + * 3. checkLock() - this is mutexted entirely since we must ensure that while we check if some lock
    + * can be granted, no other (strictly speaking "earlier") lock can change state.
    + *
    + * The exception to his is Derby which doesn't support proper S4U. Derby is always running embedded
    + * (this is the only supported configuration for Derby)
    + * in the same JVM as HiveMetaStoreHandler thus we use JVM wide lock to properly sequnce the operations.
    + *
    + * {@link #derbyLock}
    +
    + * If we ever decide to run remote Derby server, according to
    + * https://db.apache.org/derby/docs/10.0/manuals/develop/develop78.html all transactions will be
    + * seriazlied, so that would also work though has not been tested.
    + *
    + * General design note:
    + * It's imperative that any operation on a txn (e.g. commit), ensure (atomically) that this txn is
    + * still valid and active. In the code this is usually achieved at the same time the txn record
    + * is locked for some operation.
    + */
    +@interfaceaudience.private
    +@interfacestability.evolving
    +abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
    +
    + static final protected char INITIATED_STATE = 'i';
    + static final protected char WORKING_STATE = 'w';
    + static final protected char READY_FOR_CLEANING = 'r';
    + static final char FAILED_STATE = 'f';
    + static final char SUCCEEDED_STATE = 's';
    + static final char ATTEMPTED_STATE = 'a';
    +
    + // Compactor types
    + static final protected char MAJOR_TYPE = 'a';
    + static final protected char MINOR_TYPE = 'i';
    +
    + // Transaction states
    + static final protected char TXN_ABORTED = 'a';
    + static final protected char TXN_OPEN = 'o';
    +
    + // Lock states
    + static final protected char LOCK_ACQUIRED = 'a';
    + static final protected char LOCK_WAITING = 'w';
    +
    + // Lock types
    + static final protected char LOCK_EXCLUSIVE = 'e';
    + static final protected char LOCK_SHARED = 'r';
    + static final protected char LOCK_SEMI_SHARED = 'w';
    +
    + static final private int ALLOWED_REPEATED_DEADLOCKS = 10;
    + static final private Logger LOG = LoggerFactory.getLogger(TxnHandler.class.getName());
    +
    + static private DataSource connPool;
    + static private boolean doRetryOnConnPool = false;
    +
    + private enum OpertaionType {
    + INSERT('i'), UPDATE('u'), DELETE('d');
    + private final char sqlConst;
    + OpertaionType(char sqlConst) {
    + this.sqlConst = sqlConst;
    + }
    + public String toString() {
    + return Character.toString(sqlConst);
    + }
    + public static OpertaionType fromString(char sqlConst) {
    + switch (sqlConst) {
    + case 'i':
    + return INSERT;
    + case 'u':
    + return UPDATE;
    + case 'd':
    + return DELETE;
    + default:
    + throw new IllegalArgumentException(quoteChar(sqlConst));
    + }
    + }
    + //we should instead just pass in OpertaionType from client (HIVE-13622)
    + @Deprecated
    + public static OpertaionType fromLockType(LockType lockType) {
    + switch (lockType) {
    + case SHARED_READ:
    + return INSERT;
    + case SHARED_WRITE:
    + return UPDATE;
    + default:
    + throw new IllegalArgumentException("Unexpected lock type: " + lockType);
    + }
    + }
    + }
    +
    + /**
    + * Number of consecutive deadlocks we have seen
    + */
    + private int deadlockCnt;
    + private long deadlockRetryInterval;
    + protected HiveConf conf;
    + protected DatabaseProduct dbProduct;
    +
    + // (End user) Transaction timeout, in milliseconds.
    + private long timeout;
    +
    + private String identifierQuoteString; // quotes to use for quoting tables, where necessary
    + private long retryInterval;
    + private int retryLimit;
    + private int retryNum;
    + /**
    + * Derby specific concurrency control
    + */
    + private static final ReentrantLock derbyLock = new ReentrantLock(true);
    + /**
    + * must be static since even in UT there may be > 1 instance of TxnHandler
    + * (e.g. via Compactor services)
    + */
    + private final static ConcurrentHashMap<String, Semaphore> derbyKey2Lock = new ConcurrentHashMap<>();
    + private static final String hostname = ServerUtils.hostname();
    +
    + // Private methods should never catch SQLException and then throw MetaException. The public
    + // methods depend on SQLException coming back so they can detect and handle deadlocks. Private
    + // methods should only throw MetaException when they explicitly know there's a logic error and
    + // they want to throw past the public methods.
    + //
    + // All public methods that write to the database have to check for deadlocks when a SQLException
    + // comes back and handle it if they see one. This has to be done with the connection pooling
    + // in mind. To do this they should call checkRetryable() AFTER rolling back the db transaction,
    + // and then they should catch RetryException and call themselves recursively. See commitTxn for an example.
    +
    + public TxnHandler() {
    + }
    +
    + /**
    + * This is logically part of c'tor and must be called prior to any other method.
    + * Not physically part of c'tor due to use of relfection
    + */
    + public void setConf(HiveConf conf) {
    + this.conf = conf;
    +
    + checkQFileTestHack();
    +
    + Connection dbConn = null;
    + // Set up the JDBC connection pool
    + try {
    + setupJdbcConnectionPool(conf);
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + determineDatabaseProduct(dbConn);
    + } catch (SQLException e) {
    + String msg = "Unable to instantiate JDBC connection pooling, " + e.getMessage();
    + LOG.error(msg);
    + throw new RuntimeException(e);
    + }
    + finally {
    + closeDbConn(dbConn);
    + }
    +
    + timeout = HiveConf.getTimeVar(conf, HiveConf.ConfVars.HIVE_TXN_TIMEOUT, TimeUnit.MILLISECONDS);
    + buildJumpTable();
    + retryInterval = HiveConf.getTimeVar(conf, HiveConf.ConfVars.HMSHANDLERINTERVAL,
    + TimeUnit.MILLISECONDS);
    + retryLimit = HiveConf.getIntVar(conf, HiveConf.ConfVars.HMSHANDLERATTEMPTS);
    + deadlockRetryInterval = retryInterval / 10;
    + }
    +
    + public GetOpenTxnsInfoResponse getOpenTxnsInfo() throws MetaException {
    + try {
    + // We need to figure out the current transaction number and the list of
    + // open transactions. To avoid needing a transaction on the underlying
    + // database we'll look at the current transaction number first. If it
    + // subsequently shows up in the open list that's ok.
    + Connection dbConn = null;
    + Statement stmt = null;
    + ResultSet rs = null;
    + try {
    + /**
    + * This method can run at READ_COMMITTED as long as long as
    + * {@link #openTxns(org.apache.hadoop.hive.metastore.api.OpenTxnRequest)} is atomic.
    + * More specifically, as long as advancing TransactionID in NEXT_TXN_ID is atomic with
    + * adding corresponding entries into TXNS. The reason is that any txnid below HWM
    + * is either in TXNS and thus considered open (Open/Aborted) or it's considered Committed.
    + */
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + String s = "select ntxn_next - 1 from NEXT_TXN_ID";
    + LOG.debug("Going to execute query <" + s + ">");
    + rs = stmt.executeQuery(s);
    + if (!rs.next()) {
    + throw new MetaException("Transaction tables not properly " +
    + "initialized, no record found in next_txn_id");
    + }
    + long hwm = rs.getLong(1);
    + if (rs.wasNull()) {
    + throw new MetaException("Transaction tables not properly " +
    + "initialized, null record found in next_txn_id");
    + }
    + close(rs);
    + List<TxnInfo> txnInfo = new ArrayList<TxnInfo>();
    + //need the WHERE clause below to ensure consistent results with READ_COMMITTED
    + s = "select txn_id, txn_state, txn_user, txn_host from TXNS where txn_id <= " + hwm;
    + LOG.debug("Going to execute query<" + s + ">");
    + rs = stmt.executeQuery(s);
    + while (rs.next()) {
    + char c = rs.getString(2).charAt(0);
    + TxnState state;
    + switch (c) {
    + case TXN_ABORTED:
    + state = TxnState.ABORTED;
    + break;
    +
    + case TXN_OPEN:
    + state = TxnState.OPEN;
    + break;
    +
    + default:
    + throw new MetaException("Unexpected transaction state " + c +
    + " found in txns table");
    + }
    + txnInfo.add(new TxnInfo(rs.getLong(1), state, rs.getString(3), rs.getString(4)));
    + }
    + LOG.debug("Going to rollback");
    + dbConn.rollback();
    + return new GetOpenTxnsInfoResponse(hwm, txnInfo);
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "getOpenTxnsInfo");
    + throw new MetaException("Unable to select from transaction database: " + getMessage(e)
    + + StringUtils.stringifyException(e));
    + } finally {
    + close(rs, stmt, dbConn);
    + }
    + } catch (RetryException e) {
    + return getOpenTxnsInfo();
    + }
    + }
    +
    + public GetOpenTxnsResponse getOpenTxns() throws MetaException {
    + try {
    + // We need to figure out the current transaction number and the list of
    + // open transactions. To avoid needing a transaction on the underlying
    + // database we'll look at the current transaction number first. If it
    + // subsequently shows up in the open list that's ok.
    + Connection dbConn = null;
    + Statement stmt = null;
    + ResultSet rs = null;
    + try {
    + /**
    + * This runs at READ_COMMITTED for exactly the same reason as {@link #getOpenTxnsInfo()}
    +\ */
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + String s = "select ntxn_next - 1 from NEXT_TXN_ID";
    + LOG.debug("Going to execute query <" + s + ">");
    + rs = stmt.executeQuery(s);
    + if (!rs.next()) {
    + throw new MetaException("Transaction tables not properly " +
    + "initialized, no record found in next_txn_id");
    + }
    + long hwm = rs.getLong(1);
    + if (rs.wasNull()) {
    + throw new MetaException("Transaction tables not properly " +
    + "initialized, null record found in next_txn_id");
    + }
    + close(rs);
    + Set<Long> openList = new HashSet<Long>();
    + //need the WHERE clause below to ensure consistent results with READ_COMMITTED
    + s = "select txn_id from TXNS where txn_id <= " + hwm;
    + LOG.debug("Going to execute query<" + s + ">");
    + rs = stmt.executeQuery(s);
    + while (rs.next()) {
    + openList.add(rs.getLong(1));
    + }
    + LOG.debug("Going to rollback");
    + dbConn.rollback();
    + return new GetOpenTxnsResponse(hwm, openList);
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "getOpenTxns");
    + throw new MetaException("Unable to select from transaction database, "
    + + StringUtils.stringifyException(e));
    + } finally {
    + close(rs, stmt, dbConn);
    + }
    + } catch (RetryException e) {
    + return getOpenTxns();
    + }
    + }
    + public OpenTxnsResponse openTxns(OpenTxnRequest rqst) throws MetaException {
    + int numTxns = rqst.getNum_txns();
    + try {
    + Connection dbConn = null;
    + Statement stmt = null;
    + ResultSet rs = null;
    + try {
    + lockInternal();
    + /**
    + * To make {@link #getOpenTxns()}/{@link #getOpenTxnsInfo()} work correctly, this operation must ensure
    + * that advancing the counter in NEXT_TXN_ID and adding appropriate entries to TXNS is atomic.
    + * Also, advancing the counter must work when multiple metastores are running.
    + * SELECT ... FOR UPDATE is used to prevent
    + * concurrent DB transactions being rolled back due to Write-Write conflict on NEXT_TXN_ID.
    + *
    + * In the current design, there can be several metastore instances running in a given Warehouse.
    + * This makes ideas like reserving a range of IDs to save trips to DB impossible. For example,
    + * a client may go to MS1 and start a transaction with ID 500 to update a particular row.
    + * Now the same client will start another transaction, except it ends up on MS2 and may get
    + * transaction ID 400 and update the same row. Now the merge that happens to materialize the snapshot
    + * on read will thing the version of the row from transaction ID 500 is the latest one.
    + *
    + * Longer term we can consider running Active-Passive MS (at least wrt to ACID operations). This
    + * set could support a write-through cache for added performance.
    + */
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + // Make sure the user has not requested an insane amount of txns.
    + int maxTxns = HiveConf.getIntVar(conf,
    + HiveConf.ConfVars.HIVE_TXN_MAX_OPEN_BATCH);
    + if (numTxns > maxTxns) numTxns = maxTxns;
    +
    + stmt = dbConn.createStatement();
    + String s = addForUpdateClause("select ntxn_next from NEXT_TXN_ID");
    + LOG.debug("Going to execute query <" + s + ">");
    + rs = stmt.executeQuery(s);
    + if (!rs.next()) {
    + throw new MetaException("Transaction database not properly " +
    + "configured, can't find next transaction id.");
    + }
    + long first = rs.getLong(1);
    + s = "update NEXT_TXN_ID set ntxn_next = " + (first + numTxns);
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    +
    + long now = getDbTime(dbConn);
    + List<Long> txnIds = new ArrayList<Long>(numTxns);
    + ArrayList<String> queries = new ArrayList<String>();
    + String query;
    + String insertClause = "insert into TXNS (txn_id, txn_state, txn_started, txn_last_heartbeat, txn_user, txn_host) values ";
    + StringBuilder valuesClause = new StringBuilder();
    +
    + for (long i = first; i < first + numTxns; i++) {
    + txnIds.add(i);
    +
    + if (i > first &&
    + (i - first) % conf.getIntVar(HiveConf.ConfVars.METASTORE_DIRECT_SQL_MAX_ELEMENTS_VALUES_CLAUSE) == 0) {
    + // wrap up the current query, and start a new one
    + query = insertClause + valuesClause.toString();
    + queries.add(query);
    +
    + valuesClause.setLength(0);
    + valuesClause.append("(").append(i).append(", 'o', ").append(now).append(", ").append(now)
    + .append(", '").append(rqst.getUser()).append("', '").append(rqst.getHostname())
    + .append("')");
    +
    + continue;
    + }
    +
    + if (i > first) {
    + valuesClause.append(", ");
    + }
    +
    + valuesClause.append("(").append(i).append(", 'o', ").append(now).append(", ").append(now)
    + .append(", '").append(rqst.getUser()).append("', '").append(rqst.getHostname())
    + .append("')");
    + }
    +
    + query = insertClause + valuesClause.toString();
    + queries.add(query);
    +
    + for (String q : queries) {
    + LOG.debug("Going to execute update <" + q + ">");
    + stmt.execute(q);
    + }
    + LOG.debug("Going to commit");
    + dbConn.commit();
    + return new OpenTxnsResponse(txnIds);
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "openTxns(" + rqst + ")");
    + throw new MetaException("Unable to select from transaction database "
    + + StringUtils.stringifyException(e));
    + } finally {
    + close(rs, stmt, dbConn);
    + unlockInternal();
    + }
    + } catch (RetryException e) {
    + return openTxns(rqst);
    + }
    + }
    +
    + public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException, MetaException {
    + long txnid = rqst.getTxnid();
    + try {
    + Connection dbConn = null;
    + try {
    + lockInternal();
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + if (abortTxns(dbConn, Collections.singletonList(txnid), true) != 1) {
    + LOG.debug("Going to rollback");
    + dbConn.rollback();
    + throw new NoSuchTxnException("No such transaction " + JavaUtils.txnIdToString(txnid));
    + }
    +
    + LOG.debug("Going to commit");
    + dbConn.commit();
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "abortTxn(" + rqst + ")");
    + throw new MetaException("Unable to update transaction database "
    + + StringUtils.stringifyException(e));
    + } finally {
    + closeDbConn(dbConn);
    + unlockInternal();
    + }
    + } catch (RetryException e) {
    + abortTxn(rqst);
    + }
    + }
    +
    + public void abortTxns(AbortTxnsRequest rqst) throws NoSuchTxnException, MetaException {
    + List<Long> txnids = rqst.getTxn_ids();
    + try {
    + Connection dbConn = null;
    + try {
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + int numAborted = abortTxns(dbConn, txnids, false);
    + if (numAborted != txnids.size()) {
    + LOG.warn("Abort Transactions command only abort " + numAborted + " out of " +
    + txnids.size() + " transactions. It's possible that the other " +
    + (txnids.size() - numAborted) +
    + " transactions have been aborted or committed, or the transaction ids are invalid.");
    + }
    + LOG.debug("Going to commit");
    + dbConn.commit();
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "abortTxns(" + rqst + ")");
    + throw new MetaException("Unable to update transaction database "
    + + StringUtils.stringifyException(e));
    + } finally {
    + closeDbConn(dbConn);
    + }
    + } catch (RetryException e) {
    + abortTxns(rqst);
    + }
    + }
    +
    + /**
    + * Concurrency/isolation notes:
    + * This is mutexed with {@link #openTxns(OpenTxnRequest)} and other {@link #commitTxn(CommitTxnRequest)}
    + * operations using select4update on NEXT_TXN_ID. Also, mutexes on TXNX table for specific txnid:X
    + * see more notes below.
    + * In order to prevent lost updates, we need to determine if any 2 transactions overlap. Each txn
    + * is viewed as an interval [M,N]. M is the txnid and N is taken from the same NEXT_TXN_ID sequence
    + * so that we can compare commit time of txn T with start time of txn S. This sequence can be thought of
    + * as a logical time counter. If S.commitTime < T.startTime, T and S do NOT overlap.
    + *
    + * Motivating example:
    + * Suppose we have multi-statment transactions T and S both of which are attempting x = x + 1
    + * In order to prevent lost update problem, the the non-overlapping txns must lock in the snapshot
    + * that they read appropriately. In particular, if txns do not overlap, then one follows the other
    + * (assumig they write the same entity), and thus the 2nd must see changes of the 1st. We ensure
    + * this by locking in snapshot after
    + * {@link #openTxns(OpenTxnRequest)} call is made (see {@link org.apache.hadoop.hive.ql.Driver#acquireLocksAndOpenTxn()})
    + * and mutexing openTxn() with commit(). In other words, once a S.commit() starts we must ensure
    + * that txn T which will be considered a later txn, locks in a snapshot that includes the result
    + * of S's commit (assuming no other txns).
    + * As a counter example, suppose we have S[3,3] and T[4,4] (commitId=txnid means no other transactions
    + * were running in parallel). If T and S both locked in the same snapshot (for example commit of
    + * txnid:2, which is possible if commitTxn() and openTxnx() is not mutexed)
    + * 'x' would be updated to the same value by both, i.e. lost update.
    + */
    + public void commitTxn(CommitTxnRequest rqst)
    + throws NoSuchTxnException, TxnAbortedException, MetaException {
    + long txnid = rqst.getTxnid();
    + try {
    + Connection dbConn = null;
    + Statement stmt = null;
    + ResultSet lockHandle = null;
    + ResultSet commitIdRs = null, rs;
    + try {
    + lockInternal();
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + /**
    + * This S4U will mutex with other commitTxn() and openTxns().
    + * -1 below makes txn intervals look like [3,3] [4,4] if all txns are serial
    + * Note: it's possible to have several txns have the same commit id. Suppose 3 txns start
    + * at the same time and no new txns start until all 3 commit.
    + * We could've incremented the sequence for commitId is well but it doesn't add anything functionally.
    + */
    + commitIdRs = stmt.executeQuery(addForUpdateClause("select ntxn_next - 1 from NEXT_TXN_ID"));
    + if(!commitIdRs.next()) {
    + throw new IllegalStateException("No rows found in NEXT_TXN_ID");
    + }
    + long commitId = commitIdRs.getLong(1);
    + /**
    + * Runs at READ_COMMITTED with S4U on TXNS row for "txnid". S4U ensures that no other
    + * operation can change this txn (such acquiring locks). While lock() and commitTxn()
    + * should not normally run concurrently (for same txn) but could due to bugs in the client
    + * which could then corrupt internal transaction manager state. Also competes with abortTxn().
    + */
    + lockHandle = lockTransactionRecord(stmt, txnid, TXN_OPEN);
    + if(lockHandle == null) {
    + //this also ensures that txn is still there and in expected state (hasn't been timed out)
    + ensureValidTxn(dbConn, txnid, stmt);
    + shouldNeverHappen(txnid);
    + }
    + Savepoint undoWriteSetForCurrentTxn = dbConn.setSavepoint();
    + int numCompsWritten = stmt.executeUpdate("insert into WRITE_SET (ws_database, ws_table, ws_partition, ws_txnid, ws_commit_id, ws_operation_type)" +
    + " select tc_database, tc_table, tc_partition, tc_txnid, " + commitId + ", tc_operation_type " +
    + "from TXN_COMPONENTS where tc_txnid=" + txnid + " and tc_operation_type IN(" + quoteChar(OpertaionType.UPDATE.sqlConst) + "," + quoteChar(OpertaionType.DELETE.sqlConst) + ")");
    + if(numCompsWritten == 0) {
    + /**
    + * current txn didn't update/delete anything (may have inserted), so just proceed with commit
    + *
    + * We only care about commit id for write txns, so for RO (when supported) txns we don't
    + * have to mutex on NEXT_TXN_ID.
    + * Consider: if RO txn is after a W txn, then RO's openTxns() will be mutexed with W's
    + * commitTxn() because both do S4U on NEXT_TXN_ID and thus RO will see result of W txn.
    + * If RO < W, then there is no reads-from relationship.
    + */
    + }
    + else {
    + /**
    + * see if there are any overlapping txns wrote the same element, i.e. have a conflict
    + * Since entire commit operation is mutexed wrt other start/commit ops,
    + * committed.ws_commit_id <= current.ws_commit_id for all txns
    + * thus if committed.ws_commit_id < current.ws_txnid, transactions do NOT overlap
    + * For example, [17,20] is committed, [6,80] is being committed right now - these overlap
    + * [17,20] committed and [21,21] committing now - these do not overlap.
    + * [17,18] committed and [18,19] committing now - these overlap (here 18 started while 17 was still running)
    + */
    + rs = stmt.executeQuery
    + (addLimitClause(1, "committed.ws_txnid, committed.ws_commit_id, committed.ws_database," +
    + "committed.ws_table, committed.ws_partition, cur.ws_commit_id " +
    + "from WRITE_SET committed INNER JOIN WRITE_SET cur " +
    + "ON committed.ws_database=cur.ws_database and committed.ws_table=cur.ws_table " +
    + //For partitioned table we always track writes at partition level (never at table)
    + //and for non partitioned - always at table level, thus the same table should never
    + //have entries with partition key and w/o
    + "and (committed.ws_partition=cur.ws_partition or (committed.ws_partition is null and cur.ws_partition is null)) " +
    + "where cur.ws_txnid <= committed.ws_commit_id" + //txns overlap; could replace ws_txnid
    + // with txnid, though any decent DB should infer this
    + " and cur.ws_txnid=" + txnid + //make sure RHS of join only has rows we just inserted as
    + // part of this commitTxn() op
    + " and committed.ws_txnid <> " + txnid + //and LHS only has committed txns
    + //U+U and U+D is a conflict but D+D is not and we don't currently track I in WRITE_SET at all
    + " and (committed.ws_operation_type=" + quoteChar(OpertaionType.UPDATE.sqlConst) +
    + " OR cur.ws_operation_type=" + quoteChar(OpertaionType.UPDATE.sqlConst) + ")"));
    + if(rs.next()) {
    + //found a conflict
    + String committedTxn = "[" + JavaUtils.txnIdToString(rs.getLong(1)) + "," + rs.getLong(2) + "]";
    + StringBuilder resource = new StringBuilder(rs.getString(3)).append("/").append(rs.getString(4));
    + String partitionName = rs.getString(5);
    + if(partitionName != null) {
    + resource.append('/').append(partitionName);
    + }
    + String msg = "Aborting [" + JavaUtils.txnIdToString(txnid) + "," + rs.getLong(6) + "]" + " due to a write conflict on " + resource +
    + " committed by " + committedTxn;
    + close(rs);
    + //remove WRITE_SET info for current txn since it's about to abort
    + dbConn.rollback(undoWriteSetForCurrentTxn);
    + LOG.info(msg);
    + //todo: should make abortTxns() write something into TXNS.TXN_META_INFO about this
    + if(abortTxns(dbConn, Collections.singletonList(txnid), true) != 1) {
    + throw new IllegalStateException(msg + " FAILED!");
    + }
    + dbConn.commit();
    + close(null, stmt, dbConn);
    + throw new TxnAbortedException(msg);
    + }
    + else {
    + //no conflicting operations, proceed with the rest of commit sequence
    + }
    + }
    + // Move the record from txn_components into completed_txn_components so that the compactor
    + // knows where to look to compact.
    + String s = "insert into COMPLETED_TXN_COMPONENTS select tc_txnid, tc_database, tc_table, " +
    + "tc_partition from TXN_COMPONENTS where tc_txnid = " + txnid;
    + LOG.debug("Going to execute insert <" + s + ">");
    + if (stmt.executeUpdate(s) < 1) {
    + //this can be reasonable for an empty txn START/COMMIT or read-only txn
    + LOG.info("Expected to move at least one record from txn_components to " +
    + "completed_txn_components when committing txn! " + JavaUtils.txnIdToString(txnid));
    + }
    + s = "delete from TXN_COMPONENTS where tc_txnid = " + txnid;
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    + s = "delete from HIVE_LOCKS where hl_txnid = " + txnid;
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    + s = "delete from TXNS where txn_id = " + txnid;
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    + LOG.debug("Going to commit");
    + dbConn.commit();
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "commitTxn(" + rqst + ")");
    + throw new MetaException("Unable to update transaction database "
    + + StringUtils.stringifyException(e));
    + } finally {
    + close(commitIdRs);
    + close(lockHandle, stmt, dbConn);
    + unlockInternal();
    + }
    + } catch (RetryException e) {
    + commitTxn(rqst);
    + }
    + }
    + @Override
    + public void performWriteSetGC() {
    + Connection dbConn = null;
    + Statement stmt = null;
    + ResultSet rs = null;
    + try {
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + rs = stmt.executeQuery("select ntxn_next - 1 from NEXT_TXN_ID");
    + if(!rs.next()) {
    + throw new IllegalStateException("NEXT_TXN_ID is empty: DB is corrupted");
    + }
    + long highestAllocatedTxnId = rs.getLong(1);
    + close(rs);
    + rs = stmt.executeQuery("select min(txn_id) from TXNS where txn_state=" + quoteChar(TXN_OPEN));
    + if(!rs.next()) {
    + throw new IllegalStateException("Scalar query returned no rows?!?!!");
    + }
    + long commitHighWaterMark;//all currently open txns (if any) have txnid >= than commitHighWaterMark
    + long lowestOpenTxnId = rs.getLong(1);
    + if(rs.wasNull()) {
    + //if here then there are no Open txns and highestAllocatedTxnId must be
    + //resolved (i.e. committed or aborted), either way
    + //there are no open txns with id <= highestAllocatedTxnId
    + //the +1 is there because "delete ..." below has < (which is correct for the case when
    + //there is an open txn
    + //Concurrency: even if new txn starts (or starts + commits) it is still true that
    + //there are no currently open txns that overlap with any committed txn with
    + //commitId <= commitHighWaterMark (as set on next line). So plain READ_COMMITTED is enough.
    + commitHighWaterMark = highestAllocatedTxnId + 1;
    + }
    + else {
    + commitHighWaterMark = lowestOpenTxnId;
    + }
    + int delCnt = stmt.executeUpdate("delete from WRITE_SET where ws_commit_id < " + commitHighWaterMark);
    + LOG.info("Deleted " + delCnt + " obsolete rows from WRTIE_SET");
    + dbConn.commit();
    + } catch (SQLException ex) {
    + LOG.warn("WriteSet GC failed due to " + getMessage(ex), ex);
    + }
    + finally {
    + close(rs, stmt, dbConn);
    + }
    + }
    + /**
    + * As much as possible (i.e. in absence of retries) we want both operations to be done on the same
    + * connection (but separate transactions). This avoid some flakiness in BONECP where if you
    + * perform an operation on 1 connection and immediately get another fron the pool, the 2nd one
    + * doesn't see results of the first.
    + */
    + public LockResponse lock(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, MetaException {
    + ConnectionLockIdPair connAndLockId = enqueueLockWithRetry(rqst);
    + try {
    + return checkLockWithRetry(connAndLockId.dbConn, connAndLockId.extLockId, rqst.getTxnid());
    + }
    + catch(NoSuchLockException e) {
    + // This should never happen, as we just added the lock id
    + throw new MetaException("Couldn't find a lock we just created! " + e.getMessage());
    + }
    + }
    + private static final class ConnectionLockIdPair {
    + private final Connection dbConn;
    + private final long extLockId;
    + private ConnectionLockIdPair(Connection dbConn, long extLockId) {
    + this.dbConn = dbConn;
    + this.extLockId = extLockId;
    + }
    + }
    +
    + /**
    + * Note that by definition select for update is divorced from update, i.e. you executeQuery() to read
    + * and then executeUpdate(). One other alternative would be to actually update the row in TXNS but
    + * to the same value as before thus forcing db to acquire write lock for duration of the transaction.
    + *
    + * There is no real reason to return the ResultSet here other than to make sure the reference to it
    + * is retained for duration of intended lock scope and is not GC'd thus (unlikely) causing lock
    + * to be released.
    + * @param txnState the state this txn is expected to be in. may be null
    + * @return null if no row was found
    + * @throws SQLException
    + * @throws MetaException
    + */
    + private ResultSet lockTransactionRecord(Statement stmt, long txnId, Character txnState) throws SQLException, MetaException {
    + String query = "select TXN_STATE from TXNS where TXN_ID = " + txnId + (txnState != null ? " AND TXN_STATE=" + quoteChar(txnState) : "");
    + ResultSet rs = stmt.executeQuery(addForUpdateClause(query));
    + if(rs.next()) {
    + return rs;
    + }
    + close(rs);
    + return null;
    + }
    +
    + /**
    + * This enters locks into the queue in {@link #LOCK_WAITING} mode.
    + *
    + * Isolation Level Notes:
    + * 1. We use S4U (withe read_committed) to generate the next (ext) lock id. This serializes
    + * any 2 {@code enqueueLockWithRetry()} calls.
    + * 2. We use S4U on the relevant TXNS row to block any concurrent abort/commit/etc operations
    + * @see #checkLockWithRetry(Connection, long, long)
    + */
    + private ConnectionLockIdPair enqueueLockWithRetry(LockRequest rqst) throws NoSuchTxnException, TxnAbortedException, MetaException {
    + boolean success = false;
    + Connection dbConn = null;
    + try {
    + Statement stmt = null;
    + ResultSet rs = null;
    + ResultSet lockHandle = null;
    + try {
    + lockInternal();
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + long txnid = rqst.getTxnid();
    + stmt = dbConn.createStatement();
    + if (isValidTxn(txnid)) {
    + //this also ensures that txn is still there in expected state
    + lockHandle = lockTransactionRecord(stmt, txnid, TXN_OPEN);
    + if(lockHandle == null) {
    + ensureValidTxn(dbConn, txnid, stmt);
    + shouldNeverHappen(txnid);
    + }
    + }
    + /** Get the next lock id.
    + * This has to be atomic with adding entries to HIVE_LOCK entries (1st add in W state) to prevent a race.
    + * Suppose ID gen is a separate txn and 2 concurrent lock() methods are running. 1st one generates nl_next=7,
    + * 2nd nl_next=8. Then 8 goes first to insert into HIVE_LOCKS and aquires the locks. Then 7 unblocks,
    + * and add it's W locks but it won't see locks from 8 since to be 'fair' {@link #checkLock(java.sql.Connection, long)}
    + * doesn't block on locks acquired later than one it's checking*/
    + String s = addForUpdateClause("select nl_next from NEXT_LOCK_ID");
    + LOG.debug("Going to execute query <" + s + ">");
    + rs = stmt.executeQuery(s);
    + if (!rs.next()) {
    + LOG.debug("Going to rollback");
    + dbConn.rollback();
    + throw new MetaException("Transaction tables not properly " +
    + "initialized, no record found in next_lock_id");
    + }
    + long extLockId = rs.getLong(1);
    + s = "update NEXT_LOCK_ID set nl_next = " + (extLockId + 1);
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    +
    + if (txnid > 0) {
    + /**DBTxnManager#acquireLocks() knows if it's I/U/D (that's how it decides what lock to get)
    + * So if we add that to LockRequest we'll know that here
    + * Should probably add it to LockComponent so that if in the future we decide wo allow 1 LockRequest
    + * to contain LockComponent for multiple operations.
    + * Deriving it from lock info doesn't distinguish between Update and Delete
    + *
    + * QueryPlan has BaseSemanticAnalyzer which has acidFileSinks list of FileSinkDesc
    + * FileSinkDesc.table is ql.metadata.Table
    + * Table.tableSpec which is TableSpec, which has specType which is SpecType
    + * So maybe this can work to know that this is part of dynamic partition insert in which case
    + * we'll get addDynamicPartitions() call and should not write TXN_COMPONENTS here.
    + * In any case, that's an optimization for now; will be required when adding multi-stmt txns
    + */
    + // For each component in this lock request,
    + // add an entry to the txn_components table
    + // This must be done before HIVE_LOCKS is accessed
    + for (LockComponent lc : rqst.getComponent()) {
    + String dbName = lc.getDbname();
    + String tblName = lc.getTablename();
    + String partName = lc.getPartitionname();
    + s = "insert into TXN_COMPONENTS " +
    + "(tc_txnid, tc_database, tc_table, tc_partition, tc_operation_type) " +
    + "values (" + txnid + ", '" + dbName + "', " +
    + (tblName == null ? "null" : "'" + tblName + "'") + ", " +
    + (partName == null ? "null" : "'" + partName + "'")+ "," +
    + quoteString(OpertaionType.fromLockType(lc.getType()).toString()) + ")";
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    + }
    + }
    +
    + long intLockId = 0;
    + for (LockComponent lc : rqst.getComponent()) {
    + intLockId++;
    + String dbName = lc.getDbname();
    + String tblName = lc.getTablename();
    + String partName = lc.getPartitionname();
    + LockType lockType = lc.getType();
    + char lockChar = 'z';
    + switch (lockType) {
    + case EXCLUSIVE:
    + lockChar = LOCK_EXCLUSIVE;
    + break;
    + case SHARED_READ:
    + lockChar = LOCK_SHARED;
    + break;
    + case SHARED_WRITE:
    + lockChar = LOCK_SEMI_SHARED;
    + break;
    + }
    + long now = getDbTime(dbConn);
    + s = "insert into HIVE_LOCKS " +
    + " (hl_lock_ext_id, hl_lock_int_id, hl_txnid, hl_db, hl_table, " +
    + "hl_partition, hl_lock_state, hl_lock_type, hl_last_heartbeat, hl_user, hl_host)" +
    + " values (" + extLockId + ", " +
    + +intLockId + "," + txnid + ", '" +
    + dbName + "', " + (tblName == null ? "null" : "'" + tblName + "'")
    + + ", " + (partName == null ? "null" : "'" + partName + "'") +
    + ", '" + LOCK_WAITING + "', " + "'" + lockChar + "', " +
    + //for locks associated with a txn, we always heartbeat txn and timeout based on that
    + (isValidTxn(txnid) ? 0 : now) + ", '" +
    + rqst.getUser() + "', '" + rqst.getHostname() + "')";
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    + }
    + dbConn.commit();
    + success = true;
    + return new ConnectionLockIdPair(dbConn, extLockId);
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "enqueueLockWithRetry(" + rqst + ")");
    + throw new MetaException("Unable to update transaction database " +
    + StringUtils.stringifyException(e));
    + } finally {
    + close(lockHandle);
    + close(rs, stmt, null);
    + if (!success) {
    + /* This needs to return a "live" connection to be used by operation that follows it.
    + Thus it only closes Connection on failure/retry. */
    + closeDbConn(dbConn);
    + }
    + unlockInternal();
    + }
    + }
    + catch(RetryException e) {
    + return enqueueLockWithRetry(rqst);
    + }
    + }
    + private LockResponse checkLockWithRetry(Connection dbConn, long extLockId, long txnId)
    + throws NoSuchLockException, NoSuchTxnException, TxnAbortedException, MetaException {
    + try {
    + try {
    + lockInternal();
    + if(dbConn.isClosed()) {
    + //should only get here if retrying this op
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + }
    + return checkLock(dbConn, extLockId);
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "checkLockWithRetry(" + extLockId + "," + txnId + ")");
    + throw new MetaException("Unable to update transaction database " +
    + StringUtils.stringifyException(e));
    + } finally {
    + unlockInternal();
    + closeDbConn(dbConn);
    + }
    + }
    + catch(RetryException e) {
    + return checkLockWithRetry(dbConn, extLockId, txnId);
    + }
    + }
    + /**
    + * Why doesn't this get a txnid as parameter? The caller should either know the txnid or know there isn't one.
    + * Either way getTxnIdFromLockId() will not be needed. This would be a Thrift change.
    + *
    + * Also, when lock acquisition returns WAITING, it's retried every 15 seconds (best case, see DbLockManager.backoff(),
    + * in practice more often)
    + * which means this is heartbeating way more often than hive.txn.timeout and creating extra load on DB.
    + *
    + * The clients that operate in blocking mode, can't heartbeat a lock until the lock is acquired.
    + * We should make CheckLockRequest include timestamp or last request to skip unnecessary heartbeats. Thrift change.
    + *
    + * {@link #checkLock(java.sql.Connection, long)} must run at SERIALIZABLE (make sure some lock we are checking
    + * against doesn't move from W to A in another txn) but this method can heartbeat in
    + * separate txn at READ_COMMITTED.
    + */
    + public LockResponse checkLock(CheckLockRequest rqst)
    + throws NoSuchTxnException, NoSuchLockException, TxnAbortedException, MetaException {
    + try {
    + Connection dbConn = null;
    + long extLockId = rqst.getLockid();
    + try {
    + lockInternal();
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + // Heartbeat on the lockid first, to assure that our lock is still valid.
    + // Then look up the lock info (hopefully in the cache). If these locks
    + // are associated with a transaction then heartbeat on that as well.
    + LockInfo info = getTxnIdFromLockId(dbConn, extLockId);
    + if(info == null) {
    + throw new NoSuchLockException("No such lock " + JavaUtils.lockIdToString(extLockId));
    + }
    + if (info.txnId > 0) {
    + heartbeatTxn(dbConn, info.txnId);
    + }
    + else {
    + heartbeatLock(dbConn, extLockId);
    + }
    + //todo: strictly speaking there is a bug here. heartbeat*() commits but both heartbeat and
    + //checkLock() are in the same retry block, so if checkLock() throws, heartbeat is also retired
    + //extra heartbeat is logically harmless, but ...
    + return checkLock(dbConn, extLockId);
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "checkLock(" + rqst + " )");
    + throw new MetaException("Unable to update transaction database " +
    + JavaUtils.lockIdToString(extLockId) + " " + StringUtils.stringifyException(e));
    + } finally {
    + closeDbConn(dbConn);
    + unlockInternal();
    + }
    + } catch (RetryException e) {
    + return checkLock(rqst);
    + }
    +
    + }
    +
    + /**
    + * This would have been made simpler if all locks were associated with a txn. Then only txn needs to
    + * be heartbeated, committed, etc. no need for client to track individual locks.
    + * When removing locks not associated with txn this potentially conflicts with
    + * heartbeat/performTimeout which are update/delete of HIVE_LOCKS thus will be locked as needed by db.
    + * since this only removes from HIVE_LOCKS at worst some lock acquire is delayed
    + */
    + public void unlock(UnlockRequest rqst)
    + throws NoSuchLockException, TxnOpenException, MetaException {
    + try {
    + Connection dbConn = null;
    + Statement stmt = null;
    + long extLockId = rqst.getLockid();
    + try {
    + /**
    + * This method is logically like commit for read-only auto commit queries.
    + * READ_COMMITTED since this only has 1 delete statement and no new entries with the
    + * same hl_lock_ext_id can be added, i.e. all rows with a given hl_lock_ext_id are
    + * created in a single atomic operation.
    + * Theoretically, this competes with {@link #lock(org.apache.hadoop.hive.metastore.api.LockRequest)}
    + * but hl_lock_ext_id is not known until that method returns.
    + * Also competes with {@link #checkLock(org.apache.hadoop.hive.metastore.api.CheckLockRequest)}
    + * but using SERIALIZABLE doesn't materially change the interaction.
    + * If "delete" stmt misses, additional logic is best effort to produce meaningful error msg.
    + */
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + //hl_txnid <> 0 means it's associated with a transaction
    + String s = "delete from HIVE_LOCKS where hl_lock_ext_id = " + extLockId + " AND (hl_txnid = 0 OR" +
    + " (hl_txnid <> 0 AND hl_lock_state = '" + LOCK_WAITING + "'))";
    + //(hl_txnid <> 0 AND hl_lock_state = '" + LOCK_WAITING + "') is for multi-statement txns where
    + //some query attempted to lock (thus LOCK_WAITING state) but is giving up due to timeout for example
    + LOG.debug("Going to execute update <" + s + ">");
    + int rc = stmt.executeUpdate(s);
    + if (rc < 1) {
    + LOG.debug("Going to rollback");
    + dbConn.rollback();
    + LockInfo info = getTxnIdFromLockId(dbConn, extLockId);
    + if(info == null) {
    + //didn't find any lock with extLockId but at ReadCommitted there is a possibility that
    + //it existed when above delete ran but it didn't have the expected state.
    + LOG.error("No lock in " + LOCK_WAITING + " mode found for unlock(" + rqst + ")");
    + throw new NoSuchLockException("No such lock " + JavaUtils.lockIdToString(extLockId));
    + }
    + if(info.txnId != 0) {
    + String msg = "Unlocking locks associated with transaction not permitted. " + info;
    + LOG.error(msg);
    + throw new TxnOpenException(msg);
    + }
    + if(info.txnId == 0) {
    + //we didn't see this lock when running DELETE stmt above but now it showed up
    + //so should "should never happen" happened...
    + String msg = "Found lock in unexpected state " + info;
    + LOG.error(msg);
    + throw new MetaException(msg);
    + }
    + }
    + LOG.debug("Going to commit");
    + dbConn.commit();
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "unlock(" + rqst + ")");
    + throw new MetaException("Unable to update transaction database " +
    + JavaUtils.lockIdToString(extLockId) + " " + StringUtils.stringifyException(e));
    + } finally {
    + closeStmt(stmt);
    + closeDbConn(dbConn);
    + }
    + } catch (RetryException e) {
    + unlock(rqst);
    + }
    + }
    +
    + /**
    + * used to sort entries in {@link org.apache.hadoop.hive.metastore.api.ShowLocksResponse}
    + */
    + private static class LockInfoExt extends LockInfo {
    + private final ShowLocksResponseElement e;
    + LockInfoExt(ShowLocksResponseElement e) {
    + super(e);
    + this.e = e;
    + }
    + }
    + public ShowLocksResponse showLocks(ShowLocksRequest rqst) throws MetaException {
    + try {
    + Connection dbConn = null;
    + ShowLocksResponse rsp = new ShowLocksResponse();
    + List<ShowLocksResponseElement> elems = new ArrayList<ShowLocksResponseElement>();
    + List<LockInfoExt> sortedList = new ArrayList<LockInfoExt>();
    + Statement stmt = null;
    + try {
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    +
    + String s = "select hl_lock_ext_id, hl_txnid, hl_db, hl_table, hl_partition, hl_lock_state, " +
    + "hl_lock_type, hl_last_heartbeat, hl_acquired_at, hl_user, hl_host, hl_lock_int_id," +
    + "hl_blockedby_ext_id, hl_blockedby_int_id from HIVE_LOCKS";
    +
    + // Some filters may have been specified in the SHOW LOCKS statement. Add them to the query.
    + String dbName = rqst.getDbname();
    + String tableName = rqst.getTablename();
    + String partName = rqst.getPartname();
    +
    + StringBuilder filter = new StringBuilder();
    + if (dbName != null && !dbName.isEmpty()) {
    + filter.append("hl_db=").append(quoteString(dbName));
    + }
    + if (tableName != null && !tableName.isEmpty()) {
    + if (filter.length() > 0) {
    + filter.append(" and ");
    + }
    + filter.append("hl_table=").append(quoteString(tableName));
    + }
    + if (partName != null && !partName.isEmpty()) {
    + if (filter.length() > 0) {
    + filter.append(" and ");
    + }
    + filter.append("hl_partition=").append(quoteString(partName));
    + }
    + String whereClause = filter.toString();
    +
    + if (!whereClause.isEmpty()) {
    + s = s + " where " + whereClause;
    + }
    +
    + LOG.debug("Doing to execute query <" + s + ">");
    + ResultSet rs = stmt.executeQuery(s);
    + while (rs.next()) {
    + ShowLocksResponseElement e = new ShowLocksResponseElement();
    + e.setLockid(rs.getLong(1));
    + long txnid = rs.getLong(2);
    + if (!rs.wasNull()) e.setTxnid(txnid);
    + e.setDbname(rs.getString(3));
    + e.setTablename(rs.getString(4));
    + String partition = rs.getString(5);
    + if (partition != null) e.setPartname(partition);
    + switch (rs.getString(6).charAt(0)) {
    + case LOCK_ACQUIRED: e.setState(LockState.ACQUIRED); break;
    + case LOCK_WAITING: e.setState(LockState.WAITING); break;
    + default: throw new MetaException("Unknown lock state " + rs.getString(6).charAt(0));
    + }
    + switch (rs.getString(7).charAt(0)) {
    + case LOCK_SEMI_SHARED: e.setType(LockType.SHARED_WRITE); break;
    + case LOCK_EXCLUSIVE: e.setType(LockType.EXCLUSIVE); break;
    + case LOCK_SHARED: e.setType(LockType.SHARED_READ); break;
    + default: throw new MetaException("Unknown lock type " + rs.getString(6).charAt(0));
    + }
    + e.setLastheartbeat(rs.getLong(8));
    + long acquiredAt = rs.getLong(9);
    + if (!rs.wasNull()) e.setAcquiredat(acquiredAt);
    + e.setUser(rs.getString(10));
    + e.setHostname(rs.getString(11));
    + e.setLockIdInternal(rs.getLong(12));
    + long id = rs.getLong(13);
    + if(!rs.wasNull()) {
    + e.setBlockedByExtId(id);
    + }
    + id = rs.getLong(14);
    + if(!rs.wasNull()) {
    + e.setBlockedByIntId(id);
    + }
    + sortedList.add(new LockInfoExt(e));
    + }
    + LOG.debug("Going to rollback");
    + dbConn.rollback();
    + } catch (SQLException e) {
    + checkRetryable(dbConn, e, "showLocks(" + rqst + ")");
    + throw new MetaException("Unable to select from transaction database " +
    + StringUtils.stringifyException(e));
    + } finally {
    + closeStmt(stmt);
    + closeDbConn(dbConn);
    + }
    + //this ensures that "SHOW LOCKS" prints the locks in the same order as they are examined
    + //by checkLock() - makes diagnostics easier.
    + Collections.sort(sortedList, new LockInfoComparator());
    + for(LockInfoExt lockInfoExt : sortedList) {
    + elems.add(lockInfoExt.e);
    + }
    + rsp.setLocks(elems);
    + return rsp;
    + } catch (RetryException e) {
    + return showLocks(rqst);
    + }
    + }
    +
    + /**
    + * {@code ids} should only have txnid or lockid but not both, ideally.
    + * Currently DBTxnManager.heartbeat() enforces this.
    + */
    + public void heartbeat(HeartbeatRequest ids)
    + throws NoSuchTxnException, NoSuchLockException, TxnAbortedException, MetaException {
    + try {
    + Connection dbConn = null;
    + try {
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + heartbeatLock(dbConn, ids.getLockid());
    + heartbeatTxn(dbConn, ids.getTxnid());
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "heartbeat(" + ids + ")");
    + throw new MetaException("Unable to select from transaction database " +
    + StringUtils.stringifyException(e));
    + } finally {
    + closeDbConn(dbConn);
    + }
    + } catch (RetryException e) {
    + heartbeat(ids);
    + }
    + }
    +
    + public HeartbeatTxnRangeResponse heartbeatTxnRange(HeartbeatTxnRangeRequest rqst)
    + throws MetaException {
    + try {
    + Connection dbConn = null;
    + HeartbeatTxnRangeResponse rsp = new HeartbeatTxnRangeResponse();
    + Set<Long> nosuch = new HashSet<Long>();
    + Set<Long> aborted = new HashSet<Long>();
    + rsp.setNosuch(nosuch);
    + rsp.setAborted(aborted);
    + try {
    + /**
    + * READ_COMMITTED is sufficient since {@link #heartbeatTxn(java.sql.Connection, long)}
    + * only has 1 update statement in it and
    + * we only update existing txns, i.e. nothing can add additional txns that this operation
    + * would care about (which would have required SERIALIZABLE)
    + */
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + for (long txn = rqst.getMin(); txn <= rqst.getMax(); txn++) {
    + try {
    + //todo: do all updates in 1 SQL statement and check update count
    + //if update count is less than was requested, go into more expensive checks
    + //for each txn
    + heartbeatTxn(dbConn, txn);
    + } catch (NoSuchTxnException e) {
    + nosuch.add(txn);
    + } catch (TxnAbortedException e) {
    + aborted.add(txn);
    + }
    + }
    + return rsp;
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "heartbeatTxnRange(" + rqst + ")");
    + throw new MetaException("Unable to select from transaction database " +
    + StringUtils.stringifyException(e));
    + } finally {
    + closeDbConn(dbConn);
    + }
    + } catch (RetryException e) {
    + return heartbeatTxnRange(rqst);
    + }
    + }
    +
    + long generateCompactionQueueId(Statement stmt) throws SQLException, MetaException {
    + // Get the id for the next entry in the queue
    + String s = addForUpdateClause("select ncq_next from NEXT_COMPACTION_QUEUE_ID");
    + LOG.debug("going to execute query <" + s + ">");
    + ResultSet rs = stmt.executeQuery(s);
    + if (!rs.next()) {
    + throw new IllegalStateException("Transaction tables not properly initiated, " +
    + "no record found in next_compaction_queue_id");
    + }
    + long id = rs.getLong(1);
    + s = "update NEXT_COMPACTION_QUEUE_ID set ncq_next = " + (id + 1);
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    + return id;
    + }
    + public long compact(CompactionRequest rqst) throws MetaException {
    + // Put a compaction request in the queue.
    + try {
    + Connection dbConn = null;
    + Statement stmt = null;
    + try {
    + lockInternal();
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    +
    + long id = generateCompactionQueueId(stmt);
    +
    + StringBuilder buf = new StringBuilder("insert into COMPACTION_QUEUE (cq_id, cq_database, " +
    + "cq_table, ");
    + String partName = rqst.getPartitionname();
    + if (partName != null) buf.append("cq_partition, ");
    + buf.append("cq_state, cq_type");
    + if (rqst.getRunas() != null) buf.append(", cq_run_as");
    + buf.append(") values (");
    + buf.append(id);
    + buf.append(", '");
    + buf.append(rqst.getDbname());
    + buf.append("', '");
    + buf.append(rqst.getTablename());
    + buf.append("', '");
    + if (partName != null) {
    + buf.append(partName);
    + buf.append("', '");
    + }
    + buf.append(INITIATED_STATE);
    + buf.append("', '");
    + switch (rqst.getType()) {
    + case MAJOR:
    + buf.append(MAJOR_TYPE);
    + break;
    +
    + case MINOR:
    + buf.append(MINOR_TYPE);
    + break;
    +
    + default:
    + LOG.debug("Going to rollback");
    + dbConn.rollback();
    + throw new MetaException("Unexpected compaction type " + rqst.getType().toString());
    + }
    + if (rqst.getRunas() != null) {
    + buf.append("', '");
    + buf.append(rqst.getRunas());
    + }
    + buf.append("')");
    + String s = buf.toString();
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    + LOG.debug("Going to commit");
    + dbConn.commit();
    + return id;
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "compact(" + rqst + ")");
    + throw new MetaException("Unable to select from transaction database " +
    + StringUtils.stringifyException(e));
    + } finally {
    + closeStmt(stmt);
    + closeDbConn(dbConn);
    + unlockInternal();
    + }
    + } catch (RetryException e) {
    + return compact(rqst);
    + }
    + }
    +
    + public ShowCompactResponse showCompact(ShowCompactRequest rqst) throws MetaException {
    + ShowCompactResponse response = new ShowCompactResponse(new ArrayList<ShowCompactResponseElement>());
    + Connection dbConn = null;
    + Statement stmt = null;
    + try {
    + try {
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + String s = "select cq_database, cq_table, cq_partition, cq_state, cq_type, cq_worker_id, " +
    + "cq_start, -1 cc_end, cq_run_as, cq_hadoop_job_id, cq_id from COMPACTION_QUEUE union all " +
    + "select cc_database, cc_table, cc_partition, cc_state, cc_type, cc_worker_id, " +
    + "cc_start, cc_end, cc_run_as, cc_hadoop_job_id, cc_id from COMPLETED_COMPACTIONS";
    + //what I want is order by cc_end desc, cc_start asc (but derby has a bug https://issues.apache.org/jira/browse/DERBY-6013)
    + //to sort so that currently running jobs are at the end of the list (bottom of screen)
    + //and currently running ones are in sorted by start time
    + //w/o order by likely currently running compactions will be first (LHS of Union)
    + LOG.debug("Going to execute query <" + s + ">");
    + ResultSet rs = stmt.executeQuery(s);
    + while (rs.next()) {
    + ShowCompactResponseElement e = new ShowCompactResponseElement();
    + e.setDbname(rs.getString(1));
    + e.setTablename(rs.getString(2));
    + e.setPartitionname(rs.getString(3));
    + switch (rs.getString(4).charAt(0)) {
    + case INITIATED_STATE: e.setState(INITIATED_RESPONSE); break;
    + case WORKING_STATE: e.setState(WORKING_RESPONSE); break;
    + case READY_FOR_CLEANING: e.setState(CLEANING_RESPONSE); break;
    + case FAILED_STATE: e.setState(FAILED_RESPONSE); break;
    + case SUCCEEDED_STATE: e.setState(SUCCEEDED_RESPONSE); break;
    + case ATTEMPTED_STATE: e.setState(ATTEMPTED_RESPONSE); break;
    + default:
    + //do nothing to handle RU/D if we add another status
    + }
    + switch (rs.getString(5).charAt(0)) {
    + case MAJOR_TYPE: e.setType(CompactionType.MAJOR); break;
    + case MINOR_TYPE: e.setType(CompactionType.MINOR); break;
    + default:
    + //do nothing to handle RU/D if we add another status
    + }
    + e.setWorkerid(rs.getString(6));
    + e.setStart(rs.getLong(7));
    + long endTime = rs.getLong(8);
    + if(endTime != -1) {
    + e.setEndTime(endTime);
    + }
    + e.setRunAs(rs.getString(9));
    + e.setHadoopJobId(rs.getString(10));
    + long id = rs.getLong(11);//for debugging
    + response.addToCompacts(e);
    + }
    + LOG.debug("Going to rollback");
    + dbConn.rollback();
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "showCompact(" + rqst + ")");
    + throw new MetaException("Unable to select from transaction database " +
    + StringUtils.stringifyException(e));
    + } finally {
    + closeStmt(stmt);
    + closeDbConn(dbConn);
    + }
    + return response;
    + } catch (RetryException e) {
    + return showCompact(rqst);
    + }
    + }
    +
    + private static void shouldNeverHappen(long txnid) {
    + throw new RuntimeException("This should never happen: " + JavaUtils.txnIdToString(txnid));
    + }
    + private static void shouldNeverHappen(long txnid, long extLockId, long intLockId) {
    + throw new RuntimeException("This should never happen: " + JavaUtils.txnIdToString(txnid) + " "
    + + JavaUtils.lockIdToString(extLockId) + " " + intLockId);
    + }
    +
    + public void addDynamicPartitions(AddDynamicPartitions rqst)
    + throws NoSuchTxnException, TxnAbortedException, MetaException {
    + Connection dbConn = null;
    + Statement stmt = null;
    + ResultSet lockHandle = null;
    + ResultSet rs = null;
    + try {
    + try {
    + lockInternal();
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + lockHandle = lockTransactionRecord(stmt, rqst.getTxnid(), TXN_OPEN);
    + if(lockHandle == null) {
    + //ensures txn is still there and in expected state
    + ensureValidTxn(dbConn, rqst.getTxnid(), stmt);
    + shouldNeverHappen(rqst.getTxnid());
    + }
    + //we should be able to get this from AddDynamicPartitions object longer term; in fact we'd have to
    + //for multi stmt txns if same table is written more than once per tx
    + // MoveTask knows if it's I/U/D
    + // MoveTask calls Hive.loadDynamicPartitions() which calls HiveMetaStoreClient.addDynamicPartitions()
    + // which ends up here so we'd need to add a field to AddDynamicPartitions.
    + String findOperationType = " tc_operation_type from TXN_COMPONENTS where tc_txnid=" + rqst.getTxnid()
    + + " and tc_database=" + quoteString(rqst.getDbname()) + " and tc_table=" + quoteString(rqst.getTablename());
    + //do limit 1 on this; currently they will all have the same operations
    + rs = stmt.executeQuery(addLimitClause(1, findOperationType));
    + if(!rs.next()) {
    + throw new IllegalStateException("Unable to determine tc_operation_type for " + JavaUtils.txnIdToString(rqst.getTxnid()));
    + }
    + OpertaionType ot = OpertaionType.fromString(rs.getString(1).charAt(0));
    +
    + //what if a txn writes the same table > 1 time... let's go with this for now, but really
    + //need to not write this in the first place, i.e. make this delete not needed
    + //see enqueueLockWithRetry() - that's where we write to TXN_COMPONENTS
    + String deleteSql = "delete from TXN_COMPONENTS where tc_txnid=" + rqst.getTxnid() + " and tc_database=" +
    + quoteString(rqst.getDbname()) + " and tc_table=" + quoteString(rqst.getTablename());
    + //we delete the entries made by enqueueLockWithRetry() since those are based on lock information which is
    + //much "wider" than necessary in a lot of cases. Here on the other hand, we know exactly which
    + //partitions have been written to. w/o this WRITE_SET would contain entries for partitions not actually
    + //written to
    + stmt.executeUpdate(deleteSql);
    + for (String partName : rqst.getPartitionnames()) {
    + String s =
    + "insert into TXN_COMPONENTS (tc_txnid, tc_database, tc_table, tc_partition, tc_operation_type) values (" +
    + rqst.getTxnid() + "," + quoteString(rqst.getDbname()) + "," + quoteString(rqst.getTablename()) +
    + "," + quoteString(partName) + "," + quoteChar(ot.sqlConst) + ")";
    + LOG.debug("Going to execute update <" + s + ">");
    + stmt.executeUpdate(s);
    + }
    + LOG.debug("Going to commit");
    + dbConn.commit();
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "addDynamicPartitions(" + rqst + ")");
    + throw new MetaException("Unable to insert into from transaction database " +
    + StringUtils.stringifyException(e));
    + } finally {
    + close(lockHandle, stmt, dbConn);
    + unlockInternal();
    + }
    + } catch (RetryException e) {
    + addDynamicPartitions(rqst);
    + }
    + }
    +
    + /**
    + * Clean up corresponding records in metastore tables, specifically:
    + * TXN_COMPONENTS, COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPACTIONS
    + */
    + public void cleanupRecords(HiveObjectType type, Database db, Table table,
    + Iterator<Partition> partitionIterator) throws MetaException {
    + try {
    + Connection dbConn = null;
    + Statement stmt = null;
    +
    + try {
    + String dbName;
    + String tblName;
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + List<String> queries = new ArrayList<String>();
    + StringBuilder buff = new StringBuilder();
    +
    + switch (type) {
    + case DATABASE:
    + dbName = db.getName();
    +
    + buff.append("delete from TXN_COMPONENTS where tc_database='");
    + buff.append(dbName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPLETED_TXN_COMPONENTS where ctc_database='");
    + buff.append(dbName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPACTION_QUEUE where cq_database='");
    + buff.append(dbName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPLETED_COMPACTIONS where cc_database='");
    + buff.append(dbName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + break;
    + case TABLE:
    + dbName = table.getDbName();
    + tblName = table.getTableName();
    +
    + buff.append("delete from TXN_COMPONENTS where tc_database='");
    + buff.append(dbName);
    + buff.append("' and tc_table='");
    + buff.append(tblName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPLETED_TXN_COMPONENTS where ctc_database='");
    + buff.append(dbName);
    + buff.append("' and ctc_table='");
    + buff.append(tblName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPACTION_QUEUE where cq_database='");
    + buff.append(dbName);
    + buff.append("' and cq_table='");
    + buff.append(tblName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPLETED_COMPACTIONS where cc_database='");
    + buff.append(dbName);
    + buff.append("' and cc_table='");
    + buff.append(tblName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + break;
    + case PARTITION:
    + dbName = table.getDbName();
    + tblName = table.getTableName();
    + List<FieldSchema> partCols = table.getPartitionKeys(); // partition columns
    + List<String> partVals; // partition values
    + String partName;
    +
    + while (partitionIterator.hasNext()) {
    + Partition p = partitionIterator.next();
    + partVals = p.getValues();
    + partName = Warehouse.makePartName(partCols, partVals);
    +
    + buff.append("delete from TXN_COMPONENTS where tc_database='");
    + buff.append(dbName);
    + buff.append("' and tc_table='");
    + buff.append(tblName);
    + buff.append("' and tc_partition='");
    + buff.append(partName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPLETED_TXN_COMPONENTS where ctc_database='");
    + buff.append(dbName);
    + buff.append("' and ctc_table='");
    + buff.append(tblName);
    + buff.append("' and ctc_partition='");
    + buff.append(partName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPACTION_QUEUE where cq_database='");
    + buff.append(dbName);
    + buff.append("' and cq_table='");
    + buff.append(tblName);
    + buff.append("' and cq_partition='");
    + buff.append(partName);
    + buff.append("'");
    + queries.add(buff.toString());
    +
    + buff.setLength(0);
    + buff.append("delete from COMPLETED_COMPACTIONS where cc_database='");
    + buff.append(dbName);
    + buff.append("' and cc_table='");
    + buff.append(tblName);
    + buff.append("' and cc_partition='");
    + buff.append(partName);
    + buff.append("'");
    + queries.add(buff.toString());
    + }
    +
    + break;
    + default:
    + throw new MetaException("Invalid object type for cleanup: " + type);
    + }
    +
    + for (String query : queries) {
    + LOG.debug("Going to execute update <" + query + ">");
    + stmt.executeUpdate(query);
    + }
    +
    + LOG.debug("Going to commit");
    + dbConn.commit();
    + } catch (SQLException e) {
    + LOG.debug("Going to rollback");
    + rollbackDBConn(dbConn);
    + checkRetryable(dbConn, e, "cleanupRecords");
    + if (e.getMessage().contains("does not exist")) {
    + LOG.warn("Cannot perform cleanup since metastore table does not exist");
    + } else {
    + throw new MetaException("Unable to clean up " + StringUtils.stringifyException(e));
    + }
    + } finally {
    + closeStmt(stmt);
    + closeDbConn(dbConn);
    + }
    + } catch (RetryException e) {
    + cleanupRecords(type, db, table, partitionIterator);
    + }
    + }
    +
    + /**
    + * For testing only, do not use.
    + */
    + @VisibleForTesting
    + public int numLocksInLockTable() throws SQLException, MetaException {
    + Connection dbConn = null;
    + Statement stmt = null;
    + ResultSet rs = null;
    + try {
    + dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
    + stmt = dbConn.createStatement();
    + String s = "select count(*) from HIVE_LOCKS";
    + LOG.debug("Going to execute query <" + s + ">");
    + rs = stmt.executeQuery(s);
    + rs.next();
    + int rc = rs.getInt(1);
    + // Necessary to clean up the transaction in the db.
    + dbConn.rollback();
    + return rc;
    + } finally {
    + close(rs, stmt, dbConn);
    + }
    + }
    +
    + /**
    + * For testing only, do not use.
    + */
    + public long setTimeout(long milliseconds) {
    + long previous_timeout = timeout;
    + timeout = milliseconds;
    + return previous_timeout;
    + }
    +
    + protected class RetryException extends Exception {
    +
    + }
    +
    + protected Connection getDbConn(int isolationLevel) throws SQLException {
    + int rc = doRetryOnConnPool ? 10 : 1;
    + Connection dbConn = null;
    + while (true) {
    + try {
    + dbConn = connPool.getConnection();
    + dbConn.setAutoCommit(false);
    + dbConn.setTransactionIsolation(isolationLevel);
    + return dbConn;
    + } catch (SQLException e){
    + closeDbConn(dbConn);
    + if ((--rc) <= 0) throw e;
    + LOG.error("There is a problem with a connection from the pool, retrying(rc=" + rc + "): " +
    + getMessage(e), e);
    + }
    + }
    + }
    +
    + static void rollbackDBConn(Connection dbConn) {
    + try {
    + if (dbConn != null && !dbConn.isClosed()) dbConn.rollback();
    + } catch (SQLException e) {
    + LOG.warn("Failed to rollback db connection " + getMessage(e));
    + }
    + }
    + protected static void closeDbConn(Connection dbConn) {
    + try {
    + if (dbConn != null && !dbConn.isClosed()) {
    + dbConn.close();
    + }
    + } catch (SQLException e) {
    + LOG.warn("Failed to close db connection " + getMessage(e));
    + }
    + }
    +
    + /**
    + * Close statement instance.
    + * @param stmt statement instance.
    + */
    + protected static void closeStmt(Statement stmt) {
    + try {
    + if (stmt != null && !stmt.isClosed()) stmt.close();
    + } catch (SQLException e) {
    + LOG.warn("Failed to close statement " + getMessage(e));
    + }
    + }
    +
    + /**
    + * Close the ResultSet.
    + * @param rs may be {@code null}
    + */
    + static void close(ResultSet rs) {
    + try {
    + if (rs != null && !rs.isClosed()) {
    + rs.close();
    + }
    + }
    + catch(SQLException ex) {
    + LOG.warn("Failed to close statement " + getMessage(ex));
    + }
    + }
    +
    + /**
    + * Close all 3 JDBC artifacts in order: {@code rs stmt dbConn}
    + */
    + static void close(ResultSet rs, Statement stmt, Connection dbConn) {
    + close(rs);
    + closeStmt(stmt);
    + closeDbConn(dbConn);
    + }
    + /**
    + * Determine if an exception was such that it makes sense to retry. Unfortunately there is no standard way to do
    + * this, so we have to inspect the error messages and catch the telltale signs for each
    + * different database. This method will throw {@code RetryException}
    + * if the error is retry-able.
    + * @param conn database connection
    + * @param e exception that was thrown.
    + * @param caller name of the method calling this (and other info useful to log)
    + * @throws org.apache.hadoop.hive.metastore.txn.TxnHandler.RetryException when the operation should be retried
    + */
    + protected void checkRetryable(Connection conn,
    + SQLException e,
    + String caller) throws RetryException, MetaException {
    +
    + // If you change this function, remove the @Ignore from TestTxnHandler.deadlockIsDetected()
    + // to test these changes.
    + // MySQL and MSSQL use 40001 as the state code for rollback. Postgres uses 40001 and 40P01.
    + // Oracle seems to return different SQLStates and messages each time,
    + // so I've tried to capture the different error messages (there appear to be fewer different
    + // error messages than SQL states).
    + // Derby and newer MySQL driver use the new SQLTransactionRollbackException
    + boolean sendRetrySignal = false;
    + try {
    + if(dbProduct == null) {
    + throw new IllegalStateException("DB Type not determined yet.");
    + }
    + if (e instanceof SQLTransactionRollbackException ||
    + ((dbProduct == DatabaseProduct.MYSQL || dbProduct == DatabaseProduct.POSTGRES ||
    + dbProduct == DatabaseProduct.SQLSERVER) && e.getSQLState().equals("40001")) ||
    + (dbProduct == DatabaseProduct.POSTGRES && e.getSQLState().equals("40P01")) ||
    + (dbProduct == DatabaseProduct.ORACLE && (e.getMessage().contains("deadlock detected")
    + || e.getMessage().contains("can't serialize access for this transaction")))) {
    + if (deadlockCnt++ < ALLOWED_REPEATED_DEADLOCKS) {
    + long waitInterval = deadlockRetryInterval * deadlockCnt;
    + LOG.warn("Deadlock detected in " + caller + ". Will wait " + waitInterval +
    + "ms try again up to " + (ALLOWED_REPEATED_DEADLOCKS - deadlockCnt + 1) + " times.");
    + // Pause for a just a bit for retrying to avoid immediately jumping back into the deadlock.
    + try {
    + Thread.sleep(waitInterval);
    + } catch (InterruptedException ie) {
    + // NOP
    + }
    + sendRetrySignal = true;
    + } else {
    + LOG.error("Too many repeated deadlocks in " + caller + ", giving up.");
    + }
    + } else if (isRetryable(conf, e)) {
    + //in MSSQL this means Communication Link Failure
    + if (retryNum++ < retryLimit) {
    + LOG.warn("Retryable error detected in " + caller + ". Will wait " + retryInterval +
    + "ms and retry up to " + (retryLimit - retryNum + 1) + " times. Error: " + getMessage(e));
    + try {
    + Thread.sleep(retryInterval);
    + } catch (InterruptedException ex) {
    + //
    + }
    + sendRetrySignal = true;
    + } else {
    + LOG.error("Fatal error. Retry limit (" + retryLimit + ") reached. Last error: " + getMessage(e));
    + }
    + }
    + else {
    + //make sure we know we saw an error that we don't recognize
    + LOG.info("Non-retryable error: " + getMessage(e));
    + }
    + }
    + finally {
    + /*if this method ends with anything except a retry signal, the caller should fail the operation
    + and propagate the error up to the its caller (Metastore client); thus must reset retry counters*/
    + if(!sendRetrySignal) {
    + deadlockCnt = 0;
    + retryNum = 0;
    + }
    + }
    + if(sendRetrySignal) {
    + throw new RetryException();
    + }
    + }
    +
    + /**
    + * Determine the current time, using the RDBMS as a source of truth
    + * @param conn database connection
    + * @return current time in milliseconds
    + * @throws org.apache.hadoop.hive.metastore.api.MetaException if the time cannot be determined
    + */
    + protected long getDbTime(Connection conn) throws MetaException {
    + Statement stmt = null;
    + try {
    + stmt = conn.createStatement();
    + String s;
    + switch (dbProduct) {
    + case DERBY:
    + s = "values current_timestamp";
    + break;
    +
    + case MYSQL:
    + case POSTGRES:
    + case SQLSERVER:
    + s = "select current_timestamp";
    + break;
    +
    + case ORACLE:
    + s = "select current_timestamp from dual";
    + break;
    +
    + default:
    + String msg = "Unknown database product: " + dbProduct.toString();
    + LOG.error(msg);
    + throw new MetaException(msg);
    + }
    + LOG.debug("Going to execute query <" + s + ">");
    + ResultSet rs = stmt.executeQuery(s);
    + if (!rs.next()) throw new MetaException("No results from date query");
    + return rs.getTimestamp(1).getTime();
    + } catch (SQLException e) {
    + String msg = "Unable to determine current time: " + e.getMessage();
    + LOG.error(msg);
    + throw new MetaException(msg);
    + } finally {
    + closeStmt(stmt);
    + }
    + }
    +
    + /**
    + * Determine the String that should be used to quote identifiers.
    + * @param conn Active connection
    + * @return quotes
    + * @throws SQLException
    + */
    + protected String getIdentifierQuoteString(Connection conn) throws SQLException {
    + if (identifierQuoteString == null) {
    + identifierQuoteString = conn.getMetaData().getIdentifierQuoteString();
    + }
    + return identifierQuoteString;
    + }
    +
    + protected enum DatabaseProduct { DERBY, MYSQL, POSTGRES, ORACLE, SQLSERVER}
    +
    + /**
    + * Determine the database product type
    + * @param conn database connection
    + * @return database product type
    + */
    + private DatabaseProduct determineDatabaseProduct(Connection conn) {
    + if (dbProduct == null) {
    + try {
    + String s = conn.getMetaData().getDatabaseProductName();
    + if (s == null) {
    + String msg = "getDatabaseProductName returns null, can't determine database product";
    + LOG.error(msg);
    + throw new IllegalStateException(msg);
    + } else if (s.equals("Apache Derby")) {
    + dbProduct = DatabaseProduct.DERBY;
    + } else if (s.equals("Microsoft SQL Server")) {
    + dbProduct = DatabaseProduct.SQLSERVER;
    + } else if (s.equals("MySQL")) {
    + dbProduct = DatabaseProduct.MYSQL;
    + } else if (s.equals("Oracle")) {
    + dbProduct = DatabaseProduct.ORACLE;
    + } else if (s.equals("PostgreSQL")) {
    + dbProduct = DatabaseProduct.POSTGRES;
    + } else {
    + String msg = "Unrecognized database product name <" + s + ">";
    + LOG.error(msg);
    + throw new IllegalStateException(msg);
    + }
    +
    + } catch (SQLException e) {
    + String msg = "Unable to get database product name: " + e.getMessage();
    + LOG.error(msg);
    + throw new IllegalStateException(msg);
    + }
    + }
    + return dbProduct;
    + }
    +
    + private static class LockInfo {
    + private final long extLockId;
    + private final long intLockId;
    + //0 means there is no transaction, i.e. it a select statement which is not part of
    + //explicit transaction or a IUD statement that is not writing to ACID table
    + private final long txnId;
    + private final String db;
    + private final String table;
    + private final String partition;
    + private final LockState state;
    + private final LockType type;
    +
    + // Assumes the result set is set to a valid row
    + LockInfo(ResultSet rs) throws SQLException, MetaException {
    + extLockId = rs.getLong("hl_lock_ext_id"); // can't be null
    + intLockId = rs.getLong("hl_lock_int_id"); // can't be null
    + db = rs.getString("hl_db"); // can't be null
    + String t = rs.getString("hl_table");
    + table = (rs.wasNull() ? null : t);
    + String p = rs.getString("hl_partition");
    + partition = (rs.wasNull() ? null : p);
    + switch (rs.getString("hl_lock_state").charAt(0)) {
    + case LOCK_WAITING: state = LockState.WAITING; break;
    + case LOCK_ACQUIRED: state = LockState.ACQUIRED; break;
    + default:
    + throw new MetaException("Unknown lock state " + rs.getString("hl_lock_state").charAt(0));
    + }
    + switch (rs.getString("hl_lock_type").charAt(0)) {
    + case LOCK_EXCLUSIVE: type = LockType.EXCLUSIVE; break;
    + case LOCK_SHARED: type = LockType.SHARED_READ; break;
    + case LOCK_SEMI_SHARED: type = LockType.SHARED_WRITE; break;
    + default:
    + throw new MetaException("Unknown lock type " + rs.getString("hl_lock_type").charAt(0));
    + }
    + txnId = rs.getLong("hl_txnid");//returns 0 if value is NULL
    + }
    + LockInfo(ShowLocksResponseElement e) {
    + extLockId = e.getLockid();
    + intLockId = e.getLockIdInternal();
    + txnId = e.getTxnid();
    + db = e.getDbname();
    + table = e.getTablename();
    + partition = e.getPartname();
    + state = e.getState();
    + type = e.getType();
    + }
    +
    + public boolean equals(Object other) {
    + if (!(other instanceof LockInfo)) return false;
    + LockInfo o = (LockInfo)other;
    + // Lock ids are unique across the system.
    + return extLockId == o.extLockId && intLockId == o.intLockId;
    + }
    +
    + @Override
    + public String toString() {
    + return JavaUtils.lockIdToString(extLockId) + " intLockId:" +
    + intLockId + " " + JavaUtils.txnIdToString(txnId)
    + + " db:" + db + " table:" + table + " partition:" +
    + partition + " state:" + (state == null ? "null" : state.toString())
    + + " type:" + (type == null ? "null" : type.toString());
    + }
    + private boolean isDbLock() {
    + return db != null && table == null && partition == null;
    + }
    + private boolean isTableLock() {
    + return db != null && table != null && partition == null;
    + }
    + }
    +
    + private static class LockInfoComparator implements Comparator<LockInfo> {
    + private static final LockTypeComparator lockTypeComparator = new LockTypeComparator();
    + public boolean equals(Object other) {
    + return this == other;
    + }
    +
    + public int compare(LockInfo info1, LockInfo info2) {
    + // We sort by state (acquired vs waiting) and then by LockType, they by id
    + if (info1.state == LockState.ACQUIRED &&
    + info2.state != LockState .ACQUIRED) {
    + return -1;
    + }
    + if (info1.state != LockState.ACQUIRED &&
    + info2.state == LockState .ACQUIRED) {
    + return 1;
    + }
    +
    + int sortByType = lockTypeComparator.compare(info1.type, info2.type);
    + if(sortByType != 0) {
    + return sortByType;
    + }
    + if (info1.extLockId < info2.extLockId) {
    + return -1;
    + } else if (info1.extLockId > info2.extLockId) {
    + return 1;
    + } else {
    + if (info1.intLockId < info2.intLockId) {
    + return -1;
    + } else i

    <TRUNCATED>
  • Ekoifman at May 19, 2016 at 8:00 pm
    Repository: hive
    Updated Branches:
       refs/heads/branch-1 6c6583274 -> c0b532fce


    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
    ----------------------------------------------------------------------
    diff --git a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java b/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
    index 0770298..584cd45 100644
    --- a/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
    +++ b/ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java
    @@ -18,6 +18,7 @@
      package org.apache.hadoop.hive.ql.lockmgr;

      import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.txn.TxnStore;
      import org.apache.hadoop.hive.metastore.txn.TxnUtils;
      import org.apache.hadoop.hive.ql.TestTxnCommands2;
    @@ -854,8 +855,10 @@ public class TestDbTxnManager2 {
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", null, locks.get(1));
          //update stmt has p=blah, thus nothing is actually update and we generate empty dyn part list
          Assert.assertEquals(0, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET"));
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
    - "default", "tab2", Collections.EMPTY_LIST));
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
    + "default", "tab2", Collections.EMPTY_LIST);
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr2.commitTxn();
          //Short Running updated nothing, so we expect 0 rows in WRITE_SET
          Assert.assertEquals( 0, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET"));
    @@ -869,8 +872,10 @@ public class TestDbTxnManager2 {
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", null, locks.get(1));//since TAB2 is empty
          //update stmt has p=blah, thus nothing is actually update and we generate empty dyn part list
          Assert.assertEquals(0, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET"));
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
    - "default", "tab2", Collections.singletonList("p=two")));//simulate partition update
    + adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(),
    + "default", "tab2", Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);//simulate partition update
          txnMgr2.commitTxn();
          Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
            1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET"));
    @@ -882,8 +887,10 @@ public class TestDbTxnManager2 {
          checkCmdOnDriver(driver.compileAndRespond("update TAB2 set b = 17 where a = 1"));//no rows match
          txnMgr.acquireLocks(driver.getPlan(), ctx, "Long Running");
          //so generate empty Dyn Part call
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(),
    - "default", "tab2", Collections.EMPTY_LIST));
    + adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(),
    + "default", "tab2", Collections.EMPTY_LIST);
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr.commitTxn();

          locks = getLocks(txnMgr);
    @@ -984,16 +991,20 @@ public class TestDbTxnManager2 {
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", "p=one", locks.get(1));

          //this simulates the completion of txnid:2
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab2",
    - Collections.singletonList("p=two")));
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab2",
    + Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr2.commitTxn();//txnid:2

          locks = getLocks(txnMgr2);
          Assert.assertEquals("Unexpected lock count", 1, locks.size());
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB2", "p=one", locks.get(0));
          //completion of txnid:3
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab2",
    - Collections.singletonList("p=one")));
    + adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab2",
    + Collections.singletonList("p=one"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr.commitTxn();//txnid:3
          //now both txns concurrently updated TAB2 but different partitions.

    @@ -1031,8 +1042,10 @@ public class TestDbTxnManager2 {
          checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=one", locks.get(3));

          //this simulates the completion of txnid:5
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=one")));
    + adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=one"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr2.commitTxn();//txnid:5

          ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
    @@ -1041,8 +1054,10 @@ public class TestDbTxnManager2 {
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(1));
          //completion of txnid:6
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=two")));
    + adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr.commitTxn();//txnid:6

          Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
    @@ -1082,8 +1097,10 @@ public class TestDbTxnManager2 {
          checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(2));

          //this simulates the completion of txnid:2
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=one")));
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=one"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr2.commitTxn();//txnid:2

          ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
    @@ -1091,8 +1108,10 @@ public class TestDbTxnManager2 {
          Assert.assertEquals("Unexpected lock count", 1, locks.size());
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
          //completion of txnid:3
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=two")));
    + adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr.commitTxn();//txnid:3

          Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
    @@ -1131,8 +1150,10 @@ public class TestDbTxnManager2 {
          checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(2));

          //this simulates the completion of txnid:2
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=one")));
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=one"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr2.commitTxn();//txnid:2

          ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
    @@ -1140,14 +1161,22 @@ public class TestDbTxnManager2 {
          Assert.assertEquals("Unexpected lock count", 1, locks.size());
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
          //completion of txnid:3
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=two")));
    + adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.DELETE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr.commitTxn();//txnid:3

    + Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
    + 2, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=1 and ctc_table='tab1'"));
    + Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
    + 1, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=2 and ctc_table='tab1' and ctc_partition='p=one'"));
    + Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
    + 1, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=3 and ctc_table='tab1' and ctc_partition='p=two'"));
          Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
            1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=one' and ws_operation_type='u' and ws_table='tab1'"));
          Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
    - 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='u' and ws_table='tab1'"));
    + 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1'"));
          Assert.assertEquals("COMPLETED_TXN_COMPONENTS mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
            4, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_table='tab1' and ctc_partition is not null"));
        }
    @@ -1180,8 +1209,10 @@ public class TestDbTxnManager2 {
          checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(2));

          //this simulates the completion of txnid:2
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=two")));
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.UPDATE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr2.commitTxn();//txnid:2

          ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
    @@ -1189,8 +1220,10 @@ public class TestDbTxnManager2 {
          Assert.assertEquals("Unexpected lock count", 1, locks.size());
          checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
          //completion of txnid:3
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=two")));
    + adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.DELETE);
    + txnHandler.addDynamicPartitions(adp);
          LockException exception = null;
          try {
            txnMgr.commitTxn();//txnid:3
    @@ -1210,11 +1243,7 @@ public class TestDbTxnManager2 {
        }
        /**
         * Concurrent delte/detele of same partition - should pass
    - * This test doesn't work yet, because we don't yet pass in operation type
    - *
    - * todo: Concurrent insert/update of same partition - should pass
         */
    - @Ignore("HIVE-13622")
        @Test
        public void testWriteSetTracking11() throws Exception {
          CommandProcessorResponse cpr = driver.run("create table if not exists tab1 (a int, b int) partitioned by (p string) " +
    @@ -1232,46 +1261,86 @@ public class TestDbTxnManager2 {

          //now start concurrent txn
          txnMgr.openTxn("T3");
    + checkCmdOnDriver(driver.compileAndRespond("select * from tab1 where b=1 and p='one'"));
    + ((DbTxnManager)txnMgr).acquireLocks(driver.getPlan(), ctx, "T3", false);
          checkCmdOnDriver(driver.compileAndRespond("delete from tab1 where p='two' and b=2"));
          ((DbTxnManager)txnMgr).acquireLocks(driver.getPlan(), ctx, "T3", false);
          locks = getLocks(txnMgr);
    - Assert.assertEquals("Unexpected lock count", 3, locks.size());
    - checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
    - checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(1));
    - checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(2));
    + Assert.assertEquals("Unexpected lock count", 5, locks.size());
    + checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", null, locks.get(0));
    + checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(1));
    + checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(2));
    + checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(3));
    + checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "TAB1", "p=two", locks.get(4));

          //this simulates the completion of txnid:2
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=two")));
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnMgr2.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.DELETE);
    + txnHandler.addDynamicPartitions(adp);
          txnMgr2.commitTxn();//txnid:2

    - ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(2).getLockid());//retest WAITING locks (both have same ext id)
    + ((DbLockManager)txnMgr.getLockManager()).checkLock(locks.get(4).getLockid());//retest WAITING locks (both have same ext id)
          locks = getLocks(txnMgr);
    - Assert.assertEquals("Unexpected lock count", 1, locks.size());
    - checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(0));
    + Assert.assertEquals("Unexpected lock count", 3, locks.size());
    + checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", null, locks.get(0));
    + checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "TAB1", "p=one", locks.get(1));
    + checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "TAB1", "p=two", locks.get(2));
          //completion of txnid:3
    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    - Collections.singletonList("p=two")));
    - LockException exception = null;
    - try {
    - txnMgr.commitTxn();//txnid:3
    - }
    - catch(LockException e) {
    - exception = e;
    - }
    - Assert.assertNotEquals("Expected exception", null, exception);
    - Assert.assertEquals("Exception msg doesn't match",
    - "Aborting [txnid:3,3] due to a write conflict on default/tab1/p=two committed by [txnid:2,3]",
    - exception.getCause().getMessage());
    + adp = new AddDynamicPartitions(txnMgr.getCurrentTxnId(), "default", "tab1",
    + Collections.singletonList("p=two"));
    + adp.setOperationType(DataOperationType.DELETE);
    + txnHandler.addDynamicPartitions(adp);
    + txnMgr.commitTxn();//txnid:3

    - //todo: this currently fails since we don't yet set operation type properly
          Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
    - 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1'"));
    + 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1' and ws_txnid=2"));
          Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
    - 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1'"));
    + 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1' and ws_txnid=3"));
    + Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
    + 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1' and ws_txnid=2"));
    + Assert.assertEquals("WRITE_SET mismatch: " + TxnDbUtil.queryToString("select * from WRITE_SET"),
    + 1, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET where ws_partition='p=two' and ws_operation_type='d' and ws_table='tab1' and ws_txnid=3"));
          Assert.assertEquals("COMPLETED_TXN_COMPONENTS mismatch: " + TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
            4, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_table='tab1' and ctc_partition is not null"));
        }
    + @Test
    + public void testCompletedTxnComponents() throws Exception {
    + CommandProcessorResponse cpr = driver.run("create table if not exists tab1 (a int, b int) partitioned by (p string) " +
    + "clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true')");
    + checkCmdOnDriver(cpr);
    + cpr = driver.run("create table if not exists tab_not_acid2 (a int, b int)");
    + checkCmdOnDriver(cpr);
    + checkCmdOnDriver(driver.run("insert into tab_not_acid2 values(1,1),(2,2)"));
    + //writing both acid and non-acid resources in the same txn
    + checkCmdOnDriver(driver.run("from tab_not_acid2 insert into tab1 partition(p='two')(a,b) select a,b insert into tab_not_acid2(a,b) select a,b "));//txnid:1
    + Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
    + 1, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS"));
    + //only expect transactional components to be in COMPLETED_TXN_COMPONENTS
    + Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
    + 1, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=1 and ctc_table='tab1'"));
    + }
    + @Test
    + public void testMultiInsert() throws Exception {
    + CommandProcessorResponse cpr = driver.run("create table if not exists tab1 (a int, b int) partitioned by (p string) " +
    + "clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true')");
    + checkCmdOnDriver(cpr);
    + cpr = driver.run("create table if not exists tab_not_acid (a int, b int, p string)");
    + checkCmdOnDriver(cpr);
    + checkCmdOnDriver(driver.run("insert into tab_not_acid values(1,1,'one'),(2,2,'two')"));
    + checkCmdOnDriver(driver.run("insert into tab1 partition(p) values(3,3,'one'),(4,4,'two')"));//txinid:1
    + //writing both acid and non-acid resources in the same txn
    + //tab1 write is a dynamic partition insert
    + checkCmdOnDriver(driver.run("from tab_not_acid insert into tab1 partition(p)(a,b,p) select a,b,p insert into tab_not_acid(a,b) select a,b where p='two'"));//txnid:2
    + Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
    + 4, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS"));
    + //only expect transactional components to be in COMPLETED_TXN_COMPONENTS
    + Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
    + 2, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=2"));
    + Assert.assertEquals(TxnDbUtil.queryToString("select * from COMPLETED_TXN_COMPONENTS"),
    + 2, TxnDbUtil.countQueryAgent("select count(*) from COMPLETED_TXN_COMPONENTS where ctc_txnid=2 and ctc_table='tab1'"));
    + }
    + //todo: Concurrent insert/update of same partition - should pass

        private List<ShowLocksResponseElement> getLocksWithFilterOptions(HiveTxnManager txnMgr,
            String dbName, String tblName, Map<String, String> partSpec) throws Exception {

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
    ----------------------------------------------------------------------
    diff --git a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
    index 8d75ab3..b797b55 100644
    --- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
    +++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java
    @@ -208,6 +208,7 @@ public class TestCleaner extends CompactorTest {

          LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "default");
          comp.setTablename("bblt");
    + comp.setOperationType(DataOperationType.SELECT);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -246,6 +247,7 @@ public class TestCleaner extends CompactorTest {
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
          comp.setTablename("bblp");
          comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.DELETE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -288,6 +290,7 @@ public class TestCleaner extends CompactorTest {

          LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "default");
          comp.setTablename("bblt");
    + comp.setOperationType(DataOperationType.INSERT);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -311,6 +314,7 @@ public class TestCleaner extends CompactorTest {
          // clean request
          LockComponent comp2 = new LockComponent(LockType.SHARED_READ, LockLevel.TABLE, "default");
          comp2.setTablename("bblt");
    + comp.setOperationType(DataOperationType.SELECT);
          List<LockComponent> components2 = new ArrayList<LockComponent>(1);
          components2.add(comp2);
          LockRequest req2 = new LockRequest(components, "me", "localhost");
    @@ -360,6 +364,7 @@ public class TestCleaner extends CompactorTest {
          LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.PARTITION, "default");
          comp.setTablename("bblt");
          comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.INSERT);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -385,6 +390,7 @@ public class TestCleaner extends CompactorTest {
          LockComponent comp2 = new LockComponent(LockType.SHARED_READ, LockLevel.PARTITION, "default");
          comp2.setTablename("bblt");
          comp2.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.SELECT);
          List<LockComponent> components2 = new ArrayList<LockComponent>(1);
          components2.add(comp2);
          LockRequest req2 = new LockRequest(components, "me", "localhost");

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
    ----------------------------------------------------------------------
    diff --git a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
    index f84bd7e..bbd2bf8 100644
    --- a/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
    +++ b/ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java
    @@ -110,6 +110,7 @@ public class TestInitiator extends CompactorTest {
            long txnid = openTxn();
            LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
            comp.setTablename("mcottma");
    + comp.setOperationType(DataOperationType.UPDATE);
            List<LockComponent> components = new ArrayList<LockComponent>(1);
            components.add(comp);
            LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -140,6 +141,7 @@ public class TestInitiator extends CompactorTest {
            LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
            comp.setTablename("mcoptma");
            comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.DELETE);
            List<LockComponent> components = new ArrayList<LockComponent>(1);
            components.add(comp);
            LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -173,6 +175,7 @@ public class TestInitiator extends CompactorTest {
            LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
            comp.setTablename("ncomdpa");
            comp.setPartitionname("ds=day-" + i);
    + comp.setOperationType(DataOperationType.UPDATE);
            List<LockComponent> components = new ArrayList<LockComponent>(1);
            components.add(comp);
            LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -197,6 +200,7 @@ public class TestInitiator extends CompactorTest {
          long txnid = openTxn();
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
          comp.setTablename("ceat");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -229,6 +233,7 @@ public class TestInitiator extends CompactorTest {
            long txnid = openTxn();
            LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
            comp.setTablename("ncwncs");
    + comp.setOperationType(DataOperationType.UPDATE);
            List<LockComponent> components = new ArrayList<LockComponent>(1);
            components.add(comp);
            LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -254,6 +259,7 @@ public class TestInitiator extends CompactorTest {
          for (int i = 0; i < 11; i++) {
            long txnid = openTxn();
            LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
    + comp.setOperationType(DataOperationType.DELETE);
            comp.setTablename("ncwncs");
            List<LockComponent> components = new ArrayList<LockComponent>(1);
            components.add(comp);
    @@ -279,6 +285,7 @@ public class TestInitiator extends CompactorTest {
            long txnid = openTxn();
            LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
            comp.setTablename("ncwcas");
    + comp.setOperationType(DataOperationType.UPDATE);
            List<LockComponent> components = new ArrayList<LockComponent>(1);
            components.add(comp);
            LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -319,6 +326,7 @@ public class TestInitiator extends CompactorTest {
          long txnid = openTxn();
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
          comp.setTablename("cthdp");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -351,6 +359,7 @@ public class TestInitiator extends CompactorTest {
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
          comp.setTablename("cphdp");
          comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -382,6 +391,7 @@ public class TestInitiator extends CompactorTest {
          long txnid = openTxn();
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
          comp.setTablename("nctdpnhe");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -417,6 +427,7 @@ public class TestInitiator extends CompactorTest {
          long txnid = openTxn();
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
          comp.setTablename("cttmd");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -458,6 +469,7 @@ public class TestInitiator extends CompactorTest {
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
          comp.setTablename("cptmd");
          comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -489,6 +501,7 @@ public class TestInitiator extends CompactorTest {
          long txnid = openTxn();
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
          comp.setTablename("nctned");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -524,6 +537,7 @@ public class TestInitiator extends CompactorTest {
          long txnid = openTxn();
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
          comp.setTablename("cmomwbv");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -564,6 +578,7 @@ public class TestInitiator extends CompactorTest {
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
          comp.setTablename("ednb");
          comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.DELETE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -597,6 +612,7 @@ public class TestInitiator extends CompactorTest {
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
          comp.setTablename("ttospgocr");
          comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -608,6 +624,7 @@ public class TestInitiator extends CompactorTest {
          comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
          comp.setTablename("ttospgocr");
          comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.UPDATE);
          components = new ArrayList<LockComponent>(1);
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -640,6 +657,7 @@ public class TestInitiator extends CompactorTest {
          long txnid = openTxn();
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, "default");
          comp.setTablename("nctdp");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -667,6 +685,7 @@ public class TestInitiator extends CompactorTest {
          long txnid = openTxn();
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
          comp.setTablename("dt");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -698,6 +717,7 @@ public class TestInitiator extends CompactorTest {
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.PARTITION, "default");
          comp.setTablename("dp");
          comp.setPartitionname("ds=today");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote
    ----------------------------------------------------------------------
    diff --git a/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote b/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote
    index af2d93d..cbdbd56 100755
    --- a/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote
    +++ b/service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote
    @@ -145,6 +145,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
        print(' GetOpenTxnsInfoResponse get_open_txns_info()')
        print(' OpenTxnsResponse open_txns(OpenTxnRequest rqst)')
        print(' void abort_txn(AbortTxnRequest rqst)')
    + print(' void abort_txns(AbortTxnsRequest rqst)')
        print(' void commit_txn(CommitTxnRequest rqst)')
        print(' LockResponse lock(LockRequest rqst)')
        print(' LockResponse check_lock(CheckLockRequest rqst)')
    @@ -953,6 +954,12 @@ elif cmd == 'abort_txn':
          sys.exit(1)
        pp.pprint(client.abort_txn(eval(args[0]),))

    +elif cmd == 'abort_txns':
    + if len(args) != 1:
    + print('abort_txns requires 1 args')
    + sys.exit(1)
    + pp.pprint(client.abort_txns(eval(args[0]),))
    +
      elif cmd == 'commit_txn':
        if len(args) != 1:
          print('commit_txn requires 1 args')
  • Ekoifman at May 19, 2016 at 8:00 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    index 176b634..028c647 100644
    --- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    +++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    @@ -1240,14 +1240,14 @@ uint32_t ThriftHiveMetastore_get_databases_result::read(::apache::thrift::protoc
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size657;
    - ::apache::thrift::protocol::TType _etype660;
    - xfer += iprot->readListBegin(_etype660, _size657);
    - this->success.resize(_size657);
    - uint32_t _i661;
    - for (_i661 = 0; _i661 < _size657; ++_i661)
    + uint32_t _size659;
    + ::apache::thrift::protocol::TType _etype662;
    + xfer += iprot->readListBegin(_etype662, _size659);
    + this->success.resize(_size659);
    + uint32_t _i663;
    + for (_i663 = 0; _i663 < _size659; ++_i663)
                  {
    - xfer += iprot->readString(this->success[_i661]);
    + xfer += iprot->readString(this->success[_i663]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -1286,10 +1286,10 @@ uint32_t ThriftHiveMetastore_get_databases_result::write(::apache::thrift::proto
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter662;
    - for (_iter662 = this->success.begin(); _iter662 != this->success.end(); ++_iter662)
    + std::vector<std::string> ::const_iterator _iter664;
    + for (_iter664 = this->success.begin(); _iter664 != this->success.end(); ++_iter664)
            {
    - xfer += oprot->writeString((*_iter662));
    + xfer += oprot->writeString((*_iter664));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -1334,14 +1334,14 @@ uint32_t ThriftHiveMetastore_get_databases_presult::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size663;
    - ::apache::thrift::protocol::TType _etype666;
    - xfer += iprot->readListBegin(_etype666, _size663);
    - (*(this->success)).resize(_size663);
    - uint32_t _i667;
    - for (_i667 = 0; _i667 < _size663; ++_i667)
    + uint32_t _size665;
    + ::apache::thrift::protocol::TType _etype668;
    + xfer += iprot->readListBegin(_etype668, _size665);
    + (*(this->success)).resize(_size665);
    + uint32_t _i669;
    + for (_i669 = 0; _i669 < _size665; ++_i669)
                  {
    - xfer += iprot->readString((*(this->success))[_i667]);
    + xfer += iprot->readString((*(this->success))[_i669]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -1458,14 +1458,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::read(::apache::thrift::pr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size668;
    - ::apache::thrift::protocol::TType _etype671;
    - xfer += iprot->readListBegin(_etype671, _size668);
    - this->success.resize(_size668);
    - uint32_t _i672;
    - for (_i672 = 0; _i672 < _size668; ++_i672)
    + uint32_t _size670;
    + ::apache::thrift::protocol::TType _etype673;
    + xfer += iprot->readListBegin(_etype673, _size670);
    + this->success.resize(_size670);
    + uint32_t _i674;
    + for (_i674 = 0; _i674 < _size670; ++_i674)
                  {
    - xfer += iprot->readString(this->success[_i672]);
    + xfer += iprot->readString(this->success[_i674]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -1504,10 +1504,10 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::write(::apache::thrift::p
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter673;
    - for (_iter673 = this->success.begin(); _iter673 != this->success.end(); ++_iter673)
    + std::vector<std::string> ::const_iterator _iter675;
    + for (_iter675 = this->success.begin(); _iter675 != this->success.end(); ++_iter675)
            {
    - xfer += oprot->writeString((*_iter673));
    + xfer += oprot->writeString((*_iter675));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -1552,14 +1552,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_presult::read(::apache::thrift::p
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size674;
    - ::apache::thrift::protocol::TType _etype677;
    - xfer += iprot->readListBegin(_etype677, _size674);
    - (*(this->success)).resize(_size674);
    - uint32_t _i678;
    - for (_i678 = 0; _i678 < _size674; ++_i678)
    + uint32_t _size676;
    + ::apache::thrift::protocol::TType _etype679;
    + xfer += iprot->readListBegin(_etype679, _size676);
    + (*(this->success)).resize(_size676);
    + uint32_t _i680;
    + for (_i680 = 0; _i680 < _size676; ++_i680)
                  {
    - xfer += iprot->readString((*(this->success))[_i678]);
    + xfer += iprot->readString((*(this->success))[_i680]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -2621,17 +2621,17 @@ uint32_t ThriftHiveMetastore_get_type_all_result::read(::apache::thrift::protoco
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  this->success.clear();
    - uint32_t _size679;
    - ::apache::thrift::protocol::TType _ktype680;
    - ::apache::thrift::protocol::TType _vtype681;
    - xfer += iprot->readMapBegin(_ktype680, _vtype681, _size679);
    - uint32_t _i683;
    - for (_i683 = 0; _i683 < _size679; ++_i683)
    + uint32_t _size681;
    + ::apache::thrift::protocol::TType _ktype682;
    + ::apache::thrift::protocol::TType _vtype683;
    + xfer += iprot->readMapBegin(_ktype682, _vtype683, _size681);
    + uint32_t _i685;
    + for (_i685 = 0; _i685 < _size681; ++_i685)
                  {
    - std::string _key684;
    - xfer += iprot->readString(_key684);
    - Type& _val685 = this->success[_key684];
    - xfer += _val685.read(iprot);
    + std::string _key686;
    + xfer += iprot->readString(_key686);
    + Type& _val687 = this->success[_key686];
    + xfer += _val687.read(iprot);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -2670,11 +2670,11 @@ uint32_t ThriftHiveMetastore_get_type_all_result::write(::apache::thrift::protoc
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0);
          {
            xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::map<std::string, Type> ::const_iterator _iter686;
    - for (_iter686 = this->success.begin(); _iter686 != this->success.end(); ++_iter686)
    + std::map<std::string, Type> ::const_iterator _iter688;
    + for (_iter688 = this->success.begin(); _iter688 != this->success.end(); ++_iter688)
            {
    - xfer += oprot->writeString(_iter686->first);
    - xfer += _iter686->second.write(oprot);
    + xfer += oprot->writeString(_iter688->first);
    + xfer += _iter688->second.write(oprot);
            }
            xfer += oprot->writeMapEnd();
          }
    @@ -2719,17 +2719,17 @@ uint32_t ThriftHiveMetastore_get_type_all_presult::read(::apache::thrift::protoc
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  (*(this->success)).clear();
    - uint32_t _size687;
    - ::apache::thrift::protocol::TType _ktype688;
    - ::apache::thrift::protocol::TType _vtype689;
    - xfer += iprot->readMapBegin(_ktype688, _vtype689, _size687);
    - uint32_t _i691;
    - for (_i691 = 0; _i691 < _size687; ++_i691)
    + uint32_t _size689;
    + ::apache::thrift::protocol::TType _ktype690;
    + ::apache::thrift::protocol::TType _vtype691;
    + xfer += iprot->readMapBegin(_ktype690, _vtype691, _size689);
    + uint32_t _i693;
    + for (_i693 = 0; _i693 < _size689; ++_i693)
                  {
    - std::string _key692;
    - xfer += iprot->readString(_key692);
    - Type& _val693 = (*(this->success))[_key692];
    - xfer += _val693.read(iprot);
    + std::string _key694;
    + xfer += iprot->readString(_key694);
    + Type& _val695 = (*(this->success))[_key694];
    + xfer += _val695.read(iprot);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -2883,14 +2883,14 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(::apache::thrift::protocol:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size694;
    - ::apache::thrift::protocol::TType _etype697;
    - xfer += iprot->readListBegin(_etype697, _size694);
    - this->success.resize(_size694);
    - uint32_t _i698;
    - for (_i698 = 0; _i698 < _size694; ++_i698)
    + uint32_t _size696;
    + ::apache::thrift::protocol::TType _etype699;
    + xfer += iprot->readListBegin(_etype699, _size696);
    + this->success.resize(_size696);
    + uint32_t _i700;
    + for (_i700 = 0; _i700 < _size696; ++_i700)
                  {
    - xfer += this->success[_i698].read(iprot);
    + xfer += this->success[_i700].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -2945,10 +2945,10 @@ uint32_t ThriftHiveMetastore_get_fields_result::write(::apache::thrift::protocol
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<FieldSchema> ::const_iterator _iter699;
    - for (_iter699 = this->success.begin(); _iter699 != this->success.end(); ++_iter699)
    + std::vector<FieldSchema> ::const_iterator _iter701;
    + for (_iter701 = this->success.begin(); _iter701 != this->success.end(); ++_iter701)
            {
    - xfer += (*_iter699).write(oprot);
    + xfer += (*_iter701).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -3001,14 +3001,14 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(::apache::thrift::protocol
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size700;
    - ::apache::thrift::protocol::TType _etype703;
    - xfer += iprot->readListBegin(_etype703, _size700);
    - (*(this->success)).resize(_size700);
    - uint32_t _i704;
    - for (_i704 = 0; _i704 < _size700; ++_i704)
    + uint32_t _size702;
    + ::apache::thrift::protocol::TType _etype705;
    + xfer += iprot->readListBegin(_etype705, _size702);
    + (*(this->success)).resize(_size702);
    + uint32_t _i706;
    + for (_i706 = 0; _i706 < _size702; ++_i706)
                  {
    - xfer += (*(this->success))[_i704].read(iprot);
    + xfer += (*(this->success))[_i706].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3194,14 +3194,14 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::read(::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size705;
    - ::apache::thrift::protocol::TType _etype708;
    - xfer += iprot->readListBegin(_etype708, _size705);
    - this->success.resize(_size705);
    - uint32_t _i709;
    - for (_i709 = 0; _i709 < _size705; ++_i709)
    + uint32_t _size707;
    + ::apache::thrift::protocol::TType _etype710;
    + xfer += iprot->readListBegin(_etype710, _size707);
    + this->success.resize(_size707);
    + uint32_t _i711;
    + for (_i711 = 0; _i711 < _size707; ++_i711)
                  {
    - xfer += this->success[_i709].read(iprot);
    + xfer += this->success[_i711].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3256,10 +3256,10 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_result::write(:
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<FieldSchema> ::const_iterator _iter710;
    - for (_iter710 = this->success.begin(); _iter710 != this->success.end(); ++_iter710)
    + std::vector<FieldSchema> ::const_iterator _iter712;
    + for (_iter712 = this->success.begin(); _iter712 != this->success.end(); ++_iter712)
            {
    - xfer += (*_iter710).write(oprot);
    + xfer += (*_iter712).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -3312,14 +3312,14 @@ uint32_t ThriftHiveMetastore_get_fields_with_environment_context_presult::read(:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size711;
    - ::apache::thrift::protocol::TType _etype714;
    - xfer += iprot->readListBegin(_etype714, _size711);
    - (*(this->success)).resize(_size711);
    - uint32_t _i715;
    - for (_i715 = 0; _i715 < _size711; ++_i715)
    + uint32_t _size713;
    + ::apache::thrift::protocol::TType _etype716;
    + xfer += iprot->readListBegin(_etype716, _size713);
    + (*(this->success)).resize(_size713);
    + uint32_t _i717;
    + for (_i717 = 0; _i717 < _size713; ++_i717)
                  {
    - xfer += (*(this->success))[_i715].read(iprot);
    + xfer += (*(this->success))[_i717].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3489,14 +3489,14 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(::apache::thrift::protocol:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size716;
    - ::apache::thrift::protocol::TType _etype719;
    - xfer += iprot->readListBegin(_etype719, _size716);
    - this->success.resize(_size716);
    - uint32_t _i720;
    - for (_i720 = 0; _i720 < _size716; ++_i720)
    + uint32_t _size718;
    + ::apache::thrift::protocol::TType _etype721;
    + xfer += iprot->readListBegin(_etype721, _size718);
    + this->success.resize(_size718);
    + uint32_t _i722;
    + for (_i722 = 0; _i722 < _size718; ++_i722)
                  {
    - xfer += this->success[_i720].read(iprot);
    + xfer += this->success[_i722].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3551,10 +3551,10 @@ uint32_t ThriftHiveMetastore_get_schema_result::write(::apache::thrift::protocol
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<FieldSchema> ::const_iterator _iter721;
    - for (_iter721 = this->success.begin(); _iter721 != this->success.end(); ++_iter721)
    + std::vector<FieldSchema> ::const_iterator _iter723;
    + for (_iter723 = this->success.begin(); _iter723 != this->success.end(); ++_iter723)
            {
    - xfer += (*_iter721).write(oprot);
    + xfer += (*_iter723).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -3607,14 +3607,14 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(::apache::thrift::protocol
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size722;
    - ::apache::thrift::protocol::TType _etype725;
    - xfer += iprot->readListBegin(_etype725, _size722);
    - (*(this->success)).resize(_size722);
    - uint32_t _i726;
    - for (_i726 = 0; _i726 < _size722; ++_i726)
    + uint32_t _size724;
    + ::apache::thrift::protocol::TType _etype727;
    + xfer += iprot->readListBegin(_etype727, _size724);
    + (*(this->success)).resize(_size724);
    + uint32_t _i728;
    + for (_i728 = 0; _i728 < _size724; ++_i728)
                  {
    - xfer += (*(this->success))[_i726].read(iprot);
    + xfer += (*(this->success))[_i728].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3800,14 +3800,14 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::read(::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size727;
    - ::apache::thrift::protocol::TType _etype730;
    - xfer += iprot->readListBegin(_etype730, _size727);
    - this->success.resize(_size727);
    - uint32_t _i731;
    - for (_i731 = 0; _i731 < _size727; ++_i731)
    + uint32_t _size729;
    + ::apache::thrift::protocol::TType _etype732;
    + xfer += iprot->readListBegin(_etype732, _size729);
    + this->success.resize(_size729);
    + uint32_t _i733;
    + for (_i733 = 0; _i733 < _size729; ++_i733)
                  {
    - xfer += this->success[_i731].read(iprot);
    + xfer += this->success[_i733].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -3862,10 +3862,10 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_result::write(:
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<FieldSchema> ::const_iterator _iter732;
    - for (_iter732 = this->success.begin(); _iter732 != this->success.end(); ++_iter732)
    + std::vector<FieldSchema> ::const_iterator _iter734;
    + for (_iter734 = this->success.begin(); _iter734 != this->success.end(); ++_iter734)
            {
    - xfer += (*_iter732).write(oprot);
    + xfer += (*_iter734).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -3918,14 +3918,14 @@ uint32_t ThriftHiveMetastore_get_schema_with_environment_context_presult::read(:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size733;
    - ::apache::thrift::protocol::TType _etype736;
    - xfer += iprot->readListBegin(_etype736, _size733);
    - (*(this->success)).resize(_size733);
    - uint32_t _i737;
    - for (_i737 = 0; _i737 < _size733; ++_i737)
    + uint32_t _size735;
    + ::apache::thrift::protocol::TType _etype738;
    + xfer += iprot->readListBegin(_etype738, _size735);
    + (*(this->success)).resize(_size735);
    + uint32_t _i739;
    + for (_i739 = 0; _i739 < _size735; ++_i739)
                  {
    - xfer += (*(this->success))[_i737].read(iprot);
    + xfer += (*(this->success))[_i739].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -5099,14 +5099,14 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(::apache::thrift::protocol:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size738;
    - ::apache::thrift::protocol::TType _etype741;
    - xfer += iprot->readListBegin(_etype741, _size738);
    - this->success.resize(_size738);
    - uint32_t _i742;
    - for (_i742 = 0; _i742 < _size738; ++_i742)
    + uint32_t _size740;
    + ::apache::thrift::protocol::TType _etype743;
    + xfer += iprot->readListBegin(_etype743, _size740);
    + this->success.resize(_size740);
    + uint32_t _i744;
    + for (_i744 = 0; _i744 < _size740; ++_i744)
                  {
    - xfer += iprot->readString(this->success[_i742]);
    + xfer += iprot->readString(this->success[_i744]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -5145,10 +5145,10 @@ uint32_t ThriftHiveMetastore_get_tables_result::write(::apache::thrift::protocol
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter743;
    - for (_iter743 = this->success.begin(); _iter743 != this->success.end(); ++_iter743)
    + std::vector<std::string> ::const_iterator _iter745;
    + for (_iter745 = this->success.begin(); _iter745 != this->success.end(); ++_iter745)
            {
    - xfer += oprot->writeString((*_iter743));
    + xfer += oprot->writeString((*_iter745));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -5193,14 +5193,14 @@ uint32_t ThriftHiveMetastore_get_tables_presult::read(::apache::thrift::protocol
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size744;
    - ::apache::thrift::protocol::TType _etype747;
    - xfer += iprot->readListBegin(_etype747, _size744);
    - (*(this->success)).resize(_size744);
    - uint32_t _i748;
    - for (_i748 = 0; _i748 < _size744; ++_i748)
    + uint32_t _size746;
    + ::apache::thrift::protocol::TType _etype749;
    + xfer += iprot->readListBegin(_etype749, _size746);
    + (*(this->success)).resize(_size746);
    + uint32_t _i750;
    + for (_i750 = 0; _i750 < _size746; ++_i750)
                  {
    - xfer += iprot->readString((*(this->success))[_i748]);
    + xfer += iprot->readString((*(this->success))[_i750]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -5338,14 +5338,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size749;
    - ::apache::thrift::protocol::TType _etype752;
    - xfer += iprot->readListBegin(_etype752, _size749);
    - this->success.resize(_size749);
    - uint32_t _i753;
    - for (_i753 = 0; _i753 < _size749; ++_i753)
    + uint32_t _size751;
    + ::apache::thrift::protocol::TType _etype754;
    + xfer += iprot->readListBegin(_etype754, _size751);
    + this->success.resize(_size751);
    + uint32_t _i755;
    + for (_i755 = 0; _i755 < _size751; ++_i755)
                  {
    - xfer += iprot->readString(this->success[_i753]);
    + xfer += iprot->readString(this->success[_i755]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -5384,10 +5384,10 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::write(::apache::thrift::prot
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter754;
    - for (_iter754 = this->success.begin(); _iter754 != this->success.end(); ++_iter754)
    + std::vector<std::string> ::const_iterator _iter756;
    + for (_iter756 = this->success.begin(); _iter756 != this->success.end(); ++_iter756)
            {
    - xfer += oprot->writeString((*_iter754));
    + xfer += oprot->writeString((*_iter756));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -5432,14 +5432,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_presult::read(::apache::thrift::prot
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size755;
    - ::apache::thrift::protocol::TType _etype758;
    - xfer += iprot->readListBegin(_etype758, _size755);
    - (*(this->success)).resize(_size755);
    - uint32_t _i759;
    - for (_i759 = 0; _i759 < _size755; ++_i759)
    + uint32_t _size757;
    + ::apache::thrift::protocol::TType _etype760;
    + xfer += iprot->readListBegin(_etype760, _size757);
    + (*(this->success)).resize(_size757);
    + uint32_t _i761;
    + for (_i761 = 0; _i761 < _size757; ++_i761)
                  {
    - xfer += iprot->readString((*(this->success))[_i759]);
    + xfer += iprot->readString((*(this->success))[_i761]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -5749,14 +5749,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::read(::apache::thri
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->tbl_names.clear();
    - uint32_t _size760;
    - ::apache::thrift::protocol::TType _etype763;
    - xfer += iprot->readListBegin(_etype763, _size760);
    - this->tbl_names.resize(_size760);
    - uint32_t _i764;
    - for (_i764 = 0; _i764 < _size760; ++_i764)
    + uint32_t _size762;
    + ::apache::thrift::protocol::TType _etype765;
    + xfer += iprot->readListBegin(_etype765, _size762);
    + this->tbl_names.resize(_size762);
    + uint32_t _i766;
    + for (_i766 = 0; _i766 < _size762; ++_i766)
                  {
    - xfer += iprot->readString(this->tbl_names[_i764]);
    + xfer += iprot->readString(this->tbl_names[_i766]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -5789,10 +5789,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thr
        xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->tbl_names.size()));
    - std::vector<std::string> ::const_iterator _iter765;
    - for (_iter765 = this->tbl_names.begin(); _iter765 != this->tbl_names.end(); ++_iter765)
    + std::vector<std::string> ::const_iterator _iter767;
    + for (_iter767 = this->tbl_names.begin(); _iter767 != this->tbl_names.end(); ++_iter767)
          {
    - xfer += oprot->writeString((*_iter765));
    + xfer += oprot->writeString((*_iter767));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -5820,10 +5820,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::th
        xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->tbl_names)).size()));
    - std::vector<std::string> ::const_iterator _iter766;
    - for (_iter766 = (*(this->tbl_names)).begin(); _iter766 != (*(this->tbl_names)).end(); ++_iter766)
    + std::vector<std::string> ::const_iterator _iter768;
    + for (_iter768 = (*(this->tbl_names)).begin(); _iter768 != (*(this->tbl_names)).end(); ++_iter768)
          {
    - xfer += oprot->writeString((*_iter766));
    + xfer += oprot->writeString((*_iter768));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -5864,14 +5864,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::read(::apache::th
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size767;
    - ::apache::thrift::protocol::TType _etype770;
    - xfer += iprot->readListBegin(_etype770, _size767);
    - this->success.resize(_size767);
    - uint32_t _i771;
    - for (_i771 = 0; _i771 < _size767; ++_i771)
    + uint32_t _size769;
    + ::apache::thrift::protocol::TType _etype772;
    + xfer += iprot->readListBegin(_etype772, _size769);
    + this->success.resize(_size769);
    + uint32_t _i773;
    + for (_i773 = 0; _i773 < _size769; ++_i773)
                  {
    - xfer += this->success[_i771].read(iprot);
    + xfer += this->success[_i773].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -5926,10 +5926,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::write(::apache::t
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Table> ::const_iterator _iter772;
    - for (_iter772 = this->success.begin(); _iter772 != this->success.end(); ++_iter772)
    + std::vector<Table> ::const_iterator _iter774;
    + for (_iter774 = this->success.begin(); _iter774 != this->success.end(); ++_iter774)
            {
    - xfer += (*_iter772).write(oprot);
    + xfer += (*_iter774).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -5982,14 +5982,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_presult::read(::apache::t
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size773;
    - ::apache::thrift::protocol::TType _etype776;
    - xfer += iprot->readListBegin(_etype776, _size773);
    - (*(this->success)).resize(_size773);
    - uint32_t _i777;
    - for (_i777 = 0; _i777 < _size773; ++_i777)
    + uint32_t _size775;
    + ::apache::thrift::protocol::TType _etype778;
    + xfer += iprot->readListBegin(_etype778, _size775);
    + (*(this->success)).resize(_size775);
    + uint32_t _i779;
    + for (_i779 = 0; _i779 < _size775; ++_i779)
                  {
    - xfer += (*(this->success))[_i777].read(iprot);
    + xfer += (*(this->success))[_i779].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -6175,14 +6175,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::read(::apache::th
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size778;
    - ::apache::thrift::protocol::TType _etype781;
    - xfer += iprot->readListBegin(_etype781, _size778);
    - this->success.resize(_size778);
    - uint32_t _i782;
    - for (_i782 = 0; _i782 < _size778; ++_i782)
    + uint32_t _size780;
    + ::apache::thrift::protocol::TType _etype783;
    + xfer += iprot->readListBegin(_etype783, _size780);
    + this->success.resize(_size780);
    + uint32_t _i784;
    + for (_i784 = 0; _i784 < _size780; ++_i784)
                  {
    - xfer += iprot->readString(this->success[_i782]);
    + xfer += iprot->readString(this->success[_i784]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -6237,10 +6237,10 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::write(::apache::t
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter783;
    - for (_iter783 = this->success.begin(); _iter783 != this->success.end(); ++_iter783)
    + std::vector<std::string> ::const_iterator _iter785;
    + for (_iter785 = this->success.begin(); _iter785 != this->success.end(); ++_iter785)
            {
    - xfer += oprot->writeString((*_iter783));
    + xfer += oprot->writeString((*_iter785));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -6293,14 +6293,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_presult::read(::apache::t
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size784;
    - ::apache::thrift::protocol::TType _etype787;
    - xfer += iprot->readListBegin(_etype787, _size784);
    - (*(this->success)).resize(_size784);
    - uint32_t _i788;
    - for (_i788 = 0; _i788 < _size784; ++_i788)
    + uint32_t _size786;
    + ::apache::thrift::protocol::TType _etype789;
    + xfer += iprot->readListBegin(_etype789, _size786);
    + (*(this->success)).resize(_size786);
    + uint32_t _i790;
    + for (_i790 = 0; _i790 < _size786; ++_i790)
                  {
    - xfer += iprot->readString((*(this->success))[_i788]);
    + xfer += iprot->readString((*(this->success))[_i790]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -7634,14 +7634,14 @@ uint32_t ThriftHiveMetastore_add_partitions_args::read(::apache::thrift::protoco
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->new_parts.clear();
    - uint32_t _size789;
    - ::apache::thrift::protocol::TType _etype792;
    - xfer += iprot->readListBegin(_etype792, _size789);
    - this->new_parts.resize(_size789);
    - uint32_t _i793;
    - for (_i793 = 0; _i793 < _size789; ++_i793)
    + uint32_t _size791;
    + ::apache::thrift::protocol::TType _etype794;
    + xfer += iprot->readListBegin(_etype794, _size791);
    + this->new_parts.resize(_size791);
    + uint32_t _i795;
    + for (_i795 = 0; _i795 < _size791; ++_i795)
                  {
    - xfer += this->new_parts[_i793].read(iprot);
    + xfer += this->new_parts[_i795].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -7670,10 +7670,10 @@ uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protoc
        xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->new_parts.size()));
    - std::vector<Partition> ::const_iterator _iter794;
    - for (_iter794 = this->new_parts.begin(); _iter794 != this->new_parts.end(); ++_iter794)
    + std::vector<Partition> ::const_iterator _iter796;
    + for (_iter796 = this->new_parts.begin(); _iter796 != this->new_parts.end(); ++_iter796)
          {
    - xfer += (*_iter794).write(oprot);
    + xfer += (*_iter796).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -7697,10 +7697,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::proto
        xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->new_parts)).size()));
    - std::vector<Partition> ::const_iterator _iter795;
    - for (_iter795 = (*(this->new_parts)).begin(); _iter795 != (*(this->new_parts)).end(); ++_iter795)
    + std::vector<Partition> ::const_iterator _iter797;
    + for (_iter797 = (*(this->new_parts)).begin(); _iter797 != (*(this->new_parts)).end(); ++_iter797)
          {
    - xfer += (*_iter795).write(oprot);
    + xfer += (*_iter797).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -7909,14 +7909,14 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_args::read(::apache::thrift::p
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->new_parts.clear();
    - uint32_t _size796;
    - ::apache::thrift::protocol::TType _etype799;
    - xfer += iprot->readListBegin(_etype799, _size796);
    - this->new_parts.resize(_size796);
    - uint32_t _i800;
    - for (_i800 = 0; _i800 < _size796; ++_i800)
    + uint32_t _size798;
    + ::apache::thrift::protocol::TType _etype801;
    + xfer += iprot->readListBegin(_etype801, _size798);
    + this->new_parts.resize(_size798);
    + uint32_t _i802;
    + for (_i802 = 0; _i802 < _size798; ++_i802)
                  {
    - xfer += this->new_parts[_i800].read(iprot);
    + xfer += this->new_parts[_i802].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -7945,10 +7945,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_args::write(::apache::thrift::
        xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->new_parts.size()));
    - std::vector<PartitionSpec> ::const_iterator _iter801;
    - for (_iter801 = this->new_parts.begin(); _iter801 != this->new_parts.end(); ++_iter801)
    + std::vector<PartitionSpec> ::const_iterator _iter803;
    + for (_iter803 = this->new_parts.begin(); _iter803 != this->new_parts.end(); ++_iter803)
          {
    - xfer += (*_iter801).write(oprot);
    + xfer += (*_iter803).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -7972,10 +7972,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pspec_pargs::write(::apache::thrift:
        xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>((*(this->new_parts)).size()));
    - std::vector<PartitionSpec> ::const_iterator _iter802;
    - for (_iter802 = (*(this->new_parts)).begin(); _iter802 != (*(this->new_parts)).end(); ++_iter802)
    + std::vector<PartitionSpec> ::const_iterator _iter804;
    + for (_iter804 = (*(this->new_parts)).begin(); _iter804 != (*(this->new_parts)).end(); ++_iter804)
          {
    - xfer += (*_iter802).write(oprot);
    + xfer += (*_iter804).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -8200,14 +8200,14 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size803;
    - ::apache::thrift::protocol::TType _etype806;
    - xfer += iprot->readListBegin(_etype806, _size803);
    - this->part_vals.resize(_size803);
    - uint32_t _i807;
    - for (_i807 = 0; _i807 < _size803; ++_i807)
    + uint32_t _size805;
    + ::apache::thrift::protocol::TType _etype808;
    + xfer += iprot->readListBegin(_etype808, _size805);
    + this->part_vals.resize(_size805);
    + uint32_t _i809;
    + for (_i809 = 0; _i809 < _size805; ++_i809)
                  {
    - xfer += iprot->readString(this->part_vals[_i807]);
    + xfer += iprot->readString(this->part_vals[_i809]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -8244,10 +8244,10 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::prot
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter808;
    - for (_iter808 = this->part_vals.begin(); _iter808 != this->part_vals.end(); ++_iter808)
    + std::vector<std::string> ::const_iterator _iter810;
    + for (_iter810 = this->part_vals.begin(); _iter810 != this->part_vals.end(); ++_iter810)
          {
    - xfer += oprot->writeString((*_iter808));
    + xfer += oprot->writeString((*_iter810));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -8279,10 +8279,10 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::pro
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter809;
    - for (_iter809 = (*(this->part_vals)).begin(); _iter809 != (*(this->part_vals)).end(); ++_iter809)
    + std::vector<std::string> ::const_iterator _iter811;
    + for (_iter811 = (*(this->part_vals)).begin(); _iter811 != (*(this->part_vals)).end(); ++_iter811)
          {
    - xfer += oprot->writeString((*_iter809));
    + xfer += oprot->writeString((*_iter811));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -8754,14 +8754,14 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::rea
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size810;
    - ::apache::thrift::protocol::TType _etype813;
    - xfer += iprot->readListBegin(_etype813, _size810);
    - this->part_vals.resize(_size810);
    - uint32_t _i814;
    - for (_i814 = 0; _i814 < _size810; ++_i814)
    + uint32_t _size812;
    + ::apache::thrift::protocol::TType _etype815;
    + xfer += iprot->readListBegin(_etype815, _size812);
    + this->part_vals.resize(_size812);
    + uint32_t _i816;
    + for (_i816 = 0; _i816 < _size812; ++_i816)
                  {
    - xfer += iprot->readString(this->part_vals[_i814]);
    + xfer += iprot->readString(this->part_vals[_i816]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -8806,10 +8806,10 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_args::wri
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter815;
    - for (_iter815 = this->part_vals.begin(); _iter815 != this->part_vals.end(); ++_iter815)
    + std::vector<std::string> ::const_iterator _iter817;
    + for (_iter817 = this->part_vals.begin(); _iter817 != this->part_vals.end(); ++_iter817)
          {
    - xfer += oprot->writeString((*_iter815));
    + xfer += oprot->writeString((*_iter817));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -8845,10 +8845,10 @@ uint32_t ThriftHiveMetastore_append_partition_with_environment_context_pargs::wr
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter816;
    - for (_iter816 = (*(this->part_vals)).begin(); _iter816 != (*(this->part_vals)).end(); ++_iter816)
    + std::vector<std::string> ::const_iterator _iter818;
    + for (_iter818 = (*(this->part_vals)).begin(); _iter818 != (*(this->part_vals)).end(); ++_iter818)
          {
    - xfer += oprot->writeString((*_iter816));
    + xfer += oprot->writeString((*_iter818));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -9651,14 +9651,14 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(::apache::thrift::protoco
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size817;
    - ::apache::thrift::protocol::TType _etype820;
    - xfer += iprot->readListBegin(_etype820, _size817);
    - this->part_vals.resize(_size817);
    - uint32_t _i821;
    - for (_i821 = 0; _i821 < _size817; ++_i821)
    + uint32_t _size819;
    + ::apache::thrift::protocol::TType _etype822;
    + xfer += iprot->readListBegin(_etype822, _size819);
    + this->part_vals.resize(_size819);
    + uint32_t _i823;
    + for (_i823 = 0; _i823 < _size819; ++_i823)
                  {
    - xfer += iprot->readString(this->part_vals[_i821]);
    + xfer += iprot->readString(this->part_vals[_i823]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -9703,10 +9703,10 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protoc
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter822;
    - for (_iter822 = this->part_vals.begin(); _iter822 != this->part_vals.end(); ++_iter822)
    + std::vector<std::string> ::const_iterator _iter824;
    + for (_iter824 = this->part_vals.begin(); _iter824 != this->part_vals.end(); ++_iter824)
          {
    - xfer += oprot->writeString((*_iter822));
    + xfer += oprot->writeString((*_iter824));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -9742,10 +9742,10 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::proto
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter823;
    - for (_iter823 = (*(this->part_vals)).begin(); _iter823 != (*(this->part_vals)).end(); ++_iter823)
    + std::vector<std::string> ::const_iterator _iter825;
    + for (_iter825 = (*(this->part_vals)).begin(); _iter825 != (*(this->part_vals)).end(); ++_iter825)
          {
    - xfer += oprot->writeString((*_iter823));
    + xfer += oprot->writeString((*_iter825));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -9954,14 +9954,14 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::read(
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size824;
    - ::apache::thrift::protocol::TType _etype827;
    - xfer += iprot->readListBegin(_etype827, _size824);
    - this->part_vals.resize(_size824);
    - uint32_t _i828;
    - for (_i828 = 0; _i828 < _size824; ++_i828)
    + uint32_t _size826;
    + ::apache::thrift::protocol::TType _etype829;
    + xfer += iprot->readListBegin(_etype829, _size826);
    + this->part_vals.resize(_size826);
    + uint32_t _i830;
    + for (_i830 = 0; _i830 < _size826; ++_i830)
                  {
    - xfer += iprot->readString(this->part_vals[_i828]);
    + xfer += iprot->readString(this->part_vals[_i830]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -10014,10 +10014,10 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_args::write
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter829;
    - for (_iter829 = this->part_vals.begin(); _iter829 != this->part_vals.end(); ++_iter829)
    + std::vector<std::string> ::const_iterator _iter831;
    + for (_iter831 = this->part_vals.begin(); _iter831 != this->part_vals.end(); ++_iter831)
          {
    - xfer += oprot->writeString((*_iter829));
    + xfer += oprot->writeString((*_iter831));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -10057,10 +10057,10 @@ uint32_t ThriftHiveMetastore_drop_partition_with_environment_context_pargs::writ
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter830;
    - for (_iter830 = (*(this->part_vals)).begin(); _iter830 != (*(this->part_vals)).end(); ++_iter830)
    + std::vector<std::string> ::const_iterator _iter832;
    + for (_iter832 = (*(this->part_vals)).begin(); _iter832 != (*(this->part_vals)).end(); ++_iter832)
          {
    - xfer += oprot->writeString((*_iter830));
    + xfer += oprot->writeString((*_iter832));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -11066,14 +11066,14 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(::apache::thrift::protocol
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size831;
    - ::apache::thrift::protocol::TType _etype834;
    - xfer += iprot->readListBegin(_etype834, _size831);
    - this->part_vals.resize(_size831);
    - uint32_t _i835;
    - for (_i835 = 0; _i835 < _size831; ++_i835)
    + uint32_t _size833;
    + ::apache::thrift::protocol::TType _etype836;
    + xfer += iprot->readListBegin(_etype836, _size833);
    + this->part_vals.resize(_size833);
    + uint32_t _i837;
    + for (_i837 = 0; _i837 < _size833; ++_i837)
                  {
    - xfer += iprot->readString(this->part_vals[_i835]);
    + xfer += iprot->readString(this->part_vals[_i837]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -11110,10 +11110,10 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protoco
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter836;
    - for (_iter836 = this->part_vals.begin(); _iter836 != this->part_vals.end(); ++_iter836)
    + std::vector<std::string> ::const_iterator _iter838;
    + for (_iter838 = this->part_vals.begin(); _iter838 != this->part_vals.end(); ++_iter838)
          {
    - xfer += oprot->writeString((*_iter836));
    + xfer += oprot->writeString((*_iter838));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -11145,10 +11145,10 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protoc
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter837;
    - for (_iter837 = (*(this->part_vals)).begin(); _iter837 != (*(this->part_vals)).end(); ++_iter837)
    + std::vector<std::string> ::const_iterator _iter839;
    + for (_iter839 = (*(this->part_vals)).begin(); _iter839 != (*(this->part_vals)).end(); ++_iter839)
          {
    - xfer += oprot->writeString((*_iter837));
    + xfer += oprot->writeString((*_iter839));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -11337,17 +11337,17 @@ uint32_t ThriftHiveMetastore_exchange_partition_args::read(::apache::thrift::pro
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  this->partitionSpecs.clear();
    - uint32_t _size838;
    - ::apache::thrift::protocol::TType _ktype839;
    - ::apache::thrift::protocol::TType _vtype840;
    - xfer += iprot->readMapBegin(_ktype839, _vtype840, _size838);
    - uint32_t _i842;
    - for (_i842 = 0; _i842 < _size838; ++_i842)
    + uint32_t _size840;
    + ::apache::thrift::protocol::TType _ktype841;
    + ::apache::thrift::protocol::TType _vtype842;
    + xfer += iprot->readMapBegin(_ktype841, _vtype842, _size840);
    + uint32_t _i844;
    + for (_i844 = 0; _i844 < _size840; ++_i844)
                  {
    - std::string _key843;
    - xfer += iprot->readString(_key843);
    - std::string& _val844 = this->partitionSpecs[_key843];
    - xfer += iprot->readString(_val844);
    + std::string _key845;
    + xfer += iprot->readString(_key845);
    + std::string& _val846 = this->partitionSpecs[_key845];
    + xfer += iprot->readString(_val846);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -11408,11 +11408,11 @@ uint32_t ThriftHiveMetastore_exchange_partition_args::write(::apache::thrift::pr
        xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionSpecs.size()));
    - std::map<std::string, std::string> ::const_iterator _iter845;
    - for (_iter845 = this->partitionSpecs.begin(); _iter845 != this->partitionSpecs.end(); ++_iter845)
    + std::map<std::string, std::string> ::const_iterator _iter847;
    + for (_iter847 = this->partitionSpecs.begin(); _iter847 != this->partitionSpecs.end(); ++_iter847)
          {
    - xfer += oprot->writeString(_iter845->first);
    - xfer += oprot->writeString(_iter845->second);
    + xfer += oprot->writeString(_iter847->first);
    + xfer += oprot->writeString(_iter847->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -11452,11 +11452,11 @@ uint32_t ThriftHiveMetastore_exchange_partition_pargs::write(::apache::thrift::p
        xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->partitionSpecs)).size()));
    - std::map<std::string, std::string> ::const_iterator _iter846;
    - for (_iter846 = (*(this->partitionSpecs)).begin(); _iter846 != (*(this->partitionSpecs)).end(); ++_iter846)
    + std::map<std::string, std::string> ::const_iterator _iter848;
    + for (_iter848 = (*(this->partitionSpecs)).begin(); _iter848 != (*(this->partitionSpecs)).end(); ++_iter848)
          {
    - xfer += oprot->writeString(_iter846->first);
    - xfer += oprot->writeString(_iter846->second);
    + xfer += oprot->writeString(_iter848->first);
    + xfer += oprot->writeString(_iter848->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -11701,17 +11701,17 @@ uint32_t ThriftHiveMetastore_exchange_partitions_args::read(::apache::thrift::pr
              if (ftype == ::apache::thrift::protocol::T_MAP) {
                {
                  this->partitionSpecs.clear();
    - uint32_t _size847;
    - ::apache::thrift::protocol::TType _ktype848;
    - ::apache::thrift::protocol::TType _vtype849;
    - xfer += iprot->readMapBegin(_ktype848, _vtype849, _size847);
    - uint32_t _i851;
    - for (_i851 = 0; _i851 < _size847; ++_i851)
    + uint32_t _size849;
    + ::apache::thrift::protocol::TType _ktype850;
    + ::apache::thrift::protocol::TType _vtype851;
    + xfer += iprot->readMapBegin(_ktype850, _vtype851, _size849);
    + uint32_t _i853;
    + for (_i853 = 0; _i853 < _size849; ++_i853)
                  {
    - std::string _key852;
    - xfer += iprot->readString(_key852);
    - std::string& _val853 = this->partitionSpecs[_key852];
    - xfer += iprot->readString(_val853);
    + std::string _key854;
    + xfer += iprot->readString(_key854);
    + std::string& _val855 = this->partitionSpecs[_key854];
    + xfer += iprot->readString(_val855);
                  }
                  xfer += iprot->readMapEnd();
                }
    @@ -11772,11 +11772,11 @@ uint32_t ThriftHiveMetastore_exchange_partitions_args::write(::apache::thrift::p
        xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionSpecs.size()));
    - std::map<std::string, std::string> ::const_iterator _iter854;
    - for (_iter854 = this->partitionSpecs.begin(); _iter854 != this->partitionSpecs.end(); ++_iter854)
    + std::map<std::string, std::string> ::const_iterator _iter856;
    + for (_iter856 = this->partitionSpecs.begin(); _iter856 != this->partitionSpecs.end(); ++_iter856)
          {
    - xfer += oprot->writeString(_iter854->first);
    - xfer += oprot->writeString(_iter854->second);
    + xfer += oprot->writeString(_iter856->first);
    + xfer += oprot->writeString(_iter856->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -11816,11 +11816,11 @@ uint32_t ThriftHiveMetastore_exchange_partitions_pargs::write(::apache::thrift::
        xfer += oprot->writeFieldBegin("partitionSpecs", ::apache::thrift::protocol::T_MAP, 1);
        {
          xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->partitionSpecs)).size()));
    - std::map<std::string, std::string> ::const_iterator _iter855;
    - for (_iter855 = (*(this->partitionSpecs)).begin(); _iter855 != (*(this->partitionSpecs)).end(); ++_iter855)
    + std::map<std::string, std::string> ::const_iterator _iter857;
    + for (_iter857 = (*(this->partitionSpecs)).begin(); _iter857 != (*(this->partitionSpecs)).end(); ++_iter857)
          {
    - xfer += oprot->writeString(_iter855->first);
    - xfer += oprot->writeString(_iter855->second);
    + xfer += oprot->writeString(_iter857->first);
    + xfer += oprot->writeString(_iter857->second);
          }
          xfer += oprot->writeMapEnd();
        }
    @@ -11877,14 +11877,14 @@ uint32_t ThriftHiveMetastore_exchange_partitions_result::read(::apache::thrift::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size856;
    - ::apache::thrift::protocol::TType _etype859;
    - xfer += iprot->readListBegin(_etype859, _size856);
    - this->success.resize(_size856);
    - uint32_t _i860;
    - for (_i860 = 0; _i860 < _size856; ++_i860)
    + uint32_t _size858;
    + ::apache::thrift::protocol::TType _etype861;
    + xfer += iprot->readListBegin(_etype861, _size858);
    + this->success.resize(_size858);
    + uint32_t _i862;
    + for (_i862 = 0; _i862 < _size858; ++_i862)
                  {
    - xfer += this->success[_i860].read(iprot);
    + xfer += this->success[_i862].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -11947,10 +11947,10 @@ uint32_t ThriftHiveMetastore_exchange_partitions_result::write(::apache::thrift:
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Partition> ::const_iterator _iter861;
    - for (_iter861 = this->success.begin(); _iter861 != this->success.end(); ++_iter861)
    + std::vector<Partition> ::const_iterator _iter863;
    + for (_iter863 = this->success.begin(); _iter863 != this->success.end(); ++_iter863)
            {
    - xfer += (*_iter861).write(oprot);
    + xfer += (*_iter863).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -12007,14 +12007,14 @@ uint32_t ThriftHiveMetastore_exchange_partitions_presult::read(::apache::thrift:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size862;
    - ::apache::thrift::protocol::TType _etype865;
    - xfer += iprot->readListBegin(_etype865, _size862);
    - (*(this->success)).resize(_size862);
    - uint32_t _i866;
    - for (_i866 = 0; _i866 < _size862; ++_i866)
    + uint32_t _size864;
    + ::apache::thrift::protocol::TType _etype867;
    + xfer += iprot->readListBegin(_etype867, _size864);
    + (*(this->success)).resize(_size864);
    + uint32_t _i868;
    + for (_i868 = 0; _i868 < _size864; ++_i868)
                  {
    - xfer += (*(this->success))[_i866].read(iprot);
    + xfer += (*(this->success))[_i868].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -12113,14 +12113,14 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size867;
    - ::apache::thrift::protocol::TType _etype870;
    - xfer += iprot->readListBegin(_etype870, _size867);
    - this->part_vals.resize(_size867);
    - uint32_t _i871;
    - for (_i871 = 0; _i871 < _size867; ++_i871)
    + uint32_t _size869;
    + ::apache::thrift::protocol::TType _etype872;
    + xfer += iprot->readListBegin(_etype872, _size869);
    + this->part_vals.resize(_size869);
    + uint32_t _i873;
    + for (_i873 = 0; _i873 < _size869; ++_i873)
                  {
    - xfer += iprot->readString(this->part_vals[_i871]);
    + xfer += iprot->readString(this->part_vals[_i873]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -12141,14 +12141,14 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->group_names.clear();
    - uint32_t _size872;
    - ::apache::thrift::protocol::TType _etype875;
    - xfer += iprot->readListBegin(_etype875, _size872);
    - this->group_names.resize(_size872);
    - uint32_t _i876;
    - for (_i876 = 0; _i876 < _size872; ++_i876)
    + uint32_t _size874;
    + ::apache::thrift::protocol::TType _etype877;
    + xfer += iprot->readListBegin(_etype877, _size874);
    + this->group_names.resize(_size874);
    + uint32_t _i878;
    + for (_i878 = 0; _i878 < _size874; ++_i878)
                  {
    - xfer += iprot->readString(this->group_names[_i876]);
    + xfer += iprot->readString(this->group_names[_i878]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -12185,10 +12185,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrif
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter877;
    - for (_iter877 = this->part_vals.begin(); _iter877 != this->part_vals.end(); ++_iter877)
    + std::vector<std::string> ::const_iterator _iter879;
    + for (_iter879 = this->part_vals.begin(); _iter879 != this->part_vals.end(); ++_iter879)
          {
    - xfer += oprot->writeString((*_iter877));
    + xfer += oprot->writeString((*_iter879));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12201,10 +12201,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrif
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->group_names.size()));
    - std::vector<std::string> ::const_iterator _iter878;
    - for (_iter878 = this->group_names.begin(); _iter878 != this->group_names.end(); ++_iter878)
    + std::vector<std::string> ::const_iterator _iter880;
    + for (_iter880 = this->group_names.begin(); _iter880 != this->group_names.end(); ++_iter880)
          {
    - xfer += oprot->writeString((*_iter878));
    + xfer += oprot->writeString((*_iter880));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12236,10 +12236,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thri
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter879;
    - for (_iter879 = (*(this->part_vals)).begin(); _iter879 != (*(this->part_vals)).end(); ++_iter879)
    + std::vector<std::string> ::const_iterator _iter881;
    + for (_iter881 = (*(this->part_vals)).begin(); _iter881 != (*(this->part_vals)).end(); ++_iter881)
          {
    - xfer += oprot->writeString((*_iter879));
    + xfer += oprot->writeString((*_iter881));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12252,10 +12252,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thri
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->group_names)).size()));
    - std::vector<std::string> ::const_iterator _iter880;
    - for (_iter880 = (*(this->group_names)).begin(); _iter880 != (*(this->group_names)).end(); ++_iter880)
    + std::vector<std::string> ::const_iterator _iter882;
    + for (_iter882 = (*(this->group_names)).begin(); _iter882 != (*(this->group_names)).end(); ++_iter882)
          {
    - xfer += oprot->writeString((*_iter880));
    + xfer += oprot->writeString((*_iter882));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12814,14 +12814,14 @@ uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::proto
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size881;
    - ::apache::thrift::protocol::TType _etype884;
    - xfer += iprot->readListBegin(_etype884, _size881);
    - this->success.resize(_size881);
    - uint32_t _i885;
    - for (_i885 = 0; _i885 < _size881; ++_i885)
    + uint32_t _size883;
    + ::apache::thrift::protocol::TType _etype886;
    + xfer += iprot->readListBegin(_etype886, _size883);
    + this->success.resize(_size883);
    + uint32_t _i887;
    + for (_i887 = 0; _i887 < _size883; ++_i887)
                  {
    - xfer += this->success[_i885].read(iprot);
    + xfer += this->success[_i887].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -12868,10 +12868,10 @@ uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::prot
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Partition> ::const_iterator _iter886;
    - for (_iter886 = this->success.begin(); _iter886 != this->success.end(); ++_iter886)
    + std::vector<Partition> ::const_iterator _iter888;
    + for (_iter888 = this->success.begin(); _iter888 != this->success.end(); ++_iter888)
            {
    - xfer += (*_iter886).write(oprot);
    + xfer += (*_iter888).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -12920,14 +12920,14 @@ uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::prot
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size887;
    - ::apache::thrift::protocol::TType _etype890;
    - xfer += iprot->readListBegin(_etype890, _size887);
    - (*(this->success)).resize(_size887);
    - uint32_t _i891;
    - for (_i891 = 0; _i891 < _size887; ++_i891)
    + uint32_t _size889;
    + ::apache::thrift::protocol::TType _etype892;
    + xfer += iprot->readListBegin(_etype892, _size889);
    + (*(this->success)).resize(_size889);
    + uint32_t _i893;
    + for (_i893 = 0; _i893 < _size889; ++_i893)
                  {
    - xfer += (*(this->success))[_i891].read(iprot);
    + xfer += (*(this->success))[_i893].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13026,14 +13026,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::read(::apache::thrif
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->group_names.clear();
    - uint32_t _size892;
    - ::apache::thrift::protocol::TType _etype895;
    - xfer += iprot->readListBegin(_etype895, _size892);
    - this->group_names.resize(_size892);
    - uint32_t _i896;
    - for (_i896 = 0; _i896 < _size892; ++_i896)
    + uint32_t _size894;
    + ::apache::thrift::protocol::TType _etype897;
    + xfer += iprot->readListBegin(_etype897, _size894);
    + this->group_names.resize(_size894);
    + uint32_t _i898;
    + for (_i898 = 0; _i898 < _size894; ++_i898)
                  {
    - xfer += iprot->readString(this->group_names[_i896]);
    + xfer += iprot->readString(this->group_names[_i898]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13078,10 +13078,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thri
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->group_names.size()));
    - std::vector<std::string> ::const_iterator _iter897;
    - for (_iter897 = this->group_names.begin(); _iter897 != this->group_names.end(); ++_iter897)
    + std::vector<std::string> ::const_iterator _iter899;
    + for (_iter899 = this->group_names.begin(); _iter899 != this->group_names.end(); ++_iter899)
          {
    - xfer += oprot->writeString((*_iter897));
    + xfer += oprot->writeString((*_iter899));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -13121,10 +13121,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thr
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->group_names)).size()));
    - std::vector<std::string> ::const_iterator _iter898;
    - for (_iter898 = (*(this->group_names)).begin(); _iter898 != (*(this->group_names)).end(); ++_iter898)
    + std::vector<std::string> ::const_iterator _iter900;
    + for (_iter900 = (*(this->group_names)).begin(); _iter900 != (*(this->group_names)).end(); ++_iter900)
          {
    - xfer += oprot->writeString((*_iter898));
    + xfer += oprot->writeString((*_iter900));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -13165,14 +13165,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::read(::apache::thr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size899;
    - ::apache::thrift::protocol::TType _etype902;
    - xfer += iprot->readListBegin(_etype902, _size899);
    - this->success.resize(_size899);
    - uint32_t _i903;
    - for (_i903 = 0; _i903 < _size899; ++_i903)
    + uint32_t _size901;
    + ::apache::thrift::protocol::TType _etype904;
    + xfer += iprot->readListBegin(_etype904, _size901);
    + this->success.resize(_size901);
    + uint32_t _i905;
    + for (_i905 = 0; _i905 < _size901; ++_i905)
                  {
    - xfer += this->success[_i903].read(iprot);
    + xfer += this->success[_i905].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13219,10 +13219,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::write(::apache::th
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Partition> ::const_iterator _iter904;
    - for (_iter904 = this->success.begin(); _iter904 != this->success.end(); ++_iter904)
    + std::vector<Partition> ::const_iterator _iter906;
    + for (_iter906 = this->success.begin(); _iter906 != this->success.end(); ++_iter906)
            {
    - xfer += (*_iter904).write(oprot);
    + xfer += (*_iter906).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -13271,14 +13271,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_presult::read(::apache::th
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size905;
    - ::apache::thrift::protocol::TType _etype908;
    - xfer += iprot->readListBegin(_etype908, _size905);
    - (*(this->success)).resize(_size905);
    - uint32_t _i909;
    - for (_i909 = 0; _i909 < _size905; ++_i909)
    + uint32_t _size907;
    + ::apache::thrift::protocol::TType _etype910;
    + xfer += iprot->readListBegin(_etype910, _size907);
    + (*(this->success)).resize(_size907);
    + uint32_t _i911;
    + for (_i911 = 0; _i911 < _size907; ++_i911)
                  {
    - xfer += (*(this->success))[_i909].read(iprot);
    + xfer += (*(this->success))[_i911].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13456,14 +13456,14 @@ uint32_t ThriftHiveMetastore_get_partitions_pspec_result::read(::apache::thrift:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size910;
    - ::apache::thrift::protocol::TType _etype913;
    - xfer += iprot->readListBegin(_etype913, _size910);
    - this->success.resize(_size910);
    - uint32_t _i914;
    - for (_i914 = 0; _i914 < _size910; ++_i914)
    + uint32_t _size912;
    + ::apache::thrift::protocol::TType _etype915;
    + xfer += iprot->readListBegin(_etype915, _size912);
    + this->success.resize(_size912);
    + uint32_t _i916;
    + for (_i916 = 0; _i916 < _size912; ++_i916)
                  {
    - xfer += this->success[_i914].read(iprot);
    + xfer += this->success[_i916].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13510,10 +13510,10 @@ uint32_t ThriftHiveMetastore_get_partitions_pspec_result::write(::apache::thrift
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<PartitionSpec> ::const_iterator _iter915;
    - for (_iter915 = this->success.begin(); _iter915 != this->success.end(); ++_iter915)
    + std::vector<PartitionSpec> ::const_iterator _iter917;
    + for (_iter917 = this->success.begin(); _iter917 != this->success.end(); ++_iter917)
            {
    - xfer += (*_iter915).write(oprot);
    + xfer += (*_iter917).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -13562,14 +13562,14 @@ uint32_t ThriftHiveMetastore_get_partitions_pspec_presult::read(::apache::thrift
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size916;
    - ::apache::thrift::protocol::TType _etype919;
    - xfer += iprot->readListBegin(_etype919, _size916);
    - (*(this->success)).resize(_size916);
    - uint32_t _i920;
    - for (_i920 = 0; _i920 < _size916; ++_i920)
    + uint32_t _size918;
    + ::apache::thrift::protocol::TType _etype921;
    + xfer += iprot->readListBegin(_etype921, _size918);
    + (*(this->success)).resize(_size918);
    + uint32_t _i922;
    + for (_i922 = 0; _i922 < _size918; ++_i922)
                  {
    - xfer += (*(this->success))[_i920].read(iprot);
    + xfer += (*(this->success))[_i922].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13747,14 +13747,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift::
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size921;
    - ::apache::thrift::protocol::TType _etype924;
    - xfer += iprot->readListBegin(_etype924, _size921);
    - this->success.resize(_size921);
    - uint32_t _i925;
    - for (_i925 = 0; _i925 < _size921; ++_i925)
    + uint32_t _size923;
    + ::apache::thrift::protocol::TType _etype926;
    + xfer += iprot->readListBegin(_etype926, _size923);
    + this->success.resize(_size923);
    + uint32_t _i927;
    + for (_i927 = 0; _i927 < _size923; ++_i927)
                  {
    - xfer += iprot->readString(this->success[_i925]);
    + xfer += iprot->readString(this->success[_i927]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13793,10 +13793,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::write(::apache::thrift:
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->success.size()));
    - std::vector<std::string> ::const_iterator _iter926;
    - for (_iter926 = this->success.begin(); _iter926 != this->success.end(); ++_iter926)
    + std::vector<std::string> ::const_iterator _iter928;
    + for (_iter928 = this->success.begin(); _iter928 != this->success.end(); ++_iter928)
            {
    - xfer += oprot->writeString((*_iter926));
    + xfer += oprot->writeString((*_iter928));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -13841,14 +13841,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_presult::read(::apache::thrift:
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size927;
    - ::apache::thrift::protocol::TType _etype930;
    - xfer += iprot->readListBegin(_etype930, _size927);
    - (*(this->success)).resize(_size927);
    - uint32_t _i931;
    - for (_i931 = 0; _i931 < _size927; ++_i931)
    + uint32_t _size929;
    + ::apache::thrift::protocol::TType _etype932;
    + xfer += iprot->readListBegin(_etype932, _size929);
    + (*(this->success)).resize(_size929);
    + uint32_t _i933;
    + for (_i933 = 0; _i933 < _size929; ++_i933)
                  {
    - xfer += iprot->readString((*(this->success))[_i931]);
    + xfer += iprot->readString((*(this->success))[_i933]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13923,14 +13923,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(::apache::thrift::prot
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size932;
    - ::apache::thrift::protocol::TType _etype935;
    - xfer += iprot->readListBegin(_etype935, _size932);
    - this->part_vals.resize(_size932);
    - uint32_t _i936;
    - for (_i936 = 0; _i936 < _size932; ++_i936)
    + uint32_t _size934;
    + ::apache::thrift::protocol::TType _etype937;
    + xfer += iprot->readListBegin(_etype937, _size934);
    + this->part_vals.resize(_size934);
    + uint32_t _i938;
    + for (_i938 = 0; _i938 < _size934; ++_i938)
                  {
    - xfer += iprot->readString(this->part_vals[_i936]);
    + xfer += iprot->readString(this->part_vals[_i938]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13975,10 +13975,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::pro
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter937;
    - for (_iter937 = this->part_vals.begin(); _iter937 != this->part_vals.end(); ++_iter937)
    + std::vector<std::string> ::const_iterator _iter939;
    + for (_iter939 = this->part_vals.begin(); _iter939 != this->part_vals.end(); ++_iter939)
          {
    - xfer += oprot->writeString((*_iter937));
    + xfer += oprot->writeString((*_iter939));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14014,10 +14014,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::pr
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>((*(this->part_vals)).size()));
    - std::vector<std::string> ::const_iterator _iter938;
    - for (_iter938 = (*(this->part_vals)).begin(); _iter938 != (*(this->part_vals)).end(); ++_iter938)
    + std::vector<std::string> ::const_iterator _iter940;
    + for (_iter940 = (*(this->part_vals)).begin(); _iter940 != (*(this->part_vals)).end(); ++_iter940)
          {
    - xfer += oprot->writeString((*_iter938));
    + xfer += oprot->writeString((*_iter940));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14062,14 +14062,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(::apache::thrift::pr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->success.clear();
    - uint32_t _size939;
    - ::apache::thrift::protocol::TType _etype942;
    - xfer += iprot->readListBegin(_etype942, _size939);
    - this->success.resize(_size939);
    - uint32_t _i943;
    - for (_i943 = 0; _i943 < _size939; ++_i943)
    + uint32_t _size941;
    + ::apache::thrift::protocol::TType _etype944;
    + xfer += iprot->readListBegin(_etype944, _size941);
    + this->success.resize(_size941);
    + uint32_t _i945;
    + for (_i945 = 0; _i945 < _size941; ++_i945)
                  {
    - xfer += this->success[_i943].read(iprot);
    + xfer += this->success[_i945].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14116,10 +14116,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(::apache::thrift::p
          xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->success.size()));
    - std::vector<Partition> ::const_iterator _iter944;
    - for (_iter944 = this->success.begin(); _iter944 != this->success.end(); ++_iter944)
    + std::vector<Partition> ::const_iterator _iter946;
    + for (_iter946 = this->success.begin(); _iter946 != this->success.end(); ++_iter946)
            {
    - xfer += (*_iter944).write(oprot);
    + xfer += (*_iter946).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -14168,14 +14168,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(::apache::thrift::p
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  (*(this->success)).clear();
    - uint32_t _size945;
    - ::apache::thrift::protocol::TType _etype948;
    - xfer += iprot->readListBegin(_etype948, _size945);
    - (*(this->success)).resize(_size945);
    - uint32_t _i949;
    - for (_i949 = 0; _i949 < _size945; ++_i949)
    + uint32_t _size947;
    + ::apache::thrift::protocol::TType _etype950;
    + xfer += iprot->readListBegin(_etype950, _size947);
    + (*(this->success)).resize(_size947);
    + uint32_t _i951;
    + for (_i951 = 0; _i951 < _size947; ++_i951)
                  {
    - xfer += (*(this->success))[_i949].read(iprot);
    + xfer += (*(this->success))[_i951].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14258,14 +14258,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::th
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->part_vals.clear();
    - uint32_t _size950;
    - ::apache::thrift::protocol::TType _etype953;
    - xfer += iprot->readListBegin(_etype953, _size950);
    - this->part_vals.resize(_size950);
    - uint32_t _i954;
    - for (_i954 = 0; _i954 < _size950; ++_i954)
    + uint32_t _size952;
    + ::apache::thrift::protocol::TType _etype955;
    + xfer += iprot->readListBegin(_etype955, _size952);
    + this->part_vals.resize(_size952);
    + uint32_t _i956;
    + for (_i956 = 0; _i956 < _size952; ++_i956)
                  {
    - xfer += iprot->readString(this->part_vals[_i954]);
    + xfer += iprot->readString(this->part_vals[_i956]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14294,14 +14294,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::th
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->group_names.clear();
    - uint32_t _size955;
    - ::apache::thrift::protocol::TType _etype958;
    - xfer += iprot->readListBegin(_etype958, _size955);
    - this->group_names.resize(_size955);
    - uint32_t _i959;
    - for (_i959 = 0; _i959 < _size955; ++_i959)
    + uint32_t _size957;
    + ::apache::thrift::protocol::TType _etype960;
    + xfer += iprot->readListBegin(_etype960, _size957);
    + this->group_names.resize(_size957);
    + uint32_t _i961;
    + for (_i961 = 0; _i961 < _size957; ++_i961)
                  {
    - xfer += iprot->readString(this->group_names[_i959]);
    + xfer += iprot->readString(this->group_names[_i961]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14338,10 +14338,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::t
        xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->part_vals.size()));
    - std::vector<std::string> ::const_iterator _iter960;
    - for (_iter960 = this->part_vals.begin(); _iter960 != this->part_vals.end(); ++_iter960)
    + std::vector<std::string> ::const_iterator _iter962;
    + for (_iter962 = this->part_vals.begin(); _iter962 != this->part_vals.end(); ++_iter962)
          {
    - xfer += oprot->writeString((*_iter960));
    + xfer += oprot->writeString((*_iter962));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14358,10 +14358,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::t
        xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->group_names.size()));
    - std::vector<std::string> ::const_iterator _iter961;
    - for (_iter961 = this->group_names.begin(); _iter961 != this->group_names.end(); ++_iter961)
    + std::vector<std::string> ::const_iterator _iter963;
    + for (_iter963 = this->group_names.begin(); _iter963 != this->group_names.end(); ++_iter963)
          {
    - xfer += oprot->writeString((*_iter961));
    + xfer += oprot->writeString((*_iter963));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14393,10 +14393,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs

    <TRUNCATED>
  • Ekoifman at May 19, 2016 at 8:00 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
    index 7ea4493..9e2e883 100644
    --- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
    +++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
    @@ -119,6 +119,24 @@ const char* _kGrantRevokeTypeNames[] = {
      };
      const std::map<int, const char*> _GrantRevokeType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kGrantRevokeTypeValues, _kGrantRevokeTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

    +int _kDataOperationTypeValues[] = {
    + DataOperationType::SELECT,
    + DataOperationType::INSERT,
    + DataOperationType::UPDATE,
    + DataOperationType::DELETE,
    + DataOperationType::UNSET,
    + DataOperationType::NO_TXN
    +};
    +const char* _kDataOperationTypeNames[] = {
    + "SELECT",
    + "INSERT",
    + "UPDATE",
    + "DELETE",
    + "UNSET",
    + "NO_TXN"
    +};
    +const std::map<int, const char*> _DataOperationType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kDataOperationTypeValues, _kDataOperationTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
    +
      int _kEventRequestTypeValues[] = {
        EventRequestType::INSERT,
        EventRequestType::UPDATE,
    @@ -10999,6 +11017,16 @@ void LockComponent::__set_partitionname(const std::string& val) {
      __isset.partitionname = true;
      }

    +void LockComponent::__set_operationType(const DataOperationType::type val) {
    + this->operationType = val;
    +__isset.operationType = true;
    +}
    +
    +void LockComponent::__set_isAcid(const bool val) {
    + this->isAcid = val;
    +__isset.isAcid = true;
    +}
    +
      uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
    @@ -11067,6 +11095,24 @@ uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {
                xfer += iprot->skip(ftype);
              }
              break;
    + case 6:
    + if (ftype == ::apache::thrift::protocol::T_I32) {
    + int32_t ecast508;
    + xfer += iprot->readI32(ecast508);
    + this->operationType = (DataOperationType::type)ecast508;
    + this->__isset.operationType = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
    + case 7:
    + if (ftype == ::apache::thrift::protocol::T_BOOL) {
    + xfer += iprot->readBool(this->isAcid);
    + this->__isset.isAcid = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
            default:
              xfer += iprot->skip(ftype);
              break;
    @@ -11112,6 +11158,16 @@ uint32_t LockComponent::write(::apache::thrift::protocol::TProtocol* oprot) cons
          xfer += oprot->writeString(this->partitionname);
          xfer += oprot->writeFieldEnd();
        }
    + if (this->__isset.operationType) {
    + xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 6);
    + xfer += oprot->writeI32((int32_t)this->operationType);
    + xfer += oprot->writeFieldEnd();
    + }
    + if (this->__isset.isAcid) {
    + xfer += oprot->writeFieldBegin("isAcid", ::apache::thrift::protocol::T_BOOL, 7);
    + xfer += oprot->writeBool(this->isAcid);
    + xfer += oprot->writeFieldEnd();
    + }
        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
        return xfer;
    @@ -11124,24 +11180,30 @@ void swap(LockComponent &a, LockComponent &b) {
        swap(a.dbname, b.dbname);
        swap(a.tablename, b.tablename);
        swap(a.partitionname, b.partitionname);
    + swap(a.operationType, b.operationType);
    + swap(a.isAcid, b.isAcid);
        swap(a.__isset, b.__isset);
      }

    -LockComponent::LockComponent(const LockComponent& other508) {
    - type = other508.type;
    - level = other508.level;
    - dbname = other508.dbname;
    - tablename = other508.tablename;
    - partitionname = other508.partitionname;
    - __isset = other508.__isset;
    -}
    -LockComponent& LockComponent::operator=(const LockComponent& other509) {
    +LockComponent::LockComponent(const LockComponent& other509) {
        type = other509.type;
        level = other509.level;
        dbname = other509.dbname;
        tablename = other509.tablename;
        partitionname = other509.partitionname;
    + operationType = other509.operationType;
    + isAcid = other509.isAcid;
        __isset = other509.__isset;
    +}
    +LockComponent& LockComponent::operator=(const LockComponent& other510) {
    + type = other510.type;
    + level = other510.level;
    + dbname = other510.dbname;
    + tablename = other510.tablename;
    + partitionname = other510.partitionname;
    + operationType = other510.operationType;
    + isAcid = other510.isAcid;
    + __isset = other510.__isset;
        return *this;
      }
      void LockComponent::printTo(std::ostream& out) const {
    @@ -11152,6 +11214,8 @@ void LockComponent::printTo(std::ostream& out) const {
        out << ", " << "dbname=" << to_string(dbname);
        out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "<null>"));
        out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "<null>"));
    + out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "<null>"));
    + out << ", " << "isAcid="; (__isset.isAcid ? (out << to_string(isAcid)) : (out << "<null>"));
        out << ")";
      }

    @@ -11210,14 +11274,14 @@ uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->component.clear();
    - uint32_t _size510;
    - ::apache::thrift::protocol::TType _etype513;
    - xfer += iprot->readListBegin(_etype513, _size510);
    - this->component.resize(_size510);
    - uint32_t _i514;
    - for (_i514 = 0; _i514 < _size510; ++_i514)
    + uint32_t _size511;
    + ::apache::thrift::protocol::TType _etype514;
    + xfer += iprot->readListBegin(_etype514, _size511);
    + this->component.resize(_size511);
    + uint32_t _i515;
    + for (_i515 = 0; _i515 < _size511; ++_i515)
                  {
    - xfer += this->component[_i514].read(iprot);
    + xfer += this->component[_i515].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -11284,10 +11348,10 @@ uint32_t LockRequest::write(::apache::thrift::protocol::TProtocol* oprot) const
        xfer += oprot->writeFieldBegin("component", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->component.size()));
    - std::vector<LockComponent> ::const_iterator _iter515;
    - for (_iter515 = this->component.begin(); _iter515 != this->component.end(); ++_iter515)
    + std::vector<LockComponent> ::const_iterator _iter516;
    + for (_iter516 = this->component.begin(); _iter516 != this->component.end(); ++_iter516)
          {
    - xfer += (*_iter515).write(oprot);
    + xfer += (*_iter516).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -11326,21 +11390,21 @@ void swap(LockRequest &a, LockRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -LockRequest::LockRequest(const LockRequest& other516) {
    - component = other516.component;
    - txnid = other516.txnid;
    - user = other516.user;
    - hostname = other516.hostname;
    - agentInfo = other516.agentInfo;
    - __isset = other516.__isset;
    -}
    -LockRequest& LockRequest::operator=(const LockRequest& other517) {
    +LockRequest::LockRequest(const LockRequest& other517) {
        component = other517.component;
        txnid = other517.txnid;
        user = other517.user;
        hostname = other517.hostname;
        agentInfo = other517.agentInfo;
        __isset = other517.__isset;
    +}
    +LockRequest& LockRequest::operator=(const LockRequest& other518) {
    + component = other518.component;
    + txnid = other518.txnid;
    + user = other518.user;
    + hostname = other518.hostname;
    + agentInfo = other518.agentInfo;
    + __isset = other518.__isset;
        return *this;
      }
      void LockRequest::printTo(std::ostream& out) const {
    @@ -11400,9 +11464,9 @@ uint32_t LockResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
              break;
            case 2:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast518;
    - xfer += iprot->readI32(ecast518);
    - this->state = (LockState::type)ecast518;
    + int32_t ecast519;
    + xfer += iprot->readI32(ecast519);
    + this->state = (LockState::type)ecast519;
                isset_state = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -11448,13 +11512,13 @@ void swap(LockResponse &a, LockResponse &b) {
        swap(a.state, b.state);
      }

    -LockResponse::LockResponse(const LockResponse& other519) {
    - lockid = other519.lockid;
    - state = other519.state;
    -}
    -LockResponse& LockResponse::operator=(const LockResponse& other520) {
    +LockResponse::LockResponse(const LockResponse& other520) {
        lockid = other520.lockid;
        state = other520.state;
    +}
    +LockResponse& LockResponse::operator=(const LockResponse& other521) {
    + lockid = other521.lockid;
    + state = other521.state;
        return *this;
      }
      void LockResponse::printTo(std::ostream& out) const {
    @@ -11576,17 +11640,17 @@ void swap(CheckLockRequest &a, CheckLockRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -CheckLockRequest::CheckLockRequest(const CheckLockRequest& other521) {
    - lockid = other521.lockid;
    - txnid = other521.txnid;
    - elapsed_ms = other521.elapsed_ms;
    - __isset = other521.__isset;
    -}
    -CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other522) {
    +CheckLockRequest::CheckLockRequest(const CheckLockRequest& other522) {
        lockid = other522.lockid;
        txnid = other522.txnid;
        elapsed_ms = other522.elapsed_ms;
        __isset = other522.__isset;
    +}
    +CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other523) {
    + lockid = other523.lockid;
    + txnid = other523.txnid;
    + elapsed_ms = other523.elapsed_ms;
    + __isset = other523.__isset;
        return *this;
      }
      void CheckLockRequest::printTo(std::ostream& out) const {
    @@ -11670,11 +11734,11 @@ void swap(UnlockRequest &a, UnlockRequest &b) {
        swap(a.lockid, b.lockid);
      }

    -UnlockRequest::UnlockRequest(const UnlockRequest& other523) {
    - lockid = other523.lockid;
    -}
    -UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other524) {
    +UnlockRequest::UnlockRequest(const UnlockRequest& other524) {
        lockid = other524.lockid;
    +}
    +UnlockRequest& UnlockRequest::operator=(const UnlockRequest& other525) {
    + lockid = other525.lockid;
        return *this;
      }
      void UnlockRequest::printTo(std::ostream& out) const {
    @@ -11813,19 +11877,19 @@ void swap(ShowLocksRequest &a, ShowLocksRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other525) {
    - dbname = other525.dbname;
    - tablename = other525.tablename;
    - partname = other525.partname;
    - isExtended = other525.isExtended;
    - __isset = other525.__isset;
    -}
    -ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other526) {
    +ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other526) {
        dbname = other526.dbname;
        tablename = other526.tablename;
        partname = other526.partname;
        isExtended = other526.isExtended;
        __isset = other526.__isset;
    +}
    +ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other527) {
    + dbname = other527.dbname;
    + tablename = other527.tablename;
    + partname = other527.partname;
    + isExtended = other527.isExtended;
    + __isset = other527.__isset;
        return *this;
      }
      void ShowLocksRequest::printTo(std::ostream& out) const {
    @@ -11978,9 +12042,9 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i
              break;
            case 5:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast527;
    - xfer += iprot->readI32(ecast527);
    - this->state = (LockState::type)ecast527;
    + int32_t ecast528;
    + xfer += iprot->readI32(ecast528);
    + this->state = (LockState::type)ecast528;
                isset_state = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -11988,9 +12052,9 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i
              break;
            case 6:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast528;
    - xfer += iprot->readI32(ecast528);
    - this->type = (LockType::type)ecast528;
    + int32_t ecast529;
    + xfer += iprot->readI32(ecast529);
    + this->type = (LockType::type)ecast529;
                isset_type = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -12206,26 +12270,7 @@ void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b) {
        swap(a.__isset, b.__isset);
      }

    -ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other529) {
    - lockid = other529.lockid;
    - dbname = other529.dbname;
    - tablename = other529.tablename;
    - partname = other529.partname;
    - state = other529.state;
    - type = other529.type;
    - txnid = other529.txnid;
    - lastheartbeat = other529.lastheartbeat;
    - acquiredat = other529.acquiredat;
    - user = other529.user;
    - hostname = other529.hostname;
    - heartbeatCount = other529.heartbeatCount;
    - agentInfo = other529.agentInfo;
    - blockedByExtId = other529.blockedByExtId;
    - blockedByIntId = other529.blockedByIntId;
    - lockIdInternal = other529.lockIdInternal;
    - __isset = other529.__isset;
    -}
    -ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other530) {
    +ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElement& other530) {
        lockid = other530.lockid;
        dbname = other530.dbname;
        tablename = other530.tablename;
    @@ -12243,6 +12288,25 @@ ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksRes
        blockedByIntId = other530.blockedByIntId;
        lockIdInternal = other530.lockIdInternal;
        __isset = other530.__isset;
    +}
    +ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other531) {
    + lockid = other531.lockid;
    + dbname = other531.dbname;
    + tablename = other531.tablename;
    + partname = other531.partname;
    + state = other531.state;
    + type = other531.type;
    + txnid = other531.txnid;
    + lastheartbeat = other531.lastheartbeat;
    + acquiredat = other531.acquiredat;
    + user = other531.user;
    + hostname = other531.hostname;
    + heartbeatCount = other531.heartbeatCount;
    + agentInfo = other531.agentInfo;
    + blockedByExtId = other531.blockedByExtId;
    + blockedByIntId = other531.blockedByIntId;
    + lockIdInternal = other531.lockIdInternal;
    + __isset = other531.__isset;
        return *this;
      }
      void ShowLocksResponseElement::printTo(std::ostream& out) const {
    @@ -12301,14 +12365,14 @@ uint32_t ShowLocksResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->locks.clear();
    - uint32_t _size531;
    - ::apache::thrift::protocol::TType _etype534;
    - xfer += iprot->readListBegin(_etype534, _size531);
    - this->locks.resize(_size531);
    - uint32_t _i535;
    - for (_i535 = 0; _i535 < _size531; ++_i535)
    + uint32_t _size532;
    + ::apache::thrift::protocol::TType _etype535;
    + xfer += iprot->readListBegin(_etype535, _size532);
    + this->locks.resize(_size532);
    + uint32_t _i536;
    + for (_i536 = 0; _i536 < _size532; ++_i536)
                  {
    - xfer += this->locks[_i535].read(iprot);
    + xfer += this->locks[_i536].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -12337,10 +12401,10 @@ uint32_t ShowLocksResponse::write(::apache::thrift::protocol::TProtocol* oprot)
        xfer += oprot->writeFieldBegin("locks", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->locks.size()));
    - std::vector<ShowLocksResponseElement> ::const_iterator _iter536;
    - for (_iter536 = this->locks.begin(); _iter536 != this->locks.end(); ++_iter536)
    + std::vector<ShowLocksResponseElement> ::const_iterator _iter537;
    + for (_iter537 = this->locks.begin(); _iter537 != this->locks.end(); ++_iter537)
          {
    - xfer += (*_iter536).write(oprot);
    + xfer += (*_iter537).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -12357,13 +12421,13 @@ void swap(ShowLocksResponse &a, ShowLocksResponse &b) {
        swap(a.__isset, b.__isset);
      }

    -ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other537) {
    - locks = other537.locks;
    - __isset = other537.__isset;
    -}
    -ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other538) {
    +ShowLocksResponse::ShowLocksResponse(const ShowLocksResponse& other538) {
        locks = other538.locks;
        __isset = other538.__isset;
    +}
    +ShowLocksResponse& ShowLocksResponse::operator=(const ShowLocksResponse& other539) {
    + locks = other539.locks;
    + __isset = other539.__isset;
        return *this;
      }
      void ShowLocksResponse::printTo(std::ostream& out) const {
    @@ -12464,15 +12528,15 @@ void swap(HeartbeatRequest &a, HeartbeatRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other539) {
    - lockid = other539.lockid;
    - txnid = other539.txnid;
    - __isset = other539.__isset;
    -}
    -HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other540) {
    +HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& other540) {
        lockid = other540.lockid;
        txnid = other540.txnid;
        __isset = other540.__isset;
    +}
    +HeartbeatRequest& HeartbeatRequest::operator=(const HeartbeatRequest& other541) {
    + lockid = other541.lockid;
    + txnid = other541.txnid;
    + __isset = other541.__isset;
        return *this;
      }
      void HeartbeatRequest::printTo(std::ostream& out) const {
    @@ -12575,13 +12639,13 @@ void swap(HeartbeatTxnRangeRequest &a, HeartbeatTxnRangeRequest &b) {
        swap(a.max, b.max);
      }

    -HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other541) {
    - min = other541.min;
    - max = other541.max;
    -}
    -HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other542) {
    +HeartbeatTxnRangeRequest::HeartbeatTxnRangeRequest(const HeartbeatTxnRangeRequest& other542) {
        min = other542.min;
        max = other542.max;
    +}
    +HeartbeatTxnRangeRequest& HeartbeatTxnRangeRequest::operator=(const HeartbeatTxnRangeRequest& other543) {
    + min = other543.min;
    + max = other543.max;
        return *this;
      }
      void HeartbeatTxnRangeRequest::printTo(std::ostream& out) const {
    @@ -12632,15 +12696,15 @@ uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol*
              if (ftype == ::apache::thrift::protocol::T_SET) {
                {
                  this->aborted.clear();
    - uint32_t _size543;
    - ::apache::thrift::protocol::TType _etype546;
    - xfer += iprot->readSetBegin(_etype546, _size543);
    - uint32_t _i547;
    - for (_i547 = 0; _i547 < _size543; ++_i547)
    + uint32_t _size544;
    + ::apache::thrift::protocol::TType _etype547;
    + xfer += iprot->readSetBegin(_etype547, _size544);
    + uint32_t _i548;
    + for (_i548 = 0; _i548 < _size544; ++_i548)
                  {
    - int64_t _elem548;
    - xfer += iprot->readI64(_elem548);
    - this->aborted.insert(_elem548);
    + int64_t _elem549;
    + xfer += iprot->readI64(_elem549);
    + this->aborted.insert(_elem549);
                  }
                  xfer += iprot->readSetEnd();
                }
    @@ -12653,15 +12717,15 @@ uint32_t HeartbeatTxnRangeResponse::read(::apache::thrift::protocol::TProtocol*
              if (ftype == ::apache::thrift::protocol::T_SET) {
                {
                  this->nosuch.clear();
    - uint32_t _size549;
    - ::apache::thrift::protocol::TType _etype552;
    - xfer += iprot->readSetBegin(_etype552, _size549);
    - uint32_t _i553;
    - for (_i553 = 0; _i553 < _size549; ++_i553)
    + uint32_t _size550;
    + ::apache::thrift::protocol::TType _etype553;
    + xfer += iprot->readSetBegin(_etype553, _size550);
    + uint32_t _i554;
    + for (_i554 = 0; _i554 < _size550; ++_i554)
                  {
    - int64_t _elem554;
    - xfer += iprot->readI64(_elem554);
    - this->nosuch.insert(_elem554);
    + int64_t _elem555;
    + xfer += iprot->readI64(_elem555);
    + this->nosuch.insert(_elem555);
                  }
                  xfer += iprot->readSetEnd();
                }
    @@ -12694,10 +12758,10 @@ uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol*
        xfer += oprot->writeFieldBegin("aborted", ::apache::thrift::protocol::T_SET, 1);
        {
          xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->aborted.size()));
    - std::set<int64_t> ::const_iterator _iter555;
    - for (_iter555 = this->aborted.begin(); _iter555 != this->aborted.end(); ++_iter555)
    + std::set<int64_t> ::const_iterator _iter556;
    + for (_iter556 = this->aborted.begin(); _iter556 != this->aborted.end(); ++_iter556)
          {
    - xfer += oprot->writeI64((*_iter555));
    + xfer += oprot->writeI64((*_iter556));
          }
          xfer += oprot->writeSetEnd();
        }
    @@ -12706,10 +12770,10 @@ uint32_t HeartbeatTxnRangeResponse::write(::apache::thrift::protocol::TProtocol*
        xfer += oprot->writeFieldBegin("nosuch", ::apache::thrift::protocol::T_SET, 2);
        {
          xfer += oprot->writeSetBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->nosuch.size()));
    - std::set<int64_t> ::const_iterator _iter556;
    - for (_iter556 = this->nosuch.begin(); _iter556 != this->nosuch.end(); ++_iter556)
    + std::set<int64_t> ::const_iterator _iter557;
    + for (_iter557 = this->nosuch.begin(); _iter557 != this->nosuch.end(); ++_iter557)
          {
    - xfer += oprot->writeI64((*_iter556));
    + xfer += oprot->writeI64((*_iter557));
          }
          xfer += oprot->writeSetEnd();
        }
    @@ -12726,13 +12790,13 @@ void swap(HeartbeatTxnRangeResponse &a, HeartbeatTxnRangeResponse &b) {
        swap(a.nosuch, b.nosuch);
      }

    -HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other557) {
    - aborted = other557.aborted;
    - nosuch = other557.nosuch;
    -}
    -HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other558) {
    +HeartbeatTxnRangeResponse::HeartbeatTxnRangeResponse(const HeartbeatTxnRangeResponse& other558) {
        aborted = other558.aborted;
        nosuch = other558.nosuch;
    +}
    +HeartbeatTxnRangeResponse& HeartbeatTxnRangeResponse::operator=(const HeartbeatTxnRangeResponse& other559) {
    + aborted = other559.aborted;
    + nosuch = other559.nosuch;
        return *this;
      }
      void HeartbeatTxnRangeResponse::printTo(std::ostream& out) const {
    @@ -12820,9 +12884,9 @@ uint32_t CompactionRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
              break;
            case 4:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast559;
    - xfer += iprot->readI32(ecast559);
    - this->type = (CompactionType::type)ecast559;
    + int32_t ecast560;
    + xfer += iprot->readI32(ecast560);
    + this->type = (CompactionType::type)ecast560;
                isset_type = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -12896,21 +12960,21 @@ void swap(CompactionRequest &a, CompactionRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -CompactionRequest::CompactionRequest(const CompactionRequest& other560) {
    - dbname = other560.dbname;
    - tablename = other560.tablename;
    - partitionname = other560.partitionname;
    - type = other560.type;
    - runas = other560.runas;
    - __isset = other560.__isset;
    -}
    -CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other561) {
    +CompactionRequest::CompactionRequest(const CompactionRequest& other561) {
        dbname = other561.dbname;
        tablename = other561.tablename;
        partitionname = other561.partitionname;
        type = other561.type;
        runas = other561.runas;
        __isset = other561.__isset;
    +}
    +CompactionRequest& CompactionRequest::operator=(const CompactionRequest& other562) {
    + dbname = other562.dbname;
    + tablename = other562.tablename;
    + partitionname = other562.partitionname;
    + type = other562.type;
    + runas = other562.runas;
    + __isset = other562.__isset;
        return *this;
      }
      void CompactionRequest::printTo(std::ostream& out) const {
    @@ -12973,11 +13037,11 @@ void swap(ShowCompactRequest &a, ShowCompactRequest &b) {
        (void) b;
      }

    -ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other562) {
    - (void) other562;
    -}
    -ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other563) {
    +ShowCompactRequest::ShowCompactRequest(const ShowCompactRequest& other563) {
        (void) other563;
    +}
    +ShowCompactRequest& ShowCompactRequest::operator=(const ShowCompactRequest& other564) {
    + (void) other564;
        return *this;
      }
      void ShowCompactRequest::printTo(std::ostream& out) const {
    @@ -13098,9 +13162,9 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol*
              break;
            case 4:
              if (ftype == ::apache::thrift::protocol::T_I32) {
    - int32_t ecast564;
    - xfer += iprot->readI32(ecast564);
    - this->type = (CompactionType::type)ecast564;
    + int32_t ecast565;
    + xfer += iprot->readI32(ecast565);
    + this->type = (CompactionType::type)ecast565;
                isset_type = true;
              } else {
                xfer += iprot->skip(ftype);
    @@ -13273,22 +13337,7 @@ void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) {
        swap(a.__isset, b.__isset);
      }

    -ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other565) {
    - dbname = other565.dbname;
    - tablename = other565.tablename;
    - partitionname = other565.partitionname;
    - type = other565.type;
    - state = other565.state;
    - workerid = other565.workerid;
    - start = other565.start;
    - runAs = other565.runAs;
    - hightestTxnId = other565.hightestTxnId;
    - metaInfo = other565.metaInfo;
    - endTime = other565.endTime;
    - hadoopJobId = other565.hadoopJobId;
    - __isset = other565.__isset;
    -}
    -ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other566) {
    +ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponseElement& other566) {
        dbname = other566.dbname;
        tablename = other566.tablename;
        partitionname = other566.partitionname;
    @@ -13302,6 +13351,21 @@ ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowComp
        endTime = other566.endTime;
        hadoopJobId = other566.hadoopJobId;
        __isset = other566.__isset;
    +}
    +ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other567) {
    + dbname = other567.dbname;
    + tablename = other567.tablename;
    + partitionname = other567.partitionname;
    + type = other567.type;
    + state = other567.state;
    + workerid = other567.workerid;
    + start = other567.start;
    + runAs = other567.runAs;
    + hightestTxnId = other567.hightestTxnId;
    + metaInfo = other567.metaInfo;
    + endTime = other567.endTime;
    + hadoopJobId = other567.hadoopJobId;
    + __isset = other567.__isset;
        return *this;
      }
      void ShowCompactResponseElement::printTo(std::ostream& out) const {
    @@ -13357,14 +13421,14 @@ uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot)
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->compacts.clear();
    - uint32_t _size567;
    - ::apache::thrift::protocol::TType _etype570;
    - xfer += iprot->readListBegin(_etype570, _size567);
    - this->compacts.resize(_size567);
    - uint32_t _i571;
    - for (_i571 = 0; _i571 < _size567; ++_i571)
    + uint32_t _size568;
    + ::apache::thrift::protocol::TType _etype571;
    + xfer += iprot->readListBegin(_etype571, _size568);
    + this->compacts.resize(_size568);
    + uint32_t _i572;
    + for (_i572 = 0; _i572 < _size568; ++_i572)
                  {
    - xfer += this->compacts[_i571].read(iprot);
    + xfer += this->compacts[_i572].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13395,10 +13459,10 @@ uint32_t ShowCompactResponse::write(::apache::thrift::protocol::TProtocol* oprot
        xfer += oprot->writeFieldBegin("compacts", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->compacts.size()));
    - std::vector<ShowCompactResponseElement> ::const_iterator _iter572;
    - for (_iter572 = this->compacts.begin(); _iter572 != this->compacts.end(); ++_iter572)
    + std::vector<ShowCompactResponseElement> ::const_iterator _iter573;
    + for (_iter573 = this->compacts.begin(); _iter573 != this->compacts.end(); ++_iter573)
          {
    - xfer += (*_iter572).write(oprot);
    + xfer += (*_iter573).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -13414,11 +13478,11 @@ void swap(ShowCompactResponse &a, ShowCompactResponse &b) {
        swap(a.compacts, b.compacts);
      }

    -ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other573) {
    - compacts = other573.compacts;
    -}
    -ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other574) {
    +ShowCompactResponse::ShowCompactResponse(const ShowCompactResponse& other574) {
        compacts = other574.compacts;
    +}
    +ShowCompactResponse& ShowCompactResponse::operator=(const ShowCompactResponse& other575) {
    + compacts = other575.compacts;
        return *this;
      }
      void ShowCompactResponse::printTo(std::ostream& out) const {
    @@ -13449,6 +13513,11 @@ void AddDynamicPartitions::__set_partitionnames(const std::vector<std::string> &
        this->partitionnames = val;
      }

    +void AddDynamicPartitions::__set_operationType(const DataOperationType::type val) {
    + this->operationType = val;
    +__isset.operationType = true;
    +}
    +
      uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot) {

        apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
    @@ -13502,14 +13571,14 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->partitionnames.clear();
    - uint32_t _size575;
    - ::apache::thrift::protocol::TType _etype578;
    - xfer += iprot->readListBegin(_etype578, _size575);
    - this->partitionnames.resize(_size575);
    - uint32_t _i579;
    - for (_i579 = 0; _i579 < _size575; ++_i579)
    + uint32_t _size576;
    + ::apache::thrift::protocol::TType _etype579;
    + xfer += iprot->readListBegin(_etype579, _size576);
    + this->partitionnames.resize(_size576);
    + uint32_t _i580;
    + for (_i580 = 0; _i580 < _size576; ++_i580)
                  {
    - xfer += iprot->readString(this->partitionnames[_i579]);
    + xfer += iprot->readString(this->partitionnames[_i580]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13518,6 +13587,16 @@ uint32_t AddDynamicPartitions::read(::apache::thrift::protocol::TProtocol* iprot
                xfer += iprot->skip(ftype);
              }
              break;
    + case 5:
    + if (ftype == ::apache::thrift::protocol::T_I32) {
    + int32_t ecast581;
    + xfer += iprot->readI32(ecast581);
    + this->operationType = (DataOperationType::type)ecast581;
    + this->__isset.operationType = true;
    + } else {
    + xfer += iprot->skip(ftype);
    + }
    + break;
            default:
              xfer += iprot->skip(ftype);
              break;
    @@ -13558,15 +13637,20 @@ uint32_t AddDynamicPartitions::write(::apache::thrift::protocol::TProtocol* opro
        xfer += oprot->writeFieldBegin("partitionnames", ::apache::thrift::protocol::T_LIST, 4);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionnames.size()));
    - std::vector<std::string> ::const_iterator _iter580;
    - for (_iter580 = this->partitionnames.begin(); _iter580 != this->partitionnames.end(); ++_iter580)
    + std::vector<std::string> ::const_iterator _iter582;
    + for (_iter582 = this->partitionnames.begin(); _iter582 != this->partitionnames.end(); ++_iter582)
          {
    - xfer += oprot->writeString((*_iter580));
    + xfer += oprot->writeString((*_iter582));
          }
          xfer += oprot->writeListEnd();
        }
        xfer += oprot->writeFieldEnd();

    + if (this->__isset.operationType) {
    + xfer += oprot->writeFieldBegin("operationType", ::apache::thrift::protocol::T_I32, 5);
    + xfer += oprot->writeI32((int32_t)this->operationType);
    + xfer += oprot->writeFieldEnd();
    + }
        xfer += oprot->writeFieldStop();
        xfer += oprot->writeStructEnd();
        return xfer;
    @@ -13578,19 +13662,25 @@ void swap(AddDynamicPartitions &a, AddDynamicPartitions &b) {
        swap(a.dbname, b.dbname);
        swap(a.tablename, b.tablename);
        swap(a.partitionnames, b.partitionnames);
    + swap(a.operationType, b.operationType);
    + swap(a.__isset, b.__isset);
      }

    -AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other581) {
    - txnid = other581.txnid;
    - dbname = other581.dbname;
    - tablename = other581.tablename;
    - partitionnames = other581.partitionnames;
    +AddDynamicPartitions::AddDynamicPartitions(const AddDynamicPartitions& other583) {
    + txnid = other583.txnid;
    + dbname = other583.dbname;
    + tablename = other583.tablename;
    + partitionnames = other583.partitionnames;
    + operationType = other583.operationType;
    + __isset = other583.__isset;
      }
    -AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other582) {
    - txnid = other582.txnid;
    - dbname = other582.dbname;
    - tablename = other582.tablename;
    - partitionnames = other582.partitionnames;
    +AddDynamicPartitions& AddDynamicPartitions::operator=(const AddDynamicPartitions& other584) {
    + txnid = other584.txnid;
    + dbname = other584.dbname;
    + tablename = other584.tablename;
    + partitionnames = other584.partitionnames;
    + operationType = other584.operationType;
    + __isset = other584.__isset;
        return *this;
      }
      void AddDynamicPartitions::printTo(std::ostream& out) const {
    @@ -13600,6 +13690,7 @@ void AddDynamicPartitions::printTo(std::ostream& out) const {
        out << ", " << "dbname=" << to_string(dbname);
        out << ", " << "tablename=" << to_string(tablename);
        out << ", " << "partitionnames=" << to_string(partitionnames);
    + out << ", " << "operationType="; (__isset.operationType ? (out << to_string(operationType)) : (out << "<null>"));
        out << ")";
      }

    @@ -13695,15 +13786,15 @@ void swap(NotificationEventRequest &a, NotificationEventRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other583) {
    - lastEvent = other583.lastEvent;
    - maxEvents = other583.maxEvents;
    - __isset = other583.__isset;
    +NotificationEventRequest::NotificationEventRequest(const NotificationEventRequest& other585) {
    + lastEvent = other585.lastEvent;
    + maxEvents = other585.maxEvents;
    + __isset = other585.__isset;
      }
    -NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other584) {
    - lastEvent = other584.lastEvent;
    - maxEvents = other584.maxEvents;
    - __isset = other584.__isset;
    +NotificationEventRequest& NotificationEventRequest::operator=(const NotificationEventRequest& other586) {
    + lastEvent = other586.lastEvent;
    + maxEvents = other586.maxEvents;
    + __isset = other586.__isset;
        return *this;
      }
      void NotificationEventRequest::printTo(std::ostream& out) const {
    @@ -13885,23 +13976,23 @@ void swap(NotificationEvent &a, NotificationEvent &b) {
        swap(a.__isset, b.__isset);
      }

    -NotificationEvent::NotificationEvent(const NotificationEvent& other585) {
    - eventId = other585.eventId;
    - eventTime = other585.eventTime;
    - eventType = other585.eventType;
    - dbName = other585.dbName;
    - tableName = other585.tableName;
    - message = other585.message;
    - __isset = other585.__isset;
    -}
    -NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other586) {
    - eventId = other586.eventId;
    - eventTime = other586.eventTime;
    - eventType = other586.eventType;
    - dbName = other586.dbName;
    - tableName = other586.tableName;
    - message = other586.message;
    - __isset = other586.__isset;
    +NotificationEvent::NotificationEvent(const NotificationEvent& other587) {
    + eventId = other587.eventId;
    + eventTime = other587.eventTime;
    + eventType = other587.eventType;
    + dbName = other587.dbName;
    + tableName = other587.tableName;
    + message = other587.message;
    + __isset = other587.__isset;
    +}
    +NotificationEvent& NotificationEvent::operator=(const NotificationEvent& other588) {
    + eventId = other588.eventId;
    + eventTime = other588.eventTime;
    + eventType = other588.eventType;
    + dbName = other588.dbName;
    + tableName = other588.tableName;
    + message = other588.message;
    + __isset = other588.__isset;
        return *this;
      }
      void NotificationEvent::printTo(std::ostream& out) const {
    @@ -13951,14 +14042,14 @@ uint32_t NotificationEventResponse::read(::apache::thrift::protocol::TProtocol*
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->events.clear();
    - uint32_t _size587;
    - ::apache::thrift::protocol::TType _etype590;
    - xfer += iprot->readListBegin(_etype590, _size587);
    - this->events.resize(_size587);
    - uint32_t _i591;
    - for (_i591 = 0; _i591 < _size587; ++_i591)
    + uint32_t _size589;
    + ::apache::thrift::protocol::TType _etype592;
    + xfer += iprot->readListBegin(_etype592, _size589);
    + this->events.resize(_size589);
    + uint32_t _i593;
    + for (_i593 = 0; _i593 < _size589; ++_i593)
                  {
    - xfer += this->events[_i591].read(iprot);
    + xfer += this->events[_i593].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -13989,10 +14080,10 @@ uint32_t NotificationEventResponse::write(::apache::thrift::protocol::TProtocol*
        xfer += oprot->writeFieldBegin("events", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->events.size()));
    - std::vector<NotificationEvent> ::const_iterator _iter592;
    - for (_iter592 = this->events.begin(); _iter592 != this->events.end(); ++_iter592)
    + std::vector<NotificationEvent> ::const_iterator _iter594;
    + for (_iter594 = this->events.begin(); _iter594 != this->events.end(); ++_iter594)
          {
    - xfer += (*_iter592).write(oprot);
    + xfer += (*_iter594).write(oprot);
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14008,11 +14099,11 @@ void swap(NotificationEventResponse &a, NotificationEventResponse &b) {
        swap(a.events, b.events);
      }

    -NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other593) {
    - events = other593.events;
    +NotificationEventResponse::NotificationEventResponse(const NotificationEventResponse& other595) {
    + events = other595.events;
      }
    -NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other594) {
    - events = other594.events;
    +NotificationEventResponse& NotificationEventResponse::operator=(const NotificationEventResponse& other596) {
    + events = other596.events;
        return *this;
      }
      void NotificationEventResponse::printTo(std::ostream& out) const {
    @@ -14094,11 +14185,11 @@ void swap(CurrentNotificationEventId &a, CurrentNotificationEventId &b) {
        swap(a.eventId, b.eventId);
      }

    -CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other595) {
    - eventId = other595.eventId;
    +CurrentNotificationEventId::CurrentNotificationEventId(const CurrentNotificationEventId& other597) {
    + eventId = other597.eventId;
      }
    -CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other596) {
    - eventId = other596.eventId;
    +CurrentNotificationEventId& CurrentNotificationEventId::operator=(const CurrentNotificationEventId& other598) {
    + eventId = other598.eventId;
        return *this;
      }
      void CurrentNotificationEventId::printTo(std::ostream& out) const {
    @@ -14143,14 +14234,14 @@ uint32_t InsertEventRequestData::read(::apache::thrift::protocol::TProtocol* ipr
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->filesAdded.clear();
    - uint32_t _size597;
    - ::apache::thrift::protocol::TType _etype600;
    - xfer += iprot->readListBegin(_etype600, _size597);
    - this->filesAdded.resize(_size597);
    - uint32_t _i601;
    - for (_i601 = 0; _i601 < _size597; ++_i601)
    + uint32_t _size599;
    + ::apache::thrift::protocol::TType _etype602;
    + xfer += iprot->readListBegin(_etype602, _size599);
    + this->filesAdded.resize(_size599);
    + uint32_t _i603;
    + for (_i603 = 0; _i603 < _size599; ++_i603)
                  {
    - xfer += iprot->readString(this->filesAdded[_i601]);
    + xfer += iprot->readString(this->filesAdded[_i603]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14181,10 +14272,10 @@ uint32_t InsertEventRequestData::write(::apache::thrift::protocol::TProtocol* op
        xfer += oprot->writeFieldBegin("filesAdded", ::apache::thrift::protocol::T_LIST, 1);
        {
          xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->filesAdded.size()));
    - std::vector<std::string> ::const_iterator _iter602;
    - for (_iter602 = this->filesAdded.begin(); _iter602 != this->filesAdded.end(); ++_iter602)
    + std::vector<std::string> ::const_iterator _iter604;
    + for (_iter604 = this->filesAdded.begin(); _iter604 != this->filesAdded.end(); ++_iter604)
          {
    - xfer += oprot->writeString((*_iter602));
    + xfer += oprot->writeString((*_iter604));
          }
          xfer += oprot->writeListEnd();
        }
    @@ -14200,11 +14291,11 @@ void swap(InsertEventRequestData &a, InsertEventRequestData &b) {
        swap(a.filesAdded, b.filesAdded);
      }

    -InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other603) {
    - filesAdded = other603.filesAdded;
    +InsertEventRequestData::InsertEventRequestData(const InsertEventRequestData& other605) {
    + filesAdded = other605.filesAdded;
      }
    -InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other604) {
    - filesAdded = other604.filesAdded;
    +InsertEventRequestData& InsertEventRequestData::operator=(const InsertEventRequestData& other606) {
    + filesAdded = other606.filesAdded;
        return *this;
      }
      void InsertEventRequestData::printTo(std::ostream& out) const {
    @@ -14284,13 +14375,13 @@ void swap(FireEventRequestData &a, FireEventRequestData &b) {
        swap(a.__isset, b.__isset);
      }

    -FireEventRequestData::FireEventRequestData(const FireEventRequestData& other605) {
    - insertData = other605.insertData;
    - __isset = other605.__isset;
    +FireEventRequestData::FireEventRequestData(const FireEventRequestData& other607) {
    + insertData = other607.insertData;
    + __isset = other607.__isset;
      }
    -FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other606) {
    - insertData = other606.insertData;
    - __isset = other606.__isset;
    +FireEventRequestData& FireEventRequestData::operator=(const FireEventRequestData& other608) {
    + insertData = other608.insertData;
    + __isset = other608.__isset;
        return *this;
      }
      void FireEventRequestData::printTo(std::ostream& out) const {
    @@ -14387,14 +14478,14 @@ uint32_t FireEventRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->partitionVals.clear();
    - uint32_t _size607;
    - ::apache::thrift::protocol::TType _etype610;
    - xfer += iprot->readListBegin(_etype610, _size607);
    - this->partitionVals.resize(_size607);
    - uint32_t _i611;
    - for (_i611 = 0; _i611 < _size607; ++_i611)
    + uint32_t _size609;
    + ::apache::thrift::protocol::TType _etype612;
    + xfer += iprot->readListBegin(_etype612, _size609);
    + this->partitionVals.resize(_size609);
    + uint32_t _i613;
    + for (_i613 = 0; _i613 < _size609; ++_i613)
                  {
    - xfer += iprot->readString(this->partitionVals[_i611]);
    + xfer += iprot->readString(this->partitionVals[_i613]);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14446,10 +14537,10 @@ uint32_t FireEventRequest::write(::apache::thrift::protocol::TProtocol* oprot) c
          xfer += oprot->writeFieldBegin("partitionVals", ::apache::thrift::protocol::T_LIST, 5);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partitionVals.size()));
    - std::vector<std::string> ::const_iterator _iter612;
    - for (_iter612 = this->partitionVals.begin(); _iter612 != this->partitionVals.end(); ++_iter612)
    + std::vector<std::string> ::const_iterator _iter614;
    + for (_iter614 = this->partitionVals.begin(); _iter614 != this->partitionVals.end(); ++_iter614)
            {
    - xfer += oprot->writeString((*_iter612));
    + xfer += oprot->writeString((*_iter614));
            }
            xfer += oprot->writeListEnd();
          }
    @@ -14470,21 +14561,21 @@ void swap(FireEventRequest &a, FireEventRequest &b) {
        swap(a.__isset, b.__isset);
      }

    -FireEventRequest::FireEventRequest(const FireEventRequest& other613) {
    - successful = other613.successful;
    - data = other613.data;
    - dbName = other613.dbName;
    - tableName = other613.tableName;
    - partitionVals = other613.partitionVals;
    - __isset = other613.__isset;
    -}
    -FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other614) {
    - successful = other614.successful;
    - data = other614.data;
    - dbName = other614.dbName;
    - tableName = other614.tableName;
    - partitionVals = other614.partitionVals;
    - __isset = other614.__isset;
    +FireEventRequest::FireEventRequest(const FireEventRequest& other615) {
    + successful = other615.successful;
    + data = other615.data;
    + dbName = other615.dbName;
    + tableName = other615.tableName;
    + partitionVals = other615.partitionVals;
    + __isset = other615.__isset;
    +}
    +FireEventRequest& FireEventRequest::operator=(const FireEventRequest& other616) {
    + successful = other616.successful;
    + data = other616.data;
    + dbName = other616.dbName;
    + tableName = other616.tableName;
    + partitionVals = other616.partitionVals;
    + __isset = other616.__isset;
        return *this;
      }
      void FireEventRequest::printTo(std::ostream& out) const {
    @@ -14547,11 +14638,11 @@ void swap(FireEventResponse &a, FireEventResponse &b) {
        (void) b;
      }

    -FireEventResponse::FireEventResponse(const FireEventResponse& other615) {
    - (void) other615;
    +FireEventResponse::FireEventResponse(const FireEventResponse& other617) {
    + (void) other617;
      }
    -FireEventResponse& FireEventResponse::operator=(const FireEventResponse& other616) {
    - (void) other616;
    +FireEventResponse& FireEventResponse::operator=(const FireEventResponse& other618) {
    + (void) other618;
        return *this;
      }
      void FireEventResponse::printTo(std::ostream& out) const {
    @@ -14595,14 +14686,14 @@ uint32_t GetAllFunctionsResponse::read(::apache::thrift::protocol::TProtocol* ip
              if (ftype == ::apache::thrift::protocol::T_LIST) {
                {
                  this->functions.clear();
    - uint32_t _size617;
    - ::apache::thrift::protocol::TType _etype620;
    - xfer += iprot->readListBegin(_etype620, _size617);
    - this->functions.resize(_size617);
    - uint32_t _i621;
    - for (_i621 = 0; _i621 < _size617; ++_i621)
    + uint32_t _size619;
    + ::apache::thrift::protocol::TType _etype622;
    + xfer += iprot->readListBegin(_etype622, _size619);
    + this->functions.resize(_size619);
    + uint32_t _i623;
    + for (_i623 = 0; _i623 < _size619; ++_i623)
                  {
    - xfer += this->functions[_i621].read(iprot);
    + xfer += this->functions[_i623].read(iprot);
                  }
                  xfer += iprot->readListEnd();
                }
    @@ -14632,10 +14723,10 @@ uint32_t GetAllFunctionsResponse::write(::apache::thrift::protocol::TProtocol* o
          xfer += oprot->writeFieldBegin("functions", ::apache::thrift::protocol::T_LIST, 1);
          {
            xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->functions.size()));
    - std::vector<Function> ::const_iterator _iter622;
    - for (_iter622 = this->functions.begin(); _iter622 != this->functions.end(); ++_iter622)
    + std::vector<Function> ::const_iterator _iter624;
    + for (_iter624 = this->functions.begin(); _iter624 != this->functions.end(); ++_iter624)
            {
    - xfer += (*_iter622).write(oprot);
    + xfer += (*_iter624).write(oprot);
            }
            xfer += oprot->writeListEnd();
          }
    @@ -14652,13 +14743,13 @@ void swap(GetAllFunctionsResponse &a, GetAllFunctionsResponse &b) {
        swap(a.__isset, b.__isset);
      }

    -GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other623) {
    - functions = other623.functions;
    - __isset = other623.__isset;
    +GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other625) {
    + functions = other625.functions;
    + __isset = other625.__isset;
      }
    -GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other624) {
    - functions = other624.functions;
    - __isset = other624.__isset;
    +GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other626) {
    + functions = other626.functions;
    + __isset = other626.__isset;
        return *this;
      }
      void GetAllFunctionsResponse::printTo(std::ostream& out) const {
    @@ -14738,13 +14829,13 @@ void swap(MetaException &a, MetaException &b) {
        swap(a.__isset, b.__isset);
      }

    -MetaException::MetaException(const MetaException& other625) : TException() {
    - message = other625.message;
    - __isset = other625.__isset;
    +MetaException::MetaException(const MetaException& other627) : TException() {
    + message = other627.message;
    + __isset = other627.__isset;
      }
    -MetaException& MetaException::operator=(const MetaException& other626) {
    - message = other626.message;
    - __isset = other626.__isset;
    +MetaException& MetaException::operator=(const MetaException& other628) {
    + message = other628.message;
    + __isset = other628.__isset;
        return *this;
      }
      void MetaException::printTo(std::ostream& out) const {
    @@ -14835,13 +14926,13 @@ void swap(UnknownTableException &a, UnknownTableException &b) {
        swap(a.__isset, b.__isset);
      }

    -UnknownTableException::UnknownTableException(const UnknownTableException& other627) : TException() {
    - message = other627.message;
    - __isset = other627.__isset;
    +UnknownTableException::UnknownTableException(const UnknownTableException& other629) : TException() {
    + message = other629.message;
    + __isset = other629.__isset;
      }
    -UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other628) {
    - message = other628.message;
    - __isset = other628.__isset;
    +UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other630) {
    + message = other630.message;
    + __isset = other630.__isset;
        return *this;
      }
      void UnknownTableException::printTo(std::ostream& out) const {
    @@ -14932,13 +15023,13 @@ void swap(UnknownDBException &a, UnknownDBException &b) {
        swap(a.__isset, b.__isset);
      }

    -UnknownDBException::UnknownDBException(const UnknownDBException& other629) : TException() {
    - message = other629.message;
    - __isset = other629.__isset;
    +UnknownDBException::UnknownDBException(const UnknownDBException& other631) : TException() {
    + message = other631.message;
    + __isset = other631.__isset;
      }
    -UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other630) {
    - message = other630.message;
    - __isset = other630.__isset;
    +UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other632) {
    + message = other632.message;
    + __isset = other632.__isset;
        return *this;
      }
      void UnknownDBException::printTo(std::ostream& out) const {
    @@ -15029,13 +15120,13 @@ void swap(AlreadyExistsException &a, AlreadyExistsException &b) {
        swap(a.__isset, b.__isset);
      }

    -AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other631) : TException() {
    - message = other631.message;
    - __isset = other631.__isset;
    +AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other633) : TException() {
    + message = other633.message;
    + __isset = other633.__isset;
      }
    -AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other632) {
    - message = other632.message;
    - __isset = other632.__isset;
    +AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other634) {
    + message = other634.message;
    + __isset = other634.__isset;
        return *this;
      }
      void AlreadyExistsException::printTo(std::ostream& out) const {
    @@ -15126,13 +15217,13 @@ void swap(InvalidPartitionException &a, InvalidPartitionException &b) {
        swap(a.__isset, b.__isset);
      }

    -InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other633) : TException() {
    - message = other633.message;
    - __isset = other633.__isset;
    +InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other635) : TException() {
    + message = other635.message;
    + __isset = other635.__isset;
      }
    -InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other634) {
    - message = other634.message;
    - __isset = other634.__isset;
    +InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other636) {
    + message = other636.message;
    + __isset = other636.__isset;
        return *this;
      }
      void InvalidPartitionException::printTo(std::ostream& out) const {
    @@ -15223,13 +15314,13 @@ void swap(UnknownPartitionException &a, UnknownPartitionException &b) {
        swap(a.__isset, b.__isset);
      }

    -UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other635) : TException() {
    - message = other635.message;
    - __isset = other635.__isset;
    +UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other637) : TException() {
    + message = other637.message;
    + __isset = other637.__isset;
      }
    -UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other636) {
    - message = other636.message;
    - __isset = other636.__isset;
    +UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other638) {
    + message = other638.message;
    + __isset = other638.__isset;
        return *this;
      }
      void UnknownPartitionException::printTo(std::ostream& out) const {
    @@ -15320,13 +15411,13 @@ void swap(InvalidObjectException &a, InvalidObjectException &b) {
        swap(a.__isset, b.__isset);
      }

    -InvalidObjectException::InvalidObjectException(const InvalidObjectException& other637) : TException() {
    - message = other637.message;
    - __isset = other637.__isset;
    +InvalidObjectException::InvalidObjectException(const InvalidObjectException& other639) : TException() {
    + message = other639.message;
    + __isset = other639.__isset;
      }
    -InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other638) {
    - message = other638.message;
    - __isset = other638.__isset;
    +InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other640) {
    + message = other640.message;
    + __isset = other640.__isset;
        return *this;
      }
      void InvalidObjectException::printTo(std::ostream& out) const {
    @@ -15417,13 +15508,13 @@ void swap(NoSuchObjectException &a, NoSuchObjectException &b) {
        swap(a.__isset, b.__isset);
      }

    -NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other639) : TException() {
    - message = other639.message;
    - __isset = other639.__isset;
    +NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other641) : TException() {
    + message = other641.message;
    + __isset = other641.__isset;
      }
    -NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other640) {
    - message = other640.message;
    - __isset = other640.__isset;
    +NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other642) {
    + message = other642.message;
    + __isset = other642.__isset;
        return *this;
      }
      void NoSuchObjectException::printTo(std::ostream& out) const {
    @@ -15514,13 +15605,13 @@ void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b) {
        swap(a.__isset, b.__isset);
      }

    -IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other641) : TException() {
    - message = other641.message;
    - __isset = other641.__isset;
    +IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other643) : TException() {
    + message = other643.message;
    + __isset = other643.__isset;
      }
    -IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other642) {
    - message = other642.message;
    - __isset = other642.__isset;
    +IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other644) {
    + message = other644.message;
    + __isset = other644.__isset;
        return *this;
      }
      void IndexAlreadyExistsException::printTo(std::ostream& out) const {
    @@ -15611,13 +15702,13 @@ void swap(InvalidOperationException &a, InvalidOperationException &b) {
        swap(a.__isset, b.__isset);
      }

    -InvalidOperationException::InvalidOperationException(const InvalidOperationException& other643) : TException() {
    - message = other643.message;
    - __isset = other643.__isset;
    +InvalidOperationException::InvalidOperationException(const InvalidOperationException& other645) : TException() {
    + message = other645.message;
    + __isset = other645.__isset;
      }
    -InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other644) {
    - message = other644.message;
    - __isset = other644.__isset;
    +InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other646) {
    + message = other646.message;
    + __isset = other646.__isset;
        return *this;
      }
      void InvalidOperationException::printTo(std::ostream& out) const {
    @@ -15708,13 +15799,13 @@ void swap(ConfigValSecurityException &a, ConfigValSecurityException &b) {
        swap(a.__isset, b.__isset);
      }

    -ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other645) : TException() {
    - message = other645.message;
    - __isset = other645.__isset;
    +ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other647) : TException() {
    + message = other647.message;
    + __isset = other647.__isset;
      }
    -ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other646) {
    - message = other646.message;
    - __isset = other646.__isset;
    +ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other648) {
    + message = other648.message;
    + __isset = other648.__isset;
        return *this;
      }
      void ConfigValSecurityException::printTo(std::ostream& out) const {
    @@ -15805,13 +15896,13 @@ void swap(InvalidInputException &a, InvalidInputException &b) {
        swap(a.__isset, b.__isset);
      }

    -InvalidInputException::InvalidInputException(const InvalidInputException& other647) : TException() {
    - message = other647.message;
    - __isset = other647.__isset;
    +InvalidInputException::InvalidInputException(const InvalidInputException& other649) : TException() {
    + message = other649.message;
    + __isset = other649.__isset;
      }
    -InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other648) {
    - message = other648.message;
    - __isset = other648.__isset;
    +InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other650) {
    + message = other650.message;
    + __isset = other650.__isset;
        return *this;
      }
      void InvalidInputException::printTo(std::ostream& out) const {
    @@ -15902,13 +15993,13 @@ void swap(NoSuchTxnException &a, NoSuchTxnException &b) {
        swap(a.__isset, b.__isset);
      }

    -NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other649) : TException() {
    - message = other649.message;
    - __isset = other649.__isset;
    +NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other651) : TException() {
    + message = other651.message;
    + __isset = other651.__isset;
      }
    -NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other650) {
    - message = other650.message;
    - __isset = other650.__isset;
    +NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other652) {
    + message = other652.message;
    + __isset = other652.__isset;
        return *this;
      }
      void NoSuchTxnException::printTo(std::ostream& out) const {
    @@ -15999,13 +16090,13 @@ void swap(TxnAbortedException &a, TxnAbortedException &b) {
        swap(a.__isset, b.__isset);
      }

    -TxnAbortedException::TxnAbortedException(const TxnAbortedException& other651) : TException() {
    - message = other651.message;
    - __isset = other651.__isset;
    +TxnAbortedException::TxnAbortedException(const TxnAbortedException& other653) : TException() {
    + message = other653.message;
    + __isset = other653.__isset;
      }
    -TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other652) {
    - message = other652.message;
    - __isset = other652.__isset;
    +TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other654) {
    + message = other654.message;
    + __isset = other654.__isset;
        return *this;
      }
      void TxnAbortedException::printTo(std::ostream& out) const {
    @@ -16096,13 +16187,13 @@ void swap(TxnOpenException &a, TxnOpenException &b) {
        swap(a.__isset, b.__isset);
      }

    -TxnOpenException::TxnOpenException(const TxnOpenException& other653) : TException() {
    - message = other653.message;
    - __isset = other653.__isset;
    +TxnOpenException::TxnOpenException(const TxnOpenException& other655) : TException() {
    + message = other655.message;
    + __isset = other655.__isset;
      }
    -TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other654) {
    - message = other654.message;
    - __isset = other654.__isset;
    +TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other656) {
    + message = other656.message;
    + __isset = other656.__isset;
        return *this;
      }
      void TxnOpenException::printTo(std::ostream& out) const {
    @@ -16193,13 +16284,13 @@ void swap(NoSuchLockException &a, NoSuchLockException &b) {
        swap(a.__isset, b.__isset);
      }

    -NoSuchLockException::NoSuchLockException(const NoSuchLockException& other655) : TException() {
    - message = other655.message;
    - __isset = other655.__isset;
    +NoSuchLockException::NoSuchLockException(const NoSuchLockException& other657) : TException() {
    + message = other657.message;
    + __isset = other657.__isset;
      }
    -NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other656) {
    - message = other656.message;
    - __isset = other656.__isset;
    +NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other658) {
    + message = other658.message;
    + __isset = other658.__isset;
        return *this;
      }
      void NoSuchLockException::printTo(std::ostream& out) const {

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
    index fbe99c1..390db33 100644
    --- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
    +++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
    @@ -109,6 +109,19 @@ struct GrantRevokeType {

      extern const std::map<int, const char*> _GrantRevokeType_VALUES_TO_NAMES;

    +struct DataOperationType {
    + enum type {
    + SELECT = 1,
    + INSERT = 2,
    + UPDATE = 3,
    + DELETE = 4,
    + UNSET = 5,
    + NO_TXN = 6
    + };
    +};
    +
    +extern const std::map<int, const char*> _DataOperationType_VALUES_TO_NAMES;
    +
      struct EventRequestType {
        enum type {
          INSERT = 1,
    @@ -4472,9 +4485,11 @@ inline std::ostream& operator<<(std::ostream& out, const CommitTxnRequest& obj)
      }

      typedef struct _LockComponent__isset {
    - _LockComponent__isset() : tablename(false), partitionname(false) {}
    + _LockComponent__isset() : tablename(false), partitionname(false), operationType(true), isAcid(true) {}
        bool tablename :1;
        bool partitionname :1;
    + bool operationType :1;
    + bool isAcid :1;
      } _LockComponent__isset;

      class LockComponent {
    @@ -4482,7 +4497,9 @@ class LockComponent {

        LockComponent(const LockComponent&);
        LockComponent& operator=(const LockComponent&);
    - LockComponent() : type((LockType::type)0), level((LockLevel::type)0), dbname(), tablename(), partitionname() {
    + LockComponent() : type((LockType::type)0), level((LockLevel::type)0), dbname(), tablename(), partitionname(), operationType((DataOperationType::type)5), isAcid(false) {
    + operationType = (DataOperationType::type)5;
    +
        }

        virtual ~LockComponent() throw();
    @@ -4491,6 +4508,8 @@ class LockComponent {
        std::string dbname;
        std::string tablename;
        std::string partitionname;
    + DataOperationType::type operationType;
    + bool isAcid;

        _LockComponent__isset __isset;

    @@ -4504,6 +4523,10 @@ class LockComponent {

        void __set_partitionname(const std::string& val);

    + void __set_operationType(const DataOperationType::type val);
    +
    + void __set_isAcid(const bool val);
    +
        bool operator == (const LockComponent & rhs) const
        {
          if (!(type == rhs.type))
    @@ -4520,6 +4543,14 @@ class LockComponent {
            return false;
          else if (__isset.partitionname && !(partitionname == rhs.partitionname))
            return false;
    + if (__isset.operationType != rhs.__isset.operationType)
    + return false;
    + else if (__isset.operationType && !(operationType == rhs.operationType))
    + return false;
    + if (__isset.isAcid != rhs.__isset.isAcid)
    + return false;
    + else if (__isset.isAcid && !(isAcid == rhs.isAcid))
    + return false;
          return true;
        }
        bool operator != (const LockComponent &rhs) const {
    @@ -5440,13 +5471,19 @@ inline std::ostream& operator<<(std::ostream& out, const ShowCompactResponse& ob
        return out;
      }

    +typedef struct _AddDynamicPartitions__isset {
    + _AddDynamicPartitions__isset() : operationType(true) {}
    + bool operationType :1;
    +} _AddDynamicPartitions__isset;

      class AddDynamicPartitions {
       public:

        AddDynamicPartitions(const AddDynamicPartitions&);
        AddDynamicPartitions& operator=(const AddDynamicPartitions&);
    - AddDynamicPartitions() : txnid(0), dbname(), tablename() {
    + AddDynamicPartitions() : txnid(0), dbname(), tablename(), operationType((DataOperationType::type)5) {
    + operationType = (DataOperationType::type)5;
    +
        }

        virtual ~AddDynamicPartitions() throw();
    @@ -5454,6 +5491,9 @@ class AddDynamicPartitions {
        std::string dbname;
        std::string tablename;
        std::vector<std::string> partitionnames;
    + DataOperationType::type operationType;
    +
    + _AddDynamicPartitions__isset __isset;

        void __set_txnid(const int64_t val);

    @@ -5463,6 +5503,8 @@ class AddDynamicPartitions {

        void __set_partitionnames(const std::vector<std::string> & val);

    + void __set_operationType(const DataOperationType::type val);
    +
        bool operator == (const AddDynamicPartitions & rhs) const
        {
          if (!(txnid == rhs.txnid))
    @@ -5473,6 +5515,10 @@ class AddDynamicPartitions {
            return false;
          if (!(partitionnames == rhs.partitionnames))
            return false;
    + if (__isset.operationType != rhs.__isset.operationType)
    + return false;
    + else if (__isset.operationType && !(operationType == rhs.operationType))
    + return false;
          return true;
        }
        bool operator != (const AddDynamicPartitions &rhs) const {

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
    index 45140bc..7543ef4 100644
    --- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
    +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
    @@ -42,6 +42,7 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
        private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)2);
        private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)3);
        private static final org.apache.thrift.protocol.TField PARTITIONNAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionnames", org.apache.thrift.protocol.TType.LIST, (short)4);
    + private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)5);

        private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
        static {
    @@ -53,13 +54,19 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
        private String dbname; // required
        private String tablename; // required
        private List<String> partitionnames; // required
    + private DataOperationType operationType; // optional

        /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
        public enum _Fields implements org.apache.thrift.TFieldIdEnum {
          TXNID((short)1, "txnid"),
          DBNAME((short)2, "dbname"),
          TABLENAME((short)3, "tablename"),
    - PARTITIONNAMES((short)4, "partitionnames");
    + PARTITIONNAMES((short)4, "partitionnames"),
    + /**
    + *
    + * @see DataOperationType
    + */
    + OPERATION_TYPE((short)5, "operationType");

          private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    @@ -82,6 +89,8 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
                return TABLENAME;
              case 4: // PARTITIONNAMES
                return PARTITIONNAMES;
    + case 5: // OPERATION_TYPE
    + return OPERATION_TYPE;
              default:
                return null;
            }
    @@ -124,6 +133,7 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
        // isset id assignments
        private static final int __TXNID_ISSET_ID = 0;
        private byte __isset_bitfield = 0;
    + private static final _Fields optionals[] = {_Fields.OPERATION_TYPE};
        public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
        static {
          Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    @@ -136,11 +146,15 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          tmpMap.put(_Fields.PARTITIONNAMES, new org.apache.thrift.meta_data.FieldMetaData("partitionnames", org.apache.thrift.TFieldRequirementType.REQUIRED,
              new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
                  new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    + tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
    + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataOperationType.class)));
          metaDataMap = Collections.unmodifiableMap(tmpMap);
          org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AddDynamicPartitions.class, metaDataMap);
        }

        public AddDynamicPartitions() {
    + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET;
    +
        }

        public AddDynamicPartitions(
    @@ -173,6 +187,9 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
            List<String> __this__partitionnames = new ArrayList<String>(other.partitionnames);
            this.partitionnames = __this__partitionnames;
          }
    + if (other.isSetOperationType()) {
    + this.operationType = other.operationType;
    + }
        }

        public AddDynamicPartitions deepCopy() {
    @@ -186,6 +203,8 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          this.dbname = null;
          this.tablename = null;
          this.partitionnames = null;
    + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET;
    +
        }

        public long getTxnid() {
    @@ -294,6 +313,37 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          }
        }

    + /**
    + *
    + * @see DataOperationType
    + */
    + public DataOperationType getOperationType() {
    + return this.operationType;
    + }
    +
    + /**
    + *
    + * @see DataOperationType
    + */
    + public void setOperationType(DataOperationType operationType) {
    + this.operationType = operationType;
    + }
    +
    + public void unsetOperationType() {
    + this.operationType = null;
    + }
    +
    + /** Returns true if field operationType is set (has been assigned a value) and false otherwise */
    + public boolean isSetOperationType() {
    + return this.operationType != null;
    + }
    +
    + public void setOperationTypeIsSet(boolean value) {
    + if (!value) {
    + this.operationType = null;
    + }
    + }
    +
        public void setFieldValue(_Fields field, Object value) {
          switch (field) {
          case TXNID:
    @@ -328,6 +378,14 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
            }
            break;

    + case OPERATION_TYPE:
    + if (value == null) {
    + unsetOperationType();
    + } else {
    + setOperationType((DataOperationType)value);
    + }
    + break;
    +
          }
        }

    @@ -345,6 +403,9 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          case PARTITIONNAMES:
            return getPartitionnames();

    + case OPERATION_TYPE:
    + return getOperationType();
    +
          }
          throw new IllegalStateException();
        }
    @@ -364,6 +425,8 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
            return isSetTablename();
          case PARTITIONNAMES:
            return isSetPartitionnames();
    + case OPERATION_TYPE:
    + return isSetOperationType();
          }
          throw new IllegalStateException();
        }
    @@ -417,6 +480,15 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
              return false;
          }

    + boolean this_present_operationType = true && this.isSetOperationType();
    + boolean that_present_operationType = true && that.isSetOperationType();
    + if (this_present_operationType || that_present_operationType) {
    + if (!(this_present_operationType && that_present_operationType))
    + return false;
    + if (!this.operationType.equals(that.operationType))
    + return false;
    + }
    +
          return true;
        }

    @@ -444,6 +516,11 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
          if (present_partitionnames)
            list.add(partitionnames);

    + boolean present_operationType = true && (isSetOperationType());
    + list.add(present_operationType);
    + if (present_operationType)
    + list.add(operationType.getValue());
    +
          return list.hashCode();
        }

    @@ -495,6 +572,16 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
              return lastComparison;
            }
          }
    + lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType());
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + if (isSetOperationType()) {
    + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType);
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + }
          return 0;
        }

    @@ -542,6 +629,16 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
            sb.append(this.partitionnames);
          }
          first = false;
    + if (isSetOperationType()) {
    + if (!first) sb.append(", ");
    + sb.append("operationType:");
    + if (this.operationType == null) {
    + sb.append("null");
    + } else {
    + sb.append(this.operationType);
    + }
    + first = false;
    + }
          sb.append(")");
          return sb.toString();
        }
    @@ -645,6 +742,14 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
                    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                  }
                  break;
    + case 5: // OPERATION_TYPE
    + if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
    + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
    + struct.setOperationTypeIsSet(true);
    + } else {
    + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    + }
    + break;
                default:
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
    @@ -683,6 +788,13 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
              }
              oprot.writeFieldEnd();
            }
    + if (struct.operationType != null) {
    + if (struct.isSetOperationType()) {
    + oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC);
    + oprot.writeI32(struct.operationType.getValue());
    + oprot.writeFieldEnd();
    + }
    + }
            oprot.writeFieldStop();
            oprot.writeStructEnd();
          }
    @@ -710,6 +822,14 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
                oprot.writeString(_iter504);
              }
            }
    + BitSet optionals = new BitSet();
    + if (struct.isSetOperationType()) {
    + optionals.set(0);
    + }
    + oprot.writeBitSet(optionals, 1);
    + if (struct.isSetOperationType()) {
    + oprot.writeI32(struct.operationType.getValue());
    + }
          }

          @Override
    @@ -732,6 +852,11 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
              }
            }
            struct.setPartitionnamesIsSet(true);
    + BitSet incoming = iprot.readBitSet(1);
    + if (incoming.get(0)) {
    + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
    + struct.setOperationTypeIsSet(true);
    + }
          }
        }


    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java
    new file mode 100644
    index 0000000..15a6e9a
    --- /dev/null
    +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DataOperationType.java
    @@ -0,0 +1,57 @@
    +/**
    + * Autogenerated by Thrift Compiler (0.9.3)
    + *
    + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
    + * @generated
    + */
    +package org.apache.hadoop.hive.metastore.api;
    +
    +
    +import java.util.Map;
    +import java.util.HashMap;
    +import org.apache.thrift.TEnum;
    +
    +public enum DataOperationType implements org.apache.thrift.TEnum {
    + SELECT(1),
    + INSERT(2),
    + UPDATE(3),
    + DELETE(4),
    + UNSET(5),
    + NO_TXN(6);
    +
    + private final int value;
    +
    + private DataOperationType(int value) {
    + this.value = value;
    + }
    +
    + /**
    + * Get the integer value of this enum value, as defined in the Thrift IDL.
    + */
    + public int getValue() {
    + return value;
    + }
    +
    + /**
    + * Find a the enum type by its integer value, as defined in the Thrift IDL.
    + * @return null if the value is not found.
    + */
    + public static DataOperationType findByValue(int value) {
    + switch (value) {
    + case 1:
    + return SELECT;
    + case 2:
    + return INSERT;
    + case 3:
    + return UPDATE;
    + case 4:
    + return DELETE;
    + case 5:
    + return UNSET;
    + case 6:
    + return NO_TXN;
    + default:
    + return null;
    + }
    + }
    +}
  • Ekoifman at May 19, 2016 at 8:00 pm
    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
    index adb0c44..26d1b76 100644
    --- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
    +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
    @@ -43,6 +43,8 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
        private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)3);
        private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)4);
        private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", org.apache.thrift.protocol.TType.STRING, (short)5);
    + private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)6);
    + private static final org.apache.thrift.protocol.TField IS_ACID_FIELD_DESC = new org.apache.thrift.protocol.TField("isAcid", org.apache.thrift.protocol.TType.BOOL, (short)7);

        private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
        static {
    @@ -55,6 +57,8 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
        private String dbname; // required
        private String tablename; // optional
        private String partitionname; // optional
    + private DataOperationType operationType; // optional
    + private boolean isAcid; // optional

        /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
        public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    @@ -70,7 +74,13 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          LEVEL((short)2, "level"),
          DBNAME((short)3, "dbname"),
          TABLENAME((short)4, "tablename"),
    - PARTITIONNAME((short)5, "partitionname");
    + PARTITIONNAME((short)5, "partitionname"),
    + /**
    + *
    + * @see DataOperationType
    + */
    + OPERATION_TYPE((short)6, "operationType"),
    + IS_ACID((short)7, "isAcid");

          private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    @@ -95,6 +105,10 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
                return TABLENAME;
              case 5: // PARTITIONNAME
                return PARTITIONNAME;
    + case 6: // OPERATION_TYPE
    + return OPERATION_TYPE;
    + case 7: // IS_ACID
    + return IS_ACID;
              default:
                return null;
            }
    @@ -135,7 +149,9 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
        }

        // isset id assignments
    - private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTITIONNAME};
    + private static final int __ISACID_ISSET_ID = 0;
    + private byte __isset_bitfield = 0;
    + private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTITIONNAME,_Fields.OPERATION_TYPE,_Fields.IS_ACID};
        public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
        static {
          Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    @@ -149,11 +165,19 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
          tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL,
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    + tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
    + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DataOperationType.class)));
    + tmpMap.put(_Fields.IS_ACID, new org.apache.thrift.meta_data.FieldMetaData("isAcid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
    + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
          metaDataMap = Collections.unmodifiableMap(tmpMap);
          org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockComponent.class, metaDataMap);
        }

        public LockComponent() {
    + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET;
    +
    + this.isAcid = false;
    +
        }

        public LockComponent(
    @@ -171,6 +195,7 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
         * Performs a deep copy on <i>other</i>.
         */
        public LockComponent(LockComponent other) {
    + __isset_bitfield = other.__isset_bitfield;
          if (other.isSetType()) {
            this.type = other.type;
          }
    @@ -186,6 +211,10 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          if (other.isSetPartitionname()) {
            this.partitionname = other.partitionname;
          }
    + if (other.isSetOperationType()) {
    + this.operationType = other.operationType;
    + }
    + this.isAcid = other.isAcid;
        }

        public LockComponent deepCopy() {
    @@ -199,6 +228,10 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          this.dbname = null;
          this.tablename = null;
          this.partitionname = null;
    + this.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.UNSET;
    +
    + this.isAcid = false;
    +
        }

        /**
    @@ -332,6 +365,59 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          }
        }

    + /**
    + *
    + * @see DataOperationType
    + */
    + public DataOperationType getOperationType() {
    + return this.operationType;
    + }
    +
    + /**
    + *
    + * @see DataOperationType
    + */
    + public void setOperationType(DataOperationType operationType) {
    + this.operationType = operationType;
    + }
    +
    + public void unsetOperationType() {
    + this.operationType = null;
    + }
    +
    + /** Returns true if field operationType is set (has been assigned a value) and false otherwise */
    + public boolean isSetOperationType() {
    + return this.operationType != null;
    + }
    +
    + public void setOperationTypeIsSet(boolean value) {
    + if (!value) {
    + this.operationType = null;
    + }
    + }
    +
    + public boolean isIsAcid() {
    + return this.isAcid;
    + }
    +
    + public void setIsAcid(boolean isAcid) {
    + this.isAcid = isAcid;
    + setIsAcidIsSet(true);
    + }
    +
    + public void unsetIsAcid() {
    + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISACID_ISSET_ID);
    + }
    +
    + /** Returns true if field isAcid is set (has been assigned a value) and false otherwise */
    + public boolean isSetIsAcid() {
    + return EncodingUtils.testBit(__isset_bitfield, __ISACID_ISSET_ID);
    + }
    +
    + public void setIsAcidIsSet(boolean value) {
    + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISACID_ISSET_ID, value);
    + }
    +
        public void setFieldValue(_Fields field, Object value) {
          switch (field) {
          case TYPE:
    @@ -374,6 +460,22 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            }
            break;

    + case OPERATION_TYPE:
    + if (value == null) {
    + unsetOperationType();
    + } else {
    + setOperationType((DataOperationType)value);
    + }
    + break;
    +
    + case IS_ACID:
    + if (value == null) {
    + unsetIsAcid();
    + } else {
    + setIsAcid((Boolean)value);
    + }
    + break;
    +
          }
        }

    @@ -394,6 +496,12 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          case PARTITIONNAME:
            return getPartitionname();

    + case OPERATION_TYPE:
    + return getOperationType();
    +
    + case IS_ACID:
    + return isIsAcid();
    +
          }
          throw new IllegalStateException();
        }
    @@ -415,6 +523,10 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            return isSetTablename();
          case PARTITIONNAME:
            return isSetPartitionname();
    + case OPERATION_TYPE:
    + return isSetOperationType();
    + case IS_ACID:
    + return isSetIsAcid();
          }
          throw new IllegalStateException();
        }
    @@ -477,6 +589,24 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
              return false;
          }

    + boolean this_present_operationType = true && this.isSetOperationType();
    + boolean that_present_operationType = true && that.isSetOperationType();
    + if (this_present_operationType || that_present_operationType) {
    + if (!(this_present_operationType && that_present_operationType))
    + return false;
    + if (!this.operationType.equals(that.operationType))
    + return false;
    + }
    +
    + boolean this_present_isAcid = true && this.isSetIsAcid();
    + boolean that_present_isAcid = true && that.isSetIsAcid();
    + if (this_present_isAcid || that_present_isAcid) {
    + if (!(this_present_isAcid && that_present_isAcid))
    + return false;
    + if (this.isAcid != that.isAcid)
    + return false;
    + }
    +
          return true;
        }

    @@ -509,6 +639,16 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
          if (present_partitionname)
            list.add(partitionname);

    + boolean present_operationType = true && (isSetOperationType());
    + list.add(present_operationType);
    + if (present_operationType)
    + list.add(operationType.getValue());
    +
    + boolean present_isAcid = true && (isSetIsAcid());
    + list.add(present_isAcid);
    + if (present_isAcid)
    + list.add(isAcid);
    +
          return list.hashCode();
        }

    @@ -570,6 +710,26 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
              return lastComparison;
            }
          }
    + lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType());
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + if (isSetOperationType()) {
    + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType);
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + }
    + lastComparison = Boolean.valueOf(isSetIsAcid()).compareTo(other.isSetIsAcid());
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + if (isSetIsAcid()) {
    + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAcid, other.isAcid);
    + if (lastComparison != 0) {
    + return lastComparison;
    + }
    + }
          return 0;
        }

    @@ -633,6 +793,22 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            }
            first = false;
          }
    + if (isSetOperationType()) {
    + if (!first) sb.append(", ");
    + sb.append("operationType:");
    + if (this.operationType == null) {
    + sb.append("null");
    + } else {
    + sb.append(this.operationType);
    + }
    + first = false;
    + }
    + if (isSetIsAcid()) {
    + if (!first) sb.append(", ");
    + sb.append("isAcid:");
    + sb.append(this.isAcid);
    + first = false;
    + }
          sb.append(")");
          return sb.toString();
        }
    @@ -664,6 +840,8 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc

        private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
          try {
    + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
    + __isset_bitfield = 0;
            read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
          } catch (org.apache.thrift.TException te) {
            throw new java.io.IOException(te);
    @@ -728,6 +906,22 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
                    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                  }
                  break;
    + case 6: // OPERATION_TYPE
    + if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
    + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
    + struct.setOperationTypeIsSet(true);
    + } else {
    + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    + }
    + break;
    + case 7: // IS_ACID
    + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
    + struct.isAcid = iprot.readBool();
    + struct.setIsAcidIsSet(true);
    + } else {
    + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    + }
    + break;
                default:
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
    @@ -770,6 +964,18 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
                oprot.writeFieldEnd();
              }
            }
    + if (struct.operationType != null) {
    + if (struct.isSetOperationType()) {
    + oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC);
    + oprot.writeI32(struct.operationType.getValue());
    + oprot.writeFieldEnd();
    + }
    + }
    + if (struct.isSetIsAcid()) {
    + oprot.writeFieldBegin(IS_ACID_FIELD_DESC);
    + oprot.writeBool(struct.isAcid);
    + oprot.writeFieldEnd();
    + }
            oprot.writeFieldStop();
            oprot.writeStructEnd();
          }
    @@ -797,13 +1003,25 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            if (struct.isSetPartitionname()) {
              optionals.set(1);
            }
    - oprot.writeBitSet(optionals, 2);
    + if (struct.isSetOperationType()) {
    + optionals.set(2);
    + }
    + if (struct.isSetIsAcid()) {
    + optionals.set(3);
    + }
    + oprot.writeBitSet(optionals, 4);
            if (struct.isSetTablename()) {
              oprot.writeString(struct.tablename);
            }
            if (struct.isSetPartitionname()) {
              oprot.writeString(struct.partitionname);
            }
    + if (struct.isSetOperationType()) {
    + oprot.writeI32(struct.operationType.getValue());
    + }
    + if (struct.isSetIsAcid()) {
    + oprot.writeBool(struct.isAcid);
    + }
          }

          @Override
    @@ -815,7 +1033,7 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
            struct.setLevelIsSet(true);
            struct.dbname = iprot.readString();
            struct.setDbnameIsSet(true);
    - BitSet incoming = iprot.readBitSet(2);
    + BitSet incoming = iprot.readBitSet(4);
            if (incoming.get(0)) {
              struct.tablename = iprot.readString();
              struct.setTablenameIsSet(true);
    @@ -824,6 +1042,14 @@ public class LockComponent implements org.apache.thrift.TBase<LockComponent, Loc
              struct.partitionname = iprot.readString();
              struct.setPartitionnameIsSet(true);
            }
    + if (incoming.get(2)) {
    + struct.operationType = org.apache.hadoop.hive.metastore.api.DataOperationType.findByValue(iprot.readI32());
    + struct.setOperationTypeIsSet(true);
    + }
    + if (incoming.get(3)) {
    + struct.isAcid = iprot.readBool();
    + struct.setIsAcidIsSet(true);
    + }
          }
        }


    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-php/metastore/Types.php
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-php/metastore/Types.php b/metastore/src/gen/thrift/gen-php/metastore/Types.php
    index fe25366..045864a 100644
    --- a/metastore/src/gen/thrift/gen-php/metastore/Types.php
    +++ b/metastore/src/gen/thrift/gen-php/metastore/Types.php
    @@ -114,6 +114,23 @@ final class GrantRevokeType {
        );
      }

    +final class DataOperationType {
    + const SELECT = 1;
    + const INSERT = 2;
    + const UPDATE = 3;
    + const DELETE = 4;
    + const UNSET = 5;
    + const NO_TXN = 6;
    + static public $__names = array(
    + 1 => 'SELECT',
    + 2 => 'INSERT',
    + 3 => 'UPDATE',
    + 4 => 'DELETE',
    + 5 => 'UNSET',
    + 6 => 'NO_TXN',
    + );
    +}
    +
      final class EventRequestType {
        const INSERT = 1;
        const UPDATE = 2;
    @@ -11049,6 +11066,14 @@ class LockComponent {
         * @var string
         */
        public $partitionname = null;
    + /**
    + * @var int
    + */
    + public $operationType = 5;
    + /**
    + * @var bool
    + */
    + public $isAcid = false;

        public function __construct($vals=null) {
          if (!isset(self::$_TSPEC)) {
    @@ -11073,6 +11098,14 @@ class LockComponent {
                'var' => 'partitionname',
                'type' => TType::STRING,
                ),
    + 6 => array(
    + 'var' => 'operationType',
    + 'type' => TType::I32,
    + ),
    + 7 => array(
    + 'var' => 'isAcid',
    + 'type' => TType::BOOL,
    + ),
              );
          }
          if (is_array($vals)) {
    @@ -11091,6 +11124,12 @@ class LockComponent {
            if (isset($vals['partitionname'])) {
              $this->partitionname = $vals['partitionname'];
            }
    + if (isset($vals['operationType'])) {
    + $this->operationType = $vals['operationType'];
    + }
    + if (isset($vals['isAcid'])) {
    + $this->isAcid = $vals['isAcid'];
    + }
          }
        }

    @@ -11148,6 +11187,20 @@ class LockComponent {
                  $xfer += $input->skip($ftype);
                }
                break;
    + case 6:
    + if ($ftype == TType::I32) {
    + $xfer += $input->readI32($this->operationType);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
    + case 7:
    + if ($ftype == TType::BOOL) {
    + $xfer += $input->readBool($this->isAcid);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
              default:
                $xfer += $input->skip($ftype);
                break;
    @@ -11186,6 +11239,16 @@ class LockComponent {
            $xfer += $output->writeString($this->partitionname);
            $xfer += $output->writeFieldEnd();
          }
    + if ($this->operationType !== null) {
    + $xfer += $output->writeFieldBegin('operationType', TType::I32, 6);
    + $xfer += $output->writeI32($this->operationType);
    + $xfer += $output->writeFieldEnd();
    + }
    + if ($this->isAcid !== null) {
    + $xfer += $output->writeFieldBegin('isAcid', TType::BOOL, 7);
    + $xfer += $output->writeBool($this->isAcid);
    + $xfer += $output->writeFieldEnd();
    + }
          $xfer += $output->writeFieldStop();
          $xfer += $output->writeStructEnd();
          return $xfer;
    @@ -13378,6 +13441,10 @@ class AddDynamicPartitions {
         * @var string[]
         */
        public $partitionnames = null;
    + /**
    + * @var int
    + */
    + public $operationType = 5;

        public function __construct($vals=null) {
          if (!isset(self::$_TSPEC)) {
    @@ -13402,6 +13469,10 @@ class AddDynamicPartitions {
                  'type' => TType::STRING,
                  ),
                ),
    + 5 => array(
    + 'var' => 'operationType',
    + 'type' => TType::I32,
    + ),
              );
          }
          if (is_array($vals)) {
    @@ -13417,6 +13488,9 @@ class AddDynamicPartitions {
            if (isset($vals['partitionnames'])) {
              $this->partitionnames = $vals['partitionnames'];
            }
    + if (isset($vals['operationType'])) {
    + $this->operationType = $vals['operationType'];
    + }
          }
        }

    @@ -13477,6 +13551,13 @@ class AddDynamicPartitions {
                  $xfer += $input->skip($ftype);
                }
                break;
    + case 5:
    + if ($ftype == TType::I32) {
    + $xfer += $input->readI32($this->operationType);
    + } else {
    + $xfer += $input->skip($ftype);
    + }
    + break;
              default:
                $xfer += $input->skip($ftype);
                break;
    @@ -13522,6 +13603,11 @@ class AddDynamicPartitions {
            }
            $xfer += $output->writeFieldEnd();
          }
    + if ($this->operationType !== null) {
    + $xfer += $output->writeFieldBegin('operationType', TType::I32, 5);
    + $xfer += $output->writeI32($this->operationType);
    + $xfer += $output->writeFieldEnd();
    + }
          $xfer += $output->writeFieldStop();
          $xfer += $output->writeStructEnd();
          return $xfer;

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
    index c59fa3e..29ba9b1 100644
    --- a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
    +++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
    @@ -168,6 +168,32 @@ class GrantRevokeType:
          "REVOKE": 2,
        }

    +class DataOperationType:
    + SELECT = 1
    + INSERT = 2
    + UPDATE = 3
    + DELETE = 4
    + UNSET = 5
    + NO_TXN = 6
    +
    + _VALUES_TO_NAMES = {
    + 1: "SELECT",
    + 2: "INSERT",
    + 3: "UPDATE",
    + 4: "DELETE",
    + 5: "UNSET",
    + 6: "NO_TXN",
    + }
    +
    + _NAMES_TO_VALUES = {
    + "SELECT": 1,
    + "INSERT": 2,
    + "UPDATE": 3,
    + "DELETE": 4,
    + "UNSET": 5,
    + "NO_TXN": 6,
    + }
    +
      class EventRequestType:
        INSERT = 1
        UPDATE = 2
    @@ -7633,6 +7659,8 @@ class LockComponent:
         - dbname
         - tablename
         - partitionname
    + - operationType
    + - isAcid
        """

        thrift_spec = (
    @@ -7642,14 +7670,18 @@ class LockComponent:
          (3, TType.STRING, 'dbname', None, None, ), # 3
          (4, TType.STRING, 'tablename', None, None, ), # 4
          (5, TType.STRING, 'partitionname', None, None, ), # 5
    + (6, TType.I32, 'operationType', None, 5, ), # 6
    + (7, TType.BOOL, 'isAcid', None, False, ), # 7
        )

    - def __init__(self, type=None, level=None, dbname=None, tablename=None, partitionname=None,):
    + def __init__(self, type=None, level=None, dbname=None, tablename=None, partitionname=None, operationType=thrift_spec[6][4], isAcid=thrift_spec[7][4],):
          self.type = type
          self.level = level
          self.dbname = dbname
          self.tablename = tablename
          self.partitionname = partitionname
    + self.operationType = operationType
    + self.isAcid = isAcid

        def read(self, iprot):
          if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    @@ -7685,6 +7717,16 @@ class LockComponent:
                self.partitionname = iprot.readString()
              else:
                iprot.skip(ftype)
    + elif fid == 6:
    + if ftype == TType.I32:
    + self.operationType = iprot.readI32()
    + else:
    + iprot.skip(ftype)
    + elif fid == 7:
    + if ftype == TType.BOOL:
    + self.isAcid = iprot.readBool()
    + else:
    + iprot.skip(ftype)
            else:
              iprot.skip(ftype)
            iprot.readFieldEnd()
    @@ -7715,6 +7757,14 @@ class LockComponent:
            oprot.writeFieldBegin('partitionname', TType.STRING, 5)
            oprot.writeString(self.partitionname)
            oprot.writeFieldEnd()
    + if self.operationType is not None:
    + oprot.writeFieldBegin('operationType', TType.I32, 6)
    + oprot.writeI32(self.operationType)
    + oprot.writeFieldEnd()
    + if self.isAcid is not None:
    + oprot.writeFieldBegin('isAcid', TType.BOOL, 7)
    + oprot.writeBool(self.isAcid)
    + oprot.writeFieldEnd()
          oprot.writeFieldStop()
          oprot.writeStructEnd()

    @@ -7735,6 +7785,8 @@ class LockComponent:
          value = (value * 31) ^ hash(self.dbname)
          value = (value * 31) ^ hash(self.tablename)
          value = (value * 31) ^ hash(self.partitionname)
    + value = (value * 31) ^ hash(self.operationType)
    + value = (value * 31) ^ hash(self.isAcid)
          return value

        def __repr__(self):
    @@ -9300,6 +9352,7 @@ class AddDynamicPartitions:
         - dbname
         - tablename
         - partitionnames
    + - operationType
        """

        thrift_spec = (
    @@ -9308,13 +9361,15 @@ class AddDynamicPartitions:
          (2, TType.STRING, 'dbname', None, None, ), # 2
          (3, TType.STRING, 'tablename', None, None, ), # 3
          (4, TType.LIST, 'partitionnames', (TType.STRING,None), None, ), # 4
    + (5, TType.I32, 'operationType', None, 5, ), # 5
        )

    - def __init__(self, txnid=None, dbname=None, tablename=None, partitionnames=None,):
    + def __init__(self, txnid=None, dbname=None, tablename=None, partitionnames=None, operationType=thrift_spec[5][4],):
          self.txnid = txnid
          self.dbname = dbname
          self.tablename = tablename
          self.partitionnames = partitionnames
    + self.operationType = operationType

        def read(self, iprot):
          if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
    @@ -9350,6 +9405,11 @@ class AddDynamicPartitions:
                iprot.readListEnd()
              else:
                iprot.skip(ftype)
    + elif fid == 5:
    + if ftype == TType.I32:
    + self.operationType = iprot.readI32()
    + else:
    + iprot.skip(ftype)
            else:
              iprot.skip(ftype)
            iprot.readFieldEnd()
    @@ -9379,6 +9439,10 @@ class AddDynamicPartitions:
              oprot.writeString(iter447)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
    + if self.operationType is not None:
    + oprot.writeFieldBegin('operationType', TType.I32, 5)
    + oprot.writeI32(self.operationType)
    + oprot.writeFieldEnd()
          oprot.writeFieldStop()
          oprot.writeStructEnd()

    @@ -9400,6 +9464,7 @@ class AddDynamicPartitions:
          value = (value * 31) ^ hash(self.dbname)
          value = (value * 31) ^ hash(self.tablename)
          value = (value * 31) ^ hash(self.partitionnames)
    + value = (value * 31) ^ hash(self.operationType)
          return value

        def __repr__(self):

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
    ----------------------------------------------------------------------
    diff --git a/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb b/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
    index 2874308..662658c 100644
    --- a/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
    +++ b/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
    @@ -79,6 +79,17 @@ module GrantRevokeType
        VALID_VALUES = Set.new([GRANT, REVOKE]).freeze
      end

    +module DataOperationType
    + SELECT = 1
    + INSERT = 2
    + UPDATE = 3
    + DELETE = 4
    + UNSET = 5
    + NO_TXN = 6
    + VALUE_MAP = {1 => "SELECT", 2 => "INSERT", 3 => "UPDATE", 4 => "DELETE", 5 => "UNSET", 6 => "NO_TXN"}
    + VALID_VALUES = Set.new([SELECT, INSERT, UPDATE, DELETE, UNSET, NO_TXN]).freeze
    +end
    +
      module EventRequestType
        INSERT = 1
        UPDATE = 2
    @@ -1721,13 +1732,17 @@ class LockComponent
        DBNAME = 3
        TABLENAME = 4
        PARTITIONNAME = 5
    + OPERATIONTYPE = 6
    + ISACID = 7

        FIELDS = {
          TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::LockType},
          LEVEL => {:type => ::Thrift::Types::I32, :name => 'level', :enum_class => ::LockLevel},
          DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
          TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true},
    - PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}
    + PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true},
    + OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default => 5, :optional => true, :enum_class => ::DataOperationType},
    + ISACID => {:type => ::Thrift::Types::BOOL, :name => 'isAcid', :default => false, :optional => true}
        }

        def struct_fields; FIELDS; end
    @@ -1742,6 +1757,9 @@ class LockComponent
          unless @level.nil? || ::LockLevel::VALID_VALUES.include?(@level)
            raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field level!')
          end
    + unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType)
    + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!')
    + end
        end

        ::Thrift::Struct.generate_accessors self
    @@ -2103,12 +2121,14 @@ class AddDynamicPartitions
        DBNAME = 2
        TABLENAME = 3
        PARTITIONNAMES = 4
    + OPERATIONTYPE = 5

        FIELDS = {
          TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid'},
          DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
          TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
    - PARTITIONNAMES => {:type => ::Thrift::Types::LIST, :name => 'partitionnames', :element => {:type => ::Thrift::Types::STRING}}
    + PARTITIONNAMES => {:type => ::Thrift::Types::LIST, :name => 'partitionnames', :element => {:type => ::Thrift::Types::STRING}},
    + OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', :default => 5, :optional => true, :enum_class => ::DataOperationType}
        }

        def struct_fields; FIELDS; end
    @@ -2118,6 +2138,9 @@ class AddDynamicPartitions
          raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname
          raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename
          raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitionnames is unset!') unless @partitionnames
    + unless @operationType.nil? || ::DataOperationType::VALID_VALUES.include?(@operationType)
    + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operationType!')
    + end
        end

        ::Thrift::Struct.generate_accessors self

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    index 94d5d86..83d533f 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    @@ -69,6 +69,7 @@ import org.apache.hadoop.hive.metastore.api.CompactionRequest;
      import org.apache.hadoop.hive.metastore.api.CompactionType;
      import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException;
      import org.apache.hadoop.hive.metastore.api.CurrentNotificationEventId;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.Database;
      import org.apache.hadoop.hive.metastore.api.DropPartitionsExpr;
      import org.apache.hadoop.hive.metastore.api.DropPartitionsRequest;
    @@ -1958,10 +1959,18 @@ public class HiveMetaStoreClient implements IMetaStoreClient {
          return client.show_compact(new ShowCompactRequest());
        }

    + @Deprecated
        @Override
        public void addDynamicPartitions(long txnId, String dbName, String tableName,
                                         List<String> partNames) throws TException {
          client.add_dynamic_partitions(new AddDynamicPartitions(txnId, dbName, tableName, partNames));
    + }
    + @Override
    + public void addDynamicPartitions(long txnId, String dbName, String tableName,
    + List<String> partNames, DataOperationType operationType) throws TException {
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnId, dbName, tableName, partNames);
    + adp.setOperationType(operationType);
    + client.add_dynamic_partitions(adp);
        }

        @InterfaceAudience.LimitedPrivate({"HCatalog"})

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    index da693f7..fc7b70f 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    @@ -25,6 +25,7 @@ import org.apache.hadoop.hive.conf.HiveConf;
      import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions;
      import org.apache.hadoop.hive.metastore.api.CompactionType;
      import org.apache.hadoop.hive.metastore.api.CurrentNotificationEventId;
    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.EnvironmentContext;
      import org.apache.hadoop.hive.metastore.api.FireEventRequest;
      import org.apache.hadoop.hive.metastore.api.FireEventResponse;
    @@ -61,7 +62,6 @@ import org.apache.hadoop.hive.metastore.api.Database;
      import org.apache.hadoop.hive.metastore.api.FieldSchema;
      import org.apache.hadoop.hive.metastore.api.Function;
      import org.apache.hadoop.hive.metastore.api.GetAllFunctionsResponse;
    -import org.apache.hadoop.hive.metastore.api.GetOpenTxnsInfoResponse;
      import org.apache.hadoop.hive.metastore.api.GetPrincipalsInRoleRequest;
      import org.apache.hadoop.hive.metastore.api.GetPrincipalsInRoleResponse;
      import org.apache.hadoop.hive.metastore.api.GetRoleGrantsForPrincipalRequest;
    @@ -1402,6 +1402,12 @@ public interface IMetaStoreClient {
        ShowCompactResponse showCompactions() throws TException;

        /**
    + * @deprecated in Hive 1.3.0/2.1.0 - will be removed in 2 releases
    + */
    + @Deprecated
    + void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames)
    + throws TException;
    + /**
         * Send a list of partitions to the metastore to indicate which partitions were loaded
         * dynamically.
         * @param txnId id of the transaction
    @@ -1410,7 +1416,8 @@ public interface IMetaStoreClient {
         * @param partNames partition name, as constructed by Warehouse.makePartName
         * @throws TException
         */
    - void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames)
    + void addDynamicPartitions(long txnId, String dbName, String tableName, List<String> partNames,
    + DataOperationType operationType)
          throws TException;

        /**

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java b/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java
    index acd4653..3e8f193 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/LockComponentBuilder.java
    @@ -17,6 +17,7 @@
       */
      package org.apache.hadoop.hive.metastore;

    +import org.apache.hadoop.hive.metastore.api.DataOperationType;
      import org.apache.hadoop.hive.metastore.api.LockComponent;
      import org.apache.hadoop.hive.metastore.api.LockLevel;
      import org.apache.hadoop.hive.metastore.api.LockType;
    @@ -70,7 +71,16 @@ public class LockComponentBuilder {
          component.setDbname(dbName);
          return this;
        }
    +
    + public LockComponentBuilder setOperationType(DataOperationType dop) {
    + component.setOperationType(dop);
    + return this;
    + }

    + public LockComponentBuilder setIsAcid(boolean t) {
    + component.setIsAcid(t);
    + return this;
    + }
        /**
         * Set the table name.
         * @param tableName table name

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java b/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
    index 2fa7e07..6317a96 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java
    @@ -35,10 +35,19 @@ public class LockRequestBuilder {
        private LockTrie trie;
        private boolean userSet;

    + /**
    + * @deprecated
    + */
        public LockRequestBuilder() {
    + this(null);
    + }
    + public LockRequestBuilder(String agentInfo) {
          req = new LockRequest();
          trie = new LockTrie();
          userSet = false;
    + if(agentInfo != null) {
    + req.setAgentInfo(agentInfo);
    + }
        }

        /**

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
    index 0023f08..4da5542 100644
    --- a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
    +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
    @@ -131,7 +131,7 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
        static private boolean doRetryOnConnPool = false;

        private enum OpertaionType {
    - INSERT('i'), UPDATE('u'), DELETE('d');
    + SELECT('s'), INSERT('i'), UPDATE('u'), DELETE('d');
          private final char sqlConst;
          OpertaionType(char sqlConst) {
            this.sqlConst = sqlConst;
    @@ -141,6 +141,8 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
          }
          public static OpertaionType fromString(char sqlConst) {
            switch (sqlConst) {
    + case 's':
    + return SELECT;
              case 'i':
                return INSERT;
              case 'u':
    @@ -151,16 +153,18 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
                throw new IllegalArgumentException(quoteChar(sqlConst));
            }
          }
    - //we should instead just pass in OpertaionType from client (HIVE-13622)
    - @Deprecated
    - public static OpertaionType fromLockType(LockType lockType) {
    - switch (lockType) {
    - case SHARED_READ:
    - return INSERT;
    - case SHARED_WRITE:
    - return UPDATE;
    + public static OpertaionType fromDataOperationType(DataOperationType dop) {
    + switch (dop) {
    + case SELECT:
    + return OpertaionType.SELECT;
    + case INSERT:
    + return OpertaionType.INSERT;
    + case UPDATE:
    + return OpertaionType.UPDATE;
    + case DELETE:
    + return OpertaionType.DELETE;
              default:
    - throw new IllegalArgumentException("Unexpected lock type: " + lockType);
    + throw new IllegalArgumentException("Unexpected value: " + dop);
            }
          }
        }
    @@ -674,20 +678,21 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
              String s = "insert into COMPLETED_TXN_COMPONENTS select tc_txnid, tc_database, tc_table, " +
                "tc_partition from TXN_COMPONENTS where tc_txnid = " + txnid;
              LOG.debug("Going to execute insert <" + s + ">");
    - if (stmt.executeUpdate(s) < 1) {
    + int modCount = 0;
    + if ((modCount = stmt.executeUpdate(s)) < 1) {
                //this can be reasonable for an empty txn START/COMMIT or read-only txn
                LOG.info("Expected to move at least one record from txn_components to " +
                  "completed_txn_components when committing txn! " + JavaUtils.txnIdToString(txnid));
              }
              s = "delete from TXN_COMPONENTS where tc_txnid = " + txnid;
              LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + modCount = stmt.executeUpdate(s);
              s = "delete from HIVE_LOCKS where hl_txnid = " + txnid;
              LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + modCount = stmt.executeUpdate(s);
              s = "delete from TXNS where txn_id = " + txnid;
              LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + modCount = stmt.executeUpdate(s);
              LOG.debug("Going to commit");
              dbConn.commit();
            } catch (SQLException e) {
    @@ -829,7 +834,7 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
              /** Get the next lock id.
               * This has to be atomic with adding entries to HIVE_LOCK entries (1st add in W state) to prevent a race.
               * Suppose ID gen is a separate txn and 2 concurrent lock() methods are running. 1st one generates nl_next=7,
    - * 2nd nl_next=8. Then 8 goes first to insert into HIVE_LOCKS and aquires the locks. Then 7 unblocks,
    + * 2nd nl_next=8. Then 8 goes first to insert into HIVE_LOCKS and acquires the locks. Then 7 unblocks,
               * and add it's W locks but it won't see locks from 8 since to be 'fair' {@link #checkLock(java.sql.Connection, long)}
               * doesn't block on locks acquired later than one it's checking*/
              String s = addForUpdateClause("select nl_next from NEXT_LOCK_ID");
    @@ -847,13 +852,8 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
              stmt.executeUpdate(s);

              if (txnid > 0) {
    - /**DBTxnManager#acquireLocks() knows if it's I/U/D (that's how it decides what lock to get)
    - * So if we add that to LockRequest we'll know that here
    - * Should probably add it to LockComponent so that if in the future we decide wo allow 1 LockRequest
    - * to contain LockComponent for multiple operations.
    - * Deriving it from lock info doesn't distinguish between Update and Delete
    - *
    - * QueryPlan has BaseSemanticAnalyzer which has acidFileSinks list of FileSinkDesc
    + /**
    + * todo QueryPlan has BaseSemanticAnalyzer which has acidFileSinks list of FileSinkDesc
                 * FileSinkDesc.table is ql.metadata.Table
                 * Table.tableSpec which is TableSpec, which has specType which is SpecType
                 * So maybe this can work to know that this is part of dynamic partition insert in which case
    @@ -862,8 +862,35 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
                 */
                // For each component in this lock request,
                // add an entry to the txn_components table
    - // This must be done before HIVE_LOCKS is accessed
                for (LockComponent lc : rqst.getComponent()) {
    + if(lc.isSetIsAcid() && !lc.isIsAcid()) {
    + //we don't prevent using non-acid resources in a txn but we do lock them
    + continue;
    + }
    + boolean updateTxnComponents;
    + if(!lc.isSetOperationType()) {
    + //request came from old version of the client
    + updateTxnComponents = true;//this matches old behavior
    + }
    + else {
    + switch (lc.getOperationType()) {
    + case INSERT:
    + case UPDATE:
    + case DELETE:
    + updateTxnComponents = true;
    + break;
    + case SELECT:
    + updateTxnComponents = false;
    + break;
    + default:
    + //since we have an open transaction, only 4 values above are expected
    + throw new IllegalStateException("Unexpected DataOperationType: " + lc.getOperationType()
    + + " agentInfo=" + rqst.getAgentInfo() + " " + JavaUtils.txnIdToString(txnid));
    + }
    + }
    + if(!updateTxnComponents) {
    + continue;
    + }
                  String dbName = lc.getDbname();
                  String tblName = lc.getTablename();
                  String partName = lc.getPartitionname();
    @@ -872,14 +899,19 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
                    "values (" + txnid + ", '" + dbName + "', " +
                    (tblName == null ? "null" : "'" + tblName + "'") + ", " +
                    (partName == null ? "null" : "'" + partName + "'")+ "," +
    - quoteString(OpertaionType.fromLockType(lc.getType()).toString()) + ")";
    + quoteString(OpertaionType.fromDataOperationType(lc.getOperationType()).toString()) + ")";
                  LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + int modCount = stmt.executeUpdate(s);
                }
              }

              long intLockId = 0;
              for (LockComponent lc : rqst.getComponent()) {
    + if(lc.isSetOperationType() && lc.getOperationType() == DataOperationType.UNSET) {
    + //old version of thrift client should have (lc.isSetOperationType() == false)
    + throw new IllegalStateException("Bug: operationType=" + lc.getOperationType() + " for component "
    + + lc + " agentInfo=" + rqst.getAgentInfo());
    + }
                intLockId++;
                String dbName = lc.getDbname();
                String tblName = lc.getTablename();
    @@ -1454,21 +1486,13 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
                ensureValidTxn(dbConn, rqst.getTxnid(), stmt);
                shouldNeverHappen(rqst.getTxnid());
              }
    - //we should be able to get this from AddDynamicPartitions object longer term; in fact we'd have to
    - //for multi stmt txns if same table is written more than once per tx
    - // MoveTask knows if it's I/U/D
    - // MoveTask calls Hive.loadDynamicPartitions() which calls HiveMetaStoreClient.addDynamicPartitions()
    - // which ends up here so we'd need to add a field to AddDynamicPartitions.
    - String findOperationType = " tc_operation_type from TXN_COMPONENTS where tc_txnid=" + rqst.getTxnid()
    - + " and tc_database=" + quoteString(rqst.getDbname()) + " and tc_table=" + quoteString(rqst.getTablename());
    - //do limit 1 on this; currently they will all have the same operations
    - rs = stmt.executeQuery(addLimitClause(1, findOperationType));
    - if(!rs.next()) {
    - throw new IllegalStateException("Unable to determine tc_operation_type for " + JavaUtils.txnIdToString(rqst.getTxnid()));
    + //for RU this may be null so we should default it to 'u' which is most restrictive
    + OpertaionType ot = OpertaionType.UPDATE;
    + if(rqst.isSetOperationType()) {
    + ot = OpertaionType.fromDataOperationType(rqst.getOperationType());
              }
    - OpertaionType ot = OpertaionType.fromString(rs.getString(1).charAt(0));

    - //what if a txn writes the same table > 1 time... let's go with this for now, but really
    + //what if a txn writes the same table > 1 time...(HIVE-9675) let's go with this for now, but really
              //need to not write this in the first place, i.e. make this delete not needed
              //see enqueueLockWithRetry() - that's where we write to TXN_COMPONENTS
              String deleteSql = "delete from TXN_COMPONENTS where tc_txnid=" + rqst.getTxnid() + " and tc_database=" +
    @@ -1477,14 +1501,14 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
              //much "wider" than necessary in a lot of cases. Here on the other hand, we know exactly which
              //partitions have been written to. w/o this WRITE_SET would contain entries for partitions not actually
              //written to
    - stmt.executeUpdate(deleteSql);
    + int modCount = stmt.executeUpdate(deleteSql);
              for (String partName : rqst.getPartitionnames()) {
                String s =
                  "insert into TXN_COMPONENTS (tc_txnid, tc_database, tc_table, tc_partition, tc_operation_type) values (" +
                    rqst.getTxnid() + "," + quoteString(rqst.getDbname()) + "," + quoteString(rqst.getTablename()) +
                    "," + quoteString(partName) + "," + quoteChar(ot.sqlConst) + ")";
                LOG.debug("Going to execute update <" + s + ">");
    - stmt.executeUpdate(s);
    + modCount = stmt.executeUpdate(s);
              }
              LOG.debug("Going to commit");
              dbConn.commit();
    @@ -1504,8 +1528,8 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
        }

        /**
    - * Clean up corresponding records in metastore tables, specifically:
    - * TXN_COMPONENTS, COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPACTIONS
    + * Clean up corresponding records in metastore tables when corresponding object is dropped,
    + * specifically: TXN_COMPONENTS, COMPLETED_TXN_COMPONENTS, COMPACTION_QUEUE, COMPLETED_COMPACTIONS
         */
        @Override
        public void cleanupRecords(HiveObjectType type, Database db, Table table,

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java b/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
    index fc00e6d..23ad54e 100644
    --- a/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
    +++ b/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java
    @@ -17,8 +17,6 @@
       */
      package org.apache.hadoop.hive.metastore.txn;

    -import org.apache.commons.logging.Log;
    -import org.apache.commons.logging.LogFactory;
      import org.apache.hadoop.hive.conf.HiveConf;
      import org.apache.hadoop.hive.metastore.api.*;
      import org.apache.log4j.Level;
    @@ -270,12 +268,14 @@ public class TestCompactionTxnHandler {
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB,
              "mydb");
          comp.setTablename("mytable");
    + comp.setOperationType(DataOperationType.UPDATE);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB,
              "mydb");
          comp.setTablename("yourtable");
          comp.setPartitionname("mypartition");
    + comp.setOperationType(DataOperationType.UPDATE);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
          req.setTxnid(txnid);
    @@ -306,6 +306,7 @@ public class TestCompactionTxnHandler {
          LockComponent comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB,
              "mydb");
          comp.setTablename("mytable");
    + comp.setOperationType(DataOperationType.INSERT);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -317,6 +318,7 @@ public class TestCompactionTxnHandler {
          txnid = openTxn();
          comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
          comp.setTablename("yourtable");
    + comp.setOperationType(DataOperationType.DELETE);
          components = new ArrayList<LockComponent>(1);
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -329,6 +331,7 @@ public class TestCompactionTxnHandler {
          comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
          comp.setTablename("foo");
          comp.setPartitionname("bar");
    + comp.setOperationType(DataOperationType.UPDATE);
          components = new ArrayList<LockComponent>(1);
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -339,6 +342,7 @@ public class TestCompactionTxnHandler {
          comp = new LockComponent(LockType.SHARED_WRITE, LockLevel.DB, "mydb");
          comp.setTablename("foo");
          comp.setPartitionname("baz");
    + comp.setOperationType(DataOperationType.UPDATE);
          components = new ArrayList<LockComponent>(1);
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -395,13 +399,17 @@ public class TestCompactionTxnHandler {
          // lock a table, as in dynamic partitions
          LockComponent lc = new LockComponent(LockType.SHARED_WRITE, LockLevel.TABLE, dbName);
          lc.setTablename(tableName);
    + DataOperationType dop = DataOperationType.UPDATE;
    + lc.setOperationType(dop);
          LockRequest lr = new LockRequest(Arrays.asList(lc), "me", "localhost");
          lr.setTxnid(txnId);
          LockResponse lock = txnHandler.lock(lr);
          assertEquals(LockState.ACQUIRED, lock.getState());

    - txnHandler.addDynamicPartitions(new AddDynamicPartitions(txnId, dbName, tableName,
    - Arrays.asList("ds=yesterday", "ds=today")));
    + AddDynamicPartitions adp = new AddDynamicPartitions(txnId, dbName, tableName,
    + Arrays.asList("ds=yesterday", "ds=today"));
    + adp.setOperationType(dop);
    + txnHandler.addDynamicPartitions(adp);
          txnHandler.commitTxn(new CommitTxnRequest(txnId));

          Set<CompactionInfo> potentials = txnHandler.findPotentialCompactions(1000);

    http://git-wip-us.apache.org/repos/asf/hive/blob/c0b532fc/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
    ----------------------------------------------------------------------
    diff --git a/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java b/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
    index ccaf91c..0d4fc59 100644
    --- a/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
    +++ b/metastore/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java
    @@ -177,6 +177,7 @@ public class TestTxnHandler {
        public void testLockDifferentDBs() throws Exception {
          // Test that two different databases don't collide on their locks
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -184,6 +185,7 @@ public class TestTxnHandler {
          assertTrue(res.getState() == LockState.ACQUIRED);

          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "yourdb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          components.clear();
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -195,6 +197,7 @@ public class TestTxnHandler {
        public void testLockSameDB() throws Exception {
          // Test that two different databases don't collide on their locks
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -202,6 +205,7 @@ public class TestTxnHandler {
          assertTrue(res.getState() == LockState.ACQUIRED);

          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          components.clear();
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -213,6 +217,7 @@ public class TestTxnHandler {
        public void testLockDbLocksTable() throws Exception {
          // Test that locking a database prevents locking of tables in the database
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -220,6 +225,7 @@ public class TestTxnHandler {
          assertTrue(res.getState() == LockState.ACQUIRED);

          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          comp.setTablename("mytable");
          components.clear();
          components.add(comp);
    @@ -232,6 +238,7 @@ public class TestTxnHandler {
        public void testLockDbDoesNotLockTableInDifferentDB() throws Exception {
          // Test that locking a database prevents locking of tables in the database
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -239,6 +246,7 @@ public class TestTxnHandler {
          assertTrue(res.getState() == LockState.ACQUIRED);

          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "yourdb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          comp.setTablename("mytable");
          components.clear();
          components.add(comp);
    @@ -251,6 +259,7 @@ public class TestTxnHandler {
        public void testLockDifferentTables() throws Exception {
          // Test that two different tables don't collide on their locks
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          comp.setTablename("mytable");
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
    @@ -259,6 +268,7 @@ public class TestTxnHandler {
          assertTrue(res.getState() == LockState.ACQUIRED);

          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
    + comp.setOperationType(DataOperationType.NO_TXN);
          comp.setTablename("yourtable");
          components.clear();
          components.add(comp);
    @@ -272,6 +282,7 @@ public class TestTxnHandler {
          // Test that two different tables don't collide on their locks
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -280,6 +291,7 @@ public class TestTxnHandler {

          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
    + comp.setOperationType(DataOperationType.NO_TXN);
          components.clear();
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -292,6 +304,7 @@ public class TestTxnHandler {
          // Test that locking a table prevents locking of partitions of the table
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -301,6 +314,7 @@ public class TestTxnHandler {
          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
          comp.setPartitionname("mypartition");
    + comp.setOperationType(DataOperationType.NO_TXN);
          components.clear();
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -313,6 +327,7 @@ public class TestTxnHandler {
          // Test that locking a table prevents locking of partitions of the table
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -322,6 +337,7 @@ public class TestTxnHandler {
          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("yourtable");
          comp.setPartitionname("mypartition");
    + comp.setOperationType(DataOperationType.NO_TXN);
          components.clear();
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -335,6 +351,7 @@ public class TestTxnHandler {
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
          comp.setPartitionname("mypartition");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -344,6 +361,7 @@ public class TestTxnHandler {
          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
          comp.setPartitionname("yourpartition");
    + comp.setOperationType(DataOperationType.NO_TXN);
          components.clear();
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -357,6 +375,7 @@ public class TestTxnHandler {
          LockComponent comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
          comp.setPartitionname("mypartition");
    + comp.setOperationType(DataOperationType.NO_TXN);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -366,6 +385,7 @@ public class TestTxnHandler {
          comp = new LockComponent(LockType.EXCLUSIVE, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
          comp.setPartitionname("mypartition");
    + comp.setOperationType(DataOperationType.NO_TXN);
          components.clear();
          components.add(comp);
          req = new LockRequest(components, "me", "localhost");
    @@ -379,6 +399,7 @@ public class TestTxnHandler {
          LockComponent comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
          comp.setTablename("mytable");
          comp.setPartitionname("mypartition");
    + comp.setOperationType(DataOperationType.INSERT);
          List<LockComponent> components = new ArrayList<LockComponent>(1);
          components.add(comp);
          LockRequest req = new LockRequest(components, "me", "localhost");
    @@ -388,6 +409,7 @@ public class TestTxnHandler {
          comp = new LockComponent(LockType.SHARED_READ, LockLevel.DB, "mydb");
          comp.setTablename("mytable");