You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/07/14 01:53:23 UTC

[01/20] hive git commit: HIVE-20041: ResultsCache: Improve logging for concurrent queries (Laszlo Bodor reviewed by Gopal V)

Repository: hive
Updated Branches:
  refs/heads/master-txnstats 93b9cdd69 -> 1c9947f38


HIVE-20041: ResultsCache: Improve logging for concurrent queries (Laszlo Bodor reviewed by Gopal V)

Signed-off-by: Gopal V <go...@apache.org>


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

Branch: refs/heads/master-txnstats
Commit: d8306cf68087ed369178c6f3a343db07ad7b9ca8
Parents: 20eb7b5
Author: Laszlo Bodor <lb...@hortonworks.com>
Authored: Thu Jul 12 23:43:05 2018 -0700
Committer: Gopal V <go...@apache.org>
Committed: Thu Jul 12 23:43:05 2018 -0700

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/Driver.java            | 5 +++--
 .../hadoop/hive/ql/cache/results/QueryResultsCache.java      | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/d8306cf6/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
index bf4d29c..78922f1 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
@@ -2203,10 +2203,11 @@ public class Driver implements IDriver {
         if (plan.hasAcidResourcesInQuery()) {
           txnWriteIdList = AcidUtils.getValidTxnWriteIdList(conf);
         }
+        CacheEntry cacheEntry = cacheUsage.getCacheEntry();
         boolean savedToCache = QueryResultsCache.getInstance().setEntryValid(
-            cacheUsage.getCacheEntry(),
+            cacheEntry,
             plan.getFetchTask().getWork());
-        LOG.info("savedToCache: {}", savedToCache);
+        LOG.info("savedToCache: {} ({})", savedToCache, cacheEntry);
         if (savedToCache) {
           useFetchFromCache(cacheUsage.getCacheEntry());
           // setEntryValid() already increments the reader count. Set usedCacheEntry so it gets released.

http://git-wip-us.apache.org/repos/asf/hive/blob/d8306cf6/ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java b/ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java
index d29c4da..44f7bf8 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java
@@ -213,9 +213,9 @@ public final class QueryResultsCache {
     }
 
     public String toString() {
-      return "CacheEntry query: [" + getQueryInfo().getLookupInfo().getQueryText()
-          + "], status: " + status + ", location: " + cachedResultsPath
-          + ", size: " + size;
+      return String.format("CacheEntry#%s query: [ %s ], status: %s, location: %s, size: %d",
+          System.identityHashCode(this), getQueryInfo().getLookupInfo().getQueryText(), status,
+          cachedResultsPath, size);
     }
 
     public boolean addReader() {
@@ -297,7 +297,7 @@ public final class QueryResultsCache {
      *         false if the status changes from PENDING to INVALID
      */
     public boolean waitForValidStatus() {
-      LOG.info("Waiting on pending cacheEntry");
+      LOG.info("Waiting on pending cacheEntry: {}", this);
       long timeout = 1000;
 
       long startTime = System.nanoTime();


[17/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterPartitionsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterPartitionsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterPartitionsRequest.java
index cc6ecdf..9d0e014 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterPartitionsRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterPartitionsRequest.java
@@ -38,13 +38,14 @@ import org.slf4j.LoggerFactory;
 @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class AlterPartitionsRequest implements org.apache.thrift.TBase<AlterPartitionsRequest, AlterPartitionsRequest._Fields>, java.io.Serializable, Cloneable, Comparable<AlterPartitionsRequest> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlterPartitionsRequest");
 
-  private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)3);
-  private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environmentContext", org.apache.thrift.protocol.TType.STRUCT, (short)4);
-  private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)5);
-  private static final org.apache.thrift.protocol.TField WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("writeId", org.apache.thrift.protocol.TType.I64, (short)6);
-  private static final org.apache.thrift.protocol.TField VALID_WRITE_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validWriteIdList", org.apache.thrift.protocol.TType.STRING, (short)7);
+  private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_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 PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)4);
+  private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environmentContext", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+  private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)6);
+  private static final org.apache.thrift.protocol.TField WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("writeId", org.apache.thrift.protocol.TType.I64, (short)7);
+  private static final org.apache.thrift.protocol.TField VALID_WRITE_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validWriteIdList", org.apache.thrift.protocol.TType.STRING, (short)8);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -52,23 +53,25 @@ import org.slf4j.LoggerFactory;
     schemes.put(TupleScheme.class, new AlterPartitionsRequestTupleSchemeFactory());
   }
 
+  private String catName; // optional
   private String dbName; // required
   private String tableName; // required
   private List<Partition> partitions; // required
-  private EnvironmentContext environmentContext; // required
+  private EnvironmentContext environmentContext; // optional
   private long txnId; // optional
   private long writeId; // optional
   private String validWriteIdList; // 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 {
-    DB_NAME((short)1, "dbName"),
-    TABLE_NAME((short)2, "tableName"),
-    PARTITIONS((short)3, "partitions"),
-    ENVIRONMENT_CONTEXT((short)4, "environmentContext"),
-    TXN_ID((short)5, "txnId"),
-    WRITE_ID((short)6, "writeId"),
-    VALID_WRITE_ID_LIST((short)7, "validWriteIdList");
+    CAT_NAME((short)1, "catName"),
+    DB_NAME((short)2, "dbName"),
+    TABLE_NAME((short)3, "tableName"),
+    PARTITIONS((short)4, "partitions"),
+    ENVIRONMENT_CONTEXT((short)5, "environmentContext"),
+    TXN_ID((short)6, "txnId"),
+    WRITE_ID((short)7, "writeId"),
+    VALID_WRITE_ID_LIST((short)8, "validWriteIdList");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -83,19 +86,21 @@ import org.slf4j.LoggerFactory;
      */
     public static _Fields findByThriftId(int fieldId) {
       switch(fieldId) {
-        case 1: // DB_NAME
+        case 1: // CAT_NAME
+          return CAT_NAME;
+        case 2: // DB_NAME
           return DB_NAME;
-        case 2: // TABLE_NAME
+        case 3: // TABLE_NAME
           return TABLE_NAME;
-        case 3: // PARTITIONS
+        case 4: // PARTITIONS
           return PARTITIONS;
-        case 4: // ENVIRONMENT_CONTEXT
+        case 5: // ENVIRONMENT_CONTEXT
           return ENVIRONMENT_CONTEXT;
-        case 5: // TXN_ID
+        case 6: // TXN_ID
           return TXN_ID;
-        case 6: // WRITE_ID
+        case 7: // WRITE_ID
           return WRITE_ID;
-        case 7: // VALID_WRITE_ID_LIST
+        case 8: // VALID_WRITE_ID_LIST
           return VALID_WRITE_ID_LIST;
         default:
           return null;
@@ -140,10 +145,12 @@ import org.slf4j.LoggerFactory;
   private static final int __TXNID_ISSET_ID = 0;
   private static final int __WRITEID_ISSET_ID = 1;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.TXN_ID,_Fields.WRITE_ID,_Fields.VALID_WRITE_ID_LIST};
+  private static final _Fields optionals[] = {_Fields.CAT_NAME,_Fields.ENVIRONMENT_CONTEXT,_Fields.TXN_ID,_Fields.WRITE_ID,_Fields.VALID_WRITE_ID_LIST};
   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);
+    tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
@@ -151,7 +158,7 @@ import org.slf4j.LoggerFactory;
     tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class))));
-    tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environmentContext", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environmentContext", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class)));
     tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
@@ -173,14 +180,12 @@ import org.slf4j.LoggerFactory;
   public AlterPartitionsRequest(
     String dbName,
     String tableName,
-    List<Partition> partitions,
-    EnvironmentContext environmentContext)
+    List<Partition> partitions)
   {
     this();
     this.dbName = dbName;
     this.tableName = tableName;
     this.partitions = partitions;
-    this.environmentContext = environmentContext;
   }
 
   /**
@@ -188,6 +193,9 @@ import org.slf4j.LoggerFactory;
    */
   public AlterPartitionsRequest(AlterPartitionsRequest other) {
     __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetCatName()) {
+      this.catName = other.catName;
+    }
     if (other.isSetDbName()) {
       this.dbName = other.dbName;
     }
@@ -217,6 +225,7 @@ import org.slf4j.LoggerFactory;
 
   @Override
   public void clear() {
+    this.catName = null;
     this.dbName = null;
     this.tableName = null;
     this.partitions = null;
@@ -228,6 +237,29 @@ import org.slf4j.LoggerFactory;
     this.validWriteIdList = null;
   }
 
+  public String getCatName() {
+    return this.catName;
+  }
+
+  public void setCatName(String catName) {
+    this.catName = catName;
+  }
+
+  public void unsetCatName() {
+    this.catName = null;
+  }
+
+  /** Returns true if field catName is set (has been assigned a value) and false otherwise */
+  public boolean isSetCatName() {
+    return this.catName != null;
+  }
+
+  public void setCatNameIsSet(boolean value) {
+    if (!value) {
+      this.catName = null;
+    }
+  }
+
   public String getDbName() {
     return this.dbName;
   }
@@ -404,6 +436,14 @@ import org.slf4j.LoggerFactory;
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
+    case CAT_NAME:
+      if (value == null) {
+        unsetCatName();
+      } else {
+        setCatName((String)value);
+      }
+      break;
+
     case DB_NAME:
       if (value == null) {
         unsetDbName();
@@ -465,6 +505,9 @@ import org.slf4j.LoggerFactory;
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
+    case CAT_NAME:
+      return getCatName();
+
     case DB_NAME:
       return getDbName();
 
@@ -497,6 +540,8 @@ import org.slf4j.LoggerFactory;
     }
 
     switch (field) {
+    case CAT_NAME:
+      return isSetCatName();
     case DB_NAME:
       return isSetDbName();
     case TABLE_NAME:
@@ -528,6 +573,15 @@ import org.slf4j.LoggerFactory;
     if (that == null)
       return false;
 
+    boolean this_present_catName = true && this.isSetCatName();
+    boolean that_present_catName = true && that.isSetCatName();
+    if (this_present_catName || that_present_catName) {
+      if (!(this_present_catName && that_present_catName))
+        return false;
+      if (!this.catName.equals(that.catName))
+        return false;
+    }
+
     boolean this_present_dbName = true && this.isSetDbName();
     boolean that_present_dbName = true && that.isSetDbName();
     if (this_present_dbName || that_present_dbName) {
@@ -598,6 +652,11 @@ import org.slf4j.LoggerFactory;
   public int hashCode() {
     List<Object> list = new ArrayList<Object>();
 
+    boolean present_catName = true && (isSetCatName());
+    list.add(present_catName);
+    if (present_catName)
+      list.add(catName);
+
     boolean present_dbName = true && (isSetDbName());
     list.add(present_dbName);
     if (present_dbName)
@@ -644,6 +703,16 @@ import org.slf4j.LoggerFactory;
 
     int lastComparison = 0;
 
+    lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCatName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName());
     if (lastComparison != 0) {
       return lastComparison;
@@ -734,6 +803,16 @@ import org.slf4j.LoggerFactory;
     StringBuilder sb = new StringBuilder("AlterPartitionsRequest(");
     boolean first = true;
 
+    if (isSetCatName()) {
+      sb.append("catName:");
+      if (this.catName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.catName);
+      }
+      first = false;
+    }
+    if (!first) sb.append(", ");
     sb.append("dbName:");
     if (this.dbName == null) {
       sb.append("null");
@@ -757,14 +836,16 @@ import org.slf4j.LoggerFactory;
       sb.append(this.partitions);
     }
     first = false;
-    if (!first) sb.append(", ");
-    sb.append("environmentContext:");
-    if (this.environmentContext == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.environmentContext);
+    if (isSetEnvironmentContext()) {
+      if (!first) sb.append(", ");
+      sb.append("environmentContext:");
+      if (this.environmentContext == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.environmentContext);
+      }
+      first = false;
     }
-    first = false;
     if (isSetTxnId()) {
       if (!first) sb.append(", ");
       sb.append("txnId:");
@@ -805,10 +886,6 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'partitions' is unset! Struct:" + toString());
     }
 
-    if (!isSetEnvironmentContext()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'environmentContext' is unset! Struct:" + toString());
-    }
-
     // check for sub-struct validity
     if (environmentContext != null) {
       environmentContext.validate();
@@ -851,7 +928,15 @@ import org.slf4j.LoggerFactory;
           break;
         }
         switch (schemeField.id) {
-          case 1: // DB_NAME
+          case 1: // CAT_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.catName = iprot.readString();
+              struct.setCatNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DB_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.dbName = iprot.readString();
               struct.setDbNameIsSet(true);
@@ -859,7 +944,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 2: // TABLE_NAME
+          case 3: // TABLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.tableName = iprot.readString();
               struct.setTableNameIsSet(true);
@@ -867,17 +952,17 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // PARTITIONS
+          case 4: // PARTITIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list952 = iprot.readListBegin();
-                struct.partitions = new ArrayList<Partition>(_list952.size);
-                Partition _elem953;
-                for (int _i954 = 0; _i954 < _list952.size; ++_i954)
+                org.apache.thrift.protocol.TList _list960 = iprot.readListBegin();
+                struct.partitions = new ArrayList<Partition>(_list960.size);
+                Partition _elem961;
+                for (int _i962 = 0; _i962 < _list960.size; ++_i962)
                 {
-                  _elem953 = new Partition();
-                  _elem953.read(iprot);
-                  struct.partitions.add(_elem953);
+                  _elem961 = new Partition();
+                  _elem961.read(iprot);
+                  struct.partitions.add(_elem961);
                 }
                 iprot.readListEnd();
               }
@@ -886,7 +971,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 4: // ENVIRONMENT_CONTEXT
+          case 5: // ENVIRONMENT_CONTEXT
             if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
               struct.environmentContext = new EnvironmentContext();
               struct.environmentContext.read(iprot);
@@ -895,7 +980,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 5: // TXN_ID
+          case 6: // TXN_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.txnId = iprot.readI64();
               struct.setTxnIdIsSet(true);
@@ -903,7 +988,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // WRITE_ID
+          case 7: // WRITE_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
               struct.writeId = iprot.readI64();
               struct.setWriteIdIsSet(true);
@@ -911,7 +996,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 7: // VALID_WRITE_ID_LIST
+          case 8: // VALID_WRITE_ID_LIST
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.validWriteIdList = iprot.readString();
               struct.setValidWriteIdListIsSet(true);
@@ -932,6 +1017,13 @@ import org.slf4j.LoggerFactory;
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.catName != null) {
+        if (struct.isSetCatName()) {
+          oprot.writeFieldBegin(CAT_NAME_FIELD_DESC);
+          oprot.writeString(struct.catName);
+          oprot.writeFieldEnd();
+        }
+      }
       if (struct.dbName != null) {
         oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
         oprot.writeString(struct.dbName);
@@ -946,18 +1038,20 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
-          for (Partition _iter955 : struct.partitions)
+          for (Partition _iter963 : struct.partitions)
           {
-            _iter955.write(oprot);
+            _iter963.write(oprot);
           }
           oprot.writeListEnd();
         }
         oprot.writeFieldEnd();
       }
       if (struct.environmentContext != null) {
-        oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC);
-        struct.environmentContext.write(oprot);
-        oprot.writeFieldEnd();
+        if (struct.isSetEnvironmentContext()) {
+          oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC);
+          struct.environmentContext.write(oprot);
+          oprot.writeFieldEnd();
+        }
       }
       if (struct.isSetTxnId()) {
         oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
@@ -997,23 +1091,34 @@ import org.slf4j.LoggerFactory;
       oprot.writeString(struct.tableName);
       {
         oprot.writeI32(struct.partitions.size());
-        for (Partition _iter956 : struct.partitions)
+        for (Partition _iter964 : struct.partitions)
         {
-          _iter956.write(oprot);
+          _iter964.write(oprot);
         }
       }
-      struct.environmentContext.write(oprot);
       BitSet optionals = new BitSet();
-      if (struct.isSetTxnId()) {
+      if (struct.isSetCatName()) {
         optionals.set(0);
       }
-      if (struct.isSetWriteId()) {
+      if (struct.isSetEnvironmentContext()) {
         optionals.set(1);
       }
-      if (struct.isSetValidWriteIdList()) {
+      if (struct.isSetTxnId()) {
         optionals.set(2);
       }
-      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetWriteId()) {
+        optionals.set(3);
+      }
+      if (struct.isSetValidWriteIdList()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetCatName()) {
+        oprot.writeString(struct.catName);
+      }
+      if (struct.isSetEnvironmentContext()) {
+        struct.environmentContext.write(oprot);
+      }
       if (struct.isSetTxnId()) {
         oprot.writeI64(struct.txnId);
       }
@@ -1033,30 +1138,36 @@ import org.slf4j.LoggerFactory;
       struct.tableName = iprot.readString();
       struct.setTableNameIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list957 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.partitions = new ArrayList<Partition>(_list957.size);
-        Partition _elem958;
-        for (int _i959 = 0; _i959 < _list957.size; ++_i959)
+        org.apache.thrift.protocol.TList _list965 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.partitions = new ArrayList<Partition>(_list965.size);
+        Partition _elem966;
+        for (int _i967 = 0; _i967 < _list965.size; ++_i967)
         {
-          _elem958 = new Partition();
-          _elem958.read(iprot);
-          struct.partitions.add(_elem958);
+          _elem966 = new Partition();
+          _elem966.read(iprot);
+          struct.partitions.add(_elem966);
         }
       }
       struct.setPartitionsIsSet(true);
-      struct.environmentContext = new EnvironmentContext();
-      struct.environmentContext.read(iprot);
-      struct.setEnvironmentContextIsSet(true);
-      BitSet incoming = iprot.readBitSet(3);
+      BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
+        struct.catName = iprot.readString();
+        struct.setCatNameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.environmentContext = new EnvironmentContext();
+        struct.environmentContext.read(iprot);
+        struct.setEnvironmentContextIsSet(true);
+      }
+      if (incoming.get(2)) {
         struct.txnId = iprot.readI64();
         struct.setTxnIdIsSet(true);
       }
-      if (incoming.get(1)) {
+      if (incoming.get(3)) {
         struct.writeId = iprot.readI64();
         struct.setWriteIdIsSet(true);
       }
-      if (incoming.get(2)) {
+      if (incoming.get(4)) {
         struct.validWriteIdList = iprot.readString();
         struct.setValidWriteIdListIsSet(true);
       }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterTableRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterTableRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterTableRequest.java
new file mode 100644
index 0000000..6a1efd8
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterTableRequest.java
@@ -0,0 +1,1129 @@
+/**
+ * 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 org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class AlterTableRequest implements org.apache.thrift.TBase<AlterTableRequest, AlterTableRequest._Fields>, java.io.Serializable, Cloneable, Comparable<AlterTableRequest> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlterTableRequest");
+
+  private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField DB_NAME_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 TABLE_NAME_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 TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+  private static final org.apache.thrift.protocol.TField ENVIRONMENT_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("environmentContext", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+  private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)6);
+  private static final org.apache.thrift.protocol.TField WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("writeId", org.apache.thrift.protocol.TType.I64, (short)7);
+  private static final org.apache.thrift.protocol.TField VALID_WRITE_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validWriteIdList", org.apache.thrift.protocol.TType.STRING, (short)8);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new AlterTableRequestStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new AlterTableRequestTupleSchemeFactory());
+  }
+
+  private String catName; // optional
+  private String dbName; // required
+  private String tableName; // required
+  private Table table; // required
+  private EnvironmentContext environmentContext; // optional
+  private long txnId; // optional
+  private long writeId; // optional
+  private String validWriteIdList; // 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 {
+    CAT_NAME((short)1, "catName"),
+    DB_NAME((short)2, "dbName"),
+    TABLE_NAME((short)3, "tableName"),
+    TABLE((short)4, "table"),
+    ENVIRONMENT_CONTEXT((short)5, "environmentContext"),
+    TXN_ID((short)6, "txnId"),
+    WRITE_ID((short)7, "writeId"),
+    VALID_WRITE_ID_LIST((short)8, "validWriteIdList");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // CAT_NAME
+          return CAT_NAME;
+        case 2: // DB_NAME
+          return DB_NAME;
+        case 3: // TABLE_NAME
+          return TABLE_NAME;
+        case 4: // TABLE
+          return TABLE;
+        case 5: // ENVIRONMENT_CONTEXT
+          return ENVIRONMENT_CONTEXT;
+        case 6: // TXN_ID
+          return TXN_ID;
+        case 7: // WRITE_ID
+          return WRITE_ID;
+        case 8: // VALID_WRITE_ID_LIST
+          return VALID_WRITE_ID_LIST;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __TXNID_ISSET_ID = 0;
+  private static final int __WRITEID_ISSET_ID = 1;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.CAT_NAME,_Fields.ENVIRONMENT_CONTEXT,_Fields.TXN_ID,_Fields.WRITE_ID,_Fields.VALID_WRITE_ID_LIST};
+  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);
+    tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Table.class)));
+    tmpMap.put(_Fields.ENVIRONMENT_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("environmentContext", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EnvironmentContext.class)));
+    tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.WRITE_ID, new org.apache.thrift.meta_data.FieldMetaData("writeId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.VALID_WRITE_ID_LIST, new org.apache.thrift.meta_data.FieldMetaData("validWriteIdList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlterTableRequest.class, metaDataMap);
+  }
+
+  public AlterTableRequest() {
+    this.txnId = -1L;
+
+    this.writeId = -1L;
+
+  }
+
+  public AlterTableRequest(
+    String dbName,
+    String tableName,
+    Table table)
+  {
+    this();
+    this.dbName = dbName;
+    this.tableName = tableName;
+    this.table = table;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public AlterTableRequest(AlterTableRequest other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetCatName()) {
+      this.catName = other.catName;
+    }
+    if (other.isSetDbName()) {
+      this.dbName = other.dbName;
+    }
+    if (other.isSetTableName()) {
+      this.tableName = other.tableName;
+    }
+    if (other.isSetTable()) {
+      this.table = new Table(other.table);
+    }
+    if (other.isSetEnvironmentContext()) {
+      this.environmentContext = new EnvironmentContext(other.environmentContext);
+    }
+    this.txnId = other.txnId;
+    this.writeId = other.writeId;
+    if (other.isSetValidWriteIdList()) {
+      this.validWriteIdList = other.validWriteIdList;
+    }
+  }
+
+  public AlterTableRequest deepCopy() {
+    return new AlterTableRequest(this);
+  }
+
+  @Override
+  public void clear() {
+    this.catName = null;
+    this.dbName = null;
+    this.tableName = null;
+    this.table = null;
+    this.environmentContext = null;
+    this.txnId = -1L;
+
+    this.writeId = -1L;
+
+    this.validWriteIdList = null;
+  }
+
+  public String getCatName() {
+    return this.catName;
+  }
+
+  public void setCatName(String catName) {
+    this.catName = catName;
+  }
+
+  public void unsetCatName() {
+    this.catName = null;
+  }
+
+  /** Returns true if field catName is set (has been assigned a value) and false otherwise */
+  public boolean isSetCatName() {
+    return this.catName != null;
+  }
+
+  public void setCatNameIsSet(boolean value) {
+    if (!value) {
+      this.catName = null;
+    }
+  }
+
+  public String getDbName() {
+    return this.dbName;
+  }
+
+  public void setDbName(String dbName) {
+    this.dbName = dbName;
+  }
+
+  public void unsetDbName() {
+    this.dbName = null;
+  }
+
+  /** Returns true if field dbName is set (has been assigned a value) and false otherwise */
+  public boolean isSetDbName() {
+    return this.dbName != null;
+  }
+
+  public void setDbNameIsSet(boolean value) {
+    if (!value) {
+      this.dbName = null;
+    }
+  }
+
+  public String getTableName() {
+    return this.tableName;
+  }
+
+  public void setTableName(String tableName) {
+    this.tableName = tableName;
+  }
+
+  public void unsetTableName() {
+    this.tableName = null;
+  }
+
+  /** Returns true if field tableName is set (has been assigned a value) and false otherwise */
+  public boolean isSetTableName() {
+    return this.tableName != null;
+  }
+
+  public void setTableNameIsSet(boolean value) {
+    if (!value) {
+      this.tableName = null;
+    }
+  }
+
+  public Table getTable() {
+    return this.table;
+  }
+
+  public void setTable(Table table) {
+    this.table = table;
+  }
+
+  public void unsetTable() {
+    this.table = null;
+  }
+
+  /** Returns true if field table is set (has been assigned a value) and false otherwise */
+  public boolean isSetTable() {
+    return this.table != null;
+  }
+
+  public void setTableIsSet(boolean value) {
+    if (!value) {
+      this.table = null;
+    }
+  }
+
+  public EnvironmentContext getEnvironmentContext() {
+    return this.environmentContext;
+  }
+
+  public void setEnvironmentContext(EnvironmentContext environmentContext) {
+    this.environmentContext = environmentContext;
+  }
+
+  public void unsetEnvironmentContext() {
+    this.environmentContext = null;
+  }
+
+  /** Returns true if field environmentContext is set (has been assigned a value) and false otherwise */
+  public boolean isSetEnvironmentContext() {
+    return this.environmentContext != null;
+  }
+
+  public void setEnvironmentContextIsSet(boolean value) {
+    if (!value) {
+      this.environmentContext = null;
+    }
+  }
+
+  public long getTxnId() {
+    return this.txnId;
+  }
+
+  public void setTxnId(long txnId) {
+    this.txnId = txnId;
+    setTxnIdIsSet(true);
+  }
+
+  public void unsetTxnId() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID);
+  }
+
+  /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
+  public boolean isSetTxnId() {
+    return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID);
+  }
+
+  public void setTxnIdIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
+  }
+
+  public long getWriteId() {
+    return this.writeId;
+  }
+
+  public void setWriteId(long writeId) {
+    this.writeId = writeId;
+    setWriteIdIsSet(true);
+  }
+
+  public void unsetWriteId() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITEID_ISSET_ID);
+  }
+
+  /** Returns true if field writeId is set (has been assigned a value) and false otherwise */
+  public boolean isSetWriteId() {
+    return EncodingUtils.testBit(__isset_bitfield, __WRITEID_ISSET_ID);
+  }
+
+  public void setWriteIdIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITEID_ISSET_ID, value);
+  }
+
+  public String getValidWriteIdList() {
+    return this.validWriteIdList;
+  }
+
+  public void setValidWriteIdList(String validWriteIdList) {
+    this.validWriteIdList = validWriteIdList;
+  }
+
+  public void unsetValidWriteIdList() {
+    this.validWriteIdList = null;
+  }
+
+  /** Returns true if field validWriteIdList is set (has been assigned a value) and false otherwise */
+  public boolean isSetValidWriteIdList() {
+    return this.validWriteIdList != null;
+  }
+
+  public void setValidWriteIdListIsSet(boolean value) {
+    if (!value) {
+      this.validWriteIdList = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case CAT_NAME:
+      if (value == null) {
+        unsetCatName();
+      } else {
+        setCatName((String)value);
+      }
+      break;
+
+    case DB_NAME:
+      if (value == null) {
+        unsetDbName();
+      } else {
+        setDbName((String)value);
+      }
+      break;
+
+    case TABLE_NAME:
+      if (value == null) {
+        unsetTableName();
+      } else {
+        setTableName((String)value);
+      }
+      break;
+
+    case TABLE:
+      if (value == null) {
+        unsetTable();
+      } else {
+        setTable((Table)value);
+      }
+      break;
+
+    case ENVIRONMENT_CONTEXT:
+      if (value == null) {
+        unsetEnvironmentContext();
+      } else {
+        setEnvironmentContext((EnvironmentContext)value);
+      }
+      break;
+
+    case TXN_ID:
+      if (value == null) {
+        unsetTxnId();
+      } else {
+        setTxnId((Long)value);
+      }
+      break;
+
+    case WRITE_ID:
+      if (value == null) {
+        unsetWriteId();
+      } else {
+        setWriteId((Long)value);
+      }
+      break;
+
+    case VALID_WRITE_ID_LIST:
+      if (value == null) {
+        unsetValidWriteIdList();
+      } else {
+        setValidWriteIdList((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case CAT_NAME:
+      return getCatName();
+
+    case DB_NAME:
+      return getDbName();
+
+    case TABLE_NAME:
+      return getTableName();
+
+    case TABLE:
+      return getTable();
+
+    case ENVIRONMENT_CONTEXT:
+      return getEnvironmentContext();
+
+    case TXN_ID:
+      return getTxnId();
+
+    case WRITE_ID:
+      return getWriteId();
+
+    case VALID_WRITE_ID_LIST:
+      return getValidWriteIdList();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case CAT_NAME:
+      return isSetCatName();
+    case DB_NAME:
+      return isSetDbName();
+    case TABLE_NAME:
+      return isSetTableName();
+    case TABLE:
+      return isSetTable();
+    case ENVIRONMENT_CONTEXT:
+      return isSetEnvironmentContext();
+    case TXN_ID:
+      return isSetTxnId();
+    case WRITE_ID:
+      return isSetWriteId();
+    case VALID_WRITE_ID_LIST:
+      return isSetValidWriteIdList();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof AlterTableRequest)
+      return this.equals((AlterTableRequest)that);
+    return false;
+  }
+
+  public boolean equals(AlterTableRequest that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_catName = true && this.isSetCatName();
+    boolean that_present_catName = true && that.isSetCatName();
+    if (this_present_catName || that_present_catName) {
+      if (!(this_present_catName && that_present_catName))
+        return false;
+      if (!this.catName.equals(that.catName))
+        return false;
+    }
+
+    boolean this_present_dbName = true && this.isSetDbName();
+    boolean that_present_dbName = true && that.isSetDbName();
+    if (this_present_dbName || that_present_dbName) {
+      if (!(this_present_dbName && that_present_dbName))
+        return false;
+      if (!this.dbName.equals(that.dbName))
+        return false;
+    }
+
+    boolean this_present_tableName = true && this.isSetTableName();
+    boolean that_present_tableName = true && that.isSetTableName();
+    if (this_present_tableName || that_present_tableName) {
+      if (!(this_present_tableName && that_present_tableName))
+        return false;
+      if (!this.tableName.equals(that.tableName))
+        return false;
+    }
+
+    boolean this_present_table = true && this.isSetTable();
+    boolean that_present_table = true && that.isSetTable();
+    if (this_present_table || that_present_table) {
+      if (!(this_present_table && that_present_table))
+        return false;
+      if (!this.table.equals(that.table))
+        return false;
+    }
+
+    boolean this_present_environmentContext = true && this.isSetEnvironmentContext();
+    boolean that_present_environmentContext = true && that.isSetEnvironmentContext();
+    if (this_present_environmentContext || that_present_environmentContext) {
+      if (!(this_present_environmentContext && that_present_environmentContext))
+        return false;
+      if (!this.environmentContext.equals(that.environmentContext))
+        return false;
+    }
+
+    boolean this_present_txnId = true && this.isSetTxnId();
+    boolean that_present_txnId = true && that.isSetTxnId();
+    if (this_present_txnId || that_present_txnId) {
+      if (!(this_present_txnId && that_present_txnId))
+        return false;
+      if (this.txnId != that.txnId)
+        return false;
+    }
+
+    boolean this_present_writeId = true && this.isSetWriteId();
+    boolean that_present_writeId = true && that.isSetWriteId();
+    if (this_present_writeId || that_present_writeId) {
+      if (!(this_present_writeId && that_present_writeId))
+        return false;
+      if (this.writeId != that.writeId)
+        return false;
+    }
+
+    boolean this_present_validWriteIdList = true && this.isSetValidWriteIdList();
+    boolean that_present_validWriteIdList = true && that.isSetValidWriteIdList();
+    if (this_present_validWriteIdList || that_present_validWriteIdList) {
+      if (!(this_present_validWriteIdList && that_present_validWriteIdList))
+        return false;
+      if (!this.validWriteIdList.equals(that.validWriteIdList))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_catName = true && (isSetCatName());
+    list.add(present_catName);
+    if (present_catName)
+      list.add(catName);
+
+    boolean present_dbName = true && (isSetDbName());
+    list.add(present_dbName);
+    if (present_dbName)
+      list.add(dbName);
+
+    boolean present_tableName = true && (isSetTableName());
+    list.add(present_tableName);
+    if (present_tableName)
+      list.add(tableName);
+
+    boolean present_table = true && (isSetTable());
+    list.add(present_table);
+    if (present_table)
+      list.add(table);
+
+    boolean present_environmentContext = true && (isSetEnvironmentContext());
+    list.add(present_environmentContext);
+    if (present_environmentContext)
+      list.add(environmentContext);
+
+    boolean present_txnId = true && (isSetTxnId());
+    list.add(present_txnId);
+    if (present_txnId)
+      list.add(txnId);
+
+    boolean present_writeId = true && (isSetWriteId());
+    list.add(present_writeId);
+    if (present_writeId)
+      list.add(writeId);
+
+    boolean present_validWriteIdList = true && (isSetValidWriteIdList());
+    list.add(present_validWriteIdList);
+    if (present_validWriteIdList)
+      list.add(validWriteIdList);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(AlterTableRequest other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCatName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDbName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTableName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTable()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetEnvironmentContext()).compareTo(other.isSetEnvironmentContext());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetEnvironmentContext()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environmentContext, other.environmentContext);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(other.isSetTxnId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTxnId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, other.txnId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetWriteId()).compareTo(other.isSetWriteId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetWriteId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeId, other.writeId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetValidWriteIdList()).compareTo(other.isSetValidWriteIdList());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetValidWriteIdList()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validWriteIdList, other.validWriteIdList);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("AlterTableRequest(");
+    boolean first = true;
+
+    if (isSetCatName()) {
+      sb.append("catName:");
+      if (this.catName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.catName);
+      }
+      first = false;
+    }
+    if (!first) sb.append(", ");
+    sb.append("dbName:");
+    if (this.dbName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.dbName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("tableName:");
+    if (this.tableName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.tableName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("table:");
+    if (this.table == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.table);
+    }
+    first = false;
+    if (isSetEnvironmentContext()) {
+      if (!first) sb.append(", ");
+      sb.append("environmentContext:");
+      if (this.environmentContext == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.environmentContext);
+      }
+      first = false;
+    }
+    if (isSetTxnId()) {
+      if (!first) sb.append(", ");
+      sb.append("txnId:");
+      sb.append(this.txnId);
+      first = false;
+    }
+    if (isSetWriteId()) {
+      if (!first) sb.append(", ");
+      sb.append("writeId:");
+      sb.append(this.writeId);
+      first = false;
+    }
+    if (isSetValidWriteIdList()) {
+      if (!first) sb.append(", ");
+      sb.append("validWriteIdList:");
+      if (this.validWriteIdList == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.validWriteIdList);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetDbName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString());
+    }
+
+    if (!isSetTableName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString());
+    }
+
+    if (!isSetTable()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+    if (table != null) {
+      table.validate();
+    }
+    if (environmentContext != null) {
+      environmentContext.validate();
+    }
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  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);
+    }
+  }
+
+  private static class AlterTableRequestStandardSchemeFactory implements SchemeFactory {
+    public AlterTableRequestStandardScheme getScheme() {
+      return new AlterTableRequestStandardScheme();
+    }
+  }
+
+  private static class AlterTableRequestStandardScheme extends StandardScheme<AlterTableRequest> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, AlterTableRequest struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // CAT_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.catName = iprot.readString();
+              struct.setCatNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DB_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.dbName = iprot.readString();
+              struct.setDbNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // TABLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tableName = iprot.readString();
+              struct.setTableNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TABLE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.table = new Table();
+              struct.table.read(iprot);
+              struct.setTableIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // ENVIRONMENT_CONTEXT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.environmentContext = new EnvironmentContext();
+              struct.environmentContext.read(iprot);
+              struct.setEnvironmentContextIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // TXN_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.txnId = iprot.readI64();
+              struct.setTxnIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // WRITE_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.writeId = iprot.readI64();
+              struct.setWriteIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // VALID_WRITE_ID_LIST
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.validWriteIdList = iprot.readString();
+              struct.setValidWriteIdListIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, AlterTableRequest struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.catName != null) {
+        if (struct.isSetCatName()) {
+          oprot.writeFieldBegin(CAT_NAME_FIELD_DESC);
+          oprot.writeString(struct.catName);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.dbName != null) {
+        oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+        oprot.writeString(struct.dbName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.tableName != null) {
+        oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.tableName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.table != null) {
+        oprot.writeFieldBegin(TABLE_FIELD_DESC);
+        struct.table.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.environmentContext != null) {
+        if (struct.isSetEnvironmentContext()) {
+          oprot.writeFieldBegin(ENVIRONMENT_CONTEXT_FIELD_DESC);
+          struct.environmentContext.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.isSetTxnId()) {
+        oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
+        oprot.writeI64(struct.txnId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetWriteId()) {
+        oprot.writeFieldBegin(WRITE_ID_FIELD_DESC);
+        oprot.writeI64(struct.writeId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.validWriteIdList != null) {
+        if (struct.isSetValidWriteIdList()) {
+          oprot.writeFieldBegin(VALID_WRITE_ID_LIST_FIELD_DESC);
+          oprot.writeString(struct.validWriteIdList);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class AlterTableRequestTupleSchemeFactory implements SchemeFactory {
+    public AlterTableRequestTupleScheme getScheme() {
+      return new AlterTableRequestTupleScheme();
+    }
+  }
+
+  private static class AlterTableRequestTupleScheme extends TupleScheme<AlterTableRequest> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, AlterTableRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.dbName);
+      oprot.writeString(struct.tableName);
+      struct.table.write(oprot);
+      BitSet optionals = new BitSet();
+      if (struct.isSetCatName()) {
+        optionals.set(0);
+      }
+      if (struct.isSetEnvironmentContext()) {
+        optionals.set(1);
+      }
+      if (struct.isSetTxnId()) {
+        optionals.set(2);
+      }
+      if (struct.isSetWriteId()) {
+        optionals.set(3);
+      }
+      if (struct.isSetValidWriteIdList()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetCatName()) {
+        oprot.writeString(struct.catName);
+      }
+      if (struct.isSetEnvironmentContext()) {
+        struct.environmentContext.write(oprot);
+      }
+      if (struct.isSetTxnId()) {
+        oprot.writeI64(struct.txnId);
+      }
+      if (struct.isSetWriteId()) {
+        oprot.writeI64(struct.writeId);
+      }
+      if (struct.isSetValidWriteIdList()) {
+        oprot.writeString(struct.validWriteIdList);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, AlterTableRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.dbName = iprot.readString();
+      struct.setDbNameIsSet(true);
+      struct.tableName = iprot.readString();
+      struct.setTableNameIsSet(true);
+      struct.table = new Table();
+      struct.table.read(iprot);
+      struct.setTableIsSet(true);
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.catName = iprot.readString();
+        struct.setCatNameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.environmentContext = new EnvironmentContext();
+        struct.environmentContext.read(iprot);
+        struct.setEnvironmentContextIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.txnId = iprot.readI64();
+        struct.setTxnIdIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.writeId = iprot.readI64();
+        struct.setWriteIdIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.validWriteIdList = iprot.readString();
+        struct.setValidWriteIdListIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterTableResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterTableResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterTableResponse.java
new file mode 100644
index 0000000..d3817ca
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AlterTableResponse.java
@@ -0,0 +1,283 @@
+/**
+ * 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 org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class AlterTableResponse implements org.apache.thrift.TBase<AlterTableResponse, AlterTableResponse._Fields>, java.io.Serializable, Cloneable, Comparable<AlterTableResponse> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlterTableResponse");
+
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new AlterTableResponseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new AlterTableResponseTupleSchemeFactory());
+  }
+
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+  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);
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlterTableResponse.class, metaDataMap);
+  }
+
+  public AlterTableResponse() {
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public AlterTableResponse(AlterTableResponse other) {
+  }
+
+  public AlterTableResponse deepCopy() {
+    return new AlterTableResponse(this);
+  }
+
+  @Override
+  public void clear() {
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof AlterTableResponse)
+      return this.equals((AlterTableResponse)that);
+    return false;
+  }
+
+  public boolean equals(AlterTableResponse that) {
+    if (that == null)
+      return false;
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(AlterTableResponse other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("AlterTableResponse(");
+    boolean first = true;
+
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      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);
+    }
+  }
+
+  private static class AlterTableResponseStandardSchemeFactory implements SchemeFactory {
+    public AlterTableResponseStandardScheme getScheme() {
+      return new AlterTableResponseStandardScheme();
+    }
+  }
+
+  private static class AlterTableResponseStandardScheme extends StandardScheme<AlterTableResponse> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, AlterTableResponse struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, AlterTableResponse struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class AlterTableResponseTupleSchemeFactory implements SchemeFactory {
+    public AlterTableResponseTupleScheme getScheme() {
+      return new AlterTableResponseTupleScheme();
+    }
+  }
+
+  private static class AlterTableResponseTupleScheme extends TupleScheme<AlterTableResponse> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, AlterTableResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, AlterTableResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckConstraintsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckConstraintsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckConstraintsResponse.java
index 8d4f7be..6858205 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckConstraintsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckConstraintsResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // CHECK_CONSTRAINTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list360 = iprot.readListBegin();
-                struct.checkConstraints = new ArrayList<SQLCheckConstraint>(_list360.size);
-                SQLCheckConstraint _elem361;
-                for (int _i362 = 0; _i362 < _list360.size; ++_i362)
+                org.apache.thrift.protocol.TList _list368 = iprot.readListBegin();
+                struct.checkConstraints = new ArrayList<SQLCheckConstraint>(_list368.size);
+                SQLCheckConstraint _elem369;
+                for (int _i370 = 0; _i370 < _list368.size; ++_i370)
                 {
-                  _elem361 = new SQLCheckConstraint();
-                  _elem361.read(iprot);
-                  struct.checkConstraints.add(_elem361);
+                  _elem369 = new SQLCheckConstraint();
+                  _elem369.read(iprot);
+                  struct.checkConstraints.add(_elem369);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(CHECK_CONSTRAINTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.checkConstraints.size()));
-          for (SQLCheckConstraint _iter363 : struct.checkConstraints)
+          for (SQLCheckConstraint _iter371 : struct.checkConstraints)
           {
-            _iter363.write(oprot);
+            _iter371.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.checkConstraints.size());
-        for (SQLCheckConstraint _iter364 : struct.checkConstraints)
+        for (SQLCheckConstraint _iter372 : struct.checkConstraints)
         {
-          _iter364.write(oprot);
+          _iter372.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, CheckConstraintsResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list365 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.checkConstraints = new ArrayList<SQLCheckConstraint>(_list365.size);
-        SQLCheckConstraint _elem366;
-        for (int _i367 = 0; _i367 < _list365.size; ++_i367)
+        org.apache.thrift.protocol.TList _list373 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.checkConstraints = new ArrayList<SQLCheckConstraint>(_list373.size);
+        SQLCheckConstraint _elem374;
+        for (int _i375 = 0; _i375 < _list373.size; ++_i375)
         {
-          _elem366 = new SQLCheckConstraint();
-          _elem366.read(iprot);
-          struct.checkConstraints.add(_elem366);
+          _elem374 = new SQLCheckConstraint();
+          _elem374.read(iprot);
+          struct.checkConstraints.add(_elem374);
         }
       }
       struct.setCheckConstraintsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
index 1af1628..3fdd295 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
@@ -351,13 +351,13 @@ import org.slf4j.LoggerFactory;
           case 1: // FILE_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list824 = iprot.readListBegin();
-                struct.fileIds = new ArrayList<Long>(_list824.size);
-                long _elem825;
-                for (int _i826 = 0; _i826 < _list824.size; ++_i826)
+                org.apache.thrift.protocol.TList _list832 = iprot.readListBegin();
+                struct.fileIds = new ArrayList<Long>(_list832.size);
+                long _elem833;
+                for (int _i834 = 0; _i834 < _list832.size; ++_i834)
                 {
-                  _elem825 = iprot.readI64();
-                  struct.fileIds.add(_elem825);
+                  _elem833 = iprot.readI64();
+                  struct.fileIds.add(_elem833);
                 }
                 iprot.readListEnd();
               }
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
-          for (long _iter827 : struct.fileIds)
+          for (long _iter835 : struct.fileIds)
           {
-            oprot.writeI64(_iter827);
+            oprot.writeI64(_iter835);
           }
           oprot.writeListEnd();
         }
@@ -410,9 +410,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.fileIds.size());
-        for (long _iter828 : struct.fileIds)
+        for (long _iter836 : struct.fileIds)
         {
-          oprot.writeI64(_iter828);
+          oprot.writeI64(_iter836);
         }
       }
     }
@@ -421,13 +421,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list829 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.fileIds = new ArrayList<Long>(_list829.size);
-        long _elem830;
-        for (int _i831 = 0; _i831 < _list829.size; ++_i831)
+        org.apache.thrift.protocol.TList _list837 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.fileIds = new ArrayList<Long>(_list837.size);
+        long _elem838;
+        for (int _i839 = 0; _i839 < _list837.size; ++_i839)
         {
-          _elem830 = iprot.readI64();
-          struct.fileIds.add(_elem830);
+          _elem838 = iprot.readI64();
+          struct.fileIds.add(_elem838);
         }
       }
       struct.setFileIdsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java
index 4cd04f1..f5c9582 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java
@@ -354,13 +354,13 @@ import org.slf4j.LoggerFactory;
           case 1: // VALUES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list840 = iprot.readListBegin();
-                struct.values = new ArrayList<ClientCapability>(_list840.size);
-                ClientCapability _elem841;
-                for (int _i842 = 0; _i842 < _list840.size; ++_i842)
+                org.apache.thrift.protocol.TList _list848 = iprot.readListBegin();
+                struct.values = new ArrayList<ClientCapability>(_list848.size);
+                ClientCapability _elem849;
+                for (int _i850 = 0; _i850 < _list848.size; ++_i850)
                 {
-                  _elem841 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32());
-                  struct.values.add(_elem841);
+                  _elem849 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32());
+                  struct.values.add(_elem849);
                 }
                 iprot.readListEnd();
               }
@@ -386,9 +386,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(VALUES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.values.size()));
-          for (ClientCapability _iter843 : struct.values)
+          for (ClientCapability _iter851 : struct.values)
           {
-            oprot.writeI32(_iter843.getValue());
+            oprot.writeI32(_iter851.getValue());
           }
           oprot.writeListEnd();
         }
@@ -413,9 +413,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.values.size());
-        for (ClientCapability _iter844 : struct.values)
+        for (ClientCapability _iter852 : struct.values)
         {
-          oprot.writeI32(_iter844.getValue());
+          oprot.writeI32(_iter852.getValue());
         }
       }
     }
@@ -424,13 +424,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, ClientCapabilities struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list845 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
-        struct.values = new ArrayList<ClientCapability>(_list845.size);
-        ClientCapability _elem846;
-        for (int _i847 = 0; _i847 < _list845.size; ++_i847)
+        org.apache.thrift.protocol.TList _list853 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
+        struct.values = new ArrayList<ClientCapability>(_list853.size);
+        ClientCapability _elem854;
+        for (int _i855 = 0; _i855 < _list853.size; ++_i855)
         {
-          _elem846 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32());
-          struct.values.add(_elem846);
+          _elem854 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32());
+          struct.values.add(_elem854);
         }
       }
       struct.setValuesIsSet(true);


[19/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java b/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
index bb181a1..838d277 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUpdaterThread.java
@@ -36,6 +36,7 @@ import org.apache.hadoop.hive.common.TableName;
 import org.apache.hadoop.hive.common.ValidReaderWriteIdList;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.MetaStoreThread;
+import org.apache.hadoop.hive.metastore.ObjectStore;
 import org.apache.hadoop.hive.metastore.RawStore;
 import org.apache.hadoop.hive.metastore.RawStoreProxy;
 import org.apache.hadoop.hive.metastore.Warehouse;
@@ -214,11 +215,17 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
     String skipParam = table.getParameters().get(SKIP_STATS_AUTOUPDATE_PROPERTY);
     if ("true".equalsIgnoreCase(skipParam)) return null;
 
-    // TODO: when txn stats are implemented, use writeIds to determine stats accuracy
-    @SuppressWarnings("unused")
-    ValidReaderWriteIdList writeIds = null;
-    if (AcidUtils.isTransactionalTable(table)) {
-      writeIds = getWriteIds(fullTableName);
+    // Note: ideally we should take a lock here to pretend to be a real reader.
+    //       For now, this check is going to have race potential; it may run a spurious analyze.
+    String writeIdString = null;
+    boolean isTxn = AcidUtils.isTransactionalTable(table);
+    if (isTxn) {
+      ValidReaderWriteIdList writeIds = getWriteIds(fullTableName);
+      if (writeIds == null) {
+        LOG.error("Cannot get writeIds for transactional table " + fullTableName + "; skipping");
+        return null;
+      }
+      writeIdString = writeIds.writeToString();
     }
     List<String> allCols = new ArrayList<>(table.getSd().getColsSize());
     for (FieldSchema fs : table.getSd().getCols()) {
@@ -227,9 +234,16 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
     Collections.sort(allCols);
     if (table.getPartitionKeysSize() == 0) {
       Map<String, String> params = table.getParameters();
-      List<String> colsToUpdate = isExistingOnly
-          ? getExistingNonPartTableStatsToUpdate(fullTableName, cat, db, tbl, params, allCols)
-          : getAnyStatsToUpdate(allCols, params);
+      List<String> colsToUpdate = null;
+      long writeId = isTxn ? table.getWriteId() : -1;
+      if (isExistingOnly) {
+        // Get the existing stats, including the txn state if any, to see if we need to update.
+        colsToUpdate = getExistingNonPartTableStatsToUpdate(
+            fullTableName, cat, db, tbl, params, writeId, allCols, writeIdString);
+      } else {
+        colsToUpdate = getAnyStatsToUpdate(db, tbl, allCols, params, writeId, writeIdString);
+      }
+
       LOG.debug("Columns to update are {}; existing only: {}, out of: {} based on {}",
           colsToUpdate, isExistingOnly, allCols, params);
 
@@ -241,7 +255,7 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
     } else {
       Map<String, List<String>> partsToAnalyze = new HashMap<>();
       List<String> colsForAllParts = findPartitionsToAnalyze(
-          fullTableName, cat, db, tbl, allCols, partsToAnalyze);
+          fullTableName, cat, db, tbl, allCols, partsToAnalyze, writeIdString);
       LOG.debug("Columns to update are {} for all partitions; {} individual partitions."
           + " Existing only: {}, out of: {}", colsForAllParts, partsToAnalyze.size(),
           isExistingOnly, allCols);
@@ -263,18 +277,30 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
   }
 
   private List<String> findPartitionsToAnalyze(TableName fullTableName, String cat, String db,
-      String tbl, List<String> allCols, Map<String, List<String>> partsToAnalyze)
-          throws MetaException, NoSuchObjectException {
+      String tbl, List<String> allCols, Map<String, List<String>> partsToAnalyze,
+      String writeIdString) throws MetaException, NoSuchObjectException {
     // TODO: ideally when col-stats-accurate stuff is stored in some sane structure, this should
-    //       to retrieve partsToUpdate in a single query; no checking partition params in java.
+    //       retrieve partsToUpdate in a single query; no checking partition params in java.
     List<String> partNames = null;
     Map<String, List<String>> colsPerPartition = null;
     boolean isAllParts = true;
     if (isExistingOnly) {
-      colsPerPartition = rs.getPartitionColsWithStats(cat, db, tbl);
-      partNames = Lists.newArrayList(colsPerPartition.keySet());
-      int partitionCount = rs.getNumPartitionsByFilter(cat, db, tbl, "");
-      isAllParts = partitionCount == partNames.size();
+      // Make sure the number of partitions we get, and the number of stats objects, is consistent.
+      rs.openTransaction();
+      boolean isOk = false;
+      try {
+        colsPerPartition = rs.getPartitionColsWithStats(cat, db, tbl);
+        partNames = Lists.newArrayList(colsPerPartition.keySet());
+        int partitionCount = rs.getNumPartitionsByFilter(cat, db, tbl, "");
+        isAllParts = partitionCount == partNames.size();
+        isOk = true;
+      } finally {
+        if (isOk) {
+          rs.commitTransaction();
+        } else {
+          rs.rollbackTransaction();
+        }
+      }
     } else {
       partNames = rs.listPartitionNames(cat, db, tbl, (short) -1);
       isAllParts = true;
@@ -326,9 +352,10 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
         colsToMaybeUpdate = colsPerPartition.get(partName);
         Collections.sort(colsToMaybeUpdate);
       }
-      List<String> colsToUpdate = getAnyStatsToUpdate(colsToMaybeUpdate, params);
-      LOG.debug("Updating {} based on {} and {}", colsToUpdate, colsToMaybeUpdate, params);
+      List<String> colsToUpdate = getAnyStatsToUpdate(db, tbl, colsToMaybeUpdate, params,
+          writeIdString == null ? -1 : part.getWriteId(), writeIdString);
 
+      LOG.debug("Updating {} based on {} and {}", colsToUpdate, colsToMaybeUpdate, params);
 
       if (colsToUpdate == null || colsToUpdate.isEmpty()) {
         if (isAllParts) {
@@ -405,8 +432,8 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
   }
 
   private List<String> getExistingNonPartTableStatsToUpdate(TableName fullTableName,
-      String cat, String db, String tbl, Map<String, String> params,
-      List<String> allCols) throws MetaException {
+      String cat, String db, String tbl, Map<String, String> params, long statsWriteId,
+      List<String> allCols, String writeIdString) throws MetaException {
     ColumnStatistics existingStats = null;
     try {
       // Note: this should NOT do txn verification - we want to get outdated stats, to
@@ -416,12 +443,15 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
       LOG.error("Cannot retrieve existing stats, skipping " + fullTableName, e);
       return null;
     }
-    return getExistingStatsToUpdate(existingStats, params);
+    // TODO: we should probably skip updating if writeId is from an active txn
+    boolean isTxnValid = (writeIdString == null) || ObjectStore.isCurrentStatsValidForTheQuery(
+        conf, db, tbl, params, statsWriteId , 0, writeIdString, false);
+    return getExistingStatsToUpdate(existingStats, params, isTxnValid);
   }
 
   private List<String> getExistingStatsToUpdate(
-      ColumnStatistics existingStats, Map<String, String> params) {
-    boolean hasAnyAccurate = StatsSetupConst.areBasicStatsUptoDate(params);
+      ColumnStatistics existingStats, Map<String, String> params, boolean isTxnValid) {
+    boolean hasAnyAccurate = isTxnValid && StatsSetupConst.areBasicStatsUptoDate(params);
     List<String> colsToUpdate = new ArrayList<>();
     for (ColumnStatisticsObj obj : existingStats.getStatsObj()) {
       String col = obj.getColName();
@@ -432,12 +462,17 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
     return colsToUpdate;
   }
 
-  private List<String> getAnyStatsToUpdate(
-      List<String> allCols, Map<String, String> params) {
+  private List<String> getAnyStatsToUpdate(String db, String tbl, List<String> allCols,
+      Map<String, String> params, long statsWriteId, String writeIdString) throws MetaException {
     // Note: we only run "for columns" command and assume no basic stats means no col stats.
     if (!StatsSetupConst.areBasicStatsUptoDate(params)) {
       return allCols;
     }
+    // TODO: we should probably skip updating if writeId is from an active txn
+    if (writeIdString != null && !ObjectStore.isCurrentStatsValidForTheQuery(
+        conf, db, tbl, params, statsWriteId, 0, writeIdString, false)) {
+      return allCols;
+    }
     List<String> colsToUpdate = new ArrayList<>();
     for (String col : allCols) {
       if (!StatsSetupConst.areColumnStatsUptoDate(params, col)) {
@@ -460,8 +495,9 @@ public class StatsUpdaterThread extends Thread implements MetaStoreThread {
 
   private ValidReaderWriteIdList getWriteIds(
       TableName fullTableName) throws NoSuchTxnException, MetaException {
-    GetValidWriteIdsRequest req = new GetValidWriteIdsRequest();
-    req.setFullTableNames(Lists.newArrayList(fullTableName.toString()));
+    // TODO: acid utils don't support catalogs
+    GetValidWriteIdsRequest req = new GetValidWriteIdsRequest(
+        Lists.newArrayList(fullTableName.getDbTable()), null);
     return TxnUtils.createValidReaderWriteIdList(
         txnHandler.getValidWriteIds(req).getTblValidWriteIds().get(0));
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/org/apache/hadoop/hive/ql/TestTxnConcatenate.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnConcatenate.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnConcatenate.java
index 0e436e1..5b8ff15 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnConcatenate.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnConcatenate.java
@@ -219,7 +219,7 @@ public class TestTxnConcatenate extends TxnCommandsBaseForTests {
         "select count(*) from COMPACTION_QUEUE where CQ_TABLE='s'"));
     Assert.assertEquals(1, TxnDbUtil.countQueryAgent(hiveConf,
         "select count(*) from WRITE_SET where WS_TABLE='s'"));
-    Assert.assertEquals(2, TxnDbUtil.countQueryAgent(hiveConf,
+    Assert.assertEquals(3, TxnDbUtil.countQueryAgent(hiveConf,
         "select count(*) from TXN_TO_WRITE_ID where T2W_TABLE='s'"));
     Assert.assertEquals(1, TxnDbUtil.countQueryAgent(hiveConf,
         "select count(*) from NEXT_WRITE_ID where NWI_TABLE='s'"));
@@ -234,7 +234,7 @@ public class TestTxnConcatenate extends TxnCommandsBaseForTests {
             "select count(*) from COMPACTION_QUEUE where CQ_TABLE='bar'"));
     Assert.assertEquals(1, TxnDbUtil.countQueryAgent(hiveConf,
             "select count(*) from WRITE_SET where WS_TABLE='bar'"));
-    Assert.assertEquals(2, TxnDbUtil.countQueryAgent(hiveConf,
+    Assert.assertEquals(4, TxnDbUtil.countQueryAgent(hiveConf,
             "select count(*) from TXN_TO_WRITE_ID where T2W_TABLE='bar'"));
     Assert.assertEquals(1, TxnDbUtil.countQueryAgent(hiveConf,
             "select count(*) from NEXT_WRITE_ID where NWI_TABLE='bar'"));

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
index bbe9d5a..2c98e3c 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnNoBuckets.java
@@ -448,7 +448,7 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
         {"{\"writeid\":0,\"bucketid\":536870912,\"rowid\":4}\t20\t40", "warehouse/t/HIVE_UNION_SUBDIR_15/000000_0"},
         {"{\"writeid\":0,\"bucketid\":536870912,\"rowid\":5}\t50\t60", "warehouse/t/HIVE_UNION_SUBDIR_16/000000_0"},
         // update for "{\"writeid\":0,\"bucketid\":536936448,\"rowid\":1}\t60\t80"
-        {"{\"writeid\":10000001,\"bucketid\":536936448,\"rowid\":0}\t60\t88", "warehouse/t/delta_10000001_10000001_0000/bucket_00001"}, 
+        {"{\"writeid\":10000001,\"bucketid\":536936448,\"rowid\":0}\t60\t88", "warehouse/t/delta_10000001_10000001_0000/bucket_00001"},
     };
     rs = runStatementOnDriver("select ROW__ID, a, b, INPUT__FILE__NAME from T order by a, b, INPUT__FILE__NAME");
     checkExpected(rs, expected3,"after converting to acid (no compaction with updates)");
@@ -783,12 +783,12 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
     String[][] expected = {
         {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t4\t1", "t/p=1/q=1/delta_0000001_0000001_0000/bucket_00000"},
         {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t4\t3", "t/p=1/q=1/delta_0000001_0000001_0000/bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t5\t1", "t/p=1/q=1/delta_0000002_0000002_0000/bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t5\t3", "t/p=1/q=1/delta_0000002_0000002_0000/bucket_00000"},
+        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t5\t1", "t/p=1/q=1/delta_0000003_0000003_0000/bucket_00000"},
+        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t5\t3", "t/p=1/q=1/delta_0000003_0000003_0000/bucket_00000"},
         {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t4\t2", "t/p=1/q=2/delta_0000001_0000001_0000/bucket_00000"},
         {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4\t4", "t/p=1/q=2/delta_0000001_0000001_0000/bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t5\t2", "t/p=1/q=2/delta_0000002_0000002_0000/bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t5\t4", "t/p=1/q=2/delta_0000002_0000002_0000/bucket_00000"}
+        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t5\t2", "t/p=1/q=2/delta_0000003_0000003_0000/bucket_00000"},
+        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t5\t4", "t/p=1/q=2/delta_0000003_0000003_0000/bucket_00000"}
     };
     checkExpected(rs, expected, "insert data");
 
@@ -801,12 +801,12 @@ ekoifman:apache-hive-3.0.0-SNAPSHOT-bin ekoifman$ tree /Users/ekoifman/dev/hiver
     String[][] expected2 = {
         {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t4\t1", "t/p=1/q=1/delta_0000001_0000001_0000/bucket_00000"},
         {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t4\t3", "t/p=1/q=1/delta_0000001_0000001_0000/bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t5\t1", "t/p=1/q=1/delta_0000002_0000002_0000/bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t5\t3", "t/p=1/q=1/delta_0000002_0000002_0000/bucket_00000"},
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t4\t2", "t/p=1/q=2/base_0000002/bucket_00000"},
-        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4\t4", "t/p=1/q=2/base_0000002/bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t5\t2", "t/p=1/q=2/base_0000002/bucket_00000"},
-        {"{\"writeid\":2,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t5\t4", "t/p=1/q=2/base_0000002/bucket_00000"}
+        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":0}\t1\t1\t5\t1", "t/p=1/q=1/delta_0000003_0000003_0000/bucket_00000"},
+        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":1}\t1\t1\t5\t3", "t/p=1/q=1/delta_0000003_0000003_0000/bucket_00000"},
+        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t4\t2", "t/p=1/q=2/base_0000003/bucket_00000"},
+        {"{\"writeid\":1,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t4\t4", "t/p=1/q=2/base_0000003/bucket_00000"},
+        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":0}\t1\t2\t5\t2", "t/p=1/q=2/base_0000003/bucket_00000"},
+        {"{\"writeid\":3,\"bucketid\":536870912,\"rowid\":1}\t1\t2\t5\t4", "t/p=1/q=2/base_0000003/bucket_00000"}
     };
     checkExpected(rs, expected2, "after major compaction");
 

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java b/ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java
index 7319ba0..a2fafca 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TxnCommandsBaseForTests.java
@@ -225,7 +225,7 @@ public abstract class TxnCommandsBaseForTests {
         expected.length, rs.size());
     //verify data and layout
     for(int i = 0; i < expected.length; i++) {
-      Assert.assertTrue("Actual line (data) " + i + " data: " + rs.get(i), rs.get(i).startsWith(expected[i][0]));
+      Assert.assertTrue("Actual line (data) " + i + " data: " + rs.get(i) + "; expected " + expected[i][0], rs.get(i).startsWith(expected[i][0]));
       if(checkFileName) {
         Assert.assertTrue("Actual line(file) " + i + " file: " + rs.get(i), rs.get(i).endsWith(expected[i][1]));
       }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java b/ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java
index d30bbde..ca4d36f 100755
--- a/ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java
@@ -325,8 +325,10 @@ public class TestHive extends TestCase {
       tbl.getParameters().put(hive_metastoreConstants.DDL_TIME,
           ft.getParameters().get(hive_metastoreConstants.DDL_TIME));
       // Txn stuff set by metastore
-      if (tbl.getTTable().isSetWriteId()) {
-        ft.getTTable().setWriteId(tbl.getTTable().getWriteId());
+      if (tbl.getTTable().isSetWriteId() != ft.getTTable().isSetWriteId()) {
+        // No need to compare this field.
+        ft.getTTable().setWriteId(0);
+        tbl.getTTable().setWriteId(0);
       }
       assertTrue("Tables  doesn't match: " + tableName + " (" + ft.getTTable()
           + "; " + tbl.getTTable() + ")", ft.getTTable().equals(tbl.getTTable()));

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/org/apache/hadoop/hive/ql/stats/TestStatsUpdaterThread.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/stats/TestStatsUpdaterThread.java b/ql/src/test/org/apache/hadoop/hive/ql/stats/TestStatsUpdaterThread.java
index 14f86ea..6c768c0 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/stats/TestStatsUpdaterThread.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/stats/TestStatsUpdaterThread.java
@@ -29,9 +29,11 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.curator.shaded.com.google.common.collect.Lists;
 import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.hive.common.StatsSetupConst;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
+import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj;
 import org.apache.hadoop.hive.metastore.api.EnvironmentContext;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.api.Partition;
@@ -140,6 +142,148 @@ public class TestStatsUpdaterThread {
     msClient.close();
   }
 
+  @Test(timeout=80000)
+  public void testTxnTable() throws Exception {
+    StatsUpdaterThread su = createUpdater();
+    IMetaStoreClient msClient = new HiveMetaStoreClient(hiveConf);
+
+    executeQuery("create table simple_stats (s string) TBLPROPERTIES "
+        + "(\"transactional\"=\"true\", \"transactional_properties\"=\"insert_only\")");
+    executeQuery("insert into simple_stats (s) values ('test')");
+    List<String> cols = Lists.newArrayList("s");
+    String dbName = ss.getCurrentDatabase(), tblName = "simple_stats", fqName = dbName + "." + tblName;
+    ValidWriteIdList initialWriteIds = msClient.getValidWriteIds(fqName);
+    verifyStatsUpToDate(tblName, cols, msClient, 0, initialWriteIds.toString(), true);
+    assertFalse(su.runOneIteration());
+    drainWorkQueue(su, 0);
+
+    executeQuery("insert overwrite table simple_stats values ('test2')");
+    ValidWriteIdList nextWriteIds = msClient.getValidWriteIds(fqName);
+    verifyStatsUpToDate(tblName, cols, msClient, 0, nextWriteIds.toString(), true);
+    assertFalse(su.runOneIteration());
+    drainWorkQueue(su, 0);
+    String currentWriteIds = msClient.getValidWriteIds(fqName).toString();
+
+    // Overwrite the txn state to refer to an open txn.
+    long badTxnId = msClient.openTxn("moo");
+    long badWriteId = msClient.allocateTableWriteId(badTxnId, dbName, tblName);
+
+    Table tbl = msClient.getTable(dbName, tblName);
+    tbl.setWriteId(badWriteId);
+    msClient.alter_table(
+        null, dbName, tblName, tbl, new EnvironmentContext(), -1, initialWriteIds.toString());
+
+    // Stats should not be valid.
+    verifyStatsUpToDate(tblName, cols, msClient, 0, currentWriteIds, false);
+
+    // Analyze should not be able to set valid stats for a running txn.
+    assertTrue(su.runOneIteration());
+    drainWorkQueue(su);
+
+    currentWriteIds = msClient.getValidWriteIds(fqName).toString();
+    verifyStatsUpToDate(tblName, cols, msClient, 0, currentWriteIds, false);
+
+    msClient.abortTxns(Lists.newArrayList(badTxnId));
+
+    // Analyze should be able to override stats of an aborted txn.
+    assertTrue(su.runOneIteration());
+    drainWorkQueue(su);
+
+    // Stats will now be valid.
+    currentWriteIds = msClient.getValidWriteIds(fqName).toString();
+    verifyStatsUpToDate(tblName, cols, msClient, 0, currentWriteIds, true);
+
+    // Verify that incorrect stats from a valid write ID are also handled.
+    badTxnId = msClient.openTxn("moo");
+    badWriteId = msClient.allocateTableWriteId(badTxnId, dbName, tblName);
+    tbl = msClient.getTable(dbName, tblName);
+    tbl.setWriteId(badWriteId);
+    StatsSetupConst.setBasicStatsState(tbl.getParameters(), StatsSetupConst.FALSE);
+    msClient.alter_table(null, dbName, tblName, tbl, new EnvironmentContext(), -1, initialWriteIds.toString());
+
+    // Stats should not be valid.
+    verifyStatsUpToDate(tblName, cols, msClient, 0, currentWriteIds, false);
+
+    // Analyze should not be able to set valid stats for a running txn.
+    assertTrue(su.runOneIteration());
+    drainWorkQueue(su);
+
+    currentWriteIds = msClient.getValidWriteIds(fqName).toString();
+    verifyStatsUpToDate(tblName, cols, msClient, 0, currentWriteIds, false);
+
+    msClient.commitTxn(badTxnId);
+
+    // Analyze should be able to override stats of an committed txn.
+    assertTrue(su.runOneIteration());
+    drainWorkQueue(su);
+
+    // Stats will now be valid.
+    currentWriteIds = msClient.getValidWriteIds(fqName).toString();
+    verifyStatsUpToDate(tblName, cols, msClient, 0, currentWriteIds, true);
+
+    msClient.close();
+  }
+
+
+  @Test
+  public void testTxnPartitions() throws Exception {
+    StatsUpdaterThread su = createUpdater();
+    IMetaStoreClient msClient = new HiveMetaStoreClient(hiveConf);
+
+    executeQuery("create table simple_stats (s string) partitioned by (p int) TBLPROPERTIES "
+        + "(\"transactional\"=\"true\", \"transactional_properties\"=\"insert_only\")");
+    executeQuery("insert into simple_stats partition(p=1) values ('test')");
+    executeQuery("insert into simple_stats partition(p=2) values ('test2')");
+    executeQuery("insert into simple_stats partition(p=3) values ('test3')");
+    assertFalse(su.runOneIteration());
+    drainWorkQueue(su, 0);
+
+    executeQuery("insert overwrite table simple_stats partition(p=1) values ('test2')");
+    executeQuery("insert overwrite table simple_stats partition(p=2) values ('test3')");
+    assertFalse(su.runOneIteration());
+    drainWorkQueue(su, 0);
+
+    // Overwrite the txn state to refer to an aborted txn on some partitions.
+    String dbName = ss.getCurrentDatabase(), tblName = "simple_stats", fqName = dbName + "." + tblName;
+    long badTxnId = msClient.openTxn("moo");
+    long badWriteId = msClient.allocateTableWriteId(badTxnId, dbName, tblName);
+    msClient.abortTxns(Lists.newArrayList(badTxnId));
+
+    Partition part1 = msClient.getPartition(dbName, tblName, "p=1");
+    Partition part2 = msClient.getPartition(dbName, tblName, "p=2");
+    part1.setWriteId(badWriteId);
+    part2.setWriteId(badWriteId);
+    String currentWriteIds = msClient.getValidWriteIds(fqName).toString();
+    // To update write ID we need to specify the write ID list to validate concurrent writes.
+    msClient.alter_partitions(dbName, tblName,
+        Lists.newArrayList(part1), null, -1, currentWriteIds, badWriteId);
+    msClient.alter_partitions(dbName, tblName,
+        Lists.newArrayList(part2), null, -1, currentWriteIds, badWriteId);
+
+    // We expect two partitions to be updated.
+    Map<String, List<ColumnStatisticsObj>> stats = msClient.getPartitionColumnStatistics(
+        dbName, tblName, Lists.newArrayList("p=1", "p=2", "p=3"),
+        Lists.newArrayList("s"), 0, currentWriteIds);
+    assertEquals(1, stats.size());
+
+    assertTrue(su.runOneIteration());
+    drainWorkQueue(su, 2);
+    // Analyze treats stats like data (new write ID), so stats still should not be valid.
+    stats = msClient.getPartitionColumnStatistics(
+        dbName, tblName, Lists.newArrayList("p=1", "p=2", "p=3"),
+        Lists.newArrayList("s"), 0, currentWriteIds);
+    assertEquals(1, stats.size());
+
+    // New reader.
+    currentWriteIds = msClient.getValidWriteIds(fqName).toString();
+    stats = msClient.getPartitionColumnStatistics(
+        dbName, tblName, Lists.newArrayList("p=1", "p=2", "p=3"),
+        Lists.newArrayList("s"), 0, currentWriteIds);
+    assertEquals(3, stats.size());
+
+    msClient.close();
+  }
+
   @Test(timeout=40000)
   public void testExistingOnly() throws Exception {
     hiveConf.set(MetastoreConf.ConfVars.STATS_AUTO_UPDATE.getVarname(), "existing");
@@ -437,13 +581,19 @@ public class TestStatsUpdaterThread {
     }
   }
 
-  private void verifyStatsUpToDate(String tbl, ArrayList<String> cols, IMetaStoreClient msClient,
+  private void verifyStatsUpToDate(String tbl, List<String> cols, IMetaStoreClient msClient,
       boolean isUpToDate) throws Exception {
     Table table = msClient.getTable(ss.getCurrentDatabase(), tbl);
     verifyStatsUpToDate(table.getParameters(), cols, isUpToDate);
   }
 
-  private void verifyStatsUpToDate(Map<String, String> params, ArrayList<String> cols,
+  private void verifyStatsUpToDate(String tbl, List<String> cols, IMetaStoreClient msClient,
+      long txnId, String validWriteIds, boolean isUpToDate) throws Exception {
+    Table table = msClient.getTable(ss.getCurrentDatabase(), tbl, txnId, validWriteIds);
+    verifyStatsUpToDate(table.getParameters(), cols, isUpToDate);
+  }
+
+  private void verifyStatsUpToDate(Map<String, String> params, List<String> cols,
       boolean isUpToDate) {
     if (isUpToDate) {
       assertTrue(StatsSetupConst.areBasicStatsUptoDate(params));

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/queries/clientpositive/acid_stats.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/acid_stats.q b/ql/src/test/queries/clientpositive/acid_stats.q
index 1e1c9b0..15eb930 100644
--- a/ql/src/test/queries/clientpositive/acid_stats.q
+++ b/ql/src/test/queries/clientpositive/acid_stats.q
@@ -35,8 +35,9 @@ drop table stats_part;
 create table stats2(key int,value string) tblproperties ("transactional"="true", "transactional_properties"="insert_only");
 insert into table stats2  values (1, "foo");
 explain select count(*) from stats2;
-insert into table stats2  values (1, "bar");
+insert into table stats2  values (2, "bar");
 explain select count(*) from stats2;
+desc formatted stats2 key;
 
 set hive.stats.autogather=false;
 set hive.stats.column.autogather=false;

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/queries/clientpositive/acid_stats3.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/acid_stats3.q b/ql/src/test/queries/clientpositive/acid_stats3.q
new file mode 100644
index 0000000..7a7bf19
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/acid_stats3.q
@@ -0,0 +1,56 @@
+set hive.stats.dbclass=fs;
+set hive.stats.fetch.column.stats=true;
+set datanucleus.cache.collections=false;
+
+set hive.merge.mapfiles=false;
+set hive.merge.mapredfiles=false;
+
+set hive.stats.autogather=true;
+set hive.stats.column.autogather=true;
+set hive.compute.query.using.stats=true;
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+
+set hive.fetch.task.conversion=none;
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.query.results.cache.enabled=false;
+
+-- test truncate
+
+create table stats_nonpart(key int,value string) tblproperties ("transactional"="true", "transactional_properties"="insert_only");
+insert into table stats_nonpart values (1, "foo");
+explain select count(key) from stats_nonpart;
+
+truncate table stats_nonpart;
+explain select count(key) from stats_nonpart;
+
+analyze table stats_nonpart compute statistics for columns;
+explain select count(key) from stats_nonpart;
+drop table stats_nonpart;
+
+
+
+create table stats_part(key int,value string) partitioned by (p int) tblproperties ("transactional"="true", "transactional_properties"="insert_only");
+insert into table stats_part partition(p=101) values (1, "foo");
+insert into table stats_part partition(p=102) values (2, "bar");
+insert into table stats_part partition(p=103) values (3, "baz");
+explain select count(key) from stats_part where p = 101;
+
+truncate table stats_part partition(p=101);
+explain select count(key) from stats_part where p = 102;
+explain select count(key) from stats_part;
+
+alter table stats_part drop partition (p=101);
+explain select count(key) from stats_part;
+
+truncate table stats_part partition(p=102);
+analyze table stats_part partition(p) compute statistics for columns;
+
+-- Note: this currently doesn't work from stats - for ACID tables or otherwise.
+
+explain select count(key) from stats_part;
+drop table stats_part;
+
+
+

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/queries/clientpositive/acid_stats4.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/acid_stats4.q b/ql/src/test/queries/clientpositive/acid_stats4.q
new file mode 100644
index 0000000..20d1159
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/acid_stats4.q
@@ -0,0 +1,70 @@
+set hive.stats.dbclass=fs;
+set hive.stats.fetch.column.stats=true;
+set datanucleus.cache.collections=false;
+
+set hive.merge.mapfiles=false;
+set hive.merge.mapredfiles=false;
+
+set hive.stats.autogather=true;
+set hive.stats.column.autogather=true;
+set hive.compute.query.using.stats=true;
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+
+set hive.fetch.task.conversion=none;
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.query.results.cache.enabled=false;
+
+-- test various alter commands
+
+create table stats_nonpart(key int,value string) tblproperties ("transactional"="true", "transactional_properties"="insert_only");
+insert into table stats_nonpart values (1, "foo");
+explain select count(key) from stats_nonpart;
+
+ALTER TABLE stats_nonpart CHANGE COLUMN key key2 int;
+explain select count(key2) from stats_nonpart;
+explain select count(value) from stats_nonpart;
+
+analyze table stats_nonpart compute statistics for columns;
+explain select count(key2) from stats_nonpart;
+
+alter table stats_nonpart rename to stats_nonpart2;
+explain select count(key2) from stats_nonpart2;
+
+analyze table stats_nonpart2 compute statistics for columns;
+explain select count(key2) from stats_nonpart2;
+
+drop table stats_nonpart;
+
+
+create table stats_part(key int,value string) partitioned by (p int) tblproperties ("transactional"="true", "transactional_properties"="insert_only");
+insert into table stats_part partition(p=101) values (1, "foo");
+insert into table stats_part partition(p=102) values (2, "bar");
+insert into table stats_part partition(p=103) values (3, "baz");
+
+alter table stats_part partition column (p decimal(10,0));
+explain select count(key) from stats_part;
+
+analyze table stats_part partition(p) compute statistics for columns;
+explain select count(key) from stats_part;
+
+alter table stats_part partition(p=102) rename to partition (p=104);
+explain select count(key) from stats_part where p = 101;
+explain select count(key) from stats_part;
+
+analyze table stats_part partition(p) compute statistics for columns;
+explain select count(key) from stats_part;
+
+ALTER TABLE stats_part CHANGE COLUMN key key2 int;
+explain select count(key2) from stats_part;
+explain select count(value) from stats_part;
+
+analyze table stats_part partition(p) compute statistics for columns;
+explain select count(key2) from stats_part;
+
+
+drop table stats_part;
+
+
+

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/acid_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_stats.q.out b/ql/src/test/results/clientpositive/acid_stats.q.out
index fd4ebe7..8dcfdfb 100644
--- a/ql/src/test/results/clientpositive/acid_stats.q.out
+++ b/ql/src/test/results/clientpositive/acid_stats.q.out
@@ -116,11 +116,11 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
-PREHOOK: query: insert into table stats2  values (1, "bar")
+PREHOOK: query: insert into table stats2  values (2, "bar")
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table
 PREHOOK: Output: default@stats2
-POSTHOOK: query: insert into table stats2  values (1, "bar")
+POSTHOOK: query: insert into table stats2  values (2, "bar")
 POSTHOOK: type: QUERY
 POSTHOOK: Input: _dummy_database@_dummy_table
 POSTHOOK: Output: default@stats2
@@ -140,6 +140,25 @@ STAGE PLANS:
       Processor Tree:
         ListSink
 
+PREHOOK: query: desc formatted stats2 key
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@stats2
+POSTHOOK: query: desc formatted stats2 key
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@stats2
+col_name            	key                 	 	 	 	 	 	 	 	 	 	 
+data_type           	int                 	 	 	 	 	 	 	 	 	 	 
+min                 	1                   	 	 	 	 	 	 	 	 	 	 
+max                 	2                   	 	 	 	 	 	 	 	 	 	 
+num_nulls           	0                   	 	 	 	 	 	 	 	 	 	 
+distinct_count      	2                   	 	 	 	 	 	 	 	 	 	 
+avg_col_len         	                    	 	 	 	 	 	 	 	 	 	 
+max_col_len         	                    	 	 	 	 	 	 	 	 	 	 
+num_trues           	                    	 	 	 	 	 	 	 	 	 	 
+num_falses          	                    	 	 	 	 	 	 	 	 	 	 
+bitVector           	HL                  	 	 	 	 	 	 	 	 	 	 
+comment             	from deserializer   	 	 	 	 	 	 	 	 	 	 
+COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"key\":\"true\",\"value\":\"true\"}}	 	 	 	 	 	 	 	 	 	 
 PREHOOK: query: insert into table stats2  values (1, "baz")
 PREHOOK: type: QUERY
 PREHOOK: Input: _dummy_database@_dummy_table

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/acid_stats3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_stats3.q.out b/ql/src/test/results/clientpositive/acid_stats3.q.out
new file mode 100644
index 0000000..ef4d1c8
--- /dev/null
+++ b/ql/src/test/results/clientpositive/acid_stats3.q.out
@@ -0,0 +1,343 @@
+PREHOOK: query: create table stats_nonpart(key int,value string) tblproperties ("transactional"="true", "transactional_properties"="insert_only")
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@stats_nonpart
+POSTHOOK: query: create table stats_nonpart(key int,value string) tblproperties ("transactional"="true", "transactional_properties"="insert_only")
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@stats_nonpart
+PREHOOK: query: insert into table stats_nonpart values (1, "foo")
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@stats_nonpart
+POSTHOOK: query: insert into table stats_nonpart values (1, "foo")
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@stats_nonpart
+POSTHOOK: Lineage: stats_nonpart.key SCRIPT []
+POSTHOOK: Lineage: stats_nonpart.value SCRIPT []
+PREHOOK: query: explain select count(key) from stats_nonpart
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_nonpart
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: truncate table stats_nonpart
+PREHOOK: type: TRUNCATETABLE
+PREHOOK: Output: default@stats_nonpart
+POSTHOOK: query: truncate table stats_nonpart
+POSTHOOK: type: TRUNCATETABLE
+POSTHOOK: Output: default@stats_nonpart
+PREHOOK: query: explain select count(key) from stats_nonpart
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_nonpart
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: stats_nonpart
+            Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
+            Select Operator
+              expressions: key (type: int)
+              outputColumnNames: key
+              Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
+              Group By Operator
+                aggregations: count(key)
+                mode: hash
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                Reduce Output Operator
+                  sort order: 
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                  value expressions: _col0 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: count(VALUE._col0)
+          mode: mergepartial
+          outputColumnNames: _col0
+          Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: analyze table stats_nonpart compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@stats_nonpart
+PREHOOK: Output: default@stats_nonpart
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table stats_nonpart compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@stats_nonpart
+POSTHOOK: Output: default@stats_nonpart
+#### A masked pattern was here ####
+PREHOOK: query: explain select count(key) from stats_nonpart
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_nonpart
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: drop table stats_nonpart
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@stats_nonpart
+PREHOOK: Output: default@stats_nonpart
+POSTHOOK: query: drop table stats_nonpart
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@stats_nonpart
+POSTHOOK: Output: default@stats_nonpart
+PREHOOK: query: create table stats_part(key int,value string) partitioned by (p int) tblproperties ("transactional"="true", "transactional_properties"="insert_only")
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@stats_part
+POSTHOOK: query: create table stats_part(key int,value string) partitioned by (p int) tblproperties ("transactional"="true", "transactional_properties"="insert_only")
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@stats_part
+PREHOOK: query: insert into table stats_part partition(p=101) values (1, "foo")
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@stats_part@p=101
+POSTHOOK: query: insert into table stats_part partition(p=101) values (1, "foo")
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@stats_part@p=101
+POSTHOOK: Lineage: stats_part PARTITION(p=101).key SCRIPT []
+POSTHOOK: Lineage: stats_part PARTITION(p=101).value SCRIPT []
+PREHOOK: query: insert into table stats_part partition(p=102) values (2, "bar")
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@stats_part@p=102
+POSTHOOK: query: insert into table stats_part partition(p=102) values (2, "bar")
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@stats_part@p=102
+POSTHOOK: Lineage: stats_part PARTITION(p=102).key SCRIPT []
+POSTHOOK: Lineage: stats_part PARTITION(p=102).value SCRIPT []
+PREHOOK: query: insert into table stats_part partition(p=103) values (3, "baz")
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@stats_part@p=103
+POSTHOOK: query: insert into table stats_part partition(p=103) values (3, "baz")
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@stats_part@p=103
+POSTHOOK: Lineage: stats_part PARTITION(p=103).key SCRIPT []
+POSTHOOK: Lineage: stats_part PARTITION(p=103).value SCRIPT []
+PREHOOK: query: explain select count(key) from stats_part where p = 101
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part where p = 101
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: truncate table stats_part partition(p=101)
+PREHOOK: type: TRUNCATETABLE
+PREHOOK: Output: default@stats_part@p=101
+POSTHOOK: query: truncate table stats_part partition(p=101)
+POSTHOOK: type: TRUNCATETABLE
+POSTHOOK: Output: default@stats_part@p=101
+PREHOOK: query: explain select count(key) from stats_part where p = 102
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part where p = 102
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: explain select count(key) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: stats_part
+            Statistics: Num rows: 2 Data size: 8 Basic stats: PARTIAL Column stats: PARTIAL
+            Select Operator
+              expressions: key (type: int)
+              outputColumnNames: key
+              Statistics: Num rows: 2 Data size: 8 Basic stats: PARTIAL Column stats: PARTIAL
+              Group By Operator
+                aggregations: count(key)
+                mode: hash
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 12 Basic stats: PARTIAL Column stats: PARTIAL
+                Reduce Output Operator
+                  sort order: 
+                  Statistics: Num rows: 1 Data size: 12 Basic stats: PARTIAL Column stats: PARTIAL
+                  value expressions: _col0 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: count(VALUE._col0)
+          mode: mergepartial
+          outputColumnNames: _col0
+          Statistics: Num rows: 1 Data size: 12 Basic stats: PARTIAL Column stats: PARTIAL
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 1 Data size: 12 Basic stats: PARTIAL Column stats: PARTIAL
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: alter table stats_part drop partition (p=101)
+PREHOOK: type: ALTERTABLE_DROPPARTS
+PREHOOK: Input: default@stats_part
+PREHOOK: Output: default@stats_part@p=101
+POSTHOOK: query: alter table stats_part drop partition (p=101)
+POSTHOOK: type: ALTERTABLE_DROPPARTS
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Output: default@stats_part@p=101
+PREHOOK: query: explain select count(key) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: truncate table stats_part partition(p=102)
+PREHOOK: type: TRUNCATETABLE
+PREHOOK: Output: default@stats_part@p=102
+POSTHOOK: query: truncate table stats_part partition(p=102)
+POSTHOOK: type: TRUNCATETABLE
+POSTHOOK: Output: default@stats_part@p=102
+PREHOOK: query: analyze table stats_part partition(p) compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@stats_part
+PREHOOK: Input: default@stats_part@p=102
+PREHOOK: Input: default@stats_part@p=103
+PREHOOK: Output: default@stats_part
+PREHOOK: Output: default@stats_part@p=102
+PREHOOK: Output: default@stats_part@p=103
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table stats_part partition(p) compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Input: default@stats_part@p=102
+POSTHOOK: Input: default@stats_part@p=103
+POSTHOOK: Output: default@stats_part
+POSTHOOK: Output: default@stats_part@p=102
+POSTHOOK: Output: default@stats_part@p=103
+#### A masked pattern was here ####
+PREHOOK: query: explain select count(key) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: stats_part
+            Statistics: Num rows: 1 Data size: 4 Basic stats: PARTIAL Column stats: PARTIAL
+            Select Operator
+              expressions: key (type: int)
+              outputColumnNames: key
+              Statistics: Num rows: 1 Data size: 4 Basic stats: PARTIAL Column stats: PARTIAL
+              Group By Operator
+                aggregations: count(key)
+                mode: hash
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 12 Basic stats: PARTIAL Column stats: PARTIAL
+                Reduce Output Operator
+                  sort order: 
+                  Statistics: Num rows: 1 Data size: 12 Basic stats: PARTIAL Column stats: PARTIAL
+                  value expressions: _col0 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: count(VALUE._col0)
+          mode: mergepartial
+          outputColumnNames: _col0
+          Statistics: Num rows: 1 Data size: 12 Basic stats: PARTIAL Column stats: PARTIAL
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 1 Data size: 12 Basic stats: PARTIAL Column stats: PARTIAL
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: drop table stats_part
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@stats_part
+PREHOOK: Output: default@stats_part
+POSTHOOK: query: drop table stats_part
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Output: default@stats_part

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/acid_stats4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_stats4.q.out b/ql/src/test/results/clientpositive/acid_stats4.q.out
new file mode 100644
index 0000000..bfb8898
--- /dev/null
+++ b/ql/src/test/results/clientpositive/acid_stats4.q.out
@@ -0,0 +1,496 @@
+PREHOOK: query: create table stats_nonpart(key int,value string) tblproperties ("transactional"="true", "transactional_properties"="insert_only")
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@stats_nonpart
+POSTHOOK: query: create table stats_nonpart(key int,value string) tblproperties ("transactional"="true", "transactional_properties"="insert_only")
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@stats_nonpart
+PREHOOK: query: insert into table stats_nonpart values (1, "foo")
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@stats_nonpart
+POSTHOOK: query: insert into table stats_nonpart values (1, "foo")
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@stats_nonpart
+POSTHOOK: Lineage: stats_nonpart.key SCRIPT []
+POSTHOOK: Lineage: stats_nonpart.value SCRIPT []
+PREHOOK: query: explain select count(key) from stats_nonpart
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_nonpart
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: ALTER TABLE stats_nonpart CHANGE COLUMN key key2 int
+PREHOOK: type: ALTERTABLE_RENAMECOL
+PREHOOK: Input: default@stats_nonpart
+PREHOOK: Output: default@stats_nonpart
+POSTHOOK: query: ALTER TABLE stats_nonpart CHANGE COLUMN key key2 int
+POSTHOOK: type: ALTERTABLE_RENAMECOL
+POSTHOOK: Input: default@stats_nonpart
+POSTHOOK: Output: default@stats_nonpart
+PREHOOK: query: explain select count(key2) from stats_nonpart
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key2) from stats_nonpart
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: stats_nonpart
+            Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
+            Select Operator
+              expressions: key2 (type: int)
+              outputColumnNames: key2
+              Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
+              Group By Operator
+                aggregations: count(key2)
+                mode: hash
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  sort order: 
+                  Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col0 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: count(VALUE._col0)
+          mode: mergepartial
+          outputColumnNames: _col0
+          Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: explain select count(value) from stats_nonpart
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(value) from stats_nonpart
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: analyze table stats_nonpart compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@stats_nonpart
+PREHOOK: Output: default@stats_nonpart
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table stats_nonpart compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@stats_nonpart
+POSTHOOK: Output: default@stats_nonpart
+#### A masked pattern was here ####
+PREHOOK: query: explain select count(key2) from stats_nonpart
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key2) from stats_nonpart
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: alter table stats_nonpart rename to stats_nonpart2
+PREHOOK: type: ALTERTABLE_RENAME
+PREHOOK: Input: default@stats_nonpart
+PREHOOK: Output: default@stats_nonpart
+POSTHOOK: query: alter table stats_nonpart rename to stats_nonpart2
+POSTHOOK: type: ALTERTABLE_RENAME
+POSTHOOK: Input: default@stats_nonpart
+POSTHOOK: Output: default@stats_nonpart
+POSTHOOK: Output: default@stats_nonpart2
+PREHOOK: query: explain select count(key2) from stats_nonpart2
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key2) from stats_nonpart2
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: analyze table stats_nonpart2 compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@stats_nonpart2
+PREHOOK: Output: default@stats_nonpart2
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table stats_nonpart2 compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@stats_nonpart2
+POSTHOOK: Output: default@stats_nonpart2
+#### A masked pattern was here ####
+PREHOOK: query: explain select count(key2) from stats_nonpart2
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key2) from stats_nonpart2
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: drop table stats_nonpart
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table stats_nonpart
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table stats_part(key int,value string) partitioned by (p int) tblproperties ("transactional"="true", "transactional_properties"="insert_only")
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@stats_part
+POSTHOOK: query: create table stats_part(key int,value string) partitioned by (p int) tblproperties ("transactional"="true", "transactional_properties"="insert_only")
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@stats_part
+PREHOOK: query: insert into table stats_part partition(p=101) values (1, "foo")
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@stats_part@p=101
+POSTHOOK: query: insert into table stats_part partition(p=101) values (1, "foo")
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@stats_part@p=101
+POSTHOOK: Lineage: stats_part PARTITION(p=101).key SCRIPT []
+POSTHOOK: Lineage: stats_part PARTITION(p=101).value SCRIPT []
+PREHOOK: query: insert into table stats_part partition(p=102) values (2, "bar")
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@stats_part@p=102
+POSTHOOK: query: insert into table stats_part partition(p=102) values (2, "bar")
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@stats_part@p=102
+POSTHOOK: Lineage: stats_part PARTITION(p=102).key SCRIPT []
+POSTHOOK: Lineage: stats_part PARTITION(p=102).value SCRIPT []
+PREHOOK: query: insert into table stats_part partition(p=103) values (3, "baz")
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@stats_part@p=103
+POSTHOOK: query: insert into table stats_part partition(p=103) values (3, "baz")
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@stats_part@p=103
+POSTHOOK: Lineage: stats_part PARTITION(p=103).key SCRIPT []
+POSTHOOK: Lineage: stats_part PARTITION(p=103).value SCRIPT []
+PREHOOK: query: alter table stats_part partition column (p decimal(10,0))
+PREHOOK: type: ALTERTABLE_PARTCOLTYPE
+PREHOOK: Input: default@stats_part
+POSTHOOK: query: alter table stats_part partition column (p decimal(10,0))
+POSTHOOK: type: ALTERTABLE_PARTCOLTYPE
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Output: default@stats_part
+PREHOOK: query: explain select count(key) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: analyze table stats_part partition(p) compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@stats_part
+PREHOOK: Input: default@stats_part@p=101
+PREHOOK: Input: default@stats_part@p=102
+PREHOOK: Input: default@stats_part@p=103
+PREHOOK: Output: default@stats_part
+PREHOOK: Output: default@stats_part@p=101
+PREHOOK: Output: default@stats_part@p=102
+PREHOOK: Output: default@stats_part@p=103
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table stats_part partition(p) compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Input: default@stats_part@p=101
+POSTHOOK: Input: default@stats_part@p=102
+POSTHOOK: Input: default@stats_part@p=103
+POSTHOOK: Output: default@stats_part
+POSTHOOK: Output: default@stats_part@p=101
+POSTHOOK: Output: default@stats_part@p=102
+POSTHOOK: Output: default@stats_part@p=103
+#### A masked pattern was here ####
+PREHOOK: query: explain select count(key) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: alter table stats_part partition(p=102) rename to partition (p=104)
+PREHOOK: type: ALTERTABLE_RENAMEPART
+PREHOOK: Input: default@stats_part
+PREHOOK: Output: default@stats_part@p=102
+POSTHOOK: query: alter table stats_part partition(p=102) rename to partition (p=104)
+POSTHOOK: type: ALTERTABLE_RENAMEPART
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Input: default@stats_part@p=102
+POSTHOOK: Output: default@stats_part@p=102
+POSTHOOK: Output: default@stats_part@p=104
+PREHOOK: query: explain select count(key) from stats_part where p = 101
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part where p = 101
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: explain select count(key) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: stats_part
+            Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+            Select Operator
+              expressions: key (type: int)
+              outputColumnNames: key
+              Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE
+              Group By Operator
+                aggregations: count(key)
+                mode: hash
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                Reduce Output Operator
+                  sort order: 
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+                  value expressions: _col0 (type: bigint)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: count(VALUE._col0)
+          mode: mergepartial
+          outputColumnNames: _col0
+          Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: analyze table stats_part partition(p) compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@stats_part
+PREHOOK: Input: default@stats_part@p=101
+PREHOOK: Input: default@stats_part@p=103
+PREHOOK: Input: default@stats_part@p=104
+PREHOOK: Output: default@stats_part
+PREHOOK: Output: default@stats_part@p=101
+PREHOOK: Output: default@stats_part@p=103
+PREHOOK: Output: default@stats_part@p=104
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table stats_part partition(p) compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Input: default@stats_part@p=101
+POSTHOOK: Input: default@stats_part@p=103
+POSTHOOK: Input: default@stats_part@p=104
+POSTHOOK: Output: default@stats_part
+POSTHOOK: Output: default@stats_part@p=101
+POSTHOOK: Output: default@stats_part@p=103
+POSTHOOK: Output: default@stats_part@p=104
+#### A masked pattern was here ####
+PREHOOK: query: explain select count(key) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: ALTER TABLE stats_part CHANGE COLUMN key key2 int
+PREHOOK: type: ALTERTABLE_RENAMECOL
+PREHOOK: Input: default@stats_part
+PREHOOK: Output: default@stats_part
+POSTHOOK: query: ALTER TABLE stats_part CHANGE COLUMN key key2 int
+POSTHOOK: type: ALTERTABLE_RENAMECOL
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Output: default@stats_part
+PREHOOK: query: explain select count(key2) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key2) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: stats_part
+            Statistics: Num rows: 3 Data size: 27 Basic stats: COMPLETE Column stats: NONE
+            Select Operator
+              expressions: key2 (type: int)
+              outputColumnNames: key2
+              Statistics: Num rows: 3 Data size: 27 Basic stats: COMPLETE Column stats: NONE
+              Group By Operator
+                aggregations: count(key2)
+                mode: hash
+                outputColumnNames: _col0
+                Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+                Reduce Output Operator
+                  sort order: 
+                  Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+                  value expressions: _col0 (type: bigint)
+      Reduce Operator Tree:
+        Group By Operator
+          aggregations: count(VALUE._col0)
+          mode: mergepartial
+          outputColumnNames: _col0
+          Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: explain select count(value) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(value) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: analyze table stats_part partition(p) compute statistics for columns
+PREHOOK: type: ANALYZE_TABLE
+PREHOOK: Input: default@stats_part
+PREHOOK: Input: default@stats_part@p=101
+PREHOOK: Input: default@stats_part@p=103
+PREHOOK: Input: default@stats_part@p=104
+PREHOOK: Output: default@stats_part
+PREHOOK: Output: default@stats_part@p=101
+PREHOOK: Output: default@stats_part@p=103
+PREHOOK: Output: default@stats_part@p=104
+#### A masked pattern was here ####
+POSTHOOK: query: analyze table stats_part partition(p) compute statistics for columns
+POSTHOOK: type: ANALYZE_TABLE
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Input: default@stats_part@p=101
+POSTHOOK: Input: default@stats_part@p=103
+POSTHOOK: Input: default@stats_part@p=104
+POSTHOOK: Output: default@stats_part
+POSTHOOK: Output: default@stats_part@p=101
+POSTHOOK: Output: default@stats_part@p=103
+POSTHOOK: Output: default@stats_part@p=104
+#### A masked pattern was here ####
+PREHOOK: query: explain select count(key2) from stats_part
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(key2) from stats_part
+POSTHOOK: type: QUERY
+STAGE DEPENDENCIES:
+  Stage-0 is a root stage
+
+STAGE PLANS:
+  Stage: Stage-0
+    Fetch Operator
+      limit: 1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: drop table stats_part
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@stats_part
+PREHOOK: Output: default@stats_part
+POSTHOOK: query: drop table stats_part
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@stats_part
+POSTHOOK: Output: default@stats_part

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/acid_table_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/acid_table_stats.q.out b/ql/src/test/results/clientpositive/acid_table_stats.q.out
index fb064f8..f3ada34 100644
--- a/ql/src/test/results/clientpositive/acid_table_stats.q.out
+++ b/ql/src/test/results/clientpositive/acid_table_stats.q.out
@@ -321,7 +321,7 @@ Partition Parameters:
 	numFiles            	4                   
 	numRows             	2000                
 	rawDataSize         	208000              
-	totalSize           	8118                
+	totalSize           	8126                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 
@@ -368,7 +368,7 @@ Partition Parameters:
 	numFiles            	4                   
 	numRows             	2000                
 	rawDataSize         	416000              
-	totalSize           	8118                
+	totalSize           	8126                
 #### A masked pattern was here ####
 	 	 
 # Storage Information	 	 

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/change_allowincompatible_vectorization_false_date.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/change_allowincompatible_vectorization_false_date.q.out b/ql/src/test/results/clientpositive/llap/change_allowincompatible_vectorization_false_date.q.out
index 1bba3f3..4661a03 100644
--- a/ql/src/test/results/clientpositive/llap/change_allowincompatible_vectorization_false_date.q.out
+++ b/ql/src/test/results/clientpositive/llap/change_allowincompatible_vectorization_false_date.q.out
@@ -41,14 +41,10 @@ POSTHOOK: Lineage: change_allowincompatible_vectorization_false_date PARTITION(s
 PREHOOK: query: select count(*) from change_allowincompatible_vectorization_false_date
 PREHOOK: type: QUERY
 PREHOOK: Input: default@change_allowincompatible_vectorization_false_date
-PREHOOK: Input: default@change_allowincompatible_vectorization_false_date@s=aaa
-PREHOOK: Input: default@change_allowincompatible_vectorization_false_date@s=bbb
 #### A masked pattern was here ####
 POSTHOOK: query: select count(*) from change_allowincompatible_vectorization_false_date
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@change_allowincompatible_vectorization_false_date
-POSTHOOK: Input: default@change_allowincompatible_vectorization_false_date@s=aaa
-POSTHOOK: Input: default@change_allowincompatible_vectorization_false_date@s=bbb
 #### A masked pattern was here ####
 50
 PREHOOK: query: alter table change_allowincompatible_vectorization_false_date change column ts ts timestamp
@@ -62,14 +58,10 @@ POSTHOOK: Output: default@change_allowincompatible_vectorization_false_date
 PREHOOK: query: select count(*) from change_allowincompatible_vectorization_false_date
 PREHOOK: type: QUERY
 PREHOOK: Input: default@change_allowincompatible_vectorization_false_date
-PREHOOK: Input: default@change_allowincompatible_vectorization_false_date@s=aaa
-PREHOOK: Input: default@change_allowincompatible_vectorization_false_date@s=bbb
 #### A masked pattern was here ####
 POSTHOOK: query: select count(*) from change_allowincompatible_vectorization_false_date
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@change_allowincompatible_vectorization_false_date
-POSTHOOK: Input: default@change_allowincompatible_vectorization_false_date@s=aaa
-POSTHOOK: Input: default@change_allowincompatible_vectorization_false_date@s=bbb
 #### A masked pattern was here ####
 50
 PREHOOK: query: insert into table change_allowincompatible_vectorization_false_date partition (s='aaa') values ('2038-03-22 07:26:48.0')

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out b/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out
index 2ad9a4d..5018a4c 100644
--- a/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out
+++ b/ql/src/test/results/clientpositive/llap/dynpart_sort_optimization_acid.q.out
@@ -1327,7 +1327,7 @@ STAGE PLANS:
                 TableScan
                   alias: acid_2l_part_sdpo
                   filterExpr: (value = 'bar') (type: boolean)
-                  Statistics: Num rows: 4952 Data size: 1456618 Basic stats: COMPLETE Column stats: PARTIAL
+                  Statistics: Num rows: 4200 Data size: 1253037 Basic stats: COMPLETE Column stats: PARTIAL
                   Filter Operator
                     predicate: (value = 'bar') (type: boolean)
                     Statistics: Num rows: 5 Data size: 1375 Basic stats: COMPLETE Column stats: PARTIAL

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out
index 0628ad8..2538ac1 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_3.q.out
@@ -488,10 +488,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: cmv_basetable_2
-                  filterExpr: ((c > 10) and (ROW__ID.writeid > 1) and a is not null) (type: boolean)
+                  filterExpr: ((c > 10) and (ROW__ID.writeid > 2) and a is not null) (type: boolean)
                   Statistics: Num rows: 3 Data size: 348 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((ROW__ID.writeid > 1) and (c > 10) and a is not null) (type: boolean)
+                    predicate: ((ROW__ID.writeid > 2) and (c > 10) and a is not null) (type: boolean)
                     Statistics: Num rows: 1 Data size: 116 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: a (type: int), c (type: decimal(10,2))

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
index a804637..fe46bfd 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_4.q.out
@@ -730,10 +730,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: cmv_basetable_2_n2
-                  filterExpr: ((c > 10) and (ROW__ID.writeid > 1) and a is not null) (type: boolean)
+                  filterExpr: ((c > 10) and (ROW__ID.writeid > 2) and a is not null) (type: boolean)
                   Statistics: Num rows: 3 Data size: 360 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((ROW__ID.writeid > 1) and (c > 10) and a is not null) (type: boolean)
+                    predicate: ((ROW__ID.writeid > 2) and (c > 10) and a is not null) (type: boolean)
                     Statistics: Num rows: 1 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: a (type: int), c (type: decimal(10,2)), d (type: int)
@@ -950,7 +950,7 @@ Table Parameters:
 	numFiles            	3                   
 	numRows             	3                   
 	rawDataSize         	248                 
-	totalSize           	1508                
+	totalSize           	1500                
 	transactional       	true                
 	transactional_properties	default             
 #### A masked pattern was here ####
@@ -1554,10 +1554,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: cmv_basetable_2_n2
-                  filterExpr: ((c > 10) and (ROW__ID.writeid > 4) and a is not null) (type: boolean)
+                  filterExpr: ((c > 10) and (ROW__ID.writeid > 6) and a is not null) (type: boolean)
                   Statistics: Num rows: 3 Data size: 360 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((ROW__ID.writeid > 4) and (c > 10) and a is not null) (type: boolean)
+                    predicate: ((ROW__ID.writeid > 6) and (c > 10) and a is not null) (type: boolean)
                     Statistics: Num rows: 1 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: a (type: int), c (type: decimal(10,2)), d (type: int)

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
index fae4757..6402db8 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_5.q.out
@@ -278,10 +278,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: cmv_basetable_2_n3
-                  filterExpr: ((c > 10) and (ROW__ID.writeid > 1) and a is not null) (type: boolean)
+                  filterExpr: ((c > 10) and (ROW__ID.writeid > 2) and a is not null) (type: boolean)
                   Statistics: Num rows: 3 Data size: 348 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((ROW__ID.writeid > 1) and (c > 10) and a is not null) (type: boolean)
+                    predicate: ((ROW__ID.writeid > 2) and (c > 10) and a is not null) (type: boolean)
                     Statistics: Num rows: 1 Data size: 116 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: a (type: int), c (type: decimal(10,2))
@@ -958,10 +958,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: cmv_basetable_2_n3
-                  filterExpr: ((c > 10) and (ROW__ID.writeid > 4) and a is not null) (type: boolean)
+                  filterExpr: ((c > 10) and (ROW__ID.writeid > 6) and a is not null) (type: boolean)
                   Statistics: Num rows: 3 Data size: 348 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((ROW__ID.writeid > 4) and (c > 10) and a is not null) (type: boolean)
+                    predicate: ((ROW__ID.writeid > 6) and (c > 10) and a is not null) (type: boolean)
                     Statistics: Num rows: 1 Data size: 116 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: a (type: int), c (type: decimal(10,2))

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out
index fe54771..193e959 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_rebuild_dummy.q.out
@@ -488,10 +488,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: cmv_basetable_2_n0
-                  filterExpr: ((c > 10) and (ROW__ID.writeid > 1) and a is not null) (type: boolean)
+                  filterExpr: ((c > 10) and (ROW__ID.writeid > 2) and a is not null) (type: boolean)
                   Statistics: Num rows: 3 Data size: 348 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((ROW__ID.writeid > 1) and (c > 10) and a is not null) (type: boolean)
+                    predicate: ((ROW__ID.writeid > 2) and (c > 10) and a is not null) (type: boolean)
                     Statistics: Num rows: 1 Data size: 116 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: a (type: int), c (type: decimal(10,2))

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out
index 44a866d..b5183ba 100644
--- a/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out
+++ b/ql/src/test/results/clientpositive/llap/materialized_view_create_rewrite_time_window.q.out
@@ -602,10 +602,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: cmv_basetable_2_n1
-                  filterExpr: ((c > 10) and (ROW__ID.writeid > 1) and a is not null) (type: boolean)
+                  filterExpr: ((c > 10) and (ROW__ID.writeid > 2) and a is not null) (type: boolean)
                   Statistics: Num rows: 3 Data size: 348 Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((ROW__ID.writeid > 1) and (c > 10) and a is not null) (type: boolean)
+                    predicate: ((ROW__ID.writeid > 2) and (c > 10) and a is not null) (type: boolean)
                     Statistics: Num rows: 1 Data size: 116 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: a (type: int), c (type: decimal(10,2))


[08/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
index b115f4c..1f49173 100755
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
@@ -58,6 +58,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
   print('  void drop_table(string dbname, string name, bool deleteData)')
   print('  void drop_table_with_environment_context(string dbname, string name, bool deleteData, EnvironmentContext environment_context)')
   print('  void truncate_table(string dbName, string tableName,  partNames)')
+  print('  TruncateTableResponse truncate_table_req(TruncateTableRequest req)')
   print('   get_tables(string db_name, string pattern)')
   print('   get_tables_by_type(string db_name, string pattern, string tableType)')
   print('   get_materialized_views_for_rewriting(string db_name)')
@@ -73,6 +74,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
   print('  void alter_table(string dbname, string tbl_name, Table new_tbl)')
   print('  void alter_table_with_environment_context(string dbname, string tbl_name, Table new_tbl, EnvironmentContext environment_context)')
   print('  void alter_table_with_cascade(string dbname, string tbl_name, Table new_tbl, bool cascade)')
+  print('  AlterTableResponse alter_table_req(AlterTableRequest req)')
   print('  Partition add_partition(Partition new_part)')
   print('  Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context)')
   print('  i32 add_partitions( new_parts)')
@@ -108,7 +110,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
   print('  void alter_partition(string db_name, string tbl_name, Partition new_part)')
   print('  void alter_partitions(string db_name, string tbl_name,  new_parts)')
   print('  void alter_partitions_with_environment_context(string db_name, string tbl_name,  new_parts, EnvironmentContext environment_context)')
-  print('  AlterPartitionsResponse alter_partitions_with_environment_context_req(AlterPartitionsRequest req)')
+  print('  AlterPartitionsResponse alter_partitions_req(AlterPartitionsRequest req)')
   print('  void alter_partition_with_environment_context(string db_name, string tbl_name, Partition new_part, EnvironmentContext environment_context)')
   print('  void rename_partition(string db_name, string tbl_name,  part_vals, Partition new_part)')
   print('  bool partition_name_has_valid_characters( part_vals, bool throw_exception)')
@@ -125,6 +127,8 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
   print('  CheckConstraintsResponse get_check_constraints(CheckConstraintsRequest request)')
   print('  bool update_table_column_statistics(ColumnStatistics stats_obj)')
   print('  bool update_partition_column_statistics(ColumnStatistics stats_obj)')
+  print('  SetPartitionsStatsResponse update_table_column_statistics_req(SetPartitionsStatsRequest req)')
+  print('  SetPartitionsStatsResponse update_partition_column_statistics_req(SetPartitionsStatsRequest req)')
   print('  ColumnStatistics get_table_column_statistics(string db_name, string tbl_name, string col_name)')
   print('  ColumnStatistics get_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)')
   print('  TableStatsResult get_table_statistics_req(TableStatsRequest request)')
@@ -506,6 +510,12 @@ elif cmd == 'truncate_table':
     sys.exit(1)
   pp.pprint(client.truncate_table(args[0],args[1],eval(args[2]),))
 
+elif cmd == 'truncate_table_req':
+  if len(args) != 1:
+    print('truncate_table_req requires 1 args')
+    sys.exit(1)
+  pp.pprint(client.truncate_table_req(eval(args[0]),))
+
 elif cmd == 'get_tables':
   if len(args) != 2:
     print('get_tables requires 2 args')
@@ -596,6 +606,12 @@ elif cmd == 'alter_table_with_cascade':
     sys.exit(1)
   pp.pprint(client.alter_table_with_cascade(args[0],args[1],eval(args[2]),eval(args[3]),))
 
+elif cmd == 'alter_table_req':
+  if len(args) != 1:
+    print('alter_table_req requires 1 args')
+    sys.exit(1)
+  pp.pprint(client.alter_table_req(eval(args[0]),))
+
 elif cmd == 'add_partition':
   if len(args) != 1:
     print('add_partition requires 1 args')
@@ -806,11 +822,11 @@ elif cmd == 'alter_partitions_with_environment_context':
     sys.exit(1)
   pp.pprint(client.alter_partitions_with_environment_context(args[0],args[1],eval(args[2]),eval(args[3]),))
 
-elif cmd == 'alter_partitions_with_environment_context_req':
+elif cmd == 'alter_partitions_req':
   if len(args) != 1:
-    print('alter_partitions_with_environment_context_req requires 1 args')
+    print('alter_partitions_req requires 1 args')
     sys.exit(1)
-  pp.pprint(client.alter_partitions_with_environment_context_req(eval(args[0]),))
+  pp.pprint(client.alter_partitions_req(eval(args[0]),))
 
 elif cmd == 'alter_partition_with_environment_context':
   if len(args) != 4:
@@ -908,6 +924,18 @@ elif cmd == 'update_partition_column_statistics':
     sys.exit(1)
   pp.pprint(client.update_partition_column_statistics(eval(args[0]),))
 
+elif cmd == 'update_table_column_statistics_req':
+  if len(args) != 1:
+    print('update_table_column_statistics_req requires 1 args')
+    sys.exit(1)
+  pp.pprint(client.update_table_column_statistics_req(eval(args[0]),))
+
+elif cmd == 'update_partition_column_statistics_req':
+  if len(args) != 1:
+    print('update_partition_column_statistics_req requires 1 args')
+    sys.exit(1)
+  pp.pprint(client.update_partition_column_statistics_req(eval(args[0]),))
+
 elif cmd == 'get_table_column_statistics':
   if len(args) != 3:
     print('get_table_column_statistics requires 3 args')


[03/20] hive git commit: HIVE-19416 : merge master into branch (Sergey Shelukhin) 0713

Posted by se...@apache.org.
HIVE-19416 : merge master into branch (Sergey Shelukhin) 0713


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

Branch: refs/heads/master-txnstats
Commit: c8f4984fe934af0fb65282bb6218b3baa6c2ca08
Parents: 93b9cdd 9c5c940
Author: sergey <se...@apache.org>
Authored: Fri Jul 13 18:43:39 2018 -0700
Committer: sergey <se...@apache.org>
Committed: Fri Jul 13 18:43:39 2018 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/ql/Driver.java  |  5 +-
 .../ql/cache/results/QueryResultsCache.java     |  8 +--
 .../hive/streaming/AbstractRecordWriter.java    | 52 ++++++++++++++------
 .../hive/streaming/HiveStreamingConnection.java |  4 +-
 4 files changed, 47 insertions(+), 22 deletions(-)
----------------------------------------------------------------------



[18/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/results_cache_truncate.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/results_cache_truncate.q.out b/ql/src/test/results/clientpositive/llap/results_cache_truncate.q.out
index 0b7a81a..83b2144 100644
--- a/ql/src/test/results/clientpositive/llap/results_cache_truncate.q.out
+++ b/ql/src/test/results/clientpositive/llap/results_cache_truncate.q.out
@@ -23,54 +23,12 @@ POSTHOOK: query: explain
 select count(*) from rct1_1
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Tez
-#### A masked pattern was here ####
-      Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
-            Map Operator Tree:
-                TableScan
-                  alias: rct1_1
-                  Statistics: Num rows: 500 Data size: 35250 Basic stats: COMPLETE Column stats: COMPLETE
-                  Select Operator
-                    Statistics: Num rows: 500 Data size: 35250 Basic stats: COMPLETE Column stats: COMPLETE
-                    Group By Operator
-                      aggregations: count()
-                      mode: hash
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        sort order: 
-                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                        value expressions: _col0 (type: bigint)
-            Execution mode: vectorized, llap
-            LLAP IO: may be used (ACID table)
-        Reducer 2 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                aggregations: count(VALUE._col0)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                File Output Operator
-                  compressed: false
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: -1
+      limit: 1
       Processor Tree:
         ListSink
 
@@ -96,17 +54,18 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-0
     Fetch Operator
-      limit: -1
+      limit: 1
       Processor Tree:
         ListSink
-      Cached Query Result: true
 
 PREHOOK: query: select count(*) from rct1_1
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rct1_1
+#### A masked pattern was here ####
 POSTHOOK: query: select count(*) from rct1_1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rct1_1
+#### A masked pattern was here ####
 500
 PREHOOK: query: truncate table rct1_1
 PREHOOK: type: TRUNCATETABLE
@@ -122,54 +81,12 @@ POSTHOOK: query: explain
 select count(*) from rct1_1
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Tez
-#### A masked pattern was here ####
-      Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
-            Map Operator Tree:
-                TableScan
-                  alias: rct1_1
-                  Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
-                  Select Operator
-                    Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE
-                    Group By Operator
-                      aggregations: count()
-                      mode: hash
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                      Reduce Output Operator
-                        sort order: 
-                        Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                        value expressions: _col0 (type: bigint)
-            Execution mode: vectorized, llap
-            LLAP IO: may be used (ACID table)
-        Reducer 2 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                aggregations: count(VALUE._col0)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                File Output Operator
-                  compressed: false
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: -1
+      limit: 1
       Processor Tree:
         ListSink
 
@@ -217,68 +134,22 @@ POSTHOOK: query: explain
 select count(*) from rct1_2
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Tez
-#### A masked pattern was here ####
-      Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
-            Map Operator Tree:
-                TableScan
-                  alias: rct1_2
-                  Statistics: Num rows: 1000 Data size: 78450 Basic stats: COMPLETE Column stats: COMPLETE
-                  Select Operator
-                    Statistics: Num rows: 1000 Data size: 78450 Basic stats: COMPLETE Column stats: COMPLETE
-                    Group By Operator
-                      aggregations: count()
-                      mode: hash
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                      Reduce Output Operator
-                        sort order: 
-                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                        value expressions: _col0 (type: bigint)
-            Execution mode: vectorized, llap
-            LLAP IO: may be used (ACID table)
-        Reducer 2 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                aggregations: count(VALUE._col0)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                File Output Operator
-                  compressed: false
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: -1
+      limit: 1
       Processor Tree:
         ListSink
 
 PREHOOK: query: select count(*) from rct1_2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rct1_2
-PREHOOK: Input: default@rct1_2@p1=part1
-PREHOOK: Input: default@rct1_2@p1=part2
 #### A masked pattern was here ####
 POSTHOOK: query: select count(*) from rct1_2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rct1_2
-POSTHOOK: Input: default@rct1_2@p1=part1
-POSTHOOK: Input: default@rct1_2@p1=part2
 #### A masked pattern was here ####
 1000
 test.comment="Query on transactional table should use cache"
@@ -294,21 +165,18 @@ STAGE DEPENDENCIES:
 STAGE PLANS:
   Stage: Stage-0
     Fetch Operator
-      limit: -1
+      limit: 1
       Processor Tree:
         ListSink
-      Cached Query Result: true
 
 PREHOOK: query: select count(*) from rct1_2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rct1_2
-PREHOOK: Input: default@rct1_2@p1=part1
-PREHOOK: Input: default@rct1_2@p1=part2
+#### A masked pattern was here ####
 POSTHOOK: query: select count(*) from rct1_2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rct1_2
-POSTHOOK: Input: default@rct1_2@p1=part1
-POSTHOOK: Input: default@rct1_2@p1=part2
+#### A masked pattern was here ####
 1000
 PREHOOK: query: truncate table rct1_2 partition (p1='part1')
 PREHOOK: type: TRUNCATETABLE
@@ -324,68 +192,22 @@ POSTHOOK: query: explain
 select count(*) from rct1_2
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Tez
-#### A masked pattern was here ####
-      Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
-            Map Operator Tree:
-                TableScan
-                  alias: rct1_2
-                  Statistics: Num rows: 500 Data size: 39200 Basic stats: PARTIAL Column stats: COMPLETE
-                  Select Operator
-                    Statistics: Num rows: 500 Data size: 39200 Basic stats: PARTIAL Column stats: COMPLETE
-                    Group By Operator
-                      aggregations: count()
-                      mode: hash
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                      Reduce Output Operator
-                        sort order: 
-                        Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                        value expressions: _col0 (type: bigint)
-            Execution mode: vectorized, llap
-            LLAP IO: may be used (ACID table)
-        Reducer 2 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                aggregations: count(VALUE._col0)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                File Output Operator
-                  compressed: false
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: -1
+      limit: 1
       Processor Tree:
         ListSink
 
 PREHOOK: query: select count(*) from rct1_2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rct1_2
-PREHOOK: Input: default@rct1_2@p1=part1
-PREHOOK: Input: default@rct1_2@p1=part2
 #### A masked pattern was here ####
 POSTHOOK: query: select count(*) from rct1_2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rct1_2
-POSTHOOK: Input: default@rct1_2@p1=part1
-POSTHOOK: Input: default@rct1_2@p1=part2
 #### A masked pattern was here ####
 500
 PREHOOK: query: truncate table rct1_2
@@ -404,67 +226,21 @@ POSTHOOK: query: explain
 select count(*) from rct1_2
 POSTHOOK: type: QUERY
 STAGE DEPENDENCIES:
-  Stage-1 is a root stage
-  Stage-0 depends on stages: Stage-1
+  Stage-0 is a root stage
 
 STAGE PLANS:
-  Stage: Stage-1
-    Tez
-#### A masked pattern was here ####
-      Edges:
-        Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE)
-#### A masked pattern was here ####
-      Vertices:
-        Map 1 
-            Map Operator Tree:
-                TableScan
-                  alias: rct1_2
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                  Select Operator
-                    Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                    Group By Operator
-                      aggregations: count()
-                      mode: hash
-                      outputColumnNames: _col0
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                      Reduce Output Operator
-                        sort order: 
-                        Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                        value expressions: _col0 (type: bigint)
-            Execution mode: vectorized, llap
-            LLAP IO: may be used (ACID table)
-        Reducer 2 
-            Execution mode: vectorized, llap
-            Reduce Operator Tree:
-              Group By Operator
-                aggregations: count(VALUE._col0)
-                mode: mergepartial
-                outputColumnNames: _col0
-                Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                File Output Operator
-                  compressed: false
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE
-                  table:
-                      input format: org.apache.hadoop.mapred.SequenceFileInputFormat
-                      output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
-                      serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
-
   Stage: Stage-0
     Fetch Operator
-      limit: -1
+      limit: 1
       Processor Tree:
         ListSink
 
 PREHOOK: query: select count(*) from rct1_2
 PREHOOK: type: QUERY
 PREHOOK: Input: default@rct1_2
-PREHOOK: Input: default@rct1_2@p1=part1
-PREHOOK: Input: default@rct1_2@p1=part2
 #### A masked pattern was here ####
 POSTHOOK: query: select count(*) from rct1_2
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@rct1_2
-POSTHOOK: Input: default@rct1_2@p1=part1
-POSTHOOK: Input: default@rct1_2@p1=part2
 #### A masked pattern was here ####
 0

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/test/results/clientpositive/llap/sqlmerge_stats.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/sqlmerge_stats.q.out b/ql/src/test/results/clientpositive/llap/sqlmerge_stats.q.out
index 94d0ea3..eba16aa 100644
--- a/ql/src/test/results/clientpositive/llap/sqlmerge_stats.q.out
+++ b/ql/src/test/results/clientpositive/llap/sqlmerge_stats.q.out
@@ -88,6 +88,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"a\":\"true\",\"b\":\"true\"}}
 	bucketing_version   	2                   
 	numFiles            	1                   
 	numRows             	1                   
@@ -141,12 +142,12 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: t
-                  Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
                   Reduce Output Operator
                     key expressions: a (type: int)
                     sort order: +
                     Map-reduce partition columns: a (type: int)
-                    Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
                     value expressions: ROW__ID (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
             Execution mode: vectorized, llap
             LLAP IO: may be used (ACID table)
@@ -173,50 +174,50 @@ STAGE PLANS:
                   0 a (type: int)
                   1 a (type: int)
                 outputColumnNames: _col0, _col4, _col5, _col6
-                Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 2 Data size: 176 Basic stats: COMPLETE Column stats: COMPLETE
                 Filter Operator
                   predicate: (_col0 = _col5) (type: boolean)
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: _col4 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), _col0 (type: int)
                     outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                       sort order: +
                       Map-reduce partition columns: UDFToInteger(_col0) (type: int)
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 1 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE
                       value expressions: _col1 (type: int)
                 Filter Operator
                   predicate: (_col0 = _col5) (type: boolean)
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: _col4 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                     outputColumnNames: _col4
-                    Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE
                     Group By Operator
                       aggregations: count()
                       keys: _col4 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                       mode: hash
                       outputColumnNames: _col0, _col1
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 1 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                         sort order: +
                         Map-reduce partition columns: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                        Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 1 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE
                         value expressions: _col1 (type: bigint)
                 Filter Operator
                   predicate: _col0 is null (type: boolean)
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: _col5 (type: int), _col6 (type: int)
                     outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       sort order: 
                       Map-reduce partition columns: _col0 (type: int)
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
                       value expressions: _col0 (type: int), _col1 (type: int)
         Reducer 3 
             Execution mode: vectorized, llap
@@ -224,10 +225,10 @@ STAGE PLANS:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>), VALUE._col0 (type: int), 99 (type: int)
                 outputColumnNames: _col0, _col1, _col2
-                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
@@ -242,17 +243,17 @@ STAGE PLANS:
                 keys: KEY._col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE
                 Filter Operator
                   predicate: (_col1 > 1L) (type: boolean)
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: cardinality_violation(_col0) (type: int)
                     outputColumnNames: _col0
-                    Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
                     File Output Operator
                       compressed: false
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
                       table:
                           input format: org.apache.hadoop.mapred.TextInputFormat
                           output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -261,19 +262,19 @@ STAGE PLANS:
                     Select Operator
                       expressions: _col0 (type: int)
                       outputColumnNames: val
-                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE
                       Group By Operator
                         aggregations: compute_stats(val, 'hll')
                         mode: complete
                         outputColumnNames: _col0
-                        Statistics: Num rows: 1 Data size: 432 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 1 Data size: 424 Basic stats: COMPLETE Column stats: COMPLETE
                         Select Operator
                           expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,numdistinctvalues:bigint,ndvbitvector:binary>)
                           outputColumnNames: _col0
-                          Statistics: Num rows: 1 Data size: 432 Basic stats: COMPLETE Column stats: NONE
+                          Statistics: Num rows: 1 Data size: 424 Basic stats: COMPLETE Column stats: COMPLETE
                           File Output Operator
                             compressed: false
-                            Statistics: Num rows: 1 Data size: 432 Basic stats: COMPLETE Column stats: NONE
+                            Statistics: Num rows: 1 Data size: 424 Basic stats: COMPLETE Column stats: COMPLETE
                             table:
                                 input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                                 output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -284,10 +285,10 @@ STAGE PLANS:
               Select Operator
                 expressions: VALUE._col0 (type: int), VALUE._col1 (type: int)
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
                       output format: org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
@@ -297,15 +298,15 @@ STAGE PLANS:
                 Select Operator
                   expressions: _col0 (type: int), _col1 (type: int)
                   outputColumnNames: a, b
-                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE
                   Group By Operator
                     aggregations: compute_stats(a, 'hll'), compute_stats(b, 'hll')
                     mode: hash
                     outputColumnNames: _col0, _col1
-                    Statistics: Num rows: 1 Data size: 848 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 1 Data size: 848 Basic stats: COMPLETE Column stats: COMPLETE
                     Reduce Output Operator
                       sort order: 
-                      Statistics: Num rows: 1 Data size: 848 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 1 Data size: 848 Basic stats: COMPLETE Column stats: COMPLETE
                       value expressions: _col0 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>), _col1 (type: struct<columntype:string,min:bigint,max:bigint,countnulls:bigint,bitvector:binary>)
         Reducer 6 
             Execution mode: llap
@@ -314,10 +315,10 @@ STAGE PLANS:
                 aggregations: compute_stats(VALUE._col0), compute_stats(VALUE._col1)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1
-                Statistics: Num rows: 1 Data size: 880 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 1 Data size: 880 Basic stats: COMPLETE Column stats: COMPLETE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1 Data size: 880 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 1 Data size: 880 Basic stats: COMPLETE Column stats: COMPLETE
                   table:
                       input format: org.apache.hadoop.mapred.SequenceFileInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -425,6 +426,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	bucketing_version   	2                   
 	numFiles            	4                   
 	numRows             	2                   
@@ -490,6 +492,7 @@ Retention:          	0
 #### A masked pattern was here ####
 Table Type:         	MANAGED_TABLE       	 
 Table Parameters:	 	 
+	COLUMN_STATS_ACCURATE	{\"BASIC_STATS\":\"true\"}
 	bucketing_version   	2                   
 	numFiles            	6                   
 	numRows             	0                   

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java
index 3ee3370..7dcfc17 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AbortTxnsRequest.java
@@ -351,13 +351,13 @@ import org.slf4j.LoggerFactory;
           case 1: // TXN_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list586 = iprot.readListBegin();
-                struct.txn_ids = new ArrayList<Long>(_list586.size);
-                long _elem587;
-                for (int _i588 = 0; _i588 < _list586.size; ++_i588)
+                org.apache.thrift.protocol.TList _list594 = iprot.readListBegin();
+                struct.txn_ids = new ArrayList<Long>(_list594.size);
+                long _elem595;
+                for (int _i596 = 0; _i596 < _list594.size; ++_i596)
                 {
-                  _elem587 = iprot.readI64();
-                  struct.txn_ids.add(_elem587);
+                  _elem595 = iprot.readI64();
+                  struct.txn_ids.add(_elem595);
                 }
                 iprot.readListEnd();
               }
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(TXN_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.txn_ids.size()));
-          for (long _iter589 : struct.txn_ids)
+          for (long _iter597 : struct.txn_ids)
           {
-            oprot.writeI64(_iter589);
+            oprot.writeI64(_iter597);
           }
           oprot.writeListEnd();
         }
@@ -410,9 +410,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.txn_ids.size());
-        for (long _iter590 : struct.txn_ids)
+        for (long _iter598 : struct.txn_ids)
         {
-          oprot.writeI64(_iter590);
+          oprot.writeI64(_iter598);
         }
       }
     }
@@ -421,13 +421,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AbortTxnsRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list591 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.txn_ids = new ArrayList<Long>(_list591.size);
-        long _elem592;
-        for (int _i593 = 0; _i593 < _list591.size; ++_i593)
+        org.apache.thrift.protocol.TList _list599 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.txn_ids = new ArrayList<Long>(_list599.size);
+        long _elem600;
+        for (int _i601 = 0; _i601 < _list599.size; ++_i601)
         {
-          _elem592 = iprot.readI64();
-          struct.txn_ids.add(_elem592);
+          _elem600 = iprot.readI64();
+          struct.txn_ids.add(_elem600);
         }
       }
       struct.setTxn_idsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddCheckConstraintRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddCheckConstraintRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddCheckConstraintRequest.java
index 02d552d..8ece410 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddCheckConstraintRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddCheckConstraintRequest.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // CHECK_CONSTRAINT_COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list408 = iprot.readListBegin();
-                struct.checkConstraintCols = new ArrayList<SQLCheckConstraint>(_list408.size);
-                SQLCheckConstraint _elem409;
-                for (int _i410 = 0; _i410 < _list408.size; ++_i410)
+                org.apache.thrift.protocol.TList _list416 = iprot.readListBegin();
+                struct.checkConstraintCols = new ArrayList<SQLCheckConstraint>(_list416.size);
+                SQLCheckConstraint _elem417;
+                for (int _i418 = 0; _i418 < _list416.size; ++_i418)
                 {
-                  _elem409 = new SQLCheckConstraint();
-                  _elem409.read(iprot);
-                  struct.checkConstraintCols.add(_elem409);
+                  _elem417 = new SQLCheckConstraint();
+                  _elem417.read(iprot);
+                  struct.checkConstraintCols.add(_elem417);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(CHECK_CONSTRAINT_COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.checkConstraintCols.size()));
-          for (SQLCheckConstraint _iter411 : struct.checkConstraintCols)
+          for (SQLCheckConstraint _iter419 : struct.checkConstraintCols)
           {
-            _iter411.write(oprot);
+            _iter419.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.checkConstraintCols.size());
-        for (SQLCheckConstraint _iter412 : struct.checkConstraintCols)
+        for (SQLCheckConstraint _iter420 : struct.checkConstraintCols)
         {
-          _iter412.write(oprot);
+          _iter420.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AddCheckConstraintRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list413 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.checkConstraintCols = new ArrayList<SQLCheckConstraint>(_list413.size);
-        SQLCheckConstraint _elem414;
-        for (int _i415 = 0; _i415 < _list413.size; ++_i415)
+        org.apache.thrift.protocol.TList _list421 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.checkConstraintCols = new ArrayList<SQLCheckConstraint>(_list421.size);
+        SQLCheckConstraint _elem422;
+        for (int _i423 = 0; _i423 < _list421.size; ++_i423)
         {
-          _elem414 = new SQLCheckConstraint();
-          _elem414.read(iprot);
-          struct.checkConstraintCols.add(_elem414);
+          _elem422 = new SQLCheckConstraint();
+          _elem422.read(iprot);
+          struct.checkConstraintCols.add(_elem422);
         }
       }
       struct.setCheckConstraintColsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDefaultConstraintRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDefaultConstraintRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDefaultConstraintRequest.java
index 6acc6f8..8a125d8 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDefaultConstraintRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDefaultConstraintRequest.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // DEFAULT_CONSTRAINT_COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list400 = iprot.readListBegin();
-                struct.defaultConstraintCols = new ArrayList<SQLDefaultConstraint>(_list400.size);
-                SQLDefaultConstraint _elem401;
-                for (int _i402 = 0; _i402 < _list400.size; ++_i402)
+                org.apache.thrift.protocol.TList _list408 = iprot.readListBegin();
+                struct.defaultConstraintCols = new ArrayList<SQLDefaultConstraint>(_list408.size);
+                SQLDefaultConstraint _elem409;
+                for (int _i410 = 0; _i410 < _list408.size; ++_i410)
                 {
-                  _elem401 = new SQLDefaultConstraint();
-                  _elem401.read(iprot);
-                  struct.defaultConstraintCols.add(_elem401);
+                  _elem409 = new SQLDefaultConstraint();
+                  _elem409.read(iprot);
+                  struct.defaultConstraintCols.add(_elem409);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(DEFAULT_CONSTRAINT_COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.defaultConstraintCols.size()));
-          for (SQLDefaultConstraint _iter403 : struct.defaultConstraintCols)
+          for (SQLDefaultConstraint _iter411 : struct.defaultConstraintCols)
           {
-            _iter403.write(oprot);
+            _iter411.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.defaultConstraintCols.size());
-        for (SQLDefaultConstraint _iter404 : struct.defaultConstraintCols)
+        for (SQLDefaultConstraint _iter412 : struct.defaultConstraintCols)
         {
-          _iter404.write(oprot);
+          _iter412.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AddDefaultConstraintRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list405 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.defaultConstraintCols = new ArrayList<SQLDefaultConstraint>(_list405.size);
-        SQLDefaultConstraint _elem406;
-        for (int _i407 = 0; _i407 < _list405.size; ++_i407)
+        org.apache.thrift.protocol.TList _list413 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.defaultConstraintCols = new ArrayList<SQLDefaultConstraint>(_list413.size);
+        SQLDefaultConstraint _elem414;
+        for (int _i415 = 0; _i415 < _list413.size; ++_i415)
         {
-          _elem406 = new SQLDefaultConstraint();
-          _elem406.read(iprot);
-          struct.defaultConstraintCols.add(_elem406);
+          _elem414 = new SQLDefaultConstraint();
+          _elem414.read(iprot);
+          struct.defaultConstraintCols.add(_elem414);
         }
       }
       struct.setDefaultConstraintColsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
index 3ce72e9..45618e7 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
@@ -816,13 +816,13 @@ import org.slf4j.LoggerFactory;
           case 5: // PARTITIONNAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list708 = iprot.readListBegin();
-                struct.partitionnames = new ArrayList<String>(_list708.size);
-                String _elem709;
-                for (int _i710 = 0; _i710 < _list708.size; ++_i710)
+                org.apache.thrift.protocol.TList _list716 = iprot.readListBegin();
+                struct.partitionnames = new ArrayList<String>(_list716.size);
+                String _elem717;
+                for (int _i718 = 0; _i718 < _list716.size; ++_i718)
                 {
-                  _elem709 = iprot.readString();
-                  struct.partitionnames.add(_elem709);
+                  _elem717 = iprot.readString();
+                  struct.partitionnames.add(_elem717);
                 }
                 iprot.readListEnd();
               }
@@ -872,9 +872,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTITIONNAMES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionnames.size()));
-          for (String _iter711 : struct.partitionnames)
+          for (String _iter719 : struct.partitionnames)
           {
-            oprot.writeString(_iter711);
+            oprot.writeString(_iter719);
           }
           oprot.writeListEnd();
         }
@@ -910,9 +910,9 @@ import org.slf4j.LoggerFactory;
       oprot.writeString(struct.tablename);
       {
         oprot.writeI32(struct.partitionnames.size());
-        for (String _iter712 : struct.partitionnames)
+        for (String _iter720 : struct.partitionnames)
         {
-          oprot.writeString(_iter712);
+          oprot.writeString(_iter720);
         }
       }
       BitSet optionals = new BitSet();
@@ -937,13 +937,13 @@ import org.slf4j.LoggerFactory;
       struct.tablename = iprot.readString();
       struct.setTablenameIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list713 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.partitionnames = new ArrayList<String>(_list713.size);
-        String _elem714;
-        for (int _i715 = 0; _i715 < _list713.size; ++_i715)
+        org.apache.thrift.protocol.TList _list721 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.partitionnames = new ArrayList<String>(_list721.size);
+        String _elem722;
+        for (int _i723 = 0; _i723 < _list721.size; ++_i723)
         {
-          _elem714 = iprot.readString();
-          struct.partitionnames.add(_elem714);
+          _elem722 = iprot.readString();
+          struct.partitionnames.add(_elem722);
         }
       }
       struct.setPartitionnamesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java
index f57eb3b..0f443d4 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddForeignKeyRequest.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // FOREIGN_KEY_COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list376 = iprot.readListBegin();
-                struct.foreignKeyCols = new ArrayList<SQLForeignKey>(_list376.size);
-                SQLForeignKey _elem377;
-                for (int _i378 = 0; _i378 < _list376.size; ++_i378)
+                org.apache.thrift.protocol.TList _list384 = iprot.readListBegin();
+                struct.foreignKeyCols = new ArrayList<SQLForeignKey>(_list384.size);
+                SQLForeignKey _elem385;
+                for (int _i386 = 0; _i386 < _list384.size; ++_i386)
                 {
-                  _elem377 = new SQLForeignKey();
-                  _elem377.read(iprot);
-                  struct.foreignKeyCols.add(_elem377);
+                  _elem385 = new SQLForeignKey();
+                  _elem385.read(iprot);
+                  struct.foreignKeyCols.add(_elem385);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FOREIGN_KEY_COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeyCols.size()));
-          for (SQLForeignKey _iter379 : struct.foreignKeyCols)
+          for (SQLForeignKey _iter387 : struct.foreignKeyCols)
           {
-            _iter379.write(oprot);
+            _iter387.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.foreignKeyCols.size());
-        for (SQLForeignKey _iter380 : struct.foreignKeyCols)
+        for (SQLForeignKey _iter388 : struct.foreignKeyCols)
         {
-          _iter380.write(oprot);
+          _iter388.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AddForeignKeyRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list381 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.foreignKeyCols = new ArrayList<SQLForeignKey>(_list381.size);
-        SQLForeignKey _elem382;
-        for (int _i383 = 0; _i383 < _list381.size; ++_i383)
+        org.apache.thrift.protocol.TList _list389 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.foreignKeyCols = new ArrayList<SQLForeignKey>(_list389.size);
+        SQLForeignKey _elem390;
+        for (int _i391 = 0; _i391 < _list389.size; ++_i391)
         {
-          _elem382 = new SQLForeignKey();
-          _elem382.read(iprot);
-          struct.foreignKeyCols.add(_elem382);
+          _elem390 = new SQLForeignKey();
+          _elem390.read(iprot);
+          struct.foreignKeyCols.add(_elem390);
         }
       }
       struct.setForeignKeyColsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java
index e6bac16..0266bba 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddNotNullConstraintRequest.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // NOT_NULL_CONSTRAINT_COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list392 = iprot.readListBegin();
-                struct.notNullConstraintCols = new ArrayList<SQLNotNullConstraint>(_list392.size);
-                SQLNotNullConstraint _elem393;
-                for (int _i394 = 0; _i394 < _list392.size; ++_i394)
+                org.apache.thrift.protocol.TList _list400 = iprot.readListBegin();
+                struct.notNullConstraintCols = new ArrayList<SQLNotNullConstraint>(_list400.size);
+                SQLNotNullConstraint _elem401;
+                for (int _i402 = 0; _i402 < _list400.size; ++_i402)
                 {
-                  _elem393 = new SQLNotNullConstraint();
-                  _elem393.read(iprot);
-                  struct.notNullConstraintCols.add(_elem393);
+                  _elem401 = new SQLNotNullConstraint();
+                  _elem401.read(iprot);
+                  struct.notNullConstraintCols.add(_elem401);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(NOT_NULL_CONSTRAINT_COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraintCols.size()));
-          for (SQLNotNullConstraint _iter395 : struct.notNullConstraintCols)
+          for (SQLNotNullConstraint _iter403 : struct.notNullConstraintCols)
           {
-            _iter395.write(oprot);
+            _iter403.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.notNullConstraintCols.size());
-        for (SQLNotNullConstraint _iter396 : struct.notNullConstraintCols)
+        for (SQLNotNullConstraint _iter404 : struct.notNullConstraintCols)
         {
-          _iter396.write(oprot);
+          _iter404.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AddNotNullConstraintRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list397 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.notNullConstraintCols = new ArrayList<SQLNotNullConstraint>(_list397.size);
-        SQLNotNullConstraint _elem398;
-        for (int _i399 = 0; _i399 < _list397.size; ++_i399)
+        org.apache.thrift.protocol.TList _list405 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.notNullConstraintCols = new ArrayList<SQLNotNullConstraint>(_list405.size);
+        SQLNotNullConstraint _elem406;
+        for (int _i407 = 0; _i407 < _list405.size; ++_i407)
         {
-          _elem398 = new SQLNotNullConstraint();
-          _elem398.read(iprot);
-          struct.notNullConstraintCols.add(_elem398);
+          _elem406 = new SQLNotNullConstraint();
+          _elem406.read(iprot);
+          struct.notNullConstraintCols.add(_elem406);
         }
       }
       struct.setNotNullConstraintColsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
index 56e5043..ec42631 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
@@ -944,14 +944,14 @@ import org.slf4j.LoggerFactory;
           case 3: // PARTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list482 = iprot.readListBegin();
-                struct.parts = new ArrayList<Partition>(_list482.size);
-                Partition _elem483;
-                for (int _i484 = 0; _i484 < _list482.size; ++_i484)
+                org.apache.thrift.protocol.TList _list490 = iprot.readListBegin();
+                struct.parts = new ArrayList<Partition>(_list490.size);
+                Partition _elem491;
+                for (int _i492 = 0; _i492 < _list490.size; ++_i492)
                 {
-                  _elem483 = new Partition();
-                  _elem483.read(iprot);
-                  struct.parts.add(_elem483);
+                  _elem491 = new Partition();
+                  _elem491.read(iprot);
+                  struct.parts.add(_elem491);
                 }
                 iprot.readListEnd();
               }
@@ -1027,9 +1027,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.parts.size()));
-          for (Partition _iter485 : struct.parts)
+          for (Partition _iter493 : struct.parts)
           {
-            _iter485.write(oprot);
+            _iter493.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1083,9 +1083,9 @@ import org.slf4j.LoggerFactory;
       oprot.writeString(struct.tblName);
       {
         oprot.writeI32(struct.parts.size());
-        for (Partition _iter486 : struct.parts)
+        for (Partition _iter494 : struct.parts)
         {
-          _iter486.write(oprot);
+          _iter494.write(oprot);
         }
       }
       oprot.writeBool(struct.ifNotExists);
@@ -1125,14 +1125,14 @@ import org.slf4j.LoggerFactory;
       struct.tblName = iprot.readString();
       struct.setTblNameIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list487 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.parts = new ArrayList<Partition>(_list487.size);
-        Partition _elem488;
-        for (int _i489 = 0; _i489 < _list487.size; ++_i489)
+        org.apache.thrift.protocol.TList _list495 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.parts = new ArrayList<Partition>(_list495.size);
+        Partition _elem496;
+        for (int _i497 = 0; _i497 < _list495.size; ++_i497)
         {
-          _elem488 = new Partition();
-          _elem488.read(iprot);
-          struct.parts.add(_elem488);
+          _elem496 = new Partition();
+          _elem496.read(iprot);
+          struct.parts.add(_elem496);
         }
       }
       struct.setPartsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
index 3c0bf82..a00af60 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
@@ -426,14 +426,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PARTITIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list474 = iprot.readListBegin();
-                struct.partitions = new ArrayList<Partition>(_list474.size);
-                Partition _elem475;
-                for (int _i476 = 0; _i476 < _list474.size; ++_i476)
+                org.apache.thrift.protocol.TList _list482 = iprot.readListBegin();
+                struct.partitions = new ArrayList<Partition>(_list482.size);
+                Partition _elem483;
+                for (int _i484 = 0; _i484 < _list482.size; ++_i484)
                 {
-                  _elem475 = new Partition();
-                  _elem475.read(iprot);
-                  struct.partitions.add(_elem475);
+                  _elem483 = new Partition();
+                  _elem483.read(iprot);
+                  struct.partitions.add(_elem483);
                 }
                 iprot.readListEnd();
               }
@@ -468,9 +468,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
-            for (Partition _iter477 : struct.partitions)
+            for (Partition _iter485 : struct.partitions)
             {
-              _iter477.write(oprot);
+              _iter485.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -510,9 +510,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartitions()) {
         {
           oprot.writeI32(struct.partitions.size());
-          for (Partition _iter478 : struct.partitions)
+          for (Partition _iter486 : struct.partitions)
           {
-            _iter478.write(oprot);
+            _iter486.write(oprot);
           }
         }
       }
@@ -527,14 +527,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list479 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.partitions = new ArrayList<Partition>(_list479.size);
-          Partition _elem480;
-          for (int _i481 = 0; _i481 < _list479.size; ++_i481)
+          org.apache.thrift.protocol.TList _list487 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.partitions = new ArrayList<Partition>(_list487.size);
+          Partition _elem488;
+          for (int _i489 = 0; _i489 < _list487.size; ++_i489)
           {
-            _elem480 = new Partition();
-            _elem480.read(iprot);
-            struct.partitions.add(_elem480);
+            _elem488 = new Partition();
+            _elem488.read(iprot);
+            struct.partitions.add(_elem488);
           }
         }
         struct.setPartitionsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java
index 39bb6be..9069a41 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPrimaryKeyRequest.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PRIMARY_KEY_COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list368 = iprot.readListBegin();
-                struct.primaryKeyCols = new ArrayList<SQLPrimaryKey>(_list368.size);
-                SQLPrimaryKey _elem369;
-                for (int _i370 = 0; _i370 < _list368.size; ++_i370)
+                org.apache.thrift.protocol.TList _list376 = iprot.readListBegin();
+                struct.primaryKeyCols = new ArrayList<SQLPrimaryKey>(_list376.size);
+                SQLPrimaryKey _elem377;
+                for (int _i378 = 0; _i378 < _list376.size; ++_i378)
                 {
-                  _elem369 = new SQLPrimaryKey();
-                  _elem369.read(iprot);
-                  struct.primaryKeyCols.add(_elem369);
+                  _elem377 = new SQLPrimaryKey();
+                  _elem377.read(iprot);
+                  struct.primaryKeyCols.add(_elem377);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PRIMARY_KEY_COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeyCols.size()));
-          for (SQLPrimaryKey _iter371 : struct.primaryKeyCols)
+          for (SQLPrimaryKey _iter379 : struct.primaryKeyCols)
           {
-            _iter371.write(oprot);
+            _iter379.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.primaryKeyCols.size());
-        for (SQLPrimaryKey _iter372 : struct.primaryKeyCols)
+        for (SQLPrimaryKey _iter380 : struct.primaryKeyCols)
         {
-          _iter372.write(oprot);
+          _iter380.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AddPrimaryKeyRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list373 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.primaryKeyCols = new ArrayList<SQLPrimaryKey>(_list373.size);
-        SQLPrimaryKey _elem374;
-        for (int _i375 = 0; _i375 < _list373.size; ++_i375)
+        org.apache.thrift.protocol.TList _list381 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.primaryKeyCols = new ArrayList<SQLPrimaryKey>(_list381.size);
+        SQLPrimaryKey _elem382;
+        for (int _i383 = 0; _i383 < _list381.size; ++_i383)
         {
-          _elem374 = new SQLPrimaryKey();
-          _elem374.read(iprot);
-          struct.primaryKeyCols.add(_elem374);
+          _elem382 = new SQLPrimaryKey();
+          _elem382.read(iprot);
+          struct.primaryKeyCols.add(_elem382);
         }
       }
       struct.setPrimaryKeyColsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java
index bcb1e6b..c47db4a 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddUniqueConstraintRequest.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // UNIQUE_CONSTRAINT_COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list384 = iprot.readListBegin();
-                struct.uniqueConstraintCols = new ArrayList<SQLUniqueConstraint>(_list384.size);
-                SQLUniqueConstraint _elem385;
-                for (int _i386 = 0; _i386 < _list384.size; ++_i386)
+                org.apache.thrift.protocol.TList _list392 = iprot.readListBegin();
+                struct.uniqueConstraintCols = new ArrayList<SQLUniqueConstraint>(_list392.size);
+                SQLUniqueConstraint _elem393;
+                for (int _i394 = 0; _i394 < _list392.size; ++_i394)
                 {
-                  _elem385 = new SQLUniqueConstraint();
-                  _elem385.read(iprot);
-                  struct.uniqueConstraintCols.add(_elem385);
+                  _elem393 = new SQLUniqueConstraint();
+                  _elem393.read(iprot);
+                  struct.uniqueConstraintCols.add(_elem393);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(UNIQUE_CONSTRAINT_COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraintCols.size()));
-          for (SQLUniqueConstraint _iter387 : struct.uniqueConstraintCols)
+          for (SQLUniqueConstraint _iter395 : struct.uniqueConstraintCols)
           {
-            _iter387.write(oprot);
+            _iter395.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.uniqueConstraintCols.size());
-        for (SQLUniqueConstraint _iter388 : struct.uniqueConstraintCols)
+        for (SQLUniqueConstraint _iter396 : struct.uniqueConstraintCols)
         {
-          _iter388.write(oprot);
+          _iter396.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AddUniqueConstraintRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list389 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.uniqueConstraintCols = new ArrayList<SQLUniqueConstraint>(_list389.size);
-        SQLUniqueConstraint _elem390;
-        for (int _i391 = 0; _i391 < _list389.size; ++_i391)
+        org.apache.thrift.protocol.TList _list397 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.uniqueConstraintCols = new ArrayList<SQLUniqueConstraint>(_list397.size);
+        SQLUniqueConstraint _elem398;
+        for (int _i399 = 0; _i399 < _list397.size; ++_i399)
         {
-          _elem390 = new SQLUniqueConstraint();
-          _elem390.read(iprot);
-          struct.uniqueConstraintCols.add(_elem390);
+          _elem398 = new SQLUniqueConstraint();
+          _elem398.read(iprot);
+          struct.uniqueConstraintCols.add(_elem398);
         }
       }
       struct.setUniqueConstraintColsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java
index 87b8fea..67d9b10 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AggrStats.java
@@ -516,14 +516,14 @@ import org.slf4j.LoggerFactory;
           case 1: // COL_STATS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list276 = iprot.readListBegin();
-                struct.colStats = new ArrayList<ColumnStatisticsObj>(_list276.size);
-                ColumnStatisticsObj _elem277;
-                for (int _i278 = 0; _i278 < _list276.size; ++_i278)
+                org.apache.thrift.protocol.TList _list284 = iprot.readListBegin();
+                struct.colStats = new ArrayList<ColumnStatisticsObj>(_list284.size);
+                ColumnStatisticsObj _elem285;
+                for (int _i286 = 0; _i286 < _list284.size; ++_i286)
                 {
-                  _elem277 = new ColumnStatisticsObj();
-                  _elem277.read(iprot);
-                  struct.colStats.add(_elem277);
+                  _elem285 = new ColumnStatisticsObj();
+                  _elem285.read(iprot);
+                  struct.colStats.add(_elem285);
                 }
                 iprot.readListEnd();
               }
@@ -565,9 +565,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COL_STATS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.colStats.size()));
-          for (ColumnStatisticsObj _iter279 : struct.colStats)
+          for (ColumnStatisticsObj _iter287 : struct.colStats)
           {
-            _iter279.write(oprot);
+            _iter287.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -600,9 +600,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.colStats.size());
-        for (ColumnStatisticsObj _iter280 : struct.colStats)
+        for (ColumnStatisticsObj _iter288 : struct.colStats)
         {
-          _iter280.write(oprot);
+          _iter288.write(oprot);
         }
       }
       oprot.writeI64(struct.partsFound);
@@ -620,14 +620,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AggrStats struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list281 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.colStats = new ArrayList<ColumnStatisticsObj>(_list281.size);
-        ColumnStatisticsObj _elem282;
-        for (int _i283 = 0; _i283 < _list281.size; ++_i283)
+        org.apache.thrift.protocol.TList _list289 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.colStats = new ArrayList<ColumnStatisticsObj>(_list289.size);
+        ColumnStatisticsObj _elem290;
+        for (int _i291 = 0; _i291 < _list289.size; ++_i291)
         {
-          _elem282 = new ColumnStatisticsObj();
-          _elem282.read(iprot);
-          struct.colStats.add(_elem282);
+          _elem290 = new ColumnStatisticsObj();
+          _elem290.read(iprot);
+          struct.colStats.add(_elem290);
         }
       }
       struct.setColStatsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java
index a0b47a9..5fcb98f 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsRequest.java
@@ -716,13 +716,13 @@ import org.slf4j.LoggerFactory;
           case 3: // TXN_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list634 = iprot.readListBegin();
-                struct.txnIds = new ArrayList<Long>(_list634.size);
-                long _elem635;
-                for (int _i636 = 0; _i636 < _list634.size; ++_i636)
+                org.apache.thrift.protocol.TList _list642 = iprot.readListBegin();
+                struct.txnIds = new ArrayList<Long>(_list642.size);
+                long _elem643;
+                for (int _i644 = 0; _i644 < _list642.size; ++_i644)
                 {
-                  _elem635 = iprot.readI64();
-                  struct.txnIds.add(_elem635);
+                  _elem643 = iprot.readI64();
+                  struct.txnIds.add(_elem643);
                 }
                 iprot.readListEnd();
               }
@@ -742,14 +742,14 @@ import org.slf4j.LoggerFactory;
           case 5: // SRC_TXN_TO_WRITE_ID_LIST
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list637 = iprot.readListBegin();
-                struct.srcTxnToWriteIdList = new ArrayList<TxnToWriteId>(_list637.size);
-                TxnToWriteId _elem638;
-                for (int _i639 = 0; _i639 < _list637.size; ++_i639)
+                org.apache.thrift.protocol.TList _list645 = iprot.readListBegin();
+                struct.srcTxnToWriteIdList = new ArrayList<TxnToWriteId>(_list645.size);
+                TxnToWriteId _elem646;
+                for (int _i647 = 0; _i647 < _list645.size; ++_i647)
                 {
-                  _elem638 = new TxnToWriteId();
-                  _elem638.read(iprot);
-                  struct.srcTxnToWriteIdList.add(_elem638);
+                  _elem646 = new TxnToWriteId();
+                  _elem646.read(iprot);
+                  struct.srcTxnToWriteIdList.add(_elem646);
                 }
                 iprot.readListEnd();
               }
@@ -786,9 +786,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(TXN_IDS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.txnIds.size()));
-            for (long _iter640 : struct.txnIds)
+            for (long _iter648 : struct.txnIds)
             {
-              oprot.writeI64(_iter640);
+              oprot.writeI64(_iter648);
             }
             oprot.writeListEnd();
           }
@@ -807,9 +807,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SRC_TXN_TO_WRITE_ID_LIST_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.srcTxnToWriteIdList.size()));
-            for (TxnToWriteId _iter641 : struct.srcTxnToWriteIdList)
+            for (TxnToWriteId _iter649 : struct.srcTxnToWriteIdList)
             {
-              _iter641.write(oprot);
+              _iter649.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -849,9 +849,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetTxnIds()) {
         {
           oprot.writeI32(struct.txnIds.size());
-          for (long _iter642 : struct.txnIds)
+          for (long _iter650 : struct.txnIds)
           {
-            oprot.writeI64(_iter642);
+            oprot.writeI64(_iter650);
           }
         }
       }
@@ -861,9 +861,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetSrcTxnToWriteIdList()) {
         {
           oprot.writeI32(struct.srcTxnToWriteIdList.size());
-          for (TxnToWriteId _iter643 : struct.srcTxnToWriteIdList)
+          for (TxnToWriteId _iter651 : struct.srcTxnToWriteIdList)
           {
-            _iter643.write(oprot);
+            _iter651.write(oprot);
           }
         }
       }
@@ -879,13 +879,13 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list644 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-          struct.txnIds = new ArrayList<Long>(_list644.size);
-          long _elem645;
-          for (int _i646 = 0; _i646 < _list644.size; ++_i646)
+          org.apache.thrift.protocol.TList _list652 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+          struct.txnIds = new ArrayList<Long>(_list652.size);
+          long _elem653;
+          for (int _i654 = 0; _i654 < _list652.size; ++_i654)
           {
-            _elem645 = iprot.readI64();
-            struct.txnIds.add(_elem645);
+            _elem653 = iprot.readI64();
+            struct.txnIds.add(_elem653);
           }
         }
         struct.setTxnIdsIsSet(true);
@@ -896,14 +896,14 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list647 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.srcTxnToWriteIdList = new ArrayList<TxnToWriteId>(_list647.size);
-          TxnToWriteId _elem648;
-          for (int _i649 = 0; _i649 < _list647.size; ++_i649)
+          org.apache.thrift.protocol.TList _list655 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.srcTxnToWriteIdList = new ArrayList<TxnToWriteId>(_list655.size);
+          TxnToWriteId _elem656;
+          for (int _i657 = 0; _i657 < _list655.size; ++_i657)
           {
-            _elem648 = new TxnToWriteId();
-            _elem648.read(iprot);
-            struct.srcTxnToWriteIdList.add(_elem648);
+            _elem656 = new TxnToWriteId();
+            _elem656.read(iprot);
+            struct.srcTxnToWriteIdList.add(_elem656);
           }
         }
         struct.setSrcTxnToWriteIdListIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java
index 13df26d..2a13eba 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AllocateTableWriteIdsResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // TXN_TO_WRITE_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list650 = iprot.readListBegin();
-                struct.txnToWriteIds = new ArrayList<TxnToWriteId>(_list650.size);
-                TxnToWriteId _elem651;
-                for (int _i652 = 0; _i652 < _list650.size; ++_i652)
+                org.apache.thrift.protocol.TList _list658 = iprot.readListBegin();
+                struct.txnToWriteIds = new ArrayList<TxnToWriteId>(_list658.size);
+                TxnToWriteId _elem659;
+                for (int _i660 = 0; _i660 < _list658.size; ++_i660)
                 {
-                  _elem651 = new TxnToWriteId();
-                  _elem651.read(iprot);
-                  struct.txnToWriteIds.add(_elem651);
+                  _elem659 = new TxnToWriteId();
+                  _elem659.read(iprot);
+                  struct.txnToWriteIds.add(_elem659);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(TXN_TO_WRITE_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.txnToWriteIds.size()));
-          for (TxnToWriteId _iter653 : struct.txnToWriteIds)
+          for (TxnToWriteId _iter661 : struct.txnToWriteIds)
           {
-            _iter653.write(oprot);
+            _iter661.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.txnToWriteIds.size());
-        for (TxnToWriteId _iter654 : struct.txnToWriteIds)
+        for (TxnToWriteId _iter662 : struct.txnToWriteIds)
         {
-          _iter654.write(oprot);
+          _iter662.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, AllocateTableWriteIdsResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list655 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.txnToWriteIds = new ArrayList<TxnToWriteId>(_list655.size);
-        TxnToWriteId _elem656;
-        for (int _i657 = 0; _i657 < _list655.size; ++_i657)
+        org.apache.thrift.protocol.TList _list663 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.txnToWriteIds = new ArrayList<TxnToWriteId>(_list663.size);
+        TxnToWriteId _elem664;
+        for (int _i665 = 0; _i665 < _list663.size; ++_i665)
         {
-          _elem656 = new TxnToWriteId();
-          _elem656.read(iprot);
-          struct.txnToWriteIds.add(_elem656);
+          _elem664 = new TxnToWriteId();
+          _elem664.read(iprot);
+          struct.txnToWriteIds.add(_elem664);
         }
       }
       struct.setTxnToWriteIdsIsSet(true);


[16/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java
index 87dc3f1..fd4619f 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java
@@ -40,9 +40,7 @@ import org.slf4j.LoggerFactory;
 
   private static final org.apache.thrift.protocol.TField STATS_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("statsDesc", org.apache.thrift.protocol.TType.STRUCT, (short)1);
   private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("statsObj", org.apache.thrift.protocol.TType.LIST, (short)2);
-  private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)3);
-  private static final org.apache.thrift.protocol.TField VALID_WRITE_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validWriteIdList", org.apache.thrift.protocol.TType.STRING, (short)4);
-  private static final org.apache.thrift.protocol.TField IS_STATS_COMPLIANT_FIELD_DESC = new org.apache.thrift.protocol.TField("isStatsCompliant", org.apache.thrift.protocol.TType.BOOL, (short)5);
+  private static final org.apache.thrift.protocol.TField IS_STATS_COMPLIANT_FIELD_DESC = new org.apache.thrift.protocol.TField("isStatsCompliant", org.apache.thrift.protocol.TType.BOOL, (short)3);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -52,17 +50,13 @@ import org.slf4j.LoggerFactory;
 
   private ColumnStatisticsDesc statsDesc; // required
   private List<ColumnStatisticsObj> statsObj; // required
-  private long txnId; // optional
-  private String validWriteIdList; // optional
   private boolean isStatsCompliant; // 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 {
     STATS_DESC((short)1, "statsDesc"),
     STATS_OBJ((short)2, "statsObj"),
-    TXN_ID((short)3, "txnId"),
-    VALID_WRITE_ID_LIST((short)4, "validWriteIdList"),
-    IS_STATS_COMPLIANT((short)5, "isStatsCompliant");
+    IS_STATS_COMPLIANT((short)3, "isStatsCompliant");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -81,11 +75,7 @@ import org.slf4j.LoggerFactory;
           return STATS_DESC;
         case 2: // STATS_OBJ
           return STATS_OBJ;
-        case 3: // TXN_ID
-          return TXN_ID;
-        case 4: // VALID_WRITE_ID_LIST
-          return VALID_WRITE_ID_LIST;
-        case 5: // IS_STATS_COMPLIANT
+        case 3: // IS_STATS_COMPLIANT
           return IS_STATS_COMPLIANT;
         default:
           return null;
@@ -127,10 +117,9 @@ import org.slf4j.LoggerFactory;
   }
 
   // isset id assignments
-  private static final int __TXNID_ISSET_ID = 0;
-  private static final int __ISSTATSCOMPLIANT_ISSET_ID = 1;
+  private static final int __ISSTATSCOMPLIANT_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.TXN_ID,_Fields.VALID_WRITE_ID_LIST,_Fields.IS_STATS_COMPLIANT};
+  private static final _Fields optionals[] = {_Fields.IS_STATS_COMPLIANT};
   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);
@@ -139,10 +128,6 @@ import org.slf4j.LoggerFactory;
     tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("statsObj", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class))));
-    tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-    tmpMap.put(_Fields.VALID_WRITE_ID_LIST, new org.apache.thrift.meta_data.FieldMetaData("validWriteIdList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.IS_STATS_COMPLIANT, new org.apache.thrift.meta_data.FieldMetaData("isStatsCompliant", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -150,8 +135,6 @@ import org.slf4j.LoggerFactory;
   }
 
   public ColumnStatistics() {
-    this.txnId = -1L;
-
   }
 
   public ColumnStatistics(
@@ -178,10 +161,6 @@ import org.slf4j.LoggerFactory;
       }
       this.statsObj = __this__statsObj;
     }
-    this.txnId = other.txnId;
-    if (other.isSetValidWriteIdList()) {
-      this.validWriteIdList = other.validWriteIdList;
-    }
     this.isStatsCompliant = other.isStatsCompliant;
   }
 
@@ -193,9 +172,6 @@ import org.slf4j.LoggerFactory;
   public void clear() {
     this.statsDesc = null;
     this.statsObj = null;
-    this.txnId = -1L;
-
-    this.validWriteIdList = null;
     setIsStatsCompliantIsSet(false);
     this.isStatsCompliant = false;
   }
@@ -261,51 +237,6 @@ import org.slf4j.LoggerFactory;
     }
   }
 
-  public long getTxnId() {
-    return this.txnId;
-  }
-
-  public void setTxnId(long txnId) {
-    this.txnId = txnId;
-    setTxnIdIsSet(true);
-  }
-
-  public void unsetTxnId() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID);
-  }
-
-  /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
-  public boolean isSetTxnId() {
-    return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID);
-  }
-
-  public void setTxnIdIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
-  }
-
-  public String getValidWriteIdList() {
-    return this.validWriteIdList;
-  }
-
-  public void setValidWriteIdList(String validWriteIdList) {
-    this.validWriteIdList = validWriteIdList;
-  }
-
-  public void unsetValidWriteIdList() {
-    this.validWriteIdList = null;
-  }
-
-  /** Returns true if field validWriteIdList is set (has been assigned a value) and false otherwise */
-  public boolean isSetValidWriteIdList() {
-    return this.validWriteIdList != null;
-  }
-
-  public void setValidWriteIdListIsSet(boolean value) {
-    if (!value) {
-      this.validWriteIdList = null;
-    }
-  }
-
   public boolean isIsStatsCompliant() {
     return this.isStatsCompliant;
   }
@@ -346,22 +277,6 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
-    case TXN_ID:
-      if (value == null) {
-        unsetTxnId();
-      } else {
-        setTxnId((Long)value);
-      }
-      break;
-
-    case VALID_WRITE_ID_LIST:
-      if (value == null) {
-        unsetValidWriteIdList();
-      } else {
-        setValidWriteIdList((String)value);
-      }
-      break;
-
     case IS_STATS_COMPLIANT:
       if (value == null) {
         unsetIsStatsCompliant();
@@ -381,12 +296,6 @@ import org.slf4j.LoggerFactory;
     case STATS_OBJ:
       return getStatsObj();
 
-    case TXN_ID:
-      return getTxnId();
-
-    case VALID_WRITE_ID_LIST:
-      return getValidWriteIdList();
-
     case IS_STATS_COMPLIANT:
       return isIsStatsCompliant();
 
@@ -405,10 +314,6 @@ import org.slf4j.LoggerFactory;
       return isSetStatsDesc();
     case STATS_OBJ:
       return isSetStatsObj();
-    case TXN_ID:
-      return isSetTxnId();
-    case VALID_WRITE_ID_LIST:
-      return isSetValidWriteIdList();
     case IS_STATS_COMPLIANT:
       return isSetIsStatsCompliant();
     }
@@ -446,24 +351,6 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
-    boolean this_present_txnId = true && this.isSetTxnId();
-    boolean that_present_txnId = true && that.isSetTxnId();
-    if (this_present_txnId || that_present_txnId) {
-      if (!(this_present_txnId && that_present_txnId))
-        return false;
-      if (this.txnId != that.txnId)
-        return false;
-    }
-
-    boolean this_present_validWriteIdList = true && this.isSetValidWriteIdList();
-    boolean that_present_validWriteIdList = true && that.isSetValidWriteIdList();
-    if (this_present_validWriteIdList || that_present_validWriteIdList) {
-      if (!(this_present_validWriteIdList && that_present_validWriteIdList))
-        return false;
-      if (!this.validWriteIdList.equals(that.validWriteIdList))
-        return false;
-    }
-
     boolean this_present_isStatsCompliant = true && this.isSetIsStatsCompliant();
     boolean that_present_isStatsCompliant = true && that.isSetIsStatsCompliant();
     if (this_present_isStatsCompliant || that_present_isStatsCompliant) {
@@ -490,16 +377,6 @@ import org.slf4j.LoggerFactory;
     if (present_statsObj)
       list.add(statsObj);
 
-    boolean present_txnId = true && (isSetTxnId());
-    list.add(present_txnId);
-    if (present_txnId)
-      list.add(txnId);
-
-    boolean present_validWriteIdList = true && (isSetValidWriteIdList());
-    list.add(present_validWriteIdList);
-    if (present_validWriteIdList)
-      list.add(validWriteIdList);
-
     boolean present_isStatsCompliant = true && (isSetIsStatsCompliant());
     list.add(present_isStatsCompliant);
     if (present_isStatsCompliant)
@@ -536,26 +413,6 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(other.isSetTxnId());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetTxnId()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, other.txnId);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetValidWriteIdList()).compareTo(other.isSetValidWriteIdList());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetValidWriteIdList()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validWriteIdList, other.validWriteIdList);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     lastComparison = Boolean.valueOf(isSetIsStatsCompliant()).compareTo(other.isSetIsStatsCompliant());
     if (lastComparison != 0) {
       return lastComparison;
@@ -601,22 +458,6 @@ import org.slf4j.LoggerFactory;
       sb.append(this.statsObj);
     }
     first = false;
-    if (isSetTxnId()) {
-      if (!first) sb.append(", ");
-      sb.append("txnId:");
-      sb.append(this.txnId);
-      first = false;
-    }
-    if (isSetValidWriteIdList()) {
-      if (!first) sb.append(", ");
-      sb.append("validWriteIdList:");
-      if (this.validWriteIdList == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.validWriteIdList);
-      }
-      first = false;
-    }
     if (isSetIsStatsCompliant()) {
       if (!first) sb.append(", ");
       sb.append("isStatsCompliant:");
@@ -691,14 +532,14 @@ import org.slf4j.LoggerFactory;
           case 2: // STATS_OBJ
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list268 = iprot.readListBegin();
-                struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list268.size);
-                ColumnStatisticsObj _elem269;
-                for (int _i270 = 0; _i270 < _list268.size; ++_i270)
+                org.apache.thrift.protocol.TList _list276 = iprot.readListBegin();
+                struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list276.size);
+                ColumnStatisticsObj _elem277;
+                for (int _i278 = 0; _i278 < _list276.size; ++_i278)
                 {
-                  _elem269 = new ColumnStatisticsObj();
-                  _elem269.read(iprot);
-                  struct.statsObj.add(_elem269);
+                  _elem277 = new ColumnStatisticsObj();
+                  _elem277.read(iprot);
+                  struct.statsObj.add(_elem277);
                 }
                 iprot.readListEnd();
               }
@@ -707,23 +548,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // TXN_ID
-            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
-              struct.txnId = iprot.readI64();
-              struct.setTxnIdIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // VALID_WRITE_ID_LIST
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.validWriteIdList = iprot.readString();
-              struct.setValidWriteIdListIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 5: // IS_STATS_COMPLIANT
+          case 3: // IS_STATS_COMPLIANT
             if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
               struct.isStatsCompliant = iprot.readBool();
               struct.setIsStatsCompliantIsSet(true);
@@ -753,26 +578,14 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.statsObj.size()));
-          for (ColumnStatisticsObj _iter271 : struct.statsObj)
+          for (ColumnStatisticsObj _iter279 : struct.statsObj)
           {
-            _iter271.write(oprot);
+            _iter279.write(oprot);
           }
           oprot.writeListEnd();
         }
         oprot.writeFieldEnd();
       }
-      if (struct.isSetTxnId()) {
-        oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
-        oprot.writeI64(struct.txnId);
-        oprot.writeFieldEnd();
-      }
-      if (struct.validWriteIdList != null) {
-        if (struct.isSetValidWriteIdList()) {
-          oprot.writeFieldBegin(VALID_WRITE_ID_LIST_FIELD_DESC);
-          oprot.writeString(struct.validWriteIdList);
-          oprot.writeFieldEnd();
-        }
-      }
       if (struct.isSetIsStatsCompliant()) {
         oprot.writeFieldBegin(IS_STATS_COMPLIANT_FIELD_DESC);
         oprot.writeBool(struct.isStatsCompliant);
@@ -798,28 +611,16 @@ import org.slf4j.LoggerFactory;
       struct.statsDesc.write(oprot);
       {
         oprot.writeI32(struct.statsObj.size());
-        for (ColumnStatisticsObj _iter272 : struct.statsObj)
+        for (ColumnStatisticsObj _iter280 : struct.statsObj)
         {
-          _iter272.write(oprot);
+          _iter280.write(oprot);
         }
       }
       BitSet optionals = new BitSet();
-      if (struct.isSetTxnId()) {
-        optionals.set(0);
-      }
-      if (struct.isSetValidWriteIdList()) {
-        optionals.set(1);
-      }
       if (struct.isSetIsStatsCompliant()) {
-        optionals.set(2);
-      }
-      oprot.writeBitSet(optionals, 3);
-      if (struct.isSetTxnId()) {
-        oprot.writeI64(struct.txnId);
-      }
-      if (struct.isSetValidWriteIdList()) {
-        oprot.writeString(struct.validWriteIdList);
+        optionals.set(0);
       }
+      oprot.writeBitSet(optionals, 1);
       if (struct.isSetIsStatsCompliant()) {
         oprot.writeBool(struct.isStatsCompliant);
       }
@@ -832,27 +633,19 @@ import org.slf4j.LoggerFactory;
       struct.statsDesc.read(iprot);
       struct.setStatsDescIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list273 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list273.size);
-        ColumnStatisticsObj _elem274;
-        for (int _i275 = 0; _i275 < _list273.size; ++_i275)
+        org.apache.thrift.protocol.TList _list281 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list281.size);
+        ColumnStatisticsObj _elem282;
+        for (int _i283 = 0; _i283 < _list281.size; ++_i283)
         {
-          _elem274 = new ColumnStatisticsObj();
-          _elem274.read(iprot);
-          struct.statsObj.add(_elem274);
+          _elem282 = new ColumnStatisticsObj();
+          _elem282.read(iprot);
+          struct.statsObj.add(_elem282);
         }
       }
       struct.setStatsObjIsSet(true);
-      BitSet incoming = iprot.readBitSet(3);
+      BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
-        struct.txnId = iprot.readI64();
-        struct.setTxnIdIsSet(true);
-      }
-      if (incoming.get(1)) {
-        struct.validWriteIdList = iprot.readString();
-        struct.setValidWriteIdListIsSet(true);
-      }
-      if (incoming.get(2)) {
         struct.isStatsCompliant = iprot.readBool();
         struct.setIsStatsCompliantIsSet(true);
       }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java
index f295958..db47f9d 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java
@@ -533,14 +533,14 @@ import org.slf4j.LoggerFactory;
           case 3: // WRITE_EVENT_INFOS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list594 = iprot.readListBegin();
-                struct.writeEventInfos = new ArrayList<WriteEventInfo>(_list594.size);
-                WriteEventInfo _elem595;
-                for (int _i596 = 0; _i596 < _list594.size; ++_i596)
+                org.apache.thrift.protocol.TList _list602 = iprot.readListBegin();
+                struct.writeEventInfos = new ArrayList<WriteEventInfo>(_list602.size);
+                WriteEventInfo _elem603;
+                for (int _i604 = 0; _i604 < _list602.size; ++_i604)
                 {
-                  _elem595 = new WriteEventInfo();
-                  _elem595.read(iprot);
-                  struct.writeEventInfos.add(_elem595);
+                  _elem603 = new WriteEventInfo();
+                  _elem603.read(iprot);
+                  struct.writeEventInfos.add(_elem603);
                 }
                 iprot.readListEnd();
               }
@@ -577,9 +577,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(WRITE_EVENT_INFOS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.writeEventInfos.size()));
-            for (WriteEventInfo _iter597 : struct.writeEventInfos)
+            for (WriteEventInfo _iter605 : struct.writeEventInfos)
             {
-              _iter597.write(oprot);
+              _iter605.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -618,9 +618,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetWriteEventInfos()) {
         {
           oprot.writeI32(struct.writeEventInfos.size());
-          for (WriteEventInfo _iter598 : struct.writeEventInfos)
+          for (WriteEventInfo _iter606 : struct.writeEventInfos)
           {
-            _iter598.write(oprot);
+            _iter606.write(oprot);
           }
         }
       }
@@ -638,14 +638,14 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list599 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.writeEventInfos = new ArrayList<WriteEventInfo>(_list599.size);
-          WriteEventInfo _elem600;
-          for (int _i601 = 0; _i601 < _list599.size; ++_i601)
+          org.apache.thrift.protocol.TList _list607 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.writeEventInfos = new ArrayList<WriteEventInfo>(_list607.size);
+          WriteEventInfo _elem608;
+          for (int _i609 = 0; _i609 < _list607.size; ++_i609)
           {
-            _elem600 = new WriteEventInfo();
-            _elem600.read(iprot);
-            struct.writeEventInfos.add(_elem600);
+            _elem608 = new WriteEventInfo();
+            _elem608.read(iprot);
+            struct.writeEventInfos.add(_elem608);
           }
         }
         struct.setWriteEventInfosIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java
index 57eb5ef..dd6df74 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CompactionRequest.java
@@ -814,15 +814,15 @@ import org.slf4j.LoggerFactory;
           case 6: // PROPERTIES
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map690 = iprot.readMapBegin();
-                struct.properties = new HashMap<String,String>(2*_map690.size);
-                String _key691;
-                String _val692;
-                for (int _i693 = 0; _i693 < _map690.size; ++_i693)
+                org.apache.thrift.protocol.TMap _map698 = iprot.readMapBegin();
+                struct.properties = new HashMap<String,String>(2*_map698.size);
+                String _key699;
+                String _val700;
+                for (int _i701 = 0; _i701 < _map698.size; ++_i701)
                 {
-                  _key691 = iprot.readString();
-                  _val692 = iprot.readString();
-                  struct.properties.put(_key691, _val692);
+                  _key699 = iprot.readString();
+                  _val700 = iprot.readString();
+                  struct.properties.put(_key699, _val700);
                 }
                 iprot.readMapEnd();
               }
@@ -878,10 +878,10 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
           {
             oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
-            for (Map.Entry<String, String> _iter694 : struct.properties.entrySet())
+            for (Map.Entry<String, String> _iter702 : struct.properties.entrySet())
             {
-              oprot.writeString(_iter694.getKey());
-              oprot.writeString(_iter694.getValue());
+              oprot.writeString(_iter702.getKey());
+              oprot.writeString(_iter702.getValue());
             }
             oprot.writeMapEnd();
           }
@@ -928,10 +928,10 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetProperties()) {
         {
           oprot.writeI32(struct.properties.size());
-          for (Map.Entry<String, String> _iter695 : struct.properties.entrySet())
+          for (Map.Entry<String, String> _iter703 : struct.properties.entrySet())
           {
-            oprot.writeString(_iter695.getKey());
-            oprot.writeString(_iter695.getValue());
+            oprot.writeString(_iter703.getKey());
+            oprot.writeString(_iter703.getValue());
           }
         }
       }
@@ -957,15 +957,15 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TMap _map696 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.properties = new HashMap<String,String>(2*_map696.size);
-          String _key697;
-          String _val698;
-          for (int _i699 = 0; _i699 < _map696.size; ++_i699)
+          org.apache.thrift.protocol.TMap _map704 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.properties = new HashMap<String,String>(2*_map704.size);
+          String _key705;
+          String _val706;
+          for (int _i707 = 0; _i707 < _map704.size; ++_i707)
           {
-            _key697 = iprot.readString();
-            _val698 = iprot.readString();
-            struct.properties.put(_key697, _val698);
+            _key705 = iprot.readString();
+            _val706 = iprot.readString();
+            struct.properties.put(_key705, _val706);
           }
         }
         struct.setPropertiesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java
index 611bf6f..740768c 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java
@@ -712,13 +712,13 @@ import org.slf4j.LoggerFactory;
           case 4: // TABLES_USED
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set716 = iprot.readSetBegin();
-                struct.tablesUsed = new HashSet<String>(2*_set716.size);
-                String _elem717;
-                for (int _i718 = 0; _i718 < _set716.size; ++_i718)
+                org.apache.thrift.protocol.TSet _set724 = iprot.readSetBegin();
+                struct.tablesUsed = new HashSet<String>(2*_set724.size);
+                String _elem725;
+                for (int _i726 = 0; _i726 < _set724.size; ++_i726)
                 {
-                  _elem717 = iprot.readString();
-                  struct.tablesUsed.add(_elem717);
+                  _elem725 = iprot.readString();
+                  struct.tablesUsed.add(_elem725);
                 }
                 iprot.readSetEnd();
               }
@@ -767,9 +767,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(TABLES_USED_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.tablesUsed.size()));
-          for (String _iter719 : struct.tablesUsed)
+          for (String _iter727 : struct.tablesUsed)
           {
-            oprot.writeString(_iter719);
+            oprot.writeString(_iter727);
           }
           oprot.writeSetEnd();
         }
@@ -804,9 +804,9 @@ import org.slf4j.LoggerFactory;
       oprot.writeString(struct.tblName);
       {
         oprot.writeI32(struct.tablesUsed.size());
-        for (String _iter720 : struct.tablesUsed)
+        for (String _iter728 : struct.tablesUsed)
         {
-          oprot.writeString(_iter720);
+          oprot.writeString(_iter728);
         }
       }
       BitSet optionals = new BitSet();
@@ -829,13 +829,13 @@ import org.slf4j.LoggerFactory;
       struct.tblName = iprot.readString();
       struct.setTblNameIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set721 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.tablesUsed = new HashSet<String>(2*_set721.size);
-        String _elem722;
-        for (int _i723 = 0; _i723 < _set721.size; ++_i723)
+        org.apache.thrift.protocol.TSet _set729 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.tablesUsed = new HashSet<String>(2*_set729.size);
+        String _elem730;
+        for (int _i731 = 0; _i731 < _set729.size; ++_i731)
         {
-          _elem722 = iprot.readString();
-          struct.tablesUsed.add(_elem722);
+          _elem730 = iprot.readString();
+          struct.tablesUsed.add(_elem730);
         }
       }
       struct.setTablesUsedIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
index 9cde9b8..9947976 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
@@ -951,15 +951,15 @@ import org.slf4j.LoggerFactory;
           case 4: // PARAMETERS
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map102 = iprot.readMapBegin();
-                struct.parameters = new HashMap<String,String>(2*_map102.size);
-                String _key103;
-                String _val104;
-                for (int _i105 = 0; _i105 < _map102.size; ++_i105)
+                org.apache.thrift.protocol.TMap _map110 = iprot.readMapBegin();
+                struct.parameters = new HashMap<String,String>(2*_map110.size);
+                String _key111;
+                String _val112;
+                for (int _i113 = 0; _i113 < _map110.size; ++_i113)
                 {
-                  _key103 = iprot.readString();
-                  _val104 = iprot.readString();
-                  struct.parameters.put(_key103, _val104);
+                  _key111 = iprot.readString();
+                  _val112 = iprot.readString();
+                  struct.parameters.put(_key111, _val112);
                 }
                 iprot.readMapEnd();
               }
@@ -1033,10 +1033,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
-          for (Map.Entry<String, String> _iter106 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter114 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter106.getKey());
-            oprot.writeString(_iter106.getValue());
+            oprot.writeString(_iter114.getKey());
+            oprot.writeString(_iter114.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -1125,10 +1125,10 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetParameters()) {
         {
           oprot.writeI32(struct.parameters.size());
-          for (Map.Entry<String, String> _iter107 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter115 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter107.getKey());
-            oprot.writeString(_iter107.getValue());
+            oprot.writeString(_iter115.getKey());
+            oprot.writeString(_iter115.getValue());
           }
         }
       }
@@ -1164,15 +1164,15 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(3)) {
         {
-          org.apache.thrift.protocol.TMap _map108 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.parameters = new HashMap<String,String>(2*_map108.size);
-          String _key109;
-          String _val110;
-          for (int _i111 = 0; _i111 < _map108.size; ++_i111)
+          org.apache.thrift.protocol.TMap _map116 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.parameters = new HashMap<String,String>(2*_map116.size);
+          String _key117;
+          String _val118;
+          for (int _i119 = 0; _i119 < _map116.size; ++_i119)
           {
-            _key109 = iprot.readString();
-            _val110 = iprot.readString();
-            struct.parameters.put(_key109, _val110);
+            _key117 = iprot.readString();
+            _val118 = iprot.readString();
+            struct.parameters.put(_key117, _val118);
           }
         }
         struct.setParametersIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DefaultConstraintsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DefaultConstraintsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DefaultConstraintsResponse.java
index 47b8d1c..e29932c 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DefaultConstraintsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DefaultConstraintsResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // DEFAULT_CONSTRAINTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list352 = iprot.readListBegin();
-                struct.defaultConstraints = new ArrayList<SQLDefaultConstraint>(_list352.size);
-                SQLDefaultConstraint _elem353;
-                for (int _i354 = 0; _i354 < _list352.size; ++_i354)
+                org.apache.thrift.protocol.TList _list360 = iprot.readListBegin();
+                struct.defaultConstraints = new ArrayList<SQLDefaultConstraint>(_list360.size);
+                SQLDefaultConstraint _elem361;
+                for (int _i362 = 0; _i362 < _list360.size; ++_i362)
                 {
-                  _elem353 = new SQLDefaultConstraint();
-                  _elem353.read(iprot);
-                  struct.defaultConstraints.add(_elem353);
+                  _elem361 = new SQLDefaultConstraint();
+                  _elem361.read(iprot);
+                  struct.defaultConstraints.add(_elem361);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(DEFAULT_CONSTRAINTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.defaultConstraints.size()));
-          for (SQLDefaultConstraint _iter355 : struct.defaultConstraints)
+          for (SQLDefaultConstraint _iter363 : struct.defaultConstraints)
           {
-            _iter355.write(oprot);
+            _iter363.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.defaultConstraints.size());
-        for (SQLDefaultConstraint _iter356 : struct.defaultConstraints)
+        for (SQLDefaultConstraint _iter364 : struct.defaultConstraints)
         {
-          _iter356.write(oprot);
+          _iter364.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, DefaultConstraintsResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list357 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.defaultConstraints = new ArrayList<SQLDefaultConstraint>(_list357.size);
-        SQLDefaultConstraint _elem358;
-        for (int _i359 = 0; _i359 < _list357.size; ++_i359)
+        org.apache.thrift.protocol.TList _list365 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.defaultConstraints = new ArrayList<SQLDefaultConstraint>(_list365.size);
+        SQLDefaultConstraint _elem366;
+        for (int _i367 = 0; _i367 < _list365.size; ++_i367)
         {
-          _elem358 = new SQLDefaultConstraint();
-          _elem358.read(iprot);
-          struct.defaultConstraints.add(_elem358);
+          _elem366 = new SQLDefaultConstraint();
+          _elem366.read(iprot);
+          struct.defaultConstraints.add(_elem366);
         }
       }
       struct.setDefaultConstraintsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
index 0f22168..0a7d3b5 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
@@ -346,14 +346,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PARTITIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list490 = iprot.readListBegin();
-                struct.partitions = new ArrayList<Partition>(_list490.size);
-                Partition _elem491;
-                for (int _i492 = 0; _i492 < _list490.size; ++_i492)
+                org.apache.thrift.protocol.TList _list498 = iprot.readListBegin();
+                struct.partitions = new ArrayList<Partition>(_list498.size);
+                Partition _elem499;
+                for (int _i500 = 0; _i500 < _list498.size; ++_i500)
                 {
-                  _elem491 = new Partition();
-                  _elem491.read(iprot);
-                  struct.partitions.add(_elem491);
+                  _elem499 = new Partition();
+                  _elem499.read(iprot);
+                  struct.partitions.add(_elem499);
                 }
                 iprot.readListEnd();
               }
@@ -380,9 +380,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
-            for (Partition _iter493 : struct.partitions)
+            for (Partition _iter501 : struct.partitions)
             {
-              _iter493.write(oprot);
+              _iter501.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartitions()) {
         {
           oprot.writeI32(struct.partitions.size());
-          for (Partition _iter494 : struct.partitions)
+          for (Partition _iter502 : struct.partitions)
           {
-            _iter494.write(oprot);
+            _iter502.write(oprot);
           }
         }
       }
@@ -428,14 +428,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list495 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.partitions = new ArrayList<Partition>(_list495.size);
-          Partition _elem496;
-          for (int _i497 = 0; _i497 < _list495.size; ++_i497)
+          org.apache.thrift.protocol.TList _list503 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.partitions = new ArrayList<Partition>(_list503.size);
+          Partition _elem504;
+          for (int _i505 = 0; _i505 < _list503.size; ++_i505)
           {
-            _elem496 = new Partition();
-            _elem496.read(iprot);
-            struct.partitions.add(_elem496);
+            _elem504 = new Partition();
+            _elem504.read(iprot);
+            struct.partitions.add(_elem504);
           }
         }
         struct.setPartitionsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java
index 52fae26..a128dac 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java
@@ -344,15 +344,15 @@ import org.slf4j.LoggerFactory;
           case 1: // PROPERTIES
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map310 = iprot.readMapBegin();
-                struct.properties = new HashMap<String,String>(2*_map310.size);
-                String _key311;
-                String _val312;
-                for (int _i313 = 0; _i313 < _map310.size; ++_i313)
+                org.apache.thrift.protocol.TMap _map318 = iprot.readMapBegin();
+                struct.properties = new HashMap<String,String>(2*_map318.size);
+                String _key319;
+                String _val320;
+                for (int _i321 = 0; _i321 < _map318.size; ++_i321)
                 {
-                  _key311 = iprot.readString();
-                  _val312 = iprot.readString();
-                  struct.properties.put(_key311, _val312);
+                  _key319 = iprot.readString();
+                  _val320 = iprot.readString();
+                  struct.properties.put(_key319, _val320);
                 }
                 iprot.readMapEnd();
               }
@@ -378,10 +378,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
-          for (Map.Entry<String, String> _iter314 : struct.properties.entrySet())
+          for (Map.Entry<String, String> _iter322 : struct.properties.entrySet())
           {
-            oprot.writeString(_iter314.getKey());
-            oprot.writeString(_iter314.getValue());
+            oprot.writeString(_iter322.getKey());
+            oprot.writeString(_iter322.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -412,10 +412,10 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetProperties()) {
         {
           oprot.writeI32(struct.properties.size());
-          for (Map.Entry<String, String> _iter315 : struct.properties.entrySet())
+          for (Map.Entry<String, String> _iter323 : struct.properties.entrySet())
           {
-            oprot.writeString(_iter315.getKey());
-            oprot.writeString(_iter315.getValue());
+            oprot.writeString(_iter323.getKey());
+            oprot.writeString(_iter323.getValue());
           }
         }
       }
@@ -427,15 +427,15 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TMap _map316 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.properties = new HashMap<String,String>(2*_map316.size);
-          String _key317;
-          String _val318;
-          for (int _i319 = 0; _i319 < _map316.size; ++_i319)
+          org.apache.thrift.protocol.TMap _map324 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.properties = new HashMap<String,String>(2*_map324.size);
+          String _key325;
+          String _val326;
+          for (int _i327 = 0; _i327 < _map324.size; ++_i327)
           {
-            _key317 = iprot.readString();
-            _val318 = iprot.readString();
-            struct.properties.put(_key317, _val318);
+            _key325 = iprot.readString();
+            _val326 = iprot.readString();
+            struct.properties.put(_key325, _val326);
           }
         }
         struct.setPropertiesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java
index 8f5b4e5..f2f8fb4 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java
@@ -350,14 +350,14 @@ import org.slf4j.LoggerFactory;
           case 1: // SCHEMA_VERSIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list944 = iprot.readListBegin();
-                struct.schemaVersions = new ArrayList<SchemaVersionDescriptor>(_list944.size);
-                SchemaVersionDescriptor _elem945;
-                for (int _i946 = 0; _i946 < _list944.size; ++_i946)
+                org.apache.thrift.protocol.TList _list952 = iprot.readListBegin();
+                struct.schemaVersions = new ArrayList<SchemaVersionDescriptor>(_list952.size);
+                SchemaVersionDescriptor _elem953;
+                for (int _i954 = 0; _i954 < _list952.size; ++_i954)
                 {
-                  _elem945 = new SchemaVersionDescriptor();
-                  _elem945.read(iprot);
-                  struct.schemaVersions.add(_elem945);
+                  _elem953 = new SchemaVersionDescriptor();
+                  _elem953.read(iprot);
+                  struct.schemaVersions.add(_elem953);
                 }
                 iprot.readListEnd();
               }
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(SCHEMA_VERSIONS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.schemaVersions.size()));
-          for (SchemaVersionDescriptor _iter947 : struct.schemaVersions)
+          for (SchemaVersionDescriptor _iter955 : struct.schemaVersions)
           {
-            _iter947.write(oprot);
+            _iter955.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -416,9 +416,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetSchemaVersions()) {
         {
           oprot.writeI32(struct.schemaVersions.size());
-          for (SchemaVersionDescriptor _iter948 : struct.schemaVersions)
+          for (SchemaVersionDescriptor _iter956 : struct.schemaVersions)
           {
-            _iter948.write(oprot);
+            _iter956.write(oprot);
           }
         }
       }
@@ -430,14 +430,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list949 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.schemaVersions = new ArrayList<SchemaVersionDescriptor>(_list949.size);
-          SchemaVersionDescriptor _elem950;
-          for (int _i951 = 0; _i951 < _list949.size; ++_i951)
+          org.apache.thrift.protocol.TList _list957 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.schemaVersions = new ArrayList<SchemaVersionDescriptor>(_list957.size);
+          SchemaVersionDescriptor _elem958;
+          for (int _i959 = 0; _i959 < _list957.size; ++_i959)
           {
-            _elem950 = new SchemaVersionDescriptor();
-            _elem950.read(iprot);
-            struct.schemaVersions.add(_elem950);
+            _elem958 = new SchemaVersionDescriptor();
+            _elem958.read(iprot);
+            struct.schemaVersions.add(_elem958);
           }
         }
         struct.setSchemaVersionsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
index 2560922..dc2627a 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
@@ -794,13 +794,13 @@ import org.slf4j.LoggerFactory;
           case 5: // PARTITION_VALS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list756 = iprot.readListBegin();
-                struct.partitionVals = new ArrayList<String>(_list756.size);
-                String _elem757;
-                for (int _i758 = 0; _i758 < _list756.size; ++_i758)
+                org.apache.thrift.protocol.TList _list764 = iprot.readListBegin();
+                struct.partitionVals = new ArrayList<String>(_list764.size);
+                String _elem765;
+                for (int _i766 = 0; _i766 < _list764.size; ++_i766)
                 {
-                  _elem757 = iprot.readString();
-                  struct.partitionVals.add(_elem757);
+                  _elem765 = iprot.readString();
+                  struct.partitionVals.add(_elem765);
                 }
                 iprot.readListEnd();
               }
@@ -857,9 +857,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(PARTITION_VALS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionVals.size()));
-            for (String _iter759 : struct.partitionVals)
+            for (String _iter767 : struct.partitionVals)
             {
-              oprot.writeString(_iter759);
+              oprot.writeString(_iter767);
             }
             oprot.writeListEnd();
           }
@@ -915,9 +915,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartitionVals()) {
         {
           oprot.writeI32(struct.partitionVals.size());
-          for (String _iter760 : struct.partitionVals)
+          for (String _iter768 : struct.partitionVals)
           {
-            oprot.writeString(_iter760);
+            oprot.writeString(_iter768);
           }
         }
       }
@@ -945,13 +945,13 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list761 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.partitionVals = new ArrayList<String>(_list761.size);
-          String _elem762;
-          for (int _i763 = 0; _i763 < _list761.size; ++_i763)
+          org.apache.thrift.protocol.TList _list769 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.partitionVals = new ArrayList<String>(_list769.size);
+          String _elem770;
+          for (int _i771 = 0; _i771 < _list769.size; ++_i771)
           {
-            _elem762 = iprot.readString();
-            struct.partitionVals.add(_elem762);
+            _elem770 = iprot.readString();
+            struct.partitionVals.add(_elem770);
           }
         }
         struct.setPartitionValsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
index 2890506..8fae31c 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // FOREIGN_KEYS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list328 = iprot.readListBegin();
-                struct.foreignKeys = new ArrayList<SQLForeignKey>(_list328.size);
-                SQLForeignKey _elem329;
-                for (int _i330 = 0; _i330 < _list328.size; ++_i330)
+                org.apache.thrift.protocol.TList _list336 = iprot.readListBegin();
+                struct.foreignKeys = new ArrayList<SQLForeignKey>(_list336.size);
+                SQLForeignKey _elem337;
+                for (int _i338 = 0; _i338 < _list336.size; ++_i338)
                 {
-                  _elem329 = new SQLForeignKey();
-                  _elem329.read(iprot);
-                  struct.foreignKeys.add(_elem329);
+                  _elem337 = new SQLForeignKey();
+                  _elem337.read(iprot);
+                  struct.foreignKeys.add(_elem337);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size()));
-          for (SQLForeignKey _iter331 : struct.foreignKeys)
+          for (SQLForeignKey _iter339 : struct.foreignKeys)
           {
-            _iter331.write(oprot);
+            _iter339.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.foreignKeys.size());
-        for (SQLForeignKey _iter332 : struct.foreignKeys)
+        for (SQLForeignKey _iter340 : struct.foreignKeys)
         {
-          _iter332.write(oprot);
+          _iter340.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list333 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.foreignKeys = new ArrayList<SQLForeignKey>(_list333.size);
-        SQLForeignKey _elem334;
-        for (int _i335 = 0; _i335 < _list333.size; ++_i335)
+        org.apache.thrift.protocol.TList _list341 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.foreignKeys = new ArrayList<SQLForeignKey>(_list341.size);
+        SQLForeignKey _elem342;
+        for (int _i343 = 0; _i343 < _list341.size; ++_i343)
         {
-          _elem334 = new SQLForeignKey();
-          _elem334.read(iprot);
-          struct.foreignKeys.add(_elem334);
+          _elem342 = new SQLForeignKey();
+          _elem342.read(iprot);
+          struct.foreignKeys.add(_elem342);
         }
       }
       struct.setForeignKeysIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
index a1c0de9..ce0feb9 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
@@ -1079,14 +1079,14 @@ import org.slf4j.LoggerFactory;
           case 8: // RESOURCE_URIS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list546 = iprot.readListBegin();
-                struct.resourceUris = new ArrayList<ResourceUri>(_list546.size);
-                ResourceUri _elem547;
-                for (int _i548 = 0; _i548 < _list546.size; ++_i548)
+                org.apache.thrift.protocol.TList _list554 = iprot.readListBegin();
+                struct.resourceUris = new ArrayList<ResourceUri>(_list554.size);
+                ResourceUri _elem555;
+                for (int _i556 = 0; _i556 < _list554.size; ++_i556)
                 {
-                  _elem547 = new ResourceUri();
-                  _elem547.read(iprot);
-                  struct.resourceUris.add(_elem547);
+                  _elem555 = new ResourceUri();
+                  _elem555.read(iprot);
+                  struct.resourceUris.add(_elem555);
                 }
                 iprot.readListEnd();
               }
@@ -1153,9 +1153,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(RESOURCE_URIS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.resourceUris.size()));
-          for (ResourceUri _iter549 : struct.resourceUris)
+          for (ResourceUri _iter557 : struct.resourceUris)
           {
-            _iter549.write(oprot);
+            _iter557.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1238,9 +1238,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetResourceUris()) {
         {
           oprot.writeI32(struct.resourceUris.size());
-          for (ResourceUri _iter550 : struct.resourceUris)
+          for (ResourceUri _iter558 : struct.resourceUris)
           {
-            _iter550.write(oprot);
+            _iter558.write(oprot);
           }
         }
       }
@@ -1283,14 +1283,14 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(7)) {
         {
-          org.apache.thrift.protocol.TList _list551 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.resourceUris = new ArrayList<ResourceUri>(_list551.size);
-          ResourceUri _elem552;
-          for (int _i553 = 0; _i553 < _list551.size; ++_i553)
+          org.apache.thrift.protocol.TList _list559 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.resourceUris = new ArrayList<ResourceUri>(_list559.size);
+          ResourceUri _elem560;
+          for (int _i561 = 0; _i561 < _list559.size; ++_i561)
           {
-            _elem552 = new ResourceUri();
-            _elem552.read(iprot);
-            struct.resourceUris.add(_elem552);
+            _elem560 = new ResourceUri();
+            _elem560.read(iprot);
+            struct.resourceUris.add(_elem560);
           }
         }
         struct.setResourceUrisIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
index f68afe8..13fe5fa 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
@@ -346,14 +346,14 @@ import org.slf4j.LoggerFactory;
           case 1: // FUNCTIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list832 = iprot.readListBegin();
-                struct.functions = new ArrayList<Function>(_list832.size);
-                Function _elem833;
-                for (int _i834 = 0; _i834 < _list832.size; ++_i834)
+                org.apache.thrift.protocol.TList _list840 = iprot.readListBegin();
+                struct.functions = new ArrayList<Function>(_list840.size);
+                Function _elem841;
+                for (int _i842 = 0; _i842 < _list840.size; ++_i842)
                 {
-                  _elem833 = new Function();
-                  _elem833.read(iprot);
-                  struct.functions.add(_elem833);
+                  _elem841 = new Function();
+                  _elem841.read(iprot);
+                  struct.functions.add(_elem841);
                 }
                 iprot.readListEnd();
               }
@@ -380,9 +380,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(FUNCTIONS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.functions.size()));
-            for (Function _iter835 : struct.functions)
+            for (Function _iter843 : struct.functions)
             {
-              _iter835.write(oprot);
+              _iter843.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetFunctions()) {
         {
           oprot.writeI32(struct.functions.size());
-          for (Function _iter836 : struct.functions)
+          for (Function _iter844 : struct.functions)
           {
-            _iter836.write(oprot);
+            _iter844.write(oprot);
           }
         }
       }
@@ -428,14 +428,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list837 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.functions = new ArrayList<Function>(_list837.size);
-          Function _elem838;
-          for (int _i839 = 0; _i839 < _list837.size; ++_i839)
+          org.apache.thrift.protocol.TList _list845 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.functions = new ArrayList<Function>(_list845.size);
+          Function _elem846;
+          for (int _i847 = 0; _i847 < _list845.size; ++_i847)
           {
-            _elem838 = new Function();
-            _elem838.read(iprot);
-            struct.functions.add(_elem838);
+            _elem846 = new Function();
+            _elem846.read(iprot);
+            struct.functions.add(_elem846);
           }
         }
         struct.setFunctionsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetCatalogsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetCatalogsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetCatalogsResponse.java
index aafd528..a789068 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetCatalogsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetCatalogsResponse.java
@@ -347,13 +347,13 @@ import org.slf4j.LoggerFactory;
           case 1: // NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list94 = iprot.readListBegin();
-                struct.names = new ArrayList<String>(_list94.size);
-                String _elem95;
-                for (int _i96 = 0; _i96 < _list94.size; ++_i96)
+                org.apache.thrift.protocol.TList _list102 = iprot.readListBegin();
+                struct.names = new ArrayList<String>(_list102.size);
+                String _elem103;
+                for (int _i104 = 0; _i104 < _list102.size; ++_i104)
                 {
-                  _elem95 = iprot.readString();
-                  struct.names.add(_elem95);
+                  _elem103 = iprot.readString();
+                  struct.names.add(_elem103);
                 }
                 iprot.readListEnd();
               }
@@ -379,9 +379,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(NAMES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.names.size()));
-          for (String _iter97 : struct.names)
+          for (String _iter105 : struct.names)
           {
-            oprot.writeString(_iter97);
+            oprot.writeString(_iter105);
           }
           oprot.writeListEnd();
         }
@@ -412,9 +412,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetNames()) {
         {
           oprot.writeI32(struct.names.size());
-          for (String _iter98 : struct.names)
+          for (String _iter106 : struct.names)
           {
-            oprot.writeString(_iter98);
+            oprot.writeString(_iter106);
           }
         }
       }
@@ -426,13 +426,13 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list99 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.names = new ArrayList<String>(_list99.size);
-          String _elem100;
-          for (int _i101 = 0; _i101 < _list99.size; ++_i101)
+          org.apache.thrift.protocol.TList _list107 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.names = new ArrayList<String>(_list107.size);
+          String _elem108;
+          for (int _i109 = 0; _i109 < _list107.size; ++_i109)
           {
-            _elem100 = iprot.readString();
-            struct.names.add(_elem100);
+            _elem108 = iprot.readString();
+            struct.names.add(_elem108);
           }
         }
         struct.setNamesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
index 836f35f..976bf00 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
@@ -619,13 +619,13 @@ import org.slf4j.LoggerFactory;
           case 1: // FILE_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list782 = iprot.readListBegin();
-                struct.fileIds = new ArrayList<Long>(_list782.size);
-                long _elem783;
-                for (int _i784 = 0; _i784 < _list782.size; ++_i784)
+                org.apache.thrift.protocol.TList _list790 = iprot.readListBegin();
+                struct.fileIds = new ArrayList<Long>(_list790.size);
+                long _elem791;
+                for (int _i792 = 0; _i792 < _list790.size; ++_i792)
                 {
-                  _elem783 = iprot.readI64();
-                  struct.fileIds.add(_elem783);
+                  _elem791 = iprot.readI64();
+                  struct.fileIds.add(_elem791);
                 }
                 iprot.readListEnd();
               }
@@ -675,9 +675,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
-          for (long _iter785 : struct.fileIds)
+          for (long _iter793 : struct.fileIds)
           {
-            oprot.writeI64(_iter785);
+            oprot.writeI64(_iter793);
           }
           oprot.writeListEnd();
         }
@@ -719,9 +719,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.fileIds.size());
-        for (long _iter786 : struct.fileIds)
+        for (long _iter794 : struct.fileIds)
         {
-          oprot.writeI64(_iter786);
+          oprot.writeI64(_iter794);
         }
       }
       oprot.writeBinary(struct.expr);
@@ -745,13 +745,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list787 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.fileIds = new ArrayList<Long>(_list787.size);
-        long _elem788;
-        for (int _i789 = 0; _i789 < _list787.size; ++_i789)
+        org.apache.thrift.protocol.TList _list795 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.fileIds = new ArrayList<Long>(_list795.size);
+        long _elem796;
+        for (int _i797 = 0; _i797 < _list795.size; ++_i797)
         {
-          _elem788 = iprot.readI64();
-          struct.fileIds.add(_elem788);
+          _elem796 = iprot.readI64();
+          struct.fileIds.add(_elem796);
         }
       }
       struct.setFileIdsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java
index 17f0ee5..16a0113 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprResult.java
@@ -444,16 +444,16 @@ import org.slf4j.LoggerFactory;
           case 1: // METADATA
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map772 = iprot.readMapBegin();
-                struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map772.size);
-                long _key773;
-                MetadataPpdResult _val774;
-                for (int _i775 = 0; _i775 < _map772.size; ++_i775)
+                org.apache.thrift.protocol.TMap _map780 = iprot.readMapBegin();
+                struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map780.size);
+                long _key781;
+                MetadataPpdResult _val782;
+                for (int _i783 = 0; _i783 < _map780.size; ++_i783)
                 {
-                  _key773 = iprot.readI64();
-                  _val774 = new MetadataPpdResult();
-                  _val774.read(iprot);
-                  struct.metadata.put(_key773, _val774);
+                  _key781 = iprot.readI64();
+                  _val782 = new MetadataPpdResult();
+                  _val782.read(iprot);
+                  struct.metadata.put(_key781, _val782);
                 }
                 iprot.readMapEnd();
               }
@@ -487,10 +487,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(METADATA_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, struct.metadata.size()));
-          for (Map.Entry<Long, MetadataPpdResult> _iter776 : struct.metadata.entrySet())
+          for (Map.Entry<Long, MetadataPpdResult> _iter784 : struct.metadata.entrySet())
           {
-            oprot.writeI64(_iter776.getKey());
-            _iter776.getValue().write(oprot);
+            oprot.writeI64(_iter784.getKey());
+            _iter784.getValue().write(oprot);
           }
           oprot.writeMapEnd();
         }
@@ -518,10 +518,10 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.metadata.size());
-        for (Map.Entry<Long, MetadataPpdResult> _iter777 : struct.metadata.entrySet())
+        for (Map.Entry<Long, MetadataPpdResult> _iter785 : struct.metadata.entrySet())
         {
-          oprot.writeI64(_iter777.getKey());
-          _iter777.getValue().write(oprot);
+          oprot.writeI64(_iter785.getKey());
+          _iter785.getValue().write(oprot);
         }
       }
       oprot.writeBool(struct.isSupported);
@@ -531,16 +531,16 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprResult struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TMap _map778 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map778.size);
-        long _key779;
-        MetadataPpdResult _val780;
-        for (int _i781 = 0; _i781 < _map778.size; ++_i781)
+        org.apache.thrift.protocol.TMap _map786 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.metadata = new HashMap<Long,MetadataPpdResult>(2*_map786.size);
+        long _key787;
+        MetadataPpdResult _val788;
+        for (int _i789 = 0; _i789 < _map786.size; ++_i789)
         {
-          _key779 = iprot.readI64();
-          _val780 = new MetadataPpdResult();
-          _val780.read(iprot);
-          struct.metadata.put(_key779, _val780);
+          _key787 = iprot.readI64();
+          _val788 = new MetadataPpdResult();
+          _val788.read(iprot);
+          struct.metadata.put(_key787, _val788);
         }
       }
       struct.setMetadataIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java
index 12b4392..9e3ed8b 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataRequest.java
@@ -351,13 +351,13 @@ import org.slf4j.LoggerFactory;
           case 1: // FILE_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list800 = iprot.readListBegin();
-                struct.fileIds = new ArrayList<Long>(_list800.size);
-                long _elem801;
-                for (int _i802 = 0; _i802 < _list800.size; ++_i802)
+                org.apache.thrift.protocol.TList _list808 = iprot.readListBegin();
+                struct.fileIds = new ArrayList<Long>(_list808.size);
+                long _elem809;
+                for (int _i810 = 0; _i810 < _list808.size; ++_i810)
                 {
-                  _elem801 = iprot.readI64();
-                  struct.fileIds.add(_elem801);
+                  _elem809 = iprot.readI64();
+                  struct.fileIds.add(_elem809);
                 }
                 iprot.readListEnd();
               }
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
-          for (long _iter803 : struct.fileIds)
+          for (long _iter811 : struct.fileIds)
           {
-            oprot.writeI64(_iter803);
+            oprot.writeI64(_iter811);
           }
           oprot.writeListEnd();
         }
@@ -410,9 +410,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.fileIds.size());
-        for (long _iter804 : struct.fileIds)
+        for (long _iter812 : struct.fileIds)
         {
-          oprot.writeI64(_iter804);
+          oprot.writeI64(_iter812);
         }
       }
     }
@@ -421,13 +421,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list805 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.fileIds = new ArrayList<Long>(_list805.size);
-        long _elem806;
-        for (int _i807 = 0; _i807 < _list805.size; ++_i807)
+        org.apache.thrift.protocol.TList _list813 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.fileIds = new ArrayList<Long>(_list813.size);
+        long _elem814;
+        for (int _i815 = 0; _i815 < _list813.size; ++_i815)
         {
-          _elem806 = iprot.readI64();
-          struct.fileIds.add(_elem806);
+          _elem814 = iprot.readI64();
+          struct.fileIds.add(_elem814);
         }
       }
       struct.setFileIdsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java
index 65708d7..bc73f1e 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataResult.java
@@ -433,15 +433,15 @@ import org.slf4j.LoggerFactory;
           case 1: // METADATA
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map790 = iprot.readMapBegin();
-                struct.metadata = new HashMap<Long,ByteBuffer>(2*_map790.size);
-                long _key791;
-                ByteBuffer _val792;
-                for (int _i793 = 0; _i793 < _map790.size; ++_i793)
+                org.apache.thrift.protocol.TMap _map798 = iprot.readMapBegin();
+                struct.metadata = new HashMap<Long,ByteBuffer>(2*_map798.size);
+                long _key799;
+                ByteBuffer _val800;
+                for (int _i801 = 0; _i801 < _map798.size; ++_i801)
                 {
-                  _key791 = iprot.readI64();
-                  _val792 = iprot.readBinary();
-                  struct.metadata.put(_key791, _val792);
+                  _key799 = iprot.readI64();
+                  _val800 = iprot.readBinary();
+                  struct.metadata.put(_key799, _val800);
                 }
                 iprot.readMapEnd();
               }
@@ -475,10 +475,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(METADATA_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
-          for (Map.Entry<Long, ByteBuffer> _iter794 : struct.metadata.entrySet())
+          for (Map.Entry<Long, ByteBuffer> _iter802 : struct.metadata.entrySet())
           {
-            oprot.writeI64(_iter794.getKey());
-            oprot.writeBinary(_iter794.getValue());
+            oprot.writeI64(_iter802.getKey());
+            oprot.writeBinary(_iter802.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -506,10 +506,10 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.metadata.size());
-        for (Map.Entry<Long, ByteBuffer> _iter795 : struct.metadata.entrySet())
+        for (Map.Entry<Long, ByteBuffer> _iter803 : struct.metadata.entrySet())
         {
-          oprot.writeI64(_iter795.getKey());
-          oprot.writeBinary(_iter795.getValue());
+          oprot.writeI64(_iter803.getKey());
+          oprot.writeBinary(_iter803.getValue());
         }
       }
       oprot.writeBool(struct.isSupported);
@@ -519,15 +519,15 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataResult struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TMap _map796 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.metadata = new HashMap<Long,ByteBuffer>(2*_map796.size);
-        long _key797;
-        ByteBuffer _val798;
-        for (int _i799 = 0; _i799 < _map796.size; ++_i799)
+        org.apache.thrift.protocol.TMap _map804 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.metadata = new HashMap<Long,ByteBuffer>(2*_map804.size);
+        long _key805;
+        ByteBuffer _val806;
+        for (int _i807 = 0; _i807 < _map804.size; ++_i807)
         {
-          _key797 = iprot.readI64();
-          _val798 = iprot.readBinary();
-          struct.metadata.put(_key797, _val798);
+          _key805 = iprot.readI64();
+          _val806 = iprot.readBinary();
+          struct.metadata.put(_key805, _val806);
         }
       }
       struct.setMetadataIsSet(true);


[12/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
index 183f977..fc3da46 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
@@ -110,6 +110,8 @@ import org.slf4j.LoggerFactory;
 
     public void truncate_table(String dbName, String tableName, List<String> partNames) throws MetaException, org.apache.thrift.TException;
 
+    public TruncateTableResponse truncate_table_req(TruncateTableRequest req) throws MetaException, org.apache.thrift.TException;
+
     public List<String> get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException;
 
     public List<String> get_tables_by_type(String db_name, String pattern, String tableType) throws MetaException, org.apache.thrift.TException;
@@ -140,6 +142,8 @@ import org.slf4j.LoggerFactory;
 
     public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade) throws InvalidOperationException, MetaException, org.apache.thrift.TException;
 
+    public AlterTableResponse alter_table_req(AlterTableRequest req) throws InvalidOperationException, MetaException, org.apache.thrift.TException;
+
     public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;
 
     public Partition add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException;
@@ -210,7 +214,7 @@ import org.slf4j.LoggerFactory;
 
     public void alter_partitions_with_environment_context(String db_name, String tbl_name, List<Partition> new_parts, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException;
 
-    public AlterPartitionsResponse alter_partitions_with_environment_context_req(AlterPartitionsRequest req) throws InvalidOperationException, MetaException, org.apache.thrift.TException;
+    public AlterPartitionsResponse alter_partitions_req(AlterPartitionsRequest req) throws InvalidOperationException, MetaException, org.apache.thrift.TException;
 
     public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException;
 
@@ -244,6 +248,10 @@ import org.slf4j.LoggerFactory;
 
     public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException;
 
+    public SetPartitionsStatsResponse update_table_column_statistics_req(SetPartitionsStatsRequest req) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException;
+
+    public SetPartitionsStatsResponse update_partition_column_statistics_req(SetPartitionsStatsRequest req) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException;
+
     public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException;
 
     public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException;
@@ -532,6 +540,8 @@ import org.slf4j.LoggerFactory;
 
     public void truncate_table(String dbName, String tableName, List<String> partNames, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void truncate_table_req(TruncateTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void get_tables_by_type(String db_name, String pattern, String tableType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -562,6 +572,8 @@ import org.slf4j.LoggerFactory;
 
     public void alter_table_with_cascade(String dbname, String tbl_name, Table new_tbl, boolean cascade, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void alter_table_req(AlterTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void add_partition_with_environment_context(Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -632,7 +644,7 @@ import org.slf4j.LoggerFactory;
 
     public void alter_partitions_with_environment_context(String db_name, String tbl_name, List<Partition> new_parts, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
-    public void alter_partitions_with_environment_context_req(AlterPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void alter_partitions_req(AlterPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
@@ -666,6 +678,10 @@ import org.slf4j.LoggerFactory;
 
     public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
+    public void update_table_column_statistics_req(SetPartitionsStatsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void update_partition_column_statistics_req(SetPartitionsStatsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
     public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
 
     public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
@@ -1879,6 +1895,32 @@ import org.slf4j.LoggerFactory;
       return;
     }
 
+    public TruncateTableResponse truncate_table_req(TruncateTableRequest req) throws MetaException, org.apache.thrift.TException
+    {
+      send_truncate_table_req(req);
+      return recv_truncate_table_req();
+    }
+
+    public void send_truncate_table_req(TruncateTableRequest req) throws org.apache.thrift.TException
+    {
+      truncate_table_req_args args = new truncate_table_req_args();
+      args.setReq(req);
+      sendBase("truncate_table_req", args);
+    }
+
+    public TruncateTableResponse recv_truncate_table_req() throws MetaException, org.apache.thrift.TException
+    {
+      truncate_table_req_result result = new truncate_table_req_result();
+      receiveBase(result, "truncate_table_req");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.o1 != null) {
+        throw result.o1;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "truncate_table_req failed: unknown result");
+    }
+
     public List<String> get_tables(String db_name, String pattern) throws MetaException, org.apache.thrift.TException
     {
       send_get_tables(db_name, pattern);
@@ -2314,6 +2356,35 @@ import org.slf4j.LoggerFactory;
       return;
     }
 
+    public AlterTableResponse alter_table_req(AlterTableRequest req) throws InvalidOperationException, MetaException, org.apache.thrift.TException
+    {
+      send_alter_table_req(req);
+      return recv_alter_table_req();
+    }
+
+    public void send_alter_table_req(AlterTableRequest req) throws org.apache.thrift.TException
+    {
+      alter_table_req_args args = new alter_table_req_args();
+      args.setReq(req);
+      sendBase("alter_table_req", args);
+    }
+
+    public AlterTableResponse recv_alter_table_req() throws InvalidOperationException, MetaException, org.apache.thrift.TException
+    {
+      alter_table_req_result result = new alter_table_req_result();
+      receiveBase(result, "alter_table_req");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.o1 != null) {
+        throw result.o1;
+      }
+      if (result.o2 != null) {
+        throw result.o2;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_table_req failed: unknown result");
+    }
+
     public Partition add_partition(Partition new_part) throws InvalidObjectException, AlreadyExistsException, MetaException, org.apache.thrift.TException
     {
       send_add_partition(new_part);
@@ -3438,23 +3509,23 @@ import org.slf4j.LoggerFactory;
       return;
     }
 
-    public AlterPartitionsResponse alter_partitions_with_environment_context_req(AlterPartitionsRequest req) throws InvalidOperationException, MetaException, org.apache.thrift.TException
+    public AlterPartitionsResponse alter_partitions_req(AlterPartitionsRequest req) throws InvalidOperationException, MetaException, org.apache.thrift.TException
     {
-      send_alter_partitions_with_environment_context_req(req);
-      return recv_alter_partitions_with_environment_context_req();
+      send_alter_partitions_req(req);
+      return recv_alter_partitions_req();
     }
 
-    public void send_alter_partitions_with_environment_context_req(AlterPartitionsRequest req) throws org.apache.thrift.TException
+    public void send_alter_partitions_req(AlterPartitionsRequest req) throws org.apache.thrift.TException
     {
-      alter_partitions_with_environment_context_req_args args = new alter_partitions_with_environment_context_req_args();
+      alter_partitions_req_args args = new alter_partitions_req_args();
       args.setReq(req);
-      sendBase("alter_partitions_with_environment_context_req", args);
+      sendBase("alter_partitions_req", args);
     }
 
-    public AlterPartitionsResponse recv_alter_partitions_with_environment_context_req() throws InvalidOperationException, MetaException, org.apache.thrift.TException
+    public AlterPartitionsResponse recv_alter_partitions_req() throws InvalidOperationException, MetaException, org.apache.thrift.TException
     {
-      alter_partitions_with_environment_context_req_result result = new alter_partitions_with_environment_context_req_result();
-      receiveBase(result, "alter_partitions_with_environment_context_req");
+      alter_partitions_req_result result = new alter_partitions_req_result();
+      receiveBase(result, "alter_partitions_req");
       if (result.isSetSuccess()) {
         return result.success;
       }
@@ -3464,7 +3535,7 @@ import org.slf4j.LoggerFactory;
       if (result.o2 != null) {
         throw result.o2;
       }
-      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_partitions_with_environment_context_req failed: unknown result");
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alter_partitions_req failed: unknown result");
     }
 
     public void alter_partition_with_environment_context(String db_name, String tbl_name, Partition new_part, EnvironmentContext environment_context) throws InvalidOperationException, MetaException, org.apache.thrift.TException
@@ -3960,6 +4031,76 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result");
     }
 
+    public SetPartitionsStatsResponse update_table_column_statistics_req(SetPartitionsStatsRequest req) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException
+    {
+      send_update_table_column_statistics_req(req);
+      return recv_update_table_column_statistics_req();
+    }
+
+    public void send_update_table_column_statistics_req(SetPartitionsStatsRequest req) throws org.apache.thrift.TException
+    {
+      update_table_column_statistics_req_args args = new update_table_column_statistics_req_args();
+      args.setReq(req);
+      sendBase("update_table_column_statistics_req", args);
+    }
+
+    public SetPartitionsStatsResponse recv_update_table_column_statistics_req() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException
+    {
+      update_table_column_statistics_req_result result = new update_table_column_statistics_req_result();
+      receiveBase(result, "update_table_column_statistics_req");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.o1 != null) {
+        throw result.o1;
+      }
+      if (result.o2 != null) {
+        throw result.o2;
+      }
+      if (result.o3 != null) {
+        throw result.o3;
+      }
+      if (result.o4 != null) {
+        throw result.o4;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_table_column_statistics_req failed: unknown result");
+    }
+
+    public SetPartitionsStatsResponse update_partition_column_statistics_req(SetPartitionsStatsRequest req) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException
+    {
+      send_update_partition_column_statistics_req(req);
+      return recv_update_partition_column_statistics_req();
+    }
+
+    public void send_update_partition_column_statistics_req(SetPartitionsStatsRequest req) throws org.apache.thrift.TException
+    {
+      update_partition_column_statistics_req_args args = new update_partition_column_statistics_req_args();
+      args.setReq(req);
+      sendBase("update_partition_column_statistics_req", args);
+    }
+
+    public SetPartitionsStatsResponse recv_update_partition_column_statistics_req() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException
+    {
+      update_partition_column_statistics_req_result result = new update_partition_column_statistics_req_result();
+      receiveBase(result, "update_partition_column_statistics_req");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.o1 != null) {
+        throw result.o1;
+      }
+      if (result.o2 != null) {
+        throw result.o2;
+      }
+      if (result.o3 != null) {
+        throw result.o3;
+      }
+      if (result.o4 != null) {
+        throw result.o4;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_partition_column_statistics_req failed: unknown result");
+    }
+
     public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException
     {
       send_get_table_column_statistics(db_name, tbl_name, col_name);
@@ -8070,6 +8211,38 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public void truncate_table_req(TruncateTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      truncate_table_req_call method_call = new truncate_table_req_call(req, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class truncate_table_req_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private TruncateTableRequest req;
+      public truncate_table_req_call(TruncateTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.req = req;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("truncate_table_req", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        truncate_table_req_args args = new truncate_table_req_args();
+        args.setReq(req);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public TruncateTableResponse getResult() throws MetaException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_truncate_table_req();
+      }
+    }
+
     public void get_tables(String db_name, String pattern, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       get_tables_call method_call = new get_tables_call(db_name, pattern, resultHandler, this, ___protocolFactory, ___transport);
@@ -8613,6 +8786,38 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public void alter_table_req(AlterTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      alter_table_req_call method_call = new alter_table_req_call(req, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_table_req_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private AlterTableRequest req;
+      public alter_table_req_call(AlterTableRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.req = req;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_table_req", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        alter_table_req_args args = new alter_table_req_args();
+        args.setReq(req);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public AlterTableResponse getResult() throws InvalidOperationException, MetaException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_alter_table_req();
+      }
+    }
+
     public void add_partition(Partition new_part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       add_partition_call method_call = new add_partition_call(new_part, resultHandler, this, ___protocolFactory, ___transport);
@@ -9970,23 +10175,23 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    public void alter_partitions_with_environment_context_req(AlterPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+    public void alter_partitions_req(AlterPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      alter_partitions_with_environment_context_req_call method_call = new alter_partitions_with_environment_context_req_call(req, resultHandler, this, ___protocolFactory, ___transport);
+      alter_partitions_req_call method_call = new alter_partitions_req_call(req, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_partitions_with_environment_context_req_call extends org.apache.thrift.async.TAsyncMethodCall {
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_partitions_req_call extends org.apache.thrift.async.TAsyncMethodCall {
       private AlterPartitionsRequest req;
-      public alter_partitions_with_environment_context_req_call(AlterPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      public alter_partitions_req_call(AlterPartitionsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.req = req;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partitions_with_environment_context_req", org.apache.thrift.protocol.TMessageType.CALL, 0));
-        alter_partitions_with_environment_context_req_args args = new alter_partitions_with_environment_context_req_args();
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alter_partitions_req", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        alter_partitions_req_args args = new alter_partitions_req_args();
         args.setReq(req);
         args.write(prot);
         prot.writeMessageEnd();
@@ -9998,7 +10203,7 @@ import org.slf4j.LoggerFactory;
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        return (new Client(prot)).recv_alter_partitions_with_environment_context_req();
+        return (new Client(prot)).recv_alter_partitions_req();
       }
     }
 
@@ -10556,6 +10761,70 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    public void update_table_column_statistics_req(SetPartitionsStatsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      update_table_column_statistics_req_call method_call = new update_table_column_statistics_req_call(req, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class update_table_column_statistics_req_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private SetPartitionsStatsRequest req;
+      public update_table_column_statistics_req_call(SetPartitionsStatsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.req = req;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_table_column_statistics_req", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        update_table_column_statistics_req_args args = new update_table_column_statistics_req_args();
+        args.setReq(req);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public SetPartitionsStatsResponse getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_update_table_column_statistics_req();
+      }
+    }
+
+    public void update_partition_column_statistics_req(SetPartitionsStatsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      update_partition_column_statistics_req_call method_call = new update_partition_column_statistics_req_call(req, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class update_partition_column_statistics_req_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private SetPartitionsStatsRequest req;
+      public update_partition_column_statistics_req_call(SetPartitionsStatsRequest req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.req = req;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_partition_column_statistics_req", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        update_partition_column_statistics_req_args args = new update_partition_column_statistics_req_args();
+        args.setReq(req);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public SetPartitionsStatsResponse getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_update_partition_column_statistics_req();
+      }
+    }
+
     public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
       checkReady();
       get_table_column_statistics_call method_call = new get_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport);
@@ -14143,6 +14412,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("drop_table", new drop_table());
       processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context());
       processMap.put("truncate_table", new truncate_table());
+      processMap.put("truncate_table_req", new truncate_table_req());
       processMap.put("get_tables", new get_tables());
       processMap.put("get_tables_by_type", new get_tables_by_type());
       processMap.put("get_materialized_views_for_rewriting", new get_materialized_views_for_rewriting());
@@ -14158,6 +14428,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("alter_table", new alter_table());
       processMap.put("alter_table_with_environment_context", new alter_table_with_environment_context());
       processMap.put("alter_table_with_cascade", new alter_table_with_cascade());
+      processMap.put("alter_table_req", new alter_table_req());
       processMap.put("add_partition", new add_partition());
       processMap.put("add_partition_with_environment_context", new add_partition_with_environment_context());
       processMap.put("add_partitions", new add_partitions());
@@ -14193,7 +14464,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("alter_partition", new alter_partition());
       processMap.put("alter_partitions", new alter_partitions());
       processMap.put("alter_partitions_with_environment_context", new alter_partitions_with_environment_context());
-      processMap.put("alter_partitions_with_environment_context_req", new alter_partitions_with_environment_context_req());
+      processMap.put("alter_partitions_req", new alter_partitions_req());
       processMap.put("alter_partition_with_environment_context", new alter_partition_with_environment_context());
       processMap.put("rename_partition", new rename_partition());
       processMap.put("partition_name_has_valid_characters", new partition_name_has_valid_characters());
@@ -14210,6 +14481,8 @@ import org.slf4j.LoggerFactory;
       processMap.put("get_check_constraints", new get_check_constraints());
       processMap.put("update_table_column_statistics", new update_table_column_statistics());
       processMap.put("update_partition_column_statistics", new update_partition_column_statistics());
+      processMap.put("update_table_column_statistics_req", new update_table_column_statistics_req());
+      processMap.put("update_partition_column_statistics_req", new update_partition_column_statistics_req());
       processMap.put("get_table_column_statistics", new get_table_column_statistics());
       processMap.put("get_partition_column_statistics", new get_partition_column_statistics());
       processMap.put("get_table_statistics_req", new get_table_statistics_req());
@@ -15225,6 +15498,30 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class truncate_table_req<I extends Iface> extends org.apache.thrift.ProcessFunction<I, truncate_table_req_args> {
+      public truncate_table_req() {
+        super("truncate_table_req");
+      }
+
+      public truncate_table_req_args getEmptyArgsInstance() {
+        return new truncate_table_req_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public truncate_table_req_result getResult(I iface, truncate_table_req_args args) throws org.apache.thrift.TException {
+        truncate_table_req_result result = new truncate_table_req_result();
+        try {
+          result.success = iface.truncate_table_req(args.req);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        }
+        return result;
+      }
+    }
+
     @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_tables<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_tables_args> {
       public get_tables() {
         super("get_tables");
@@ -15607,6 +15904,32 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_table_req<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_table_req_args> {
+      public alter_table_req() {
+        super("alter_table_req");
+      }
+
+      public alter_table_req_args getEmptyArgsInstance() {
+        return new alter_table_req_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public alter_table_req_result getResult(I iface, alter_table_req_args args) throws org.apache.thrift.TException {
+        alter_table_req_result result = new alter_table_req_result();
+        try {
+          result.success = iface.alter_table_req(args.req);
+        } catch (InvalidOperationException o1) {
+          result.o1 = o1;
+        } catch (MetaException o2) {
+          result.o2 = o2;
+        }
+        return result;
+      }
+    }
+
     @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_partition<I extends Iface> extends org.apache.thrift.ProcessFunction<I, add_partition_args> {
       public add_partition() {
         super("add_partition");
@@ -16550,23 +16873,23 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_partitions_with_environment_context_req<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_partitions_with_environment_context_req_args> {
-      public alter_partitions_with_environment_context_req() {
-        super("alter_partitions_with_environment_context_req");
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_partitions_req<I extends Iface> extends org.apache.thrift.ProcessFunction<I, alter_partitions_req_args> {
+      public alter_partitions_req() {
+        super("alter_partitions_req");
       }
 
-      public alter_partitions_with_environment_context_req_args getEmptyArgsInstance() {
-        return new alter_partitions_with_environment_context_req_args();
+      public alter_partitions_req_args getEmptyArgsInstance() {
+        return new alter_partitions_req_args();
       }
 
       protected boolean isOneway() {
         return false;
       }
 
-      public alter_partitions_with_environment_context_req_result getResult(I iface, alter_partitions_with_environment_context_req_args args) throws org.apache.thrift.TException {
-        alter_partitions_with_environment_context_req_result result = new alter_partitions_with_environment_context_req_result();
+      public alter_partitions_req_result getResult(I iface, alter_partitions_req_args args) throws org.apache.thrift.TException {
+        alter_partitions_req_result result = new alter_partitions_req_result();
         try {
-          result.success = iface.alter_partitions_with_environment_context_req(args.req);
+          result.success = iface.alter_partitions_req(args.req);
         } catch (InvalidOperationException o1) {
           result.o1 = o1;
         } catch (MetaException o2) {
@@ -17012,6 +17335,66 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class update_table_column_statistics_req<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_table_column_statistics_req_args> {
+      public update_table_column_statistics_req() {
+        super("update_table_column_statistics_req");
+      }
+
+      public update_table_column_statistics_req_args getEmptyArgsInstance() {
+        return new update_table_column_statistics_req_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public update_table_column_statistics_req_result getResult(I iface, update_table_column_statistics_req_args args) throws org.apache.thrift.TException {
+        update_table_column_statistics_req_result result = new update_table_column_statistics_req_result();
+        try {
+          result.success = iface.update_table_column_statistics_req(args.req);
+        } catch (NoSuchObjectException o1) {
+          result.o1 = o1;
+        } catch (InvalidObjectException o2) {
+          result.o2 = o2;
+        } catch (MetaException o3) {
+          result.o3 = o3;
+        } catch (InvalidInputException o4) {
+          result.o4 = o4;
+        }
+        return result;
+      }
+    }
+
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class update_partition_column_statistics_req<I extends Iface> extends org.apache.thrift.ProcessFunction<I, update_partition_column_statistics_req_args> {
+      public update_partition_column_statistics_req() {
+        super("update_partition_column_statistics_req");
+      }
+
+      public update_partition_column_statistics_req_args getEmptyArgsInstance() {
+        return new update_partition_column_statistics_req_args();
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public update_partition_column_statistics_req_result getResult(I iface, update_partition_column_statistics_req_args args) throws org.apache.thrift.TException {
+        update_partition_column_statistics_req_result result = new update_partition_column_statistics_req_result();
+        try {
+          result.success = iface.update_partition_column_statistics_req(args.req);
+        } catch (NoSuchObjectException o1) {
+          result.o1 = o1;
+        } catch (InvalidObjectException o2) {
+          result.o2 = o2;
+        } catch (MetaException o3) {
+          result.o3 = o3;
+        } catch (InvalidInputException o4) {
+          result.o4 = o4;
+        }
+        return result;
+      }
+    }
+
     @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_table_column_statistics<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_table_column_statistics_args> {
       public get_table_column_statistics() {
         super("get_table_column_statistics");
@@ -19724,6 +20107,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("drop_table", new drop_table());
       processMap.put("drop_table_with_environment_context", new drop_table_with_environment_context());
       processMap.put("truncate_table", new truncate_table());
+      processMap.put("truncate_table_req", new truncate_table_req());
       processMap.put("get_tables", new get_tables());
       processMap.put("get_tables_by_type", new get_tables_by_type());
       processMap.put("get_materialized_views_for_rewriting", new get_materialized_views_for_rewriting());
@@ -19739,6 +20123,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("alter_table", new alter_table());
       processMap.put("alter_table_with_environment_context", new alter_table_with_environment_context());
       processMap.put("alter_table_with_cascade", new alter_table_with_cascade());
+      processMap.put("alter_table_req", new alter_table_req());
       processMap.put("add_partition", new add_partition());
       processMap.put("add_partition_with_environment_context", new add_partition_with_environment_context());
       processMap.put("add_partitions", new add_partitions());
@@ -19774,7 +20159,7 @@ import org.slf4j.LoggerFactory;
       processMap.put("alter_partition", new alter_partition());
       processMap.put("alter_partitions", new alter_partitions());
       processMap.put("alter_partitions_with_environment_context", new alter_partitions_with_environment_context());
-      processMap.put("alter_partitions_with_environment_context_req", new alter_partitions_with_environment_context_req());
+      processMap.put("alter_partitions_req", new alter_partitions_req());
       processMap.put("alter_partition_with_environment_context", new alter_partition_with_environment_context());
       processMap.put("rename_partition", new rename_partition());
       processMap.put("partition_name_has_valid_characters", new partition_name_has_valid_characters());
@@ -19791,6 +20176,8 @@ import org.slf4j.LoggerFactory;
       processMap.put("get_check_constraints", new get_check_constraints());
       processMap.put("update_table_column_statistics", new update_table_column_statistics());
       processMap.put("update_partition_column_statistics", new update_partition_column_statistics());
+      processMap.put("update_table_column_statistics_req", new update_table_column_statistics_req());
+      processMap.put("update_partition_column_statistics_req", new update_partition_column_statistics_req());
       processMap.put("get_table_column_statistics", new get_table_column_statistics());
       processMap.put("get_partition_column_statistics", new get_partition_column_statistics());
       processMap.put("get_table_statistics_req", new get_table_statistics_req());
@@ -22037,6 +22424,63 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class truncate_table_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, truncate_table_req_args, TruncateTableResponse> {
+      public truncate_table_req() {
+        super("truncate_table_req");
+      }
+
+      public truncate_table_req_args getEmptyArgsInstance() {
+        return new truncate_table_req_args();
+      }
+
+      public AsyncMethodCallback<TruncateTableResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<TruncateTableResponse>() { 
+          public void onComplete(TruncateTableResponse o) {
+            truncate_table_req_result result = new truncate_table_req_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            truncate_table_req_result result = new truncate_table_req_result();
+            if (e instanceof MetaException) {
+                        result.o1 = (MetaException) e;
+                        result.setO1IsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, truncate_table_req_args args, org.apache.thrift.async.AsyncMethodCallback<TruncateTableResponse> resultHandler) throws TException {
+        iface.truncate_table_req(args.req,resultHandler);
+      }
+    }
+
     @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_tables<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_tables_args, List<String>> {
       public get_tables() {
         super("get_tables");
@@ -22947,6 +23391,68 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_table_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_table_req_args, AlterTableResponse> {
+      public alter_table_req() {
+        super("alter_table_req");
+      }
+
+      public alter_table_req_args getEmptyArgsInstance() {
+        return new alter_table_req_args();
+      }
+
+      public AsyncMethodCallback<AlterTableResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<AlterTableResponse>() { 
+          public void onComplete(AlterTableResponse o) {
+            alter_table_req_result result = new alter_table_req_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            alter_table_req_result result = new alter_table_req_result();
+            if (e instanceof InvalidOperationException) {
+                        result.o1 = (InvalidOperationException) e;
+                        result.setO1IsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof MetaException) {
+                        result.o2 = (MetaException) e;
+                        result.setO2IsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, alter_table_req_args args, org.apache.thrift.async.AsyncMethodCallback<AlterTableResponse> resultHandler) throws TException {
+        iface.alter_table_req(args.req,resultHandler);
+      }
+    }
+
     @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_partition<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, add_partition_args, Partition> {
       public add_partition() {
         super("add_partition");
@@ -25186,20 +25692,20 @@ import org.slf4j.LoggerFactory;
       }
     }
 
-    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_partitions_with_environment_context_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_partitions_with_environment_context_req_args, AlterPartitionsResponse> {
-      public alter_partitions_with_environment_context_req() {
-        super("alter_partitions_with_environment_context_req");
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class alter_partitions_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alter_partitions_req_args, AlterPartitionsResponse> {
+      public alter_partitions_req() {
+        super("alter_partitions_req");
       }
 
-      public alter_partitions_with_environment_context_req_args getEmptyArgsInstance() {
-        return new alter_partitions_with_environment_context_req_args();
+      public alter_partitions_req_args getEmptyArgsInstance() {
+        return new alter_partitions_req_args();
       }
 
       public AsyncMethodCallback<AlterPartitionsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
         return new AsyncMethodCallback<AlterPartitionsResponse>() { 
           public void onComplete(AlterPartitionsResponse o) {
-            alter_partitions_with_environment_context_req_result result = new alter_partitions_with_environment_context_req_result();
+            alter_partitions_req_result result = new alter_partitions_req_result();
             result.success = o;
             try {
               fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
@@ -25212,7 +25718,7 @@ import org.slf4j.LoggerFactory;
           public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TBase msg;
-            alter_partitions_with_environment_context_req_result result = new alter_partitions_with_environment_context_req_result();
+            alter_partitions_req_result result = new alter_partitions_req_result();
             if (e instanceof InvalidOperationException) {
                         result.o1 = (InvalidOperationException) e;
                         result.setO1IsSet(true);
@@ -25243,8 +25749,8 @@ import org.slf4j.LoggerFactory;
         return false;
       }
 
-      public void start(I iface, alter_partitions_with_environment_context_req_args args, org.apache.thrift.async.AsyncMethodCallback<AlterPartitionsResponse> resultHandler) throws TException {
-        iface.alter_partitions_with_environment_context_req(args.req,resultHandler);
+      public void start(I iface, alter_partitions_req_args args, org.apache.thrift.async.AsyncMethodCallback<AlterPartitionsResponse> resultHandler) throws TException {
+        iface.alter_partitions_req(args.req,resultHandler);
       }
     }
 
@@ -26281,6 +26787,150 @@ import org.slf4j.LoggerFactory;
       }
     }
 
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class update_table_column_statistics_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_table_column_statistics_req_args, SetPartitionsStatsResponse> {
+      public update_table_column_statistics_req() {
+        super("update_table_column_statistics_req");
+      }
+
+      public update_table_column_statistics_req_args getEmptyArgsInstance() {
+        return new update_table_column_statistics_req_args();
+      }
+
+      public AsyncMethodCallback<SetPartitionsStatsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<SetPartitionsStatsResponse>() { 
+          public void onComplete(SetPartitionsStatsResponse o) {
+            update_table_column_statistics_req_result result = new update_table_column_statistics_req_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            update_table_column_statistics_req_result result = new update_table_column_statistics_req_result();
+            if (e instanceof NoSuchObjectException) {
+                        result.o1 = (NoSuchObjectException) e;
+                        result.setO1IsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof InvalidObjectException) {
+                        result.o2 = (InvalidObjectException) e;
+                        result.setO2IsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof MetaException) {
+                        result.o3 = (MetaException) e;
+                        result.setO3IsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof InvalidInputException) {
+                        result.o4 = (InvalidInputException) e;
+                        result.setO4IsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, update_table_column_statistics_req_args args, org.apache.thrift.async.AsyncMethodCallback<SetPartitionsStatsResponse> resultHandler) throws TException {
+        iface.update_table_column_statistics_req(args.req,resultHandler);
+      }
+    }
+
+    @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class update_partition_column_statistics_req<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, update_partition_column_statistics_req_args, SetPartitionsStatsResponse> {
+      public update_partition_column_statistics_req() {
+        super("update_partition_column_statistics_req");
+      }
+
+      public update_partition_column_statistics_req_args getEmptyArgsInstance() {
+        return new update_partition_column_statistics_req_args();
+      }
+
+      public AsyncMethodCallback<SetPartitionsStatsResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+        final org.apache.thrift.AsyncProcessFunction fcall = this;
+        return new AsyncMethodCallback<SetPartitionsStatsResponse>() { 
+          public void onComplete(SetPartitionsStatsResponse o) {
+            update_partition_column_statistics_req_result result = new update_partition_column_statistics_req_result();
+            result.success = o;
+            try {
+              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+              return;
+            } catch (Exception e) {
+              LOGGER.error("Exception writing to internal frame buffer", e);
+            }
+            fb.close();
+          }
+          public void onError(Exception e) {
+            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+            org.apache.thrift.TBase msg;
+            update_partition_column_statistics_req_result result = new update_partition_column_statistics_req_result();
+            if (e instanceof NoSuchObjectException) {
+                        result.o1 = (NoSuchObjectException) e;
+                        result.setO1IsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof InvalidObjectException) {
+                        result.o2 = (InvalidObjectException) e;
+                        result.setO2IsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof MetaException) {
+                        result.o3 = (MetaException) e;
+                        result.setO3IsSet(true);
+                        msg = result;
+            }
+            else             if (e instanceof InvalidInputException) {
+                        result.o4 = (InvalidInputException) e;
+                        result.setO4IsSet(true);
+                        msg = result;
+            }
+             else 
+            {
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+            }
+            try {
+              fcall.sendResponse(fb,msg,msgType,seqid);
+              return;
+            } catch (Exception ex) {
+              LOGGER.error("Exception writing to internal frame buffer", ex);
+            }
+            fb.close();
+          }
+        };
+      }
+
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public void start(I iface, update_partition_column_statistics_req_args args, org.apache.thrift.async.AsyncMethodCallback<SetPartitionsStatsResponse> resultHandler) throws TException {
+        iface.update_partition_column_statistics_req(args.req,resultHandler);
+      }
+    }
+
     @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class get_table_column_statistics<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_table_column_statistics_args, ColumnStatistics> {
       public get_table_column_statistics() {
         super("get_table_column_statistics");
@@ -42539,13 +43189,13 @@ import org.slf4j.LoggerFactory;
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list960 = iprot.readListBegin();
-                  struct.success = new ArrayList<String>(_list960.size);
-                  String _elem961;
-                  for (int _i962 = 0; _i962 < _list960.size; ++_i962)
+                  org.apache.thrift.protocol.TList _list968 = iprot.readListBegin();
+                  struct.success = new ArrayList<String>(_list968.size);
+                  String _elem969;
+                  for (int _i970 = 0; _i970 < _list968.size; ++_i970)
                   {
-                    _elem961 = iprot.readString();
-                    struct.success.add(_elem961);
+                    _elem969 = iprot.readString();
+                    struct.success.add(_elem969);
                   }
                   iprot.readListEnd();
                 }
@@ -42580,9 +43230,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
-            for (String _iter963 : struct.success)
+            for (String _iter971 : struct.success)
             {
-              oprot.writeString(_iter963);
+              oprot.writeString(_iter971);
             }
             oprot.writeListEnd();
           }
@@ -42621,9 +43271,9 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (String _iter964 : struct.success)
+            for (String _iter972 : struct.success)
             {
-              oprot.writeString(_iter964);
+              oprot.writeString(_iter972);
             }
           }
         }
@@ -42638,13 +43288,13 @@ import org.slf4j.LoggerFactory;
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list965 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-            struct.success = new ArrayList<String>(_list965.size);
-            String _elem966;
-            for (int _i967 = 0; _i967 < _list965.size; ++_i967)
+            org.apache.thrift.protocol.TList _list973 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.success = new ArrayList<String>(_list973.size);
+            String _elem974;
+            for (int _i975 = 0; _i975 < _list973.size; ++_i975)
             {
-              _elem966 = iprot.readString();
-              struct.success.add(_elem966);
+              _elem974 = iprot.readString();
+              struct.success.add(_elem974);
             }
           }
           struct.setSuccessIsSet(true);
@@ -43298,13 +43948,13 @@ import org.slf4j.LoggerFactory;
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list968 = iprot.readListBegin();
-                  struct.success = new ArrayList<String>(_list968.size);
-                  String _elem969;
-                  for (int _i970 = 0; _i970 < _list968.size; ++_i970)
+                  org.apache.thrift.protocol.TList _list976 = iprot.readListBegin();
+                  struct.success = new ArrayList<String>(_list976.size);
+                  String _elem977;
+                  for (int _i978 = 0; _i978 < _list976.size; ++_i978)
                   {
-                    _elem969 = iprot.readString();
-                    struct.success.add(_elem969);
+                    _elem977 = iprot.readString();
+                    struct.success.add(_elem977);
                   }
                   iprot.readListEnd();
                 }
@@ -43339,9 +43989,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
-            for (String _iter971 : struct.success)
+            for (String _iter979 : struct.success)
             {
-              oprot.writeString(_iter971);
+              oprot.writeString(_iter979);
             }
             oprot.writeListEnd();
           }
@@ -43380,9 +44030,9 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (String _iter972 : struct.success)
+            for (String _iter980 : struct.success)
             {
-              oprot.writeString(_iter972);
+              oprot.writeString(_iter980);
             }
           }
         }
@@ -43397,13 +44047,13 @@ import org.slf4j.LoggerFactory;
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list973 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-            struct.success = new ArrayList<String>(_list973.size);
-            String _elem974;
-            for (int _i975 = 0; _i975 < _list973.size; ++_i975)
+            org.apache.thrift.protocol.TList _list981 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.success = new ArrayList<String>(_list981.size);
+            String _elem982;
+            for (int _i983 = 0; _i983 < _list981.size; ++_i983)
             {
-              _elem974 = iprot.readString();
-              struct.success.add(_elem974);
+              _elem982 = iprot.readString();
+              struct.success.add(_elem982);
             }
           }
           struct.setSuccessIsSet(true);
@@ -48010,16 +48660,16 @@ import org.slf4j.LoggerFactory;
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                 {
-                  org.apache.thrift.protocol.TMap _map976 = iprot.readMapBegin();
-                  struct.success = new HashMap<String,Type>(2*_map976.size);
-                  String _key977;
-                  Type _val978;
-                  for (int _i979 = 0; _i979 < _map976.size; ++_i979)
+                  org.apache.thrift.protocol.TMap _map984 = iprot.readMapBegin();
+                  struct.success = new HashMap<String,Type>(2*_map984.size);
+                  String _key985;
+                  Type _val986;
+                  for (int _i987 = 0; _i987 < _map984.size; ++_i987)
                   {
-                    _key977 = iprot.readString();
-                    _val978 = new Type();
-                    _val978.read(iprot);
-                    struct.success.put(_key977, _val978);
+                    _key985 = iprot.readString();
+                    _val986 = new Type();
+                    _val986.read(iprot);
+                    struct.success.put(_key985, _val986);
                   }
                   iprot.readMapEnd();
                 }
@@ -48054,10 +48704,10 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
-            for (Map.Entry<String, Type> _iter980 : struct.success.entrySet())
+            for (Map.Entry<String, Type> _iter988 : struct.success.entrySet())
             {
-              oprot.writeString(_iter980.getKey());
-              _iter980.getValue().write(oprot);
+              oprot.writeString(_iter988.getKey());
+              _iter988.getValue().write(oprot);
             }
             oprot.writeMapEnd();
           }
@@ -48096,10 +48746,10 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (Map.Entry<String, Type> _iter981 : struct.success.entrySet())
+            for (Map.Entry<String, Type> _iter989 : struct.success.entrySet())
             {
-              oprot.writeString(_iter981.getKey());
-              _iter981.getValue().write(oprot);
+              oprot.writeString(_iter989.getKey());
+              _iter989.getValue().write(oprot);
             }
           }
         }
@@ -48114,16 +48764,16 @@ import org.slf4j.LoggerFactory;
         BitSet incoming = iprot.readBitSet(2);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TMap _map982 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.success = new HashMap<String,Type>(2*_map982.size);
-            String _key983;
-            Type _val984;
-            for (int _i985 = 0; _i985 < _map982.size; ++_i985)
+            org.apache.thrift.protocol.TMap _map990 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new HashMap<String,Type>(2*_map990.size);
+            String _key991;
+            Type _val992;
+            for (int _i993 = 0; _i993 < _map990.size; ++_i993)
             {
-              _key983 = iprot.readString();
-              _val984 = new Type();
-              _val984.read(iprot);
-              struct.success.put(_key983, _val984);
+              _key991 = iprot.readString();
+              _val992 = new Type();
+              _val992.read(iprot);
+              struct.success.put(_key991, _val992);
             }
           }
           struct.setSuccessIsSet(true);
@@ -49158,14 +49808,14 @@ import org.slf4j.LoggerFactory;
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list986 = iprot.readListBegin();
-                  struct.success = new ArrayList<FieldSchema>(_list986.size);
-                  FieldSchema _elem987;
-                  for (int _i988 = 0; _i988 < _list986.size; ++_i988)
+                  org.apache.thrift.protocol.TList _list994 = iprot.readListBegin();
+                  struct.success = new ArrayList<FieldSchema>(_list994.size);
+                  FieldSchema _elem995;
+                  for (int _i996 = 0; _i996 < _list994.size; ++_i996)
                   {
-                    _elem987 = new FieldSchema();
-                    _elem987.read(iprot);
-                    struct.success.add(_elem987);
+                    _elem995 = new FieldSchema();
+                    _elem995.read(iprot);
+                    struct.success.add(_elem995);
                   }
                   iprot.readListEnd();
                 }
@@ -49218,9 +49868,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
-            for (FieldSchema _iter989 : struct.success)
+            for (FieldSchema _iter997 : struct.success)
             {
-              _iter989.write(oprot);
+              _iter997.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -49275,9 +49925,9 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (FieldSchema _iter990 : struct.success)
+            for (FieldSchema _iter998 : struct.success)
             {
-              _iter990.write(oprot);
+              _iter998.write(oprot);
             }
           }
         }
@@ -49298,14 +49948,14 @@ import org.slf4j.LoggerFactory;
         BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list991 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.success = new ArrayList<FieldSchema>(_list991.size);
-            FieldSchema _elem992;
-            for (int _i993 = 0; _i993 < _list991.size; ++_i993)
+            org.apache.thrift.protocol.TList _list999 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<FieldSchema>(_list999.size);
+            FieldSchema _elem1000;
+            for (int _i1001 = 0; _i1001 < _list999.size; ++_i1001)
             {
-              _elem992 = new FieldSchema();
-              _elem992.read(iprot);
-              struct.success.add(_elem992);
+              _elem1000 = new FieldSchema();
+              _elem1000.read(iprot);
+              struct.success.add(_elem1000);
             }
           }
           struct.setSuccessIsSet(true);
@@ -50459,14 +51109,14 @@ import org.slf4j.LoggerFactory;
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list994 = iprot.readListBegin();
-                  struct.success = new ArrayList<FieldSchema>(_list994.size);
-                  FieldSchema _elem995;
-                  for (int _i996 = 0; _i996 < _list994.size; ++_i996)
+                  org.apache.thrift.protocol.TList _list1002 = iprot.readListBegin();
+                  struct.success = new ArrayList<FieldSchema>(_list1002.size);
+                  FieldSchema _elem1003;
+                  for (int _i1004 = 0; _i1004 < _list1002.size; ++_i1004)
                   {
-                    _elem995 = new FieldSchema();
-                    _elem995.read(iprot);
-                    struct.success.add(_elem995);
+                    _elem1003 = new FieldSchema();
+                    _elem1003.read(iprot);
+                    struct.success.add(_elem1003);
                   }
                   iprot.readListEnd();
                 }
@@ -50519,9 +51169,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
-            for (FieldSchema _iter997 : struct.success)
+            for (FieldSchema _iter1005 : struct.success)
             {
-              _iter997.write(oprot);
+              _iter1005.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -50576,9 +51226,9 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (FieldSchema _iter998 : struct.success)
+            for (FieldSchema _iter1006 : struct.success)
             {
-              _iter998.write(oprot);
+              _iter1006.write(oprot);
             }
           }
         }
@@ -50599,14 +51249,14 @@ import org.slf4j.LoggerFactory;
         BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list999 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.success = new ArrayList<FieldSchema>(_list999.size);
-            FieldSchema _elem1000;
-            for (int _i1001 = 0; _i1001 < _list999.size; ++_i1001)
+            org.apache.thrift.protocol.TList _list1007 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<FieldSchema>(_list1007.size);
+            FieldSchema _elem1008;
+            for (int _i1009 = 0; _i1009 < _list1007.size; ++_i1009)
             {
-              _elem1000 = new FieldSchema();
-              _elem1000.read(iprot);
-              struct.success.add(_elem1000);
+              _elem1008 = new FieldSchema();
+              _elem1008.read(iprot);
+              struct.success.add(_elem1008);
             }
           }
           struct.setSuccessIsSet(true);
@@ -51651,14 +52301,14 @@ import org.slf4j.LoggerFactory;
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list1002 = iprot.readListBegin();
-                  struct.success = new ArrayList<FieldSchema>(_list1002.size);
-                  FieldSchema _elem1003;
-                  for (int _i1004 = 0; _i1004 < _list1002.size; ++_i1004)
+                  org.apache.thrift.protocol.TList _list1010 = iprot.readListBegin();
+                  struct.success = new ArrayList<FieldSchema>(_list1010.size);
+                  FieldSchema _elem1011;
+                  for (int _i1012 = 0; _i1012 < _list1010.size; ++_i1012)
                   {
-                    _elem1003 = new FieldSchema();
-                    _elem1003.read(iprot);
-                    struct.success.add(_elem1003);
+                    _elem1011 = new FieldSchema();
+                    _elem1011.read(iprot);
+                    struct.success.add(_elem1011);
                   }
                   iprot.readListEnd();
                 }
@@ -51711,9 +52361,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
-            for (FieldSchema _iter1005 : struct.success)
+            for (FieldSchema _iter1013 : struct.success)
             {
-              _iter1005.write(oprot);
+              _iter1013.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -51768,9 +52418,9 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (FieldSchema _iter1006 : struct.success)
+            for (FieldSchema _iter1014 : struct.success)
             {
-              _iter1006.write(oprot);
+              _iter1014.write(oprot);
             }
           }
         }
@@ -51791,14 +52441,14 @@ import org.slf4j.LoggerFactory;
         BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list1007 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.success = new ArrayList<FieldSchema>(_list1007.size);
-            FieldSchema _elem1008;
-            for (int _i1009 = 0; _i1009 < _list1007.size; ++_i1009)
+            org.apache.thrift.protocol.TList _list1015 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<FieldSchema>(_list1015.size);
+            FieldSchema _elem1016;
+            for (int _i1017 = 0; _i1017 < _list1015.size; ++_i1017)
             {
-              _elem1008 = new FieldSchema();
-              _elem1008.read(iprot);
-              struct.success.add(_elem1008);
+              _elem1016 = new FieldSchema();
+              _elem1016.read(iprot);
+              struct.success.add(_elem1016);
             }
           }
           struct.setSuccessIsSet(true);
@@ -52952,14 +53602,14 @@ import org.slf4j.LoggerFactory;
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list1010 = iprot.readListBegin();
-                  struct.success = new ArrayList<FieldSchema>(_list1010.size);
-                  FieldSchema _elem1011;
-                  for (int _i1012 = 0; _i1012 < _list1010.size; ++_i1012)
+                  org.apache.thrift.protocol.TList _list1018 = iprot.readListBegin();
+                  struct.success = new ArrayList<FieldSchema>(_list1018.size);
+                  FieldSchema _elem1019;
+                  for (int _i1020 = 0; _i1020 < _list1018.size; ++_i1020)
                   {
-                    _elem1011 = new FieldSchema();
-                    _elem1011.read(iprot);
-                    struct.success.add(_elem1011);
+                    _elem1019 = new FieldSchema();
+                    _elem1019.read(iprot);
+                    struct.success.add(_elem1019);
                   }
                   iprot.readListEnd();
                 }
@@ -53012,9 +53662,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
-            for (FieldSchema _iter1013 : struct.success)
+            for (FieldSchema _iter1021 : struct.success)
             {
-              _iter1013.write(oprot);
+              _iter1021.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -53069,9 +53719,9 @@ import org.slf4j.LoggerFactory;
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (FieldSchema _iter1014 : struct.success)
+            for (FieldSchema _iter1022 : struct.success)
             {
-              _iter1014.write(oprot);
+              _iter1022.write(oprot);
             }
           }
         }
@@ -53092,14 +53742,14 @@ import org.slf4j.LoggerFactory;
         BitSet incoming = iprot.readBitSet(4);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TList _list1015 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            struct.success = new ArrayList<FieldSchema>(_list1015.size);
-            FieldSchema _elem1016;
-            for (int _i1017 = 0; _i1017 < _list1015.size; ++_i1017)
+            org.apache.thrift.protocol.TList _list1023 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            struct.success = new ArrayList<FieldSchema>(_list1023.size);
+            FieldSchema _elem1024;
+            for (int _i1025 = 0; _i1025 < _list1023.size; ++_i1025)
             {
-              _elem1016 = new FieldSchema();
-              _elem1016.read(iprot);
-              struct.success.add(_elem1016);
+              _elem1024 = new FieldSchema();
+              _elem1024.read(iprot);
+              struct.success.add(_elem1024);
             }
           }
           struct.setSuccessIsSet(true);
@@ -56228,14 +56878,14 @@ import org.slf4j.LoggerFactory;
             case 2: // PRIMARY_KEYS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list1018 = iprot.readListBegin();
-                  struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list1018.size);
-                  SQLPrimaryKey _elem1019;
-                  for (int _i1020 = 0; _i1020 < _list1018.size; ++_i1020)
+                  org.apache.thrift.protocol.TList _list1026 = iprot.readListBegin();
+                  struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list1026.size);
+                  SQLPrimaryKey _elem1027;
+                  for (int _i1028 = 0; _i1028 < _list1026.size; ++_i1028)
                   {
-                    _elem1019 = new SQLPrimaryKey();
-                    _elem1019.read(iprot);
-                    struct.primaryKeys.add(_elem1019);
+                    _elem1027 = new SQLPrimaryKey();
+                    _elem1027.read(iprot);
+                    struct.primaryKeys.add(_elem1027);
                   }
                   iprot.readListEnd();
                 }
@@ -56247,14 +56897,14 @@ import org.slf4j.LoggerFactory;
             case 3: // FOREIGN_KEYS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list1021 = iprot.readListBegin();
-                  struct.foreignKeys = new ArrayList<SQLForeignKey>(_list1021.size);
-                  SQLForeignKey _elem1022;
-                  for (int _i1023 = 0; _i1023 < _list1021.size; ++_i1023)
+                  org.apache.thrift.protocol.TList _list1029 = iprot.readListBegin();
+                  struct.foreignKeys = new ArrayList<SQLForeignKey>(_list1029.size);
+                  SQLForeignKey _elem1030;
+                  for (int _i1031 = 0; _i1031 < _list1029.size; ++_i1031)
                   {
-                    _elem1022 = new SQLForeignKey();
-                    _elem1022.read(iprot);
-                    struct.foreignKeys.add(_elem1022);
+                    _elem1030 = new SQLForeignKey();
+                    _elem1030.read(iprot);
+                    struct.foreignKeys.add(_elem1030);
                   }
                   iprot.readListEnd();
                 }
@@ -56266,14 +56916,14 @@ import org.slf4j.LoggerFactory;
             case 4: // UNIQUE_CONSTRAINTS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list1024 = iprot.readListBegin();
-                  struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list1024.size);
-                  SQLUniqueConstraint _elem1025;
-                  for (int _i1026 = 0; _i1026 < _list1024.size; ++_i1026)
+                  org.apache.thrift.protocol.TList _list1032 = iprot.readListBegin();
+                  struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list1032.size);
+                  SQLUniqueConstraint _elem1033;
+                  for (int _i1034 = 0; _i1034 < _list1032.size; ++_i1034)
                   {
-                    _elem1025 = new SQLUniqueConstraint();
-                    _elem1025.read(iprot);
-                    struct.uniqueConstraints.add(_elem1025);
+                    _elem1033 = new SQLUniqueConstraint();
+                    _elem1033.read(iprot);
+                    struct.uniqueConstraints.add(_elem1033);
                   }
                   iprot.readListEnd();
                 }
@@ -56285,14 +56935,14 @@ import org.slf4j.LoggerFactory;
             case 5: // NOT_NULL_CONSTRAINTS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list1027 = iprot.readListBegin();
-                  struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list1027.size);
-                  SQLNotNullConstraint _elem1028;
-                  for (int _i1029 = 0; _i1029 < _list1027.size; ++_i1029)
+                  org.apache.thrift.protocol.TList _list1035 = iprot.readListBegin();
+                  struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list1035.size);
+                  SQLNotNullConstraint _elem1036;
+                  for (int _i1037 = 0; _i1037 < _list1035.size; ++_i1037)
                   {
-                    _elem1028 = new SQLNotNullConstraint();
-                    _elem1028.read(iprot);
-                    struct.notNullConstraints.add(_elem1028);
+                    _elem1036 = new SQLNotNullConstraint();
+                    _elem1036.read(iprot);
+                    struct.notNullConstraints.add(_elem1036);
                   }
                   iprot.readListEnd();
                 }
@@ -56304,14 +56954,14 @@ import org.slf4j.LoggerFactory;
             case 6: // DEFAULT_CONSTRAINTS
               if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                 {
-                  org.apache.thrift.protocol.TList _list1030 = iprot.readListBegin();
-                  struct.defaultConstraints = new ArrayList<SQLDefaultConstraint>(_list1030.size);
-                  SQLDefaultConstraint _elem1031;
-                  for (int _i1032 = 0; _i1032 < _list1030.size; ++_i1032)
+                  org.apache.thrift.protocol.TList _list1038 = iprot.readListBegin();
+                  struct.defaultConstraints = new ArrayList<SQLDefaultConstraint>(_list1038.size);
+                  SQLDefaultConstraint _elem1039;
+                  for (int _i1040 = 0; _i1040 < _list1038.size; ++_i1040)
                   {
- 

<TRUNCATED>

[15/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java
index 56f239e..93ca303 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java
@@ -447,14 +447,14 @@ import org.slf4j.LoggerFactory;
           case 2: // OPEN_TXNS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list554 = iprot.readListBegin();
-                struct.open_txns = new ArrayList<TxnInfo>(_list554.size);
-                TxnInfo _elem555;
-                for (int _i556 = 0; _i556 < _list554.size; ++_i556)
+                org.apache.thrift.protocol.TList _list562 = iprot.readListBegin();
+                struct.open_txns = new ArrayList<TxnInfo>(_list562.size);
+                TxnInfo _elem563;
+                for (int _i564 = 0; _i564 < _list562.size; ++_i564)
                 {
-                  _elem555 = new TxnInfo();
-                  _elem555.read(iprot);
-                  struct.open_txns.add(_elem555);
+                  _elem563 = new TxnInfo();
+                  _elem563.read(iprot);
+                  struct.open_txns.add(_elem563);
                 }
                 iprot.readListEnd();
               }
@@ -483,9 +483,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.open_txns.size()));
-          for (TxnInfo _iter557 : struct.open_txns)
+          for (TxnInfo _iter565 : struct.open_txns)
           {
-            _iter557.write(oprot);
+            _iter565.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -511,9 +511,9 @@ import org.slf4j.LoggerFactory;
       oprot.writeI64(struct.txn_high_water_mark);
       {
         oprot.writeI32(struct.open_txns.size());
-        for (TxnInfo _iter558 : struct.open_txns)
+        for (TxnInfo _iter566 : struct.open_txns)
         {
-          _iter558.write(oprot);
+          _iter566.write(oprot);
         }
       }
     }
@@ -524,14 +524,14 @@ import org.slf4j.LoggerFactory;
       struct.txn_high_water_mark = iprot.readI64();
       struct.setTxn_high_water_markIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list559 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.open_txns = new ArrayList<TxnInfo>(_list559.size);
-        TxnInfo _elem560;
-        for (int _i561 = 0; _i561 < _list559.size; ++_i561)
+        org.apache.thrift.protocol.TList _list567 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.open_txns = new ArrayList<TxnInfo>(_list567.size);
+        TxnInfo _elem568;
+        for (int _i569 = 0; _i569 < _list567.size; ++_i569)
         {
-          _elem560 = new TxnInfo();
-          _elem560.read(iprot);
-          struct.open_txns.add(_elem560);
+          _elem568 = new TxnInfo();
+          _elem568.read(iprot);
+          struct.open_txns.add(_elem568);
         }
       }
       struct.setOpen_txnsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java
index 9688297..c152a0a 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java
@@ -615,13 +615,13 @@ import org.slf4j.LoggerFactory;
           case 2: // OPEN_TXNS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list562 = iprot.readListBegin();
-                struct.open_txns = new ArrayList<Long>(_list562.size);
-                long _elem563;
-                for (int _i564 = 0; _i564 < _list562.size; ++_i564)
+                org.apache.thrift.protocol.TList _list570 = iprot.readListBegin();
+                struct.open_txns = new ArrayList<Long>(_list570.size);
+                long _elem571;
+                for (int _i572 = 0; _i572 < _list570.size; ++_i572)
                 {
-                  _elem563 = iprot.readI64();
-                  struct.open_txns.add(_elem563);
+                  _elem571 = iprot.readI64();
+                  struct.open_txns.add(_elem571);
                 }
                 iprot.readListEnd();
               }
@@ -666,9 +666,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.open_txns.size()));
-          for (long _iter565 : struct.open_txns)
+          for (long _iter573 : struct.open_txns)
           {
-            oprot.writeI64(_iter565);
+            oprot.writeI64(_iter573);
           }
           oprot.writeListEnd();
         }
@@ -704,9 +704,9 @@ import org.slf4j.LoggerFactory;
       oprot.writeI64(struct.txn_high_water_mark);
       {
         oprot.writeI32(struct.open_txns.size());
-        for (long _iter566 : struct.open_txns)
+        for (long _iter574 : struct.open_txns)
         {
-          oprot.writeI64(_iter566);
+          oprot.writeI64(_iter574);
         }
       }
       oprot.writeBinary(struct.abortedBits);
@@ -726,13 +726,13 @@ import org.slf4j.LoggerFactory;
       struct.txn_high_water_mark = iprot.readI64();
       struct.setTxn_high_water_markIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list567 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.open_txns = new ArrayList<Long>(_list567.size);
-        long _elem568;
-        for (int _i569 = 0; _i569 < _list567.size; ++_i569)
+        org.apache.thrift.protocol.TList _list575 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.open_txns = new ArrayList<Long>(_list575.size);
+        long _elem576;
+        for (int _i577 = 0; _i577 < _list575.size; ++_i577)
         {
-          _elem568 = iprot.readI64();
-          struct.open_txns.add(_elem568);
+          _elem576 = iprot.readI64();
+          struct.open_txns.add(_elem576);
         }
       }
       struct.setOpen_txnsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java
index f116fd9..5b21c77 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PRINCIPAL_GRANTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list86 = iprot.readListBegin();
-                struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list86.size);
-                RolePrincipalGrant _elem87;
-                for (int _i88 = 0; _i88 < _list86.size; ++_i88)
+                org.apache.thrift.protocol.TList _list94 = iprot.readListBegin();
+                struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list94.size);
+                RolePrincipalGrant _elem95;
+                for (int _i96 = 0; _i96 < _list94.size; ++_i96)
                 {
-                  _elem87 = new RolePrincipalGrant();
-                  _elem87.read(iprot);
-                  struct.principalGrants.add(_elem87);
+                  _elem95 = new RolePrincipalGrant();
+                  _elem95.read(iprot);
+                  struct.principalGrants.add(_elem95);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size()));
-          for (RolePrincipalGrant _iter89 : struct.principalGrants)
+          for (RolePrincipalGrant _iter97 : struct.principalGrants)
           {
-            _iter89.write(oprot);
+            _iter97.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.principalGrants.size());
-        for (RolePrincipalGrant _iter90 : struct.principalGrants)
+        for (RolePrincipalGrant _iter98 : struct.principalGrants)
         {
-          _iter90.write(oprot);
+          _iter98.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list91.size);
-        RolePrincipalGrant _elem92;
-        for (int _i93 = 0; _i93 < _list91.size; ++_i93)
+        org.apache.thrift.protocol.TList _list99 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list99.size);
+        RolePrincipalGrant _elem100;
+        for (int _i101 = 0; _i101 < _list99.size; ++_i101)
         {
-          _elem92 = new RolePrincipalGrant();
-          _elem92.read(iprot);
-          struct.principalGrants.add(_elem92);
+          _elem100 = new RolePrincipalGrant();
+          _elem100.read(iprot);
+          struct.principalGrants.add(_elem100);
         }
       }
       struct.setPrincipalGrantsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java
index b8f6d24..db38fc3 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PRINCIPAL_GRANTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
-                struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list78.size);
-                RolePrincipalGrant _elem79;
-                for (int _i80 = 0; _i80 < _list78.size; ++_i80)
+                org.apache.thrift.protocol.TList _list86 = iprot.readListBegin();
+                struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list86.size);
+                RolePrincipalGrant _elem87;
+                for (int _i88 = 0; _i88 < _list86.size; ++_i88)
                 {
-                  _elem79 = new RolePrincipalGrant();
-                  _elem79.read(iprot);
-                  struct.principalGrants.add(_elem79);
+                  _elem87 = new RolePrincipalGrant();
+                  _elem87.read(iprot);
+                  struct.principalGrants.add(_elem87);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size()));
-          for (RolePrincipalGrant _iter81 : struct.principalGrants)
+          for (RolePrincipalGrant _iter89 : struct.principalGrants)
           {
-            _iter81.write(oprot);
+            _iter89.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.principalGrants.size());
-        for (RolePrincipalGrant _iter82 : struct.principalGrants)
+        for (RolePrincipalGrant _iter90 : struct.principalGrants)
         {
-          _iter82.write(oprot);
+          _iter90.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list83.size);
-        RolePrincipalGrant _elem84;
-        for (int _i85 = 0; _i85 < _list83.size; ++_i85)
+        org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list91.size);
+        RolePrincipalGrant _elem92;
+        for (int _i93 = 0; _i93 < _list91.size; ++_i93)
         {
-          _elem84 = new RolePrincipalGrant();
-          _elem84.read(iprot);
-          struct.principalGrants.add(_elem84);
+          _elem92 = new RolePrincipalGrant();
+          _elem92.read(iprot);
+          struct.principalGrants.add(_elem92);
         }
       }
       struct.setPrincipalGrantsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java
index 09ca865..f241b5a 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesRequest.java
@@ -606,13 +606,13 @@ import org.slf4j.LoggerFactory;
           case 2: // TBL_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list848 = iprot.readListBegin();
-                struct.tblNames = new ArrayList<String>(_list848.size);
-                String _elem849;
-                for (int _i850 = 0; _i850 < _list848.size; ++_i850)
+                org.apache.thrift.protocol.TList _list856 = iprot.readListBegin();
+                struct.tblNames = new ArrayList<String>(_list856.size);
+                String _elem857;
+                for (int _i858 = 0; _i858 < _list856.size; ++_i858)
                 {
-                  _elem849 = iprot.readString();
-                  struct.tblNames.add(_elem849);
+                  _elem857 = iprot.readString();
+                  struct.tblNames.add(_elem857);
                 }
                 iprot.readListEnd();
               }
@@ -661,9 +661,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tblNames.size()));
-            for (String _iter851 : struct.tblNames)
+            for (String _iter859 : struct.tblNames)
             {
-              oprot.writeString(_iter851);
+              oprot.writeString(_iter859);
             }
             oprot.writeListEnd();
           }
@@ -716,9 +716,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetTblNames()) {
         {
           oprot.writeI32(struct.tblNames.size());
-          for (String _iter852 : struct.tblNames)
+          for (String _iter860 : struct.tblNames)
           {
-            oprot.writeString(_iter852);
+            oprot.writeString(_iter860);
           }
         }
       }
@@ -738,13 +738,13 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list853 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.tblNames = new ArrayList<String>(_list853.size);
-          String _elem854;
-          for (int _i855 = 0; _i855 < _list853.size; ++_i855)
+          org.apache.thrift.protocol.TList _list861 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.tblNames = new ArrayList<String>(_list861.size);
+          String _elem862;
+          for (int _i863 = 0; _i863 < _list861.size; ++_i863)
           {
-            _elem854 = iprot.readString();
-            struct.tblNames.add(_elem854);
+            _elem862 = iprot.readString();
+            struct.tblNames.add(_elem862);
           }
         }
         struct.setTblNamesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java
index 72256e6..b351c40 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetTablesResult.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // TABLES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list856 = iprot.readListBegin();
-                struct.tables = new ArrayList<Table>(_list856.size);
-                Table _elem857;
-                for (int _i858 = 0; _i858 < _list856.size; ++_i858)
+                org.apache.thrift.protocol.TList _list864 = iprot.readListBegin();
+                struct.tables = new ArrayList<Table>(_list864.size);
+                Table _elem865;
+                for (int _i866 = 0; _i866 < _list864.size; ++_i866)
                 {
-                  _elem857 = new Table();
-                  _elem857.read(iprot);
-                  struct.tables.add(_elem857);
+                  _elem865 = new Table();
+                  _elem865.read(iprot);
+                  struct.tables.add(_elem865);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(TABLES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tables.size()));
-          for (Table _iter859 : struct.tables)
+          for (Table _iter867 : struct.tables)
           {
-            _iter859.write(oprot);
+            _iter867.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.tables.size());
-        for (Table _iter860 : struct.tables)
+        for (Table _iter868 : struct.tables)
         {
-          _iter860.write(oprot);
+          _iter868.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetTablesResult struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list861 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.tables = new ArrayList<Table>(_list861.size);
-        Table _elem862;
-        for (int _i863 = 0; _i863 < _list861.size; ++_i863)
+        org.apache.thrift.protocol.TList _list869 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.tables = new ArrayList<Table>(_list869.size);
+        Table _elem870;
+        for (int _i871 = 0; _i871 < _list869.size; ++_i871)
         {
-          _elem862 = new Table();
-          _elem862.read(iprot);
-          struct.tables.add(_elem862);
+          _elem870 = new Table();
+          _elem870.read(iprot);
+          struct.tables.add(_elem870);
         }
       }
       struct.setTablesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java
index af62ca1..a5bbb86 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsRequest.java
@@ -436,13 +436,13 @@ import org.slf4j.LoggerFactory;
           case 1: // FULL_TABLE_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list610 = iprot.readListBegin();
-                struct.fullTableNames = new ArrayList<String>(_list610.size);
-                String _elem611;
-                for (int _i612 = 0; _i612 < _list610.size; ++_i612)
+                org.apache.thrift.protocol.TList _list618 = iprot.readListBegin();
+                struct.fullTableNames = new ArrayList<String>(_list618.size);
+                String _elem619;
+                for (int _i620 = 0; _i620 < _list618.size; ++_i620)
                 {
-                  _elem611 = iprot.readString();
-                  struct.fullTableNames.add(_elem611);
+                  _elem619 = iprot.readString();
+                  struct.fullTableNames.add(_elem619);
                 }
                 iprot.readListEnd();
               }
@@ -476,9 +476,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FULL_TABLE_NAMES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.fullTableNames.size()));
-          for (String _iter613 : struct.fullTableNames)
+          for (String _iter621 : struct.fullTableNames)
           {
-            oprot.writeString(_iter613);
+            oprot.writeString(_iter621);
           }
           oprot.writeListEnd();
         }
@@ -508,9 +508,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.fullTableNames.size());
-        for (String _iter614 : struct.fullTableNames)
+        for (String _iter622 : struct.fullTableNames)
         {
-          oprot.writeString(_iter614);
+          oprot.writeString(_iter622);
         }
       }
       oprot.writeString(struct.validTxnList);
@@ -520,13 +520,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetValidWriteIdsRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list615 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.fullTableNames = new ArrayList<String>(_list615.size);
-        String _elem616;
-        for (int _i617 = 0; _i617 < _list615.size; ++_i617)
+        org.apache.thrift.protocol.TList _list623 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.fullTableNames = new ArrayList<String>(_list623.size);
+        String _elem624;
+        for (int _i625 = 0; _i625 < _list623.size; ++_i625)
         {
-          _elem616 = iprot.readString();
-          struct.fullTableNames.add(_elem616);
+          _elem624 = iprot.readString();
+          struct.fullTableNames.add(_elem624);
         }
       }
       struct.setFullTableNamesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java
index 615a422..96a6a00 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetValidWriteIdsResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // TBL_VALID_WRITE_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list626 = iprot.readListBegin();
-                struct.tblValidWriteIds = new ArrayList<TableValidWriteIds>(_list626.size);
-                TableValidWriteIds _elem627;
-                for (int _i628 = 0; _i628 < _list626.size; ++_i628)
+                org.apache.thrift.protocol.TList _list634 = iprot.readListBegin();
+                struct.tblValidWriteIds = new ArrayList<TableValidWriteIds>(_list634.size);
+                TableValidWriteIds _elem635;
+                for (int _i636 = 0; _i636 < _list634.size; ++_i636)
                 {
-                  _elem627 = new TableValidWriteIds();
-                  _elem627.read(iprot);
-                  struct.tblValidWriteIds.add(_elem627);
+                  _elem635 = new TableValidWriteIds();
+                  _elem635.read(iprot);
+                  struct.tblValidWriteIds.add(_elem635);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(TBL_VALID_WRITE_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tblValidWriteIds.size()));
-          for (TableValidWriteIds _iter629 : struct.tblValidWriteIds)
+          for (TableValidWriteIds _iter637 : struct.tblValidWriteIds)
           {
-            _iter629.write(oprot);
+            _iter637.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.tblValidWriteIds.size());
-        for (TableValidWriteIds _iter630 : struct.tblValidWriteIds)
+        for (TableValidWriteIds _iter638 : struct.tblValidWriteIds)
         {
-          _iter630.write(oprot);
+          _iter638.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, GetValidWriteIdsResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list631 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.tblValidWriteIds = new ArrayList<TableValidWriteIds>(_list631.size);
-        TableValidWriteIds _elem632;
-        for (int _i633 = 0; _i633 < _list631.size; ++_i633)
+        org.apache.thrift.protocol.TList _list639 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.tblValidWriteIds = new ArrayList<TableValidWriteIds>(_list639.size);
+        TableValidWriteIds _elem640;
+        for (int _i641 = 0; _i641 < _list639.size; ++_i641)
         {
-          _elem632 = new TableValidWriteIds();
-          _elem632.read(iprot);
-          struct.tblValidWriteIds.add(_elem632);
+          _elem640 = new TableValidWriteIds();
+          _elem640.read(iprot);
+          struct.tblValidWriteIds.add(_elem640);
         }
       }
       struct.setTblValidWriteIdsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java
index a3dceab..a6535aa 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatTxnRangeResponse.java
@@ -453,13 +453,13 @@ import org.slf4j.LoggerFactory;
           case 1: // ABORTED
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set674 = iprot.readSetBegin();
-                struct.aborted = new HashSet<Long>(2*_set674.size);
-                long _elem675;
-                for (int _i676 = 0; _i676 < _set674.size; ++_i676)
+                org.apache.thrift.protocol.TSet _set682 = iprot.readSetBegin();
+                struct.aborted = new HashSet<Long>(2*_set682.size);
+                long _elem683;
+                for (int _i684 = 0; _i684 < _set682.size; ++_i684)
                 {
-                  _elem675 = iprot.readI64();
-                  struct.aborted.add(_elem675);
+                  _elem683 = iprot.readI64();
+                  struct.aborted.add(_elem683);
                 }
                 iprot.readSetEnd();
               }
@@ -471,13 +471,13 @@ import org.slf4j.LoggerFactory;
           case 2: // NOSUCH
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set677 = iprot.readSetBegin();
-                struct.nosuch = new HashSet<Long>(2*_set677.size);
-                long _elem678;
-                for (int _i679 = 0; _i679 < _set677.size; ++_i679)
+                org.apache.thrift.protocol.TSet _set685 = iprot.readSetBegin();
+                struct.nosuch = new HashSet<Long>(2*_set685.size);
+                long _elem686;
+                for (int _i687 = 0; _i687 < _set685.size; ++_i687)
                 {
-                  _elem678 = iprot.readI64();
-                  struct.nosuch.add(_elem678);
+                  _elem686 = iprot.readI64();
+                  struct.nosuch.add(_elem686);
                 }
                 iprot.readSetEnd();
               }
@@ -503,9 +503,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(ABORTED_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.aborted.size()));
-          for (long _iter680 : struct.aborted)
+          for (long _iter688 : struct.aborted)
           {
-            oprot.writeI64(_iter680);
+            oprot.writeI64(_iter688);
           }
           oprot.writeSetEnd();
         }
@@ -515,9 +515,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(NOSUCH_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.nosuch.size()));
-          for (long _iter681 : struct.nosuch)
+          for (long _iter689 : struct.nosuch)
           {
-            oprot.writeI64(_iter681);
+            oprot.writeI64(_iter689);
           }
           oprot.writeSetEnd();
         }
@@ -542,16 +542,16 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.aborted.size());
-        for (long _iter682 : struct.aborted)
+        for (long _iter690 : struct.aborted)
         {
-          oprot.writeI64(_iter682);
+          oprot.writeI64(_iter690);
         }
       }
       {
         oprot.writeI32(struct.nosuch.size());
-        for (long _iter683 : struct.nosuch)
+        for (long _iter691 : struct.nosuch)
         {
-          oprot.writeI64(_iter683);
+          oprot.writeI64(_iter691);
         }
       }
     }
@@ -560,24 +560,24 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatTxnRangeResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TSet _set684 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.aborted = new HashSet<Long>(2*_set684.size);
-        long _elem685;
-        for (int _i686 = 0; _i686 < _set684.size; ++_i686)
+        org.apache.thrift.protocol.TSet _set692 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.aborted = new HashSet<Long>(2*_set692.size);
+        long _elem693;
+        for (int _i694 = 0; _i694 < _set692.size; ++_i694)
         {
-          _elem685 = iprot.readI64();
-          struct.aborted.add(_elem685);
+          _elem693 = iprot.readI64();
+          struct.aborted.add(_elem693);
         }
       }
       struct.setAbortedIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set687 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.nosuch = new HashSet<Long>(2*_set687.size);
-        long _elem688;
-        for (int _i689 = 0; _i689 < _set687.size; ++_i689)
+        org.apache.thrift.protocol.TSet _set695 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.nosuch = new HashSet<Long>(2*_set695.size);
+        long _elem696;
+        for (int _i697 = 0; _i697 < _set695.size; ++_i697)
         {
-          _elem688 = iprot.readI64();
-          struct.nosuch.add(_elem688);
+          _elem696 = iprot.readI64();
+          struct.nosuch.add(_elem696);
         }
       }
       struct.setNosuchIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java
index 4a9824b..70690a4 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InsertEventRequestData.java
@@ -636,13 +636,13 @@ import org.slf4j.LoggerFactory;
           case 2: // FILES_ADDED
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list732 = iprot.readListBegin();
-                struct.filesAdded = new ArrayList<String>(_list732.size);
-                String _elem733;
-                for (int _i734 = 0; _i734 < _list732.size; ++_i734)
+                org.apache.thrift.protocol.TList _list740 = iprot.readListBegin();
+                struct.filesAdded = new ArrayList<String>(_list740.size);
+                String _elem741;
+                for (int _i742 = 0; _i742 < _list740.size; ++_i742)
                 {
-                  _elem733 = iprot.readString();
-                  struct.filesAdded.add(_elem733);
+                  _elem741 = iprot.readString();
+                  struct.filesAdded.add(_elem741);
                 }
                 iprot.readListEnd();
               }
@@ -654,13 +654,13 @@ import org.slf4j.LoggerFactory;
           case 3: // FILES_ADDED_CHECKSUM
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list735 = iprot.readListBegin();
-                struct.filesAddedChecksum = new ArrayList<String>(_list735.size);
-                String _elem736;
-                for (int _i737 = 0; _i737 < _list735.size; ++_i737)
+                org.apache.thrift.protocol.TList _list743 = iprot.readListBegin();
+                struct.filesAddedChecksum = new ArrayList<String>(_list743.size);
+                String _elem744;
+                for (int _i745 = 0; _i745 < _list743.size; ++_i745)
                 {
-                  _elem736 = iprot.readString();
-                  struct.filesAddedChecksum.add(_elem736);
+                  _elem744 = iprot.readString();
+                  struct.filesAddedChecksum.add(_elem744);
                 }
                 iprot.readListEnd();
               }
@@ -672,13 +672,13 @@ import org.slf4j.LoggerFactory;
           case 4: // SUB_DIRECTORY_LIST
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list738 = iprot.readListBegin();
-                struct.subDirectoryList = new ArrayList<String>(_list738.size);
-                String _elem739;
-                for (int _i740 = 0; _i740 < _list738.size; ++_i740)
+                org.apache.thrift.protocol.TList _list746 = iprot.readListBegin();
+                struct.subDirectoryList = new ArrayList<String>(_list746.size);
+                String _elem747;
+                for (int _i748 = 0; _i748 < _list746.size; ++_i748)
                 {
-                  _elem739 = iprot.readString();
-                  struct.subDirectoryList.add(_elem739);
+                  _elem747 = iprot.readString();
+                  struct.subDirectoryList.add(_elem747);
                 }
                 iprot.readListEnd();
               }
@@ -709,9 +709,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FILES_ADDED_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filesAdded.size()));
-          for (String _iter741 : struct.filesAdded)
+          for (String _iter749 : struct.filesAdded)
           {
-            oprot.writeString(_iter741);
+            oprot.writeString(_iter749);
           }
           oprot.writeListEnd();
         }
@@ -722,9 +722,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(FILES_ADDED_CHECKSUM_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filesAddedChecksum.size()));
-            for (String _iter742 : struct.filesAddedChecksum)
+            for (String _iter750 : struct.filesAddedChecksum)
             {
-              oprot.writeString(_iter742);
+              oprot.writeString(_iter750);
             }
             oprot.writeListEnd();
           }
@@ -736,9 +736,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(SUB_DIRECTORY_LIST_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.subDirectoryList.size()));
-            for (String _iter743 : struct.subDirectoryList)
+            for (String _iter751 : struct.subDirectoryList)
             {
-              oprot.writeString(_iter743);
+              oprot.writeString(_iter751);
             }
             oprot.writeListEnd();
           }
@@ -764,9 +764,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.filesAdded.size());
-        for (String _iter744 : struct.filesAdded)
+        for (String _iter752 : struct.filesAdded)
         {
-          oprot.writeString(_iter744);
+          oprot.writeString(_iter752);
         }
       }
       BitSet optionals = new BitSet();
@@ -786,18 +786,18 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetFilesAddedChecksum()) {
         {
           oprot.writeI32(struct.filesAddedChecksum.size());
-          for (String _iter745 : struct.filesAddedChecksum)
+          for (String _iter753 : struct.filesAddedChecksum)
           {
-            oprot.writeString(_iter745);
+            oprot.writeString(_iter753);
           }
         }
       }
       if (struct.isSetSubDirectoryList()) {
         {
           oprot.writeI32(struct.subDirectoryList.size());
-          for (String _iter746 : struct.subDirectoryList)
+          for (String _iter754 : struct.subDirectoryList)
           {
-            oprot.writeString(_iter746);
+            oprot.writeString(_iter754);
           }
         }
       }
@@ -807,13 +807,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, InsertEventRequestData struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list747 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.filesAdded = new ArrayList<String>(_list747.size);
-        String _elem748;
-        for (int _i749 = 0; _i749 < _list747.size; ++_i749)
+        org.apache.thrift.protocol.TList _list755 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.filesAdded = new ArrayList<String>(_list755.size);
+        String _elem756;
+        for (int _i757 = 0; _i757 < _list755.size; ++_i757)
         {
-          _elem748 = iprot.readString();
-          struct.filesAdded.add(_elem748);
+          _elem756 = iprot.readString();
+          struct.filesAdded.add(_elem756);
         }
       }
       struct.setFilesAddedIsSet(true);
@@ -824,26 +824,26 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list750 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.filesAddedChecksum = new ArrayList<String>(_list750.size);
-          String _elem751;
-          for (int _i752 = 0; _i752 < _list750.size; ++_i752)
+          org.apache.thrift.protocol.TList _list758 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.filesAddedChecksum = new ArrayList<String>(_list758.size);
+          String _elem759;
+          for (int _i760 = 0; _i760 < _list758.size; ++_i760)
           {
-            _elem751 = iprot.readString();
-            struct.filesAddedChecksum.add(_elem751);
+            _elem759 = iprot.readString();
+            struct.filesAddedChecksum.add(_elem759);
           }
         }
         struct.setFilesAddedChecksumIsSet(true);
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list753 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.subDirectoryList = new ArrayList<String>(_list753.size);
-          String _elem754;
-          for (int _i755 = 0; _i755 < _list753.size; ++_i755)
+          org.apache.thrift.protocol.TList _list761 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.subDirectoryList = new ArrayList<String>(_list761.size);
+          String _elem762;
+          for (int _i763 = 0; _i763 < _list761.size; ++_i763)
           {
-            _elem754 = iprot.readString();
-            struct.subDirectoryList.add(_elem754);
+            _elem762 = iprot.readString();
+            struct.subDirectoryList.add(_elem762);
           }
         }
         struct.setSubDirectoryListIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
index d4eed32..cabed5a 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
@@ -689,14 +689,14 @@ import org.slf4j.LoggerFactory;
           case 1: // COMPONENT
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list658 = iprot.readListBegin();
-                struct.component = new ArrayList<LockComponent>(_list658.size);
-                LockComponent _elem659;
-                for (int _i660 = 0; _i660 < _list658.size; ++_i660)
+                org.apache.thrift.protocol.TList _list666 = iprot.readListBegin();
+                struct.component = new ArrayList<LockComponent>(_list666.size);
+                LockComponent _elem667;
+                for (int _i668 = 0; _i668 < _list666.size; ++_i668)
                 {
-                  _elem659 = new LockComponent();
-                  _elem659.read(iprot);
-                  struct.component.add(_elem659);
+                  _elem667 = new LockComponent();
+                  _elem667.read(iprot);
+                  struct.component.add(_elem667);
                 }
                 iprot.readListEnd();
               }
@@ -754,9 +754,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COMPONENT_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.component.size()));
-          for (LockComponent _iter661 : struct.component)
+          for (LockComponent _iter669 : struct.component)
           {
-            _iter661.write(oprot);
+            _iter669.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -803,9 +803,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.component.size());
-        for (LockComponent _iter662 : struct.component)
+        for (LockComponent _iter670 : struct.component)
         {
-          _iter662.write(oprot);
+          _iter670.write(oprot);
         }
       }
       oprot.writeString(struct.user);
@@ -830,14 +830,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list663 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.component = new ArrayList<LockComponent>(_list663.size);
-        LockComponent _elem664;
-        for (int _i665 = 0; _i665 < _list663.size; ++_i665)
+        org.apache.thrift.protocol.TList _list671 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.component = new ArrayList<LockComponent>(_list671.size);
+        LockComponent _elem672;
+        for (int _i673 = 0; _i673 < _list671.size; ++_i673)
         {
-          _elem664 = new LockComponent();
-          _elem664.read(iprot);
-          struct.component.add(_elem664);
+          _elem672 = new LockComponent();
+          _elem672.read(iprot);
+          struct.component.add(_elem672);
         }
       }
       struct.setComponentIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
index 3510995..73c78cb 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
@@ -589,13 +589,13 @@ import org.slf4j.LoggerFactory;
           case 1: // TABLES_USED
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set864 = iprot.readSetBegin();
-                struct.tablesUsed = new HashSet<String>(2*_set864.size);
-                String _elem865;
-                for (int _i866 = 0; _i866 < _set864.size; ++_i866)
+                org.apache.thrift.protocol.TSet _set872 = iprot.readSetBegin();
+                struct.tablesUsed = new HashSet<String>(2*_set872.size);
+                String _elem873;
+                for (int _i874 = 0; _i874 < _set872.size; ++_i874)
                 {
-                  _elem865 = iprot.readString();
-                  struct.tablesUsed.add(_elem865);
+                  _elem873 = iprot.readString();
+                  struct.tablesUsed.add(_elem873);
                 }
                 iprot.readSetEnd();
               }
@@ -645,9 +645,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(TABLES_USED_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.tablesUsed.size()));
-          for (String _iter867 : struct.tablesUsed)
+          for (String _iter875 : struct.tablesUsed)
           {
-            oprot.writeString(_iter867);
+            oprot.writeString(_iter875);
           }
           oprot.writeSetEnd();
         }
@@ -689,9 +689,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.tablesUsed.size());
-        for (String _iter868 : struct.tablesUsed)
+        for (String _iter876 : struct.tablesUsed)
         {
-          oprot.writeString(_iter868);
+          oprot.writeString(_iter876);
         }
       }
       BitSet optionals = new BitSet();
@@ -720,13 +720,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, Materialization struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TSet _set869 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.tablesUsed = new HashSet<String>(2*_set869.size);
-        String _elem870;
-        for (int _i871 = 0; _i871 < _set869.size; ++_i871)
+        org.apache.thrift.protocol.TSet _set877 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.tablesUsed = new HashSet<String>(2*_set877.size);
+        String _elem878;
+        for (int _i879 = 0; _i879 < _set877.size; ++_i879)
         {
-          _elem870 = iprot.readString();
-          struct.tablesUsed.add(_elem870);
+          _elem878 = iprot.readString();
+          struct.tablesUsed.add(_elem878);
         }
       }
       struct.setTablesUsedIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java
index 002ca13..54070ad 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotNullConstraintsResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // NOT_NULL_CONSTRAINTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list344 = iprot.readListBegin();
-                struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list344.size);
-                SQLNotNullConstraint _elem345;
-                for (int _i346 = 0; _i346 < _list344.size; ++_i346)
+                org.apache.thrift.protocol.TList _list352 = iprot.readListBegin();
+                struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list352.size);
+                SQLNotNullConstraint _elem353;
+                for (int _i354 = 0; _i354 < _list352.size; ++_i354)
                 {
-                  _elem345 = new SQLNotNullConstraint();
-                  _elem345.read(iprot);
-                  struct.notNullConstraints.add(_elem345);
+                  _elem353 = new SQLNotNullConstraint();
+                  _elem353.read(iprot);
+                  struct.notNullConstraints.add(_elem353);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(NOT_NULL_CONSTRAINTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.notNullConstraints.size()));
-          for (SQLNotNullConstraint _iter347 : struct.notNullConstraints)
+          for (SQLNotNullConstraint _iter355 : struct.notNullConstraints)
           {
-            _iter347.write(oprot);
+            _iter355.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.notNullConstraints.size());
-        for (SQLNotNullConstraint _iter348 : struct.notNullConstraints)
+        for (SQLNotNullConstraint _iter356 : struct.notNullConstraints)
         {
-          _iter348.write(oprot);
+          _iter356.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, NotNullConstraintsResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list349 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list349.size);
-        SQLNotNullConstraint _elem350;
-        for (int _i351 = 0; _i351 < _list349.size; ++_i351)
+        org.apache.thrift.protocol.TList _list357 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.notNullConstraints = new ArrayList<SQLNotNullConstraint>(_list357.size);
+        SQLNotNullConstraint _elem358;
+        for (int _i359 = 0; _i359 < _list357.size; ++_i359)
         {
-          _elem350 = new SQLNotNullConstraint();
-          _elem350.read(iprot);
-          struct.notNullConstraints.add(_elem350);
+          _elem358 = new SQLNotNullConstraint();
+          _elem358.read(iprot);
+          struct.notNullConstraints.add(_elem358);
         }
       }
       struct.setNotNullConstraintsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java
index 9228c39..e86c9f6 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // EVENTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list724 = iprot.readListBegin();
-                struct.events = new ArrayList<NotificationEvent>(_list724.size);
-                NotificationEvent _elem725;
-                for (int _i726 = 0; _i726 < _list724.size; ++_i726)
+                org.apache.thrift.protocol.TList _list732 = iprot.readListBegin();
+                struct.events = new ArrayList<NotificationEvent>(_list732.size);
+                NotificationEvent _elem733;
+                for (int _i734 = 0; _i734 < _list732.size; ++_i734)
                 {
-                  _elem725 = new NotificationEvent();
-                  _elem725.read(iprot);
-                  struct.events.add(_elem725);
+                  _elem733 = new NotificationEvent();
+                  _elem733.read(iprot);
+                  struct.events.add(_elem733);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(EVENTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.events.size()));
-          for (NotificationEvent _iter727 : struct.events)
+          for (NotificationEvent _iter735 : struct.events)
           {
-            _iter727.write(oprot);
+            _iter735.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.events.size());
-        for (NotificationEvent _iter728 : struct.events)
+        for (NotificationEvent _iter736 : struct.events)
         {
-          _iter728.write(oprot);
+          _iter736.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEventResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list729 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.events = new ArrayList<NotificationEvent>(_list729.size);
-        NotificationEvent _elem730;
-        for (int _i731 = 0; _i731 < _list729.size; ++_i731)
+        org.apache.thrift.protocol.TList _list737 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.events = new ArrayList<NotificationEvent>(_list737.size);
+        NotificationEvent _elem738;
+        for (int _i739 = 0; _i739 < _list737.size; ++_i739)
         {
-          _elem730 = new NotificationEvent();
-          _elem730.read(iprot);
-          struct.events.add(_elem730);
+          _elem738 = new NotificationEvent();
+          _elem738.read(iprot);
+          struct.events.add(_elem738);
         }
       }
       struct.setEventsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java
index 2dae2e9..19b2c01 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java
@@ -808,13 +808,13 @@ import org.slf4j.LoggerFactory;
           case 6: // REPL_SRC_TXN_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list570 = iprot.readListBegin();
-                struct.replSrcTxnIds = new ArrayList<Long>(_list570.size);
-                long _elem571;
-                for (int _i572 = 0; _i572 < _list570.size; ++_i572)
+                org.apache.thrift.protocol.TList _list578 = iprot.readListBegin();
+                struct.replSrcTxnIds = new ArrayList<Long>(_list578.size);
+                long _elem579;
+                for (int _i580 = 0; _i580 < _list578.size; ++_i580)
                 {
-                  _elem571 = iprot.readI64();
-                  struct.replSrcTxnIds.add(_elem571);
+                  _elem579 = iprot.readI64();
+                  struct.replSrcTxnIds.add(_elem579);
                 }
                 iprot.readListEnd();
               }
@@ -868,9 +868,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(REPL_SRC_TXN_IDS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.replSrcTxnIds.size()));
-            for (long _iter573 : struct.replSrcTxnIds)
+            for (long _iter581 : struct.replSrcTxnIds)
             {
-              oprot.writeI64(_iter573);
+              oprot.writeI64(_iter581);
             }
             oprot.writeListEnd();
           }
@@ -917,9 +917,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetReplSrcTxnIds()) {
         {
           oprot.writeI32(struct.replSrcTxnIds.size());
-          for (long _iter574 : struct.replSrcTxnIds)
+          for (long _iter582 : struct.replSrcTxnIds)
           {
-            oprot.writeI64(_iter574);
+            oprot.writeI64(_iter582);
           }
         }
       }
@@ -945,13 +945,13 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list575 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-          struct.replSrcTxnIds = new ArrayList<Long>(_list575.size);
-          long _elem576;
-          for (int _i577 = 0; _i577 < _list575.size; ++_i577)
+          org.apache.thrift.protocol.TList _list583 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+          struct.replSrcTxnIds = new ArrayList<Long>(_list583.size);
+          long _elem584;
+          for (int _i585 = 0; _i585 < _list583.size; ++_i585)
           {
-            _elem576 = iprot.readI64();
-            struct.replSrcTxnIds.add(_elem576);
+            _elem584 = iprot.readI64();
+            struct.replSrcTxnIds.add(_elem584);
           }
         }
         struct.setReplSrcTxnIdsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java
index 9e38d6c..71a2c4f 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnsResponse.java
@@ -351,13 +351,13 @@ import org.slf4j.LoggerFactory;
           case 1: // TXN_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list578 = iprot.readListBegin();
-                struct.txn_ids = new ArrayList<Long>(_list578.size);
-                long _elem579;
-                for (int _i580 = 0; _i580 < _list578.size; ++_i580)
+                org.apache.thrift.protocol.TList _list586 = iprot.readListBegin();
+                struct.txn_ids = new ArrayList<Long>(_list586.size);
+                long _elem587;
+                for (int _i588 = 0; _i588 < _list586.size; ++_i588)
                 {
-                  _elem579 = iprot.readI64();
-                  struct.txn_ids.add(_elem579);
+                  _elem587 = iprot.readI64();
+                  struct.txn_ids.add(_elem587);
                 }
                 iprot.readListEnd();
               }
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(TXN_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.txn_ids.size()));
-          for (long _iter581 : struct.txn_ids)
+          for (long _iter589 : struct.txn_ids)
           {
-            oprot.writeI64(_iter581);
+            oprot.writeI64(_iter589);
           }
           oprot.writeListEnd();
         }
@@ -410,9 +410,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.txn_ids.size());
-        for (long _iter582 : struct.txn_ids)
+        for (long _iter590 : struct.txn_ids)
         {
-          oprot.writeI64(_iter582);
+          oprot.writeI64(_iter590);
         }
       }
     }
@@ -421,13 +421,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, OpenTxnsResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list583 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.txn_ids = new ArrayList<Long>(_list583.size);
-        long _elem584;
-        for (int _i585 = 0; _i585 < _list583.size; ++_i585)
+        org.apache.thrift.protocol.TList _list591 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.txn_ids = new ArrayList<Long>(_list591.size);
+        long _elem592;
+        for (int _i593 = 0; _i593 < _list591.size; ++_i593)
         {
-          _elem584 = iprot.readI64();
-          struct.txn_ids.add(_elem584);
+          _elem592 = iprot.readI64();
+          struct.txn_ids.add(_elem592);
         }
       }
       struct.setTxn_idsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
index 3778498..0156a9a 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
@@ -1166,13 +1166,13 @@ import org.slf4j.LoggerFactory;
           case 1: // VALUES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list216 = iprot.readListBegin();
-                struct.values = new ArrayList<String>(_list216.size);
-                String _elem217;
-                for (int _i218 = 0; _i218 < _list216.size; ++_i218)
+                org.apache.thrift.protocol.TList _list224 = iprot.readListBegin();
+                struct.values = new ArrayList<String>(_list224.size);
+                String _elem225;
+                for (int _i226 = 0; _i226 < _list224.size; ++_i226)
                 {
-                  _elem217 = iprot.readString();
-                  struct.values.add(_elem217);
+                  _elem225 = iprot.readString();
+                  struct.values.add(_elem225);
                 }
                 iprot.readListEnd();
               }
@@ -1225,15 +1225,15 @@ import org.slf4j.LoggerFactory;
           case 7: // PARAMETERS
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map219 = iprot.readMapBegin();
-                struct.parameters = new HashMap<String,String>(2*_map219.size);
-                String _key220;
-                String _val221;
-                for (int _i222 = 0; _i222 < _map219.size; ++_i222)
+                org.apache.thrift.protocol.TMap _map227 = iprot.readMapBegin();
+                struct.parameters = new HashMap<String,String>(2*_map227.size);
+                String _key228;
+                String _val229;
+                for (int _i230 = 0; _i230 < _map227.size; ++_i230)
                 {
-                  _key220 = iprot.readString();
-                  _val221 = iprot.readString();
-                  struct.parameters.put(_key220, _val221);
+                  _key228 = iprot.readString();
+                  _val229 = iprot.readString();
+                  struct.parameters.put(_key228, _val229);
                 }
                 iprot.readMapEnd();
               }
@@ -1292,9 +1292,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(VALUES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size()));
-          for (String _iter223 : struct.values)
+          for (String _iter231 : struct.values)
           {
-            oprot.writeString(_iter223);
+            oprot.writeString(_iter231);
           }
           oprot.writeListEnd();
         }
@@ -1325,10 +1325,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
-          for (Map.Entry<String, String> _iter224 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter232 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter224.getKey());
-            oprot.writeString(_iter224.getValue());
+            oprot.writeString(_iter232.getKey());
+            oprot.writeString(_iter232.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -1413,9 +1413,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetValues()) {
         {
           oprot.writeI32(struct.values.size());
-          for (String _iter225 : struct.values)
+          for (String _iter233 : struct.values)
           {
-            oprot.writeString(_iter225);
+            oprot.writeString(_iter233);
           }
         }
       }
@@ -1437,10 +1437,10 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetParameters()) {
         {
           oprot.writeI32(struct.parameters.size());
-          for (Map.Entry<String, String> _iter226 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter234 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter226.getKey());
-            oprot.writeString(_iter226.getValue());
+            oprot.writeString(_iter234.getKey());
+            oprot.writeString(_iter234.getValue());
           }
         }
       }
@@ -1464,13 +1464,13 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(11);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list227 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.values = new ArrayList<String>(_list227.size);
-          String _elem228;
-          for (int _i229 = 0; _i229 < _list227.size; ++_i229)
+          org.apache.thrift.protocol.TList _list235 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.values = new ArrayList<String>(_list235.size);
+          String _elem236;
+          for (int _i237 = 0; _i237 < _list235.size; ++_i237)
           {
-            _elem228 = iprot.readString();
-            struct.values.add(_elem228);
+            _elem236 = iprot.readString();
+            struct.values.add(_elem236);
           }
         }
         struct.setValuesIsSet(true);
@@ -1498,15 +1498,15 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(6)) {
         {
-          org.apache.thrift.protocol.TMap _map230 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.parameters = new HashMap<String,String>(2*_map230.size);
-          String _key231;
-          String _val232;
-          for (int _i233 = 0; _i233 < _map230.size; ++_i233)
+          org.apache.thrift.protocol.TMap _map238 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.parameters = new HashMap<String,String>(2*_map238.size);
+          String _key239;
+          String _val240;
+          for (int _i241 = 0; _i241 < _map238.size; ++_i241)
           {
-            _key231 = iprot.readString();
-            _val232 = iprot.readString();
-            struct.parameters.put(_key231, _val232);
+            _key239 = iprot.readString();
+            _val240 = iprot.readString();
+            struct.parameters.put(_key239, _val240);
           }
         }
         struct.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(struct.parameters); struct.setParametersIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java
index 1f32e38..e1f4021 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionListComposingSpec.java
@@ -350,14 +350,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PARTITIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list260 = iprot.readListBegin();
-                struct.partitions = new ArrayList<Partition>(_list260.size);
-                Partition _elem261;
-                for (int _i262 = 0; _i262 < _list260.size; ++_i262)
+                org.apache.thrift.protocol.TList _list268 = iprot.readListBegin();
+                struct.partitions = new ArrayList<Partition>(_list268.size);
+                Partition _elem269;
+                for (int _i270 = 0; _i270 < _list268.size; ++_i270)
                 {
-                  _elem261 = new Partition();
-                  _elem261.read(iprot);
-                  struct.partitions.add(_elem261);
+                  _elem269 = new Partition();
+                  _elem269.read(iprot);
+                  struct.partitions.add(_elem269);
                 }
                 iprot.readListEnd();
               }
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
-          for (Partition _iter263 : struct.partitions)
+          for (Partition _iter271 : struct.partitions)
           {
-            _iter263.write(oprot);
+            _iter271.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -416,9 +416,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartitions()) {
         {
           oprot.writeI32(struct.partitions.size());
-          for (Partition _iter264 : struct.partitions)
+          for (Partition _iter272 : struct.partitions)
           {
-            _iter264.write(oprot);
+            _iter272.write(oprot);
           }
         }
       }
@@ -430,14 +430,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list265 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.partitions = new ArrayList<Partition>(_list265.size);
-          Partition _elem266;
-          for (int _i267 = 0; _i267 < _list265.size; ++_i267)
+          org.apache.thrift.protocol.TList _list273 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.partitions = new ArrayList<Partition>(_list273.size);
+          Partition _elem274;
+          for (int _i275 = 0; _i275 < _list273.size; ++_i275)
           {
-            _elem266 = new Partition();
-            _elem266.read(iprot);
-            struct.partitions.add(_elem266);
+            _elem274 = new Partition();
+            _elem274.read(iprot);
+            struct.partitions.add(_elem274);
           }
         }
         struct.setPartitionsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java
index a450cd4..c3fa2a2 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionSpecWithSharedSD.java
@@ -434,14 +434,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PARTITIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list252 = iprot.readListBegin();
-                struct.partitions = new ArrayList<PartitionWithoutSD>(_list252.size);
-                PartitionWithoutSD _elem253;
-                for (int _i254 = 0; _i254 < _list252.size; ++_i254)
+                org.apache.thrift.protocol.TList _list260 = iprot.readListBegin();
+                struct.partitions = new ArrayList<PartitionWithoutSD>(_list260.size);
+                PartitionWithoutSD _elem261;
+                for (int _i262 = 0; _i262 < _list260.size; ++_i262)
                 {
-                  _elem253 = new PartitionWithoutSD();
-                  _elem253.read(iprot);
-                  struct.partitions.add(_elem253);
+                  _elem261 = new PartitionWithoutSD();
+                  _elem261.read(iprot);
+                  struct.partitions.add(_elem261);
                 }
                 iprot.readListEnd();
               }
@@ -476,9 +476,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
-          for (PartitionWithoutSD _iter255 : struct.partitions)
+          for (PartitionWithoutSD _iter263 : struct.partitions)
           {
-            _iter255.write(oprot);
+            _iter263.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -517,9 +517,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartitions()) {
         {
           oprot.writeI32(struct.partitions.size());
-          for (PartitionWithoutSD _iter256 : struct.partitions)
+          for (PartitionWithoutSD _iter264 : struct.partitions)
           {
-            _iter256.write(oprot);
+            _iter264.write(oprot);
           }
         }
       }
@@ -534,14 +534,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list257 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.partitions = new ArrayList<PartitionWithoutSD>(_list257.size);
-          PartitionWithoutSD _elem258;
-          for (int _i259 = 0; _i259 < _list257.size; ++_i259)
+          org.apache.thrift.protocol.TList _list265 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.partitions = new ArrayList<PartitionWithoutSD>(_list265.size);
+          PartitionWithoutSD _elem266;
+          for (int _i267 = 0; _i267 < _list265.size; ++_i267)
           {
-            _elem258 = new PartitionWithoutSD();
-            _elem258.read(iprot);
-            struct.partitions.add(_elem258);
+            _elem266 = new PartitionWithoutSD();
+            _elem266.read(iprot);
+            struct.partitions.add(_elem266);
           }
         }
         struct.setPartitionsIsSet(true);


[06/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py
index df3c586..489beed 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py
@@ -2504,6 +2504,194 @@ class GrantRevokePrivilegeResponse:
   def __ne__(self, other):
     return not (self == other)
 
+class TruncateTableRequest:
+  """
+  Attributes:
+   - dbName
+   - tableName
+   - partNames
+   - txnId
+   - writeId
+   - validWriteIdList
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'dbName', None, None, ), # 1
+    (2, TType.STRING, 'tableName', None, None, ), # 2
+    (3, TType.LIST, 'partNames', (TType.STRING,None), None, ), # 3
+    (4, TType.I64, 'txnId', None, -1, ), # 4
+    (5, TType.I64, 'writeId', None, -1, ), # 5
+    (6, TType.STRING, 'validWriteIdList', None, None, ), # 6
+  )
+
+  def __init__(self, dbName=None, tableName=None, partNames=None, txnId=thrift_spec[4][4], writeId=thrift_spec[5][4], validWriteIdList=None,):
+    self.dbName = dbName
+    self.tableName = tableName
+    self.partNames = partNames
+    self.txnId = txnId
+    self.writeId = writeId
+    self.validWriteIdList = validWriteIdList
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.dbName = iprot.readString()
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.tableName = iprot.readString()
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.LIST:
+          self.partNames = []
+          (_etype72, _size69) = iprot.readListBegin()
+          for _i73 in xrange(_size69):
+            _elem74 = iprot.readString()
+            self.partNames.append(_elem74)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.I64:
+          self.txnId = iprot.readI64()
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
+        if ftype == TType.I64:
+          self.writeId = iprot.readI64()
+        else:
+          iprot.skip(ftype)
+      elif fid == 6:
+        if ftype == TType.STRING:
+          self.validWriteIdList = iprot.readString()
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('TruncateTableRequest')
+    if self.dbName is not None:
+      oprot.writeFieldBegin('dbName', TType.STRING, 1)
+      oprot.writeString(self.dbName)
+      oprot.writeFieldEnd()
+    if self.tableName is not None:
+      oprot.writeFieldBegin('tableName', TType.STRING, 2)
+      oprot.writeString(self.tableName)
+      oprot.writeFieldEnd()
+    if self.partNames is not None:
+      oprot.writeFieldBegin('partNames', TType.LIST, 3)
+      oprot.writeListBegin(TType.STRING, len(self.partNames))
+      for iter75 in self.partNames:
+        oprot.writeString(iter75)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    if self.txnId is not None:
+      oprot.writeFieldBegin('txnId', TType.I64, 4)
+      oprot.writeI64(self.txnId)
+      oprot.writeFieldEnd()
+    if self.writeId is not None:
+      oprot.writeFieldBegin('writeId', TType.I64, 5)
+      oprot.writeI64(self.writeId)
+      oprot.writeFieldEnd()
+    if self.validWriteIdList is not None:
+      oprot.writeFieldBegin('validWriteIdList', TType.STRING, 6)
+      oprot.writeString(self.validWriteIdList)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    if self.dbName is None:
+      raise TProtocol.TProtocolException(message='Required field dbName is unset!')
+    if self.tableName is None:
+      raise TProtocol.TProtocolException(message='Required field tableName is unset!')
+    return
+
+
+  def __hash__(self):
+    value = 17
+    value = (value * 31) ^ hash(self.dbName)
+    value = (value * 31) ^ hash(self.tableName)
+    value = (value * 31) ^ hash(self.partNames)
+    value = (value * 31) ^ hash(self.txnId)
+    value = (value * 31) ^ hash(self.writeId)
+    value = (value * 31) ^ hash(self.validWriteIdList)
+    return value
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class TruncateTableResponse:
+
+  thrift_spec = (
+  )
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('TruncateTableResponse')
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __hash__(self):
+    value = 17
+    return value
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
 class Role:
   """
   Attributes:
@@ -2846,11 +3034,11 @@ class GetRoleGrantsForPrincipalResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.principalGrants = []
-          (_etype72, _size69) = iprot.readListBegin()
-          for _i73 in xrange(_size69):
-            _elem74 = RolePrincipalGrant()
-            _elem74.read(iprot)
-            self.principalGrants.append(_elem74)
+          (_etype79, _size76) = iprot.readListBegin()
+          for _i80 in xrange(_size76):
+            _elem81 = RolePrincipalGrant()
+            _elem81.read(iprot)
+            self.principalGrants.append(_elem81)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -2867,8 +3055,8 @@ class GetRoleGrantsForPrincipalResponse:
     if self.principalGrants is not None:
       oprot.writeFieldBegin('principalGrants', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.principalGrants))
-      for iter75 in self.principalGrants:
-        iter75.write(oprot)
+      for iter82 in self.principalGrants:
+        iter82.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -2989,11 +3177,11 @@ class GetPrincipalsInRoleResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.principalGrants = []
-          (_etype79, _size76) = iprot.readListBegin()
-          for _i80 in xrange(_size76):
-            _elem81 = RolePrincipalGrant()
-            _elem81.read(iprot)
-            self.principalGrants.append(_elem81)
+          (_etype86, _size83) = iprot.readListBegin()
+          for _i87 in xrange(_size83):
+            _elem88 = RolePrincipalGrant()
+            _elem88.read(iprot)
+            self.principalGrants.append(_elem88)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -3010,8 +3198,8 @@ class GetPrincipalsInRoleResponse:
     if self.principalGrants is not None:
       oprot.writeFieldBegin('principalGrants', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.principalGrants))
-      for iter82 in self.principalGrants:
-        iter82.write(oprot)
+      for iter89 in self.principalGrants:
+        iter89.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -3640,10 +3828,10 @@ class GetCatalogsResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.names = []
-          (_etype86, _size83) = iprot.readListBegin()
-          for _i87 in xrange(_size83):
-            _elem88 = iprot.readString()
-            self.names.append(_elem88)
+          (_etype93, _size90) = iprot.readListBegin()
+          for _i94 in xrange(_size90):
+            _elem95 = iprot.readString()
+            self.names.append(_elem95)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -3660,8 +3848,8 @@ class GetCatalogsResponse:
     if self.names is not None:
       oprot.writeFieldBegin('names', TType.LIST, 1)
       oprot.writeListBegin(TType.STRING, len(self.names))
-      for iter89 in self.names:
-        oprot.writeString(iter89)
+      for iter96 in self.names:
+        oprot.writeString(iter96)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -3814,11 +4002,11 @@ class Database:
       elif fid == 4:
         if ftype == TType.MAP:
           self.parameters = {}
-          (_ktype91, _vtype92, _size90 ) = iprot.readMapBegin()
-          for _i94 in xrange(_size90):
-            _key95 = iprot.readString()
-            _val96 = iprot.readString()
-            self.parameters[_key95] = _val96
+          (_ktype98, _vtype99, _size97 ) = iprot.readMapBegin()
+          for _i101 in xrange(_size97):
+            _key102 = iprot.readString()
+            _val103 = iprot.readString()
+            self.parameters[_key102] = _val103
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -3868,9 +4056,9 @@ class Database:
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 4)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter97,viter98 in self.parameters.items():
-        oprot.writeString(kiter97)
-        oprot.writeString(viter98)
+      for kiter104,viter105 in self.parameters.items():
+        oprot.writeString(kiter104)
+        oprot.writeString(viter105)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.privileges is not None:
@@ -3973,11 +4161,11 @@ class SerDeInfo:
       elif fid == 3:
         if ftype == TType.MAP:
           self.parameters = {}
-          (_ktype100, _vtype101, _size99 ) = iprot.readMapBegin()
-          for _i103 in xrange(_size99):
-            _key104 = iprot.readString()
-            _val105 = iprot.readString()
-            self.parameters[_key104] = _val105
+          (_ktype107, _vtype108, _size106 ) = iprot.readMapBegin()
+          for _i110 in xrange(_size106):
+            _key111 = iprot.readString()
+            _val112 = iprot.readString()
+            self.parameters[_key111] = _val112
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -4022,9 +4210,9 @@ class SerDeInfo:
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 3)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter106,viter107 in self.parameters.items():
-        oprot.writeString(kiter106)
-        oprot.writeString(viter107)
+      for kiter113,viter114 in self.parameters.items():
+        oprot.writeString(kiter113)
+        oprot.writeString(viter114)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.description is not None:
@@ -4182,41 +4370,41 @@ class SkewedInfo:
       if fid == 1:
         if ftype == TType.LIST:
           self.skewedColNames = []
-          (_etype111, _size108) = iprot.readListBegin()
-          for _i112 in xrange(_size108):
-            _elem113 = iprot.readString()
-            self.skewedColNames.append(_elem113)
+          (_etype118, _size115) = iprot.readListBegin()
+          for _i119 in xrange(_size115):
+            _elem120 = iprot.readString()
+            self.skewedColNames.append(_elem120)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.LIST:
           self.skewedColValues = []
-          (_etype117, _size114) = iprot.readListBegin()
-          for _i118 in xrange(_size114):
-            _elem119 = []
-            (_etype123, _size120) = iprot.readListBegin()
-            for _i124 in xrange(_size120):
-              _elem125 = iprot.readString()
-              _elem119.append(_elem125)
+          (_etype124, _size121) = iprot.readListBegin()
+          for _i125 in xrange(_size121):
+            _elem126 = []
+            (_etype130, _size127) = iprot.readListBegin()
+            for _i131 in xrange(_size127):
+              _elem132 = iprot.readString()
+              _elem126.append(_elem132)
             iprot.readListEnd()
-            self.skewedColValues.append(_elem119)
+            self.skewedColValues.append(_elem126)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 3:
         if ftype == TType.MAP:
           self.skewedColValueLocationMaps = {}
-          (_ktype127, _vtype128, _size126 ) = iprot.readMapBegin()
-          for _i130 in xrange(_size126):
-            _key131 = []
-            (_etype136, _size133) = iprot.readListBegin()
-            for _i137 in xrange(_size133):
-              _elem138 = iprot.readString()
-              _key131.append(_elem138)
+          (_ktype134, _vtype135, _size133 ) = iprot.readMapBegin()
+          for _i137 in xrange(_size133):
+            _key138 = []
+            (_etype143, _size140) = iprot.readListBegin()
+            for _i144 in xrange(_size140):
+              _elem145 = iprot.readString()
+              _key138.append(_elem145)
             iprot.readListEnd()
-            _val132 = iprot.readString()
-            self.skewedColValueLocationMaps[_key131] = _val132
+            _val139 = iprot.readString()
+            self.skewedColValueLocationMaps[_key138] = _val139
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -4233,29 +4421,29 @@ class SkewedInfo:
     if self.skewedColNames is not None:
       oprot.writeFieldBegin('skewedColNames', TType.LIST, 1)
       oprot.writeListBegin(TType.STRING, len(self.skewedColNames))
-      for iter139 in self.skewedColNames:
-        oprot.writeString(iter139)
+      for iter146 in self.skewedColNames:
+        oprot.writeString(iter146)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.skewedColValues is not None:
       oprot.writeFieldBegin('skewedColValues', TType.LIST, 2)
       oprot.writeListBegin(TType.LIST, len(self.skewedColValues))
-      for iter140 in self.skewedColValues:
-        oprot.writeListBegin(TType.STRING, len(iter140))
-        for iter141 in iter140:
-          oprot.writeString(iter141)
+      for iter147 in self.skewedColValues:
+        oprot.writeListBegin(TType.STRING, len(iter147))
+        for iter148 in iter147:
+          oprot.writeString(iter148)
         oprot.writeListEnd()
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.skewedColValueLocationMaps is not None:
       oprot.writeFieldBegin('skewedColValueLocationMaps', TType.MAP, 3)
       oprot.writeMapBegin(TType.LIST, TType.STRING, len(self.skewedColValueLocationMaps))
-      for kiter142,viter143 in self.skewedColValueLocationMaps.items():
-        oprot.writeListBegin(TType.STRING, len(kiter142))
-        for iter144 in kiter142:
-          oprot.writeString(iter144)
+      for kiter149,viter150 in self.skewedColValueLocationMaps.items():
+        oprot.writeListBegin(TType.STRING, len(kiter149))
+        for iter151 in kiter149:
+          oprot.writeString(iter151)
         oprot.writeListEnd()
-        oprot.writeString(viter143)
+        oprot.writeString(viter150)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -4342,11 +4530,11 @@ class StorageDescriptor:
       if fid == 1:
         if ftype == TType.LIST:
           self.cols = []
-          (_etype148, _size145) = iprot.readListBegin()
-          for _i149 in xrange(_size145):
-            _elem150 = FieldSchema()
-            _elem150.read(iprot)
-            self.cols.append(_elem150)
+          (_etype155, _size152) = iprot.readListBegin()
+          for _i156 in xrange(_size152):
+            _elem157 = FieldSchema()
+            _elem157.read(iprot)
+            self.cols.append(_elem157)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -4384,32 +4572,32 @@ class StorageDescriptor:
       elif fid == 8:
         if ftype == TType.LIST:
           self.bucketCols = []
-          (_etype154, _size151) = iprot.readListBegin()
-          for _i155 in xrange(_size151):
-            _elem156 = iprot.readString()
-            self.bucketCols.append(_elem156)
+          (_etype161, _size158) = iprot.readListBegin()
+          for _i162 in xrange(_size158):
+            _elem163 = iprot.readString()
+            self.bucketCols.append(_elem163)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 9:
         if ftype == TType.LIST:
           self.sortCols = []
-          (_etype160, _size157) = iprot.readListBegin()
-          for _i161 in xrange(_size157):
-            _elem162 = Order()
-            _elem162.read(iprot)
-            self.sortCols.append(_elem162)
+          (_etype167, _size164) = iprot.readListBegin()
+          for _i168 in xrange(_size164):
+            _elem169 = Order()
+            _elem169.read(iprot)
+            self.sortCols.append(_elem169)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 10:
         if ftype == TType.MAP:
           self.parameters = {}
-          (_ktype164, _vtype165, _size163 ) = iprot.readMapBegin()
-          for _i167 in xrange(_size163):
-            _key168 = iprot.readString()
-            _val169 = iprot.readString()
-            self.parameters[_key168] = _val169
+          (_ktype171, _vtype172, _size170 ) = iprot.readMapBegin()
+          for _i174 in xrange(_size170):
+            _key175 = iprot.readString()
+            _val176 = iprot.readString()
+            self.parameters[_key175] = _val176
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -4437,8 +4625,8 @@ class StorageDescriptor:
     if self.cols is not None:
       oprot.writeFieldBegin('cols', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.cols))
-      for iter170 in self.cols:
-        iter170.write(oprot)
+      for iter177 in self.cols:
+        iter177.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.location is not None:
@@ -4468,23 +4656,23 @@ class StorageDescriptor:
     if self.bucketCols is not None:
       oprot.writeFieldBegin('bucketCols', TType.LIST, 8)
       oprot.writeListBegin(TType.STRING, len(self.bucketCols))
-      for iter171 in self.bucketCols:
-        oprot.writeString(iter171)
+      for iter178 in self.bucketCols:
+        oprot.writeString(iter178)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.sortCols is not None:
       oprot.writeFieldBegin('sortCols', TType.LIST, 9)
       oprot.writeListBegin(TType.STRUCT, len(self.sortCols))
-      for iter172 in self.sortCols:
-        iter172.write(oprot)
+      for iter179 in self.sortCols:
+        iter179.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 10)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter173,viter174 in self.parameters.items():
-        oprot.writeString(kiter173)
-        oprot.writeString(viter174)
+      for kiter180,viter181 in self.parameters.items():
+        oprot.writeString(kiter180)
+        oprot.writeString(viter181)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.skewedInfo is not None:
@@ -4648,22 +4836,22 @@ class Table:
       elif fid == 8:
         if ftype == TType.LIST:
           self.partitionKeys = []
-          (_etype178, _size175) = iprot.readListBegin()
-          for _i179 in xrange(_size175):
-            _elem180 = FieldSchema()
-            _elem180.read(iprot)
-            self.partitionKeys.append(_elem180)
+          (_etype185, _size182) = iprot.readListBegin()
+          for _i186 in xrange(_size182):
+            _elem187 = FieldSchema()
+            _elem187.read(iprot)
+            self.partitionKeys.append(_elem187)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 9:
         if ftype == TType.MAP:
           self.parameters = {}
-          (_ktype182, _vtype183, _size181 ) = iprot.readMapBegin()
-          for _i185 in xrange(_size181):
-            _key186 = iprot.readString()
-            _val187 = iprot.readString()
-            self.parameters[_key186] = _val187
+          (_ktype189, _vtype190, _size188 ) = iprot.readMapBegin()
+          for _i192 in xrange(_size188):
+            _key193 = iprot.readString()
+            _val194 = iprot.readString()
+            self.parameters[_key193] = _val194
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -4765,16 +4953,16 @@ class Table:
     if self.partitionKeys is not None:
       oprot.writeFieldBegin('partitionKeys', TType.LIST, 8)
       oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys))
-      for iter188 in self.partitionKeys:
-        iter188.write(oprot)
+      for iter195 in self.partitionKeys:
+        iter195.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 9)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter189,viter190 in self.parameters.items():
-        oprot.writeString(kiter189)
-        oprot.writeString(viter190)
+      for kiter196,viter197 in self.parameters.items():
+        oprot.writeString(kiter196)
+        oprot.writeString(viter197)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.viewOriginalText is not None:
@@ -4919,10 +5107,10 @@ class Partition:
       if fid == 1:
         if ftype == TType.LIST:
           self.values = []
-          (_etype194, _size191) = iprot.readListBegin()
-          for _i195 in xrange(_size191):
-            _elem196 = iprot.readString()
-            self.values.append(_elem196)
+          (_etype201, _size198) = iprot.readListBegin()
+          for _i202 in xrange(_size198):
+            _elem203 = iprot.readString()
+            self.values.append(_elem203)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -4955,11 +5143,11 @@ class Partition:
       elif fid == 7:
         if ftype == TType.MAP:
           self.parameters = {}
-          (_ktype198, _vtype199, _size197 ) = iprot.readMapBegin()
-          for _i201 in xrange(_size197):
-            _key202 = iprot.readString()
-            _val203 = iprot.readString()
-            self.parameters[_key202] = _val203
+          (_ktype205, _vtype206, _size204 ) = iprot.readMapBegin()
+          for _i208 in xrange(_size204):
+            _key209 = iprot.readString()
+            _val210 = iprot.readString()
+            self.parameters[_key209] = _val210
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -4997,8 +5185,8 @@ class Partition:
     if self.values is not None:
       oprot.writeFieldBegin('values', TType.LIST, 1)
       oprot.writeListBegin(TType.STRING, len(self.values))
-      for iter204 in self.values:
-        oprot.writeString(iter204)
+      for iter211 in self.values:
+        oprot.writeString(iter211)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.dbName is not None:
@@ -5024,9 +5212,9 @@ class Partition:
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 7)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter205,viter206 in self.parameters.items():
-        oprot.writeString(kiter205)
-        oprot.writeString(viter206)
+      for kiter212,viter213 in self.parameters.items():
+        oprot.writeString(kiter212)
+        oprot.writeString(viter213)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.privileges is not None:
@@ -5119,10 +5307,10 @@ class PartitionWithoutSD:
       if fid == 1:
         if ftype == TType.LIST:
           self.values = []
-          (_etype210, _size207) = iprot.readListBegin()
-          for _i211 in xrange(_size207):
-            _elem212 = iprot.readString()
-            self.values.append(_elem212)
+          (_etype217, _size214) = iprot.readListBegin()
+          for _i218 in xrange(_size214):
+            _elem219 = iprot.readString()
+            self.values.append(_elem219)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -5144,11 +5332,11 @@ class PartitionWithoutSD:
       elif fid == 5:
         if ftype == TType.MAP:
           self.parameters = {}
-          (_ktype214, _vtype215, _size213 ) = iprot.readMapBegin()
-          for _i217 in xrange(_size213):
-            _key218 = iprot.readString()
-            _val219 = iprot.readString()
-            self.parameters[_key218] = _val219
+          (_ktype221, _vtype222, _size220 ) = iprot.readMapBegin()
+          for _i224 in xrange(_size220):
+            _key225 = iprot.readString()
+            _val226 = iprot.readString()
+            self.parameters[_key225] = _val226
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -5171,8 +5359,8 @@ class PartitionWithoutSD:
     if self.values is not None:
       oprot.writeFieldBegin('values', TType.LIST, 1)
       oprot.writeListBegin(TType.STRING, len(self.values))
-      for iter220 in self.values:
-        oprot.writeString(iter220)
+      for iter227 in self.values:
+        oprot.writeString(iter227)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.createTime is not None:
@@ -5190,9 +5378,9 @@ class PartitionWithoutSD:
     if self.parameters is not None:
       oprot.writeFieldBegin('parameters', TType.MAP, 5)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
-      for kiter221,viter222 in self.parameters.items():
-        oprot.writeString(kiter221)
-        oprot.writeString(viter222)
+      for kiter228,viter229 in self.parameters.items():
+        oprot.writeString(kiter228)
+        oprot.writeString(viter229)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.privileges is not None:
@@ -5256,11 +5444,11 @@ class PartitionSpecWithSharedSD:
       if fid == 1:
         if ftype == TType.LIST:
           self.partitions = []
-          (_etype226, _size223) = iprot.readListBegin()
-          for _i227 in xrange(_size223):
-            _elem228 = PartitionWithoutSD()
-            _elem228.read(iprot)
-            self.partitions.append(_elem228)
+          (_etype233, _size230) = iprot.readListBegin()
+          for _i234 in xrange(_size230):
+            _elem235 = PartitionWithoutSD()
+            _elem235.read(iprot)
+            self.partitions.append(_elem235)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -5283,8 +5471,8 @@ class PartitionSpecWithSharedSD:
     if self.partitions is not None:
       oprot.writeFieldBegin('partitions', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.partitions))
-      for iter229 in self.partitions:
-        iter229.write(oprot)
+      for iter236 in self.partitions:
+        iter236.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.sd is not None:
@@ -5341,11 +5529,11 @@ class PartitionListComposingSpec:
       if fid == 1:
         if ftype == TType.LIST:
           self.partitions = []
-          (_etype233, _size230) = iprot.readListBegin()
-          for _i234 in xrange(_size230):
-            _elem235 = Partition()
-            _elem235.read(iprot)
-            self.partitions.append(_elem235)
+          (_etype240, _size237) = iprot.readListBegin()
+          for _i241 in xrange(_size237):
+            _elem242 = Partition()
+            _elem242.read(iprot)
+            self.partitions.append(_elem242)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -5362,8 +5550,8 @@ class PartitionListComposingSpec:
     if self.partitions is not None:
       oprot.writeFieldBegin('partitions', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.partitions))
-      for iter236 in self.partitions:
-        iter236.write(oprot)
+      for iter243 in self.partitions:
+        iter243.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -6919,8 +7107,6 @@ class ColumnStatistics:
   Attributes:
    - statsDesc
    - statsObj
-   - txnId
-   - validWriteIdList
    - isStatsCompliant
   """
 
@@ -6928,16 +7114,12 @@ class ColumnStatistics:
     None, # 0
     (1, TType.STRUCT, 'statsDesc', (ColumnStatisticsDesc, ColumnStatisticsDesc.thrift_spec), None, ), # 1
     (2, TType.LIST, 'statsObj', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 2
-    (3, TType.I64, 'txnId', None, -1, ), # 3
-    (4, TType.STRING, 'validWriteIdList', None, None, ), # 4
-    (5, TType.BOOL, 'isStatsCompliant', None, None, ), # 5
+    (3, TType.BOOL, 'isStatsCompliant', None, None, ), # 3
   )
 
-  def __init__(self, statsDesc=None, statsObj=None, txnId=thrift_spec[3][4], validWriteIdList=None, isStatsCompliant=None,):
+  def __init__(self, statsDesc=None, statsObj=None, isStatsCompliant=None,):
     self.statsDesc = statsDesc
     self.statsObj = statsObj
-    self.txnId = txnId
-    self.validWriteIdList = validWriteIdList
     self.isStatsCompliant = isStatsCompliant
 
   def read(self, iprot):
@@ -6958,25 +7140,15 @@ class ColumnStatistics:
       elif fid == 2:
         if ftype == TType.LIST:
           self.statsObj = []
-          (_etype240, _size237) = iprot.readListBegin()
-          for _i241 in xrange(_size237):
-            _elem242 = ColumnStatisticsObj()
-            _elem242.read(iprot)
-            self.statsObj.append(_elem242)
+          (_etype247, _size244) = iprot.readListBegin()
+          for _i248 in xrange(_size244):
+            _elem249 = ColumnStatisticsObj()
+            _elem249.read(iprot)
+            self.statsObj.append(_elem249)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 3:
-        if ftype == TType.I64:
-          self.txnId = iprot.readI64()
-        else:
-          iprot.skip(ftype)
-      elif fid == 4:
-        if ftype == TType.STRING:
-          self.validWriteIdList = iprot.readString()
-        else:
-          iprot.skip(ftype)
-      elif fid == 5:
         if ftype == TType.BOOL:
           self.isStatsCompliant = iprot.readBool()
         else:
@@ -6998,20 +7170,12 @@ class ColumnStatistics:
     if self.statsObj is not None:
       oprot.writeFieldBegin('statsObj', TType.LIST, 2)
       oprot.writeListBegin(TType.STRUCT, len(self.statsObj))
-      for iter243 in self.statsObj:
-        iter243.write(oprot)
+      for iter250 in self.statsObj:
+        iter250.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
-    if self.txnId is not None:
-      oprot.writeFieldBegin('txnId', TType.I64, 3)
-      oprot.writeI64(self.txnId)
-      oprot.writeFieldEnd()
-    if self.validWriteIdList is not None:
-      oprot.writeFieldBegin('validWriteIdList', TType.STRING, 4)
-      oprot.writeString(self.validWriteIdList)
-      oprot.writeFieldEnd()
     if self.isStatsCompliant is not None:
-      oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 5)
+      oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 3)
       oprot.writeBool(self.isStatsCompliant)
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -7029,8 +7193,6 @@ class ColumnStatistics:
     value = 17
     value = (value * 31) ^ hash(self.statsDesc)
     value = (value * 31) ^ hash(self.statsObj)
-    value = (value * 31) ^ hash(self.txnId)
-    value = (value * 31) ^ hash(self.validWriteIdList)
     value = (value * 31) ^ hash(self.isStatsCompliant)
     return value
 
@@ -7077,11 +7239,11 @@ class AggrStats:
       if fid == 1:
         if ftype == TType.LIST:
           self.colStats = []
-          (_etype247, _size244) = iprot.readListBegin()
-          for _i248 in xrange(_size244):
-            _elem249 = ColumnStatisticsObj()
-            _elem249.read(iprot)
-            self.colStats.append(_elem249)
+          (_etype254, _size251) = iprot.readListBegin()
+          for _i255 in xrange(_size251):
+            _elem256 = ColumnStatisticsObj()
+            _elem256.read(iprot)
+            self.colStats.append(_elem256)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -7108,9 +7270,9 @@ class AggrStats:
     if self.colStats is not None:
       oprot.writeFieldBegin('colStats', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.colStats))
-      for iter250 in self.colStats:
-        iter250.write(oprot)
-      oprot.writeListEnd()
+      for iter257 in self.colStats:
+        iter257.write(oprot)
+      oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.partsFound is not None:
       oprot.writeFieldBegin('partsFound', TType.I64, 2)
@@ -7187,11 +7349,11 @@ class SetPartitionsStatsRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.colStats = []
-          (_etype254, _size251) = iprot.readListBegin()
-          for _i255 in xrange(_size251):
-            _elem256 = ColumnStatistics()
-            _elem256.read(iprot)
-            self.colStats.append(_elem256)
+          (_etype261, _size258) = iprot.readListBegin()
+          for _i262 in xrange(_size258):
+            _elem263 = ColumnStatistics()
+            _elem263.read(iprot)
+            self.colStats.append(_elem263)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -7228,8 +7390,8 @@ class SetPartitionsStatsRequest:
     if self.colStats is not None:
       oprot.writeFieldBegin('colStats', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.colStats))
-      for iter257 in self.colStats:
-        iter257.write(oprot)
+      for iter264 in self.colStats:
+        iter264.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.needMerge is not None:
@@ -7277,6 +7439,73 @@ class SetPartitionsStatsRequest:
   def __ne__(self, other):
     return not (self == other)
 
+class SetPartitionsStatsResponse:
+  """
+  Attributes:
+   - result
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.BOOL, 'result', None, None, ), # 1
+  )
+
+  def __init__(self, result=None,):
+    self.result = result
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.BOOL:
+          self.result = iprot.readBool()
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('SetPartitionsStatsResponse')
+    if self.result is not None:
+      oprot.writeFieldBegin('result', TType.BOOL, 1)
+      oprot.writeBool(self.result)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    if self.result is None:
+      raise TProtocol.TProtocolException(message='Required field result is unset!')
+    return
+
+
+  def __hash__(self):
+    value = 17
+    value = (value * 31) ^ hash(self.result)
+    return value
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
 class Schema:
   """
   Attributes:
@@ -7306,22 +7535,22 @@ class Schema:
       if fid == 1:
         if ftype == TType.LIST:
           self.fieldSchemas = []
-          (_etype261, _size258) = iprot.readListBegin()
-          for _i262 in xrange(_size258):
-            _elem263 = FieldSchema()
-            _elem263.read(iprot)
-            self.fieldSchemas.append(_elem263)
+          (_etype268, _size265) = iprot.readListBegin()
+          for _i269 in xrange(_size265):
+            _elem270 = FieldSchema()
+            _elem270.read(iprot)
+            self.fieldSchemas.append(_elem270)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.MAP:
           self.properties = {}
-          (_ktype265, _vtype266, _size264 ) = iprot.readMapBegin()
-          for _i268 in xrange(_size264):
-            _key269 = iprot.readString()
-            _val270 = iprot.readString()
-            self.properties[_key269] = _val270
+          (_ktype272, _vtype273, _size271 ) = iprot.readMapBegin()
+          for _i275 in xrange(_size271):
+            _key276 = iprot.readString()
+            _val277 = iprot.readString()
+            self.properties[_key276] = _val277
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -7338,16 +7567,16 @@ class Schema:
     if self.fieldSchemas is not None:
       oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas))
-      for iter271 in self.fieldSchemas:
-        iter271.write(oprot)
+      for iter278 in self.fieldSchemas:
+        iter278.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.properties is not None:
       oprot.writeFieldBegin('properties', TType.MAP, 2)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
-      for kiter272,viter273 in self.properties.items():
-        oprot.writeString(kiter272)
-        oprot.writeString(viter273)
+      for kiter279,viter280 in self.properties.items():
+        oprot.writeString(kiter279)
+        oprot.writeString(viter280)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -7400,11 +7629,11 @@ class EnvironmentContext:
       if fid == 1:
         if ftype == TType.MAP:
           self.properties = {}
-          (_ktype275, _vtype276, _size274 ) = iprot.readMapBegin()
-          for _i278 in xrange(_size274):
-            _key279 = iprot.readString()
-            _val280 = iprot.readString()
-            self.properties[_key279] = _val280
+          (_ktype282, _vtype283, _size281 ) = iprot.readMapBegin()
+          for _i285 in xrange(_size281):
+            _key286 = iprot.readString()
+            _val287 = iprot.readString()
+            self.properties[_key286] = _val287
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -7421,9 +7650,9 @@ class EnvironmentContext:
     if self.properties is not None:
       oprot.writeFieldBegin('properties', TType.MAP, 1)
       oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
-      for kiter281,viter282 in self.properties.items():
-        oprot.writeString(kiter281)
-        oprot.writeString(viter282)
+      for kiter288,viter289 in self.properties.items():
+        oprot.writeString(kiter288)
+        oprot.writeString(viter289)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -7570,11 +7799,11 @@ class PrimaryKeysResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.primaryKeys = []
-          (_etype286, _size283) = iprot.readListBegin()
-          for _i287 in xrange(_size283):
-            _elem288 = SQLPrimaryKey()
-            _elem288.read(iprot)
-            self.primaryKeys.append(_elem288)
+          (_etype293, _size290) = iprot.readListBegin()
+          for _i294 in xrange(_size290):
+            _elem295 = SQLPrimaryKey()
+            _elem295.read(iprot)
+            self.primaryKeys.append(_elem295)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -7591,8 +7820,8 @@ class PrimaryKeysResponse:
     if self.primaryKeys is not None:
       oprot.writeFieldBegin('primaryKeys', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys))
-      for iter289 in self.primaryKeys:
-        iter289.write(oprot)
+      for iter296 in self.primaryKeys:
+        iter296.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -7763,11 +7992,11 @@ class ForeignKeysResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.foreignKeys = []
-          (_etype293, _size290) = iprot.readListBegin()
-          for _i294 in xrange(_size290):
-            _elem295 = SQLForeignKey()
-            _elem295.read(iprot)
-            self.foreignKeys.append(_elem295)
+          (_etype300, _size297) = iprot.readListBegin()
+          for _i301 in xrange(_size297):
+            _elem302 = SQLForeignKey()
+            _elem302.read(iprot)
+            self.foreignKeys.append(_elem302)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -7784,8 +8013,8 @@ class ForeignKeysResponse:
     if self.foreignKeys is not None:
       oprot.writeFieldBegin('foreignKeys', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys))
-      for iter296 in self.foreignKeys:
-        iter296.write(oprot)
+      for iter303 in self.foreignKeys:
+        iter303.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -7936,11 +8165,11 @@ class UniqueConstraintsResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.uniqueConstraints = []
-          (_etype300, _size297) = iprot.readListBegin()
-          for _i301 in xrange(_size297):
-            _elem302 = SQLUniqueConstraint()
-            _elem302.read(iprot)
-            self.uniqueConstraints.append(_elem302)
+          (_etype307, _size304) = iprot.readListBegin()
+          for _i308 in xrange(_size304):
+            _elem309 = SQLUniqueConstraint()
+            _elem309.read(iprot)
+            self.uniqueConstraints.append(_elem309)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -7957,8 +8186,8 @@ class UniqueConstraintsResponse:
     if self.uniqueConstraints is not None:
       oprot.writeFieldBegin('uniqueConstraints', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints))
-      for iter303 in self.uniqueConstraints:
-        iter303.write(oprot)
+      for iter310 in self.uniqueConstraints:
+        iter310.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8109,11 +8338,11 @@ class NotNullConstraintsResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.notNullConstraints = []
-          (_etype307, _size304) = iprot.readListBegin()
-          for _i308 in xrange(_size304):
-            _elem309 = SQLNotNullConstraint()
-            _elem309.read(iprot)
-            self.notNullConstraints.append(_elem309)
+          (_etype314, _size311) = iprot.readListBegin()
+          for _i315 in xrange(_size311):
+            _elem316 = SQLNotNullConstraint()
+            _elem316.read(iprot)
+            self.notNullConstraints.append(_elem316)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8130,8 +8359,8 @@ class NotNullConstraintsResponse:
     if self.notNullConstraints is not None:
       oprot.writeFieldBegin('notNullConstraints', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints))
-      for iter310 in self.notNullConstraints:
-        iter310.write(oprot)
+      for iter317 in self.notNullConstraints:
+        iter317.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8282,11 +8511,11 @@ class DefaultConstraintsResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.defaultConstraints = []
-          (_etype314, _size311) = iprot.readListBegin()
-          for _i315 in xrange(_size311):
-            _elem316 = SQLDefaultConstraint()
-            _elem316.read(iprot)
-            self.defaultConstraints.append(_elem316)
+          (_etype321, _size318) = iprot.readListBegin()
+          for _i322 in xrange(_size318):
+            _elem323 = SQLDefaultConstraint()
+            _elem323.read(iprot)
+            self.defaultConstraints.append(_elem323)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8303,8 +8532,8 @@ class DefaultConstraintsResponse:
     if self.defaultConstraints is not None:
       oprot.writeFieldBegin('defaultConstraints', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints))
-      for iter317 in self.defaultConstraints:
-        iter317.write(oprot)
+      for iter324 in self.defaultConstraints:
+        iter324.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8455,11 +8684,11 @@ class CheckConstraintsResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.checkConstraints = []
-          (_etype321, _size318) = iprot.readListBegin()
-          for _i322 in xrange(_size318):
-            _elem323 = SQLCheckConstraint()
-            _elem323.read(iprot)
-            self.checkConstraints.append(_elem323)
+          (_etype328, _size325) = iprot.readListBegin()
+          for _i329 in xrange(_size325):
+            _elem330 = SQLCheckConstraint()
+            _elem330.read(iprot)
+            self.checkConstraints.append(_elem330)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8476,8 +8705,8 @@ class CheckConstraintsResponse:
     if self.checkConstraints is not None:
       oprot.writeFieldBegin('checkConstraints', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints))
-      for iter324 in self.checkConstraints:
-        iter324.write(oprot)
+      for iter331 in self.checkConstraints:
+        iter331.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8641,11 +8870,11 @@ class AddPrimaryKeyRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.primaryKeyCols = []
-          (_etype328, _size325) = iprot.readListBegin()
-          for _i329 in xrange(_size325):
-            _elem330 = SQLPrimaryKey()
-            _elem330.read(iprot)
-            self.primaryKeyCols.append(_elem330)
+          (_etype335, _size332) = iprot.readListBegin()
+          for _i336 in xrange(_size332):
+            _elem337 = SQLPrimaryKey()
+            _elem337.read(iprot)
+            self.primaryKeyCols.append(_elem337)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8662,8 +8891,8 @@ class AddPrimaryKeyRequest:
     if self.primaryKeyCols is not None:
       oprot.writeFieldBegin('primaryKeyCols', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.primaryKeyCols))
-      for iter331 in self.primaryKeyCols:
-        iter331.write(oprot)
+      for iter338 in self.primaryKeyCols:
+        iter338.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8717,11 +8946,11 @@ class AddForeignKeyRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.foreignKeyCols = []
-          (_etype335, _size332) = iprot.readListBegin()
-          for _i336 in xrange(_size332):
-            _elem337 = SQLForeignKey()
-            _elem337.read(iprot)
-            self.foreignKeyCols.append(_elem337)
+          (_etype342, _size339) = iprot.readListBegin()
+          for _i343 in xrange(_size339):
+            _elem344 = SQLForeignKey()
+            _elem344.read(iprot)
+            self.foreignKeyCols.append(_elem344)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8738,8 +8967,8 @@ class AddForeignKeyRequest:
     if self.foreignKeyCols is not None:
       oprot.writeFieldBegin('foreignKeyCols', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.foreignKeyCols))
-      for iter338 in self.foreignKeyCols:
-        iter338.write(oprot)
+      for iter345 in self.foreignKeyCols:
+        iter345.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8793,11 +9022,11 @@ class AddUniqueConstraintRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.uniqueConstraintCols = []
-          (_etype342, _size339) = iprot.readListBegin()
-          for _i343 in xrange(_size339):
-            _elem344 = SQLUniqueConstraint()
-            _elem344.read(iprot)
-            self.uniqueConstraintCols.append(_elem344)
+          (_etype349, _size346) = iprot.readListBegin()
+          for _i350 in xrange(_size346):
+            _elem351 = SQLUniqueConstraint()
+            _elem351.read(iprot)
+            self.uniqueConstraintCols.append(_elem351)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8814,8 +9043,8 @@ class AddUniqueConstraintRequest:
     if self.uniqueConstraintCols is not None:
       oprot.writeFieldBegin('uniqueConstraintCols', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraintCols))
-      for iter345 in self.uniqueConstraintCols:
-        iter345.write(oprot)
+      for iter352 in self.uniqueConstraintCols:
+        iter352.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8869,11 +9098,11 @@ class AddNotNullConstraintRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.notNullConstraintCols = []
-          (_etype349, _size346) = iprot.readListBegin()
-          for _i350 in xrange(_size346):
-            _elem351 = SQLNotNullConstraint()
-            _elem351.read(iprot)
-            self.notNullConstraintCols.append(_elem351)
+          (_etype356, _size353) = iprot.readListBegin()
+          for _i357 in xrange(_size353):
+            _elem358 = SQLNotNullConstraint()
+            _elem358.read(iprot)
+            self.notNullConstraintCols.append(_elem358)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8890,8 +9119,8 @@ class AddNotNullConstraintRequest:
     if self.notNullConstraintCols is not None:
       oprot.writeFieldBegin('notNullConstraintCols', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraintCols))
-      for iter352 in self.notNullConstraintCols:
-        iter352.write(oprot)
+      for iter359 in self.notNullConstraintCols:
+        iter359.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -8945,11 +9174,11 @@ class AddDefaultConstraintRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.defaultConstraintCols = []
-          (_etype356, _size353) = iprot.readListBegin()
-          for _i357 in xrange(_size353):
-            _elem358 = SQLDefaultConstraint()
-            _elem358.read(iprot)
-            self.defaultConstraintCols.append(_elem358)
+          (_etype363, _size360) = iprot.readListBegin()
+          for _i364 in xrange(_size360):
+            _elem365 = SQLDefaultConstraint()
+            _elem365.read(iprot)
+            self.defaultConstraintCols.append(_elem365)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -8966,8 +9195,8 @@ class AddDefaultConstraintRequest:
     if self.defaultConstraintCols is not None:
       oprot.writeFieldBegin('defaultConstraintCols', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraintCols))
-      for iter359 in self.defaultConstraintCols:
-        iter359.write(oprot)
+      for iter366 in self.defaultConstraintCols:
+        iter366.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -9021,11 +9250,11 @@ class AddCheckConstraintRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.checkConstraintCols = []
-          (_etype363, _size360) = iprot.readListBegin()
-          for _i364 in xrange(_size360):
-            _elem365 = SQLCheckConstraint()
-            _elem365.read(iprot)
-            self.checkConstraintCols.append(_elem365)
+          (_etype370, _size367) = iprot.readListBegin()
+          for _i371 in xrange(_size367):
+            _elem372 = SQLCheckConstraint()
+            _elem372.read(iprot)
+            self.checkConstraintCols.append(_elem372)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9042,8 +9271,8 @@ class AddCheckConstraintRequest:
     if self.checkConstraintCols is not None:
       oprot.writeFieldBegin('checkConstraintCols', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.checkConstraintCols))
-      for iter366 in self.checkConstraintCols:
-        iter366.write(oprot)
+      for iter373 in self.checkConstraintCols:
+        iter373.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -9100,11 +9329,11 @@ class PartitionsByExprResult:
       if fid == 1:
         if ftype == TType.LIST:
           self.partitions = []
-          (_etype370, _size367) = iprot.readListBegin()
-          for _i371 in xrange(_size367):
-            _elem372 = Partition()
-            _elem372.read(iprot)
-            self.partitions.append(_elem372)
+          (_etype377, _size374) = iprot.readListBegin()
+          for _i378 in xrange(_size374):
+            _elem379 = Partition()
+            _elem379.read(iprot)
+            self.partitions.append(_elem379)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9126,8 +9355,8 @@ class PartitionsByExprResult:
     if self.partitions is not None:
       oprot.writeFieldBegin('partitions', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.partitions))
-      for iter373 in self.partitions:
-        iter373.write(oprot)
+      for iter380 in self.partitions:
+        iter380.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.hasUnknownPartitions is not None:
@@ -9327,11 +9556,11 @@ class TableStatsResult:
       if fid == 1:
         if ftype == TType.LIST:
           self.tableStats = []
-          (_etype377, _size374) = iprot.readListBegin()
-          for _i378 in xrange(_size374):
-            _elem379 = ColumnStatisticsObj()
-            _elem379.read(iprot)
-            self.tableStats.append(_elem379)
+          (_etype384, _size381) = iprot.readListBegin()
+          for _i385 in xrange(_size381):
+            _elem386 = ColumnStatisticsObj()
+            _elem386.read(iprot)
+            self.tableStats.append(_elem386)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9353,8 +9582,8 @@ class TableStatsResult:
     if self.tableStats is not None:
       oprot.writeFieldBegin('tableStats', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.tableStats))
-      for iter380 in self.tableStats:
-        iter380.write(oprot)
+      for iter387 in self.tableStats:
+        iter387.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.isStatsCompliant is not None:
@@ -9416,17 +9645,17 @@ class PartitionsStatsResult:
       if fid == 1:
         if ftype == TType.MAP:
           self.partStats = {}
-          (_ktype382, _vtype383, _size381 ) = iprot.readMapBegin()
-          for _i385 in xrange(_size381):
-            _key386 = iprot.readString()
-            _val387 = []
-            (_etype391, _size388) = iprot.readListBegin()
-            for _i392 in xrange(_size388):
-              _elem393 = ColumnStatisticsObj()
-              _elem393.read(iprot)
-              _val387.append(_elem393)
+          (_ktype389, _vtype390, _size388 ) = iprot.readMapBegin()
+          for _i392 in xrange(_size388):
+            _key393 = iprot.readString()
+            _val394 = []
+            (_etype398, _size395) = iprot.readListBegin()
+            for _i399 in xrange(_size395):
+              _elem400 = ColumnStatisticsObj()
+              _elem400.read(iprot)
+              _val394.append(_elem400)
             iprot.readListEnd()
-            self.partStats[_key386] = _val387
+            self.partStats[_key393] = _val394
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -9448,11 +9677,11 @@ class PartitionsStatsResult:
     if self.partStats is not None:
       oprot.writeFieldBegin('partStats', TType.MAP, 1)
       oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.partStats))
-      for kiter394,viter395 in self.partStats.items():
-        oprot.writeString(kiter394)
-        oprot.writeListBegin(TType.STRUCT, len(viter395))
-        for iter396 in viter395:
-          iter396.write(oprot)
+      for kiter401,viter402 in self.partStats.items():
+        oprot.writeString(kiter401)
+        oprot.writeListBegin(TType.STRUCT, len(viter402))
+        for iter403 in viter402:
+          iter403.write(oprot)
         oprot.writeListEnd()
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
@@ -9537,10 +9766,10 @@ class TableStatsRequest:
       elif fid == 3:
         if ftype == TType.LIST:
           self.colNames = []
-          (_etype400, _size397) = iprot.readListBegin()
-          for _i401 in xrange(_size397):
-            _elem402 = iprot.readString()
-            self.colNames.append(_elem402)
+          (_etype407, _size404) = iprot.readListBegin()
+          for _i408 in xrange(_size404):
+            _elem409 = iprot.readString()
+            self.colNames.append(_elem409)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9580,8 +9809,8 @@ class TableStatsRequest:
     if self.colNames is not None:
       oprot.writeFieldBegin('colNames', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.colNames))
-      for iter403 in self.colNames:
-        oprot.writeString(iter403)
+      for iter410 in self.colNames:
+        oprot.writeString(iter410)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.catName is not None:
@@ -9684,20 +9913,20 @@ class PartitionsStatsRequest:
       elif fid == 3:
         if ftype == TType.LIST:
           self.colNames = []
-          (_etype407, _size404) = iprot.readListBegin()
-          for _i408 in xrange(_size404):
-            _elem409 = iprot.readString()
-            self.colNames.append(_elem409)
+          (_etype414, _size411) = iprot.readListBegin()
+          for _i415 in xrange(_size411):
+            _elem416 = iprot.readString()
+            self.colNames.append(_elem416)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 4:
         if ftype == TType.LIST:
           self.partNames = []
-          (_etype413, _size410) = iprot.readListBegin()
-          for _i414 in xrange(_size410):
-            _elem415 = iprot.readString()
-            self.partNames.append(_elem415)
+          (_etype420, _size417) = iprot.readListBegin()
+          for _i421 in xrange(_size417):
+            _elem422 = iprot.readString()
+            self.partNames.append(_elem422)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9737,15 +9966,15 @@ class PartitionsStatsRequest:
     if self.colNames is not None:
       oprot.writeFieldBegin('colNames', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.colNames))
-      for iter416 in self.colNames:
-        oprot.writeString(iter416)
+      for iter423 in self.colNames:
+        oprot.writeString(iter423)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.partNames is not None:
       oprot.writeFieldBegin('partNames', TType.LIST, 4)
       oprot.writeListBegin(TType.STRING, len(self.partNames))
-      for iter417 in self.partNames:
-        oprot.writeString(iter417)
+      for iter424 in self.partNames:
+        oprot.writeString(iter424)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.catName is not None:
@@ -9826,11 +10055,11 @@ class AddPartitionsResult:
       if fid == 1:
         if ftype == TType.LIST:
           self.partitions = []
-          (_etype421, _size418) = iprot.readListBegin()
-          for _i422 in xrange(_size418):
-            _elem423 = Partition()
-            _elem423.read(iprot)
-            self.partitions.append(_elem423)
+          (_etype428, _size425) = iprot.readListBegin()
+          for _i429 in xrange(_size425):
+            _elem430 = Partition()
+            _elem430.read(iprot)
+            self.partitions.append(_elem430)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9852,8 +10081,8 @@ class AddPartitionsResult:
     if self.partitions is not None:
       oprot.writeFieldBegin('partitions', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.partitions))
-      for iter424 in self.partitions:
-        iter424.write(oprot)
+      for iter431 in self.partitions:
+        iter431.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.isStatsCompliant is not None:
@@ -9941,11 +10170,11 @@ class AddPartitionsRequest:
       elif fid == 3:
         if ftype == TType.LIST:
           self.parts = []
-          (_etype428, _size425) = iprot.readListBegin()
-          for _i429 in xrange(_size425):
-            _elem430 = Partition()
-            _elem430.read(iprot)
-            self.parts.append(_elem430)
+          (_etype435, _size432) = iprot.readListBegin()
+          for _i436 in xrange(_size432):
+            _elem437 = Partition()
+            _elem437.read(iprot)
+            self.parts.append(_elem437)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -9995,8 +10224,8 @@ class AddPartitionsRequest:
     if self.parts is not None:
       oprot.writeFieldBegin('parts', TType.LIST, 3)
       oprot.writeListBegin(TType.STRUCT, len(self.parts))
-      for iter431 in self.parts:
-        iter431.write(oprot)
+      for iter438 in self.parts:
+        iter438.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ifNotExists is not None:
@@ -10083,11 +10312,11 @@ class DropPartitionsResult:
       if fid == 1:
         if ftype == TType.LIST:
           self.partitions = []
-          (_etype435, _size432) = iprot.readListBegin()
-          for _i436 in xrange(_size432):
-            _elem437 = Partition()
-            _elem437.read(iprot)
-            self.partitions.append(_elem437)
+          (_etype442, _size439) = iprot.readListBegin()
+          for _i443 in xrange(_size439):
+            _elem444 = Partition()
+            _elem444.read(iprot)
+            self.partitions.append(_elem444)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10104,8 +10333,8 @@ class DropPartitionsResult:
     if self.partitions is not None:
       oprot.writeFieldBegin('partitions', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.partitions))
-      for iter438 in self.partitions:
-        iter438.write(oprot)
+      for iter445 in self.partitions:
+        iter445.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -10240,21 +10469,21 @@ class RequestPartsSpec:
       if fid == 1:
         if ftype == TType.LIST:
           self.names = []
-          (_etype442, _size439) = iprot.readListBegin()
-          for _i443 in xrange(_size439):
-            _elem444 = iprot.readString()
-            self.names.append(_elem444)
+          (_etype449, _size446) = iprot.readListBegin()
+          for _i450 in xrange(_size446):
+            _elem451 = iprot.readString()
+            self.names.append(_elem451)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.LIST:
           self.exprs = []
-          (_etype448, _size445) = iprot.readListBegin()
-          for _i449 in xrange(_size445):
-            _elem450 = DropPartitionsExpr()
-            _elem450.read(iprot)
-            self.exprs.append(_elem450)
+          (_etype455, _size452) = iprot.readListBegin()
+          for _i456 in xrange(_size452):
+            _elem457 = DropPartitionsExpr()
+            _elem457.read(iprot)
+            self.exprs.append(_elem457)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10271,15 +10500,15 @@ class RequestPartsSpec:
     if self.names is not None:
       oprot.writeFieldBegin('names', TType.LIST, 1)
       oprot.writeListBegin(TType.STRING, len(self.names))
-      for iter451 in self.names:
-        oprot.writeString(iter451)
+      for iter458 in self.names:
+        oprot.writeString(iter458)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.exprs is not None:
       oprot.writeFieldBegin('exprs', TType.LIST, 2)
       oprot.writeListBegin(TType.STRUCT, len(self.exprs))
-      for iter452 in self.exprs:
-        iter452.write(oprot)
+      for iter459 in self.exprs:
+        iter459.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -10543,11 +10772,11 @@ class PartitionValuesRequest:
       elif fid == 3:
         if ftype == TType.LIST:
           self.partitionKeys = []
-          (_etype456, _size453) = iprot.readListBegin()
-          for _i457 in xrange(_size453):
-            _elem458 = FieldSchema()
-            _elem458.read(iprot)
-            self.partitionKeys.append(_elem458)
+          (_etype463, _size460) = iprot.readListBegin()
+          for _i464 in xrange(_size460):
+            _elem465 = FieldSchema()
+            _elem465.read(iprot)
+            self.partitionKeys.append(_elem465)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10564,11 +10793,11 @@ class PartitionValuesRequest:
       elif fid == 6:
         if ftype == TType.LIST:
           self.partitionOrder = []
-          (_etype462, _size459) = iprot.readListBegin()
-          for _i463 in xrange(_size459):
-            _elem464 = FieldSchema()
-            _elem464.read(iprot)
-            self.partitionOrder.append(_elem464)
+          (_etype469, _size466) = iprot.readListBegin()
+          for _i470 in xrange(_size466):
+            _elem471 = FieldSchema()
+            _elem471.read(iprot)
+            self.partitionOrder.append(_elem471)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10608,8 +10837,8 @@ class PartitionValuesRequest:
     if self.partitionKeys is not None:
       oprot.writeFieldBegin('partitionKeys', TType.LIST, 3)
       oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys))
-      for iter465 in self.partitionKeys:
-        iter465.write(oprot)
+      for iter472 in self.partitionKeys:
+        iter472.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.applyDistinct is not None:
@@ -10623,8 +10852,8 @@ class PartitionValuesRequest:
     if self.partitionOrder is not None:
       oprot.writeFieldBegin('partitionOrder', TType.LIST, 6)
       oprot.writeListBegin(TType.STRUCT, len(self.partitionOrder))
-      for iter466 in self.partitionOrder:
-        iter466.write(oprot)
+      for iter473 in self.partitionOrder:
+        iter473.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.ascending is not None:
@@ -10702,10 +10931,10 @@ class PartitionValuesRow:
       if fid == 1:
         if ftype == TType.LIST:
           self.row = []
-          (_etype470, _size467) = iprot.readListBegin()
-          for _i471 in xrange(_size467):
-            _elem472 = iprot.readString()
-            self.row.append(_elem472)
+          (_etype477, _size474) = iprot.readListBegin()
+          for _i478 in xrange(_size474):
+            _elem479 = iprot.readString()
+            self.row.append(_elem479)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10722,8 +10951,8 @@ class PartitionValuesRow:
     if self.row is not None:
       oprot.writeFieldBegin('row', TType.LIST, 1)
       oprot.writeListBegin(TType.STRING, len(self.row))
-      for iter473 in self.row:
-        oprot.writeString(iter473)
+      for iter480 in self.row:
+        oprot.writeString(iter480)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -10777,11 +11006,11 @@ class PartitionValuesResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.partitionValues = []
-          (_etype477, _size474) = iprot.readListBegin()
-          for _i478 in xrange(_size474):
-            _elem479 = PartitionValuesRow()
-            _elem479.read(iprot)
-            self.partitionValues.append(_elem479)
+          (_etype484, _size481) = iprot.readListBegin()
+          for _i485 in xrange(_size481):
+            _elem486 = PartitionValuesRow()
+            _elem486.read(iprot)
+            self.partitionValues.append(_elem486)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -10798,8 +11027,8 @@ class PartitionValuesResponse:
     if self.partitionValues is not None:
       oprot.writeFieldBegin('partitionValues', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.partitionValues))
-      for iter480 in self.partitionValues:
-        iter480.write(oprot)
+      for iter487 in self.partitionValues:
+        iter487.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -10990,11 +11219,11 @@ class Function:
       elif fid == 8:
         if ftype == TType.LIST:
           self.resourceUris = []
-          (_etype484, _size481) = iprot.readListBegin()
-          for _i485 in xrange(_size481):
-            _elem486 = ResourceUri()
-            _elem486.read(iprot)
-            self.resourceUris.append(_elem486)
+          (_etype491, _size488) = iprot.readListBegin()
+          for _i492 in xrange(_size488):
+            _elem493 = ResourceUri()
+            _elem493.read(iprot)
+            self.resourceUris.append(_elem493)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11044,8 +11273,8 @@ class Function:
     if self.resourceUris is not None:
       oprot.writeFieldBegin('resourceUris', TType.LIST, 8)
       oprot.writeListBegin(TType.STRUCT, len(self.resourceUris))
-      for iter487 in self.resourceUris:
-        iter487.write(oprot)
+      for iter494 in self.resourceUris:
+        iter494.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.catName is not None:
@@ -11294,11 +11523,11 @@ class GetOpenTxnsInfoResponse:
       elif fid == 2:
         if ftype == TType.LIST:
           self.open_txns = []
-          (_etype491, _size488) = iprot.readListBegin()
-          for _i492 in xrange(_size488):
-            _elem493 = TxnInfo()
-            _elem493.read(iprot)
-            self.open_txns.append(_elem493)
+          (_etype498, _size495) = iprot.readListBegin()
+          for _i499 in xrange(_size495):
+            _elem500 = TxnInfo()
+            _elem500.read(iprot)
+            self.open_txns.append(_elem500)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11319,8 +11548,8 @@ class GetOpenTxnsInfoResponse:
     if self.open_txns is not None:
       oprot.writeFieldBegin('open_txns', TType.LIST, 2)
       oprot.writeListBegin(TType.STRUCT, len(self.open_txns))
-      for iter494 in self.open_txns:
-        iter494.write(oprot)
+      for iter501 in self.open_txns:
+        iter501.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -11391,10 +11620,10 @@ class GetOpenTxnsResponse:
       elif fid == 2:
         if ftype == TType.LIST:
           self.open_txns = []
-          (_etype498, _size495) = iprot.readListBegin()
-          for _i499 in xrange(_size495):
-            _elem500 = iprot.readI64()
-            self.open_txns.append(_elem500)
+          (_etype505, _size502) = iprot.readListBegin()
+          for _i506 in xrange(_size502):
+            _elem507 = iprot.readI64()
+            self.open_txns.append(_elem507)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11425,8 +11654,8 @@ class GetOpenTxnsResponse:
     if self.open_txns is not None:
       oprot.writeFieldBegin('open_txns', TType.LIST, 2)
       oprot.writeListBegin(TType.I64, len(self.open_txns))
-      for iter501 in self.open_txns:
-        oprot.writeI64(iter501)
+      for iter508 in self.open_txns:
+        oprot.writeI64(iter508)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.min_open_txn is not None:
@@ -11535,10 +11764,10 @@ class OpenTxnRequest:
       elif fid == 6:
         if ftype == TType.LIST:
           self.replSrcTxnIds = []
-          (_etype505, _size502) = iprot.readListBegin()
-          for _i506 in xrange(_size502):
-            _elem507 = iprot.readI64()
-            self.replSrcTxnIds.append(_elem507)
+          (_etype512, _size509) = iprot.readListBegin()
+          for _i513 in xrange(_size509):
+            _elem514 = iprot.readI64()
+            self.replSrcTxnIds.append(_elem514)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11575,8 +11804,8 @@ class OpenTxnRequest:
     if self.replSrcTxnIds is not None:
       oprot.writeFieldBegin('replSrcTxnIds', TType.LIST, 6)
       oprot.writeListBegin(TType.I64, len(self.replSrcTxnIds))
-      for iter508 in self.replSrcTxnIds:
-        oprot.writeI64(iter508)
+      for iter515 in self.replSrcTxnIds:
+        oprot.writeI64(iter515)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -11639,10 +11868,10 @@ class OpenTxnsResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.txn_ids = []
-          (_etype512, _size509) = iprot.readListBegin()
-          for _i513 in xrange(_size509):
-            _elem514 = iprot.readI64()
-            self.txn_ids.append(_elem514)
+          (_etype519, _size516) = iprot.readListBegin()
+          for _i520 in xrange(_size516):
+            _elem521 = iprot.readI64()
+            self.txn_ids.append(_elem521)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11659,9 +11888,9 @@ class OpenTxnsResponse:
     if self.txn_ids is not None:
       oprot.writeFieldBegin('txn_ids', TType.LIST, 1)
       oprot.writeListBegin(TType.I64, len(self.txn_ids))
-      for iter515 in self.txn_ids:
-        oprot.writeI64(iter515)
-      oprot.writeListEnd()
+      for iter522 in self.txn_ids:
+        oprot.writeI64(iter522)
+      oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
@@ -11794,10 +12023,10 @@ class AbortTxnsRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.txn_ids = []
-          (_etype519, _size516) = iprot.readListBegin()
-          for _i520 in xrange(_size516):
-            _elem521 = iprot.readI64()
-            self.txn_ids.append(_elem521)
+          (_etype526, _size523) = iprot.readListBegin()
+          for _i527 in xrange(_size523):
+            _elem528 = iprot.readI64()
+            self.txn_ids.append(_elem528)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11814,8 +12043,8 @@ class AbortTxnsRequest:
     if self.txn_ids is not None:
       oprot.writeFieldBegin('txn_ids', TType.LIST, 1)
       oprot.writeListBegin(TType.I64, len(self.txn_ids))
-      for iter522 in self.txn_ids:
-        oprot.writeI64(iter522)
+      for iter529 in self.txn_ids:
+        oprot.writeI64(iter529)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -11885,11 +12114,11 @@ class CommitTxnRequest:
       elif fid == 3:
         if ftype == TType.LIST:
           self.writeEventInfos = []
-          (_etype526, _size523) = iprot.readListBegin()
-          for _i527 in xrange(_size523):
-            _elem528 = WriteEventInfo()
-            _elem528.read(iprot)
-            self.writeEventInfos.append(_elem528)
+          (_etype533, _size530) = iprot.readListBegin()
+          for _i534 in xrange(_size530):
+            _elem535 = WriteEventInfo()
+            _elem535.read(iprot)
+            self.writeEventInfos.append(_elem535)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -11914,8 +12143,8 @@ class CommitTxnRequest:
     if self.writeEventInfos is not None:
       oprot.writeFieldBegin('writeEventInfos', TType.LIST, 3)
       oprot.writeListBegin(TType.STRUCT, len(self.writeEventInfos))
-      for iter529 in self.writeEventInfos:
-        iter529.write(oprot)
+      for iter536 in self.writeEventInfos:
+        iter536.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -12162,10 +12391,10 @@ class ReplTblWriteIdStateRequest:
       elif fid == 6:
         if ftype == TType.LIST:
           self.partNames = []
-          (_etype533, _size530) = iprot.readListBegin()
-          for _i534 in xrange(_size530):
-            _elem535 = iprot.readString()
-            self.partNames.append(_elem535)
+          (_etype540, _size537) = iprot.readListBegin()
+          for _i541 in xrange(_size537):
+            _elem542 = iprot.readString()
+            self.partNames.append(_elem542)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -12202,8 +12431,8 @@ class ReplTblWriteIdStateRequest:
     if self.partNames is not None:
       oprot.writeFieldBegin('partNames', TType.LIST, 6)
       oprot.writeListBegin(TType.STRING, len(self.partNames))
-      for iter536 in self.partNames:
-        oprot.writeString(iter536)
+      for iter543 in self.partNames:
+        oprot.writeString(iter543)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -12273,10 +12502,10 @@ class GetValidWriteIdsRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.fullTableNames = []
-          (_etype540, _size537) = iprot.readListBegin()
-          for _i541 in xrange(_size537):
-            _elem542 = iprot.readString()
-            self.fullTableNames.append(_elem542)
+          (_etype547, _size544) = iprot.readListBegin()
+          for _i548 in xrange(_size544):
+            _elem549 = iprot.readString()
+            self.fullTableNames.append(_elem549)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -12298,8 +12527,8 @@ class GetValidWriteIdsRequest:
     if self.fullTableNames is not None:
       oprot.writeFieldBegin('fullTableNames', TType.LIST, 1)
       oprot.writeListBegin(TType.STRING, len(self.fullTableNames))
-      for iter543 in self.fullTableNames:
-        oprot.writeString(iter543)
+      for iter550 in self.fullTableNames:
+        oprot.writeString(iter550)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.validTxnList is not None:
@@ -12382,10 +12611,10 @@ class TableValidWriteIds:
       elif fid == 3:
         if ftype == TType.LIST:
           self.invalidWriteIds = []
-          (_etype547, _size544) = iprot.readListBegin()
-          for _i548 in xrange(_size544):
-            _elem549 = iprot.readI64()
-            self.invalidWriteIds.append(_elem549)
+          (_etype554, _size551) = iprot.readListBegin()
+          for _i555 in xrange(_size551):
+            _elem556 = iprot.readI64()
+            self.invalidWriteIds.append(_elem556)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -12420,8 +12649,8 @@ class TableValidWriteIds:
     if self.invalidWriteIds is not None:
       oprot.writeFieldBegin('invalidWriteIds', TType.LIST, 3)
       oprot.writeListBegin(TType.I64, len(self.invalidWriteIds))
-      for iter550 in self.invalidWriteIds:
-        oprot.writeI64(iter550)
+      for iter557 in self.invalidWriteIds:
+        oprot.writeI64(iter557)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.minOpenWriteId is not None:
@@ -12493,11 +12722,11 @@ class GetValidWriteIdsResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.tblValidWriteIds = []
-          (_etype554, _size551) = iprot.readListBegin()
-          for _i555 in xrange(_size551):
-            _elem556 = TableValidWriteIds()
-            _elem556.read(iprot)
-            self.tblValidWriteIds.append(_elem556)
+          (_etype561, _size558) = iprot.readListBegin()
+          for _i562 in xrange(_size558):
+            _elem563 = TableValidWriteIds()
+            _elem563.read(iprot)
+            self.tblValidWriteIds.append(_elem563)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -12514,8 +12743,8 @@ class GetValidWriteIdsResponse:
     if self.tblValidWriteIds is not None:
       oprot.writeFieldBegin('tblValidWriteIds', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.tblValidWriteIds))
-      for iter557 in self.tblValidWriteIds:
-        iter557.write(oprot)
+      for iter564 in self.tblValidWriteIds:
+        iter564.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -12591,10 +12820,10 @@ class AllocateTableWriteIdsRequest:
       elif fid == 3:
         if ftype == TType.LIST:
           self.txnIds = []
-          (_etype561, _size558) = iprot.readListBegin()
-          for _i562 in xrange(_size558):
-            _elem563 = iprot.readI64()
-            self.txnIds.append(_elem563)
+          (_etype568, _size565) = iprot.readListBegin()
+          for _i569 in xrange(_size565):
+            _elem570 = iprot.readI64()
+            self.txnIds.append(_elem570)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -12606,11 +12835,11 @@ class AllocateTableWriteIdsRequest:
       elif fid == 5:
         if ftype == TType.LIST:
           self.srcTxnToWriteIdList = []
-          (_etype567, _size564) = iprot.readListBegin()
-          for _i568 in xrange(_size564):
-            _elem569 = TxnToWriteId()
-            _elem569.read(iprot)
-            self.srcTxnToWriteIdList.append(_elem569)
+          (_etype574, _size571) = iprot.readListBegin()
+          for _i575 in xrange(_size571):
+            _elem576 = TxnToWriteId()
+            _elem576.read(iprot)
+            self.srcTxnToWriteIdList.append(_elem576)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -12635,8 +12864,8 @@ class AllocateTableWriteIdsRequest:
     if self.txnIds is not None:
       oprot.writeFieldBegin('txnIds', TType.LIST, 3)
       oprot.writeListBegin(TType.I64, len(self.txnIds))
-      for iter570 in self.txnIds:
-        oprot.writeI64(iter570)
+      for iter577 in self.txnIds:
+        oprot.writeI64(iter577)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.replPolicy is not None:
@@ -12646,8 +12875,8 @@ class AllocateTableWriteIdsRequest:
     if self.srcTxnToWriteIdList is not None:
       oprot.writeFieldBegin('srcTxnToWriteIdList', TType.LIST, 5)
       oprot.writeListBegin(TType.STRUCT, len(self.srcTxnToWriteIdList))
-      for iter571 in self.srcTxnToWriteIdList:
-        iter571.write(oprot)
+      for iter578 in self.srcTxnToWriteIdList:
+        iter578.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -12789,11 +13018,11 @@ class AllocateTableWriteIdsResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.txnToWriteIds = []
-          (_etype575, _size572) = iprot.readListBegin()
-          for _i576 in xrange(_size572):
-            _elem577 = TxnToWriteId()
-            _elem577.read(iprot)
-            self.txnToWriteIds.append(_elem577)
+          (_etype582, _size579) = iprot.readListBegin()
+          for _i583 in xrange(_size579):
+            _elem584 = TxnToWriteId()
+            _elem584.read(iprot)
+            self.txnToWriteIds.append(_elem584)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -12810,8 +13039,8 @@ class AllocateTableWriteIdsResponse:
     if self.txnToWriteIds is not None:
       oprot.writeFieldBegin('txnToWriteIds', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.txnToWriteIds))
-      for iter578 in self.txnToWriteIds:
-        iter578.write(oprot)
+      for iter585 in self.txnToWriteIds:
+        iter585.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -13039,11 +13268,11 @@ class LockRequest:
       if fid == 1:
         if ftype == TType.LIST:
           self.component = []
-          (_etype582, _size579) = iprot.readListBegin()
-          for _i583 in xrange(_size579):
-            _elem584 = LockComponent()
-            _elem584.read(iprot)
-            self.component.append(_elem584)
+          (_etype589, _size586) = iprot.readListBegin()
+          for _i590 in xrange(_size586):
+            _elem591 = LockComponent()
+            _elem591.read(iprot)
+            self.component.append(_elem591)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -13080,8 +13309,8 @@ class LockRequest:
     if self.component is not None:
       oprot.writeFieldBegin('component', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.component))
-      for iter585 in self.component:
-        iter585.write(oprot)
+      for iter592 in self.component:
+        iter592.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.txnid is not None:
@@ -13779,11 +14008,11 @@ class ShowLocksResponse:
       if fid == 1:
         if ftype == TType.LIST:
           self.locks = []
-          (_etype589, _size586) = iprot.readListBegin()
-          for _i590 in xrange(_size586):
-            _elem591 = ShowLocksResponseElement()
-            _elem591.read(iprot)
-            self.locks.append(_elem591)
+          (_etype596, _size593) = iprot.readListBegin()
+          for _i597 in xrange(_size593):
+            _elem598 = ShowLocksResponseElement()
+            _elem598.read(iprot)
+            self.locks.append(_elem598)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -13800,8 +14029,8 @@ class ShowLocksResponse:
     if self.locks is not None:
       oprot.writeFieldBegin('locks', TType.LIST, 1)
       oprot.writeListBegin(TType.STRUCT, len(self.locks))
-      for iter592 in self.locks:
-        iter592.write(oprot)
+      for iter599 in self.locks:
+        iter599.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -14016,20 +14245,20 @@ class HeartbeatTxnRangeResponse:
       if fid == 1:
         if ftype == TType.SET:
           self.aborted = set()
-          (_etype596, _size593) = iprot.readSetBegin()
-          for _i597 in xrange(_si

<TRUNCATED>

[10/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
index 187aceb..7e13e19 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
@@ -270,6 +270,12 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf {
    */
   public function truncate_table($dbName, $tableName, array $partNames);
   /**
+   * @param \metastore\TruncateTableRequest $req
+   * @return \metastore\TruncateTableResponse
+   * @throws \metastore\MetaException
+   */
+  public function truncate_table_req(\metastore\TruncateTableRequest $req);
+  /**
    * @param string $db_name
    * @param string $pattern
    * @return string[]
@@ -389,6 +395,13 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf {
    */
   public function alter_table_with_cascade($dbname, $tbl_name, \metastore\Table $new_tbl, $cascade);
   /**
+   * @param \metastore\AlterTableRequest $req
+   * @return \metastore\AlterTableResponse
+   * @throws \metastore\InvalidOperationException
+   * @throws \metastore\MetaException
+   */
+  public function alter_table_req(\metastore\AlterTableRequest $req);
+  /**
    * @param \metastore\Partition $new_part
    * @return \metastore\Partition
    * @throws \metastore\InvalidObjectException
@@ -728,7 +741,7 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf {
    * @throws \metastore\InvalidOperationException
    * @throws \metastore\MetaException
    */
-  public function alter_partitions_with_environment_context_req(\metastore\AlterPartitionsRequest $req);
+  public function alter_partitions_req(\metastore\AlterPartitionsRequest $req);
   /**
    * @param string $db_name
    * @param string $tbl_name
@@ -861,6 +874,24 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf {
    */
   public function update_partition_column_statistics(\metastore\ColumnStatistics $stats_obj);
   /**
+   * @param \metastore\SetPartitionsStatsRequest $req
+   * @return \metastore\SetPartitionsStatsResponse
+   * @throws \metastore\NoSuchObjectException
+   * @throws \metastore\InvalidObjectException
+   * @throws \metastore\MetaException
+   * @throws \metastore\InvalidInputException
+   */
+  public function update_table_column_statistics_req(\metastore\SetPartitionsStatsRequest $req);
+  /**
+   * @param \metastore\SetPartitionsStatsRequest $req
+   * @return \metastore\SetPartitionsStatsResponse
+   * @throws \metastore\NoSuchObjectException
+   * @throws \metastore\InvalidObjectException
+   * @throws \metastore\MetaException
+   * @throws \metastore\InvalidInputException
+   */
+  public function update_partition_column_statistics_req(\metastore\SetPartitionsStatsRequest $req);
+  /**
    * @param string $db_name
    * @param string $tbl_name
    * @param string $col_name
@@ -3504,6 +3535,60 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas
     return;
   }
 
+  public function truncate_table_req(\metastore\TruncateTableRequest $req)
+  {
+    $this->send_truncate_table_req($req);
+    return $this->recv_truncate_table_req();
+  }
+
+  public function send_truncate_table_req(\metastore\TruncateTableRequest $req)
+  {
+    $args = new \metastore\ThriftHiveMetastore_truncate_table_req_args();
+    $args->req = $req;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'truncate_table_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('truncate_table_req', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_truncate_table_req()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_truncate_table_req_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \metastore\ThriftHiveMetastore_truncate_table_req_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    throw new \Exception("truncate_table_req failed: unknown result");
+  }
+
   public function get_tables($db_name, $pattern)
   {
     $this->send_get_tables($db_name, $pattern);
@@ -4359,6 +4444,63 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas
     return;
   }
 
+  public function alter_table_req(\metastore\AlterTableRequest $req)
+  {
+    $this->send_alter_table_req($req);
+    return $this->recv_alter_table_req();
+  }
+
+  public function send_alter_table_req(\metastore\AlterTableRequest $req)
+  {
+    $args = new \metastore\ThriftHiveMetastore_alter_table_req_args();
+    $args->req = $req;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'alter_table_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('alter_table_req', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_alter_table_req()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_table_req_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \metastore\ThriftHiveMetastore_alter_table_req_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    throw new \Exception("alter_table_req failed: unknown result");
+  }
+
   public function add_partition(\metastore\Partition $new_part)
   {
     $this->send_add_partition($new_part);
@@ -6463,34 +6605,34 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas
     return;
   }
 
-  public function alter_partitions_with_environment_context_req(\metastore\AlterPartitionsRequest $req)
+  public function alter_partitions_req(\metastore\AlterPartitionsRequest $req)
   {
-    $this->send_alter_partitions_with_environment_context_req($req);
-    return $this->recv_alter_partitions_with_environment_context_req();
+    $this->send_alter_partitions_req($req);
+    return $this->recv_alter_partitions_req();
   }
 
-  public function send_alter_partitions_with_environment_context_req(\metastore\AlterPartitionsRequest $req)
+  public function send_alter_partitions_req(\metastore\AlterPartitionsRequest $req)
   {
-    $args = new \metastore\ThriftHiveMetastore_alter_partitions_with_environment_context_req_args();
+    $args = new \metastore\ThriftHiveMetastore_alter_partitions_req_args();
     $args->req = $req;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'alter_partitions_with_environment_context_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'alter_partitions_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('alter_partitions_with_environment_context_req', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('alter_partitions_req', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_alter_partitions_with_environment_context_req()
+  public function recv_alter_partitions_req()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_partitions_with_environment_context_req_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_alter_partitions_req_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -6504,7 +6646,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \metastore\ThriftHiveMetastore_alter_partitions_with_environment_context_req_result();
+      $result = new \metastore\ThriftHiveMetastore_alter_partitions_req_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -6517,7 +6659,7 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas
     if ($result->o2 !== null) {
       throw $result->o2;
     }
-    throw new \Exception("alter_partitions_with_environment_context_req failed: unknown result");
+    throw new \Exception("alter_partitions_req failed: unknown result");
   }
 
   public function alter_partition_with_environment_context($db_name, $tbl_name, \metastore\Partition $new_part, \metastore\EnvironmentContext $environment_context)
@@ -7461,6 +7603,132 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas
     throw new \Exception("update_partition_column_statistics failed: unknown result");
   }
 
+  public function update_table_column_statistics_req(\metastore\SetPartitionsStatsRequest $req)
+  {
+    $this->send_update_table_column_statistics_req($req);
+    return $this->recv_update_table_column_statistics_req();
+  }
+
+  public function send_update_table_column_statistics_req(\metastore\SetPartitionsStatsRequest $req)
+  {
+    $args = new \metastore\ThriftHiveMetastore_update_table_column_statistics_req_args();
+    $args->req = $req;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'update_table_column_statistics_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('update_table_column_statistics_req', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_update_table_column_statistics_req()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_table_column_statistics_req_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \metastore\ThriftHiveMetastore_update_table_column_statistics_req_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    if ($result->o3 !== null) {
+      throw $result->o3;
+    }
+    if ($result->o4 !== null) {
+      throw $result->o4;
+    }
+    throw new \Exception("update_table_column_statistics_req failed: unknown result");
+  }
+
+  public function update_partition_column_statistics_req(\metastore\SetPartitionsStatsRequest $req)
+  {
+    $this->send_update_partition_column_statistics_req($req);
+    return $this->recv_update_partition_column_statistics_req();
+  }
+
+  public function send_update_partition_column_statistics_req(\metastore\SetPartitionsStatsRequest $req)
+  {
+    $args = new \metastore\ThriftHiveMetastore_update_partition_column_statistics_req_args();
+    $args->req = $req;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'update_partition_column_statistics_req', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('update_partition_column_statistics_req', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_update_partition_column_statistics_req()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_update_partition_column_statistics_req_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \metastore\ThriftHiveMetastore_update_partition_column_statistics_req_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    if ($result->o3 !== null) {
+      throw $result->o3;
+    }
+    if ($result->o4 !== null) {
+      throw $result->o4;
+    }
+    throw new \Exception("update_partition_column_statistics_req failed: unknown result");
+  }
+
   public function get_table_column_statistics($db_name, $tbl_name, $col_name)
   {
     $this->send_get_table_column_statistics($db_name, $tbl_name, $col_name);
@@ -15560,14 +15828,14 @@ class ThriftHiveMetastore_get_databases_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size848 = 0;
-            $_etype851 = 0;
-            $xfer += $input->readListBegin($_etype851, $_size848);
-            for ($_i852 = 0; $_i852 < $_size848; ++$_i852)
+            $_size855 = 0;
+            $_etype858 = 0;
+            $xfer += $input->readListBegin($_etype858, $_size855);
+            for ($_i859 = 0; $_i859 < $_size855; ++$_i859)
             {
-              $elem853 = null;
-              $xfer += $input->readString($elem853);
-              $this->success []= $elem853;
+              $elem860 = null;
+              $xfer += $input->readString($elem860);
+              $this->success []= $elem860;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -15603,9 +15871,9 @@ class ThriftHiveMetastore_get_databases_result {
       {
         $output->writeListBegin(TType::STRING, count($this->success));
         {
-          foreach ($this->success as $iter854)
+          foreach ($this->success as $iter861)
           {
-            $xfer += $output->writeString($iter854);
+            $xfer += $output->writeString($iter861);
           }
         }
         $output->writeListEnd();
@@ -15736,14 +16004,14 @@ class ThriftHiveMetastore_get_all_databases_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size855 = 0;
-            $_etype858 = 0;
-            $xfer += $input->readListBegin($_etype858, $_size855);
-            for ($_i859 = 0; $_i859 < $_size855; ++$_i859)
+            $_size862 = 0;
+            $_etype865 = 0;
+            $xfer += $input->readListBegin($_etype865, $_size862);
+            for ($_i866 = 0; $_i866 < $_size862; ++$_i866)
             {
-              $elem860 = null;
-              $xfer += $input->readString($elem860);
-              $this->success []= $elem860;
+              $elem867 = null;
+              $xfer += $input->readString($elem867);
+              $this->success []= $elem867;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -15779,9 +16047,9 @@ class ThriftHiveMetastore_get_all_databases_result {
       {
         $output->writeListBegin(TType::STRING, count($this->success));
         {
-          foreach ($this->success as $iter861)
+          foreach ($this->success as $iter868)
           {
-            $xfer += $output->writeString($iter861);
+            $xfer += $output->writeString($iter868);
           }
         }
         $output->writeListEnd();
@@ -16782,18 +17050,18 @@ class ThriftHiveMetastore_get_type_all_result {
         case 0:
           if ($ftype == TType::MAP) {
             $this->success = array();
-            $_size862 = 0;
-            $_ktype863 = 0;
-            $_vtype864 = 0;
-            $xfer += $input->readMapBegin($_ktype863, $_vtype864, $_size862);
-            for ($_i866 = 0; $_i866 < $_size862; ++$_i866)
+            $_size869 = 0;
+            $_ktype870 = 0;
+            $_vtype871 = 0;
+            $xfer += $input->readMapBegin($_ktype870, $_vtype871, $_size869);
+            for ($_i873 = 0; $_i873 < $_size869; ++$_i873)
             {
-              $key867 = '';
-              $val868 = new \metastore\Type();
-              $xfer += $input->readString($key867);
-              $val868 = new \metastore\Type();
-              $xfer += $val868->read($input);
-              $this->success[$key867] = $val868;
+              $key874 = '';
+              $val875 = new \metastore\Type();
+              $xfer += $input->readString($key874);
+              $val875 = new \metastore\Type();
+              $xfer += $val875->read($input);
+              $this->success[$key874] = $val875;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -16829,10 +17097,10 @@ class ThriftHiveMetastore_get_type_all_result {
       {
         $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $kiter869 => $viter870)
+          foreach ($this->success as $kiter876 => $viter877)
           {
-            $xfer += $output->writeString($kiter869);
-            $xfer += $viter870->write($output);
+            $xfer += $output->writeString($kiter876);
+            $xfer += $viter877->write($output);
           }
         }
         $output->writeMapEnd();
@@ -17036,15 +17304,15 @@ class ThriftHiveMetastore_get_fields_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size871 = 0;
-            $_etype874 = 0;
-            $xfer += $input->readListBegin($_etype874, $_size871);
-            for ($_i875 = 0; $_i875 < $_size871; ++$_i875)
+            $_size878 = 0;
+            $_etype881 = 0;
+            $xfer += $input->readListBegin($_etype881, $_size878);
+            for ($_i882 = 0; $_i882 < $_size878; ++$_i882)
             {
-              $elem876 = null;
-              $elem876 = new \metastore\FieldSchema();
-              $xfer += $elem876->read($input);
-              $this->success []= $elem876;
+              $elem883 = null;
+              $elem883 = new \metastore\FieldSchema();
+              $xfer += $elem883->read($input);
+              $this->success []= $elem883;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -17096,9 +17364,9 @@ class ThriftHiveMetastore_get_fields_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter877)
+          foreach ($this->success as $iter884)
           {
-            $xfer += $iter877->write($output);
+            $xfer += $iter884->write($output);
           }
         }
         $output->writeListEnd();
@@ -17340,15 +17608,15 @@ class ThriftHiveMetastore_get_fields_with_environment_context_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size878 = 0;
-            $_etype881 = 0;
-            $xfer += $input->readListBegin($_etype881, $_size878);
-            for ($_i882 = 0; $_i882 < $_size878; ++$_i882)
+            $_size885 = 0;
+            $_etype888 = 0;
+            $xfer += $input->readListBegin($_etype888, $_size885);
+            for ($_i889 = 0; $_i889 < $_size885; ++$_i889)
             {
-              $elem883 = null;
-              $elem883 = new \metastore\FieldSchema();
-              $xfer += $elem883->read($input);
-              $this->success []= $elem883;
+              $elem890 = null;
+              $elem890 = new \metastore\FieldSchema();
+              $xfer += $elem890->read($input);
+              $this->success []= $elem890;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -17400,9 +17668,9 @@ class ThriftHiveMetastore_get_fields_with_environment_context_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter884)
+          foreach ($this->success as $iter891)
           {
-            $xfer += $iter884->write($output);
+            $xfer += $iter891->write($output);
           }
         }
         $output->writeListEnd();
@@ -17616,15 +17884,15 @@ class ThriftHiveMetastore_get_schema_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size885 = 0;
-            $_etype888 = 0;
-            $xfer += $input->readListBegin($_etype888, $_size885);
-            for ($_i889 = 0; $_i889 < $_size885; ++$_i889)
+            $_size892 = 0;
+            $_etype895 = 0;
+            $xfer += $input->readListBegin($_etype895, $_size892);
+            for ($_i896 = 0; $_i896 < $_size892; ++$_i896)
             {
-              $elem890 = null;
-              $elem890 = new \metastore\FieldSchema();
-              $xfer += $elem890->read($input);
-              $this->success []= $elem890;
+              $elem897 = null;
+              $elem897 = new \metastore\FieldSchema();
+              $xfer += $elem897->read($input);
+              $this->success []= $elem897;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -17676,9 +17944,9 @@ class ThriftHiveMetastore_get_schema_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter891)
+          foreach ($this->success as $iter898)
           {
-            $xfer += $iter891->write($output);
+            $xfer += $iter898->write($output);
           }
         }
         $output->writeListEnd();
@@ -17920,15 +18188,15 @@ class ThriftHiveMetastore_get_schema_with_environment_context_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size892 = 0;
-            $_etype895 = 0;
-            $xfer += $input->readListBegin($_etype895, $_size892);
-            for ($_i896 = 0; $_i896 < $_size892; ++$_i896)
+            $_size899 = 0;
+            $_etype902 = 0;
+            $xfer += $input->readListBegin($_etype902, $_size899);
+            for ($_i903 = 0; $_i903 < $_size899; ++$_i903)
             {
-              $elem897 = null;
-              $elem897 = new \metastore\FieldSchema();
-              $xfer += $elem897->read($input);
-              $this->success []= $elem897;
+              $elem904 = null;
+              $elem904 = new \metastore\FieldSchema();
+              $xfer += $elem904->read($input);
+              $this->success []= $elem904;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -17980,9 +18248,9 @@ class ThriftHiveMetastore_get_schema_with_environment_context_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter898)
+          foreach ($this->success as $iter905)
           {
-            $xfer += $iter898->write($output);
+            $xfer += $iter905->write($output);
           }
         }
         $output->writeListEnd();
@@ -18654,15 +18922,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
         case 2:
           if ($ftype == TType::LST) {
             $this->primaryKeys = array();
-            $_size899 = 0;
-            $_etype902 = 0;
-            $xfer += $input->readListBegin($_etype902, $_size899);
-            for ($_i903 = 0; $_i903 < $_size899; ++$_i903)
+            $_size906 = 0;
+            $_etype909 = 0;
+            $xfer += $input->readListBegin($_etype909, $_size906);
+            for ($_i910 = 0; $_i910 < $_size906; ++$_i910)
             {
-              $elem904 = null;
-              $elem904 = new \metastore\SQLPrimaryKey();
-              $xfer += $elem904->read($input);
-              $this->primaryKeys []= $elem904;
+              $elem911 = null;
+              $elem911 = new \metastore\SQLPrimaryKey();
+              $xfer += $elem911->read($input);
+              $this->primaryKeys []= $elem911;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -18672,15 +18940,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
         case 3:
           if ($ftype == TType::LST) {
             $this->foreignKeys = array();
-            $_size905 = 0;
-            $_etype908 = 0;
-            $xfer += $input->readListBegin($_etype908, $_size905);
-            for ($_i909 = 0; $_i909 < $_size905; ++$_i909)
+            $_size912 = 0;
+            $_etype915 = 0;
+            $xfer += $input->readListBegin($_etype915, $_size912);
+            for ($_i916 = 0; $_i916 < $_size912; ++$_i916)
             {
-              $elem910 = null;
-              $elem910 = new \metastore\SQLForeignKey();
-              $xfer += $elem910->read($input);
-              $this->foreignKeys []= $elem910;
+              $elem917 = null;
+              $elem917 = new \metastore\SQLForeignKey();
+              $xfer += $elem917->read($input);
+              $this->foreignKeys []= $elem917;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -18690,15 +18958,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
         case 4:
           if ($ftype == TType::LST) {
             $this->uniqueConstraints = array();
-            $_size911 = 0;
-            $_etype914 = 0;
-            $xfer += $input->readListBegin($_etype914, $_size911);
-            for ($_i915 = 0; $_i915 < $_size911; ++$_i915)
+            $_size918 = 0;
+            $_etype921 = 0;
+            $xfer += $input->readListBegin($_etype921, $_size918);
+            for ($_i922 = 0; $_i922 < $_size918; ++$_i922)
             {
-              $elem916 = null;
-              $elem916 = new \metastore\SQLUniqueConstraint();
-              $xfer += $elem916->read($input);
-              $this->uniqueConstraints []= $elem916;
+              $elem923 = null;
+              $elem923 = new \metastore\SQLUniqueConstraint();
+              $xfer += $elem923->read($input);
+              $this->uniqueConstraints []= $elem923;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -18708,15 +18976,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
         case 5:
           if ($ftype == TType::LST) {
             $this->notNullConstraints = array();
-            $_size917 = 0;
-            $_etype920 = 0;
-            $xfer += $input->readListBegin($_etype920, $_size917);
-            for ($_i921 = 0; $_i921 < $_size917; ++$_i921)
+            $_size924 = 0;
+            $_etype927 = 0;
+            $xfer += $input->readListBegin($_etype927, $_size924);
+            for ($_i928 = 0; $_i928 < $_size924; ++$_i928)
             {
-              $elem922 = null;
-              $elem922 = new \metastore\SQLNotNullConstraint();
-              $xfer += $elem922->read($input);
-              $this->notNullConstraints []= $elem922;
+              $elem929 = null;
+              $elem929 = new \metastore\SQLNotNullConstraint();
+              $xfer += $elem929->read($input);
+              $this->notNullConstraints []= $elem929;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -18726,15 +18994,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
         case 6:
           if ($ftype == TType::LST) {
             $this->defaultConstraints = array();
-            $_size923 = 0;
-            $_etype926 = 0;
-            $xfer += $input->readListBegin($_etype926, $_size923);
-            for ($_i927 = 0; $_i927 < $_size923; ++$_i927)
+            $_size930 = 0;
+            $_etype933 = 0;
+            $xfer += $input->readListBegin($_etype933, $_size930);
+            for ($_i934 = 0; $_i934 < $_size930; ++$_i934)
             {
-              $elem928 = null;
-              $elem928 = new \metastore\SQLDefaultConstraint();
-              $xfer += $elem928->read($input);
-              $this->defaultConstraints []= $elem928;
+              $elem935 = null;
+              $elem935 = new \metastore\SQLDefaultConstraint();
+              $xfer += $elem935->read($input);
+              $this->defaultConstraints []= $elem935;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -18744,15 +19012,15 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
         case 7:
           if ($ftype == TType::LST) {
             $this->checkConstraints = array();
-            $_size929 = 0;
-            $_etype932 = 0;
-            $xfer += $input->readListBegin($_etype932, $_size929);
-            for ($_i933 = 0; $_i933 < $_size929; ++$_i933)
+            $_size936 = 0;
+            $_etype939 = 0;
+            $xfer += $input->readListBegin($_etype939, $_size936);
+            for ($_i940 = 0; $_i940 < $_size936; ++$_i940)
             {
-              $elem934 = null;
-              $elem934 = new \metastore\SQLCheckConstraint();
-              $xfer += $elem934->read($input);
-              $this->checkConstraints []= $elem934;
+              $elem941 = null;
+              $elem941 = new \metastore\SQLCheckConstraint();
+              $xfer += $elem941->read($input);
+              $this->checkConstraints []= $elem941;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -18788,9 +19056,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
       {
         $output->writeListBegin(TType::STRUCT, count($this->primaryKeys));
         {
-          foreach ($this->primaryKeys as $iter935)
+          foreach ($this->primaryKeys as $iter942)
           {
-            $xfer += $iter935->write($output);
+            $xfer += $iter942->write($output);
           }
         }
         $output->writeListEnd();
@@ -18805,9 +19073,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
       {
         $output->writeListBegin(TType::STRUCT, count($this->foreignKeys));
         {
-          foreach ($this->foreignKeys as $iter936)
+          foreach ($this->foreignKeys as $iter943)
           {
-            $xfer += $iter936->write($output);
+            $xfer += $iter943->write($output);
           }
         }
         $output->writeListEnd();
@@ -18822,9 +19090,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
       {
         $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraints));
         {
-          foreach ($this->uniqueConstraints as $iter937)
+          foreach ($this->uniqueConstraints as $iter944)
           {
-            $xfer += $iter937->write($output);
+            $xfer += $iter944->write($output);
           }
         }
         $output->writeListEnd();
@@ -18839,9 +19107,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
       {
         $output->writeListBegin(TType::STRUCT, count($this->notNullConstraints));
         {
-          foreach ($this->notNullConstraints as $iter938)
+          foreach ($this->notNullConstraints as $iter945)
           {
-            $xfer += $iter938->write($output);
+            $xfer += $iter945->write($output);
           }
         }
         $output->writeListEnd();
@@ -18856,9 +19124,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
       {
         $output->writeListBegin(TType::STRUCT, count($this->defaultConstraints));
         {
-          foreach ($this->defaultConstraints as $iter939)
+          foreach ($this->defaultConstraints as $iter946)
           {
-            $xfer += $iter939->write($output);
+            $xfer += $iter946->write($output);
           }
         }
         $output->writeListEnd();
@@ -18873,9 +19141,9 @@ class ThriftHiveMetastore_create_table_with_constraints_args {
       {
         $output->writeListBegin(TType::STRUCT, count($this->checkConstraints));
         {
-          foreach ($this->checkConstraints as $iter940)
+          foreach ($this->checkConstraints as $iter947)
           {
-            $xfer += $iter940->write($output);
+            $xfer += $iter947->write($output);
           }
         }
         $output->writeListEnd();
@@ -20875,14 +21143,14 @@ class ThriftHiveMetastore_truncate_table_args {
         case 3:
           if ($ftype == TType::LST) {
             $this->partNames = array();
-            $_size941 = 0;
-            $_etype944 = 0;
-            $xfer += $input->readListBegin($_etype944, $_size941);
-            for ($_i945 = 0; $_i945 < $_size941; ++$_i945)
+            $_size948 = 0;
+            $_etype951 = 0;
+            $xfer += $input->readListBegin($_etype951, $_size948);
+            for ($_i952 = 0; $_i952 < $_size948; ++$_i952)
             {
-              $elem946 = null;
-              $xfer += $input->readString($elem946);
-              $this->partNames []= $elem946;
+              $elem953 = null;
+              $xfer += $input->readString($elem953);
+              $this->partNames []= $elem953;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -20920,9 +21188,9 @@ class ThriftHiveMetastore_truncate_table_args {
       {
         $output->writeListBegin(TType::STRING, count($this->partNames));
         {
-          foreach ($this->partNames as $iter947)
+          foreach ($this->partNames as $iter954)
           {
-            $xfer += $output->writeString($iter947);
+            $xfer += $output->writeString($iter954);
           }
         }
         $output->writeListEnd();
@@ -21013,6 +21281,191 @@ class ThriftHiveMetastore_truncate_table_result {
 
 }
 
+class ThriftHiveMetastore_truncate_table_req_args {
+  static $_TSPEC;
+
+  /**
+   * @var \metastore\TruncateTableRequest
+   */
+  public $req = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'req',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\TruncateTableRequest',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['req'])) {
+        $this->req = $vals['req'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_truncate_table_req_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->req = new \metastore\TruncateTableRequest();
+            $xfer += $this->req->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_truncate_table_req_args');
+    if ($this->req !== null) {
+      if (!is_object($this->req)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1);
+      $xfer += $this->req->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_truncate_table_req_result {
+  static $_TSPEC;
+
+  /**
+   * @var \metastore\TruncateTableResponse
+   */
+  public $success = null;
+  /**
+   * @var \metastore\MetaException
+   */
+  public $o1 = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\TruncateTableResponse',
+          ),
+        1 => array(
+          'var' => 'o1',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\MetaException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['o1'])) {
+        $this->o1 = $vals['o1'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_truncate_table_req_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \metastore\TruncateTableResponse();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->o1 = new \metastore\MetaException();
+            $xfer += $this->o1->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_truncate_table_req_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o1 !== null) {
+      $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+      $xfer += $this->o1->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
 class ThriftHiveMetastore_get_tables_args {
   static $_TSPEC;
 
@@ -21173,14 +21626,14 @@ class ThriftHiveMetastore_get_tables_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size948 = 0;
-            $_etype951 = 0;
-            $xfer += $input->readListBegin($_etype951, $_size948);
-            for ($_i952 = 0; $_i952 < $_size948; ++$_i952)
+            $_size955 = 0;
+            $_etype958 = 0;
+            $xfer += $input->readListBegin($_etype958, $_size955);
+            for ($_i959 = 0; $_i959 < $_size955; ++$_i959)
             {
-              $elem953 = null;
-              $xfer += $input->readString($elem953);
-              $this->success []= $elem953;
+              $elem960 = null;
+              $xfer += $input->readString($elem960);
+              $this->success []= $elem960;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -21216,9 +21669,9 @@ class ThriftHiveMetastore_get_tables_result {
       {
         $output->writeListBegin(TType::STRING, count($this->success));
         {
-          foreach ($this->success as $iter954)
+          foreach ($this->success as $iter961)
           {
-            $xfer += $output->writeString($iter954);
+            $xfer += $output->writeString($iter961);
           }
         }
         $output->writeListEnd();
@@ -21420,14 +21873,14 @@ class ThriftHiveMetastore_get_tables_by_type_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size955 = 0;
-            $_etype958 = 0;
-            $xfer += $input->readListBegin($_etype958, $_size955);
-            for ($_i959 = 0; $_i959 < $_size955; ++$_i959)
+            $_size962 = 0;
+            $_etype965 = 0;
+            $xfer += $input->readListBegin($_etype965, $_size962);
+            for ($_i966 = 0; $_i966 < $_size962; ++$_i966)
             {
-              $elem960 = null;
-              $xfer += $input->readString($elem960);
-              $this->success []= $elem960;
+              $elem967 = null;
+              $xfer += $input->readString($elem967);
+              $this->success []= $elem967;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -21463,9 +21916,9 @@ class ThriftHiveMetastore_get_tables_by_type_result {
       {
         $output->writeListBegin(TType::STRING, count($this->success));
         {
-          foreach ($this->success as $iter961)
+          foreach ($this->success as $iter968)
           {
-            $xfer += $output->writeString($iter961);
+            $xfer += $output->writeString($iter968);
           }
         }
         $output->writeListEnd();
@@ -21621,14 +22074,14 @@ class ThriftHiveMetastore_get_materialized_views_for_rewriting_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size962 = 0;
-            $_etype965 = 0;
-            $xfer += $input->readListBegin($_etype965, $_size962);
-            for ($_i966 = 0; $_i966 < $_size962; ++$_i966)
+            $_size969 = 0;
+            $_etype972 = 0;
+            $xfer += $input->readListBegin($_etype972, $_size969);
+            for ($_i973 = 0; $_i973 < $_size969; ++$_i973)
             {
-              $elem967 = null;
-              $xfer += $input->readString($elem967);
-              $this->success []= $elem967;
+              $elem974 = null;
+              $xfer += $input->readString($elem974);
+              $this->success []= $elem974;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -21664,9 +22117,9 @@ class ThriftHiveMetastore_get_materialized_views_for_rewriting_result {
       {
         $output->writeListBegin(TType::STRING, count($this->success));
         {
-          foreach ($this->success as $iter968)
+          foreach ($this->success as $iter975)
           {
-            $xfer += $output->writeString($iter968);
+            $xfer += $output->writeString($iter975);
           }
         }
         $output->writeListEnd();
@@ -21771,14 +22224,14 @@ class ThriftHiveMetastore_get_table_meta_args {
         case 3:
           if ($ftype == TType::LST) {
             $this->tbl_types = array();
-            $_size969 = 0;
-            $_etype972 = 0;
-            $xfer += $input->readListBegin($_etype972, $_size969);
-            for ($_i973 = 0; $_i973 < $_size969; ++$_i973)
+            $_size976 = 0;
+            $_etype979 = 0;
+            $xfer += $input->readListBegin($_etype979, $_size976);
+            for ($_i980 = 0; $_i980 < $_size976; ++$_i980)
             {
-              $elem974 = null;
-              $xfer += $input->readString($elem974);
-              $this->tbl_types []= $elem974;
+              $elem981 = null;
+              $xfer += $input->readString($elem981);
+              $this->tbl_types []= $elem981;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -21816,9 +22269,9 @@ class ThriftHiveMetastore_get_table_meta_args {
       {
         $output->writeListBegin(TType::STRING, count($this->tbl_types));
         {
-          foreach ($this->tbl_types as $iter975)
+          foreach ($this->tbl_types as $iter982)
           {
-            $xfer += $output->writeString($iter975);
+            $xfer += $output->writeString($iter982);
           }
         }
         $output->writeListEnd();
@@ -21895,15 +22348,15 @@ class ThriftHiveMetastore_get_table_meta_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size976 = 0;
-            $_etype979 = 0;
-            $xfer += $input->readListBegin($_etype979, $_size976);
-            for ($_i980 = 0; $_i980 < $_size976; ++$_i980)
+            $_size983 = 0;
+            $_etype986 = 0;
+            $xfer += $input->readListBegin($_etype986, $_size983);
+            for ($_i987 = 0; $_i987 < $_size983; ++$_i987)
             {
-              $elem981 = null;
-              $elem981 = new \metastore\TableMeta();
-              $xfer += $elem981->read($input);
-              $this->success []= $elem981;
+              $elem988 = null;
+              $elem988 = new \metastore\TableMeta();
+              $xfer += $elem988->read($input);
+              $this->success []= $elem988;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -21939,9 +22392,9 @@ class ThriftHiveMetastore_get_table_meta_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter982)
+          foreach ($this->success as $iter989)
           {
-            $xfer += $iter982->write($output);
+            $xfer += $iter989->write($output);
           }
         }
         $output->writeListEnd();
@@ -22097,14 +22550,14 @@ class ThriftHiveMetastore_get_all_tables_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size983 = 0;
-            $_etype986 = 0;
-            $xfer += $input->readListBegin($_etype986, $_size983);
-            for ($_i987 = 0; $_i987 < $_size983; ++$_i987)
+            $_size990 = 0;
+            $_etype993 = 0;
+            $xfer += $input->readListBegin($_etype993, $_size990);
+            for ($_i994 = 0; $_i994 < $_size990; ++$_i994)
             {
-              $elem988 = null;
-              $xfer += $input->readString($elem988);
-              $this->success []= $elem988;
+              $elem995 = null;
+              $xfer += $input->readString($elem995);
+              $this->success []= $elem995;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -22140,9 +22593,9 @@ class ThriftHiveMetastore_get_all_tables_result {
       {
         $output->writeListBegin(TType::STRING, count($this->success));
         {
-          foreach ($this->success as $iter989)
+          foreach ($this->success as $iter996)
           {
-            $xfer += $output->writeString($iter989);
+            $xfer += $output->writeString($iter996);
           }
         }
         $output->writeListEnd();
@@ -22457,14 +22910,14 @@ class ThriftHiveMetastore_get_table_objects_by_name_args {
         case 2:
           if ($ftype == TType::LST) {
             $this->tbl_names = array();
-            $_size990 = 0;
-            $_etype993 = 0;
-            $xfer += $input->readListBegin($_etype993, $_size990);
-            for ($_i994 = 0; $_i994 < $_size990; ++$_i994)
+            $_size997 = 0;
+            $_etype1000 = 0;
+            $xfer += $input->readListBegin($_etype1000, $_size997);
+            for ($_i1001 = 0; $_i1001 < $_size997; ++$_i1001)
             {
-              $elem995 = null;
-              $xfer += $input->readString($elem995);
-              $this->tbl_names []= $elem995;
+              $elem1002 = null;
+              $xfer += $input->readString($elem1002);
+              $this->tbl_names []= $elem1002;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -22497,9 +22950,9 @@ class ThriftHiveMetastore_get_table_objects_by_name_args {
       {
         $output->writeListBegin(TType::STRING, count($this->tbl_names));
         {
-          foreach ($this->tbl_names as $iter996)
+          foreach ($this->tbl_names as $iter1003)
           {
-            $xfer += $output->writeString($iter996);
+            $xfer += $output->writeString($iter1003);
           }
         }
         $output->writeListEnd();
@@ -22564,15 +23017,15 @@ class ThriftHiveMetastore_get_table_objects_by_name_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size997 = 0;
-            $_etype1000 = 0;
-            $xfer += $input->readListBegin($_etype1000, $_size997);
-            for ($_i1001 = 0; $_i1001 < $_size997; ++$_i1001)
+            $_size1004 = 0;
+            $_etype1007 = 0;
+            $xfer += $input->readListBegin($_etype1007, $_size1004);
+            for ($_i1008 = 0; $_i1008 < $_size1004; ++$_i1008)
             {
-              $elem1002 = null;
-              $elem1002 = new \metastore\Table();
-              $xfer += $elem1002->read($input);
-              $this->success []= $elem1002;
+              $elem1009 = null;
+              $elem1009 = new \metastore\Table();
+              $xfer += $elem1009->read($input);
+              $this->success []= $elem1009;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -22600,9 +23053,9 @@ class ThriftHiveMetastore_get_table_objects_by_name_result {
       {
         $output->writeListBegin(TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $iter1003)
+          foreach ($this->success as $iter1010)
           {
-            $xfer += $iter1003->write($output);
+            $xfer += $iter1010->write($output);
           }
         }
         $output->writeListEnd();
@@ -23129,14 +23582,14 @@ class ThriftHiveMetastore_get_materialization_invalidation_info_args {
         case 2:
           if ($ftype == TType::LST) {
             $this->tbl_names = array();
-            $_size1004 = 0;
-            $_etype1007 = 0;
-            $xfer += $input->readListBegin($_etype1007, $_size1004);
-            for ($_i1008 = 0; $_i1008 < $_size1004; ++$_i1008)
+            $_size1011 = 0;
+            $_etype1014 = 0;
+            $xfer += $input->readListBegin($_etype1014, $_size1011);
+            for ($_i1015 = 0; $_i1015 < $_size1011; ++$_i1015)
             {
-              $elem1009 = null;
-              $xfer += $input->readString($elem1009);
-              $this->tbl_names []= $elem1009;
+              $elem1016 = null;
+              $xfer += $input->readString($elem1016);
+              $this->tbl_names []= $elem1016;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -23169,9 +23622,9 @@ class ThriftHiveMetastore_get_materialization_invalidation_info_args {
       {
         $output->writeListBegin(TType::STRING, count($this->tbl_names));
         {
-          foreach ($this->tbl_names as $iter1010)
+          foreach ($this->tbl_names as $iter1017)
           {
-            $xfer += $output->writeString($iter1010);
+            $xfer += $output->writeString($iter1017);
           }
         }
         $output->writeListEnd();
@@ -23276,18 +23729,18 @@ class ThriftHiveMetastore_get_materialization_invalidation_info_result {
         case 0:
           if ($ftype == TType::MAP) {
             $this->success = array();
-            $_size1011 = 0;
-            $_ktype1012 = 0;
-            $_vtype1013 = 0;
-            $xfer += $input->readMapBegin($_ktype1012, $_vtype1013, $_size1011);
-            for ($_i1015 = 0; $_i1015 < $_size1011; ++$_i1015)
+            $_size1018 = 0;
+            $_ktype1019 = 0;
+            $_vtype1020 = 0;
+            $xfer += $input->readMapBegin($_ktype1019, $_vtype1020, $_size1018);
+            for ($_i1022 = 0; $_i1022 < $_size1018; ++$_i1022)
             {
-              $key1016 = '';
-              $val1017 = new \metastore\Materialization();
-              $xfer += $input->readString($key1016);
-              $val1017 = new \metastore\Materialization();
-              $xfer += $val1017->read($input);
-              $this->success[$key1016] = $val1017;
+              $key1023 = '';
+              $val1024 = new \metastore\Materialization();
+              $xfer += $input->readString($key1023);
+              $val1024 = new \metastore\Materialization();
+              $xfer += $val1024->read($input);
+              $this->success[$key1023] = $val1024;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -23339,10 +23792,10 @@ class ThriftHiveMetastore_get_materialization_invalidation_info_result {
       {
         $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
         {
-          foreach ($this->success as $kiter1018 => $viter1019)
+          foreach ($this->success as $kiter1025 => $viter1026)
           {
-            $xfer += $output->writeString($kiter1018);
-            $xfer += $viter1019->write($output);
+            $xfer += $output->writeString($kiter1025);
+            $xfer += $viter1026->write($output);
           }
         }
         $output->writeMapEnd();
@@ -23854,14 +24307,14 @@ class ThriftHiveMetastore_get_table_names_by_filter_result {
         case 0:
           if ($ftype == TType::LST) {
             $this->success = array();
-            $_size1020 = 0;
-            $_etype1023 = 0;
-            $xfer += $input->readListBegin($_etype1023, $_size1020);
-            for ($_i1024 = 0; $_i1024 < $_size1020; ++$_i1024)
+            $_size1027 = 0;
+            $_etype1030 = 0;
+            $xfer += $input->readListBegin($_etype1030, $_size1027);
+            for ($_i1031 = 0; $_i1031 < $_size1027; ++$_i1031)
             {
-              $elem1025 = null;
-              $xfer += $input->readString($elem1025);
-              $this->success []= $elem1025;
+              $elem1032 = null;
+              $xfer += $input->readString($elem1032);
+              $this->success []= $elem1032;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -23913,9 +24366,9 @@ class ThriftHiveMetastore_get_table_names_by_filter_result {
       {
         $output->writeListBegin(TType::STRING, count($this->success));
         {
-          foreach ($this->success as $iter1026)
+          foreach ($this->success as $iter1033)
           {
-            $xfer += $output->writeString($iter1026);
+            $xfer += $output->writeString($iter1033);
           }
         }
         $output->writeListEnd();
@@ -24679,33 +25132,33 @@ class ThriftHiveMetastore_alter_table_with_cascade_result {
 
 }
 
-class ThriftHiveMetastore_add_partition_args {
+class ThriftHiveMetastore_alter_table_req_args {
   static $_TSPEC;
 
   /**
-   * @var \metastore\Partition
+   * @var \metastore\AlterTableRequest
    */
-  public $new_part = null;
+  public $req = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'new_part',
+          'var' => 'req',
           'type' => TType::STRUCT,
-          'class' => '\metastore\Partition',
+          'class' => '\metastore\AlterTableRequest',
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['new_part'])) {
-        $this->new_part = $vals['new_part'];
+      if (isset($vals['req'])) {
+        $this->req = $vals['req'];
       }
     }
   }
 
   public function getName() {
-    return 'ThriftHiveMetastore_add_partition_args';
+    return 'ThriftHiveMetastore_alter_table_req_args';
   }
 
   public function read($input)
@@ -24725,8 +25178,8 @@ class ThriftHiveMetastore_add_partition_args {
       {
         case 1:
           if ($ftype == TType::STRUCT) {
-            $this->new_part = new \metastore\Partition();
-            $xfer += $this->new_part->read($input);
+            $this->req = new \metastore\AlterTableRequest();
+            $xfer += $this->req->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -24743,13 +25196,13 @@ class ThriftHiveMetastore_add_partition_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args');
-    if ($this->new_part !== null) {
-      if (!is_object($this->new_part)) {
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_req_args');
+    if ($this->req !== null) {
+      if (!is_object($this->req)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1);
-      $xfer += $this->new_part->write($output);
+      $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1);
+      $xfer += $this->req->write($output);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -24759,25 +25212,21 @@ class ThriftHiveMetastore_add_partition_args {
 
 }
 
-class ThriftHiveMetastore_add_partition_result {
+class ThriftHiveMetastore_alter_table_req_result {
   static $_TSPEC;
 
   /**
-   * @var \metastore\Partition
+   * @var \metastore\AlterTableResponse
    */
   public $success = null;
   /**
-   * @var \metastore\InvalidObjectException
+   * @var \metastore\InvalidOperationException
    */
   public $o1 = null;
   /**
-   * @var \metastore\AlreadyExistsException
-   */
-  public $o2 = null;
-  /**
    * @var \metastore\MetaException
    */
-  public $o3 = null;
+  public $o2 = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -24785,21 +25234,16 @@ class ThriftHiveMetastore_add_partition_result {
         0 => array(
           'var' => 'success',
           'type' => TType::STRUCT,
-          'class' => '\metastore\Partition',
+          'class' => '\metastore\AlterTableResponse',
           ),
         1 => array(
           'var' => 'o1',
           'type' => TType::STRUCT,
-          'class' => '\metastore\InvalidObjectException',
+          'class' => '\metastore\InvalidOperationException',
           ),
         2 => array(
           'var' => 'o2',
           'type' => TType::STRUCT,
-          'class' => '\metastore\AlreadyExistsException',
-          ),
-        3 => array(
-          'var' => 'o3',
-          'type' => TType::STRUCT,
           'class' => '\metastore\MetaException',
           ),
         );
@@ -24814,14 +25258,11 @@ class ThriftHiveMetastore_add_partition_result {
       if (isset($vals['o2'])) {
         $this->o2 = $vals['o2'];
       }
-      if (isset($vals['o3'])) {
-        $this->o3 = $vals['o3'];
-      }
     }
   }
 
   public function getName() {
-    return 'ThriftHiveMetastore_add_partition_result';
+    return 'ThriftHiveMetastore_alter_table_req_result';
   }
 
   public function read($input)
@@ -24841,7 +25282,7 @@ class ThriftHiveMetastore_add_partition_result {
       {
         case 0:
           if ($ftype == TType::STRUCT) {
-            $this->success = new \metastore\Partition();
+            $this->success = new \metastore\AlterTableResponse();
             $xfer += $this->success->read($input);
           } else {
             $xfer += $input->skip($ftype);
@@ -24849,7 +25290,7 @@ class ThriftHiveMetastore_add_partition_result {
           break;
         case 1:
           if ($ftype == TType::STRUCT) {
-            $this->o1 = new \metastore\InvalidObjectException();
+            $this->o1 = new \metastore\InvalidOperationException();
             $xfer += $this->o1->read($input);
           } else {
             $xfer += $input->skip($ftype);
@@ -24857,20 +25298,12 @@ class ThriftHiveMetastore_add_partition_result {
           break;
         case 2:
           if ($ftype == TType::STRUCT) {
-            $this->o2 = new \metastore\AlreadyExistsException();
+            $this->o2 = new \metastore\MetaException();
             $xfer += $this->o2->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->o3 = new \metastore\MetaException();
-            $xfer += $this->o3->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -24883,7 +25316,7 @@ class ThriftHiveMetastore_add_partition_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result');
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_req_result');
     if ($this->success !== null) {
       if (!is_object($this->success)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -24902,11 +25335,6 @@ class ThriftHiveMetastore_add_partition_result {
       $xfer += $this->o2->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->o3 !== null) {
-      $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
-      $xfer += $this->o3->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -24914,17 +25342,13 @@ class ThriftHiveMetastore_add_partition_result {
 
 }
 
-class ThriftHiveMetastore_add_partition_with_environment_context_args {
+class ThriftHiveMetastore_add_partition_args {
   static $_TSPEC;
 
   /**
    * @var \metastore\Partition
    */
   public $new_part = null;
-  /**
-   * @var \metastore\EnvironmentContext
-   */
-  public $environment_context = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -24934,25 +25358,17 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args {
           'type' => TType::STRUCT,
           'class' => '\metastore\Partition',
           ),
-        2 => array(
-          'var' => 'environment_context',
-          'type' => TType::STRUCT,
-          'class' => '\metastore\EnvironmentContext',
-          ),
         );
     }
     if (is_array($vals)) {
       if (isset($vals['new_part'])) {
         $this->new_part = $vals['new_part'];
       }
-      if (isset($vals['environment_context'])) {
-        $this->environment_context = $vals['environment_context'];
-      }
     }
   }
 
   public function getName() {
-    return 'ThriftHiveMetastore_add_partition_with_environment_context_args';
+    return 'ThriftHiveMetastore_add_partition_args';
   }
 
   public function read($input)
@@ -24978,14 +25394,6 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->environment_context = new \metastore\EnvironmentContext();
-            $xfer += $this->environment_context->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -24998,7 +25406,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_args');
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args');
     if ($this->new_part !== null) {
       if (!is_object($this->new_part)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -25007,14 +25415,6 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args {
       $xfer += $this->new_part->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->environment_context !== null) {
-      if (!is_object($this->environment_context)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2);
-      $xfer += $this->environment_context->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -25022,7 +25422,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args {
 
 }
 
-class ThriftHiveMetastore_add_partition_with_environment_context_result {
+class ThriftHiveMetastore_add_partition_result {
   static $_TSPEC;
 
   /**
@@ -25084,7 +25484,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result {
   }
 
   public function getName() {
-    return 'ThriftHiveMetastore_add_partition_with_environment_context_result';
+    return 'ThriftHiveMetastore_add_partition_result';
   }
 
   public function read($input)
@@ -25146,7 +25546,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_result');
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result');
     if ($this->success !== null) {
       if (!is_object($this->success)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -25177,37 +25577,45 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result {
 
 }
 
-class ThriftHiveMetastore_add_partitions_args {
+class ThriftHiveMetastore_add_partition_with_environment_context_args {
   static $_TSPEC;
 
   /**
-   * @var \metastore\Partition[]
+   * @var \metastore\Partition
    */
-  public $new_parts = null;
+  public $new_part = null;
+  /**
+   * @var \metastore\EnvironmentContext
+   */
+  public $environment_context = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'new_parts',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\metastore\Partition',
-            ),
+          'var' => 'new_part',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\Partition',
+          ),
+        2 => array(
+          'var' => 'environment_context',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\EnvironmentContext',
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['new_parts'])) {
-        $this->new_parts = $vals['new_parts'];
+      if (isset($vals['new_part'])) {
+        $this->new_part = $vals['new_part'];
+      }
+      if (isset($vals['environment_context'])) {
+        $this->environment_context = $vals['environment_context'];
       }
     }
   }
 
   public function getName() {
-    return 'ThriftHiveMetastore_add_partitions_args';
+    return 'ThriftHiveMetastore_add_partition_with_environment_context_args';
   }
 
   public function read($input)
@@ -25226,19 +25634,17 @@ class ThriftHiveMetastore_add_partitions_args {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::LST) {
-            $this->new_parts = array();
-            $_size1027 = 0;
-            $_etype1030 = 0;
-            $xfer += $input->readListBegin($_etype1030, $_size1027);
-            for ($_i1031 = 0; $_i1031 < $_size1027; ++$_i1031)
-            {
-              $elem1032 = null;
-              $elem1032 = new \metastore\Partition();
-              $xfer += $elem1032->read($input);
-              $this->new_parts []= $elem1032;
-            }
-            $xfer += $input->readListEnd();
+          if ($ftype == TType::STRUCT) {
+            $this->new_part = new \metastore\Partition();
+            $xfer += $this->new_part->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->environment_context = new \metastore\EnvironmentContext();
+            $xfer += $this->environment_context->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -25255,22 +25661,21 @@ class ThriftHiveMetastore_add_partitions_args {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_args');
-    if ($this->new_parts !== null) {
-      if (!is_array($this->new_parts)) {
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_args');
+    if ($this->new_part !== null) {
+      if (!is_object($this->new_part)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('new_parts', TType::LST, 1);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->new_parts));
-        {
-          foreach ($this->new_parts as $iter1033)
-          {
-            $xfer += $iter1033->write($output);
-          }
-        }
-        $output->writeListEnd();
+      $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1);
+      $xfer += $this->new_part->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->environment_context !== null) {
+      if (!is_object($this->environment_context)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
+      $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2);
+      $xfer += $this->environment_context->write($output);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -25280,11 +25685,11 @@ class ThriftHiveMetastore_add_partitions_args {
 
 }
 
-class ThriftHiveMetastore_add_partitions_result {
+class ThriftHiveMetastore_add_partition_with_environment_context_result {
   static $_TSPEC;
 
   /**
-   * @var int
+   * @var \metastore\Partition
    */
   public $success = null;
   /**
@@ -25305,7 +25710,265 @@ class ThriftHiveMetastore_add_partitions_result {
       self::$_TSPEC = array(
         0 => array(
           'var' => 'success',
-          'type' => TType::I32,
+          'type' => TType::STRUCT,
+          'class' => '\metastore\Partition',
+          ),
+        1 => array(
+          'var' => 'o1',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\InvalidObjectException',
+          ),
+        2 => array(
+          'var' => 'o2',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\AlreadyExistsException',
+          ),
+        3 => array(
+          'var' => 'o3',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\MetaException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['o1'])) {
+        $this->o1 = $vals['o1'];
+      }
+      if (isset($vals['o2'])) {
+        $this->o2 = $vals['o2'];
+      }
+      if (isset($vals['o3'])) {
+        $this->o3 = $vals['o3'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_add_partition_with_environment_context_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new \metastore\Partition();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->o1 = new \metastore\InvalidObjectException();
+            $xfer += $this->o1->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->o2 = new \metastore\AlreadyExistsException();
+            $xfer += $this->o2->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->o3 = new \metastore\MetaException();
+            $xfer += $this->o3->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o1 !== null) {
+      $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+      $xfer += $this->o1->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o2 !== null) {
+      $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+      $xfer += $this->o2->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o3 !== null) {
+      $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+      $xfer += $this->o3->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_add_partitions_args {
+  static $_TSPEC;
+
+  /**
+   * @var \metastore\Partition[]
+   */
+  public $new_parts = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'new_parts',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\metastore\Partition',
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['new_parts'])) {
+        $this->new_parts = $vals['new_parts'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_add_partitions_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::LST) {
+            $this->new_parts = array();
+            $_size1034 = 0;
+            $_etype1037 = 0;
+            $xfer += $input->readListBegin($_etype1037, $_size1034);
+            for ($_i1038 = 0; $_i1038 < $_size1034; ++$_i1038)
+            {
+              $elem1039 = null;
+              $elem1039 = new \metastore\Partition();
+              $xfer += $elem1039->read($input);
+              $this->new_parts []= $elem1039;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_args');
+    if ($this->new_parts !== null) {
+      if (!is_array($this->new_parts)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('new_parts', TType::LST, 1);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->new_parts));
+        {
+          foreach ($this->new_parts as $iter1040)
+          {
+            $xfer += $iter1040->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_add_partitions_result {
+  static $_TSPEC;
+
+  /**
+   * @var int
+   */
+  public $success = null;
+  /**
+   * @var \metastore\InvalidObjectException
+   */
+  public $o1 = null;
+  /**
+   * @var \metastore\AlreadyExistsException
+   */
+  public $o2 = null;
+  /**
+   * @var \metastore\MetaException
+   */
+  public $o3 = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::I32,
           ),
         1 => array(
           'var' => 'o1',
@@ -25481,15 +26144,15 @@ class ThriftHiveMetastore_add_partitions_pspec_args {
         case 1:
           if ($ftype == TType::LST) {
             $this->new_parts = array();
-            $_size1034 = 0;
-            $_etype1037 = 0;
-            $xfer += $input->readListBegin($_etype1037, $_size1034);
-            for ($_i1038 = 0; $_i1038 < $_size1034; ++$_i1038)
+            $_size1041 = 0;
+            $_etype1044 = 0;
+            $xfer += $input->readListBegin($_etype1044, $_size1041);
+            for ($_i1045 = 0; $_i1045 < $_size1041; ++$_i1045)
             {
-              $elem1039 = null;
-              $elem1039 = new \metastore\PartitionSpec();
-              $xfer += $elem1039->read($input);
-              $this->new_parts []= $elem1039;
+              $elem1046 = null;
+              $elem1046 = new \metastore\PartitionSpec();
+              $xfer += $elem1046->read($input);
+              $this->new_parts []= $elem1046;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -25517,9 +26180,9 @@ class ThriftHiveMetastore_add_partitions_pspec_args {
       {
         $output->writeListBegin(TType::STRUCT, count($this->new_parts));
         {
-          foreach ($this->new_parts as $iter1040)
+          foreach ($this->new_parts as $iter1047)
           {
-            $xfer += $iter1040->write($output);
+            $xfer += $iter1047->write($output);
           }
         }
         $output->writeListEnd();
@@ -25769,14 +26432,14 @@ class ThriftHiveMetastore_append_partition_args {
         case 3:
           if ($ftype == TType::LST) {
             $this->part_vals = array();
-            $_size1041 = 0;
-            $_etype1044 = 0;
-            $xfer += $input->readListBegin($_etype1044, $_size1041);
-            for ($_i1045 = 0; $_i1045 < $_size1041; ++$_i1045)
+            $_size1048 = 0;
+            $_etype1051 = 0;
+            $xfer += $input->readListBegin($_etype1051, $_size1048);
+            for ($_i1052 = 0; $_i1052 < $_size1048; ++$_i1052)
             {
-              $elem1046 = null;
-              $xfer += $input->readString($elem1046);
-              $this->part_vals []= $elem1046;
+              $elem1053 = null;
+              $xfer += $input->readString($elem1053);
+              $this->part_vals []= $elem1053;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -25814,9 +26477,9 @@ class ThriftHiveMetastore_append_partition_args {
       {
         $output->writeListBegin(TType::STRING, count($this->part_vals));
         {
-          foreach ($this->part_vals as $iter1047)
+          foreach ($this->part_vals as $iter1054)
           {
-            $xfer += $output->writeString($iter1047);
+            $xfer += $output->writeString($iter1054);
           }
         }
         $output->writeListEnd();
@@ -26318,14 +26981,14 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args {
         case 3:
           if ($ftype == TType::LST) {
             $this->part_vals = array();
-            $_size1048 = 0;
-            $_etype1051 = 0;
-            $xfer += $input->readListBegin($_etype1051, $_size1048);
-            for ($_i1052 = 0; $_i1052 < $_size1048; ++$_i1052)
+            $_size1055 = 0;
+            $_etype1058 = 0;
+            $xfer += $input->readListBegin($_etype1058, $_size1055);
+            for ($_i1059 = 0; $_i1059 < $_size1055; ++$_i1059)
             {
-              $elem1053 = null;
-              $xfer += $input->readString($elem1053);
-              $this->part_vals []= $elem1053;
+              $elem1060 = null;
+              $xfer += $input->readString($elem1060);
+              $this->part_vals []= $elem1060;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -26371,9 +27034,9 @@ class ThriftHiveMetastore_append_partition_with_environment_context_args {
       {
         $output->writeListBegin(TType::STRING, count($this->part_vals));
         {
-          foreach ($this->part_vals as $iter1054)
+          foreach ($this->part_vals as $iter1061)
           {
-            $xfer += $output->writeString($iter1054);
+            $xfer += $output->writeString($iter1061);
           }
         }
         $output->writeListEnd();
@@ -27227,14 +27890,14 @@ class ThriftHiveMetastore_drop_partition_args {
         case 3:
           if ($ftype == TType::LST) {
             $this->part_vals = array();
-            $_size1055 = 0;
-            $_etype1058 = 0;
-            $xfer += $input->readListBegin($_etype1058, $_size1055);
-            for ($_i1059 = 0; $_i1059 < $_size1055; ++$_i1059)
+            $_size1062 = 0;
+            $_etype1065 = 0;
+            $xfer += $input->readListBegin($_etype1065, $_size1062);
+            for ($_i1066 = 0; $_i1066 < $_size1062; ++$_i1066)
             {
-              $elem1060 = null;
-              $xfer += $input->readString($elem1060);
-              $this->part_vals []= $elem1060;
+              $elem1067 = null;
+              $xfer += $input->readString($elem1067);
+              $this->part_vals []= $elem1067;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -27279,9 +27942,9 @@ class ThriftHiveMetastore_drop_partition_args {
       {
         $output->writeListBegin(TType::STRING, count($this->part_vals));
         {
-          foreach ($this->part_vals as $iter1061)
+          foreach ($this->part_vals as $iter1068)
           {
-            $xfer += $output->writeString($iter1061);
+            $xfer += $output->writeString($iter1068);
           }
         }
         $output->writeListEnd();
@@ -27534,14 +28197,14 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args {
         case 3:
           if ($ftype == TType::LST) {
             $this->part_vals = array();
-            $_size1062 = 0;
-            $_etype1065 = 0;
-            $xfer += $input->readListBegin($_etype1065, $_size1062);
-            for ($_i1066 = 0; $_i1066 < $_size1062; ++$_i1066)
+            $_size1069 = 0;
+            $_etype1072 = 0;
+            $xfer += $input->readListBegin($_etype1072, $_size1069);
+            for ($_i1073 = 0; $_i1073 < $_size1069; ++$_i1073)
             {
-              $elem1067 = null;
-              $xfer += $input->readString($elem1067);
-              $this->part_vals []= $elem1067;
+              $elem1074 = null;
+              $xfer += $input->readString($elem1074);
+              $this->part_vals []= $elem1074;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -27594,9 +28257,9 @@ class ThriftHiveMetastore_drop_partition_with_environment_context_args {
       {
         $output->writeListBegin(TType::STRING, count($this->part_vals));
         {
-          foreach ($this->part_vals as $iter1068)
+          foreach ($this->part_vals as $iter1075)
           {
-            $xfer += $output->writeString($iter1068);
+            $xfer += $output->writeString($iter1075);
           }
         }
         $output->writeListEnd();
@@ -28610,14 +29273,14 @@ class ThriftHiveMetastore_get_partition_args {
         case 3:
           if ($ftype == TType::LST) {
             $this->part_vals = array();
-            $_size1069 = 0;
-            $_etype1072 = 0;
-            $xfer += $input->readListBegin($_etype1072, $_size1069);
-            for ($_i1073 = 0; $_i1073 < $_size1069; ++$_i1073)
+            $_size1076 = 0;
+            $_etype1079 = 0;
+            $xfer += $input->readListBegin($_etype1079, $_size1076);
+            for ($_i1080 = 0; $_i1080 < $_size1076; ++$_i1080)
             {
-              $elem1074 = null;
-              $xfer += $input->readString($elem1074);
-              $this->part_vals []= $elem1074;
+              $elem1081 = null;
+              $xfer += $input->readString($elem1081);
+              $this->part_vals []= $elem1081;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -28655,9 +29318,9 @@ class ThriftHiveMetastore_get_partition_args {
       {
         $output->writeListBegin(TType::STRING, count($this->part_vals));
         {
-          foreach ($this->part_vals as $iter1075)
+          foreach ($this->part_vals as $iter1082)
           {
-            $xfer += $output->writeString($iter1075);
+            $xfer += $output->writeString($iter1082);
           }
         }
         $output->writeListEnd();
@@ -28899,17 +29562,17 @@ class ThriftH

<TRUNCATED>

[07/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
index 0af7238..f4c5002 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
@@ -277,6 +277,13 @@ class Iface(fb303.FacebookService.Iface):
     """
     pass
 
+  def truncate_table_req(self, req):
+    """
+    Parameters:
+     - req
+    """
+    pass
+
   def get_tables(self, db_name, pattern):
     """
     Parameters:
@@ -403,6 +410,13 @@ class Iface(fb303.FacebookService.Iface):
     """
     pass
 
+  def alter_table_req(self, req):
+    """
+    Parameters:
+     - req
+    """
+    pass
+
   def add_partition(self, new_part):
     """
     Parameters:
@@ -727,7 +741,7 @@ class Iface(fb303.FacebookService.Iface):
     """
     pass
 
-  def alter_partitions_with_environment_context_req(self, req):
+  def alter_partitions_req(self, req):
     """
     Parameters:
      - req
@@ -860,6 +874,20 @@ class Iface(fb303.FacebookService.Iface):
     """
     pass
 
+  def update_table_column_statistics_req(self, req):
+    """
+    Parameters:
+     - req
+    """
+    pass
+
+  def update_partition_column_statistics_req(self, req):
+    """
+    Parameters:
+     - req
+    """
+    pass
+
   def get_table_column_statistics(self, db_name, tbl_name, col_name):
     """
     Parameters:
@@ -2831,6 +2859,39 @@ class Client(fb303.FacebookService.Client, Iface):
       raise result.o1
     return
 
+  def truncate_table_req(self, req):
+    """
+    Parameters:
+     - req
+    """
+    self.send_truncate_table_req(req)
+    return self.recv_truncate_table_req()
+
+  def send_truncate_table_req(self, req):
+    self._oprot.writeMessageBegin('truncate_table_req', TMessageType.CALL, self._seqid)
+    args = truncate_table_req_args()
+    args.req = req
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_truncate_table_req(self):
+    iprot = self._iprot
+    (fname, mtype, rseqid) = iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(iprot)
+      iprot.readMessageEnd()
+      raise x
+    result = truncate_table_req_result()
+    result.read(iprot)
+    iprot.readMessageEnd()
+    if result.success is not None:
+      return result.success
+    if result.o1 is not None:
+      raise result.o1
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "truncate_table_req failed: unknown result")
+
   def get_tables(self, db_name, pattern):
     """
     Parameters:
@@ -3384,6 +3445,41 @@ class Client(fb303.FacebookService.Client, Iface):
       raise result.o2
     return
 
+  def alter_table_req(self, req):
+    """
+    Parameters:
+     - req
+    """
+    self.send_alter_table_req(req)
+    return self.recv_alter_table_req()
+
+  def send_alter_table_req(self, req):
+    self._oprot.writeMessageBegin('alter_table_req', TMessageType.CALL, self._seqid)
+    args = alter_table_req_args()
+    args.req = req
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_alter_table_req(self):
+    iprot = self._iprot
+    (fname, mtype, rseqid) = iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(iprot)
+      iprot.readMessageEnd()
+      raise x
+    result = alter_table_req_result()
+    result.read(iprot)
+    iprot.readMessageEnd()
+    if result.success is not None:
+      return result.success
+    if result.o1 is not None:
+      raise result.o1
+    if result.o2 is not None:
+      raise result.o2
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_table_req failed: unknown result")
+
   def add_partition(self, new_part):
     """
     Parameters:
@@ -4787,23 +4883,23 @@ class Client(fb303.FacebookService.Client, Iface):
       raise result.o2
     return
 
-  def alter_partitions_with_environment_context_req(self, req):
+  def alter_partitions_req(self, req):
     """
     Parameters:
      - req
     """
-    self.send_alter_partitions_with_environment_context_req(req)
-    return self.recv_alter_partitions_with_environment_context_req()
+    self.send_alter_partitions_req(req)
+    return self.recv_alter_partitions_req()
 
-  def send_alter_partitions_with_environment_context_req(self, req):
-    self._oprot.writeMessageBegin('alter_partitions_with_environment_context_req', TMessageType.CALL, self._seqid)
-    args = alter_partitions_with_environment_context_req_args()
+  def send_alter_partitions_req(self, req):
+    self._oprot.writeMessageBegin('alter_partitions_req', TMessageType.CALL, self._seqid)
+    args = alter_partitions_req_args()
     args.req = req
     args.write(self._oprot)
     self._oprot.writeMessageEnd()
     self._oprot.trans.flush()
 
-  def recv_alter_partitions_with_environment_context_req(self):
+  def recv_alter_partitions_req(self):
     iprot = self._iprot
     (fname, mtype, rseqid) = iprot.readMessageBegin()
     if mtype == TMessageType.EXCEPTION:
@@ -4811,7 +4907,7 @@ class Client(fb303.FacebookService.Client, Iface):
       x.read(iprot)
       iprot.readMessageEnd()
       raise x
-    result = alter_partitions_with_environment_context_req_result()
+    result = alter_partitions_req_result()
     result.read(iprot)
     iprot.readMessageEnd()
     if result.success is not None:
@@ -4820,7 +4916,7 @@ class Client(fb303.FacebookService.Client, Iface):
       raise result.o1
     if result.o2 is not None:
       raise result.o2
-    raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_partitions_with_environment_context_req failed: unknown result")
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_partitions_req failed: unknown result")
 
   def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context):
     """
@@ -5420,6 +5516,84 @@ class Client(fb303.FacebookService.Client, Iface):
       raise result.o4
     raise TApplicationException(TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result")
 
+  def update_table_column_statistics_req(self, req):
+    """
+    Parameters:
+     - req
+    """
+    self.send_update_table_column_statistics_req(req)
+    return self.recv_update_table_column_statistics_req()
+
+  def send_update_table_column_statistics_req(self, req):
+    self._oprot.writeMessageBegin('update_table_column_statistics_req', TMessageType.CALL, self._seqid)
+    args = update_table_column_statistics_req_args()
+    args.req = req
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_update_table_column_statistics_req(self):
+    iprot = self._iprot
+    (fname, mtype, rseqid) = iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(iprot)
+      iprot.readMessageEnd()
+      raise x
+    result = update_table_column_statistics_req_result()
+    result.read(iprot)
+    iprot.readMessageEnd()
+    if result.success is not None:
+      return result.success
+    if result.o1 is not None:
+      raise result.o1
+    if result.o2 is not None:
+      raise result.o2
+    if result.o3 is not None:
+      raise result.o3
+    if result.o4 is not None:
+      raise result.o4
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "update_table_column_statistics_req failed: unknown result")
+
+  def update_partition_column_statistics_req(self, req):
+    """
+    Parameters:
+     - req
+    """
+    self.send_update_partition_column_statistics_req(req)
+    return self.recv_update_partition_column_statistics_req()
+
+  def send_update_partition_column_statistics_req(self, req):
+    self._oprot.writeMessageBegin('update_partition_column_statistics_req', TMessageType.CALL, self._seqid)
+    args = update_partition_column_statistics_req_args()
+    args.req = req
+    args.write(self._oprot)
+    self._oprot.writeMessageEnd()
+    self._oprot.trans.flush()
+
+  def recv_update_partition_column_statistics_req(self):
+    iprot = self._iprot
+    (fname, mtype, rseqid) = iprot.readMessageBegin()
+    if mtype == TMessageType.EXCEPTION:
+      x = TApplicationException()
+      x.read(iprot)
+      iprot.readMessageEnd()
+      raise x
+    result = update_partition_column_statistics_req_result()
+    result.read(iprot)
+    iprot.readMessageEnd()
+    if result.success is not None:
+      return result.success
+    if result.o1 is not None:
+      raise result.o1
+    if result.o2 is not None:
+      raise result.o2
+    if result.o3 is not None:
+      raise result.o3
+    if result.o4 is not None:
+      raise result.o4
+    raise TApplicationException(TApplicationException.MISSING_RESULT, "update_partition_column_statistics_req failed: unknown result")
+
   def get_table_column_statistics(self, db_name, tbl_name, col_name):
     """
     Parameters:
@@ -9119,6 +9293,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
     self._processMap["drop_table"] = Processor.process_drop_table
     self._processMap["drop_table_with_environment_context"] = Processor.process_drop_table_with_environment_context
     self._processMap["truncate_table"] = Processor.process_truncate_table
+    self._processMap["truncate_table_req"] = Processor.process_truncate_table_req
     self._processMap["get_tables"] = Processor.process_get_tables
     self._processMap["get_tables_by_type"] = Processor.process_get_tables_by_type
     self._processMap["get_materialized_views_for_rewriting"] = Processor.process_get_materialized_views_for_rewriting
@@ -9134,6 +9309,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
     self._processMap["alter_table"] = Processor.process_alter_table
     self._processMap["alter_table_with_environment_context"] = Processor.process_alter_table_with_environment_context
     self._processMap["alter_table_with_cascade"] = Processor.process_alter_table_with_cascade
+    self._processMap["alter_table_req"] = Processor.process_alter_table_req
     self._processMap["add_partition"] = Processor.process_add_partition
     self._processMap["add_partition_with_environment_context"] = Processor.process_add_partition_with_environment_context
     self._processMap["add_partitions"] = Processor.process_add_partitions
@@ -9169,7 +9345,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
     self._processMap["alter_partition"] = Processor.process_alter_partition
     self._processMap["alter_partitions"] = Processor.process_alter_partitions
     self._processMap["alter_partitions_with_environment_context"] = Processor.process_alter_partitions_with_environment_context
-    self._processMap["alter_partitions_with_environment_context_req"] = Processor.process_alter_partitions_with_environment_context_req
+    self._processMap["alter_partitions_req"] = Processor.process_alter_partitions_req
     self._processMap["alter_partition_with_environment_context"] = Processor.process_alter_partition_with_environment_context
     self._processMap["rename_partition"] = Processor.process_rename_partition
     self._processMap["partition_name_has_valid_characters"] = Processor.process_partition_name_has_valid_characters
@@ -9186,6 +9362,8 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
     self._processMap["get_check_constraints"] = Processor.process_get_check_constraints
     self._processMap["update_table_column_statistics"] = Processor.process_update_table_column_statistics
     self._processMap["update_partition_column_statistics"] = Processor.process_update_partition_column_statistics
+    self._processMap["update_table_column_statistics_req"] = Processor.process_update_table_column_statistics_req
+    self._processMap["update_partition_column_statistics_req"] = Processor.process_update_partition_column_statistics_req
     self._processMap["get_table_column_statistics"] = Processor.process_get_table_column_statistics
     self._processMap["get_partition_column_statistics"] = Processor.process_get_partition_column_statistics
     self._processMap["get_table_statistics_req"] = Processor.process_get_table_statistics_req
@@ -10187,6 +10365,28 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
     oprot.writeMessageEnd()
     oprot.trans.flush()
 
+  def process_truncate_table_req(self, seqid, iprot, oprot):
+    args = truncate_table_req_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = truncate_table_req_result()
+    try:
+      result.success = self._handler.truncate_table_req(args.req)
+      msg_type = TMessageType.REPLY
+    except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+      raise
+    except MetaException as o1:
+      msg_type = TMessageType.REPLY
+      result.o1 = o1
+    except Exception as ex:
+      msg_type = TMessageType.EXCEPTION
+      logging.exception(ex)
+      result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+    oprot.writeMessageBegin("truncate_table_req", msg_type, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
   def process_get_tables(self, seqid, iprot, oprot):
     args = get_tables_args()
     args.read(iprot)
@@ -10553,6 +10753,31 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
     oprot.writeMessageEnd()
     oprot.trans.flush()
 
+  def process_alter_table_req(self, seqid, iprot, oprot):
+    args = alter_table_req_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = alter_table_req_result()
+    try:
+      result.success = self._handler.alter_table_req(args.req)
+      msg_type = TMessageType.REPLY
+    except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+      raise
+    except InvalidOperationException as o1:
+      msg_type = TMessageType.REPLY
+      result.o1 = o1
+    except MetaException as o2:
+      msg_type = TMessageType.REPLY
+      result.o2 = o2
+    except Exception as ex:
+      msg_type = TMessageType.EXCEPTION
+      logging.exception(ex)
+      result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+    oprot.writeMessageBegin("alter_table_req", msg_type, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
   def process_add_partition(self, seqid, iprot, oprot):
     args = add_partition_args()
     args.read(iprot)
@@ -11467,13 +11692,13 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
     oprot.writeMessageEnd()
     oprot.trans.flush()
 
-  def process_alter_partitions_with_environment_context_req(self, seqid, iprot, oprot):
-    args = alter_partitions_with_environment_context_req_args()
+  def process_alter_partitions_req(self, seqid, iprot, oprot):
+    args = alter_partitions_req_args()
     args.read(iprot)
     iprot.readMessageEnd()
-    result = alter_partitions_with_environment_context_req_result()
+    result = alter_partitions_req_result()
     try:
-      result.success = self._handler.alter_partitions_with_environment_context_req(args.req)
+      result.success = self._handler.alter_partitions_req(args.req)
       msg_type = TMessageType.REPLY
     except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
       raise
@@ -11487,7 +11712,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
       msg_type = TMessageType.EXCEPTION
       logging.exception(ex)
       result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
-    oprot.writeMessageBegin("alter_partitions_with_environment_context_req", msg_type, seqid)
+    oprot.writeMessageBegin("alter_partitions_req", msg_type, seqid)
     result.write(oprot)
     oprot.writeMessageEnd()
     oprot.trans.flush()
@@ -11916,6 +12141,68 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
     oprot.writeMessageEnd()
     oprot.trans.flush()
 
+  def process_update_table_column_statistics_req(self, seqid, iprot, oprot):
+    args = update_table_column_statistics_req_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = update_table_column_statistics_req_result()
+    try:
+      result.success = self._handler.update_table_column_statistics_req(args.req)
+      msg_type = TMessageType.REPLY
+    except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+      raise
+    except NoSuchObjectException as o1:
+      msg_type = TMessageType.REPLY
+      result.o1 = o1
+    except InvalidObjectException as o2:
+      msg_type = TMessageType.REPLY
+      result.o2 = o2
+    except MetaException as o3:
+      msg_type = TMessageType.REPLY
+      result.o3 = o3
+    except InvalidInputException as o4:
+      msg_type = TMessageType.REPLY
+      result.o4 = o4
+    except Exception as ex:
+      msg_type = TMessageType.EXCEPTION
+      logging.exception(ex)
+      result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+    oprot.writeMessageBegin("update_table_column_statistics_req", msg_type, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
+  def process_update_partition_column_statistics_req(self, seqid, iprot, oprot):
+    args = update_partition_column_statistics_req_args()
+    args.read(iprot)
+    iprot.readMessageEnd()
+    result = update_partition_column_statistics_req_result()
+    try:
+      result.success = self._handler.update_partition_column_statistics_req(args.req)
+      msg_type = TMessageType.REPLY
+    except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+      raise
+    except NoSuchObjectException as o1:
+      msg_type = TMessageType.REPLY
+      result.o1 = o1
+    except InvalidObjectException as o2:
+      msg_type = TMessageType.REPLY
+      result.o2 = o2
+    except MetaException as o3:
+      msg_type = TMessageType.REPLY
+      result.o3 = o3
+    except InvalidInputException as o4:
+      msg_type = TMessageType.REPLY
+      result.o4 = o4
+    except Exception as ex:
+      msg_type = TMessageType.EXCEPTION
+      logging.exception(ex)
+      result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+    oprot.writeMessageBegin("update_partition_column_statistics_req", msg_type, seqid)
+    result.write(oprot)
+    oprot.writeMessageEnd()
+    oprot.trans.flush()
+
   def process_get_table_column_statistics(self, seqid, iprot, oprot):
     args = get_table_column_statistics_args()
     args.read(iprot)
@@ -16113,10 +16400,10 @@ class get_databases_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype847, _size844) = iprot.readListBegin()
-          for _i848 in xrange(_size844):
-            _elem849 = iprot.readString()
-            self.success.append(_elem849)
+          (_etype854, _size851) = iprot.readListBegin()
+          for _i855 in xrange(_size851):
+            _elem856 = iprot.readString()
+            self.success.append(_elem856)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -16139,8 +16426,8 @@ class get_databases_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter850 in self.success:
-        oprot.writeString(iter850)
+      for iter857 in self.success:
+        oprot.writeString(iter857)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -16245,10 +16532,10 @@ class get_all_databases_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype854, _size851) = iprot.readListBegin()
-          for _i855 in xrange(_size851):
-            _elem856 = iprot.readString()
-            self.success.append(_elem856)
+          (_etype861, _size858) = iprot.readListBegin()
+          for _i862 in xrange(_size858):
+            _elem863 = iprot.readString()
+            self.success.append(_elem863)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -16271,8 +16558,8 @@ class get_all_databases_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter857 in self.success:
-        oprot.writeString(iter857)
+      for iter864 in self.success:
+        oprot.writeString(iter864)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -17042,12 +17329,12 @@ class get_type_all_result:
       if fid == 0:
         if ftype == TType.MAP:
           self.success = {}
-          (_ktype859, _vtype860, _size858 ) = iprot.readMapBegin()
-          for _i862 in xrange(_size858):
-            _key863 = iprot.readString()
-            _val864 = Type()
-            _val864.read(iprot)
-            self.success[_key863] = _val864
+          (_ktype866, _vtype867, _size865 ) = iprot.readMapBegin()
+          for _i869 in xrange(_size865):
+            _key870 = iprot.readString()
+            _val871 = Type()
+            _val871.read(iprot)
+            self.success[_key870] = _val871
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -17070,9 +17357,9 @@ class get_type_all_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.MAP, 0)
       oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
-      for kiter865,viter866 in self.success.items():
-        oprot.writeString(kiter865)
-        viter866.write(oprot)
+      for kiter872,viter873 in self.success.items():
+        oprot.writeString(kiter872)
+        viter873.write(oprot)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.o2 is not None:
@@ -17215,11 +17502,11 @@ class get_fields_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype870, _size867) = iprot.readListBegin()
-          for _i871 in xrange(_size867):
-            _elem872 = FieldSchema()
-            _elem872.read(iprot)
-            self.success.append(_elem872)
+          (_etype877, _size874) = iprot.readListBegin()
+          for _i878 in xrange(_size874):
+            _elem879 = FieldSchema()
+            _elem879.read(iprot)
+            self.success.append(_elem879)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -17254,8 +17541,8 @@ class get_fields_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter873 in self.success:
-        iter873.write(oprot)
+      for iter880 in self.success:
+        iter880.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -17422,11 +17709,11 @@ class get_fields_with_environment_context_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype877, _size874) = iprot.readListBegin()
-          for _i878 in xrange(_size874):
-            _elem879 = FieldSchema()
-            _elem879.read(iprot)
-            self.success.append(_elem879)
+          (_etype884, _size881) = iprot.readListBegin()
+          for _i885 in xrange(_size881):
+            _elem886 = FieldSchema()
+            _elem886.read(iprot)
+            self.success.append(_elem886)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -17461,8 +17748,8 @@ class get_fields_with_environment_context_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter880 in self.success:
-        iter880.write(oprot)
+      for iter887 in self.success:
+        iter887.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -17615,11 +17902,11 @@ class get_schema_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype884, _size881) = iprot.readListBegin()
-          for _i885 in xrange(_size881):
-            _elem886 = FieldSchema()
-            _elem886.read(iprot)
-            self.success.append(_elem886)
+          (_etype891, _size888) = iprot.readListBegin()
+          for _i892 in xrange(_size888):
+            _elem893 = FieldSchema()
+            _elem893.read(iprot)
+            self.success.append(_elem893)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -17654,8 +17941,8 @@ class get_schema_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter887 in self.success:
-        iter887.write(oprot)
+      for iter894 in self.success:
+        iter894.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -17822,11 +18109,11 @@ class get_schema_with_environment_context_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype891, _size888) = iprot.readListBegin()
-          for _i892 in xrange(_size888):
-            _elem893 = FieldSchema()
-            _elem893.read(iprot)
-            self.success.append(_elem893)
+          (_etype898, _size895) = iprot.readListBegin()
+          for _i899 in xrange(_size895):
+            _elem900 = FieldSchema()
+            _elem900.read(iprot)
+            self.success.append(_elem900)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -17861,8 +18148,8 @@ class get_schema_with_environment_context_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter894 in self.success:
-        iter894.write(oprot)
+      for iter901 in self.success:
+        iter901.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -18315,66 +18602,66 @@ class create_table_with_constraints_args:
       elif fid == 2:
         if ftype == TType.LIST:
           self.primaryKeys = []
-          (_etype898, _size895) = iprot.readListBegin()
-          for _i899 in xrange(_size895):
-            _elem900 = SQLPrimaryKey()
-            _elem900.read(iprot)
-            self.primaryKeys.append(_elem900)
+          (_etype905, _size902) = iprot.readListBegin()
+          for _i906 in xrange(_size902):
+            _elem907 = SQLPrimaryKey()
+            _elem907.read(iprot)
+            self.primaryKeys.append(_elem907)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 3:
         if ftype == TType.LIST:
           self.foreignKeys = []
-          (_etype904, _size901) = iprot.readListBegin()
-          for _i905 in xrange(_size901):
-            _elem906 = SQLForeignKey()
-            _elem906.read(iprot)
-            self.foreignKeys.append(_elem906)
+          (_etype911, _size908) = iprot.readListBegin()
+          for _i912 in xrange(_size908):
+            _elem913 = SQLForeignKey()
+            _elem913.read(iprot)
+            self.foreignKeys.append(_elem913)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 4:
         if ftype == TType.LIST:
           self.uniqueConstraints = []
-          (_etype910, _size907) = iprot.readListBegin()
-          for _i911 in xrange(_size907):
-            _elem912 = SQLUniqueConstraint()
-            _elem912.read(iprot)
-            self.uniqueConstraints.append(_elem912)
+          (_etype917, _size914) = iprot.readListBegin()
+          for _i918 in xrange(_size914):
+            _elem919 = SQLUniqueConstraint()
+            _elem919.read(iprot)
+            self.uniqueConstraints.append(_elem919)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 5:
         if ftype == TType.LIST:
           self.notNullConstraints = []
-          (_etype916, _size913) = iprot.readListBegin()
-          for _i917 in xrange(_size913):
-            _elem918 = SQLNotNullConstraint()
-            _elem918.read(iprot)
-            self.notNullConstraints.append(_elem918)
+          (_etype923, _size920) = iprot.readListBegin()
+          for _i924 in xrange(_size920):
+            _elem925 = SQLNotNullConstraint()
+            _elem925.read(iprot)
+            self.notNullConstraints.append(_elem925)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 6:
         if ftype == TType.LIST:
           self.defaultConstraints = []
-          (_etype922, _size919) = iprot.readListBegin()
-          for _i923 in xrange(_size919):
-            _elem924 = SQLDefaultConstraint()
-            _elem924.read(iprot)
-            self.defaultConstraints.append(_elem924)
+          (_etype929, _size926) = iprot.readListBegin()
+          for _i930 in xrange(_size926):
+            _elem931 = SQLDefaultConstraint()
+            _elem931.read(iprot)
+            self.defaultConstraints.append(_elem931)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 7:
         if ftype == TType.LIST:
           self.checkConstraints = []
-          (_etype928, _size925) = iprot.readListBegin()
-          for _i929 in xrange(_size925):
-            _elem930 = SQLCheckConstraint()
-            _elem930.read(iprot)
-            self.checkConstraints.append(_elem930)
+          (_etype935, _size932) = iprot.readListBegin()
+          for _i936 in xrange(_size932):
+            _elem937 = SQLCheckConstraint()
+            _elem937.read(iprot)
+            self.checkConstraints.append(_elem937)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -18395,43 +18682,43 @@ class create_table_with_constraints_args:
     if self.primaryKeys is not None:
       oprot.writeFieldBegin('primaryKeys', TType.LIST, 2)
       oprot.writeListBegin(TType.STRUCT, len(self.primaryKeys))
-      for iter931 in self.primaryKeys:
-        iter931.write(oprot)
+      for iter938 in self.primaryKeys:
+        iter938.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.foreignKeys is not None:
       oprot.writeFieldBegin('foreignKeys', TType.LIST, 3)
       oprot.writeListBegin(TType.STRUCT, len(self.foreignKeys))
-      for iter932 in self.foreignKeys:
-        iter932.write(oprot)
+      for iter939 in self.foreignKeys:
+        iter939.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.uniqueConstraints is not None:
       oprot.writeFieldBegin('uniqueConstraints', TType.LIST, 4)
       oprot.writeListBegin(TType.STRUCT, len(self.uniqueConstraints))
-      for iter933 in self.uniqueConstraints:
-        iter933.write(oprot)
+      for iter940 in self.uniqueConstraints:
+        iter940.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.notNullConstraints is not None:
       oprot.writeFieldBegin('notNullConstraints', TType.LIST, 5)
       oprot.writeListBegin(TType.STRUCT, len(self.notNullConstraints))
-      for iter934 in self.notNullConstraints:
-        iter934.write(oprot)
+      for iter941 in self.notNullConstraints:
+        iter941.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.defaultConstraints is not None:
       oprot.writeFieldBegin('defaultConstraints', TType.LIST, 6)
       oprot.writeListBegin(TType.STRUCT, len(self.defaultConstraints))
-      for iter935 in self.defaultConstraints:
-        iter935.write(oprot)
+      for iter942 in self.defaultConstraints:
+        iter942.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.checkConstraints is not None:
       oprot.writeFieldBegin('checkConstraints', TType.LIST, 7)
       oprot.writeListBegin(TType.STRUCT, len(self.checkConstraints))
-      for iter936 in self.checkConstraints:
-        iter936.write(oprot)
+      for iter943 in self.checkConstraints:
+        iter943.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -19991,10 +20278,10 @@ class truncate_table_args:
       elif fid == 3:
         if ftype == TType.LIST:
           self.partNames = []
-          (_etype940, _size937) = iprot.readListBegin()
-          for _i941 in xrange(_size937):
-            _elem942 = iprot.readString()
-            self.partNames.append(_elem942)
+          (_etype947, _size944) = iprot.readListBegin()
+          for _i948 in xrange(_size944):
+            _elem949 = iprot.readString()
+            self.partNames.append(_elem949)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -20019,8 +20306,8 @@ class truncate_table_args:
     if self.partNames is not None:
       oprot.writeFieldBegin('partNames', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.partNames))
-      for iter943 in self.partNames:
-        oprot.writeString(iter943)
+      for iter950 in self.partNames:
+        oprot.writeString(iter950)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -20114,22 +20401,19 @@ class truncate_table_result:
   def __ne__(self, other):
     return not (self == other)
 
-class get_tables_args:
+class truncate_table_req_args:
   """
   Attributes:
-   - db_name
-   - pattern
+   - req
   """
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'db_name', None, None, ), # 1
-    (2, TType.STRING, 'pattern', None, None, ), # 2
+    (1, TType.STRUCT, 'req', (TruncateTableRequest, TruncateTableRequest.thrift_spec), None, ), # 1
   )
 
-  def __init__(self, db_name=None, pattern=None,):
-    self.db_name = db_name
-    self.pattern = pattern
+  def __init__(self, req=None,):
+    self.req = req
 
   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:
@@ -20141,185 +20425,9 @@ class get_tables_args:
       if ftype == TType.STOP:
         break
       if fid == 1:
-        if ftype == TType.STRING:
-          self.db_name = iprot.readString()
-        else:
-          iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.STRING:
-          self.pattern = iprot.readString()
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('get_tables_args')
-    if self.db_name is not None:
-      oprot.writeFieldBegin('db_name', TType.STRING, 1)
-      oprot.writeString(self.db_name)
-      oprot.writeFieldEnd()
-    if self.pattern is not None:
-      oprot.writeFieldBegin('pattern', TType.STRING, 2)
-      oprot.writeString(self.pattern)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-
-  def validate(self):
-    return
-
-
-  def __hash__(self):
-    value = 17
-    value = (value * 31) ^ hash(self.db_name)
-    value = (value * 31) ^ hash(self.pattern)
-    return value
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class get_tables_result:
-  """
-  Attributes:
-   - success
-   - o1
-  """
-
-  thrift_spec = (
-    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
-    (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
-  )
-
-  def __init__(self, success=None, o1=None,):
-    self.success = success
-    self.o1 = o1
-
-  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:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 0:
-        if ftype == TType.LIST:
-          self.success = []
-          (_etype947, _size944) = iprot.readListBegin()
-          for _i948 in xrange(_size944):
-            _elem949 = iprot.readString()
-            self.success.append(_elem949)
-          iprot.readListEnd()
-        else:
-          iprot.skip(ftype)
-      elif fid == 1:
         if ftype == TType.STRUCT:
-          self.o1 = MetaException()
-          self.o1.read(iprot)
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('get_tables_result')
-    if self.success is not None:
-      oprot.writeFieldBegin('success', TType.LIST, 0)
-      oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter950 in self.success:
-        oprot.writeString(iter950)
-      oprot.writeListEnd()
-      oprot.writeFieldEnd()
-    if self.o1 is not None:
-      oprot.writeFieldBegin('o1', TType.STRUCT, 1)
-      self.o1.write(oprot)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-
-  def validate(self):
-    return
-
-
-  def __hash__(self):
-    value = 17
-    value = (value * 31) ^ hash(self.success)
-    value = (value * 31) ^ hash(self.o1)
-    return value
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class get_tables_by_type_args:
-  """
-  Attributes:
-   - db_name
-   - pattern
-   - tableType
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.STRING, 'db_name', None, None, ), # 1
-    (2, TType.STRING, 'pattern', None, None, ), # 2
-    (3, TType.STRING, 'tableType', None, None, ), # 3
-  )
-
-  def __init__(self, db_name=None, pattern=None, tableType=None,):
-    self.db_name = db_name
-    self.pattern = pattern
-    self.tableType = tableType
-
-  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:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.STRING:
-          self.db_name = iprot.readString()
-        else:
-          iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.STRING:
-          self.pattern = iprot.readString()
-        else:
-          iprot.skip(ftype)
-      elif fid == 3:
-        if ftype == TType.STRING:
-          self.tableType = iprot.readString()
+          self.req = TruncateTableRequest()
+          self.req.read(iprot)
         else:
           iprot.skip(ftype)
       else:
@@ -20331,18 +20439,10 @@ class get_tables_by_type_args:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_tables_by_type_args')
-    if self.db_name is not None:
-      oprot.writeFieldBegin('db_name', TType.STRING, 1)
-      oprot.writeString(self.db_name)
-      oprot.writeFieldEnd()
-    if self.pattern is not None:
-      oprot.writeFieldBegin('pattern', TType.STRING, 2)
-      oprot.writeString(self.pattern)
-      oprot.writeFieldEnd()
-    if self.tableType is not None:
-      oprot.writeFieldBegin('tableType', TType.STRING, 3)
-      oprot.writeString(self.tableType)
+    oprot.writeStructBegin('truncate_table_req_args')
+    if self.req is not None:
+      oprot.writeFieldBegin('req', TType.STRUCT, 1)
+      self.req.write(oprot)
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
@@ -20353,9 +20453,7 @@ class get_tables_by_type_args:
 
   def __hash__(self):
     value = 17
-    value = (value * 31) ^ hash(self.db_name)
-    value = (value * 31) ^ hash(self.pattern)
-    value = (value * 31) ^ hash(self.tableType)
+    value = (value * 31) ^ hash(self.req)
     return value
 
   def __repr__(self):
@@ -20369,7 +20467,7 @@ class get_tables_by_type_args:
   def __ne__(self, other):
     return not (self == other)
 
-class get_tables_by_type_result:
+class truncate_table_req_result:
   """
   Attributes:
    - success
@@ -20377,7 +20475,7 @@ class get_tables_by_type_result:
   """
 
   thrift_spec = (
-    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
+    (0, TType.STRUCT, 'success', (TruncateTableResponse, TruncateTableResponse.thrift_spec), None, ), # 0
     (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
   )
 
@@ -20395,13 +20493,9 @@ class get_tables_by_type_result:
       if ftype == TType.STOP:
         break
       if fid == 0:
-        if ftype == TType.LIST:
-          self.success = []
-          (_etype954, _size951) = iprot.readListBegin()
-          for _i955 in xrange(_size951):
-            _elem956 = iprot.readString()
-            self.success.append(_elem956)
-          iprot.readListEnd()
+        if ftype == TType.STRUCT:
+          self.success = TruncateTableResponse()
+          self.success.read(iprot)
         else:
           iprot.skip(ftype)
       elif fid == 1:
@@ -20419,13 +20513,10 @@ class get_tables_by_type_result:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_tables_by_type_result')
+    oprot.writeStructBegin('truncate_table_req_result')
     if self.success is not None:
-      oprot.writeFieldBegin('success', TType.LIST, 0)
-      oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter957 in self.success:
-        oprot.writeString(iter957)
-      oprot.writeListEnd()
+      oprot.writeFieldBegin('success', TType.STRUCT, 0)
+      self.success.write(oprot)
       oprot.writeFieldEnd()
     if self.o1 is not None:
       oprot.writeFieldBegin('o1', TType.STRUCT, 1)
@@ -20455,19 +20546,22 @@ class get_tables_by_type_result:
   def __ne__(self, other):
     return not (self == other)
 
-class get_materialized_views_for_rewriting_args:
+class get_tables_args:
   """
   Attributes:
    - db_name
+   - pattern
   """
 
   thrift_spec = (
     None, # 0
     (1, TType.STRING, 'db_name', None, None, ), # 1
+    (2, TType.STRING, 'pattern', None, None, ), # 2
   )
 
-  def __init__(self, db_name=None,):
+  def __init__(self, db_name=None, pattern=None,):
     self.db_name = db_name
+    self.pattern = pattern
 
   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:
@@ -20483,6 +20577,11 @@ class get_materialized_views_for_rewriting_args:
           self.db_name = iprot.readString()
         else:
           iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.pattern = iprot.readString()
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -20492,11 +20591,15 @@ class get_materialized_views_for_rewriting_args:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_materialized_views_for_rewriting_args')
+    oprot.writeStructBegin('get_tables_args')
     if self.db_name is not None:
       oprot.writeFieldBegin('db_name', TType.STRING, 1)
       oprot.writeString(self.db_name)
       oprot.writeFieldEnd()
+    if self.pattern is not None:
+      oprot.writeFieldBegin('pattern', TType.STRING, 2)
+      oprot.writeString(self.pattern)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -20507,6 +20610,7 @@ class get_materialized_views_for_rewriting_args:
   def __hash__(self):
     value = 17
     value = (value * 31) ^ hash(self.db_name)
+    value = (value * 31) ^ hash(self.pattern)
     return value
 
   def __repr__(self):
@@ -20520,7 +20624,7 @@ class get_materialized_views_for_rewriting_args:
   def __ne__(self, other):
     return not (self == other)
 
-class get_materialized_views_for_rewriting_result:
+class get_tables_result:
   """
   Attributes:
    - success
@@ -20548,10 +20652,10 @@ class get_materialized_views_for_rewriting_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype961, _size958) = iprot.readListBegin()
-          for _i962 in xrange(_size958):
-            _elem963 = iprot.readString()
-            self.success.append(_elem963)
+          (_etype954, _size951) = iprot.readListBegin()
+          for _i955 in xrange(_size951):
+            _elem956 = iprot.readString()
+            self.success.append(_elem956)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -20570,12 +20674,12 @@ class get_materialized_views_for_rewriting_result:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_materialized_views_for_rewriting_result')
+    oprot.writeStructBegin('get_tables_result')
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter964 in self.success:
-        oprot.writeString(iter964)
+      for iter957 in self.success:
+        oprot.writeString(iter957)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -20606,25 +20710,25 @@ class get_materialized_views_for_rewriting_result:
   def __ne__(self, other):
     return not (self == other)
 
-class get_table_meta_args:
+class get_tables_by_type_args:
   """
   Attributes:
-   - db_patterns
-   - tbl_patterns
-   - tbl_types
+   - db_name
+   - pattern
+   - tableType
   """
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'db_patterns', None, None, ), # 1
-    (2, TType.STRING, 'tbl_patterns', None, None, ), # 2
-    (3, TType.LIST, 'tbl_types', (TType.STRING,None), None, ), # 3
+    (1, TType.STRING, 'db_name', None, None, ), # 1
+    (2, TType.STRING, 'pattern', None, None, ), # 2
+    (3, TType.STRING, 'tableType', None, None, ), # 3
   )
 
-  def __init__(self, db_patterns=None, tbl_patterns=None, tbl_types=None,):
-    self.db_patterns = db_patterns
-    self.tbl_patterns = tbl_patterns
-    self.tbl_types = tbl_types
+  def __init__(self, db_name=None, pattern=None, tableType=None,):
+    self.db_name = db_name
+    self.pattern = pattern
+    self.tableType = tableType
 
   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:
@@ -20637,22 +20741,17 @@ class get_table_meta_args:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.db_patterns = iprot.readString()
+          self.db_name = iprot.readString()
         else:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.STRING:
-          self.tbl_patterns = iprot.readString()
+          self.pattern = iprot.readString()
         else:
           iprot.skip(ftype)
       elif fid == 3:
-        if ftype == TType.LIST:
-          self.tbl_types = []
-          (_etype968, _size965) = iprot.readListBegin()
-          for _i969 in xrange(_size965):
-            _elem970 = iprot.readString()
-            self.tbl_types.append(_elem970)
-          iprot.readListEnd()
+        if ftype == TType.STRING:
+          self.tableType = iprot.readString()
         else:
           iprot.skip(ftype)
       else:
@@ -20664,21 +20763,18 @@ class get_table_meta_args:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_table_meta_args')
-    if self.db_patterns is not None:
-      oprot.writeFieldBegin('db_patterns', TType.STRING, 1)
-      oprot.writeString(self.db_patterns)
+    oprot.writeStructBegin('get_tables_by_type_args')
+    if self.db_name is not None:
+      oprot.writeFieldBegin('db_name', TType.STRING, 1)
+      oprot.writeString(self.db_name)
       oprot.writeFieldEnd()
-    if self.tbl_patterns is not None:
-      oprot.writeFieldBegin('tbl_patterns', TType.STRING, 2)
-      oprot.writeString(self.tbl_patterns)
+    if self.pattern is not None:
+      oprot.writeFieldBegin('pattern', TType.STRING, 2)
+      oprot.writeString(self.pattern)
       oprot.writeFieldEnd()
-    if self.tbl_types is not None:
-      oprot.writeFieldBegin('tbl_types', TType.LIST, 3)
-      oprot.writeListBegin(TType.STRING, len(self.tbl_types))
-      for iter971 in self.tbl_types:
-        oprot.writeString(iter971)
-      oprot.writeListEnd()
+    if self.tableType is not None:
+      oprot.writeFieldBegin('tableType', TType.STRING, 3)
+      oprot.writeString(self.tableType)
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
@@ -20689,9 +20785,9 @@ class get_table_meta_args:
 
   def __hash__(self):
     value = 17
-    value = (value * 31) ^ hash(self.db_patterns)
-    value = (value * 31) ^ hash(self.tbl_patterns)
-    value = (value * 31) ^ hash(self.tbl_types)
+    value = (value * 31) ^ hash(self.db_name)
+    value = (value * 31) ^ hash(self.pattern)
+    value = (value * 31) ^ hash(self.tableType)
     return value
 
   def __repr__(self):
@@ -20705,7 +20801,7 @@ class get_table_meta_args:
   def __ne__(self, other):
     return not (self == other)
 
-class get_table_meta_result:
+class get_tables_by_type_result:
   """
   Attributes:
    - success
@@ -20713,7 +20809,7 @@ class get_table_meta_result:
   """
 
   thrift_spec = (
-    (0, TType.LIST, 'success', (TType.STRUCT,(TableMeta, TableMeta.thrift_spec)), None, ), # 0
+    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
     (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
   )
 
@@ -20733,11 +20829,10 @@ class get_table_meta_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype975, _size972) = iprot.readListBegin()
-          for _i976 in xrange(_size972):
-            _elem977 = TableMeta()
-            _elem977.read(iprot)
-            self.success.append(_elem977)
+          (_etype961, _size958) = iprot.readListBegin()
+          for _i962 in xrange(_size958):
+            _elem963 = iprot.readString()
+            self.success.append(_elem963)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -20756,12 +20851,12 @@ class get_table_meta_result:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_table_meta_result')
+    oprot.writeStructBegin('get_tables_by_type_result')
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
-      oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter978 in self.success:
-        iter978.write(oprot)
+      oprot.writeListBegin(TType.STRING, len(self.success))
+      for iter964 in self.success:
+        oprot.writeString(iter964)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -20792,7 +20887,7 @@ class get_table_meta_result:
   def __ne__(self, other):
     return not (self == other)
 
-class get_all_tables_args:
+class get_materialized_views_for_rewriting_args:
   """
   Attributes:
    - db_name
@@ -20829,7 +20924,7 @@ class get_all_tables_args:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_all_tables_args')
+    oprot.writeStructBegin('get_materialized_views_for_rewriting_args')
     if self.db_name is not None:
       oprot.writeFieldBegin('db_name', TType.STRING, 1)
       oprot.writeString(self.db_name)
@@ -20857,7 +20952,7 @@ class get_all_tables_args:
   def __ne__(self, other):
     return not (self == other)
 
-class get_all_tables_result:
+class get_materialized_views_for_rewriting_result:
   """
   Attributes:
    - success
@@ -20885,10 +20980,10 @@ class get_all_tables_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype982, _size979) = iprot.readListBegin()
-          for _i983 in xrange(_size979):
-            _elem984 = iprot.readString()
-            self.success.append(_elem984)
+          (_etype968, _size965) = iprot.readListBegin()
+          for _i969 in xrange(_size965):
+            _elem970 = iprot.readString()
+            self.success.append(_elem970)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -20907,12 +21002,12 @@ class get_all_tables_result:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_all_tables_result')
+    oprot.writeStructBegin('get_materialized_views_for_rewriting_result')
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter985 in self.success:
-        oprot.writeString(iter985)
+      for iter971 in self.success:
+        oprot.writeString(iter971)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -20943,22 +21038,25 @@ class get_all_tables_result:
   def __ne__(self, other):
     return not (self == other)
 
-class get_table_args:
+class get_table_meta_args:
   """
   Attributes:
-   - dbname
-   - tbl_name
+   - db_patterns
+   - tbl_patterns
+   - tbl_types
   """
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'dbname', None, None, ), # 1
-    (2, TType.STRING, 'tbl_name', None, None, ), # 2
+    (1, TType.STRING, 'db_patterns', None, None, ), # 1
+    (2, TType.STRING, 'tbl_patterns', None, None, ), # 2
+    (3, TType.LIST, 'tbl_types', (TType.STRING,None), None, ), # 3
   )
 
-  def __init__(self, dbname=None, tbl_name=None,):
-    self.dbname = dbname
-    self.tbl_name = tbl_name
+  def __init__(self, db_patterns=None, tbl_patterns=None, tbl_types=None,):
+    self.db_patterns = db_patterns
+    self.tbl_patterns = tbl_patterns
+    self.tbl_types = tbl_types
 
   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:
@@ -20971,12 +21069,22 @@ class get_table_args:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.dbname = iprot.readString()
+          self.db_patterns = iprot.readString()
         else:
           iprot.skip(ftype)
       elif fid == 2:
         if ftype == TType.STRING:
-          self.tbl_name = iprot.readString()
+          self.tbl_patterns = iprot.readString()
+        else:
+          iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.LIST:
+          self.tbl_types = []
+          (_etype975, _size972) = iprot.readListBegin()
+          for _i976 in xrange(_size972):
+            _elem977 = iprot.readString()
+            self.tbl_types.append(_elem977)
+          iprot.readListEnd()
         else:
           iprot.skip(ftype)
       else:
@@ -20988,14 +21096,21 @@ class get_table_args:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_table_args')
-    if self.dbname is not None:
-      oprot.writeFieldBegin('dbname', TType.STRING, 1)
-      oprot.writeString(self.dbname)
+    oprot.writeStructBegin('get_table_meta_args')
+    if self.db_patterns is not None:
+      oprot.writeFieldBegin('db_patterns', TType.STRING, 1)
+      oprot.writeString(self.db_patterns)
       oprot.writeFieldEnd()
-    if self.tbl_name is not None:
-      oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
-      oprot.writeString(self.tbl_name)
+    if self.tbl_patterns is not None:
+      oprot.writeFieldBegin('tbl_patterns', TType.STRING, 2)
+      oprot.writeString(self.tbl_patterns)
+      oprot.writeFieldEnd()
+    if self.tbl_types is not None:
+      oprot.writeFieldBegin('tbl_types', TType.LIST, 3)
+      oprot.writeListBegin(TType.STRING, len(self.tbl_types))
+      for iter978 in self.tbl_types:
+        oprot.writeString(iter978)
+      oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
@@ -21006,8 +21121,9 @@ class get_table_args:
 
   def __hash__(self):
     value = 17
-    value = (value * 31) ^ hash(self.dbname)
-    value = (value * 31) ^ hash(self.tbl_name)
+    value = (value * 31) ^ hash(self.db_patterns)
+    value = (value * 31) ^ hash(self.tbl_patterns)
+    value = (value * 31) ^ hash(self.tbl_types)
     return value
 
   def __repr__(self):
@@ -21021,24 +21137,21 @@ class get_table_args:
   def __ne__(self, other):
     return not (self == other)
 
-class get_table_result:
+class get_table_meta_result:
   """
   Attributes:
    - success
    - o1
-   - o2
   """
 
   thrift_spec = (
-    (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0
+    (0, TType.LIST, 'success', (TType.STRUCT,(TableMeta, TableMeta.thrift_spec)), None, ), # 0
     (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
-    (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
   )
 
-  def __init__(self, success=None, o1=None, o2=None,):
+  def __init__(self, success=None, o1=None,):
     self.success = success
     self.o1 = o1
-    self.o2 = o2
 
   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:
@@ -21050,9 +21163,14 @@ class get_table_result:
       if ftype == TType.STOP:
         break
       if fid == 0:
-        if ftype == TType.STRUCT:
-          self.success = Table()
-          self.success.read(iprot)
+        if ftype == TType.LIST:
+          self.success = []
+          (_etype982, _size979) = iprot.readListBegin()
+          for _i983 in xrange(_size979):
+            _elem984 = TableMeta()
+            _elem984.read(iprot)
+            self.success.append(_elem984)
+          iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 1:
@@ -21061,12 +21179,6 @@ class get_table_result:
           self.o1.read(iprot)
         else:
           iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.STRUCT:
-          self.o2 = NoSuchObjectException()
-          self.o2.read(iprot)
-        else:
-          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -21076,19 +21188,18 @@ class get_table_result:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_table_result')
+    oprot.writeStructBegin('get_table_meta_result')
     if self.success is not None:
-      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-      self.success.write(oprot)
+      oprot.writeFieldBegin('success', TType.LIST, 0)
+      oprot.writeListBegin(TType.STRUCT, len(self.success))
+      for iter985 in self.success:
+        iter985.write(oprot)
+      oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
       oprot.writeFieldBegin('o1', TType.STRUCT, 1)
       self.o1.write(oprot)
       oprot.writeFieldEnd()
-    if self.o2 is not None:
-      oprot.writeFieldBegin('o2', TType.STRUCT, 2)
-      self.o2.write(oprot)
-      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -21100,7 +21211,6 @@ class get_table_result:
     value = 17
     value = (value * 31) ^ hash(self.success)
     value = (value * 31) ^ hash(self.o1)
-    value = (value * 31) ^ hash(self.o2)
     return value
 
   def __repr__(self):
@@ -21114,22 +21224,19 @@ class get_table_result:
   def __ne__(self, other):
     return not (self == other)
 
-class get_table_objects_by_name_args:
+class get_all_tables_args:
   """
   Attributes:
-   - dbname
-   - tbl_names
+   - db_name
   """
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRING, 'dbname', None, None, ), # 1
-    (2, TType.LIST, 'tbl_names', (TType.STRING,None), None, ), # 2
+    (1, TType.STRING, 'db_name', None, None, ), # 1
   )
 
-  def __init__(self, dbname=None, tbl_names=None,):
-    self.dbname = dbname
-    self.tbl_names = tbl_names
+  def __init__(self, db_name=None,):
+    self.db_name = db_name
 
   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:
@@ -21142,17 +21249,7 @@ class get_table_objects_by_name_args:
         break
       if fid == 1:
         if ftype == TType.STRING:
-          self.dbname = iprot.readString()
-        else:
-          iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.LIST:
-          self.tbl_names = []
-          (_etype989, _size986) = iprot.readListBegin()
-          for _i990 in xrange(_size986):
-            _elem991 = iprot.readString()
-            self.tbl_names.append(_elem991)
-          iprot.readListEnd()
+          self.db_name = iprot.readString()
         else:
           iprot.skip(ftype)
       else:
@@ -21164,17 +21261,10 @@ class get_table_objects_by_name_args:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_table_objects_by_name_args')
-    if self.dbname is not None:
-      oprot.writeFieldBegin('dbname', TType.STRING, 1)
-      oprot.writeString(self.dbname)
-      oprot.writeFieldEnd()
-    if self.tbl_names is not None:
-      oprot.writeFieldBegin('tbl_names', TType.LIST, 2)
-      oprot.writeListBegin(TType.STRING, len(self.tbl_names))
-      for iter992 in self.tbl_names:
-        oprot.writeString(iter992)
-      oprot.writeListEnd()
+    oprot.writeStructBegin('get_all_tables_args')
+    if self.db_name is not None:
+      oprot.writeFieldBegin('db_name', TType.STRING, 1)
+      oprot.writeString(self.db_name)
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
@@ -21185,8 +21275,7 @@ class get_table_objects_by_name_args:
 
   def __hash__(self):
     value = 17
-    value = (value * 31) ^ hash(self.dbname)
-    value = (value * 31) ^ hash(self.tbl_names)
+    value = (value * 31) ^ hash(self.db_name)
     return value
 
   def __repr__(self):
@@ -21200,18 +21289,21 @@ class get_table_objects_by_name_args:
   def __ne__(self, other):
     return not (self == other)
 
-class get_table_objects_by_name_result:
+class get_all_tables_result:
   """
   Attributes:
    - success
+   - o1
   """
 
   thrift_spec = (
-    (0, TType.LIST, 'success', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 0
+    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
+    (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
   )
 
-  def __init__(self, success=None,):
+  def __init__(self, success=None, o1=None,):
     self.success = success
+    self.o1 = o1
 
   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:
@@ -21225,14 +21317,19 @@ class get_table_objects_by_name_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype996, _size993) = iprot.readListBegin()
-          for _i997 in xrange(_size993):
-            _elem998 = Table()
-            _elem998.read(iprot)
-            self.success.append(_elem998)
+          (_etype989, _size986) = iprot.readListBegin()
+          for _i990 in xrange(_size986):
+            _elem991 = iprot.readString()
+            self.success.append(_elem991)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.o1 = MetaException()
+          self.o1.read(iprot)
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -21242,14 +21339,18 @@ class get_table_objects_by_name_result:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_table_objects_by_name_result')
+    oprot.writeStructBegin('get_all_tables_result')
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
-      oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter999 in self.success:
-        iter999.write(oprot)
+      oprot.writeListBegin(TType.STRING, len(self.success))
+      for iter992 in self.success:
+        oprot.writeString(iter992)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
+    if self.o1 is not None:
+      oprot.writeFieldBegin('o1', TType.STRUCT, 1)
+      self.o1.write(oprot)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -21260,6 +21361,7 @@ class get_table_objects_by_name_result:
   def __hash__(self):
     value = 17
     value = (value * 31) ^ hash(self.success)
+    value = (value * 31) ^ hash(self.o1)
     return value
 
   def __repr__(self):
@@ -21273,19 +21375,22 @@ class get_table_objects_by_name_result:
   def __ne__(self, other):
     return not (self == other)
 
-class get_table_req_args:
+class get_table_args:
   """
   Attributes:
-   - req
+   - dbname
+   - tbl_name
   """
 
   thrift_spec = (
     None, # 0
-    (1, TType.STRUCT, 'req', (GetTableRequest, GetTableRequest.thrift_spec), None, ), # 1
+    (1, TType.STRING, 'dbname', None, None, ), # 1
+    (2, TType.STRING, 'tbl_name', None, None, ), # 2
   )
 
-  def __init__(self, req=None,):
-    self.req = req
+  def __init__(self, dbname=None, tbl_name=None,):
+    self.dbname = dbname
+    self.tbl_name = tbl_name
 
   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:
@@ -21297,9 +21402,13 @@ class get_table_req_args:
       if ftype == TType.STOP:
         break
       if fid == 1:
-        if ftype == TType.STRUCT:
-          self.req = GetTableRequest()
-          self.req.read(iprot)
+        if ftype == TType.STRING:
+          self.dbname = iprot.readString()
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRING:
+          self.tbl_name = iprot.readString()
         else:
           iprot.skip(ftype)
       else:
@@ -21311,10 +21420,14 @@ class get_table_req_args:
     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
       return
-    oprot.writeStructBegin('get_table_req_args')
-    if self.req is not None:
-      oprot.writeFieldBegin('req', TType.STRUCT, 1)
-      self.req.write(oprot)
+    oprot.writeStructBegin('get_table_args')
+    if self.dbname is not None:
+      oprot.writeFieldBegin('dbname', TType.STRING, 1)
+      oprot.writeString(self.dbname)
+      oprot.writeFieldEnd()
+    if self.tbl_name is not None:
+      oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
+      oprot.writeString(self.tbl_name)
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
@@ -21325,7 +21438,8 @@ class get_table_req_args:
 
   def __hash__(self):
     value = 17
-    value = (value * 31) ^ hash(self.req)
+    value = (value * 31) ^ hash(self.dbname)
+    value = (value * 31) ^ hash(self.tbl_name)
     return value
 
   def __repr__(self):
@@ -21339,7 +21453,7 @@ class get_table_req_args:
   def __ne__(self, other):
     return not (self == other)
 
-class get_table_req_result:
+class get_table_result:
   """
   Attributes:
    - success
@@ -21348,7 +21462,7 @@ class get_table_req_result:
   """
 
   thrift_spec = (
-    (0, TType.STRUCT, 'success', (GetTableResult, GetTableResult.thrift_spec), None, ), # 0
+    (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0
     (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
     (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
   )
@@ -21369,7 +21483,325 @@ class get_table_req_result:
         break
       if fid == 0:
         if ftype == TType.STRUCT:
-          self.success = GetTableResult()
+          self.success = Table()
+          self.success.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 1:
+        if ftype == TType.STRUCT:
+          self.o1 = MetaException()
+          self.o1.read(iprot)
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.STRUCT:
+          self.o2 = NoSuchObjectException()
+          self.o2.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('get_table_result')
+    if self.success is not None:
+      oprot.writeFieldBegin('success', TType.STRUCT, 0)
+      self.success.write(oprot)
+      oprot.writeFieldEnd()
+    if self.o1 is not None:
+      oprot.writeFieldBegin('o1', TType.STRUCT, 1)
+      self.o1.write(oprot)
+      oprot.writeFieldEnd()
+    if self.o2 is not None:
+      oprot.writeFieldBegin('o2', TType.STRUCT, 2)
+      self.o2.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __hash__(self):
+    value = 17
+    value = (value * 31) ^ hash(self.success)
+    value = (value * 31) ^ hash(self.o1)
+    value = (value * 31) ^ hash(self.o2)
+    return value
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class get_table_objects_by_name_args:
+  """
+  Attributes:
+   - dbname
+   - tbl_names
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRING, 'dbname', None, None, ), # 1
+    (2, TType.LIST, 'tbl_names', (TType.STRING,None), None, ), # 2
+  )
+
+  def __init__(self, dbname=None, tbl_names=None,):
+    self.dbname = dbname
+    self.tbl_names = tbl_names
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRING:
+          self.dbname = iprot.readString()
+        else:
+          iprot.skip(ftype)
+      elif fid == 2:
+        if ftype == TType.LIST:
+          self.tbl_names = []
+          (_etype996, _size993) = iprot.readListBegin()
+          for _i997 in xrange(_size993):
+            _elem998 = iprot.readString()
+            self.tbl_names.append(_elem998)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('get_table_objects_by_name_args')
+    if self.dbname is not None:
+      oprot.writeFieldBegin('dbname', TType.STRING, 1)
+      oprot.writeString(self.dbname)
+      oprot.writeFieldEnd()
+    if self.tbl_names is not None:
+      oprot.writeFieldBegin('tbl_names', TType.LIST, 2)
+      oprot.writeListBegin(TType.STRING, len(self.tbl_names))
+      for iter999 in self.tbl_names:
+        oprot.writeString(iter999)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __hash__(self):
+    value = 17
+    value = (value * 31) ^ hash(self.dbname)
+    value = (value * 31) ^ hash(self.tbl_names)
+    return value
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class get_table_objects_by_name_result:
+  """
+  Attributes:
+   - success
+  """
+
+  thrift_spec = (
+    (0, TType.LIST, 'success', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 0
+  )
+
+  def __init__(self, success=None,):
+    self.success = success
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.LIST:
+          self.success = []
+          (_etype1003, _size1000) = iprot.readListBegin()
+          for _i1004 in xrange(_size1000):
+            _elem1005 = Table()
+            _elem1005.read(iprot)
+            self.success.append(_elem1005)
+          iprot.readListEnd()
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('get_table_objects_by_name_result')
+    if self.success is not None:
+      oprot.writeFieldBegin('success', TType.LIST, 0)
+      oprot.writeListBegin(TType.STRUCT, len(self.success))
+      for iter1006 in self.success:
+        iter1006.write(oprot)
+      oprot.writeListEnd()
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __hash__(self):
+    value = 17
+    value = (value * 31) ^ hash(self.success)
+    return value
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class get_table_req_args:
+  """
+  Attributes:
+   - req
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'req', (GetTableRequest, GetTableRequest.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, req=None,):
+    self.req = req
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.req = GetTableRequest()
+          self.req.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('get_table_req_args')
+    if self.req is not None:
+      oprot.writeFieldBegin('req', TType.STRUCT, 1)
+      self.req.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __hash__(self):
+    value = 17
+    value = (value * 31) ^ hash(self.req)
+    return value
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class get_table_req_result:
+  """
+  Attributes:
+   - success
+   - o1
+   - o2
+  """
+
+  thrift_spec = (
+    (0, TType.STRUCT, 'success', (GetTableResult, GetTableResult.thrift_spec), None, ), # 0
+    (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
+    (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
+  )
+
+  def __init__(self, success=None, o1=None, o2=None,):
+    self.success = success
+    self.o1 = o1
+    self.o2 = o2
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.STRUCT:
+          self.success = GetTableResult()
           self.success.read(iprot)
         else:
           iprot.skip(ftype)
@@ -21639,10 +22071,10 @@ class get_materialization_invalidation_info_args:
       elif fid == 2:
         if ftype == TType.LIST:
           self.tbl_names = []
-          (_etype1003, _size1000) = iprot.readListBegin()
-          for _i1004 in xrange(_size1000):
-            _elem1005 = iprot.readString()
-            self.tbl_names.append(_elem1005)
+          (_etype1010, _size1007) = iprot.readListBegin()
+          for _i1011 in xrange(_size1007):
+            _elem1012 = iprot.readString()
+            self.tbl_names.append(_elem1012)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -21663,8 +22095,8 @@ class get_materialization_invalidation_info_args:
     if self.tbl_names is not None:
       oprot.writeFieldBegin('tbl_names', TType.LIST, 2)
       oprot.writeListBegin(TType.STRING, len(self.tbl_names))
-      for iter1006 in self.tbl_names:
-        oprot.writeString(iter1006)
+      for iter1013 in self.tbl_names:
+        oprot.writeString(iter1013)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()
@@ -21725,12 +22157,12 @@ class get_materialization_invalidation_info_result:
       if fid == 0:
         if ftype == TType.MAP:
           self.success = {}
-          (_ktype1008, _vtype1009, _size1007 ) = iprot.readMapBegin()
-          for _i1011 in xrange(_size1007):
-            _key1012 = iprot.readString()
-            _val1013 = Materialization()
-            _val1013.read(iprot)
-            self.success[_key1012] = _val1013
+          (_ktype1015, _vtype1016, _size1014 ) = iprot.readMapBegin()
+          for _i1018 in xrange(_size1014):
+            _key1019 = iprot.readString()
+            _val1020 = Materialization()
+            _val1020.read(iprot)
+            self.success[_key1019] = _val1020
           iprot.readMapEnd()
         else:
           iprot.skip(ftype)
@@ -21765,9 +22197,9 @@ class get_materialization_invalidation_info_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.MAP, 0)
       oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
-      for kiter1014,viter1015 in self.success.items():
-        oprot.writeString(kiter1014)
-        viter1015.write(oprot)
+      for kiter1021,viter1022 in self.success.items():
+        oprot.writeString(kiter1021)
+        viter1022.write(oprot)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -22132,10 +22564,10 @@ class get_table_names_by_filter_result:
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype1019, _size1016) = iprot.readListBegin()
-          for _i1020 in xrange(_size1016):
-            _elem1021 = iprot.readString()
-            self.success.append(_elem1021)
+          (_etype1026, _size1023) = iprot.readListBegin()
+          for _i1027 in xrange(_size1023):
+            _elem1028 = iprot.readString()
+            self.success.append(_elem1028)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -22170,8 +22602,8 @@ class get_table_names_by_filter_result:
     if self.success is not None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRING, len(self.success))
-      for iter1022 in self.success:
-        oprot.writeString(iter1022)
+      for iter1029 in self.success:
+        oprot.writeString(iter1029)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.o1 is not None:
@@ -22755,6 +23187,165 @@ class alter_table_with_cascade_result:
   def __ne__(self, other):
     return not (self == other)
 
+class alter_table_req_args:
+  """
+  Attributes:
+   - req
+  """
+
+  thrift_spec = (
+    None, # 0
+    (1, TType.STRUCT, 'req', (AlterTableRequest, AlterTableRequest.thrift_spec), None, ), # 1
+  )
+
+  def __init__(self, req=None,):
+    self.req = req
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 1:
+        if ftype == TType.STRUCT:
+          self.req = AlterTableRequest()
+          self.req.read(iprot)
+        else:
+          iprot.skip(ftype)
+      else:
+        iprot.skip(ftype)
+      iprot.readFieldEnd()
+    iprot.readStructEnd()
+
+  def write(self, oprot):
+    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+      return
+    oprot.writeStructBegin('alter_table_req_args')
+    if self.req is not None:
+      oprot.writeFieldBegin('req', TType.STRUCT, 1)
+      self.req.write(oprot)
+      oprot.writeFieldEnd()
+    oprot.writeFieldStop()
+    oprot.writeStructEnd()
+
+  def validate(self):
+    return
+
+
+  def __hash__(self):
+    value = 17
+    value = (value * 31) ^ hash(self.req)
+    return value
+
+  def __repr__(self):
+    L = ['%s=%r' % (key, value)
+      for key, value in self.__dict__.iteritems()]
+    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+  def __eq__(self, other):
+    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+  def __ne__(self, other):
+    return not (self == other)
+
+class alter_table_req_result:
+  """
+  Attributes:
+   - success
+   - o1
+   - o2
+  """
+
+  thrift_spec = (
+    (0, TType.STRUCT, 'success', (AlterTableResponse, AlterTableResponse.thrift_spec), None, ), # 0
+    (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1
+    (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
+  )
+
+  def __init__(self, success=None, o1=None, o2=None,):
+    self.success = success
+    self.o1 = o1
+    self.o2 = o2
+
+  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:
+      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+      return
+    iprot.readStructBegin()
+    while True:
+      (fname, ftype, fid) = iprot.readFieldBegin()
+      if ftype == TType.STOP:
+        break
+      if fid == 0:
+        if ftype == TType.STRUCT:
+          self.success = AlterTableRespons

<TRUNCATED>

[04/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
index 27d96e5..c328992 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
@@ -623,6 +623,9 @@ public interface IMetaStoreClient {
    */
   void truncateTable(String dbName, String tableName, List<String> partNames) throws MetaException, TException;
 
+  void truncateTable(String dbName, String tableName, List<String> partNames,
+      long txnId, String validWriteIds, long writeId) throws TException;
+
   /**
    * Truncate the table/partitions in the DEFAULT database.
    * @param catName catalog name
@@ -1641,10 +1644,14 @@ public interface IMetaStoreClient {
    * @throws MetaException something went wrong, usually in the RDBMS
    * @throws TException general thrift exception
    */
+  @Deprecated
   void alter_table_with_environmentContext(String databaseName, String tblName, Table table,
       EnvironmentContext environmentContext) throws InvalidOperationException, MetaException,
       TException;
 
+  void alter_table(String catName, String databaseName, String tblName, Table table,
+      EnvironmentContext environmentContext, long txnId, String validWriteIdList)
+          throws InvalidOperationException, MetaException, TException;
   /**
    * Create a new database.
    * @param db database object.  If the catalog name is null it will be assumed to be
@@ -2049,6 +2056,7 @@ public interface IMetaStoreClient {
    * @throws TException
    *           if error in communicating with metastore server
    */
+  @Deprecated
   default void alter_partition(String catName, String dbName, String tblName, Partition newPart)
       throws InvalidOperationException, MetaException, TException {
     alter_partition(catName, dbName, tblName, newPart, null);
@@ -2070,9 +2078,15 @@ public interface IMetaStoreClient {
    * @throws TException
    *           if error in communicating with metastore server
    */
+  @Deprecated
   void alter_partition(String dbName, String tblName, Partition newPart, EnvironmentContext environmentContext)
       throws InvalidOperationException, MetaException, TException;
 
+
+  void alter_partition(String dbName, String tblName, Partition newPart,
+      EnvironmentContext environmentContext, long txnId, String writeIdList)
+      throws InvalidOperationException, MetaException, TException;
+
   /**
    * updates a partition to new partition
    * @param catName catalog name.
@@ -2109,6 +2123,7 @@ public interface IMetaStoreClient {
    * @throws TException
    *           if error in communicating with metastore server
    */
+  @Deprecated
   void alter_partitions(String dbName, String tblName, List<Partition> newParts)
       throws InvalidOperationException, MetaException, TException;
 
@@ -2129,6 +2144,7 @@ public interface IMetaStoreClient {
    * @throws TException
    *           if error in communicating with metastore server
    */
+  @Deprecated
   void alter_partitions(String dbName, String tblName, List<Partition> newParts,
       EnvironmentContext environmentContext)
       throws InvalidOperationException, MetaException, TException;
@@ -2154,6 +2170,7 @@ public interface IMetaStoreClient {
    * @throws TException
    *           if error in communicating with metastore server
    */
+  @Deprecated
   default void alter_partitions(String catName, String dbName, String tblName,
                                 List<Partition> newParts)
       throws InvalidOperationException, MetaException, TException {
@@ -3736,5 +3753,4 @@ public interface IMetaStoreClient {
 
   /** Reads runtime statistics. */
   List<RuntimeStat> getRuntimeStats(int maxWeight, int maxCreateTime) throws TException;
-
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
index f45b71f..07be1ba 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
@@ -112,6 +112,7 @@ class MetaStoreDirectSql {
 
   private static final Logger LOG = LoggerFactory.getLogger(MetaStoreDirectSql.class);
   private final PersistenceManager pm;
+  private final Configuration conf;
   private final String schema;
 
   /**
@@ -146,8 +147,10 @@ class MetaStoreDirectSql {
       SKEWED_COL_VALUE_LOC_MAP, COLUMNS_V2, PARTITION_KEYS, SERDE_PARAMS, PART_COL_STATS, KEY_CONSTRAINTS,
       TAB_COL_STATS, PARTITION_KEY_VALS, PART_PRIVS, PART_COL_PRIVS, SKEWED_STRING_LIST, CDS;
 
+
   public MetaStoreDirectSql(PersistenceManager pm, Configuration conf, String schema) {
     this.pm = pm;
+    this.conf = conf;
     this.schema = schema;
     DatabaseProduct dbType = null;
     try {
@@ -645,8 +648,8 @@ class MetaStoreDirectSql {
     + " " + SERDES + ".\"SERDE_ID\", " + PARTITIONS + ".\"CREATE_TIME\","
     + " " + PARTITIONS + ".\"LAST_ACCESS_TIME\", " + SDS + ".\"INPUT_FORMAT\", " + SDS + ".\"IS_COMPRESSED\","
     + " " + SDS + ".\"IS_STOREDASSUBDIRECTORIES\", " + SDS + ".\"LOCATION\", " + SDS + ".\"NUM_BUCKETS\","
-    + " " + SDS + ".\"OUTPUT_FORMAT\", " + SERDES + ".\"NAME\", " + SERDES + ".\"SLIB\" "
-    + "from " + PARTITIONS + ""
+    + " " + SDS + ".\"OUTPUT_FORMAT\", " + SERDES + ".\"NAME\", " + SERDES + ".\"SLIB\", " + PARTITIONS
+    + ".\"WRITE_ID\"" + " from " + PARTITIONS + ""
     + "  left outer join " + SDS + " on " + PARTITIONS + ".\"SD_ID\" = " + SDS + ".\"SD_ID\" "
     + "  left outer join " + SERDES + " on " + SDS + ".\"SERDE_ID\" = " + SERDES + ".\"SERDE_ID\" "
     + "where \"PART_ID\" in (" + partIds + ") order by \"PART_NAME\" asc";
@@ -697,8 +700,13 @@ class MetaStoreDirectSql {
       part.setTableName(tblName);
       if (fields[4] != null) part.setCreateTime(extractSqlInt(fields[4]));
       if (fields[5] != null) part.setLastAccessTime(extractSqlInt(fields[5]));
+      Long writeId = extractSqlLong(fields[14]);
+      if (writeId != null) {
+        part.setWriteId(writeId);
+      }
       partitions.put(partitionId, part);
 
+
       if (sdId == null) continue; // Probably a view.
       assert serdeId != null;
 
@@ -747,6 +755,7 @@ class MetaStoreDirectSql {
       serde.setSerializationLib((String)fields[13]);
       serdeSb.append(serdeId).append(",");
       sd.setSerdeInfo(serde);
+
       Deadline.checkTimeout();
     }
     query.closeAll();
@@ -2489,7 +2498,9 @@ class MetaStoreDirectSql {
    */
   private void dropPartitionsByPartitionIds(List<Object> partitionIdList) throws MetaException {
     String queryText;
-
+    if (partitionIdList.isEmpty()) {
+      return;
+    }
     String partitionIds = getIdListForIn(partitionIdList);
 
     // Get the corresponding SD_ID-s, CD_ID-s, SERDE_ID-s
@@ -2570,6 +2581,9 @@ class MetaStoreDirectSql {
    * MetaException
    */
   private void dropStorageDescriptors(List<Object> storageDescriptorIdList) throws MetaException {
+    if (storageDescriptorIdList.isEmpty()) {
+      return;
+    }
     String queryText;
     String sdIds = getIdListForIn(storageDescriptorIdList);
 
@@ -2657,6 +2671,9 @@ class MetaStoreDirectSql {
    */
   private void dropSerdes(List<Object> serdeIdList) throws MetaException {
     String queryText;
+    if (serdeIdList.isEmpty()) {
+      return;
+    }
     String serdeIds = getIdListForIn(serdeIdList);
 
     try {
@@ -2683,6 +2700,9 @@ class MetaStoreDirectSql {
    */
   private void dropDanglingColumnDescriptors(List<Object> columnDescriptorIdList)
       throws MetaException {
+    if (columnDescriptorIdList.isEmpty()) {
+      return;
+    }
     String queryText;
     String colIds = getIdListForIn(columnDescriptorIdList);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
index aa29dd9..b43e6f3 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
@@ -1448,7 +1448,7 @@ public class ObjectStore implements RawStore, Configurable {
         if (tbl != null
             && TxnUtils.isTransactionalTable(tbl)
             && tbl.getPartitionKeysSize() == 0) {
-          if (isCurrentStatsValidForTheQuery(mtable, txnId, writeIdList)) {
+          if (isCurrentStatsValidForTheQuery(mtable, txnId, writeIdList, false)) {
             tbl.setIsStatsCompliant(true);
           } else {
             tbl.setIsStatsCompliant(false);
@@ -1943,11 +1943,14 @@ public class ObjectStore implements RawStore, Configurable {
 
     t.setRewriteEnabled(mtbl.isRewriteEnabled());
     t.setCatName(mtbl.getDatabase().getCatalogName());
+    t.setWriteId(mtbl.getWriteId());
     return t;
   }
 
   private MTable convertToMTable(Table tbl) throws InvalidObjectException,
       MetaException {
+    // NOTE: we don't set writeId in this method. Write ID is only set after validating the
+    //       existing write ID against the caller's valid list.
     if (tbl == null) {
       return null;
     }
@@ -1986,9 +1989,6 @@ public class ObjectStore implements RawStore, Configurable {
         convertToMFieldSchemas(tbl.getPartitionKeys()), tbl.getParameters(),
         tbl.getViewOriginalText(), tbl.getViewExpandedText(), tbl.isRewriteEnabled(),
         tableType);
-    if (TxnUtils.isTransactionalTable(tbl)) {
-      mtable.setWriteId(tbl.getWriteId());
-    }
     return mtable;
   }
 
@@ -2450,21 +2450,24 @@ public class ObjectStore implements RawStore, Configurable {
           + part_vals.toString());
     }
     part.setValues(part_vals);
+    setPartitionStatsParam(part, table.getParameters(), mpart.getWriteId(), txnId, writeIdList);
+    return part;
+  }
+
+  private void setPartitionStatsParam(Partition part, Map<String, String> tableParams,
+      long partWriteId, long reqTxnId, String reqWriteIdList) throws MetaException {
     // If transactional table partition, check whether the current version partition
     // statistics in the metastore comply with the client query's snapshot isolation.
-    if (writeIdList != null) {
-      if (TxnUtils.isTransactionalTable(table.getParameters())) {
-        if (isCurrentStatsValidForTheQuery(mpart, txnId, writeIdList)) {
-          part.setIsStatsCompliant(true);
-        } else {
-          part.setIsStatsCompliant(false);
-          // Do not make persistent the following state since it is query specific (not global).
-          StatsSetupConst.setBasicStatsState(part.getParameters(), StatsSetupConst.FALSE);
-          LOG.info("Removed COLUMN_STATS_ACCURATE from Partition object's parameters.");
-        }
-      }
+    if (reqWriteIdList == null) return;
+    if (!TxnUtils.isTransactionalTable(tableParams)) return;
+    if (isCurrentStatsValidForTheQuery(part, partWriteId, reqTxnId, reqWriteIdList, false)) {
+      part.setIsStatsCompliant(true);
+    } else {
+      part.setIsStatsCompliant(false);
+      // Do not make persistent the following state since it is query specific (not global).
+      StatsSetupConst.setBasicStatsState(part.getParameters(), StatsSetupConst.FALSE);
+      LOG.info("Removed COLUMN_STATS_ACCURATE from Partition object's parameters.");
     }
-    return part;
   }
 
   /**
@@ -2570,6 +2573,8 @@ public class ObjectStore implements RawStore, Configurable {
    */
   private MPartition convertToMPart(Partition part, MTable mt, boolean useTableCD)
       throws InvalidObjectException, MetaException {
+    // NOTE: we don't set writeId in this method. Write ID is only set after validating the
+    //       existing write ID against the caller's valid list.
     if (part == null) {
       return null;
     }
@@ -2597,9 +2602,6 @@ public class ObjectStore implements RawStore, Configurable {
         .getPartitionKeys()), part.getValues()), mt, part.getValues(), part
         .getCreateTime(), part.getLastAccessTime(),
         msd, part.getParameters());
-    if (TxnUtils.isTransactionalTable(mt.getParameters())) {
-      mpart.setWriteId(part.getWriteId());
-    }
     return mpart;
   }
 
@@ -2612,6 +2614,7 @@ public class ObjectStore implements RawStore, Configurable {
         mpart.getLastAccessTime(), convertToStorageDescriptor(mpart.getSd()),
         convertMap(mpart.getParameters()));
     p.setCatName(mpart.getTable().getDatabase().getCatalogName());
+    p.setWriteId(mpart.getWriteId());
     return p;
   }
 
@@ -2624,6 +2627,7 @@ public class ObjectStore implements RawStore, Configurable {
         mpart.getCreateTime(), mpart.getLastAccessTime(),
         convertToStorageDescriptor(mpart.getSd(), false), convertMap(mpart.getParameters()));
     p.setCatName(catName);
+    p.setWriteId(mpart.getWriteId());
     return p;
   }
 
@@ -4113,6 +4117,16 @@ public class ObjectStore implements RawStore, Configurable {
       // For now only alter name, owner, parameters, cols, bucketcols are allowed
       oldt.setDatabase(newt.getDatabase());
       oldt.setTableName(normalizeIdentifier(newt.getTableName()));
+      boolean isTxn = TxnUtils.isTransactionalTable(newTable);
+      if (isTxn) {
+        // Transactional table is altered without a txn. Make sure there are no changes to the flag.
+        String errorMsg = verifyStatsChangeCtx(oldt.getParameters(), newTable.getParameters(),
+            newTable.getWriteId(), queryValidWriteIds, false);
+        if (errorMsg != null) {
+          throw new MetaException(errorMsg);
+        }
+      }
+      boolean isToTxn = isTxn && !TxnUtils.isTransactionalTable(oldt.getParameters());
       oldt.setParameters(newt.getParameters());
       oldt.setOwner(newt.getOwner());
       oldt.setOwnerType(newt.getOwnerType());
@@ -4135,13 +4149,16 @@ public class ObjectStore implements RawStore, Configurable {
 
       // If transactional, update MTable to have txnId and the writeIdList
       // for the current Stats updater query.
-      if (TxnUtils.isTransactionalTable(newTable) && queryValidWriteIds != null) {
+      // Don't update for conversion to acid - it doesn't modify stats but passes in qVWIds.
+      // The fact that it doesn't update stats is verified above.
+      if (isTxn && queryValidWriteIds != null && (!isToTxn || newTable.getWriteId() > 0)) {
         // Check concurrent INSERT case and set false to the flag.
-        if (!isCurrentStatsValidForTheQuery(oldt, queryTxnId, queryValidWriteIds)) {
+        if (!isCurrentStatsValidForTheQuery(oldt, queryTxnId, queryValidWriteIds, true)) {
           StatsSetupConst.setBasicStatsState(oldt.getParameters(), StatsSetupConst.FALSE);
           LOG.info("Removed COLUMN_STATS_ACCURATE from the parameters of the table " +
                   dbname + "." + name + ". will be made persistent.");
         }
+        assert newTable.getWriteId() > 0;
         oldt.setWriteId(newTable.getWriteId());
       }
 
@@ -4154,6 +4171,32 @@ public class ObjectStore implements RawStore, Configurable {
     }
   }
 
+  /**
+   * Verifies that the stats JSON string is unchanged for alter table (txn stats).
+   * @return Error message with the details of the change, or null if the value has not changed.
+   */
+  private static String verifyStatsChangeCtx(Map<String, String> oldP, Map<String, String> newP,
+      long writeId, String validWriteIds, boolean isColStatsChange) {
+    if (validWriteIds != null && writeId > 0) return null; // We have txn context.
+    String oldVal = oldP == null ? null : oldP.get(StatsSetupConst.COLUMN_STATS_ACCURATE);
+    String newVal = newP == null ? null : newP.get(StatsSetupConst.COLUMN_STATS_ACCURATE);
+    // We don't need txn context is that stats state is not being changed.
+    if (StringUtils.isEmpty(oldVal) && StringUtils.isEmpty(newVal)) return null;
+    if (StringUtils.equalsIgnoreCase(oldVal, newVal)) {
+      if (!isColStatsChange) return null; // No change in col stats or parameters => assume no change.
+      // Col stats change while json stays "valid" implies stats change. If the new value is invalid,
+      // then we don't care. This is super ugly and idiotic.
+      // It will all become better when we get rid of JSON and store a flag and write ID per stats.
+      if (!StatsSetupConst.areBasicStatsUptoDate(newP)) return null;
+    }
+    // Some change to the stats state is being made; it can only be made with a write ID.
+    // Note - we could do this:  if (writeId > 0 && (validWriteIds != null || !StatsSetupConst.areBasicStatsUptoDate(newP))) { return null;
+    //       However the only way ID list can be absent is if WriteEntity wasn't generated for the alter, which is a separate bug.
+    return "Cannot change stats state for a transactional table without providing the transactional"
+        + " write state for verification (new write ID " + writeId + ", valid write IDs "
+        + validWriteIds + "; current state " + oldVal + "; new state " + newVal;
+  }
+
   @Override
   public void updateCreationMetadata(String catName, String dbname, String tablename, CreationMetadata cm)
       throws MetaException {
@@ -4210,6 +4253,15 @@ public class ObjectStore implements RawStore, Configurable {
     }
     oldp.setValues(newp.getValues());
     oldp.setPartitionName(newp.getPartitionName());
+    boolean isTxn = TxnUtils.isTransactionalTable(table.getParameters());
+    if (isTxn) {
+      // Transactional table is altered without a txn. Make sure there are no changes to the flag.
+      String errorMsg = verifyStatsChangeCtx(oldp.getParameters(), newPart.getParameters(),
+          newPart.getWriteId(), queryValidWriteIds, false);
+      if (errorMsg != null) {
+        throw new MetaException(errorMsg);
+      }
+    }
     oldp.setParameters(newPart.getParameters());
     if (!TableType.VIRTUAL_VIEW.name().equals(oldp.getTable().getTableType())) {
       copyMSD(newp.getSd(), oldp.getSd());
@@ -4223,15 +4275,16 @@ public class ObjectStore implements RawStore, Configurable {
 
     // If transactional, add/update the MUPdaterTransaction
     // for the current updater query.
-    if (queryValidWriteIds != null && TxnUtils.isTransactionalTable(table.getParameters())) {
+    if (isTxn && queryValidWriteIds != null && newPart.getWriteId() > 0) {
       // Check concurrent INSERT case and set false to the flag.
-      if (!isCurrentStatsValidForTheQuery(oldp, queryTxnId, queryValidWriteIds)) {
+      if (!isCurrentStatsValidForTheQuery(oldp, queryTxnId, queryValidWriteIds, true)) {
         StatsSetupConst.setBasicStatsState(oldp.getParameters(), StatsSetupConst.FALSE);
         LOG.info("Removed COLUMN_STATS_ACCURATE from the parameters of the partition " +
                 dbname + "." + name + "." + oldp.getPartitionName() + " will be made persistent.");
       }
       oldp.setWriteId(newPart.getWriteId());
     }
+
     return oldCD;
   }
 
@@ -4239,7 +4292,7 @@ public class ObjectStore implements RawStore, Configurable {
   public void alterPartition(String catName, String dbname, String name, List<String> part_vals,
       Partition newPart, long queryTxnId, String queryValidWriteIds) throws InvalidObjectException, MetaException {
     boolean success = false;
-    Exception e = null;
+    Throwable e = null;
     try {
       openTransaction();
       if (newPart.isSetWriteId()) {
@@ -4250,7 +4303,8 @@ public class ObjectStore implements RawStore, Configurable {
       removeUnusedColumnDescriptor(oldCd);
       // commit the changes
       success = commitTransaction();
-    } catch (Exception exception) {
+    } catch (Throwable exception) {
+      LOG.error("alterPartition failed", exception);
       e = exception;
     } finally {
       if (!success) {
@@ -4295,6 +4349,7 @@ public class ObjectStore implements RawStore, Configurable {
       success = commitTransaction();
     } catch (Exception exception) {
       e = exception;
+      LOG.error("Alter failed", e);
     } finally {
       if (!success) {
         rollbackTransaction();
@@ -8354,7 +8409,8 @@ public class ObjectStore implements RawStore, Configurable {
   }
 
   @Override
-  public boolean updateTableColumnStatistics(ColumnStatistics colStats)
+  public boolean updateTableColumnStatistics(ColumnStatistics colStats,
+      long txnId, String validWriteIds, long writeId)
     throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
     boolean committed = false;
 
@@ -8382,14 +8438,30 @@ public class ObjectStore implements RawStore, Configurable {
         // There is no need to add colname again, otherwise we will get duplicate colNames.
       }
 
+      // TODO## ideally the col stats stats should be in colstats, not in the table!
       // Set the table properties
       // No need to check again if it exists.
       String dbname = table.getDbName();
       String name = table.getTableName();
       MTable oldt = getMTable(catName, dbname, name);
-      Map<String, String> parameters = table.getParameters();
-      StatsSetupConst.setColumnStatsState(parameters, colNames);
-      oldt.setParameters(parameters);
+      Map<String, String> newParams = new HashMap<>(table.getParameters());
+      StatsSetupConst.setColumnStatsState(newParams, colNames);
+      boolean isTxn = TxnUtils.isTransactionalTable(oldt.getParameters());
+      if (isTxn) {
+        String errorMsg = verifyStatsChangeCtx(
+            oldt.getParameters(), newParams, writeId, validWriteIds, true);
+        if (errorMsg != null) {
+          throw new MetaException(errorMsg);
+        }
+        if (!isCurrentStatsValidForTheQuery(oldt, txnId, validWriteIds, true)) {
+          // Make sure we set the flag to invalid regardless of the current value.
+          StatsSetupConst.setBasicStatsState(newParams, StatsSetupConst.FALSE);
+          LOG.info("Removed COLUMN_STATS_ACCURATE from the parameters of the table "
+              + dbname + "." + name);
+        }
+        oldt.setWriteId(writeId);
+      }
+      oldt.setParameters(newParams);
 
       committed = commitTransaction();
       return committed;
@@ -8427,8 +8499,9 @@ public class ObjectStore implements RawStore, Configurable {
   }
 
   @Override
-  public boolean updatePartitionColumnStatistics(ColumnStatistics colStats, List<String> partVals)
-    throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
+  public boolean updatePartitionColumnStatistics(ColumnStatistics colStats, List<String> partVals,
+      long txnId, String validWriteIds, long writeId)
+          throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException {
     boolean committed = false;
 
     try {
@@ -8460,9 +8533,26 @@ public class ObjectStore implements RawStore, Configurable {
         writeMPartitionColumnStatistics(table, partition, mStatsObj,
             oldStats.get(statsObj.getColName()));
       }
-      Map<String, String> parameters = mPartition.getParameters();
-      StatsSetupConst.setColumnStatsState(parameters, colNames);
-      mPartition.setParameters(parameters);
+      // TODO## ideally the col stats stats should be in colstats, not in the partition!
+      Map<String, String> newParams = new HashMap<>(mPartition.getParameters());
+      StatsSetupConst.setColumnStatsState(newParams, colNames);
+      boolean isTxn = TxnUtils.isTransactionalTable(table);
+      if (isTxn) {
+        String errorMsg = verifyStatsChangeCtx(
+            mPartition.getParameters(), newParams, writeId, validWriteIds, true);
+        if (errorMsg != null) {
+          throw new MetaException(errorMsg);
+        }
+        if (!isCurrentStatsValidForTheQuery(mPartition, txnId, validWriteIds, true)) {
+          // Make sure we set the flag to invalid regardless of the current value.
+          StatsSetupConst.setBasicStatsState(newParams, StatsSetupConst.FALSE);
+          LOG.info("Removed COLUMN_STATS_ACCURATE from the parameters of the partition "
+              + statsDesc.getDbName() + "." + statsDesc.getTableName() + "." + statsDesc.getPartName());
+        }
+        mPartition.setWriteId(writeId);
+      }
+
+      mPartition.setParameters(newParams);
       committed = commitTransaction();
       return committed;
     } finally {
@@ -8565,19 +8655,20 @@ public class ObjectStore implements RawStore, Configurable {
       List<String> colNames,
       long txnId,
       String writeIdList) throws MetaException, NoSuchObjectException {
-    Boolean iLL = null;
     // If the current stats in the metastore doesn't comply with
     // the isolation level of the query, set No to the compliance flag.
+    Boolean isCompliant = null;
     if (writeIdList != null) {
       MTable table = this.getMTable(catName, dbName, tableName);
-      iLL = isCurrentStatsValidForTheQuery(table, txnId, writeIdList);
+      isCompliant = !TxnUtils.isTransactionalTable(table.getParameters())
+        || isCurrentStatsValidForTheQuery(table, txnId, writeIdList, false);
     }
-    ColumnStatistics cS = getTableColumnStatisticsInternal(
+    ColumnStatistics stats = getTableColumnStatisticsInternal(
         catName, dbName, tableName, colNames, true, true);
-    if (cS != null && iLL != null) {
-      cS.setIsStatsCompliant(iLL);
+    if (stats != null && isCompliant != null) {
+      stats.setIsStatsCompliant(isCompliant);
     }
-    return cS;
+    return stats;
   }
 
   protected ColumnStatistics getTableColumnStatisticsInternal(
@@ -8634,30 +8725,31 @@ public class ObjectStore implements RawStore, Configurable {
       List<String> partNames, List<String> colNames,
       long txnId, String writeIdList)
       throws MetaException, NoSuchObjectException {
-
-    // If any of the current partition stats in the metastore doesn't comply with
-    // the isolation level of the query, return null.
+    if (partNames == null && partNames.isEmpty()) {
+      LOG.warn("The given partNames does not have any name.");
+      return null;
+    }
+    List<ColumnStatistics> allStats = getPartitionColumnStatisticsInternal(
+        catName, dbName, tableName, partNames, colNames, true, true);
     if (writeIdList != null) {
-      if (partNames == null && partNames.isEmpty()) {
-        LOG.warn("The given partNames does not have any name.");
-        return null;
-      }
-      // TODO## this is not correct; stats updater patch will fix it to return stats for valid partitions,
-      //        and no stats for invalid. Remove this comment when merging that patch.
-      // Loop through the given "partNames" list
-      // checking isolation-level-compliance of each partition column stats.
-      for(String partName : partNames) {
-        MPartition mpart = getMPartition(catName, dbName, tableName, Warehouse.getPartValuesFromPartName(partName));
-        if (!isCurrentStatsValidForTheQuery(mpart, txnId, writeIdList)) {
-          LOG.debug("The current metastore transactional partition column statistics for {}.{}.{} "
-            + "(write ID {}) are not valid for current query ({} {})", dbName, tableName,
-            mpart.getPartitionName(), mpart.getWriteId(), txnId, writeIdList);
-          return Lists.newArrayList();
+      // TODO## this could be improved to get partitions in bulk
+      for (ColumnStatistics cs : allStats) {
+        MPartition mpart = getMPartition(catName, dbName, tableName,
+            Warehouse.getPartValuesFromPartName(cs.getStatsDesc().getPartName()));
+        if (mpart == null
+            || !isCurrentStatsValidForTheQuery(mpart, txnId, writeIdList, false)) {
+          if (mpart != null) {
+            LOG.debug("The current metastore transactional partition column statistics for {}.{}.{} "
+              + "(write ID {}) are not valid for current query ({} {})", dbName, tableName,
+              mpart.getPartitionName(), mpart.getWriteId(), txnId, writeIdList);
+          }
+          cs.setIsStatsCompliant(false);
+        } else {
+          cs.setIsStatsCompliant(true);
         }
       }
     }
-    return getPartitionColumnStatisticsInternal(
-        catName, dbName, tableName, partNames, colNames, true, true);
+    return allStats;
   }
 
   protected List<ColumnStatistics> getPartitionColumnStatisticsInternal(
@@ -8726,7 +8818,7 @@ public class ObjectStore implements RawStore, Configurable {
       // checking isolation-level-compliance of each partition column stats.
       for(String partName : partNames) {
         MPartition mpart = getMPartition(catName, dbName, tblName, Warehouse.getPartValuesFromPartName(partName));
-        if (!isCurrentStatsValidForTheQuery(mpart, txnId, writeIdList)) {
+        if (!isCurrentStatsValidForTheQuery(mpart, txnId, writeIdList, false)) {
           LOG.debug("The current metastore transactional partition column statistics " +
                   "for " + dbName + "." + tblName + "." + mpart.getPartitionName() + " is not valid " +
                   "for the current query.");
@@ -8891,6 +8983,8 @@ public class ObjectStore implements RawStore, Configurable {
         throw new NoSuchObjectException("Table " + tableName
             + "  for which stats deletion is requested doesn't exist");
       }
+      // Note: this does not verify ACID state; called internally when removing cols/etc.
+      //       Also called via an unused metastore API that checks for ACID tables.
       MPartition mPartition = getMPartition(catName, dbName, tableName, partVals);
       if (mPartition == null) {
         throw new NoSuchObjectException("Partition " + partName
@@ -8973,6 +9067,8 @@ public class ObjectStore implements RawStore, Configurable {
             TableName.getQualified(catName, dbName, tableName)
             + "  for which stats deletion is requested doesn't exist");
       }
+      // Note: this does not verify ACID state; called internally when removing cols/etc.
+      //       Also called via an unused metastore API that checks for ACID tables.
       query = pm.newQuery(MTableColumnStatistics.class);
       String filter;
       String parameters;
@@ -12305,10 +12401,10 @@ public class ObjectStore implements RawStore, Configurable {
    * @param queryWriteId           writeId of the query
    * @Precondition   "tbl" should be retrieved from the TBLS table.
    */
-  private boolean isCurrentStatsValidForTheQuery(
-      MTable tbl, long queryTxnId, String queryValidWriteIdList) throws MetaException {
-    return isCurrentStatsValidForTheQuery(tbl.getDatabase().getName(), tbl.getTableName(),
-        tbl.getParameters(), tbl.getWriteId(), queryTxnId, queryValidWriteIdList);
+  private boolean isCurrentStatsValidForTheQuery(MTable tbl, long queryTxnId, String queryValidWriteIdList,
+      boolean isCompleteStatsWriter) throws MetaException {
+    return isCurrentStatsValidForTheQuery(conf, tbl.getDatabase().getName(), tbl.getTableName(),
+        tbl.getParameters(), tbl.getWriteId(), queryTxnId, queryValidWriteIdList, isCompleteStatsWriter);
   }
 
   /**
@@ -12325,30 +12421,39 @@ public class ObjectStore implements RawStore, Configurable {
    * @param queryValidWriteIdList  valid writeId list of the query
    * @Precondition   "part" should be retrieved from the PARTITIONS table.
    */
-  private boolean isCurrentStatsValidForTheQuery(
-      MPartition part, long queryTxnId, String queryValidWriteIdList)
+  private boolean isCurrentStatsValidForTheQuery(MPartition part, long queryTxnId,
+      String queryValidWriteIdList, boolean isCompleteStatsWriter)
       throws MetaException {
-    return isCurrentStatsValidForTheQuery(part.getTable().getDatabase().getName(),
+    return isCurrentStatsValidForTheQuery(conf, part.getTable().getDatabase().getName(),
         part.getTable().getTableName(), part.getParameters(), part.getWriteId(),
-        queryTxnId, queryValidWriteIdList);
+        queryTxnId, queryValidWriteIdList, isCompleteStatsWriter);
+  }
+
+  private boolean isCurrentStatsValidForTheQuery(Partition part, long partWriteId, long queryTxnId,
+      String queryValidWriteIdList, boolean isCompleteStatsWriter)
+      throws MetaException {
+    return isCurrentStatsValidForTheQuery(conf, part.getDbName(), part.getTableName(),
+        part.getParameters(), partWriteId, queryTxnId, queryValidWriteIdList, isCompleteStatsWriter);
   }
 
-  private boolean isCurrentStatsValidForTheQuery(String dbName, String tblName,
-      Map<String, String> statsParams, long statsWriteId, long queryTxnId,
-      String queryValidWriteIdList) throws MetaException {
+  // TODO: move to somewhere else
+  public static boolean isCurrentStatsValidForTheQuery(Configuration conf, String dbName,
+      String tblName, Map<String, String> statsParams, long statsWriteId, long queryTxnId,
+      String queryValidWriteIdList, boolean isCompleteStatsWriter) throws MetaException {
 
     // Note: can be changed to debug/info to verify the calls.
-    LOG.trace("Called with stats write ID {}; query {}, {}; params {}",
-        statsWriteId, queryTxnId, queryValidWriteIdList, statsParams);
-    // if statsWriteIdList is null,
+    // TODO## change this to debug when merging
+    LOG.info("isCurrentStatsValidForTheQuery with stats write ID {}; query {}, {}; writer: {} params {}",
+        statsWriteId, queryTxnId, queryValidWriteIdList, isCompleteStatsWriter, statsParams);
     // return true since the stats does not seem to be transactional.
+    // stats write ID 1; query 2, default.stats_part:1:9223372036854775807::;
     if (statsWriteId < 1) {
       return true;
     }
     // This COLUMN_STATS_ACCURATE(CSA) state checking also includes the case that the stats is
     // written by an aborted transaction but TXNS has no entry for the transaction
-    // after compaction.
-    if (!StatsSetupConst.areBasicStatsUptoDate(statsParams)) {
+    // after compaction. Don't check for a complete stats writer - it may replace invalid stats.
+    if (!isCompleteStatsWriter && !StatsSetupConst.areBasicStatsUptoDate(statsParams)) {
       return false;
     }
 
@@ -12359,12 +12464,22 @@ public class ObjectStore implements RawStore, Configurable {
       return true;
     }
 
-    ValidWriteIdList list4TheQuery = new ValidReaderWriteIdList(queryValidWriteIdList);
-    // Just check if the write ID is valid. If it's valid (i.e. we are allowed to see it),
-    // that means it cannot possibly be a concurrent write. If it's not valid (we are not
-    // allowed to see it), that means it's either concurrent or aborted, same thing for us.
-    if (list4TheQuery.isWriteIdValid(statsWriteId)) {
-      return true;
+    if (queryValidWriteIdList != null) { // Can be null when stats are being reset to invalid.
+      ValidWriteIdList list4TheQuery = new ValidReaderWriteIdList(queryValidWriteIdList);
+      // Just check if the write ID is valid. If it's valid (i.e. we are allowed to see it),
+      // that means it cannot possibly be a concurrent write. If it's not valid (we are not
+      // allowed to see it), that means it's either concurrent or aborted, same thing for us.
+      if (list4TheQuery.isWriteIdValid(statsWriteId)) {
+        return true;
+      }
+      // Updater is also allowed to overwrite stats from aborted txns, as long as they are not concurrent.
+      if (isCompleteStatsWriter && list4TheQuery.isWriteIdAborted(statsWriteId)) {
+        return true;
+      }
+    }
+
+    if (queryTxnId < 1) {
+      return false; // The caller is outside of a txn; no need to check the same-txn case.
     }
 
     // This assumes that all writes within the same txn are sequential and can see each other.

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java
index 681e1e5..95e8445 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java
@@ -864,7 +864,7 @@ public interface RawStore extends Configurable {
    * @throws InvalidObjectException the stats object is invalid
    * @throws InvalidInputException unable to record the stats for the table
    */
-  boolean updateTableColumnStatistics(ColumnStatistics colStats)
+  boolean updateTableColumnStatistics(ColumnStatistics colStats, long txnId, String validWriteIds, long writeId)
       throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException;
 
   /** Persists the given column statistics object to the metastore
@@ -875,9 +875,10 @@ public interface RawStore extends Configurable {
    * @throws MetaException error accessing the RDBMS.
    * @throws InvalidObjectException the stats object is invalid
    * @throws InvalidInputException unable to record the stats for the table
+   * @throws TException
    */
   boolean updatePartitionColumnStatistics(ColumnStatistics statsObj,
-     List<String> partVals)
+     List<String> partVals, long txnId, String validWriteIds, long writeId)
      throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException;
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
index 8539605..9bee0db 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
@@ -547,6 +547,7 @@ public class CachedStore implements RawStore, Configurable {
         if (!table.isSetPartitionKeys()) {
           List<String> colNames = MetaStoreUtils.getColumnNamesForTable(table);
           Deadline.startTimer("getTableColumnStatistics");
+          // TODO## should this take write ID into account? or at least cache write ID to verify?
           ColumnStatistics tableColStats =
               rawStore.getTableColumnStatistics(catName, dbName, tblName, colNames);
           Deadline.stopTimer();
@@ -1598,9 +1599,9 @@ public class CachedStore implements RawStore, Configurable {
   }
 
   @Override
-  public boolean updateTableColumnStatistics(ColumnStatistics colStats)
+  public boolean updateTableColumnStatistics(ColumnStatistics colStats, long txnId, String validWriteIds, long writeId)
       throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
-    boolean succ = rawStore.updateTableColumnStatistics(colStats);
+    boolean succ = rawStore.updateTableColumnStatistics(colStats, txnId, validWriteIds, writeId);
     if (succ) {
       String catName = colStats.getStatsDesc().isSetCatName() ?
           normalizeIdentifier(colStats.getStatsDesc().getCatName()) :
@@ -1676,9 +1677,10 @@ public class CachedStore implements RawStore, Configurable {
   }
 
   @Override
-  public boolean updatePartitionColumnStatistics(ColumnStatistics colStats, List<String> partVals)
+  public boolean updatePartitionColumnStatistics(ColumnStatistics colStats, List<String> partVals,
+      long txnId, String validWriteIds, long writeId)
       throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
-    boolean succ = rawStore.updatePartitionColumnStatistics(colStats, partVals);
+    boolean succ = rawStore.updatePartitionColumnStatistics(colStats, partVals, txnId, validWriteIds, writeId);
     if (succ) {
       String catName = colStats.getStatsDesc().isSetCatName() ?
           normalizeIdentifier(colStats.getStatsDesc().getCatName()) : DEFAULT_CATALOG_NAME;

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
index 1b4f01a..a357030 100644
--- a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
+++ b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
@@ -278,6 +278,18 @@ struct GrantRevokePrivilegeResponse {
   1: optional bool success;
 }
 
+struct TruncateTableRequest {
+  1: required string dbName,
+  2: required string tableName,
+  3: optional list<string> partNames,
+  4: optional i64 txnId=-1,
+  5: optional i64 writeId=-1,
+  6: optional string validWriteIdList
+}
+
+struct TruncateTableResponse {
+}
+
 struct Role {
   1: string roleName,
   2: i32 createTime,
@@ -571,9 +583,7 @@ struct ColumnStatisticsDesc {
 struct ColumnStatistics {
 1: required ColumnStatisticsDesc statsDesc,
 2: required list<ColumnStatisticsObj> statsObj,
-3: optional i64 txnId=-1,            // transaction id of the query that sends this structure TODO## needed?
-4: optional string validWriteIdList, // valid write id list for the table for which this struct is being sent
-5: optional bool isStatsCompliant // Are the stats isolation-level-compliant with the
+3: optional bool isStatsCompliant // Are the stats isolation-level-compliant with the
                                                       // the calling query?
 }
 
@@ -591,6 +601,10 @@ struct SetPartitionsStatsRequest {
 5: optional string validWriteIdList // valid write id list for the table for which this struct is being sent
 }
 
+struct SetPartitionsStatsResponse {
+1: required bool result;
+}
+
 // schema of the table/query results etc.
 struct Schema {
  // column names, types, comments
@@ -1598,18 +1612,34 @@ struct GetRuntimeStatsRequest {
 }
 
 struct AlterPartitionsRequest {
-  1: required string dbName,
-  2: required string tableName,
-  3: required list<Partition> partitions,
-  4: required EnvironmentContext environmentContext,
-  5: optional i64 txnId=-1,
-  6: optional i64 writeId=-1,
-  7: optional string validWriteIdList
+  1: optional string catName,
+  2: required string dbName,
+  3: required string tableName,
+  4: required list<Partition> partitions,
+  5: optional EnvironmentContext environmentContext,
+  6: optional i64 txnId=-1,
+  7: optional i64 writeId=-1,
+  8: optional string validWriteIdList
 }
 
 struct AlterPartitionsResponse {
 }
 
+struct AlterTableRequest {
+  1: optional string catName,
+  2: required string dbName,
+  3: required string tableName,
+  4: required Table table,
+  5: optional EnvironmentContext environmentContext,
+  6: optional i64 txnId=-1,
+  7: optional i64 writeId=-1,
+  8: optional string validWriteIdList
+// TODO: also add cascade here, out of envCtx
+}
+
+struct AlterTableResponse {
+}
+
 // Exceptions.
 
 exception MetaException {
@@ -1754,6 +1784,7 @@ service ThriftHiveMetastore extends fb303.FacebookService
                        throws(1:NoSuchObjectException o1, 2:MetaException o3)
   void truncate_table(1:string dbName, 2:string tableName, 3:list<string> partNames)
                           throws(1:MetaException o1)
+  TruncateTableResponse truncate_table_req(1:TruncateTableRequest req) throws(1:MetaException o1)
   list<string> get_tables(1: string db_name, 2: string pattern) throws (1: MetaException o1)
   list<string> get_tables_by_type(1: string db_name, 2: string pattern, 3: string tableType) throws (1: MetaException o1)
   list<string> get_materialized_views_for_rewriting(1: string db_name) throws (1: MetaException o1)
@@ -1819,6 +1850,11 @@ service ThriftHiveMetastore extends fb303.FacebookService
   // alter table not only applies to future partitions but also cascade to existing partitions
   void alter_table_with_cascade(1:string dbname, 2:string tbl_name, 3:Table new_tbl, 4:bool cascade)
                        throws (1:InvalidOperationException o1, 2:MetaException o2)
+  AlterTableResponse alter_table_req(1:AlterTableRequest req)
+      throws (1:InvalidOperationException o1, 2:MetaException o2)
+
+
+
   // the following applies to only tables that have partitions
   // * See notes on DDL_TIME
   Partition add_partition(1:Partition new_part)
@@ -1943,7 +1979,7 @@ service ThriftHiveMetastore extends fb303.FacebookService
 
   void alter_partitions_with_environment_context(1:string db_name, 2:string tbl_name, 3:list<Partition> new_parts, 4:EnvironmentContext environment_context) throws (1:InvalidOperationException o1, 2:MetaException o2)
 
-  AlterPartitionsResponse alter_partitions_with_environment_context_req(1:AlterPartitionsRequest req)
+  AlterPartitionsResponse alter_partitions_req(1:AlterPartitionsRequest req)
       throws (1:InvalidOperationException o1, 2:MetaException o2)
 
   void alter_partition_with_environment_context(1:string db_name,
@@ -2012,6 +2048,12 @@ service ThriftHiveMetastore extends fb303.FacebookService
   bool update_partition_column_statistics(1:ColumnStatistics stats_obj) throws (1:NoSuchObjectException o1,
               2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4)
 
+  SetPartitionsStatsResponse update_table_column_statistics_req(1:SetPartitionsStatsRequest req) throws (1:NoSuchObjectException o1,
+              2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4)
+  SetPartitionsStatsResponse update_partition_column_statistics_req(1:SetPartitionsStatsRequest req) throws (1:NoSuchObjectException o1,
+              2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4)
+
+
   // get APIs return the column statistics corresponding to db_name, tbl_name, [part_name], col_name if
   // such statistics exists. If the required statistics doesn't exist, get APIs throw NoSuchObjectException
   // For instance, if get_table_column_statistics is called on a partitioned table for which only

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java
index 106d9f2..a5e6918 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java
@@ -694,18 +694,18 @@ public class DummyRawStoreControlledCommit implements RawStore, Configurable {
   }
 
   @Override
-  public boolean updateTableColumnStatistics(ColumnStatistics statsObj)
+  public boolean updateTableColumnStatistics(ColumnStatistics statsObj, long txnId, String validWriteIds, long writeId)
       throws NoSuchObjectException, MetaException, InvalidObjectException,
       InvalidInputException {
-    return objectStore.updateTableColumnStatistics(statsObj);
+    return objectStore.updateTableColumnStatistics(statsObj, txnId, validWriteIds, writeId);
   }
 
   @Override
   public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj,
-      List<String> partVals)
+      List<String> partVals, long txnId, String validWriteIds, long writeId)
       throws NoSuchObjectException, MetaException, InvalidObjectException,
       InvalidInputException {
-    return objectStore.updatePartitionColumnStatistics(statsObj, partVals);
+    return objectStore.updatePartitionColumnStatistics(statsObj, partVals, txnId, validWriteIds, writeId);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java
index 2587a98..8270f6a 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java
@@ -743,13 +743,15 @@ public class DummyRawStoreForJdoConnection implements RawStore {
   }
 
   @Override
-  public boolean updateTableColumnStatistics(ColumnStatistics statsObj)
+  public boolean updateTableColumnStatistics(ColumnStatistics statsObj,
+      long txnId, String validWriteIds, long writeId)
       throws NoSuchObjectException, MetaException, InvalidObjectException {
     return false;
   }
 
   @Override
-  public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj,List<String> partVals)
+  public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj,List<String> partVals,
+      long txnId, String validWriteIds, long writeId)
     throws NoSuchObjectException, MetaException, InvalidObjectException {
     return false;
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java
index 6ef416f..868a546 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClientPreCatalog.java
@@ -1635,13 +1635,7 @@ public class HiveMetaStoreClientPreCatalog implements IMetaStoreClient, AutoClos
     req.setTableName(tblName);
     req.setPartitions(newParts);
     req.setEnvironmentContext(environmentContext);
-    // TODO: this is ugly... account for ability to pass via EC for the old API.
-    if (environmentContext != null && environmentContext.isSetProperties()
-        && environmentContext.getProperties().containsKey(StatsSetupConst.VALID_WRITE_IDS)) {
-      req.setTxnId(Long.parseLong(environmentContext.getProperties().get(StatsSetupConst.TXN_ID)));
-      req.setValidWriteIdList(environmentContext.getProperties().get(StatsSetupConst.VALID_WRITE_IDS));
-    }
-    client.alter_partitions_with_environment_context_req(req);
+    client.alter_partitions_req(req);
   }
 
   @Override
@@ -1656,7 +1650,7 @@ public class HiveMetaStoreClientPreCatalog implements IMetaStoreClient, AutoClos
     req.setEnvironmentContext(environmentContext);
     req.setTxnId(txnId);
     req.setValidWriteIdList(writeIdList);
-    client.alter_partitions_with_environment_context_req(req);
+    client.alter_partitions_req(req);
   }
 
   @Override
@@ -3532,4 +3526,24 @@ public class HiveMetaStoreClientPreCatalog implements IMetaStoreClient, AutoClos
     throw new UnsupportedOperationException();
   }
 
+  @Override
+  public void alter_table(String catName, String databaseName, String tblName, Table table,
+      EnvironmentContext environmentContext, long txnId, String validWriteIdList)
+      throws InvalidOperationException, MetaException, TException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public void alter_partition(String dbName, String tblName, Partition newPart,
+      EnvironmentContext environmentContext, long txnId, String writeIdList)
+      throws InvalidOperationException, MetaException, TException {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public void truncateTable(String dbName, String tableName,
+      List<String> partNames, long txnId, String validWriteIds, long writeId)
+      throws TException {
+    throw new UnsupportedOperationException();
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
index d9dd954..533cabb 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
@@ -60,7 +60,7 @@ public class TestHiveAlterHandler {
         getDefaultCatalog(conf), oldTable.getDbName(), oldTable.getTableName(), Arrays.asList("col1", "col2", "col3"));
     HiveAlterHandler handler = new HiveAlterHandler();
     handler.setConf(conf);
-    handler.alterTableUpdateTableColumnStats(msdb, oldTable, newTable, null);
+    handler.alterTableUpdateTableColumnStats(msdb, oldTable, newTable, null, -1, null);
   }
 
   @Test
@@ -85,7 +85,7 @@ public class TestHiveAlterHandler {
     RawStore msdb = Mockito.mock(RawStore.class);
     HiveAlterHandler handler = new HiveAlterHandler();
     handler.setConf(conf);
-    handler.alterTableUpdateTableColumnStats(msdb, oldTable, newTable, null);
+    handler.alterTableUpdateTableColumnStats(msdb, oldTable, newTable, null, -1, null);
     Mockito.verify(msdb, Mockito.times(1)).getTableColumnStatistics(
         getDefaultCatalog(conf), oldTable.getDbName(), oldTable.getTableName(), Arrays.asList("col1", "col2", "col3", "col4")
     );
@@ -115,7 +115,7 @@ public class TestHiveAlterHandler {
         getDefaultCatalog(conf), oldTable.getDbName(), oldTable.getTableName(), Arrays.asList("col1", "col2", "col3", "col4"));
     HiveAlterHandler handler = new HiveAlterHandler();
     handler.setConf(conf);
-    handler.alterTableUpdateTableColumnStats(msdb, oldTable, newTable, null);
+    handler.alterTableUpdateTableColumnStats(msdb, oldTable, newTable, null, -1, null);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
index cb32236..75ab80b 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
@@ -244,15 +244,13 @@ public abstract class TestHiveMetaStore {
       assertNotNull("Unable to create partition " + part4, retp4);
 
       Partition part_get = client.getPartition(dbName, tblName, part.getValues());
-      if(isThriftClient) {
-        // since we are using thrift, 'part' will not have the create time and
-        // last DDL time set since it does not get updated in the add_partition()
-        // call - likewise part2 and part3 - set it correctly so that equals check
-        // doesn't fail
-        adjust(client, part, dbName, tblName);
-        adjust(client, part2, dbName, tblName);
-        adjust(client, part3, dbName, tblName);
-      }
+      // since we are using thrift, 'part' will not have the create time and
+      // last DDL time set since it does not get updated in the add_partition()
+      // call - likewise part2 and part3 - set it correctly so that equals check
+      // doesn't fail
+      adjust(client, part, dbName, tblName, isThriftClient);
+      adjust(client, part2, dbName, tblName, isThriftClient);
+      adjust(client, part3, dbName, tblName, isThriftClient);
       assertTrue("Partitions are not same", part.equals(part_get));
 
       // check null cols schemas for a partition
@@ -383,12 +381,10 @@ public abstract class TestHiveMetaStore {
       Partition mpart3 = makePartitionObject(dbName, tblName, mvals3, tbl, "/mpart3");
       client.add_partitions(Arrays.asList(mpart1,mpart2,mpart3));
 
-      if(isThriftClient) {
-        // do DDL time munging if thrift mode
-        adjust(client, mpart1, dbName, tblName);
-        adjust(client, mpart2, dbName, tblName);
-        adjust(client, mpart3, dbName, tblName);
-      }
+      // do DDL time munging if thrift mode
+      adjust(client, mpart1, dbName, tblName, isThriftClient);
+      adjust(client, mpart2, dbName, tblName, isThriftClient);
+      adjust(client, mpart3, dbName, tblName, isThriftClient);
       verifyPartitionsPublished(client, dbName, tblName,
           Arrays.asList(mvals1.get(0)),
           Arrays.asList(mpart1,mpart2,mpart3));
@@ -418,10 +414,8 @@ public abstract class TestHiveMetaStore {
       // add_partitions(5) : ok
       client.add_partitions(Arrays.asList(mpart5));
 
-      if(isThriftClient) {
-        // do DDL time munging if thrift mode
-        adjust(client, mpart5, dbName, tblName);
-      }
+      // do DDL time munging if thrift mode
+      adjust(client, mpart5, dbName, tblName, isThriftClient);
 
       verifyPartitionsPublished(client, dbName, tblName,
           Arrays.asList(mvals1.get(0)),
@@ -1976,12 +1970,17 @@ public abstract class TestHiveMetaStore {
   }
 
   private static void adjust(HiveMetaStoreClient client, Partition part,
-      String dbName, String tblName) throws TException {
+      String dbName, String tblName, boolean isThriftClient) throws TException {
     Partition part_get = client.getPartition(dbName, tblName, part.getValues());
-    part.setCreateTime(part_get.getCreateTime());
-    part.putToParameters(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.DDL_TIME, Long.toString(part_get.getCreateTime()));
+    if (isThriftClient) {
+      part.setCreateTime(part_get.getCreateTime());
+      part.putToParameters(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.DDL_TIME, Long.toString(part_get.getCreateTime()));
+    }
+    part.setWriteId(part_get.getWriteId());
   }
 
+
+
   private static void silentDropDatabase(String dbName) throws TException {
     try {
       for (String tableName : client.getTables(dbName, "*")) {

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
index fb4a761..fe64a91 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
@@ -244,6 +244,7 @@ public class TestMetaStoreEventListener {
     Assert.assertTrue(partEvent.getStatus());
     Partition part = msc.getPartition("hive2038", "tmptbl", "b=2011");
     Partition partAdded = partEvent.getPartitionIterator().next();
+    partAdded.setWriteId(part.getWriteId());
     validateAddPartition(part, partAdded);
     validateTableInAddPartition(tbl, partEvent.getTable());
     validateAddPartition(part, prePartEvent.getPartitions().get(0));

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
index c40d45d..995271a 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
@@ -559,7 +559,7 @@ public class TestObjectStore {
         ColumnStatisticsObj partStats = new ColumnStatisticsObj("test_part_col", "int", data);
         statsObjList.add(partStats);
 
-        objectStore.updatePartitionColumnStatistics(stats, part.getValues());
+        objectStore.updatePartitionColumnStatistics(stats, part.getValues(), -1, null, -1);
       }
     }
     if (withPrivileges) {

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
index 717c5ee..01a8f81 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
@@ -175,7 +175,7 @@ public class TestOldSchema {
       data.setLongStats(dcsd);
       obj.setStatsData(data);
       cs.addToStatsObj(obj);
-      store.updatePartitionColumnStatistics(cs, partVal);
+      store.updatePartitionColumnStatistics(cs, partVal, -1, null, -1);
 
     }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
index 7cf5c26..e4854f9 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
@@ -455,7 +455,7 @@ public class TestCachedStore {
     stats.setStatsObj(colStatObjs);
 
     // Save to DB
-    objectStore.updateTableColumnStatistics(stats);
+    objectStore.updateTableColumnStatistics(stats, -1, null, -1);
 
     // Prewarm CachedStore
     CachedStore.setCachePrewarmedState(false);
@@ -720,8 +720,8 @@ public class TestCachedStore {
     stats.setStatsDesc(statsDesc);
     stats.setStatsObj(colStatObjs);
 
-    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals1);
-    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals2);
+    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals1, -1, null, -1);
+    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals2, -1, null, -1);
 
     List<String> colNames = new ArrayList<>();
     colNames.add(colName);
@@ -790,10 +790,10 @@ public class TestCachedStore {
     stats.setStatsDesc(statsDesc);
     stats.setStatsObj(colStatObjs);
 
-    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals1);
+    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals1, -1, null, -1);
 
     longStats.setNumDVs(40);
-    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals2);
+    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals2, -1, null, -1);
 
     List<String> colNames = new ArrayList<>();
     colNames.add(colName);
@@ -871,7 +871,7 @@ public class TestCachedStore {
     stats.setStatsDesc(statsDesc);
     stats.setStatsObj(colStatObjs);
 
-    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals1);
+    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals1, -1, null, -1);
 
     longStats.setNumDVs(40);
     hll = HyperLogLog.builder().build();
@@ -881,7 +881,7 @@ public class TestCachedStore {
     hll.addLong(5);
     longStats.setBitVectors(hll.serialize());
 
-    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals2);
+    cachedStore.updatePartitionColumnStatistics(stats.deepCopy(), partVals2, -1, null, -1);
 
     List<String> colNames = new ArrayList<>();
     colNames.add(colName);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
index 9b9b101..2ec20c2 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
@@ -410,11 +410,15 @@ public class TestAlterPartitions extends MetaStoreClientTest {
     client.alter_partition("", TABLE_NAME, partitions.get(3));
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterPartitionNullDbName() throws Exception {
     createTable4PartColsParts(client);
     List<Partition> partitions = client.listPartitions(DB_NAME, TABLE_NAME, (short)-1);
-    client.alter_partition(null, TABLE_NAME, partitions.get(3));
+    try {
+      client.alter_partition(null, TABLE_NAME, partitions.get(3));
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+    }
   }
 
   @Test(expected = InvalidOperationException.class)
@@ -424,11 +428,15 @@ public class TestAlterPartitions extends MetaStoreClientTest {
     client.alter_partition(DB_NAME, "", partitions.get(3));
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterPartitionNullTblName() throws Exception {
     createTable4PartColsParts(client);
     List<Partition> partitions = client.listPartitions(DB_NAME, TABLE_NAME, (short)-1);
-    client.alter_partition(DB_NAME, null, partitions.get(3));
+    try {
+      client.alter_partition(DB_NAME, null, partitions.get(3));
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+    }
   }
 
   @Test
@@ -536,11 +544,15 @@ public class TestAlterPartitions extends MetaStoreClientTest {
     client.alter_partition("", TABLE_NAME, partitions.get(3), new EnvironmentContext());
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterPartitionWithEnvironmentCtxNullDbName() throws Exception {
     createTable4PartColsParts(client);
     List<Partition> partitions = client.listPartitions(DB_NAME, TABLE_NAME, (short)-1);
-    client.alter_partition(null, TABLE_NAME, partitions.get(3), new EnvironmentContext());
+    try {
+      client.alter_partition(null, TABLE_NAME, partitions.get(3), new EnvironmentContext());
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+    }
   }
 
   @Test(expected = InvalidOperationException.class)
@@ -550,11 +562,15 @@ public class TestAlterPartitions extends MetaStoreClientTest {
     client.alter_partition(DB_NAME, "", partitions.get(3), new EnvironmentContext());
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterPartitionWithEnvironmentCtxNullTblName() throws Exception {
     createTable4PartColsParts(client);
     List<Partition> partitions = client.listPartitions(DB_NAME, TABLE_NAME, (short)-1);
-    client.alter_partition(DB_NAME, null, partitions.get(3), new EnvironmentContext());
+    try {
+      client.alter_partition(DB_NAME, null, partitions.get(3), new EnvironmentContext());
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+    }
   }
 
   @Test
@@ -680,11 +696,15 @@ public class TestAlterPartitions extends MetaStoreClientTest {
     client.alter_partitions("", TABLE_NAME, Lists.newArrayList(part));
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterPartitionsNullDbName() throws Exception {
     createTable4PartColsParts(client);
     Partition part = client.listPartitions(DB_NAME, TABLE_NAME, (short)-1).get(0);
-    client.alter_partitions(null, TABLE_NAME, Lists.newArrayList(part));
+    try {
+      client.alter_partitions(null, TABLE_NAME, Lists.newArrayList(part));
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+    }
   }
 
   @Test(expected = InvalidOperationException.class)
@@ -853,11 +873,15 @@ public class TestAlterPartitions extends MetaStoreClientTest {
     client.alter_partitions("", TABLE_NAME, Lists.newArrayList(part), new EnvironmentContext());
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterPartitionsWithEnvironmentCtxNullDbName() throws Exception {
     createTable4PartColsParts(client);
     Partition part = client.listPartitions(DB_NAME, TABLE_NAME, (short)-1).get(0);
-    client.alter_partitions(null, TABLE_NAME, Lists.newArrayList(part), new EnvironmentContext());
+    try {
+      client.alter_partitions(null, TABLE_NAME, Lists.newArrayList(part), new EnvironmentContext());
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+    }
   }
 
   @Test(expected = InvalidOperationException.class)

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
index 8ce8531..462584a 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
@@ -123,6 +123,7 @@ public class TestAppendPartitions extends MetaStoreClientTest {
     Assert.assertNotNull(appendedPart);
     Partition partition =
         client.getPartition(table.getDbName(), table.getTableName(), partitionValues);
+    appendedPart.setWriteId(partition.getWriteId());
     Assert.assertEquals(partition, appendedPart);
     verifyPartition(partition, table, partitionValues, "year=2017/month=may");
     verifyPartitionNames(table, Lists.newArrayList("year=2017/month=march", "year=2017/month=april",
@@ -141,6 +142,7 @@ public class TestAppendPartitions extends MetaStoreClientTest {
     Assert.assertNotNull(appendedPart);
     Partition partition =
         client.getPartition(table.getDbName(), table.getTableName(), partitionValues);
+    appendedPart.setWriteId(partition.getWriteId());
     Assert.assertEquals(partition, appendedPart);
     verifyPartition(partition, table, partitionValues, "year=2017/month=may");
     verifyPartitionNames(table, Lists.newArrayList("year=2017/month=may"));
@@ -294,6 +296,7 @@ public class TestAppendPartitions extends MetaStoreClientTest {
     Assert.assertNotNull(appendedPart);
     Partition partition = client.getPartition(table.getDbName(), table.getTableName(),
         getPartitionValues(partitionName));
+    appendedPart.setWriteId(partition.getWriteId());
     Assert.assertEquals(partition, appendedPart);
     verifyPartition(partition, table, getPartitionValues(partitionName), partitionName);
     verifyPartitionNames(table, Lists.newArrayList("year=2017/month=march", "year=2017/month=april",
@@ -312,6 +315,7 @@ public class TestAppendPartitions extends MetaStoreClientTest {
     Assert.assertNotNull(appendedPart);
     Partition partition = client.getPartition(table.getDbName(), table.getTableName(),
         getPartitionValues(partitionName));
+    appendedPart.setWriteId(partition.getWriteId());
     Assert.assertEquals(partition, appendedPart);
     verifyPartition(partition, table, getPartitionValues(partitionName), partitionName);
     verifyPartitionNames(table, Lists.newArrayList(partitionName));
@@ -475,12 +479,14 @@ public class TestAppendPartitions extends MetaStoreClientTest {
     Assert.assertEquals("a1", created.getValues().get(0));
     Partition fetched =
         client.getPartition(catName, dbName, tableName, Collections.singletonList("a1"));
+    created.setWriteId(fetched.getWriteId());
     Assert.assertEquals(created, fetched);
 
     created = client.appendPartition(catName, dbName, tableName, "partcol=a2");
     Assert.assertEquals(1, created.getValuesSize());
     Assert.assertEquals("a2", created.getValues().get(0));
     fetched = client.getPartition(catName, dbName, tableName, Collections.singletonList("a2"));
+    created.setWriteId(fetched.getWriteId());
     Assert.assertEquals(created, fetched);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java
index efa3e7c..c1674bf 100644
--- a/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java
+++ b/standalone-metastore/metastore-common/src/test/java/org/apache/hadoop/hive/metastore/client/TestTablesCreateDropAlterTruncate.java
@@ -237,6 +237,7 @@ public class TestTablesCreateDropAlterTruncate extends MetaStoreClientTest {
     // Reset the parameters, so we can compare
     table.setParameters(createdTable.getParameters());
     table.setCreationMetadata(createdTable.getCreationMetadata());
+    table.setWriteId(createdTable.getWriteId());
     Assert.assertEquals("create/get table data", table, createdTable);
 
     // Check that the directory is created
@@ -703,6 +704,7 @@ public class TestTablesCreateDropAlterTruncate extends MetaStoreClientTest {
     // Some of the data is set on the server side, so reset those
     newTable.setCreateTime(alteredTable.getCreateTime());
     newTable.setCreationMetadata(alteredTable.getCreationMetadata());
+    newTable.setWriteId(alteredTable.getWriteId());
     Assert.assertEquals("The table data should be the same", newTable, alteredTable);
   }
 
@@ -916,13 +918,18 @@ public class TestTablesCreateDropAlterTruncate extends MetaStoreClientTest {
     client.alter_table(originalTable.getDbName(), originalTable.getTableName(), newTable);
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterTableNullTableNameInNew() throws Exception {
     Table originalTable = testTables[0];
     Table newTable = originalTable.deepCopy();
     newTable.setTableName(null);
 
-    client.alter_table(originalTable.getDbName(), originalTable.getTableName(), newTable);
+    try {
+      client.alter_table(originalTable.getDbName(), originalTable.getTableName(), newTable);
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+      // Expected.
+    }
   }
 
   @Test(expected = InvalidOperationException.class)
@@ -951,20 +958,28 @@ public class TestTablesCreateDropAlterTruncate extends MetaStoreClientTest {
     client.alter_table(originalTable.getDbName(), originalTable.getTableName(), newTable);
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterTableNullDatabase() throws Exception {
     Table originalTable = testTables[0];
     Table newTable = originalTable.deepCopy();
-
-    client.alter_table(null, originalTable.getTableName(), newTable);
+    try {
+      client.alter_table(null, originalTable.getTableName(), newTable);
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+    }
   }
 
-  @Test(expected = MetaException.class)
+  @Test
   public void testAlterTableNullTableName() throws Exception {
     Table originalTable = testTables[0];
     Table newTable = originalTable.deepCopy();
 
-    client.alter_table(originalTable.getDbName(), null, newTable);
+    try {
+      client.alter_table(originalTable.getDbName(), null, newTable);
+      Assert.fail("Expected exception");
+    } catch (MetaException | TProtocolException ex) {
+      // Expected.
+    }
   }
 
   @Test
@@ -977,7 +992,7 @@ public class TestTablesCreateDropAlterTruncate extends MetaStoreClientTest {
       Assert.fail("Expected a NullPointerException or TTransportException to be thrown");
     } catch (NullPointerException exception) {
       // Expected exception - Embedded MetaStore
-    } catch (TTransportException exception) {
+    } catch (TProtocolException exception) {
       // Expected exception - Remote MetaStore
     }
   }


[14/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRequest.java
index c8707ca..8309769 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRequest.java
@@ -1042,14 +1042,14 @@ import org.slf4j.LoggerFactory;
           case 3: // PARTITION_KEYS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list514 = iprot.readListBegin();
-                struct.partitionKeys = new ArrayList<FieldSchema>(_list514.size);
-                FieldSchema _elem515;
-                for (int _i516 = 0; _i516 < _list514.size; ++_i516)
+                org.apache.thrift.protocol.TList _list522 = iprot.readListBegin();
+                struct.partitionKeys = new ArrayList<FieldSchema>(_list522.size);
+                FieldSchema _elem523;
+                for (int _i524 = 0; _i524 < _list522.size; ++_i524)
                 {
-                  _elem515 = new FieldSchema();
-                  _elem515.read(iprot);
-                  struct.partitionKeys.add(_elem515);
+                  _elem523 = new FieldSchema();
+                  _elem523.read(iprot);
+                  struct.partitionKeys.add(_elem523);
                 }
                 iprot.readListEnd();
               }
@@ -1077,14 +1077,14 @@ import org.slf4j.LoggerFactory;
           case 6: // PARTITION_ORDER
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list517 = iprot.readListBegin();
-                struct.partitionOrder = new ArrayList<FieldSchema>(_list517.size);
-                FieldSchema _elem518;
-                for (int _i519 = 0; _i519 < _list517.size; ++_i519)
+                org.apache.thrift.protocol.TList _list525 = iprot.readListBegin();
+                struct.partitionOrder = new ArrayList<FieldSchema>(_list525.size);
+                FieldSchema _elem526;
+                for (int _i527 = 0; _i527 < _list525.size; ++_i527)
                 {
-                  _elem518 = new FieldSchema();
-                  _elem518.read(iprot);
-                  struct.partitionOrder.add(_elem518);
+                  _elem526 = new FieldSchema();
+                  _elem526.read(iprot);
+                  struct.partitionOrder.add(_elem526);
                 }
                 iprot.readListEnd();
               }
@@ -1144,9 +1144,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitionKeys.size()));
-          for (FieldSchema _iter520 : struct.partitionKeys)
+          for (FieldSchema _iter528 : struct.partitionKeys)
           {
-            _iter520.write(oprot);
+            _iter528.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1169,9 +1169,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(PARTITION_ORDER_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitionOrder.size()));
-            for (FieldSchema _iter521 : struct.partitionOrder)
+            for (FieldSchema _iter529 : struct.partitionOrder)
             {
-              _iter521.write(oprot);
+              _iter529.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -1216,9 +1216,9 @@ import org.slf4j.LoggerFactory;
       oprot.writeString(struct.tblName);
       {
         oprot.writeI32(struct.partitionKeys.size());
-        for (FieldSchema _iter522 : struct.partitionKeys)
+        for (FieldSchema _iter530 : struct.partitionKeys)
         {
-          _iter522.write(oprot);
+          _iter530.write(oprot);
         }
       }
       BitSet optionals = new BitSet();
@@ -1250,9 +1250,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartitionOrder()) {
         {
           oprot.writeI32(struct.partitionOrder.size());
-          for (FieldSchema _iter523 : struct.partitionOrder)
+          for (FieldSchema _iter531 : struct.partitionOrder)
           {
-            _iter523.write(oprot);
+            _iter531.write(oprot);
           }
         }
       }
@@ -1275,14 +1275,14 @@ import org.slf4j.LoggerFactory;
       struct.tblName = iprot.readString();
       struct.setTblNameIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list524 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.partitionKeys = new ArrayList<FieldSchema>(_list524.size);
-        FieldSchema _elem525;
-        for (int _i526 = 0; _i526 < _list524.size; ++_i526)
+        org.apache.thrift.protocol.TList _list532 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.partitionKeys = new ArrayList<FieldSchema>(_list532.size);
+        FieldSchema _elem533;
+        for (int _i534 = 0; _i534 < _list532.size; ++_i534)
         {
-          _elem525 = new FieldSchema();
-          _elem525.read(iprot);
-          struct.partitionKeys.add(_elem525);
+          _elem533 = new FieldSchema();
+          _elem533.read(iprot);
+          struct.partitionKeys.add(_elem533);
         }
       }
       struct.setPartitionKeysIsSet(true);
@@ -1297,14 +1297,14 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list527 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.partitionOrder = new ArrayList<FieldSchema>(_list527.size);
-          FieldSchema _elem528;
-          for (int _i529 = 0; _i529 < _list527.size; ++_i529)
+          org.apache.thrift.protocol.TList _list535 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.partitionOrder = new ArrayList<FieldSchema>(_list535.size);
+          FieldSchema _elem536;
+          for (int _i537 = 0; _i537 < _list535.size; ++_i537)
           {
-            _elem528 = new FieldSchema();
-            _elem528.read(iprot);
-            struct.partitionOrder.add(_elem528);
+            _elem536 = new FieldSchema();
+            _elem536.read(iprot);
+            struct.partitionOrder.add(_elem536);
           }
         }
         struct.setPartitionOrderIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesResponse.java
index e336aa1..7bf1c61 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PARTITION_VALUES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list538 = iprot.readListBegin();
-                struct.partitionValues = new ArrayList<PartitionValuesRow>(_list538.size);
-                PartitionValuesRow _elem539;
-                for (int _i540 = 0; _i540 < _list538.size; ++_i540)
+                org.apache.thrift.protocol.TList _list546 = iprot.readListBegin();
+                struct.partitionValues = new ArrayList<PartitionValuesRow>(_list546.size);
+                PartitionValuesRow _elem547;
+                for (int _i548 = 0; _i548 < _list546.size; ++_i548)
                 {
-                  _elem539 = new PartitionValuesRow();
-                  _elem539.read(iprot);
-                  struct.partitionValues.add(_elem539);
+                  _elem547 = new PartitionValuesRow();
+                  _elem547.read(iprot);
+                  struct.partitionValues.add(_elem547);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTITION_VALUES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitionValues.size()));
-          for (PartitionValuesRow _iter541 : struct.partitionValues)
+          for (PartitionValuesRow _iter549 : struct.partitionValues)
           {
-            _iter541.write(oprot);
+            _iter549.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.partitionValues.size());
-        for (PartitionValuesRow _iter542 : struct.partitionValues)
+        for (PartitionValuesRow _iter550 : struct.partitionValues)
         {
-          _iter542.write(oprot);
+          _iter550.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, PartitionValuesResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list543 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.partitionValues = new ArrayList<PartitionValuesRow>(_list543.size);
-        PartitionValuesRow _elem544;
-        for (int _i545 = 0; _i545 < _list543.size; ++_i545)
+        org.apache.thrift.protocol.TList _list551 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.partitionValues = new ArrayList<PartitionValuesRow>(_list551.size);
+        PartitionValuesRow _elem552;
+        for (int _i553 = 0; _i553 < _list551.size; ++_i553)
         {
-          _elem544 = new PartitionValuesRow();
-          _elem544.read(iprot);
-          struct.partitionValues.add(_elem544);
+          _elem552 = new PartitionValuesRow();
+          _elem552.read(iprot);
+          struct.partitionValues.add(_elem552);
         }
       }
       struct.setPartitionValuesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRow.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRow.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRow.java
index 082c6c2..4c384f6 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRow.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionValuesRow.java
@@ -351,13 +351,13 @@ import org.slf4j.LoggerFactory;
           case 1: // ROW
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list530 = iprot.readListBegin();
-                struct.row = new ArrayList<String>(_list530.size);
-                String _elem531;
-                for (int _i532 = 0; _i532 < _list530.size; ++_i532)
+                org.apache.thrift.protocol.TList _list538 = iprot.readListBegin();
+                struct.row = new ArrayList<String>(_list538.size);
+                String _elem539;
+                for (int _i540 = 0; _i540 < _list538.size; ++_i540)
                 {
-                  _elem531 = iprot.readString();
-                  struct.row.add(_elem531);
+                  _elem539 = iprot.readString();
+                  struct.row.add(_elem539);
                 }
                 iprot.readListEnd();
               }
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(ROW_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.row.size()));
-          for (String _iter533 : struct.row)
+          for (String _iter541 : struct.row)
           {
-            oprot.writeString(_iter533);
+            oprot.writeString(_iter541);
           }
           oprot.writeListEnd();
         }
@@ -410,9 +410,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.row.size());
-        for (String _iter534 : struct.row)
+        for (String _iter542 : struct.row)
         {
-          oprot.writeString(_iter534);
+          oprot.writeString(_iter542);
         }
       }
     }
@@ -421,13 +421,13 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, PartitionValuesRow struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list535 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.row = new ArrayList<String>(_list535.size);
-        String _elem536;
-        for (int _i537 = 0; _i537 < _list535.size; ++_i537)
+        org.apache.thrift.protocol.TList _list543 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.row = new ArrayList<String>(_list543.size);
+        String _elem544;
+        for (int _i545 = 0; _i545 < _list543.size; ++_i545)
         {
-          _elem536 = iprot.readString();
-          struct.row.add(_elem536);
+          _elem544 = iprot.readString();
+          struct.row.add(_elem544);
         }
       }
       struct.setRowIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java
index 5807618..d43be20 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionWithoutSD.java
@@ -766,13 +766,13 @@ import org.slf4j.LoggerFactory;
           case 1: // VALUES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list234 = iprot.readListBegin();
-                struct.values = new ArrayList<String>(_list234.size);
-                String _elem235;
-                for (int _i236 = 0; _i236 < _list234.size; ++_i236)
+                org.apache.thrift.protocol.TList _list242 = iprot.readListBegin();
+                struct.values = new ArrayList<String>(_list242.size);
+                String _elem243;
+                for (int _i244 = 0; _i244 < _list242.size; ++_i244)
                 {
-                  _elem235 = iprot.readString();
-                  struct.values.add(_elem235);
+                  _elem243 = iprot.readString();
+                  struct.values.add(_elem243);
                 }
                 iprot.readListEnd();
               }
@@ -808,15 +808,15 @@ import org.slf4j.LoggerFactory;
           case 5: // PARAMETERS
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map237 = iprot.readMapBegin();
-                struct.parameters = new HashMap<String,String>(2*_map237.size);
-                String _key238;
-                String _val239;
-                for (int _i240 = 0; _i240 < _map237.size; ++_i240)
+                org.apache.thrift.protocol.TMap _map245 = iprot.readMapBegin();
+                struct.parameters = new HashMap<String,String>(2*_map245.size);
+                String _key246;
+                String _val247;
+                for (int _i248 = 0; _i248 < _map245.size; ++_i248)
                 {
-                  _key238 = iprot.readString();
-                  _val239 = iprot.readString();
-                  struct.parameters.put(_key238, _val239);
+                  _key246 = iprot.readString();
+                  _val247 = iprot.readString();
+                  struct.parameters.put(_key246, _val247);
                 }
                 iprot.readMapEnd();
               }
@@ -851,9 +851,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(VALUES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size()));
-          for (String _iter241 : struct.values)
+          for (String _iter249 : struct.values)
           {
-            oprot.writeString(_iter241);
+            oprot.writeString(_iter249);
           }
           oprot.writeListEnd();
         }
@@ -874,10 +874,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
-          for (Map.Entry<String, String> _iter242 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter250 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter242.getKey());
-            oprot.writeString(_iter242.getValue());
+            oprot.writeString(_iter250.getKey());
+            oprot.writeString(_iter250.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -930,9 +930,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetValues()) {
         {
           oprot.writeI32(struct.values.size());
-          for (String _iter243 : struct.values)
+          for (String _iter251 : struct.values)
           {
-            oprot.writeString(_iter243);
+            oprot.writeString(_iter251);
           }
         }
       }
@@ -948,10 +948,10 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetParameters()) {
         {
           oprot.writeI32(struct.parameters.size());
-          for (Map.Entry<String, String> _iter244 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter252 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter244.getKey());
-            oprot.writeString(_iter244.getValue());
+            oprot.writeString(_iter252.getKey());
+            oprot.writeString(_iter252.getValue());
           }
         }
       }
@@ -966,13 +966,13 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(6);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list245 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.values = new ArrayList<String>(_list245.size);
-          String _elem246;
-          for (int _i247 = 0; _i247 < _list245.size; ++_i247)
+          org.apache.thrift.protocol.TList _list253 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.values = new ArrayList<String>(_list253.size);
+          String _elem254;
+          for (int _i255 = 0; _i255 < _list253.size; ++_i255)
           {
-            _elem246 = iprot.readString();
-            struct.values.add(_elem246);
+            _elem254 = iprot.readString();
+            struct.values.add(_elem254);
           }
         }
         struct.setValuesIsSet(true);
@@ -991,15 +991,15 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(4)) {
         {
-          org.apache.thrift.protocol.TMap _map248 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.parameters = new HashMap<String,String>(2*_map248.size);
-          String _key249;
-          String _val250;
-          for (int _i251 = 0; _i251 < _map248.size; ++_i251)
+          org.apache.thrift.protocol.TMap _map256 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.parameters = new HashMap<String,String>(2*_map256.size);
+          String _key257;
+          String _val258;
+          for (int _i259 = 0; _i259 < _map256.size; ++_i259)
           {
-            _key249 = iprot.readString();
-            _val250 = iprot.readString();
-            struct.parameters.put(_key249, _val250);
+            _key257 = iprot.readString();
+            _val258 = iprot.readString();
+            struct.parameters.put(_key257, _val258);
           }
         }
         struct.setParametersIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java
index 3f2ddcc..27cdac6 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsByExprResult.java
@@ -439,14 +439,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PARTITIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list416 = iprot.readListBegin();
-                struct.partitions = new ArrayList<Partition>(_list416.size);
-                Partition _elem417;
-                for (int _i418 = 0; _i418 < _list416.size; ++_i418)
+                org.apache.thrift.protocol.TList _list424 = iprot.readListBegin();
+                struct.partitions = new ArrayList<Partition>(_list424.size);
+                Partition _elem425;
+                for (int _i426 = 0; _i426 < _list424.size; ++_i426)
                 {
-                  _elem417 = new Partition();
-                  _elem417.read(iprot);
-                  struct.partitions.add(_elem417);
+                  _elem425 = new Partition();
+                  _elem425.read(iprot);
+                  struct.partitions.add(_elem425);
                 }
                 iprot.readListEnd();
               }
@@ -480,9 +480,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
-          for (Partition _iter419 : struct.partitions)
+          for (Partition _iter427 : struct.partitions)
           {
-            _iter419.write(oprot);
+            _iter427.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -510,9 +510,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.partitions.size());
-        for (Partition _iter420 : struct.partitions)
+        for (Partition _iter428 : struct.partitions)
         {
-          _iter420.write(oprot);
+          _iter428.write(oprot);
         }
       }
       oprot.writeBool(struct.hasUnknownPartitions);
@@ -522,14 +522,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsByExprResult struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list421 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.partitions = new ArrayList<Partition>(_list421.size);
-        Partition _elem422;
-        for (int _i423 = 0; _i423 < _list421.size; ++_i423)
+        org.apache.thrift.protocol.TList _list429 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.partitions = new ArrayList<Partition>(_list429.size);
+        Partition _elem430;
+        for (int _i431 = 0; _i431 < _list429.size; ++_i431)
         {
-          _elem422 = new Partition();
-          _elem422.read(iprot);
-          struct.partitions.add(_elem422);
+          _elem430 = new Partition();
+          _elem430.read(iprot);
+          struct.partitions.add(_elem430);
         }
       }
       struct.setPartitionsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java
index a298b89..b2d85f7 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsRequest.java
@@ -884,13 +884,13 @@ import org.slf4j.LoggerFactory;
           case 3: // COL_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list458 = iprot.readListBegin();
-                struct.colNames = new ArrayList<String>(_list458.size);
-                String _elem459;
-                for (int _i460 = 0; _i460 < _list458.size; ++_i460)
+                org.apache.thrift.protocol.TList _list466 = iprot.readListBegin();
+                struct.colNames = new ArrayList<String>(_list466.size);
+                String _elem467;
+                for (int _i468 = 0; _i468 < _list466.size; ++_i468)
                 {
-                  _elem459 = iprot.readString();
-                  struct.colNames.add(_elem459);
+                  _elem467 = iprot.readString();
+                  struct.colNames.add(_elem467);
                 }
                 iprot.readListEnd();
               }
@@ -902,13 +902,13 @@ import org.slf4j.LoggerFactory;
           case 4: // PART_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list461 = iprot.readListBegin();
-                struct.partNames = new ArrayList<String>(_list461.size);
-                String _elem462;
-                for (int _i463 = 0; _i463 < _list461.size; ++_i463)
+                org.apache.thrift.protocol.TList _list469 = iprot.readListBegin();
+                struct.partNames = new ArrayList<String>(_list469.size);
+                String _elem470;
+                for (int _i471 = 0; _i471 < _list469.size; ++_i471)
                 {
-                  _elem462 = iprot.readString();
-                  struct.partNames.add(_elem462);
+                  _elem470 = iprot.readString();
+                  struct.partNames.add(_elem470);
                 }
                 iprot.readListEnd();
               }
@@ -968,9 +968,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COL_NAMES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.colNames.size()));
-          for (String _iter464 : struct.colNames)
+          for (String _iter472 : struct.colNames)
           {
-            oprot.writeString(_iter464);
+            oprot.writeString(_iter472);
           }
           oprot.writeListEnd();
         }
@@ -980,9 +980,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PART_NAMES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size()));
-          for (String _iter465 : struct.partNames)
+          for (String _iter473 : struct.partNames)
           {
-            oprot.writeString(_iter465);
+            oprot.writeString(_iter473);
           }
           oprot.writeListEnd();
         }
@@ -1028,16 +1028,16 @@ import org.slf4j.LoggerFactory;
       oprot.writeString(struct.tblName);
       {
         oprot.writeI32(struct.colNames.size());
-        for (String _iter466 : struct.colNames)
+        for (String _iter474 : struct.colNames)
         {
-          oprot.writeString(_iter466);
+          oprot.writeString(_iter474);
         }
       }
       {
         oprot.writeI32(struct.partNames.size());
-        for (String _iter467 : struct.partNames)
+        for (String _iter475 : struct.partNames)
         {
-          oprot.writeString(_iter467);
+          oprot.writeString(_iter475);
         }
       }
       BitSet optionals = new BitSet();
@@ -1070,24 +1070,24 @@ import org.slf4j.LoggerFactory;
       struct.tblName = iprot.readString();
       struct.setTblNameIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list468 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.colNames = new ArrayList<String>(_list468.size);
-        String _elem469;
-        for (int _i470 = 0; _i470 < _list468.size; ++_i470)
+        org.apache.thrift.protocol.TList _list476 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.colNames = new ArrayList<String>(_list476.size);
+        String _elem477;
+        for (int _i478 = 0; _i478 < _list476.size; ++_i478)
         {
-          _elem469 = iprot.readString();
-          struct.colNames.add(_elem469);
+          _elem477 = iprot.readString();
+          struct.colNames.add(_elem477);
         }
       }
       struct.setColNamesIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list471 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.partNames = new ArrayList<String>(_list471.size);
-        String _elem472;
-        for (int _i473 = 0; _i473 < _list471.size; ++_i473)
+        org.apache.thrift.protocol.TList _list479 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.partNames = new ArrayList<String>(_list479.size);
+        String _elem480;
+        for (int _i481 = 0; _i481 < _list479.size; ++_i481)
         {
-          _elem472 = iprot.readString();
-          struct.partNames.add(_elem472);
+          _elem480 = iprot.readString();
+          struct.partNames.add(_elem480);
         }
       }
       struct.setPartNamesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java
index fe6130c..becfcc9 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionsStatsResult.java
@@ -444,26 +444,26 @@ import org.slf4j.LoggerFactory;
           case 1: // PART_STATS
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map432 = iprot.readMapBegin();
-                struct.partStats = new HashMap<String,List<ColumnStatisticsObj>>(2*_map432.size);
-                String _key433;
-                List<ColumnStatisticsObj> _val434;
-                for (int _i435 = 0; _i435 < _map432.size; ++_i435)
+                org.apache.thrift.protocol.TMap _map440 = iprot.readMapBegin();
+                struct.partStats = new HashMap<String,List<ColumnStatisticsObj>>(2*_map440.size);
+                String _key441;
+                List<ColumnStatisticsObj> _val442;
+                for (int _i443 = 0; _i443 < _map440.size; ++_i443)
                 {
-                  _key433 = iprot.readString();
+                  _key441 = iprot.readString();
                   {
-                    org.apache.thrift.protocol.TList _list436 = iprot.readListBegin();
-                    _val434 = new ArrayList<ColumnStatisticsObj>(_list436.size);
-                    ColumnStatisticsObj _elem437;
-                    for (int _i438 = 0; _i438 < _list436.size; ++_i438)
+                    org.apache.thrift.protocol.TList _list444 = iprot.readListBegin();
+                    _val442 = new ArrayList<ColumnStatisticsObj>(_list444.size);
+                    ColumnStatisticsObj _elem445;
+                    for (int _i446 = 0; _i446 < _list444.size; ++_i446)
                     {
-                      _elem437 = new ColumnStatisticsObj();
-                      _elem437.read(iprot);
-                      _val434.add(_elem437);
+                      _elem445 = new ColumnStatisticsObj();
+                      _elem445.read(iprot);
+                      _val442.add(_elem445);
                     }
                     iprot.readListEnd();
                   }
-                  struct.partStats.put(_key433, _val434);
+                  struct.partStats.put(_key441, _val442);
                 }
                 iprot.readMapEnd();
               }
@@ -497,14 +497,14 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PART_STATS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.partStats.size()));
-          for (Map.Entry<String, List<ColumnStatisticsObj>> _iter439 : struct.partStats.entrySet())
+          for (Map.Entry<String, List<ColumnStatisticsObj>> _iter447 : struct.partStats.entrySet())
           {
-            oprot.writeString(_iter439.getKey());
+            oprot.writeString(_iter447.getKey());
             {
-              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter439.getValue().size()));
-              for (ColumnStatisticsObj _iter440 : _iter439.getValue())
+              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter447.getValue().size()));
+              for (ColumnStatisticsObj _iter448 : _iter447.getValue())
               {
-                _iter440.write(oprot);
+                _iter448.write(oprot);
               }
               oprot.writeListEnd();
             }
@@ -537,14 +537,14 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.partStats.size());
-        for (Map.Entry<String, List<ColumnStatisticsObj>> _iter441 : struct.partStats.entrySet())
+        for (Map.Entry<String, List<ColumnStatisticsObj>> _iter449 : struct.partStats.entrySet())
         {
-          oprot.writeString(_iter441.getKey());
+          oprot.writeString(_iter449.getKey());
           {
-            oprot.writeI32(_iter441.getValue().size());
-            for (ColumnStatisticsObj _iter442 : _iter441.getValue())
+            oprot.writeI32(_iter449.getValue().size());
+            for (ColumnStatisticsObj _iter450 : _iter449.getValue())
             {
-              _iter442.write(oprot);
+              _iter450.write(oprot);
             }
           }
         }
@@ -563,25 +563,25 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, PartitionsStatsResult struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TMap _map443 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
-        struct.partStats = new HashMap<String,List<ColumnStatisticsObj>>(2*_map443.size);
-        String _key444;
-        List<ColumnStatisticsObj> _val445;
-        for (int _i446 = 0; _i446 < _map443.size; ++_i446)
+        org.apache.thrift.protocol.TMap _map451 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
+        struct.partStats = new HashMap<String,List<ColumnStatisticsObj>>(2*_map451.size);
+        String _key452;
+        List<ColumnStatisticsObj> _val453;
+        for (int _i454 = 0; _i454 < _map451.size; ++_i454)
         {
-          _key444 = iprot.readString();
+          _key452 = iprot.readString();
           {
-            org.apache.thrift.protocol.TList _list447 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-            _val445 = new ArrayList<ColumnStatisticsObj>(_list447.size);
-            ColumnStatisticsObj _elem448;
-            for (int _i449 = 0; _i449 < _list447.size; ++_i449)
+            org.apache.thrift.protocol.TList _list455 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+            _val453 = new ArrayList<ColumnStatisticsObj>(_list455.size);
+            ColumnStatisticsObj _elem456;
+            for (int _i457 = 0; _i457 < _list455.size; ++_i457)
             {
-              _elem448 = new ColumnStatisticsObj();
-              _elem448.read(iprot);
-              _val445.add(_elem448);
+              _elem456 = new ColumnStatisticsObj();
+              _elem456.read(iprot);
+              _val453.add(_elem456);
             }
           }
-          struct.partStats.put(_key444, _val445);
+          struct.partStats.put(_key452, _val453);
         }
       }
       struct.setPartStatsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java
index 0b776fb..db265ea 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrimaryKeysResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // PRIMARY_KEYS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list320 = iprot.readListBegin();
-                struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list320.size);
-                SQLPrimaryKey _elem321;
-                for (int _i322 = 0; _i322 < _list320.size; ++_i322)
+                org.apache.thrift.protocol.TList _list328 = iprot.readListBegin();
+                struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list328.size);
+                SQLPrimaryKey _elem329;
+                for (int _i330 = 0; _i330 < _list328.size; ++_i330)
                 {
-                  _elem321 = new SQLPrimaryKey();
-                  _elem321.read(iprot);
-                  struct.primaryKeys.add(_elem321);
+                  _elem329 = new SQLPrimaryKey();
+                  _elem329.read(iprot);
+                  struct.primaryKeys.add(_elem329);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PRIMARY_KEYS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.primaryKeys.size()));
-          for (SQLPrimaryKey _iter323 : struct.primaryKeys)
+          for (SQLPrimaryKey _iter331 : struct.primaryKeys)
           {
-            _iter323.write(oprot);
+            _iter331.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.primaryKeys.size());
-        for (SQLPrimaryKey _iter324 : struct.primaryKeys)
+        for (SQLPrimaryKey _iter332 : struct.primaryKeys)
         {
-          _iter324.write(oprot);
+          _iter332.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, PrimaryKeysResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list325 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list325.size);
-        SQLPrimaryKey _elem326;
-        for (int _i327 = 0; _i327 < _list325.size; ++_i327)
+        org.apache.thrift.protocol.TList _list333 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.primaryKeys = new ArrayList<SQLPrimaryKey>(_list333.size);
+        SQLPrimaryKey _elem334;
+        for (int _i335 = 0; _i335 < _list333.size; ++_i335)
         {
-          _elem326 = new SQLPrimaryKey();
-          _elem326.read(iprot);
-          struct.primaryKeys.add(_elem326);
+          _elem334 = new SQLPrimaryKey();
+          _elem334.read(iprot);
+          struct.primaryKeys.add(_elem334);
         }
       }
       struct.setPrimaryKeysIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
index 7d9ebba..e19034c 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PutFileMetadataRequest.java
@@ -547,13 +547,13 @@ import org.slf4j.LoggerFactory;
           case 1: // FILE_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list808 = iprot.readListBegin();
-                struct.fileIds = new ArrayList<Long>(_list808.size);
-                long _elem809;
-                for (int _i810 = 0; _i810 < _list808.size; ++_i810)
+                org.apache.thrift.protocol.TList _list816 = iprot.readListBegin();
+                struct.fileIds = new ArrayList<Long>(_list816.size);
+                long _elem817;
+                for (int _i818 = 0; _i818 < _list816.size; ++_i818)
                 {
-                  _elem809 = iprot.readI64();
-                  struct.fileIds.add(_elem809);
+                  _elem817 = iprot.readI64();
+                  struct.fileIds.add(_elem817);
                 }
                 iprot.readListEnd();
               }
@@ -565,13 +565,13 @@ import org.slf4j.LoggerFactory;
           case 2: // METADATA
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list811 = iprot.readListBegin();
-                struct.metadata = new ArrayList<ByteBuffer>(_list811.size);
-                ByteBuffer _elem812;
-                for (int _i813 = 0; _i813 < _list811.size; ++_i813)
+                org.apache.thrift.protocol.TList _list819 = iprot.readListBegin();
+                struct.metadata = new ArrayList<ByteBuffer>(_list819.size);
+                ByteBuffer _elem820;
+                for (int _i821 = 0; _i821 < _list819.size; ++_i821)
                 {
-                  _elem812 = iprot.readBinary();
-                  struct.metadata.add(_elem812);
+                  _elem820 = iprot.readBinary();
+                  struct.metadata.add(_elem820);
                 }
                 iprot.readListEnd();
               }
@@ -605,9 +605,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
-          for (long _iter814 : struct.fileIds)
+          for (long _iter822 : struct.fileIds)
           {
-            oprot.writeI64(_iter814);
+            oprot.writeI64(_iter822);
           }
           oprot.writeListEnd();
         }
@@ -617,9 +617,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(METADATA_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.metadata.size()));
-          for (ByteBuffer _iter815 : struct.metadata)
+          for (ByteBuffer _iter823 : struct.metadata)
           {
-            oprot.writeBinary(_iter815);
+            oprot.writeBinary(_iter823);
           }
           oprot.writeListEnd();
         }
@@ -651,16 +651,16 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.fileIds.size());
-        for (long _iter816 : struct.fileIds)
+        for (long _iter824 : struct.fileIds)
         {
-          oprot.writeI64(_iter816);
+          oprot.writeI64(_iter824);
         }
       }
       {
         oprot.writeI32(struct.metadata.size());
-        for (ByteBuffer _iter817 : struct.metadata)
+        for (ByteBuffer _iter825 : struct.metadata)
         {
-          oprot.writeBinary(_iter817);
+          oprot.writeBinary(_iter825);
         }
       }
       BitSet optionals = new BitSet();
@@ -677,24 +677,24 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, PutFileMetadataRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list818 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.fileIds = new ArrayList<Long>(_list818.size);
-        long _elem819;
-        for (int _i820 = 0; _i820 < _list818.size; ++_i820)
+        org.apache.thrift.protocol.TList _list826 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.fileIds = new ArrayList<Long>(_list826.size);
+        long _elem827;
+        for (int _i828 = 0; _i828 < _list826.size; ++_i828)
         {
-          _elem819 = iprot.readI64();
-          struct.fileIds.add(_elem819);
+          _elem827 = iprot.readI64();
+          struct.fileIds.add(_elem827);
         }
       }
       struct.setFileIdsIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list821 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.metadata = new ArrayList<ByteBuffer>(_list821.size);
-        ByteBuffer _elem822;
-        for (int _i823 = 0; _i823 < _list821.size; ++_i823)
+        org.apache.thrift.protocol.TList _list829 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.metadata = new ArrayList<ByteBuffer>(_list829.size);
+        ByteBuffer _elem830;
+        for (int _i831 = 0; _i831 < _list829.size; ++_i831)
         {
-          _elem822 = iprot.readBinary();
-          struct.metadata.add(_elem822);
+          _elem830 = iprot.readBinary();
+          struct.metadata.add(_elem830);
         }
       }
       struct.setMetadataIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ReplTblWriteIdStateRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ReplTblWriteIdStateRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ReplTblWriteIdStateRequest.java
index 0aeca14..f637d51 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ReplTblWriteIdStateRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ReplTblWriteIdStateRequest.java
@@ -813,13 +813,13 @@ import org.slf4j.LoggerFactory;
           case 6: // PART_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list602 = iprot.readListBegin();
-                struct.partNames = new ArrayList<String>(_list602.size);
-                String _elem603;
-                for (int _i604 = 0; _i604 < _list602.size; ++_i604)
+                org.apache.thrift.protocol.TList _list610 = iprot.readListBegin();
+                struct.partNames = new ArrayList<String>(_list610.size);
+                String _elem611;
+                for (int _i612 = 0; _i612 < _list610.size; ++_i612)
                 {
-                  _elem603 = iprot.readString();
-                  struct.partNames.add(_elem603);
+                  _elem611 = iprot.readString();
+                  struct.partNames.add(_elem611);
                 }
                 iprot.readListEnd();
               }
@@ -871,9 +871,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(PART_NAMES_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size()));
-            for (String _iter605 : struct.partNames)
+            for (String _iter613 : struct.partNames)
             {
-              oprot.writeString(_iter605);
+              oprot.writeString(_iter613);
             }
             oprot.writeListEnd();
           }
@@ -910,9 +910,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartNames()) {
         {
           oprot.writeI32(struct.partNames.size());
-          for (String _iter606 : struct.partNames)
+          for (String _iter614 : struct.partNames)
           {
-            oprot.writeString(_iter606);
+            oprot.writeString(_iter614);
           }
         }
       }
@@ -934,13 +934,13 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list607 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.partNames = new ArrayList<String>(_list607.size);
-          String _elem608;
-          for (int _i609 = 0; _i609 < _list607.size; ++_i609)
+          org.apache.thrift.protocol.TList _list615 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.partNames = new ArrayList<String>(_list615.size);
+          String _elem616;
+          for (int _i617 = 0; _i617 < _list615.size; ++_i617)
           {
-            _elem608 = iprot.readString();
-            struct.partNames.add(_elem608);
+            _elem616 = iprot.readString();
+            struct.partNames.add(_elem616);
           }
         }
         struct.setPartNamesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
index bad44ad..19de923 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RequestPartsSpec.java
@@ -168,13 +168,13 @@ import org.slf4j.LoggerFactory;
           if (field.type == NAMES_FIELD_DESC.type) {
             List<String> names;
             {
-              org.apache.thrift.protocol.TList _list498 = iprot.readListBegin();
-              names = new ArrayList<String>(_list498.size);
-              String _elem499;
-              for (int _i500 = 0; _i500 < _list498.size; ++_i500)
+              org.apache.thrift.protocol.TList _list506 = iprot.readListBegin();
+              names = new ArrayList<String>(_list506.size);
+              String _elem507;
+              for (int _i508 = 0; _i508 < _list506.size; ++_i508)
               {
-                _elem499 = iprot.readString();
-                names.add(_elem499);
+                _elem507 = iprot.readString();
+                names.add(_elem507);
               }
               iprot.readListEnd();
             }
@@ -187,14 +187,14 @@ import org.slf4j.LoggerFactory;
           if (field.type == EXPRS_FIELD_DESC.type) {
             List<DropPartitionsExpr> exprs;
             {
-              org.apache.thrift.protocol.TList _list501 = iprot.readListBegin();
-              exprs = new ArrayList<DropPartitionsExpr>(_list501.size);
-              DropPartitionsExpr _elem502;
-              for (int _i503 = 0; _i503 < _list501.size; ++_i503)
+              org.apache.thrift.protocol.TList _list509 = iprot.readListBegin();
+              exprs = new ArrayList<DropPartitionsExpr>(_list509.size);
+              DropPartitionsExpr _elem510;
+              for (int _i511 = 0; _i511 < _list509.size; ++_i511)
               {
-                _elem502 = new DropPartitionsExpr();
-                _elem502.read(iprot);
-                exprs.add(_elem502);
+                _elem510 = new DropPartitionsExpr();
+                _elem510.read(iprot);
+                exprs.add(_elem510);
               }
               iprot.readListEnd();
             }
@@ -219,9 +219,9 @@ import org.slf4j.LoggerFactory;
         List<String> names = (List<String>)value_;
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, names.size()));
-          for (String _iter504 : names)
+          for (String _iter512 : names)
           {
-            oprot.writeString(_iter504);
+            oprot.writeString(_iter512);
           }
           oprot.writeListEnd();
         }
@@ -230,9 +230,9 @@ import org.slf4j.LoggerFactory;
         List<DropPartitionsExpr> exprs = (List<DropPartitionsExpr>)value_;
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, exprs.size()));
-          for (DropPartitionsExpr _iter505 : exprs)
+          for (DropPartitionsExpr _iter513 : exprs)
           {
-            _iter505.write(oprot);
+            _iter513.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -250,13 +250,13 @@ import org.slf4j.LoggerFactory;
         case NAMES:
           List<String> names;
           {
-            org.apache.thrift.protocol.TList _list506 = iprot.readListBegin();
-            names = new ArrayList<String>(_list506.size);
-            String _elem507;
-            for (int _i508 = 0; _i508 < _list506.size; ++_i508)
+            org.apache.thrift.protocol.TList _list514 = iprot.readListBegin();
+            names = new ArrayList<String>(_list514.size);
+            String _elem515;
+            for (int _i516 = 0; _i516 < _list514.size; ++_i516)
             {
-              _elem507 = iprot.readString();
-              names.add(_elem507);
+              _elem515 = iprot.readString();
+              names.add(_elem515);
             }
             iprot.readListEnd();
           }
@@ -264,14 +264,14 @@ import org.slf4j.LoggerFactory;
         case EXPRS:
           List<DropPartitionsExpr> exprs;
           {
-            org.apache.thrift.protocol.TList _list509 = iprot.readListBegin();
-            exprs = new ArrayList<DropPartitionsExpr>(_list509.size);
-            DropPartitionsExpr _elem510;
-            for (int _i511 = 0; _i511 < _list509.size; ++_i511)
+            org.apache.thrift.protocol.TList _list517 = iprot.readListBegin();
+            exprs = new ArrayList<DropPartitionsExpr>(_list517.size);
+            DropPartitionsExpr _elem518;
+            for (int _i519 = 0; _i519 < _list517.size; ++_i519)
             {
-              _elem510 = new DropPartitionsExpr();
-              _elem510.read(iprot);
-              exprs.add(_elem510);
+              _elem518 = new DropPartitionsExpr();
+              _elem518.read(iprot);
+              exprs.add(_elem518);
             }
             iprot.readListEnd();
           }
@@ -291,9 +291,9 @@ import org.slf4j.LoggerFactory;
         List<String> names = (List<String>)value_;
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, names.size()));
-          for (String _iter512 : names)
+          for (String _iter520 : names)
           {
-            oprot.writeString(_iter512);
+            oprot.writeString(_iter520);
           }
           oprot.writeListEnd();
         }
@@ -302,9 +302,9 @@ import org.slf4j.LoggerFactory;
         List<DropPartitionsExpr> exprs = (List<DropPartitionsExpr>)value_;
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, exprs.size()));
-          for (DropPartitionsExpr _iter513 : exprs)
+          for (DropPartitionsExpr _iter521 : exprs)
           {
-            _iter513.write(oprot);
+            _iter521.write(oprot);
           }
           oprot.writeListEnd();
         }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java
index d49f1c4..b4cd16f 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java
@@ -445,14 +445,14 @@ import org.slf4j.LoggerFactory;
           case 1: // FIELD_SCHEMAS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list292 = iprot.readListBegin();
-                struct.fieldSchemas = new ArrayList<FieldSchema>(_list292.size);
-                FieldSchema _elem293;
-                for (int _i294 = 0; _i294 < _list292.size; ++_i294)
+                org.apache.thrift.protocol.TList _list300 = iprot.readListBegin();
+                struct.fieldSchemas = new ArrayList<FieldSchema>(_list300.size);
+                FieldSchema _elem301;
+                for (int _i302 = 0; _i302 < _list300.size; ++_i302)
                 {
-                  _elem293 = new FieldSchema();
-                  _elem293.read(iprot);
-                  struct.fieldSchemas.add(_elem293);
+                  _elem301 = new FieldSchema();
+                  _elem301.read(iprot);
+                  struct.fieldSchemas.add(_elem301);
                 }
                 iprot.readListEnd();
               }
@@ -464,15 +464,15 @@ import org.slf4j.LoggerFactory;
           case 2: // PROPERTIES
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map295 = iprot.readMapBegin();
-                struct.properties = new HashMap<String,String>(2*_map295.size);
-                String _key296;
-                String _val297;
-                for (int _i298 = 0; _i298 < _map295.size; ++_i298)
+                org.apache.thrift.protocol.TMap _map303 = iprot.readMapBegin();
+                struct.properties = new HashMap<String,String>(2*_map303.size);
+                String _key304;
+                String _val305;
+                for (int _i306 = 0; _i306 < _map303.size; ++_i306)
                 {
-                  _key296 = iprot.readString();
-                  _val297 = iprot.readString();
-                  struct.properties.put(_key296, _val297);
+                  _key304 = iprot.readString();
+                  _val305 = iprot.readString();
+                  struct.properties.put(_key304, _val305);
                 }
                 iprot.readMapEnd();
               }
@@ -498,9 +498,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fieldSchemas.size()));
-          for (FieldSchema _iter299 : struct.fieldSchemas)
+          for (FieldSchema _iter307 : struct.fieldSchemas)
           {
-            _iter299.write(oprot);
+            _iter307.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -510,10 +510,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
-          for (Map.Entry<String, String> _iter300 : struct.properties.entrySet())
+          for (Map.Entry<String, String> _iter308 : struct.properties.entrySet())
           {
-            oprot.writeString(_iter300.getKey());
-            oprot.writeString(_iter300.getValue());
+            oprot.writeString(_iter308.getKey());
+            oprot.writeString(_iter308.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -547,19 +547,19 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetFieldSchemas()) {
         {
           oprot.writeI32(struct.fieldSchemas.size());
-          for (FieldSchema _iter301 : struct.fieldSchemas)
+          for (FieldSchema _iter309 : struct.fieldSchemas)
           {
-            _iter301.write(oprot);
+            _iter309.write(oprot);
           }
         }
       }
       if (struct.isSetProperties()) {
         {
           oprot.writeI32(struct.properties.size());
-          for (Map.Entry<String, String> _iter302 : struct.properties.entrySet())
+          for (Map.Entry<String, String> _iter310 : struct.properties.entrySet())
           {
-            oprot.writeString(_iter302.getKey());
-            oprot.writeString(_iter302.getValue());
+            oprot.writeString(_iter310.getKey());
+            oprot.writeString(_iter310.getValue());
           }
         }
       }
@@ -571,29 +571,29 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list303 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.fieldSchemas = new ArrayList<FieldSchema>(_list303.size);
-          FieldSchema _elem304;
-          for (int _i305 = 0; _i305 < _list303.size; ++_i305)
+          org.apache.thrift.protocol.TList _list311 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.fieldSchemas = new ArrayList<FieldSchema>(_list311.size);
+          FieldSchema _elem312;
+          for (int _i313 = 0; _i313 < _list311.size; ++_i313)
           {
-            _elem304 = new FieldSchema();
-            _elem304.read(iprot);
-            struct.fieldSchemas.add(_elem304);
+            _elem312 = new FieldSchema();
+            _elem312.read(iprot);
+            struct.fieldSchemas.add(_elem312);
           }
         }
         struct.setFieldSchemasIsSet(true);
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TMap _map306 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.properties = new HashMap<String,String>(2*_map306.size);
-          String _key307;
-          String _val308;
-          for (int _i309 = 0; _i309 < _map306.size; ++_i309)
+          org.apache.thrift.protocol.TMap _map314 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.properties = new HashMap<String,String>(2*_map314.size);
+          String _key315;
+          String _val316;
+          for (int _i317 = 0; _i317 < _map314.size; ++_i317)
           {
-            _key307 = iprot.readString();
-            _val308 = iprot.readString();
-            struct.properties.put(_key307, _val308);
+            _key315 = iprot.readString();
+            _val316 = iprot.readString();
+            struct.properties.put(_key315, _val316);
           }
         }
         struct.setPropertiesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java
index 88d7e3f..dd16932 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java
@@ -1119,14 +1119,14 @@ import org.slf4j.LoggerFactory;
           case 4: // COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list936 = iprot.readListBegin();
-                struct.cols = new ArrayList<FieldSchema>(_list936.size);
-                FieldSchema _elem937;
-                for (int _i938 = 0; _i938 < _list936.size; ++_i938)
+                org.apache.thrift.protocol.TList _list944 = iprot.readListBegin();
+                struct.cols = new ArrayList<FieldSchema>(_list944.size);
+                FieldSchema _elem945;
+                for (int _i946 = 0; _i946 < _list944.size; ++_i946)
                 {
-                  _elem937 = new FieldSchema();
-                  _elem937.read(iprot);
-                  struct.cols.add(_elem937);
+                  _elem945 = new FieldSchema();
+                  _elem945.read(iprot);
+                  struct.cols.add(_elem945);
                 }
                 iprot.readListEnd();
               }
@@ -1212,9 +1212,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cols.size()));
-          for (FieldSchema _iter939 : struct.cols)
+          for (FieldSchema _iter947 : struct.cols)
           {
-            _iter939.write(oprot);
+            _iter947.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1323,9 +1323,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetCols()) {
         {
           oprot.writeI32(struct.cols.size());
-          for (FieldSchema _iter940 : struct.cols)
+          for (FieldSchema _iter948 : struct.cols)
           {
-            _iter940.write(oprot);
+            _iter948.write(oprot);
           }
         }
       }
@@ -1368,14 +1368,14 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(3)) {
         {
-          org.apache.thrift.protocol.TList _list941 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.cols = new ArrayList<FieldSchema>(_list941.size);
-          FieldSchema _elem942;
-          for (int _i943 = 0; _i943 < _list941.size; ++_i943)
+          org.apache.thrift.protocol.TList _list949 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.cols = new ArrayList<FieldSchema>(_list949.size);
+          FieldSchema _elem950;
+          for (int _i951 = 0; _i951 < _list949.size; ++_i951)
           {
-            _elem942 = new FieldSchema();
-            _elem942.read(iprot);
-            struct.cols.add(_elem942);
+            _elem950 = new FieldSchema();
+            _elem950.read(iprot);
+            struct.cols.add(_elem950);
           }
         }
         struct.setColsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
index 671c43e..e3adb13 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
@@ -859,15 +859,15 @@ import org.slf4j.LoggerFactory;
           case 3: // PARAMETERS
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map112 = iprot.readMapBegin();
-                struct.parameters = new HashMap<String,String>(2*_map112.size);
-                String _key113;
-                String _val114;
-                for (int _i115 = 0; _i115 < _map112.size; ++_i115)
+                org.apache.thrift.protocol.TMap _map120 = iprot.readMapBegin();
+                struct.parameters = new HashMap<String,String>(2*_map120.size);
+                String _key121;
+                String _val122;
+                for (int _i123 = 0; _i123 < _map120.size; ++_i123)
                 {
-                  _key113 = iprot.readString();
-                  _val114 = iprot.readString();
-                  struct.parameters.put(_key113, _val114);
+                  _key121 = iprot.readString();
+                  _val122 = iprot.readString();
+                  struct.parameters.put(_key121, _val122);
                 }
                 iprot.readMapEnd();
               }
@@ -935,10 +935,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
-          for (Map.Entry<String, String> _iter116 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter124 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter116.getKey());
-            oprot.writeString(_iter116.getValue());
+            oprot.writeString(_iter124.getKey());
+            oprot.writeString(_iter124.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -1021,10 +1021,10 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetParameters()) {
         {
           oprot.writeI32(struct.parameters.size());
-          for (Map.Entry<String, String> _iter117 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter125 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter117.getKey());
-            oprot.writeString(_iter117.getValue());
+            oprot.writeString(_iter125.getKey());
+            oprot.writeString(_iter125.getValue());
           }
         }
       }
@@ -1056,15 +1056,15 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TMap _map118 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.parameters = new HashMap<String,String>(2*_map118.size);
-          String _key119;
-          String _val120;
-          for (int _i121 = 0; _i121 < _map118.size; ++_i121)
+          org.apache.thrift.protocol.TMap _map126 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.parameters = new HashMap<String,String>(2*_map126.size);
+          String _key127;
+          String _val128;
+          for (int _i129 = 0; _i129 < _map126.size; ++_i129)
           {
-            _key119 = iprot.readString();
-            _val120 = iprot.readString();
-            struct.parameters.put(_key119, _val120);
+            _key127 = iprot.readString();
+            _val128 = iprot.readString();
+            struct.parameters.put(_key127, _val128);
           }
         }
         struct.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(struct.parameters); struct.setParametersIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java
index 2053e3e..0b38840 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsRequest.java
@@ -672,14 +672,14 @@ import org.slf4j.LoggerFactory;
           case 1: // COL_STATS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list284 = iprot.readListBegin();
-                struct.colStats = new ArrayList<ColumnStatistics>(_list284.size);
-                ColumnStatistics _elem285;
-                for (int _i286 = 0; _i286 < _list284.size; ++_i286)
+                org.apache.thrift.protocol.TList _list292 = iprot.readListBegin();
+                struct.colStats = new ArrayList<ColumnStatistics>(_list292.size);
+                ColumnStatistics _elem293;
+                for (int _i294 = 0; _i294 < _list292.size; ++_i294)
                 {
-                  _elem285 = new ColumnStatistics();
-                  _elem285.read(iprot);
-                  struct.colStats.add(_elem285);
+                  _elem293 = new ColumnStatistics();
+                  _elem293.read(iprot);
+                  struct.colStats.add(_elem293);
                 }
                 iprot.readListEnd();
               }
@@ -737,9 +737,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COL_STATS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.colStats.size()));
-          for (ColumnStatistics _iter287 : struct.colStats)
+          for (ColumnStatistics _iter295 : struct.colStats)
           {
-            _iter287.write(oprot);
+            _iter295.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -786,9 +786,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.colStats.size());
-        for (ColumnStatistics _iter288 : struct.colStats)
+        for (ColumnStatistics _iter296 : struct.colStats)
         {
-          _iter288.write(oprot);
+          _iter296.write(oprot);
         }
       }
       BitSet optionals = new BitSet();
@@ -823,14 +823,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, SetPartitionsStatsRequest struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list289 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.colStats = new ArrayList<ColumnStatistics>(_list289.size);
-        ColumnStatistics _elem290;
-        for (int _i291 = 0; _i291 < _list289.size; ++_i291)
+        org.apache.thrift.protocol.TList _list297 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.colStats = new ArrayList<ColumnStatistics>(_list297.size);
+        ColumnStatistics _elem298;
+        for (int _i299 = 0; _i299 < _list297.size; ++_i299)
         {
-          _elem290 = new ColumnStatistics();
-          _elem290.read(iprot);
-          struct.colStats.add(_elem290);
+          _elem298 = new ColumnStatistics();
+          _elem298.read(iprot);
+          struct.colStats.add(_elem298);
         }
       }
       struct.setColStatsIsSet(true);


[02/20] hive git commit: HIVE-20147: Hive streaming ingest is contented on synchronized logging (Prasanth Jayachandran reviewed by Sergey Shelukhin)

Posted by se...@apache.org.
HIVE-20147: Hive streaming ingest is contented on synchronized logging (Prasanth Jayachandran reviewed by Sergey Shelukhin)


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

Branch: refs/heads/master-txnstats
Commit: 9c5c9409b544fea240235d8902dca8853d63d834
Parents: d8306cf
Author: Prasanth Jayachandran <pr...@apache.org>
Authored: Fri Jul 13 12:57:04 2018 -0700
Committer: Prasanth Jayachandran <pr...@apache.org>
Committed: Fri Jul 13 12:57:04 2018 -0700

----------------------------------------------------------------------
 .../hive/streaming/AbstractRecordWriter.java    | 52 ++++++++++++++------
 .../hive/streaming/HiveStreamingConnection.java |  4 +-
 2 files changed, 40 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/9c5c9409/streaming/src/java/org/apache/hive/streaming/AbstractRecordWriter.java
----------------------------------------------------------------------
diff --git a/streaming/src/java/org/apache/hive/streaming/AbstractRecordWriter.java b/streaming/src/java/org/apache/hive/streaming/AbstractRecordWriter.java
index 2980028..9e90d36 100644
--- a/streaming/src/java/org/apache/hive/streaming/AbstractRecordWriter.java
+++ b/streaming/src/java/org/apache/hive/streaming/AbstractRecordWriter.java
@@ -142,7 +142,9 @@ public abstract class AbstractRecordWriter implements RecordWriter {
     try {
       URI uri = new URI(location);
       this.fs = FileSystem.newInstance(uri, conf);
-      LOG.info("Created new filesystem instance: {}", System.identityHashCode(this.fs));
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Created new filesystem instance: {}", System.identityHashCode(this.fs));
+      }
     } catch (URISyntaxException e) {
       throw new StreamingException("Unable to create URI from location: " + location, e);
     } catch (IOException e) {
@@ -197,7 +199,7 @@ public abstract class AbstractRecordWriter implements RecordWriter {
     this.autoFlush = conf.getBoolVar(HiveConf.ConfVars.HIVE_STREAMING_AUTO_FLUSH_ENABLED);
     this.memoryUsageThreshold = conf.getFloatVar(HiveConf.ConfVars.HIVE_HEAP_MEMORY_MONITOR_USAGE_THRESHOLD);
     this.ingestSizeThreshold = conf.getSizeVar(HiveConf.ConfVars.HIVE_STREAMING_AUTO_FLUSH_CHECK_INTERVAL_SIZE);
-    LOG.info("Memory monitorings settings - autoFlush: {} memoryUsageThreshold: {} ingestSizeThreshold: {}",
+    LOG.info("Memory monitoring settings - autoFlush: {} memoryUsageThreshold: {} ingestSizeThreshold: {}",
       autoFlush, memoryUsageThreshold, ingestSizeBytes);
     this.heapMemoryMonitor = new HeapMemoryMonitor(memoryUsageThreshold);
     MemoryUsage tenuredMemUsage = heapMemoryMonitor.getTenuredGenMemoryUsage();
@@ -329,9 +331,13 @@ public abstract class AbstractRecordWriter implements RecordWriter {
   @Override
   public void flush() throws StreamingIOFailure {
     try {
-      logStats("Stats before flush:");
+      if (LOG.isDebugEnabled()) {
+        logStats("Stats before flush:");
+      }
       for (Map.Entry<String, List<RecordUpdater>> entry : updaters.entrySet()) {
-        LOG.info("Flushing record updater for partitions: {}", entry.getKey());
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Flushing record updater for partitions: {}", entry.getKey());
+        }
         for (RecordUpdater updater : entry.getValue()) {
           if (updater != null) {
             updater.flush();
@@ -339,7 +345,9 @@ public abstract class AbstractRecordWriter implements RecordWriter {
         }
       }
       ingestSizeBytes = 0;
-      logStats("Stats after flush:");
+      if (LOG.isDebugEnabled()) {
+        logStats("Stats after flush:");
+      }
     } catch (IOException e) {
       throw new StreamingIOFailure("Unable to flush recordUpdater", e);
     }
@@ -349,10 +357,14 @@ public abstract class AbstractRecordWriter implements RecordWriter {
   public void close() throws StreamingIOFailure {
     boolean haveError = false;
     String partition = null;
-    logStats("Stats before close:");
+    if (LOG.isDebugEnabled()) {
+      logStats("Stats before close:");
+    }
     for (Map.Entry<String, List<RecordUpdater>> entry : updaters.entrySet()) {
       partition = entry.getKey();
-      LOG.info("Closing updater for partitions: {}", partition);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Closing updater for partitions: {}", partition);
+      }
       for (RecordUpdater updater : entry.getValue()) {
         if (updater != null) {
           try {
@@ -367,7 +379,9 @@ public abstract class AbstractRecordWriter implements RecordWriter {
       entry.getValue().clear();
     }
     updaters.clear();
-    logStats("Stats after close:");
+    if (LOG.isDebugEnabled()) {
+      logStats("Stats after close:");
+    }
     if (haveError) {
       throw new StreamingIOFailure("Encountered errors while closing (see logs) " + getWatermark(partition));
     }
@@ -432,8 +446,10 @@ public abstract class AbstractRecordWriter implements RecordWriter {
     }
     if (lowMemoryCanary != null) {
       if (lowMemoryCanary.get() && ingestSizeBytes > ingestSizeThreshold) {
-        LOG.info("Low memory canary is set and ingestion size (buffered) threshold '{}' exceeded. " +
-          "Flushing all record updaters..", LlapUtil.humanReadableByteCount(ingestSizeThreshold));
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Low memory canary is set and ingestion size (buffered) threshold '{}' exceeded. " +
+            "Flushing all record updaters..", LlapUtil.humanReadableByteCount(ingestSizeThreshold));
+        }
         flush();
         conn.getConnectionStats().incrementAutoFlushCount();
         lowMemoryCanary.set(false);
@@ -444,8 +460,10 @@ public abstract class AbstractRecordWriter implements RecordWriter {
         MemoryUsage heapUsage = mxBean.getHeapMemoryUsage();
         float memUsedFraction = ((float) heapUsage.getUsed() / (float) heapUsage.getMax());
         if (memUsedFraction > memoryUsageThreshold) {
-          LOG.info("Memory usage threshold '{}' and ingestion size (buffered) threshold '{}' exceeded. " +
-            "Flushing all record updaters..", memUsedFraction, LlapUtil.humanReadableByteCount(ingestSizeThreshold));
+          if (LOG.isDebugEnabled()) {
+            LOG.info("Memory usage threshold '{}' and ingestion size (buffered) threshold '{}' exceeded. " +
+              "Flushing all record updaters..", memUsedFraction, LlapUtil.humanReadableByteCount(ingestSizeThreshold));
+          }
           flush();
           conn.getConnectionStats().incrementAutoFlushCount();
         }
@@ -498,9 +516,13 @@ public abstract class AbstractRecordWriter implements RecordWriter {
           // partitions to TxnHandler
           if (!partitionInfo.isExists()) {
             addedPartitions.add(partitionInfo.getName());
-            LOG.info("Created partition {} for table {}", partitionInfo.getName(), fullyQualifiedTableName);
+            if (LOG.isDebugEnabled()) {
+              LOG.debug("Created partition {} for table {}", partitionInfo.getName(), fullyQualifiedTableName);
+            }
           } else {
-            LOG.info("Partition {} already exists for table {}", partitionInfo.getName(), fullyQualifiedTableName);
+            if (LOG.isDebugEnabled()) {
+              LOG.debug("Partition {} already exists for table {}", partitionInfo.getName(), fullyQualifiedTableName);
+            }
           }
           destLocation = new Path(partitionInfo.getPartitionLocation());
         }
@@ -550,7 +572,7 @@ public abstract class AbstractRecordWriter implements RecordWriter {
       oldGenUsage = "used/max => " + LlapUtil.humanReadableByteCount(memoryUsage.getUsed()) + "/" +
         LlapUtil.humanReadableByteCount(memoryUsage.getMax());
     }
-    LOG.info("{} [record-updaters: {}, partitions: {}, buffered-records: {} total-records: {} " +
+    LOG.debug("{} [record-updaters: {}, partitions: {}, buffered-records: {} total-records: {} " +
         "buffered-ingest-size: {}, total-ingest-size: {} tenured-memory-usage: {}]", prefix, openRecordUpdaters,
       partitionPaths.size(), bufferedRecords, conn.getConnectionStats().getRecordsWritten(),
       LlapUtil.humanReadableByteCount(ingestSizeBytes),

http://git-wip-us.apache.org/repos/asf/hive/blob/9c5c9409/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java
----------------------------------------------------------------------
diff --git a/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java b/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java
index 7adbadd..6cf14b0 100644
--- a/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java
+++ b/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java
@@ -552,7 +552,9 @@ public class HiveStreamingConnection implements StreamingConnection {
       getMSC().close();
       getHeatbeatMSC().close();
     }
-    LOG.info("Closed streaming connection. Agent: {} Stats: {}", getAgentInfo(), getConnectionStats());
+    if (LOG.isInfoEnabled()) {
+      LOG.info("Closed streaming connection. Agent: {} Stats: {}", getAgentInfo(), getConnectionStats());
+    }
   }
 
   @Override


[13/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsResponse.java
new file mode 100644
index 0000000..17ce69d
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SetPartitionsStatsResponse.java
@@ -0,0 +1,387 @@
+/**
+ * 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 org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class SetPartitionsStatsResponse implements org.apache.thrift.TBase<SetPartitionsStatsResponse, SetPartitionsStatsResponse._Fields>, java.io.Serializable, Cloneable, Comparable<SetPartitionsStatsResponse> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SetPartitionsStatsResponse");
+
+  private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.BOOL, (short)1);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SetPartitionsStatsResponseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SetPartitionsStatsResponseTupleSchemeFactory());
+  }
+
+  private boolean result; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    RESULT((short)1, "result");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // RESULT
+          return RESULT;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __RESULT_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  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);
+    tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SetPartitionsStatsResponse.class, metaDataMap);
+  }
+
+  public SetPartitionsStatsResponse() {
+  }
+
+  public SetPartitionsStatsResponse(
+    boolean result)
+  {
+    this();
+    this.result = result;
+    setResultIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public SetPartitionsStatsResponse(SetPartitionsStatsResponse other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.result = other.result;
+  }
+
+  public SetPartitionsStatsResponse deepCopy() {
+    return new SetPartitionsStatsResponse(this);
+  }
+
+  @Override
+  public void clear() {
+    setResultIsSet(false);
+    this.result = false;
+  }
+
+  public boolean isResult() {
+    return this.result;
+  }
+
+  public void setResult(boolean result) {
+    this.result = result;
+    setResultIsSet(true);
+  }
+
+  public void unsetResult() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULT_ISSET_ID);
+  }
+
+  /** Returns true if field result is set (has been assigned a value) and false otherwise */
+  public boolean isSetResult() {
+    return EncodingUtils.testBit(__isset_bitfield, __RESULT_ISSET_ID);
+  }
+
+  public void setResultIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULT_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case RESULT:
+      if (value == null) {
+        unsetResult();
+      } else {
+        setResult((Boolean)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case RESULT:
+      return isResult();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case RESULT:
+      return isSetResult();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof SetPartitionsStatsResponse)
+      return this.equals((SetPartitionsStatsResponse)that);
+    return false;
+  }
+
+  public boolean equals(SetPartitionsStatsResponse that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_result = true;
+    boolean that_present_result = true;
+    if (this_present_result || that_present_result) {
+      if (!(this_present_result && that_present_result))
+        return false;
+      if (this.result != that.result)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_result = true;
+    list.add(present_result);
+    if (present_result)
+      list.add(result);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(SetPartitionsStatsResponse other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetResult()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("SetPartitionsStatsResponse(");
+    boolean first = true;
+
+    sb.append("result:");
+    sb.append(this.result);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetResult()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'result' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  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);
+    }
+  }
+
+  private static class SetPartitionsStatsResponseStandardSchemeFactory implements SchemeFactory {
+    public SetPartitionsStatsResponseStandardScheme getScheme() {
+      return new SetPartitionsStatsResponseStandardScheme();
+    }
+  }
+
+  private static class SetPartitionsStatsResponseStandardScheme extends StandardScheme<SetPartitionsStatsResponse> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, SetPartitionsStatsResponse struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.result = iprot.readBool();
+              struct.setResultIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, SetPartitionsStatsResponse struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(RESULT_FIELD_DESC);
+      oprot.writeBool(struct.result);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SetPartitionsStatsResponseTupleSchemeFactory implements SchemeFactory {
+    public SetPartitionsStatsResponseTupleScheme getScheme() {
+      return new SetPartitionsStatsResponseTupleScheme();
+    }
+  }
+
+  private static class SetPartitionsStatsResponseTupleScheme extends TupleScheme<SetPartitionsStatsResponse> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, SetPartitionsStatsResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBool(struct.result);
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, SetPartitionsStatsResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.result = iprot.readBool();
+      struct.setResultIsSet(true);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
index 9fb037f..c58885f 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // COMPACTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list700 = iprot.readListBegin();
-                struct.compacts = new ArrayList<ShowCompactResponseElement>(_list700.size);
-                ShowCompactResponseElement _elem701;
-                for (int _i702 = 0; _i702 < _list700.size; ++_i702)
+                org.apache.thrift.protocol.TList _list708 = iprot.readListBegin();
+                struct.compacts = new ArrayList<ShowCompactResponseElement>(_list708.size);
+                ShowCompactResponseElement _elem709;
+                for (int _i710 = 0; _i710 < _list708.size; ++_i710)
                 {
-                  _elem701 = new ShowCompactResponseElement();
-                  _elem701.read(iprot);
-                  struct.compacts.add(_elem701);
+                  _elem709 = new ShowCompactResponseElement();
+                  _elem709.read(iprot);
+                  struct.compacts.add(_elem709);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COMPACTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.compacts.size()));
-          for (ShowCompactResponseElement _iter703 : struct.compacts)
+          for (ShowCompactResponseElement _iter711 : struct.compacts)
           {
-            _iter703.write(oprot);
+            _iter711.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.compacts.size());
-        for (ShowCompactResponseElement _iter704 : struct.compacts)
+        for (ShowCompactResponseElement _iter712 : struct.compacts)
         {
-          _iter704.write(oprot);
+          _iter712.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list705 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.compacts = new ArrayList<ShowCompactResponseElement>(_list705.size);
-        ShowCompactResponseElement _elem706;
-        for (int _i707 = 0; _i707 < _list705.size; ++_i707)
+        org.apache.thrift.protocol.TList _list713 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.compacts = new ArrayList<ShowCompactResponseElement>(_list713.size);
+        ShowCompactResponseElement _elem714;
+        for (int _i715 = 0; _i715 < _list713.size; ++_i715)
         {
-          _elem706 = new ShowCompactResponseElement();
-          _elem706.read(iprot);
-          struct.compacts.add(_elem706);
+          _elem714 = new ShowCompactResponseElement();
+          _elem714.read(iprot);
+          struct.compacts.add(_elem714);
         }
       }
       struct.setCompactsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
index e0db2f7..4bbc8e7 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponse.java
@@ -350,14 +350,14 @@ import org.slf4j.LoggerFactory;
           case 1: // LOCKS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list666 = iprot.readListBegin();
-                struct.locks = new ArrayList<ShowLocksResponseElement>(_list666.size);
-                ShowLocksResponseElement _elem667;
-                for (int _i668 = 0; _i668 < _list666.size; ++_i668)
+                org.apache.thrift.protocol.TList _list674 = iprot.readListBegin();
+                struct.locks = new ArrayList<ShowLocksResponseElement>(_list674.size);
+                ShowLocksResponseElement _elem675;
+                for (int _i676 = 0; _i676 < _list674.size; ++_i676)
                 {
-                  _elem667 = new ShowLocksResponseElement();
-                  _elem667.read(iprot);
-                  struct.locks.add(_elem667);
+                  _elem675 = new ShowLocksResponseElement();
+                  _elem675.read(iprot);
+                  struct.locks.add(_elem675);
                 }
                 iprot.readListEnd();
               }
@@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(LOCKS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.locks.size()));
-          for (ShowLocksResponseElement _iter669 : struct.locks)
+          for (ShowLocksResponseElement _iter677 : struct.locks)
           {
-            _iter669.write(oprot);
+            _iter677.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -416,9 +416,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetLocks()) {
         {
           oprot.writeI32(struct.locks.size());
-          for (ShowLocksResponseElement _iter670 : struct.locks)
+          for (ShowLocksResponseElement _iter678 : struct.locks)
           {
-            _iter670.write(oprot);
+            _iter678.write(oprot);
           }
         }
       }
@@ -430,14 +430,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list671 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.locks = new ArrayList<ShowLocksResponseElement>(_list671.size);
-          ShowLocksResponseElement _elem672;
-          for (int _i673 = 0; _i673 < _list671.size; ++_i673)
+          org.apache.thrift.protocol.TList _list679 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.locks = new ArrayList<ShowLocksResponseElement>(_list679.size);
+          ShowLocksResponseElement _elem680;
+          for (int _i681 = 0; _i681 < _list679.size; ++_i681)
           {
-            _elem672 = new ShowLocksResponseElement();
-            _elem672.read(iprot);
-            struct.locks.add(_elem672);
+            _elem680 = new ShowLocksResponseElement();
+            _elem680.read(iprot);
+            struct.locks.add(_elem680);
           }
         }
         struct.setLocksIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java
index 89fe49a..0bef251 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java
@@ -557,13 +557,13 @@ import org.slf4j.LoggerFactory;
           case 1: // SKEWED_COL_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list122 = iprot.readListBegin();
-                struct.skewedColNames = new ArrayList<String>(_list122.size);
-                String _elem123;
-                for (int _i124 = 0; _i124 < _list122.size; ++_i124)
+                org.apache.thrift.protocol.TList _list130 = iprot.readListBegin();
+                struct.skewedColNames = new ArrayList<String>(_list130.size);
+                String _elem131;
+                for (int _i132 = 0; _i132 < _list130.size; ++_i132)
                 {
-                  _elem123 = iprot.readString();
-                  struct.skewedColNames.add(_elem123);
+                  _elem131 = iprot.readString();
+                  struct.skewedColNames.add(_elem131);
                 }
                 iprot.readListEnd();
               }
@@ -575,23 +575,23 @@ import org.slf4j.LoggerFactory;
           case 2: // SKEWED_COL_VALUES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list125 = iprot.readListBegin();
-                struct.skewedColValues = new ArrayList<List<String>>(_list125.size);
-                List<String> _elem126;
-                for (int _i127 = 0; _i127 < _list125.size; ++_i127)
+                org.apache.thrift.protocol.TList _list133 = iprot.readListBegin();
+                struct.skewedColValues = new ArrayList<List<String>>(_list133.size);
+                List<String> _elem134;
+                for (int _i135 = 0; _i135 < _list133.size; ++_i135)
                 {
                   {
-                    org.apache.thrift.protocol.TList _list128 = iprot.readListBegin();
-                    _elem126 = new ArrayList<String>(_list128.size);
-                    String _elem129;
-                    for (int _i130 = 0; _i130 < _list128.size; ++_i130)
+                    org.apache.thrift.protocol.TList _list136 = iprot.readListBegin();
+                    _elem134 = new ArrayList<String>(_list136.size);
+                    String _elem137;
+                    for (int _i138 = 0; _i138 < _list136.size; ++_i138)
                     {
-                      _elem129 = iprot.readString();
-                      _elem126.add(_elem129);
+                      _elem137 = iprot.readString();
+                      _elem134.add(_elem137);
                     }
                     iprot.readListEnd();
                   }
-                  struct.skewedColValues.add(_elem126);
+                  struct.skewedColValues.add(_elem134);
                 }
                 iprot.readListEnd();
               }
@@ -603,25 +603,25 @@ import org.slf4j.LoggerFactory;
           case 3: // SKEWED_COL_VALUE_LOCATION_MAPS
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map131 = iprot.readMapBegin();
-                struct.skewedColValueLocationMaps = new HashMap<List<String>,String>(2*_map131.size);
-                List<String> _key132;
-                String _val133;
-                for (int _i134 = 0; _i134 < _map131.size; ++_i134)
+                org.apache.thrift.protocol.TMap _map139 = iprot.readMapBegin();
+                struct.skewedColValueLocationMaps = new HashMap<List<String>,String>(2*_map139.size);
+                List<String> _key140;
+                String _val141;
+                for (int _i142 = 0; _i142 < _map139.size; ++_i142)
                 {
                   {
-                    org.apache.thrift.protocol.TList _list135 = iprot.readListBegin();
-                    _key132 = new ArrayList<String>(_list135.size);
-                    String _elem136;
-                    for (int _i137 = 0; _i137 < _list135.size; ++_i137)
+                    org.apache.thrift.protocol.TList _list143 = iprot.readListBegin();
+                    _key140 = new ArrayList<String>(_list143.size);
+                    String _elem144;
+                    for (int _i145 = 0; _i145 < _list143.size; ++_i145)
                     {
-                      _elem136 = iprot.readString();
-                      _key132.add(_elem136);
+                      _elem144 = iprot.readString();
+                      _key140.add(_elem144);
                     }
                     iprot.readListEnd();
                   }
-                  _val133 = iprot.readString();
-                  struct.skewedColValueLocationMaps.put(_key132, _val133);
+                  _val141 = iprot.readString();
+                  struct.skewedColValueLocationMaps.put(_key140, _val141);
                 }
                 iprot.readMapEnd();
               }
@@ -647,9 +647,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(SKEWED_COL_NAMES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.skewedColNames.size()));
-          for (String _iter138 : struct.skewedColNames)
+          for (String _iter146 : struct.skewedColNames)
           {
-            oprot.writeString(_iter138);
+            oprot.writeString(_iter146);
           }
           oprot.writeListEnd();
         }
@@ -659,13 +659,13 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(SKEWED_COL_VALUES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.skewedColValues.size()));
-          for (List<String> _iter139 : struct.skewedColValues)
+          for (List<String> _iter147 : struct.skewedColValues)
           {
             {
-              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter139.size()));
-              for (String _iter140 : _iter139)
+              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter147.size()));
+              for (String _iter148 : _iter147)
               {
-                oprot.writeString(_iter140);
+                oprot.writeString(_iter148);
               }
               oprot.writeListEnd();
             }
@@ -678,17 +678,17 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(SKEWED_COL_VALUE_LOCATION_MAPS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, struct.skewedColValueLocationMaps.size()));
-          for (Map.Entry<List<String>, String> _iter141 : struct.skewedColValueLocationMaps.entrySet())
+          for (Map.Entry<List<String>, String> _iter149 : struct.skewedColValueLocationMaps.entrySet())
           {
             {
-              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter141.getKey().size()));
-              for (String _iter142 : _iter141.getKey())
+              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter149.getKey().size()));
+              for (String _iter150 : _iter149.getKey())
               {
-                oprot.writeString(_iter142);
+                oprot.writeString(_iter150);
               }
               oprot.writeListEnd();
             }
-            oprot.writeString(_iter141.getValue());
+            oprot.writeString(_iter149.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -725,22 +725,22 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetSkewedColNames()) {
         {
           oprot.writeI32(struct.skewedColNames.size());
-          for (String _iter143 : struct.skewedColNames)
+          for (String _iter151 : struct.skewedColNames)
           {
-            oprot.writeString(_iter143);
+            oprot.writeString(_iter151);
           }
         }
       }
       if (struct.isSetSkewedColValues()) {
         {
           oprot.writeI32(struct.skewedColValues.size());
-          for (List<String> _iter144 : struct.skewedColValues)
+          for (List<String> _iter152 : struct.skewedColValues)
           {
             {
-              oprot.writeI32(_iter144.size());
-              for (String _iter145 : _iter144)
+              oprot.writeI32(_iter152.size());
+              for (String _iter153 : _iter152)
               {
-                oprot.writeString(_iter145);
+                oprot.writeString(_iter153);
               }
             }
           }
@@ -749,16 +749,16 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetSkewedColValueLocationMaps()) {
         {
           oprot.writeI32(struct.skewedColValueLocationMaps.size());
-          for (Map.Entry<List<String>, String> _iter146 : struct.skewedColValueLocationMaps.entrySet())
+          for (Map.Entry<List<String>, String> _iter154 : struct.skewedColValueLocationMaps.entrySet())
           {
             {
-              oprot.writeI32(_iter146.getKey().size());
-              for (String _iter147 : _iter146.getKey())
+              oprot.writeI32(_iter154.getKey().size());
+              for (String _iter155 : _iter154.getKey())
               {
-                oprot.writeString(_iter147);
+                oprot.writeString(_iter155);
               }
             }
-            oprot.writeString(_iter146.getValue());
+            oprot.writeString(_iter154.getValue());
           }
         }
       }
@@ -770,59 +770,59 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list148 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.skewedColNames = new ArrayList<String>(_list148.size);
-          String _elem149;
-          for (int _i150 = 0; _i150 < _list148.size; ++_i150)
+          org.apache.thrift.protocol.TList _list156 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.skewedColNames = new ArrayList<String>(_list156.size);
+          String _elem157;
+          for (int _i158 = 0; _i158 < _list156.size; ++_i158)
           {
-            _elem149 = iprot.readString();
-            struct.skewedColNames.add(_elem149);
+            _elem157 = iprot.readString();
+            struct.skewedColNames.add(_elem157);
           }
         }
         struct.setSkewedColNamesIsSet(true);
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list151 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32());
-          struct.skewedColValues = new ArrayList<List<String>>(_list151.size);
-          List<String> _elem152;
-          for (int _i153 = 0; _i153 < _list151.size; ++_i153)
+          org.apache.thrift.protocol.TList _list159 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32());
+          struct.skewedColValues = new ArrayList<List<String>>(_list159.size);
+          List<String> _elem160;
+          for (int _i161 = 0; _i161 < _list159.size; ++_i161)
           {
             {
-              org.apache.thrift.protocol.TList _list154 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-              _elem152 = new ArrayList<String>(_list154.size);
-              String _elem155;
-              for (int _i156 = 0; _i156 < _list154.size; ++_i156)
+              org.apache.thrift.protocol.TList _list162 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+              _elem160 = new ArrayList<String>(_list162.size);
+              String _elem163;
+              for (int _i164 = 0; _i164 < _list162.size; ++_i164)
               {
-                _elem155 = iprot.readString();
-                _elem152.add(_elem155);
+                _elem163 = iprot.readString();
+                _elem160.add(_elem163);
               }
             }
-            struct.skewedColValues.add(_elem152);
+            struct.skewedColValues.add(_elem160);
           }
         }
         struct.setSkewedColValuesIsSet(true);
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TMap _map157 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.skewedColValueLocationMaps = new HashMap<List<String>,String>(2*_map157.size);
-          List<String> _key158;
-          String _val159;
-          for (int _i160 = 0; _i160 < _map157.size; ++_i160)
+          org.apache.thrift.protocol.TMap _map165 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.skewedColValueLocationMaps = new HashMap<List<String>,String>(2*_map165.size);
+          List<String> _key166;
+          String _val167;
+          for (int _i168 = 0; _i168 < _map165.size; ++_i168)
           {
             {
-              org.apache.thrift.protocol.TList _list161 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-              _key158 = new ArrayList<String>(_list161.size);
-              String _elem162;
-              for (int _i163 = 0; _i163 < _list161.size; ++_i163)
+              org.apache.thrift.protocol.TList _list169 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+              _key166 = new ArrayList<String>(_list169.size);
+              String _elem170;
+              for (int _i171 = 0; _i171 < _list169.size; ++_i171)
               {
-                _elem162 = iprot.readString();
-                _key158.add(_elem162);
+                _elem170 = iprot.readString();
+                _key166.add(_elem170);
               }
             }
-            _val159 = iprot.readString();
-            struct.skewedColValueLocationMaps.put(_key158, _val159);
+            _val167 = iprot.readString();
+            struct.skewedColValueLocationMaps.put(_key166, _val167);
           }
         }
         struct.setSkewedColValueLocationMapsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
index 3cfa765..0d8957d 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
@@ -1290,14 +1290,14 @@ import org.slf4j.LoggerFactory;
           case 1: // COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list164 = iprot.readListBegin();
-                struct.cols = new ArrayList<FieldSchema>(_list164.size);
-                FieldSchema _elem165;
-                for (int _i166 = 0; _i166 < _list164.size; ++_i166)
+                org.apache.thrift.protocol.TList _list172 = iprot.readListBegin();
+                struct.cols = new ArrayList<FieldSchema>(_list172.size);
+                FieldSchema _elem173;
+                for (int _i174 = 0; _i174 < _list172.size; ++_i174)
                 {
-                  _elem165 = new FieldSchema();
-                  _elem165.read(iprot);
-                  struct.cols.add(_elem165);
+                  _elem173 = new FieldSchema();
+                  _elem173.read(iprot);
+                  struct.cols.add(_elem173);
                 }
                 iprot.readListEnd();
               }
@@ -1358,13 +1358,13 @@ import org.slf4j.LoggerFactory;
           case 8: // BUCKET_COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list167 = iprot.readListBegin();
-                struct.bucketCols = new ArrayList<String>(_list167.size);
-                String _elem168;
-                for (int _i169 = 0; _i169 < _list167.size; ++_i169)
+                org.apache.thrift.protocol.TList _list175 = iprot.readListBegin();
+                struct.bucketCols = new ArrayList<String>(_list175.size);
+                String _elem176;
+                for (int _i177 = 0; _i177 < _list175.size; ++_i177)
                 {
-                  _elem168 = iprot.readString();
-                  struct.bucketCols.add(_elem168);
+                  _elem176 = iprot.readString();
+                  struct.bucketCols.add(_elem176);
                 }
                 iprot.readListEnd();
               }
@@ -1376,14 +1376,14 @@ import org.slf4j.LoggerFactory;
           case 9: // SORT_COLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list170 = iprot.readListBegin();
-                struct.sortCols = new ArrayList<Order>(_list170.size);
-                Order _elem171;
-                for (int _i172 = 0; _i172 < _list170.size; ++_i172)
+                org.apache.thrift.protocol.TList _list178 = iprot.readListBegin();
+                struct.sortCols = new ArrayList<Order>(_list178.size);
+                Order _elem179;
+                for (int _i180 = 0; _i180 < _list178.size; ++_i180)
                 {
-                  _elem171 = new Order();
-                  _elem171.read(iprot);
-                  struct.sortCols.add(_elem171);
+                  _elem179 = new Order();
+                  _elem179.read(iprot);
+                  struct.sortCols.add(_elem179);
                 }
                 iprot.readListEnd();
               }
@@ -1395,15 +1395,15 @@ import org.slf4j.LoggerFactory;
           case 10: // PARAMETERS
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map173 = iprot.readMapBegin();
-                struct.parameters = new HashMap<String,String>(2*_map173.size);
-                String _key174;
-                String _val175;
-                for (int _i176 = 0; _i176 < _map173.size; ++_i176)
+                org.apache.thrift.protocol.TMap _map181 = iprot.readMapBegin();
+                struct.parameters = new HashMap<String,String>(2*_map181.size);
+                String _key182;
+                String _val183;
+                for (int _i184 = 0; _i184 < _map181.size; ++_i184)
                 {
-                  _key174 = iprot.readString();
-                  _val175 = iprot.readString();
-                  struct.parameters.put(_key174, _val175);
+                  _key182 = iprot.readString();
+                  _val183 = iprot.readString();
+                  struct.parameters.put(_key182, _val183);
                 }
                 iprot.readMapEnd();
               }
@@ -1446,9 +1446,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cols.size()));
-          for (FieldSchema _iter177 : struct.cols)
+          for (FieldSchema _iter185 : struct.cols)
           {
-            _iter177.write(oprot);
+            _iter185.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1484,9 +1484,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bucketCols.size()));
-          for (String _iter178 : struct.bucketCols)
+          for (String _iter186 : struct.bucketCols)
           {
-            oprot.writeString(_iter178);
+            oprot.writeString(_iter186);
           }
           oprot.writeListEnd();
         }
@@ -1496,9 +1496,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(SORT_COLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.sortCols.size()));
-          for (Order _iter179 : struct.sortCols)
+          for (Order _iter187 : struct.sortCols)
           {
-            _iter179.write(oprot);
+            _iter187.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1508,10 +1508,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
-          for (Map.Entry<String, String> _iter180 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter188 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter180.getKey());
-            oprot.writeString(_iter180.getValue());
+            oprot.writeString(_iter188.getKey());
+            oprot.writeString(_iter188.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -1587,9 +1587,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetCols()) {
         {
           oprot.writeI32(struct.cols.size());
-          for (FieldSchema _iter181 : struct.cols)
+          for (FieldSchema _iter189 : struct.cols)
           {
-            _iter181.write(oprot);
+            _iter189.write(oprot);
           }
         }
       }
@@ -1614,28 +1614,28 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetBucketCols()) {
         {
           oprot.writeI32(struct.bucketCols.size());
-          for (String _iter182 : struct.bucketCols)
+          for (String _iter190 : struct.bucketCols)
           {
-            oprot.writeString(_iter182);
+            oprot.writeString(_iter190);
           }
         }
       }
       if (struct.isSetSortCols()) {
         {
           oprot.writeI32(struct.sortCols.size());
-          for (Order _iter183 : struct.sortCols)
+          for (Order _iter191 : struct.sortCols)
           {
-            _iter183.write(oprot);
+            _iter191.write(oprot);
           }
         }
       }
       if (struct.isSetParameters()) {
         {
           oprot.writeI32(struct.parameters.size());
-          for (Map.Entry<String, String> _iter184 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter192 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter184.getKey());
-            oprot.writeString(_iter184.getValue());
+            oprot.writeString(_iter192.getKey());
+            oprot.writeString(_iter192.getValue());
           }
         }
       }
@@ -1653,14 +1653,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(12);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list185 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.cols = new ArrayList<FieldSchema>(_list185.size);
-          FieldSchema _elem186;
-          for (int _i187 = 0; _i187 < _list185.size; ++_i187)
+          org.apache.thrift.protocol.TList _list193 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.cols = new ArrayList<FieldSchema>(_list193.size);
+          FieldSchema _elem194;
+          for (int _i195 = 0; _i195 < _list193.size; ++_i195)
           {
-            _elem186 = new FieldSchema();
-            _elem186.read(iprot);
-            struct.cols.add(_elem186);
+            _elem194 = new FieldSchema();
+            _elem194.read(iprot);
+            struct.cols.add(_elem194);
           }
         }
         struct.setColsIsSet(true);
@@ -1692,42 +1692,42 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(7)) {
         {
-          org.apache.thrift.protocol.TList _list188 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.bucketCols = new ArrayList<String>(_list188.size);
-          String _elem189;
-          for (int _i190 = 0; _i190 < _list188.size; ++_i190)
+          org.apache.thrift.protocol.TList _list196 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.bucketCols = new ArrayList<String>(_list196.size);
+          String _elem197;
+          for (int _i198 = 0; _i198 < _list196.size; ++_i198)
           {
-            _elem189 = iprot.readString();
-            struct.bucketCols.add(_elem189);
+            _elem197 = iprot.readString();
+            struct.bucketCols.add(_elem197);
           }
         }
         struct.bucketCols = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(struct.bucketCols); struct.setBucketColsIsSet(true);
       }
       if (incoming.get(8)) {
         {
-          org.apache.thrift.protocol.TList _list191 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.sortCols = new ArrayList<Order>(_list191.size);
-          Order _elem192;
-          for (int _i193 = 0; _i193 < _list191.size; ++_i193)
+          org.apache.thrift.protocol.TList _list199 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.sortCols = new ArrayList<Order>(_list199.size);
+          Order _elem200;
+          for (int _i201 = 0; _i201 < _list199.size; ++_i201)
           {
-            _elem192 = new Order();
-            _elem192.read(iprot);
-            struct.sortCols.add(_elem192);
+            _elem200 = new Order();
+            _elem200.read(iprot);
+            struct.sortCols.add(_elem200);
           }
         }
         struct.setSortColsIsSet(true);
       }
       if (incoming.get(9)) {
         {
-          org.apache.thrift.protocol.TMap _map194 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.parameters = new HashMap<String,String>(2*_map194.size);
-          String _key195;
-          String _val196;
-          for (int _i197 = 0; _i197 < _map194.size; ++_i197)
+          org.apache.thrift.protocol.TMap _map202 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.parameters = new HashMap<String,String>(2*_map202.size);
+          String _key203;
+          String _val204;
+          for (int _i205 = 0; _i205 < _map202.size; ++_i205)
           {
-            _key195 = iprot.readString();
-            _val196 = iprot.readString();
-            struct.parameters.put(_key195, _val196);
+            _key203 = iprot.readString();
+            _val204 = iprot.readString();
+            struct.parameters.put(_key203, _val204);
           }
         }
         struct.parameters = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(struct.parameters); struct.setParametersIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java
index f9d48c8..78ac909 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java
@@ -1958,14 +1958,14 @@ import org.slf4j.LoggerFactory;
           case 8: // PARTITION_KEYS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list198 = iprot.readListBegin();
-                struct.partitionKeys = new ArrayList<FieldSchema>(_list198.size);
-                FieldSchema _elem199;
-                for (int _i200 = 0; _i200 < _list198.size; ++_i200)
+                org.apache.thrift.protocol.TList _list206 = iprot.readListBegin();
+                struct.partitionKeys = new ArrayList<FieldSchema>(_list206.size);
+                FieldSchema _elem207;
+                for (int _i208 = 0; _i208 < _list206.size; ++_i208)
                 {
-                  _elem199 = new FieldSchema();
-                  _elem199.read(iprot);
-                  struct.partitionKeys.add(_elem199);
+                  _elem207 = new FieldSchema();
+                  _elem207.read(iprot);
+                  struct.partitionKeys.add(_elem207);
                 }
                 iprot.readListEnd();
               }
@@ -1977,15 +1977,15 @@ import org.slf4j.LoggerFactory;
           case 9: // PARAMETERS
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map201 = iprot.readMapBegin();
-                struct.parameters = new HashMap<String,String>(2*_map201.size);
-                String _key202;
-                String _val203;
-                for (int _i204 = 0; _i204 < _map201.size; ++_i204)
+                org.apache.thrift.protocol.TMap _map209 = iprot.readMapBegin();
+                struct.parameters = new HashMap<String,String>(2*_map209.size);
+                String _key210;
+                String _val211;
+                for (int _i212 = 0; _i212 < _map209.size; ++_i212)
                 {
-                  _key202 = iprot.readString();
-                  _val203 = iprot.readString();
-                  struct.parameters.put(_key202, _val203);
+                  _key210 = iprot.readString();
+                  _val211 = iprot.readString();
+                  struct.parameters.put(_key210, _val211);
                 }
                 iprot.readMapEnd();
               }
@@ -2130,9 +2130,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitionKeys.size()));
-          for (FieldSchema _iter205 : struct.partitionKeys)
+          for (FieldSchema _iter213 : struct.partitionKeys)
           {
-            _iter205.write(oprot);
+            _iter213.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -2142,10 +2142,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
-          for (Map.Entry<String, String> _iter206 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter214 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter206.getKey());
-            oprot.writeString(_iter206.getValue());
+            oprot.writeString(_iter214.getKey());
+            oprot.writeString(_iter214.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -2317,19 +2317,19 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartitionKeys()) {
         {
           oprot.writeI32(struct.partitionKeys.size());
-          for (FieldSchema _iter207 : struct.partitionKeys)
+          for (FieldSchema _iter215 : struct.partitionKeys)
           {
-            _iter207.write(oprot);
+            _iter215.write(oprot);
           }
         }
       }
       if (struct.isSetParameters()) {
         {
           oprot.writeI32(struct.parameters.size());
-          for (Map.Entry<String, String> _iter208 : struct.parameters.entrySet())
+          for (Map.Entry<String, String> _iter216 : struct.parameters.entrySet())
           {
-            oprot.writeString(_iter208.getKey());
-            oprot.writeString(_iter208.getValue());
+            oprot.writeString(_iter216.getKey());
+            oprot.writeString(_iter216.getValue());
           }
         }
       }
@@ -2403,29 +2403,29 @@ import org.slf4j.LoggerFactory;
       }
       if (incoming.get(7)) {
         {
-          org.apache.thrift.protocol.TList _list209 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.partitionKeys = new ArrayList<FieldSchema>(_list209.size);
-          FieldSchema _elem210;
-          for (int _i211 = 0; _i211 < _list209.size; ++_i211)
+          org.apache.thrift.protocol.TList _list217 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.partitionKeys = new ArrayList<FieldSchema>(_list217.size);
+          FieldSchema _elem218;
+          for (int _i219 = 0; _i219 < _list217.size; ++_i219)
           {
-            _elem210 = new FieldSchema();
-            _elem210.read(iprot);
-            struct.partitionKeys.add(_elem210);
+            _elem218 = new FieldSchema();
+            _elem218.read(iprot);
+            struct.partitionKeys.add(_elem218);
           }
         }
         struct.setPartitionKeysIsSet(true);
       }
       if (incoming.get(8)) {
         {
-          org.apache.thrift.protocol.TMap _map212 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.parameters = new HashMap<String,String>(2*_map212.size);
-          String _key213;
-          String _val214;
-          for (int _i215 = 0; _i215 < _map212.size; ++_i215)
+          org.apache.thrift.protocol.TMap _map220 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.parameters = new HashMap<String,String>(2*_map220.size);
+          String _key221;
+          String _val222;
+          for (int _i223 = 0; _i223 < _map220.size; ++_i223)
           {
-            _key213 = iprot.readString();
-            _val214 = iprot.readString();
-            struct.parameters.put(_key213, _val214);
+            _key221 = iprot.readString();
+            _val222 = iprot.readString();
+            struct.parameters.put(_key221, _val222);
           }
         }
         struct.setParametersIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java
index c9b70a4..55f2724 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsRequest.java
@@ -782,13 +782,13 @@ import org.slf4j.LoggerFactory;
           case 3: // COL_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list450 = iprot.readListBegin();
-                struct.colNames = new ArrayList<String>(_list450.size);
-                String _elem451;
-                for (int _i452 = 0; _i452 < _list450.size; ++_i452)
+                org.apache.thrift.protocol.TList _list458 = iprot.readListBegin();
+                struct.colNames = new ArrayList<String>(_list458.size);
+                String _elem459;
+                for (int _i460 = 0; _i460 < _list458.size; ++_i460)
                 {
-                  _elem451 = iprot.readString();
-                  struct.colNames.add(_elem451);
+                  _elem459 = iprot.readString();
+                  struct.colNames.add(_elem459);
                 }
                 iprot.readListEnd();
               }
@@ -848,9 +848,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(COL_NAMES_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.colNames.size()));
-          for (String _iter453 : struct.colNames)
+          for (String _iter461 : struct.colNames)
           {
-            oprot.writeString(_iter453);
+            oprot.writeString(_iter461);
           }
           oprot.writeListEnd();
         }
@@ -896,9 +896,9 @@ import org.slf4j.LoggerFactory;
       oprot.writeString(struct.tblName);
       {
         oprot.writeI32(struct.colNames.size());
-        for (String _iter454 : struct.colNames)
+        for (String _iter462 : struct.colNames)
         {
-          oprot.writeString(_iter454);
+          oprot.writeString(_iter462);
         }
       }
       BitSet optionals = new BitSet();
@@ -931,13 +931,13 @@ import org.slf4j.LoggerFactory;
       struct.tblName = iprot.readString();
       struct.setTblNameIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list455 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.colNames = new ArrayList<String>(_list455.size);
-        String _elem456;
-        for (int _i457 = 0; _i457 < _list455.size; ++_i457)
+        org.apache.thrift.protocol.TList _list463 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.colNames = new ArrayList<String>(_list463.size);
+        String _elem464;
+        for (int _i465 = 0; _i465 < _list463.size; ++_i465)
         {
-          _elem456 = iprot.readString();
-          struct.colNames.add(_elem456);
+          _elem464 = iprot.readString();
+          struct.colNames.add(_elem464);
         }
       }
       struct.setColNamesIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java
index 0685a22..b57f4bf 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableStatsResult.java
@@ -435,14 +435,14 @@ import org.slf4j.LoggerFactory;
           case 1: // TABLE_STATS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list424 = iprot.readListBegin();
-                struct.tableStats = new ArrayList<ColumnStatisticsObj>(_list424.size);
-                ColumnStatisticsObj _elem425;
-                for (int _i426 = 0; _i426 < _list424.size; ++_i426)
+                org.apache.thrift.protocol.TList _list432 = iprot.readListBegin();
+                struct.tableStats = new ArrayList<ColumnStatisticsObj>(_list432.size);
+                ColumnStatisticsObj _elem433;
+                for (int _i434 = 0; _i434 < _list432.size; ++_i434)
                 {
-                  _elem425 = new ColumnStatisticsObj();
-                  _elem425.read(iprot);
-                  struct.tableStats.add(_elem425);
+                  _elem433 = new ColumnStatisticsObj();
+                  _elem433.read(iprot);
+                  struct.tableStats.add(_elem433);
                 }
                 iprot.readListEnd();
               }
@@ -476,9 +476,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(TABLE_STATS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tableStats.size()));
-          for (ColumnStatisticsObj _iter427 : struct.tableStats)
+          for (ColumnStatisticsObj _iter435 : struct.tableStats)
           {
-            _iter427.write(oprot);
+            _iter435.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -508,9 +508,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.tableStats.size());
-        for (ColumnStatisticsObj _iter428 : struct.tableStats)
+        for (ColumnStatisticsObj _iter436 : struct.tableStats)
         {
-          _iter428.write(oprot);
+          _iter436.write(oprot);
         }
       }
       BitSet optionals = new BitSet();
@@ -527,14 +527,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, TableStatsResult struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list429 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.tableStats = new ArrayList<ColumnStatisticsObj>(_list429.size);
-        ColumnStatisticsObj _elem430;
-        for (int _i431 = 0; _i431 < _list429.size; ++_i431)
+        org.apache.thrift.protocol.TList _list437 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.tableStats = new ArrayList<ColumnStatisticsObj>(_list437.size);
+        ColumnStatisticsObj _elem438;
+        for (int _i439 = 0; _i439 < _list437.size; ++_i439)
         {
-          _elem430 = new ColumnStatisticsObj();
-          _elem430.read(iprot);
-          struct.tableStats.add(_elem430);
+          _elem438 = new ColumnStatisticsObj();
+          _elem438.read(iprot);
+          struct.tableStats.add(_elem438);
         }
       }
       struct.setTableStatsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java
index de15fc6..9c6ee51 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableValidWriteIds.java
@@ -708,13 +708,13 @@ import org.slf4j.LoggerFactory;
           case 3: // INVALID_WRITE_IDS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list618 = iprot.readListBegin();
-                struct.invalidWriteIds = new ArrayList<Long>(_list618.size);
-                long _elem619;
-                for (int _i620 = 0; _i620 < _list618.size; ++_i620)
+                org.apache.thrift.protocol.TList _list626 = iprot.readListBegin();
+                struct.invalidWriteIds = new ArrayList<Long>(_list626.size);
+                long _elem627;
+                for (int _i628 = 0; _i628 < _list626.size; ++_i628)
                 {
-                  _elem619 = iprot.readI64();
-                  struct.invalidWriteIds.add(_elem619);
+                  _elem627 = iprot.readI64();
+                  struct.invalidWriteIds.add(_elem627);
                 }
                 iprot.readListEnd();
               }
@@ -764,9 +764,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(INVALID_WRITE_IDS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.invalidWriteIds.size()));
-          for (long _iter621 : struct.invalidWriteIds)
+          for (long _iter629 : struct.invalidWriteIds)
           {
-            oprot.writeI64(_iter621);
+            oprot.writeI64(_iter629);
           }
           oprot.writeListEnd();
         }
@@ -803,9 +803,9 @@ import org.slf4j.LoggerFactory;
       oprot.writeI64(struct.writeIdHighWaterMark);
       {
         oprot.writeI32(struct.invalidWriteIds.size());
-        for (long _iter622 : struct.invalidWriteIds)
+        for (long _iter630 : struct.invalidWriteIds)
         {
-          oprot.writeI64(_iter622);
+          oprot.writeI64(_iter630);
         }
       }
       oprot.writeBinary(struct.abortedBits);
@@ -827,13 +827,13 @@ import org.slf4j.LoggerFactory;
       struct.writeIdHighWaterMark = iprot.readI64();
       struct.setWriteIdHighWaterMarkIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list623 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
-        struct.invalidWriteIds = new ArrayList<Long>(_list623.size);
-        long _elem624;
-        for (int _i625 = 0; _i625 < _list623.size; ++_i625)
+        org.apache.thrift.protocol.TList _list631 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.invalidWriteIds = new ArrayList<Long>(_list631.size);
+        long _elem632;
+        for (int _i633 = 0; _i633 < _list631.size; ++_i633)
         {
-          _elem624 = iprot.readI64();
-          struct.invalidWriteIds.add(_elem624);
+          _elem632 = iprot.readI64();
+          struct.invalidWriteIds.add(_elem632);
         }
       }
       struct.setInvalidWriteIdsIsSet(true);


[09/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php
index b6b3bfa..5a22e4e 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php
@@ -3479,6 +3479,272 @@ class GrantRevokePrivilegeResponse {
 
 }
 
+class TruncateTableRequest {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $dbName = null;
+  /**
+   * @var string
+   */
+  public $tableName = null;
+  /**
+   * @var string[]
+   */
+  public $partNames = null;
+  /**
+   * @var int
+   */
+  public $txnId = -1;
+  /**
+   * @var int
+   */
+  public $writeId = -1;
+  /**
+   * @var string
+   */
+  public $validWriteIdList = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'dbName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'tableName',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'partNames',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        4 => array(
+          'var' => 'txnId',
+          'type' => TType::I64,
+          ),
+        5 => array(
+          'var' => 'writeId',
+          'type' => TType::I64,
+          ),
+        6 => array(
+          'var' => 'validWriteIdList',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['dbName'])) {
+        $this->dbName = $vals['dbName'];
+      }
+      if (isset($vals['tableName'])) {
+        $this->tableName = $vals['tableName'];
+      }
+      if (isset($vals['partNames'])) {
+        $this->partNames = $vals['partNames'];
+      }
+      if (isset($vals['txnId'])) {
+        $this->txnId = $vals['txnId'];
+      }
+      if (isset($vals['writeId'])) {
+        $this->writeId = $vals['writeId'];
+      }
+      if (isset($vals['validWriteIdList'])) {
+        $this->validWriteIdList = $vals['validWriteIdList'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'TruncateTableRequest';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->dbName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->tableName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::LST) {
+            $this->partNames = array();
+            $_size69 = 0;
+            $_etype72 = 0;
+            $xfer += $input->readListBegin($_etype72, $_size69);
+            for ($_i73 = 0; $_i73 < $_size69; ++$_i73)
+            {
+              $elem74 = null;
+              $xfer += $input->readString($elem74);
+              $this->partNames []= $elem74;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->txnId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->writeId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->validWriteIdList);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('TruncateTableRequest');
+    if ($this->dbName !== null) {
+      $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1);
+      $xfer += $output->writeString($this->dbName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->tableName !== null) {
+      $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2);
+      $xfer += $output->writeString($this->tableName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->partNames !== null) {
+      if (!is_array($this->partNames)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('partNames', TType::LST, 3);
+      {
+        $output->writeListBegin(TType::STRING, count($this->partNames));
+        {
+          foreach ($this->partNames as $iter75)
+          {
+            $xfer += $output->writeString($iter75);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->txnId !== null) {
+      $xfer += $output->writeFieldBegin('txnId', TType::I64, 4);
+      $xfer += $output->writeI64($this->txnId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->writeId !== null) {
+      $xfer += $output->writeFieldBegin('writeId', TType::I64, 5);
+      $xfer += $output->writeI64($this->writeId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->validWriteIdList !== null) {
+      $xfer += $output->writeFieldBegin('validWriteIdList', TType::STRING, 6);
+      $xfer += $output->writeString($this->validWriteIdList);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class TruncateTableResponse {
+  static $_TSPEC;
+
+
+  public function __construct() {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        );
+    }
+  }
+
+  public function getName() {
+    return 'TruncateTableResponse';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('TruncateTableResponse');
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
 class Role {
   static $_TSPEC;
 
@@ -3962,15 +4228,15 @@ class GetRoleGrantsForPrincipalResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->principalGrants = array();
-            $_size69 = 0;
-            $_etype72 = 0;
-            $xfer += $input->readListBegin($_etype72, $_size69);
-            for ($_i73 = 0; $_i73 < $_size69; ++$_i73)
+            $_size76 = 0;
+            $_etype79 = 0;
+            $xfer += $input->readListBegin($_etype79, $_size76);
+            for ($_i80 = 0; $_i80 < $_size76; ++$_i80)
             {
-              $elem74 = null;
-              $elem74 = new \metastore\RolePrincipalGrant();
-              $xfer += $elem74->read($input);
-              $this->principalGrants []= $elem74;
+              $elem81 = null;
+              $elem81 = new \metastore\RolePrincipalGrant();
+              $xfer += $elem81->read($input);
+              $this->principalGrants []= $elem81;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -3998,9 +4264,9 @@ class GetRoleGrantsForPrincipalResponse {
       {
         $output->writeListBegin(TType::STRUCT, count($this->principalGrants));
         {
-          foreach ($this->principalGrants as $iter75)
+          foreach ($this->principalGrants as $iter82)
           {
-            $xfer += $iter75->write($output);
+            $xfer += $iter82->write($output);
           }
         }
         $output->writeListEnd();
@@ -4140,15 +4406,15 @@ class GetPrincipalsInRoleResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->principalGrants = array();
-            $_size76 = 0;
-            $_etype79 = 0;
-            $xfer += $input->readListBegin($_etype79, $_size76);
-            for ($_i80 = 0; $_i80 < $_size76; ++$_i80)
+            $_size83 = 0;
+            $_etype86 = 0;
+            $xfer += $input->readListBegin($_etype86, $_size83);
+            for ($_i87 = 0; $_i87 < $_size83; ++$_i87)
             {
-              $elem81 = null;
-              $elem81 = new \metastore\RolePrincipalGrant();
-              $xfer += $elem81->read($input);
-              $this->principalGrants []= $elem81;
+              $elem88 = null;
+              $elem88 = new \metastore\RolePrincipalGrant();
+              $xfer += $elem88->read($input);
+              $this->principalGrants []= $elem88;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -4176,9 +4442,9 @@ class GetPrincipalsInRoleResponse {
       {
         $output->writeListBegin(TType::STRUCT, count($this->principalGrants));
         {
-          foreach ($this->principalGrants as $iter82)
+          foreach ($this->principalGrants as $iter89)
           {
-            $xfer += $iter82->write($output);
+            $xfer += $iter89->write($output);
           }
         }
         $output->writeListEnd();
@@ -4989,14 +5255,14 @@ class GetCatalogsResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->names = array();
-            $_size83 = 0;
-            $_etype86 = 0;
-            $xfer += $input->readListBegin($_etype86, $_size83);
-            for ($_i87 = 0; $_i87 < $_size83; ++$_i87)
+            $_size90 = 0;
+            $_etype93 = 0;
+            $xfer += $input->readListBegin($_etype93, $_size90);
+            for ($_i94 = 0; $_i94 < $_size90; ++$_i94)
             {
-              $elem88 = null;
-              $xfer += $input->readString($elem88);
-              $this->names []= $elem88;
+              $elem95 = null;
+              $xfer += $input->readString($elem95);
+              $this->names []= $elem95;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -5024,9 +5290,9 @@ class GetCatalogsResponse {
       {
         $output->writeListBegin(TType::STRING, count($this->names));
         {
-          foreach ($this->names as $iter89)
+          foreach ($this->names as $iter96)
           {
-            $xfer += $output->writeString($iter89);
+            $xfer += $output->writeString($iter96);
           }
         }
         $output->writeListEnd();
@@ -5268,17 +5534,17 @@ class Database {
         case 4:
           if ($ftype == TType::MAP) {
             $this->parameters = array();
-            $_size90 = 0;
-            $_ktype91 = 0;
-            $_vtype92 = 0;
-            $xfer += $input->readMapBegin($_ktype91, $_vtype92, $_size90);
-            for ($_i94 = 0; $_i94 < $_size90; ++$_i94)
+            $_size97 = 0;
+            $_ktype98 = 0;
+            $_vtype99 = 0;
+            $xfer += $input->readMapBegin($_ktype98, $_vtype99, $_size97);
+            for ($_i101 = 0; $_i101 < $_size97; ++$_i101)
             {
-              $key95 = '';
-              $val96 = '';
-              $xfer += $input->readString($key95);
-              $xfer += $input->readString($val96);
-              $this->parameters[$key95] = $val96;
+              $key102 = '';
+              $val103 = '';
+              $xfer += $input->readString($key102);
+              $xfer += $input->readString($val103);
+              $this->parameters[$key102] = $val103;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -5350,10 +5616,10 @@ class Database {
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
         {
-          foreach ($this->parameters as $kiter97 => $viter98)
+          foreach ($this->parameters as $kiter104 => $viter105)
           {
-            $xfer += $output->writeString($kiter97);
-            $xfer += $output->writeString($viter98);
+            $xfer += $output->writeString($kiter104);
+            $xfer += $output->writeString($viter105);
           }
         }
         $output->writeMapEnd();
@@ -5524,17 +5790,17 @@ class SerDeInfo {
         case 3:
           if ($ftype == TType::MAP) {
             $this->parameters = array();
-            $_size99 = 0;
-            $_ktype100 = 0;
-            $_vtype101 = 0;
-            $xfer += $input->readMapBegin($_ktype100, $_vtype101, $_size99);
-            for ($_i103 = 0; $_i103 < $_size99; ++$_i103)
+            $_size106 = 0;
+            $_ktype107 = 0;
+            $_vtype108 = 0;
+            $xfer += $input->readMapBegin($_ktype107, $_vtype108, $_size106);
+            for ($_i110 = 0; $_i110 < $_size106; ++$_i110)
             {
-              $key104 = '';
-              $val105 = '';
-              $xfer += $input->readString($key104);
-              $xfer += $input->readString($val105);
-              $this->parameters[$key104] = $val105;
+              $key111 = '';
+              $val112 = '';
+              $xfer += $input->readString($key111);
+              $xfer += $input->readString($val112);
+              $this->parameters[$key111] = $val112;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -5600,10 +5866,10 @@ class SerDeInfo {
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
         {
-          foreach ($this->parameters as $kiter106 => $viter107)
+          foreach ($this->parameters as $kiter113 => $viter114)
           {
-            $xfer += $output->writeString($kiter106);
-            $xfer += $output->writeString($viter107);
+            $xfer += $output->writeString($kiter113);
+            $xfer += $output->writeString($viter114);
           }
         }
         $output->writeMapEnd();
@@ -5827,14 +6093,14 @@ class SkewedInfo {
         case 1:
           if ($ftype == TType::LST) {
             $this->skewedColNames = array();
-            $_size108 = 0;
-            $_etype111 = 0;
-            $xfer += $input->readListBegin($_etype111, $_size108);
-            for ($_i112 = 0; $_i112 < $_size108; ++$_i112)
+            $_size115 = 0;
+            $_etype118 = 0;
+            $xfer += $input->readListBegin($_etype118, $_size115);
+            for ($_i119 = 0; $_i119 < $_size115; ++$_i119)
             {
-              $elem113 = null;
-              $xfer += $input->readString($elem113);
-              $this->skewedColNames []= $elem113;
+              $elem120 = null;
+              $xfer += $input->readString($elem120);
+              $this->skewedColNames []= $elem120;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -5844,24 +6110,24 @@ class SkewedInfo {
         case 2:
           if ($ftype == TType::LST) {
             $this->skewedColValues = array();
-            $_size114 = 0;
-            $_etype117 = 0;
-            $xfer += $input->readListBegin($_etype117, $_size114);
-            for ($_i118 = 0; $_i118 < $_size114; ++$_i118)
+            $_size121 = 0;
+            $_etype124 = 0;
+            $xfer += $input->readListBegin($_etype124, $_size121);
+            for ($_i125 = 0; $_i125 < $_size121; ++$_i125)
             {
-              $elem119 = null;
-              $elem119 = array();
-              $_size120 = 0;
-              $_etype123 = 0;
-              $xfer += $input->readListBegin($_etype123, $_size120);
-              for ($_i124 = 0; $_i124 < $_size120; ++$_i124)
+              $elem126 = null;
+              $elem126 = array();
+              $_size127 = 0;
+              $_etype130 = 0;
+              $xfer += $input->readListBegin($_etype130, $_size127);
+              for ($_i131 = 0; $_i131 < $_size127; ++$_i131)
               {
-                $elem125 = null;
-                $xfer += $input->readString($elem125);
-                $elem119 []= $elem125;
+                $elem132 = null;
+                $xfer += $input->readString($elem132);
+                $elem126 []= $elem132;
               }
               $xfer += $input->readListEnd();
-              $this->skewedColValues []= $elem119;
+              $this->skewedColValues []= $elem126;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -5871,27 +6137,27 @@ class SkewedInfo {
         case 3:
           if ($ftype == TType::MAP) {
             $this->skewedColValueLocationMaps = array();
-            $_size126 = 0;
-            $_ktype127 = 0;
-            $_vtype128 = 0;
-            $xfer += $input->readMapBegin($_ktype127, $_vtype128, $_size126);
-            for ($_i130 = 0; $_i130 < $_size126; ++$_i130)
+            $_size133 = 0;
+            $_ktype134 = 0;
+            $_vtype135 = 0;
+            $xfer += $input->readMapBegin($_ktype134, $_vtype135, $_size133);
+            for ($_i137 = 0; $_i137 < $_size133; ++$_i137)
             {
-              $key131 = array();
-              $val132 = '';
-              $key131 = array();
-              $_size133 = 0;
-              $_etype136 = 0;
-              $xfer += $input->readListBegin($_etype136, $_size133);
-              for ($_i137 = 0; $_i137 < $_size133; ++$_i137)
+              $key138 = array();
+              $val139 = '';
+              $key138 = array();
+              $_size140 = 0;
+              $_etype143 = 0;
+              $xfer += $input->readListBegin($_etype143, $_size140);
+              for ($_i144 = 0; $_i144 < $_size140; ++$_i144)
               {
-                $elem138 = null;
-                $xfer += $input->readString($elem138);
-                $key131 []= $elem138;
+                $elem145 = null;
+                $xfer += $input->readString($elem145);
+                $key138 []= $elem145;
               }
               $xfer += $input->readListEnd();
-              $xfer += $input->readString($val132);
-              $this->skewedColValueLocationMaps[$key131] = $val132;
+              $xfer += $input->readString($val139);
+              $this->skewedColValueLocationMaps[$key138] = $val139;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -5919,9 +6185,9 @@ class SkewedInfo {
       {
         $output->writeListBegin(TType::STRING, count($this->skewedColNames));
         {
-          foreach ($this->skewedColNames as $iter139)
+          foreach ($this->skewedColNames as $iter146)
           {
-            $xfer += $output->writeString($iter139);
+            $xfer += $output->writeString($iter146);
           }
         }
         $output->writeListEnd();
@@ -5936,14 +6202,14 @@ class SkewedInfo {
       {
         $output->writeListBegin(TType::LST, count($this->skewedColValues));
         {
-          foreach ($this->skewedColValues as $iter140)
+          foreach ($this->skewedColValues as $iter147)
           {
             {
-              $output->writeListBegin(TType::STRING, count($iter140));
+              $output->writeListBegin(TType::STRING, count($iter147));
               {
-                foreach ($iter140 as $iter141)
+                foreach ($iter147 as $iter148)
                 {
-                  $xfer += $output->writeString($iter141);
+                  $xfer += $output->writeString($iter148);
                 }
               }
               $output->writeListEnd();
@@ -5962,19 +6228,19 @@ class SkewedInfo {
       {
         $output->writeMapBegin(TType::LST, TType::STRING, count($this->skewedColValueLocationMaps));
         {
-          foreach ($this->skewedColValueLocationMaps as $kiter142 => $viter143)
+          foreach ($this->skewedColValueLocationMaps as $kiter149 => $viter150)
           {
             {
-              $output->writeListBegin(TType::STRING, count($kiter142));
+              $output->writeListBegin(TType::STRING, count($kiter149));
               {
-                foreach ($kiter142 as $iter144)
+                foreach ($kiter149 as $iter151)
                 {
-                  $xfer += $output->writeString($iter144);
+                  $xfer += $output->writeString($iter151);
                 }
               }
               $output->writeListEnd();
             }
-            $xfer += $output->writeString($viter143);
+            $xfer += $output->writeString($viter150);
           }
         }
         $output->writeMapEnd();
@@ -6179,15 +6445,15 @@ class StorageDescriptor {
         case 1:
           if ($ftype == TType::LST) {
             $this->cols = array();
-            $_size145 = 0;
-            $_etype148 = 0;
-            $xfer += $input->readListBegin($_etype148, $_size145);
-            for ($_i149 = 0; $_i149 < $_size145; ++$_i149)
+            $_size152 = 0;
+            $_etype155 = 0;
+            $xfer += $input->readListBegin($_etype155, $_size152);
+            for ($_i156 = 0; $_i156 < $_size152; ++$_i156)
             {
-              $elem150 = null;
-              $elem150 = new \metastore\FieldSchema();
-              $xfer += $elem150->read($input);
-              $this->cols []= $elem150;
+              $elem157 = null;
+              $elem157 = new \metastore\FieldSchema();
+              $xfer += $elem157->read($input);
+              $this->cols []= $elem157;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -6240,14 +6506,14 @@ class StorageDescriptor {
         case 8:
           if ($ftype == TType::LST) {
             $this->bucketCols = array();
-            $_size151 = 0;
-            $_etype154 = 0;
-            $xfer += $input->readListBegin($_etype154, $_size151);
-            for ($_i155 = 0; $_i155 < $_size151; ++$_i155)
+            $_size158 = 0;
+            $_etype161 = 0;
+            $xfer += $input->readListBegin($_etype161, $_size158);
+            for ($_i162 = 0; $_i162 < $_size158; ++$_i162)
             {
-              $elem156 = null;
-              $xfer += $input->readString($elem156);
-              $this->bucketCols []= $elem156;
+              $elem163 = null;
+              $xfer += $input->readString($elem163);
+              $this->bucketCols []= $elem163;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -6257,15 +6523,15 @@ class StorageDescriptor {
         case 9:
           if ($ftype == TType::LST) {
             $this->sortCols = array();
-            $_size157 = 0;
-            $_etype160 = 0;
-            $xfer += $input->readListBegin($_etype160, $_size157);
-            for ($_i161 = 0; $_i161 < $_size157; ++$_i161)
+            $_size164 = 0;
+            $_etype167 = 0;
+            $xfer += $input->readListBegin($_etype167, $_size164);
+            for ($_i168 = 0; $_i168 < $_size164; ++$_i168)
             {
-              $elem162 = null;
-              $elem162 = new \metastore\Order();
-              $xfer += $elem162->read($input);
-              $this->sortCols []= $elem162;
+              $elem169 = null;
+              $elem169 = new \metastore\Order();
+              $xfer += $elem169->read($input);
+              $this->sortCols []= $elem169;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -6275,17 +6541,17 @@ class StorageDescriptor {
         case 10:
           if ($ftype == TType::MAP) {
             $this->parameters = array();
-            $_size163 = 0;
-            $_ktype164 = 0;
-            $_vtype165 = 0;
-            $xfer += $input->readMapBegin($_ktype164, $_vtype165, $_size163);
-            for ($_i167 = 0; $_i167 < $_size163; ++$_i167)
+            $_size170 = 0;
+            $_ktype171 = 0;
+            $_vtype172 = 0;
+            $xfer += $input->readMapBegin($_ktype171, $_vtype172, $_size170);
+            for ($_i174 = 0; $_i174 < $_size170; ++$_i174)
             {
-              $key168 = '';
-              $val169 = '';
-              $xfer += $input->readString($key168);
-              $xfer += $input->readString($val169);
-              $this->parameters[$key168] = $val169;
+              $key175 = '';
+              $val176 = '';
+              $xfer += $input->readString($key175);
+              $xfer += $input->readString($val176);
+              $this->parameters[$key175] = $val176;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -6328,9 +6594,9 @@ class StorageDescriptor {
       {
         $output->writeListBegin(TType::STRUCT, count($this->cols));
         {
-          foreach ($this->cols as $iter170)
+          foreach ($this->cols as $iter177)
           {
-            $xfer += $iter170->write($output);
+            $xfer += $iter177->write($output);
           }
         }
         $output->writeListEnd();
@@ -6378,9 +6644,9 @@ class StorageDescriptor {
       {
         $output->writeListBegin(TType::STRING, count($this->bucketCols));
         {
-          foreach ($this->bucketCols as $iter171)
+          foreach ($this->bucketCols as $iter178)
           {
-            $xfer += $output->writeString($iter171);
+            $xfer += $output->writeString($iter178);
           }
         }
         $output->writeListEnd();
@@ -6395,9 +6661,9 @@ class StorageDescriptor {
       {
         $output->writeListBegin(TType::STRUCT, count($this->sortCols));
         {
-          foreach ($this->sortCols as $iter172)
+          foreach ($this->sortCols as $iter179)
           {
-            $xfer += $iter172->write($output);
+            $xfer += $iter179->write($output);
           }
         }
         $output->writeListEnd();
@@ -6412,10 +6678,10 @@ class StorageDescriptor {
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
         {
-          foreach ($this->parameters as $kiter173 => $viter174)
+          foreach ($this->parameters as $kiter180 => $viter181)
           {
-            $xfer += $output->writeString($kiter173);
-            $xfer += $output->writeString($viter174);
+            $xfer += $output->writeString($kiter180);
+            $xfer += $output->writeString($viter181);
           }
         }
         $output->writeMapEnd();
@@ -6763,15 +7029,15 @@ class Table {
         case 8:
           if ($ftype == TType::LST) {
             $this->partitionKeys = array();
-            $_size175 = 0;
-            $_etype178 = 0;
-            $xfer += $input->readListBegin($_etype178, $_size175);
-            for ($_i179 = 0; $_i179 < $_size175; ++$_i179)
+            $_size182 = 0;
+            $_etype185 = 0;
+            $xfer += $input->readListBegin($_etype185, $_size182);
+            for ($_i186 = 0; $_i186 < $_size182; ++$_i186)
             {
-              $elem180 = null;
-              $elem180 = new \metastore\FieldSchema();
-              $xfer += $elem180->read($input);
-              $this->partitionKeys []= $elem180;
+              $elem187 = null;
+              $elem187 = new \metastore\FieldSchema();
+              $xfer += $elem187->read($input);
+              $this->partitionKeys []= $elem187;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -6781,17 +7047,17 @@ class Table {
         case 9:
           if ($ftype == TType::MAP) {
             $this->parameters = array();
-            $_size181 = 0;
-            $_ktype182 = 0;
-            $_vtype183 = 0;
-            $xfer += $input->readMapBegin($_ktype182, $_vtype183, $_size181);
-            for ($_i185 = 0; $_i185 < $_size181; ++$_i185)
+            $_size188 = 0;
+            $_ktype189 = 0;
+            $_vtype190 = 0;
+            $xfer += $input->readMapBegin($_ktype189, $_vtype190, $_size188);
+            for ($_i192 = 0; $_i192 < $_size188; ++$_i192)
             {
-              $key186 = '';
-              $val187 = '';
-              $xfer += $input->readString($key186);
-              $xfer += $input->readString($val187);
-              $this->parameters[$key186] = $val187;
+              $key193 = '';
+              $val194 = '';
+              $xfer += $input->readString($key193);
+              $xfer += $input->readString($val194);
+              $this->parameters[$key193] = $val194;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -6936,9 +7202,9 @@ class Table {
       {
         $output->writeListBegin(TType::STRUCT, count($this->partitionKeys));
         {
-          foreach ($this->partitionKeys as $iter188)
+          foreach ($this->partitionKeys as $iter195)
           {
-            $xfer += $iter188->write($output);
+            $xfer += $iter195->write($output);
           }
         }
         $output->writeListEnd();
@@ -6953,10 +7219,10 @@ class Table {
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
         {
-          foreach ($this->parameters as $kiter189 => $viter190)
+          foreach ($this->parameters as $kiter196 => $viter197)
           {
-            $xfer += $output->writeString($kiter189);
-            $xfer += $output->writeString($viter190);
+            $xfer += $output->writeString($kiter196);
+            $xfer += $output->writeString($viter197);
           }
         }
         $output->writeMapEnd();
@@ -7201,14 +7467,14 @@ class Partition {
         case 1:
           if ($ftype == TType::LST) {
             $this->values = array();
-            $_size191 = 0;
-            $_etype194 = 0;
-            $xfer += $input->readListBegin($_etype194, $_size191);
-            for ($_i195 = 0; $_i195 < $_size191; ++$_i195)
+            $_size198 = 0;
+            $_etype201 = 0;
+            $xfer += $input->readListBegin($_etype201, $_size198);
+            for ($_i202 = 0; $_i202 < $_size198; ++$_i202)
             {
-              $elem196 = null;
-              $xfer += $input->readString($elem196);
-              $this->values []= $elem196;
+              $elem203 = null;
+              $xfer += $input->readString($elem203);
+              $this->values []= $elem203;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -7254,17 +7520,17 @@ class Partition {
         case 7:
           if ($ftype == TType::MAP) {
             $this->parameters = array();
-            $_size197 = 0;
-            $_ktype198 = 0;
-            $_vtype199 = 0;
-            $xfer += $input->readMapBegin($_ktype198, $_vtype199, $_size197);
-            for ($_i201 = 0; $_i201 < $_size197; ++$_i201)
+            $_size204 = 0;
+            $_ktype205 = 0;
+            $_vtype206 = 0;
+            $xfer += $input->readMapBegin($_ktype205, $_vtype206, $_size204);
+            for ($_i208 = 0; $_i208 < $_size204; ++$_i208)
             {
-              $key202 = '';
-              $val203 = '';
-              $xfer += $input->readString($key202);
-              $xfer += $input->readString($val203);
-              $this->parameters[$key202] = $val203;
+              $key209 = '';
+              $val210 = '';
+              $xfer += $input->readString($key209);
+              $xfer += $input->readString($val210);
+              $this->parameters[$key209] = $val210;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -7321,9 +7587,9 @@ class Partition {
       {
         $output->writeListBegin(TType::STRING, count($this->values));
         {
-          foreach ($this->values as $iter204)
+          foreach ($this->values as $iter211)
           {
-            $xfer += $output->writeString($iter204);
+            $xfer += $output->writeString($iter211);
           }
         }
         $output->writeListEnd();
@@ -7366,10 +7632,10 @@ class Partition {
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
         {
-          foreach ($this->parameters as $kiter205 => $viter206)
+          foreach ($this->parameters as $kiter212 => $viter213)
           {
-            $xfer += $output->writeString($kiter205);
-            $xfer += $output->writeString($viter206);
+            $xfer += $output->writeString($kiter212);
+            $xfer += $output->writeString($viter213);
           }
         }
         $output->writeMapEnd();
@@ -7520,14 +7786,14 @@ class PartitionWithoutSD {
         case 1:
           if ($ftype == TType::LST) {
             $this->values = array();
-            $_size207 = 0;
-            $_etype210 = 0;
-            $xfer += $input->readListBegin($_etype210, $_size207);
-            for ($_i211 = 0; $_i211 < $_size207; ++$_i211)
+            $_size214 = 0;
+            $_etype217 = 0;
+            $xfer += $input->readListBegin($_etype217, $_size214);
+            for ($_i218 = 0; $_i218 < $_size214; ++$_i218)
             {
-              $elem212 = null;
-              $xfer += $input->readString($elem212);
-              $this->values []= $elem212;
+              $elem219 = null;
+              $xfer += $input->readString($elem219);
+              $this->values []= $elem219;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -7558,17 +7824,17 @@ class PartitionWithoutSD {
         case 5:
           if ($ftype == TType::MAP) {
             $this->parameters = array();
-            $_size213 = 0;
-            $_ktype214 = 0;
-            $_vtype215 = 0;
-            $xfer += $input->readMapBegin($_ktype214, $_vtype215, $_size213);
-            for ($_i217 = 0; $_i217 < $_size213; ++$_i217)
+            $_size220 = 0;
+            $_ktype221 = 0;
+            $_vtype222 = 0;
+            $xfer += $input->readMapBegin($_ktype221, $_vtype222, $_size220);
+            for ($_i224 = 0; $_i224 < $_size220; ++$_i224)
             {
-              $key218 = '';
-              $val219 = '';
-              $xfer += $input->readString($key218);
-              $xfer += $input->readString($val219);
-              $this->parameters[$key218] = $val219;
+              $key225 = '';
+              $val226 = '';
+              $xfer += $input->readString($key225);
+              $xfer += $input->readString($val226);
+              $this->parameters[$key225] = $val226;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -7604,9 +7870,9 @@ class PartitionWithoutSD {
       {
         $output->writeListBegin(TType::STRING, count($this->values));
         {
-          foreach ($this->values as $iter220)
+          foreach ($this->values as $iter227)
           {
-            $xfer += $output->writeString($iter220);
+            $xfer += $output->writeString($iter227);
           }
         }
         $output->writeListEnd();
@@ -7636,10 +7902,10 @@ class PartitionWithoutSD {
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
         {
-          foreach ($this->parameters as $kiter221 => $viter222)
+          foreach ($this->parameters as $kiter228 => $viter229)
           {
-            $xfer += $output->writeString($kiter221);
-            $xfer += $output->writeString($viter222);
+            $xfer += $output->writeString($kiter228);
+            $xfer += $output->writeString($viter229);
           }
         }
         $output->writeMapEnd();
@@ -7724,15 +7990,15 @@ class PartitionSpecWithSharedSD {
         case 1:
           if ($ftype == TType::LST) {
             $this->partitions = array();
-            $_size223 = 0;
-            $_etype226 = 0;
-            $xfer += $input->readListBegin($_etype226, $_size223);
-            for ($_i227 = 0; $_i227 < $_size223; ++$_i227)
+            $_size230 = 0;
+            $_etype233 = 0;
+            $xfer += $input->readListBegin($_etype233, $_size230);
+            for ($_i234 = 0; $_i234 < $_size230; ++$_i234)
             {
-              $elem228 = null;
-              $elem228 = new \metastore\PartitionWithoutSD();
-              $xfer += $elem228->read($input);
-              $this->partitions []= $elem228;
+              $elem235 = null;
+              $elem235 = new \metastore\PartitionWithoutSD();
+              $xfer += $elem235->read($input);
+              $this->partitions []= $elem235;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -7768,9 +8034,9 @@ class PartitionSpecWithSharedSD {
       {
         $output->writeListBegin(TType::STRUCT, count($this->partitions));
         {
-          foreach ($this->partitions as $iter229)
+          foreach ($this->partitions as $iter236)
           {
-            $xfer += $iter229->write($output);
+            $xfer += $iter236->write($output);
           }
         }
         $output->writeListEnd();
@@ -7843,15 +8109,15 @@ class PartitionListComposingSpec {
         case 1:
           if ($ftype == TType::LST) {
             $this->partitions = array();
-            $_size230 = 0;
-            $_etype233 = 0;
-            $xfer += $input->readListBegin($_etype233, $_size230);
-            for ($_i234 = 0; $_i234 < $_size230; ++$_i234)
+            $_size237 = 0;
+            $_etype240 = 0;
+            $xfer += $input->readListBegin($_etype240, $_size237);
+            for ($_i241 = 0; $_i241 < $_size237; ++$_i241)
             {
-              $elem235 = null;
-              $elem235 = new \metastore\Partition();
-              $xfer += $elem235->read($input);
-              $this->partitions []= $elem235;
+              $elem242 = null;
+              $elem242 = new \metastore\Partition();
+              $xfer += $elem242->read($input);
+              $this->partitions []= $elem242;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -7879,9 +8145,9 @@ class PartitionListComposingSpec {
       {
         $output->writeListBegin(TType::STRUCT, count($this->partitions));
         {
-          foreach ($this->partitions as $iter236)
+          foreach ($this->partitions as $iter243)
           {
-            $xfer += $iter236->write($output);
+            $xfer += $iter243->write($output);
           }
         }
         $output->writeListEnd();
@@ -10033,14 +10299,6 @@ class ColumnStatistics {
    */
   public $statsObj = null;
   /**
-   * @var int
-   */
-  public $txnId = -1;
-  /**
-   * @var string
-   */
-  public $validWriteIdList = null;
-  /**
    * @var bool
    */
   public $isStatsCompliant = null;
@@ -10063,14 +10321,6 @@ class ColumnStatistics {
             ),
           ),
         3 => array(
-          'var' => 'txnId',
-          'type' => TType::I64,
-          ),
-        4 => array(
-          'var' => 'validWriteIdList',
-          'type' => TType::STRING,
-          ),
-        5 => array(
           'var' => 'isStatsCompliant',
           'type' => TType::BOOL,
           ),
@@ -10083,12 +10333,6 @@ class ColumnStatistics {
       if (isset($vals['statsObj'])) {
         $this->statsObj = $vals['statsObj'];
       }
-      if (isset($vals['txnId'])) {
-        $this->txnId = $vals['txnId'];
-      }
-      if (isset($vals['validWriteIdList'])) {
-        $this->validWriteIdList = $vals['validWriteIdList'];
-      }
       if (isset($vals['isStatsCompliant'])) {
         $this->isStatsCompliant = $vals['isStatsCompliant'];
       }
@@ -10125,15 +10369,15 @@ class ColumnStatistics {
         case 2:
           if ($ftype == TType::LST) {
             $this->statsObj = array();
-            $_size237 = 0;
-            $_etype240 = 0;
-            $xfer += $input->readListBegin($_etype240, $_size237);
-            for ($_i241 = 0; $_i241 < $_size237; ++$_i241)
+            $_size244 = 0;
+            $_etype247 = 0;
+            $xfer += $input->readListBegin($_etype247, $_size244);
+            for ($_i248 = 0; $_i248 < $_size244; ++$_i248)
             {
-              $elem242 = null;
-              $elem242 = new \metastore\ColumnStatisticsObj();
-              $xfer += $elem242->read($input);
-              $this->statsObj []= $elem242;
+              $elem249 = null;
+              $elem249 = new \metastore\ColumnStatisticsObj();
+              $xfer += $elem249->read($input);
+              $this->statsObj []= $elem249;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -10141,20 +10385,6 @@ class ColumnStatistics {
           }
           break;
         case 3:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->txnId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->validWriteIdList);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
           if ($ftype == TType::BOOL) {
             $xfer += $input->readBool($this->isStatsCompliant);
           } else {
@@ -10190,27 +10420,17 @@ class ColumnStatistics {
       {
         $output->writeListBegin(TType::STRUCT, count($this->statsObj));
         {
-          foreach ($this->statsObj as $iter243)
+          foreach ($this->statsObj as $iter250)
           {
-            $xfer += $iter243->write($output);
+            $xfer += $iter250->write($output);
           }
         }
         $output->writeListEnd();
       }
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->txnId !== null) {
-      $xfer += $output->writeFieldBegin('txnId', TType::I64, 3);
-      $xfer += $output->writeI64($this->txnId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->validWriteIdList !== null) {
-      $xfer += $output->writeFieldBegin('validWriteIdList', TType::STRING, 4);
-      $xfer += $output->writeString($this->validWriteIdList);
-      $xfer += $output->writeFieldEnd();
-    }
     if ($this->isStatsCompliant !== null) {
-      $xfer += $output->writeFieldBegin('isStatsCompliant', TType::BOOL, 5);
+      $xfer += $output->writeFieldBegin('isStatsCompliant', TType::BOOL, 3);
       $xfer += $output->writeBool($this->isStatsCompliant);
       $xfer += $output->writeFieldEnd();
     }
@@ -10294,15 +10514,15 @@ class AggrStats {
         case 1:
           if ($ftype == TType::LST) {
             $this->colStats = array();
-            $_size244 = 0;
-            $_etype247 = 0;
-            $xfer += $input->readListBegin($_etype247, $_size244);
-            for ($_i248 = 0; $_i248 < $_size244; ++$_i248)
+            $_size251 = 0;
+            $_etype254 = 0;
+            $xfer += $input->readListBegin($_etype254, $_size251);
+            for ($_i255 = 0; $_i255 < $_size251; ++$_i255)
             {
-              $elem249 = null;
-              $elem249 = new \metastore\ColumnStatisticsObj();
-              $xfer += $elem249->read($input);
-              $this->colStats []= $elem249;
+              $elem256 = null;
+              $elem256 = new \metastore\ColumnStatisticsObj();
+              $xfer += $elem256->read($input);
+              $this->colStats []= $elem256;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -10344,9 +10564,9 @@ class AggrStats {
       {
         $output->writeListBegin(TType::STRUCT, count($this->colStats));
         {
-          foreach ($this->colStats as $iter250)
+          foreach ($this->colStats as $iter257)
           {
-            $xfer += $iter250->write($output);
+            $xfer += $iter257->write($output);
           }
         }
         $output->writeListEnd();
@@ -10465,15 +10685,15 @@ class SetPartitionsStatsRequest {
         case 1:
           if ($ftype == TType::LST) {
             $this->colStats = array();
-            $_size251 = 0;
-            $_etype254 = 0;
-            $xfer += $input->readListBegin($_etype254, $_size251);
-            for ($_i255 = 0; $_i255 < $_size251; ++$_i255)
+            $_size258 = 0;
+            $_etype261 = 0;
+            $xfer += $input->readListBegin($_etype261, $_size258);
+            for ($_i262 = 0; $_i262 < $_size258; ++$_i262)
             {
-              $elem256 = null;
-              $elem256 = new \metastore\ColumnStatistics();
-              $xfer += $elem256->read($input);
-              $this->colStats []= $elem256;
+              $elem263 = null;
+              $elem263 = new \metastore\ColumnStatistics();
+              $xfer += $elem263->read($input);
+              $this->colStats []= $elem263;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -10529,9 +10749,9 @@ class SetPartitionsStatsRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->colStats));
         {
-          foreach ($this->colStats as $iter257)
+          foreach ($this->colStats as $iter264)
           {
-            $xfer += $iter257->write($output);
+            $xfer += $iter264->write($output);
           }
         }
         $output->writeListEnd();
@@ -10565,6 +10785,81 @@ class SetPartitionsStatsRequest {
 
 }
 
+class SetPartitionsStatsResponse {
+  static $_TSPEC;
+
+  /**
+   * @var bool
+   */
+  public $result = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'result',
+          'type' => TType::BOOL,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['result'])) {
+        $this->result = $vals['result'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'SetPartitionsStatsResponse';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->result);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('SetPartitionsStatsResponse');
+    if ($this->result !== null) {
+      $xfer += $output->writeFieldBegin('result', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->result);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
 class Schema {
   static $_TSPEC;
 
@@ -10635,15 +10930,15 @@ class Schema {
         case 1:
           if ($ftype == TType::LST) {
             $this->fieldSchemas = array();
-            $_size258 = 0;
-            $_etype261 = 0;
-            $xfer += $input->readListBegin($_etype261, $_size258);
-            for ($_i262 = 0; $_i262 < $_size258; ++$_i262)
+            $_size265 = 0;
+            $_etype268 = 0;
+            $xfer += $input->readListBegin($_etype268, $_size265);
+            for ($_i269 = 0; $_i269 < $_size265; ++$_i269)
             {
-              $elem263 = null;
-              $elem263 = new \metastore\FieldSchema();
-              $xfer += $elem263->read($input);
-              $this->fieldSchemas []= $elem263;
+              $elem270 = null;
+              $elem270 = new \metastore\FieldSchema();
+              $xfer += $elem270->read($input);
+              $this->fieldSchemas []= $elem270;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -10653,17 +10948,17 @@ class Schema {
         case 2:
           if ($ftype == TType::MAP) {
             $this->properties = array();
-            $_size264 = 0;
-            $_ktype265 = 0;
-            $_vtype266 = 0;
-            $xfer += $input->readMapBegin($_ktype265, $_vtype266, $_size264);
-            for ($_i268 = 0; $_i268 < $_size264; ++$_i268)
+            $_size271 = 0;
+            $_ktype272 = 0;
+            $_vtype273 = 0;
+            $xfer += $input->readMapBegin($_ktype272, $_vtype273, $_size271);
+            for ($_i275 = 0; $_i275 < $_size271; ++$_i275)
             {
-              $key269 = '';
-              $val270 = '';
-              $xfer += $input->readString($key269);
-              $xfer += $input->readString($val270);
-              $this->properties[$key269] = $val270;
+              $key276 = '';
+              $val277 = '';
+              $xfer += $input->readString($key276);
+              $xfer += $input->readString($val277);
+              $this->properties[$key276] = $val277;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -10691,9 +10986,9 @@ class Schema {
       {
         $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas));
         {
-          foreach ($this->fieldSchemas as $iter271)
+          foreach ($this->fieldSchemas as $iter278)
           {
-            $xfer += $iter271->write($output);
+            $xfer += $iter278->write($output);
           }
         }
         $output->writeListEnd();
@@ -10708,10 +11003,10 @@ class Schema {
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties));
         {
-          foreach ($this->properties as $kiter272 => $viter273)
+          foreach ($this->properties as $kiter279 => $viter280)
           {
-            $xfer += $output->writeString($kiter272);
-            $xfer += $output->writeString($viter273);
+            $xfer += $output->writeString($kiter279);
+            $xfer += $output->writeString($viter280);
           }
         }
         $output->writeMapEnd();
@@ -10779,17 +11074,17 @@ class EnvironmentContext {
         case 1:
           if ($ftype == TType::MAP) {
             $this->properties = array();
-            $_size274 = 0;
-            $_ktype275 = 0;
-            $_vtype276 = 0;
-            $xfer += $input->readMapBegin($_ktype275, $_vtype276, $_size274);
-            for ($_i278 = 0; $_i278 < $_size274; ++$_i278)
+            $_size281 = 0;
+            $_ktype282 = 0;
+            $_vtype283 = 0;
+            $xfer += $input->readMapBegin($_ktype282, $_vtype283, $_size281);
+            for ($_i285 = 0; $_i285 < $_size281; ++$_i285)
             {
-              $key279 = '';
-              $val280 = '';
-              $xfer += $input->readString($key279);
-              $xfer += $input->readString($val280);
-              $this->properties[$key279] = $val280;
+              $key286 = '';
+              $val287 = '';
+              $xfer += $input->readString($key286);
+              $xfer += $input->readString($val287);
+              $this->properties[$key286] = $val287;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -10817,10 +11112,10 @@ class EnvironmentContext {
       {
         $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties));
         {
-          foreach ($this->properties as $kiter281 => $viter282)
+          foreach ($this->properties as $kiter288 => $viter289)
           {
-            $xfer += $output->writeString($kiter281);
-            $xfer += $output->writeString($viter282);
+            $xfer += $output->writeString($kiter288);
+            $xfer += $output->writeString($viter289);
           }
         }
         $output->writeMapEnd();
@@ -11006,15 +11301,15 @@ class PrimaryKeysResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->primaryKeys = array();
-            $_size283 = 0;
-            $_etype286 = 0;
-            $xfer += $input->readListBegin($_etype286, $_size283);
-            for ($_i287 = 0; $_i287 < $_size283; ++$_i287)
+            $_size290 = 0;
+            $_etype293 = 0;
+            $xfer += $input->readListBegin($_etype293, $_size290);
+            for ($_i294 = 0; $_i294 < $_size290; ++$_i294)
             {
-              $elem288 = null;
-              $elem288 = new \metastore\SQLPrimaryKey();
-              $xfer += $elem288->read($input);
-              $this->primaryKeys []= $elem288;
+              $elem295 = null;
+              $elem295 = new \metastore\SQLPrimaryKey();
+              $xfer += $elem295->read($input);
+              $this->primaryKeys []= $elem295;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -11042,9 +11337,9 @@ class PrimaryKeysResponse {
       {
         $output->writeListBegin(TType::STRUCT, count($this->primaryKeys));
         {
-          foreach ($this->primaryKeys as $iter289)
+          foreach ($this->primaryKeys as $iter296)
           {
-            $xfer += $iter289->write($output);
+            $xfer += $iter296->write($output);
           }
         }
         $output->writeListEnd();
@@ -11276,15 +11571,15 @@ class ForeignKeysResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->foreignKeys = array();
-            $_size290 = 0;
-            $_etype293 = 0;
-            $xfer += $input->readListBegin($_etype293, $_size290);
-            for ($_i294 = 0; $_i294 < $_size290; ++$_i294)
+            $_size297 = 0;
+            $_etype300 = 0;
+            $xfer += $input->readListBegin($_etype300, $_size297);
+            for ($_i301 = 0; $_i301 < $_size297; ++$_i301)
             {
-              $elem295 = null;
-              $elem295 = new \metastore\SQLForeignKey();
-              $xfer += $elem295->read($input);
-              $this->foreignKeys []= $elem295;
+              $elem302 = null;
+              $elem302 = new \metastore\SQLForeignKey();
+              $xfer += $elem302->read($input);
+              $this->foreignKeys []= $elem302;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -11312,9 +11607,9 @@ class ForeignKeysResponse {
       {
         $output->writeListBegin(TType::STRUCT, count($this->foreignKeys));
         {
-          foreach ($this->foreignKeys as $iter296)
+          foreach ($this->foreignKeys as $iter303)
           {
-            $xfer += $iter296->write($output);
+            $xfer += $iter303->write($output);
           }
         }
         $output->writeListEnd();
@@ -11500,16 +11795,16 @@ class UniqueConstraintsResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->uniqueConstraints = array();
-            $_size297 = 0;
-            $_etype300 = 0;
-            $xfer += $input->readListBegin($_etype300, $_size297);
-            for ($_i301 = 0; $_i301 < $_size297; ++$_i301)
+            $_size304 = 0;
+            $_etype307 = 0;
+            $xfer += $input->readListBegin($_etype307, $_size304);
+            for ($_i308 = 0; $_i308 < $_size304; ++$_i308)
             {
-              $elem302 = null;
-              $elem302 = new \metastore\SQLUniqueConstraint();
-              $xfer += $elem302->read($input);
-              $this->uniqueConstraints []= $elem302;
-            }
+              $elem309 = null;
+              $elem309 = new \metastore\SQLUniqueConstraint();
+              $xfer += $elem309->read($input);
+              $this->uniqueConstraints []= $elem309;
+            }
             $xfer += $input->readListEnd();
           } else {
             $xfer += $input->skip($ftype);
@@ -11536,9 +11831,9 @@ class UniqueConstraintsResponse {
       {
         $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraints));
         {
-          foreach ($this->uniqueConstraints as $iter303)
+          foreach ($this->uniqueConstraints as $iter310)
           {
-            $xfer += $iter303->write($output);
+            $xfer += $iter310->write($output);
           }
         }
         $output->writeListEnd();
@@ -11724,15 +12019,15 @@ class NotNullConstraintsResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->notNullConstraints = array();
-            $_size304 = 0;
-            $_etype307 = 0;
-            $xfer += $input->readListBegin($_etype307, $_size304);
-            for ($_i308 = 0; $_i308 < $_size304; ++$_i308)
+            $_size311 = 0;
+            $_etype314 = 0;
+            $xfer += $input->readListBegin($_etype314, $_size311);
+            for ($_i315 = 0; $_i315 < $_size311; ++$_i315)
             {
-              $elem309 = null;
-              $elem309 = new \metastore\SQLNotNullConstraint();
-              $xfer += $elem309->read($input);
-              $this->notNullConstraints []= $elem309;
+              $elem316 = null;
+              $elem316 = new \metastore\SQLNotNullConstraint();
+              $xfer += $elem316->read($input);
+              $this->notNullConstraints []= $elem316;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -11760,9 +12055,9 @@ class NotNullConstraintsResponse {
       {
         $output->writeListBegin(TType::STRUCT, count($this->notNullConstraints));
         {
-          foreach ($this->notNullConstraints as $iter310)
+          foreach ($this->notNullConstraints as $iter317)
           {
-            $xfer += $iter310->write($output);
+            $xfer += $iter317->write($output);
           }
         }
         $output->writeListEnd();
@@ -11948,15 +12243,15 @@ class DefaultConstraintsResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->defaultConstraints = array();
-            $_size311 = 0;
-            $_etype314 = 0;
-            $xfer += $input->readListBegin($_etype314, $_size311);
-            for ($_i315 = 0; $_i315 < $_size311; ++$_i315)
+            $_size318 = 0;
+            $_etype321 = 0;
+            $xfer += $input->readListBegin($_etype321, $_size318);
+            for ($_i322 = 0; $_i322 < $_size318; ++$_i322)
             {
-              $elem316 = null;
-              $elem316 = new \metastore\SQLDefaultConstraint();
-              $xfer += $elem316->read($input);
-              $this->defaultConstraints []= $elem316;
+              $elem323 = null;
+              $elem323 = new \metastore\SQLDefaultConstraint();
+              $xfer += $elem323->read($input);
+              $this->defaultConstraints []= $elem323;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -11984,9 +12279,9 @@ class DefaultConstraintsResponse {
       {
         $output->writeListBegin(TType::STRUCT, count($this->defaultConstraints));
         {
-          foreach ($this->defaultConstraints as $iter317)
+          foreach ($this->defaultConstraints as $iter324)
           {
-            $xfer += $iter317->write($output);
+            $xfer += $iter324->write($output);
           }
         }
         $output->writeListEnd();
@@ -12172,15 +12467,15 @@ class CheckConstraintsResponse {
         case 1:
           if ($ftype == TType::LST) {
             $this->checkConstraints = array();
-            $_size318 = 0;
-            $_etype321 = 0;
-            $xfer += $input->readListBegin($_etype321, $_size318);
-            for ($_i322 = 0; $_i322 < $_size318; ++$_i322)
+            $_size325 = 0;
+            $_etype328 = 0;
+            $xfer += $input->readListBegin($_etype328, $_size325);
+            for ($_i329 = 0; $_i329 < $_size325; ++$_i329)
             {
-              $elem323 = null;
-              $elem323 = new \metastore\SQLCheckConstraint();
-              $xfer += $elem323->read($input);
-              $this->checkConstraints []= $elem323;
+              $elem330 = null;
+              $elem330 = new \metastore\SQLCheckConstraint();
+              $xfer += $elem330->read($input);
+              $this->checkConstraints []= $elem330;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -12208,9 +12503,9 @@ class CheckConstraintsResponse {
       {
         $output->writeListBegin(TType::STRUCT, count($this->checkConstraints));
         {
-          foreach ($this->checkConstraints as $iter324)
+          foreach ($this->checkConstraints as $iter331)
           {
-            $xfer += $iter324->write($output);
+            $xfer += $iter331->write($output);
           }
         }
         $output->writeListEnd();
@@ -12419,15 +12714,15 @@ class AddPrimaryKeyRequest {
         case 1:
           if ($ftype == TType::LST) {
             $this->primaryKeyCols = array();
-            $_size325 = 0;
-            $_etype328 = 0;
-            $xfer += $input->readListBegin($_etype328, $_size325);
-            for ($_i329 = 0; $_i329 < $_size325; ++$_i329)
+            $_size332 = 0;
+            $_etype335 = 0;
+            $xfer += $input->readListBegin($_etype335, $_size332);
+            for ($_i336 = 0; $_i336 < $_size332; ++$_i336)
             {
-              $elem330 = null;
-              $elem330 = new \metastore\SQLPrimaryKey();
-              $xfer += $elem330->read($input);
-              $this->primaryKeyCols []= $elem330;
+              $elem337 = null;
+              $elem337 = new \metastore\SQLPrimaryKey();
+              $xfer += $elem337->read($input);
+              $this->primaryKeyCols []= $elem337;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -12455,9 +12750,9 @@ class AddPrimaryKeyRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->primaryKeyCols));
         {
-          foreach ($this->primaryKeyCols as $iter331)
+          foreach ($this->primaryKeyCols as $iter338)
           {
-            $xfer += $iter331->write($output);
+            $xfer += $iter338->write($output);
           }
         }
         $output->writeListEnd();
@@ -12522,15 +12817,15 @@ class AddForeignKeyRequest {
         case 1:
           if ($ftype == TType::LST) {
             $this->foreignKeyCols = array();
-            $_size332 = 0;
-            $_etype335 = 0;
-            $xfer += $input->readListBegin($_etype335, $_size332);
-            for ($_i336 = 0; $_i336 < $_size332; ++$_i336)
+            $_size339 = 0;
+            $_etype342 = 0;
+            $xfer += $input->readListBegin($_etype342, $_size339);
+            for ($_i343 = 0; $_i343 < $_size339; ++$_i343)
             {
-              $elem337 = null;
-              $elem337 = new \metastore\SQLForeignKey();
-              $xfer += $elem337->read($input);
-              $this->foreignKeyCols []= $elem337;
+              $elem344 = null;
+              $elem344 = new \metastore\SQLForeignKey();
+              $xfer += $elem344->read($input);
+              $this->foreignKeyCols []= $elem344;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -12558,9 +12853,9 @@ class AddForeignKeyRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->foreignKeyCols));
         {
-          foreach ($this->foreignKeyCols as $iter338)
+          foreach ($this->foreignKeyCols as $iter345)
           {
-            $xfer += $iter338->write($output);
+            $xfer += $iter345->write($output);
           }
         }
         $output->writeListEnd();
@@ -12625,15 +12920,15 @@ class AddUniqueConstraintRequest {
         case 1:
           if ($ftype == TType::LST) {
             $this->uniqueConstraintCols = array();
-            $_size339 = 0;
-            $_etype342 = 0;
-            $xfer += $input->readListBegin($_etype342, $_size339);
-            for ($_i343 = 0; $_i343 < $_size339; ++$_i343)
+            $_size346 = 0;
+            $_etype349 = 0;
+            $xfer += $input->readListBegin($_etype349, $_size346);
+            for ($_i350 = 0; $_i350 < $_size346; ++$_i350)
             {
-              $elem344 = null;
-              $elem344 = new \metastore\SQLUniqueConstraint();
-              $xfer += $elem344->read($input);
-              $this->uniqueConstraintCols []= $elem344;
+              $elem351 = null;
+              $elem351 = new \metastore\SQLUniqueConstraint();
+              $xfer += $elem351->read($input);
+              $this->uniqueConstraintCols []= $elem351;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -12661,9 +12956,9 @@ class AddUniqueConstraintRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->uniqueConstraintCols));
         {
-          foreach ($this->uniqueConstraintCols as $iter345)
+          foreach ($this->uniqueConstraintCols as $iter352)
           {
-            $xfer += $iter345->write($output);
+            $xfer += $iter352->write($output);
           }
         }
         $output->writeListEnd();
@@ -12728,15 +13023,15 @@ class AddNotNullConstraintRequest {
         case 1:
           if ($ftype == TType::LST) {
             $this->notNullConstraintCols = array();
-            $_size346 = 0;
-            $_etype349 = 0;
-            $xfer += $input->readListBegin($_etype349, $_size346);
-            for ($_i350 = 0; $_i350 < $_size346; ++$_i350)
+            $_size353 = 0;
+            $_etype356 = 0;
+            $xfer += $input->readListBegin($_etype356, $_size353);
+            for ($_i357 = 0; $_i357 < $_size353; ++$_i357)
             {
-              $elem351 = null;
-              $elem351 = new \metastore\SQLNotNullConstraint();
-              $xfer += $elem351->read($input);
-              $this->notNullConstraintCols []= $elem351;
+              $elem358 = null;
+              $elem358 = new \metastore\SQLNotNullConstraint();
+              $xfer += $elem358->read($input);
+              $this->notNullConstraintCols []= $elem358;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -12764,9 +13059,9 @@ class AddNotNullConstraintRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->notNullConstraintCols));
         {
-          foreach ($this->notNullConstraintCols as $iter352)
+          foreach ($this->notNullConstraintCols as $iter359)
           {
-            $xfer += $iter352->write($output);
+            $xfer += $iter359->write($output);
           }
         }
         $output->writeListEnd();
@@ -12831,15 +13126,15 @@ class AddDefaultConstraintRequest {
         case 1:
           if ($ftype == TType::LST) {
             $this->defaultConstraintCols = array();
-            $_size353 = 0;
-            $_etype356 = 0;
-            $xfer += $input->readListBegin($_etype356, $_size353);
-            for ($_i357 = 0; $_i357 < $_size353; ++$_i357)
+            $_size360 = 0;
+            $_etype363 = 0;
+            $xfer += $input->readListBegin($_etype363, $_size360);
+            for ($_i364 = 0; $_i364 < $_size360; ++$_i364)
             {
-              $elem358 = null;
-              $elem358 = new \metastore\SQLDefaultConstraint();
-              $xfer += $elem358->read($input);
-              $this->defaultConstraintCols []= $elem358;
+              $elem365 = null;
+              $elem365 = new \metastore\SQLDefaultConstraint();
+              $xfer += $elem365->read($input);
+              $this->defaultConstraintCols []= $elem365;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -12867,9 +13162,9 @@ class AddDefaultConstraintRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->defaultConstraintCols));
         {
-          foreach ($this->defaultConstraintCols as $iter359)
+          foreach ($this->defaultConstraintCols as $iter366)
           {
-            $xfer += $iter359->write($output);
+            $xfer += $iter366->write($output);
           }
         }
         $output->writeListEnd();
@@ -12934,15 +13229,15 @@ class AddCheckConstraintRequest {
         case 1:
           if ($ftype == TType::LST) {
             $this->checkConstraintCols = array();
-            $_size360 = 0;
-            $_etype363 = 0;
-            $xfer += $input->readListBegin($_etype363, $_size360);
-            for ($_i364 = 0; $_i364 < $_size360; ++$_i364)
+            $_size367 = 0;
+            $_etype370 = 0;
+            $xfer += $input->readListBegin($_etype370, $_size367);
+            for ($_i371 = 0; $_i371 < $_size367; ++$_i371)
             {
-              $elem365 = null;
-              $elem365 = new \metastore\SQLCheckConstraint();
-              $xfer += $elem365->read($input);
-              $this->checkConstraintCols []= $elem365;
+              $elem372 = null;
+              $elem372 = new \metastore\SQLCheckConstraint();
+              $xfer += $elem372->read($input);
+              $this->checkConstraintCols []= $elem372;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -12970,9 +13265,9 @@ class AddCheckConstraintRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->checkConstraintCols));
         {
-          foreach ($this->checkConstraintCols as $iter366)
+          foreach ($this->checkConstraintCols as $iter373)
           {
-            $xfer += $iter366->write($output);
+            $xfer += $iter373->write($output);
           }
         }
         $output->writeListEnd();
@@ -13048,15 +13343,15 @@ class PartitionsByExprResult {
         case 1:
           if ($ftype == TType::LST) {
             $this->partitions = array();
-            $_size367 = 0;
-            $_etype370 = 0;
-            $xfer += $input->readListBegin($_etype370, $_size367);
-            for ($_i371 = 0; $_i371 < $_size367; ++$_i371)
+            $_size374 = 0;
+            $_etype377 = 0;
+            $xfer += $input->readListBegin($_etype377, $_size374);
+            for ($_i378 = 0; $_i378 < $_size374; ++$_i378)
             {
-              $elem372 = null;
-              $elem372 = new \metastore\Partition();
-              $xfer += $elem372->read($input);
-              $this->partitions []= $elem372;
+              $elem379 = null;
+              $elem379 = new \metastore\Partition();
+              $xfer += $elem379->read($input);
+              $this->partitions []= $elem379;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -13091,9 +13386,9 @@ class PartitionsByExprResult {
       {
         $output->writeListBegin(TType::STRUCT, count($this->partitions));
         {
-          foreach ($this->partitions as $iter373)
+          foreach ($this->partitions as $iter380)
           {
-            $xfer += $iter373->write($output);
+            $xfer += $iter380->write($output);
           }
         }
         $output->writeListEnd();
@@ -13364,15 +13659,15 @@ class TableStatsResult {
         case 1:
           if ($ftype == TType::LST) {
             $this->tableStats = array();
-            $_size374 = 0;
-            $_etype377 = 0;
-            $xfer += $input->readListBegin($_etype377, $_size374);
-            for ($_i378 = 0; $_i378 < $_size374; ++$_i378)
+            $_size381 = 0;
+            $_etype384 = 0;
+            $xfer += $input->readListBegin($_etype384, $_size381);
+            for ($_i385 = 0; $_i385 < $_size381; ++$_i385)
             {
-              $elem379 = null;
-              $elem379 = new \metastore\ColumnStatisticsObj();
-              $xfer += $elem379->read($input);
-              $this->tableStats []= $elem379;
+              $elem386 = null;
+              $elem386 = new \metastore\ColumnStatisticsObj();
+              $xfer += $elem386->read($input);
+              $this->tableStats []= $elem386;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -13407,9 +13702,9 @@ class TableStatsResult {
       {
         $output->writeListBegin(TType::STRUCT, count($this->tableStats));
         {
-          foreach ($this->tableStats as $iter380)
+          foreach ($this->tableStats as $iter387)
           {
-            $xfer += $iter380->write($output);
+            $xfer += $iter387->write($output);
           }
         }
         $output->writeListEnd();
@@ -13498,28 +13793,28 @@ class PartitionsStatsResult {
         case 1:
           if ($ftype == TType::MAP) {
             $this->partStats = array();
-            $_size381 = 0;
-            $_ktype382 = 0;
-            $_vtype383 = 0;
-            $xfer += $input->readMapBegin($_ktype382, $_vtype383, $_size381);
-            for ($_i385 = 0; $_i385 < $_size381; ++$_i385)
+            $_size388 = 0;
+            $_ktype389 = 0;
+            $_vtype390 = 0;
+            $xfer += $input->readMapBegin($_ktype389, $_vtype390, $_size388);
+            for ($_i392 = 0; $_i392 < $_size388; ++$_i392)
             {
-              $key386 = '';
-              $val387 = array();
-              $xfer += $input->readString($key386);
-              $val387 = array();
-              $_size388 = 0;
-              $_etype391 = 0;
-              $xfer += $input->readListBegin($_etype391, $_size388);
-              for ($_i392 = 0; $_i392 < $_size388; ++$_i392)
+              $key393 = '';
+              $val394 = array();
+              $xfer += $input->readString($key393);
+              $val394 = array();
+              $_size395 = 0;
+              $_etype398 = 0;
+              $xfer += $input->readListBegin($_etype398, $_size395);
+              for ($_i399 = 0; $_i399 < $_size395; ++$_i399)
               {
-                $elem393 = null;
-                $elem393 = new \metastore\ColumnStatisticsObj();
-                $xfer += $elem393->read($input);
-                $val387 []= $elem393;
+                $elem400 = null;
+                $elem400 = new \metastore\ColumnStatisticsObj();
+                $xfer += $elem400->read($input);
+                $val394 []= $elem400;
               }
               $xfer += $input->readListEnd();
-              $this->partStats[$key386] = $val387;
+              $this->partStats[$key393] = $val394;
             }
             $xfer += $input->readMapEnd();
           } else {
@@ -13554,15 +13849,15 @@ class PartitionsStatsResult {
       {
         $output->writeMapBegin(TType::STRING, TType::LST, count($this->partStats));
         {
-          foreach ($this->partStats as $kiter394 => $viter395)
+          foreach ($this->partStats as $kiter401 => $viter402)
           {
-            $xfer += $output->writeString($kiter394);
+            $xfer += $output->writeString($kiter401);
             {
-              $output->writeListBegin(TType::STRUCT, count($viter395));
+              $output->writeListBegin(TType::STRUCT, count($viter402));
               {
-                foreach ($viter395 as $iter396)
+                foreach ($viter402 as $iter403)
                 {
-                  $xfer += $iter396->write($output);
+                  $xfer += $iter403->write($output);
                 }
               }
               $output->writeListEnd();
@@ -13704,14 +13999,14 @@ class TableStatsRequest {
         case 3:
           if ($ftype == TType::LST) {
             $this->colNames = array();
-            $_size397 = 0;
-            $_etype400 = 0;
-            $xfer += $input->readListBegin($_etype400, $_size397);
-            for ($_i401 = 0; $_i401 < $_size397; ++$_i401)
+            $_size404 = 0;
+            $_etype407 = 0;
+            $xfer += $input->readListBegin($_etype407, $_size404);
+            for ($_i408 = 0; $_i408 < $_size404; ++$_i408)
             {
-              $elem402 = null;
-              $xfer += $input->readString($elem402);
-              $this->colNames []= $elem402;
+              $elem409 = null;
+              $xfer += $input->readString($elem409);
+              $this->colNames []= $elem409;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -13770,9 +14065,9 @@ class TableStatsRequest {
       {
         $output->writeListBegin(TType::STRING, count($this->colNames));
         {
-          foreach ($this->colNames as $iter403)
+          foreach ($this->colNames as $iter410)
           {
-            $xfer += $output->writeString($iter403);
+            $xfer += $output->writeString($iter410);
           }
         }
         $output->writeListEnd();
@@ -13935,14 +14230,14 @@ class PartitionsStatsRequest {
         case 3:
           if ($ftype == TType::LST) {
             $this->colNames = array();
-            $_size404 = 0;
-            $_etype407 = 0;
-            $xfer += $input->readListBegin($_etype407, $_size404);
-            for ($_i408 = 0; $_i408 < $_size404; ++$_i408)
+            $_size411 = 0;
+            $_etype414 = 0;
+            $xfer += $input->readListBegin($_etype414, $_size411);
+            for ($_i415 = 0; $_i415 < $_size411; ++$_i415)
             {
-              $elem409 = null;
-              $xfer += $input->readString($elem409);
-              $this->colNames []= $elem409;
+              $elem416 = null;
+              $xfer += $input->readString($elem416);
+              $this->colNames []= $elem416;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -13952,14 +14247,14 @@ class PartitionsStatsRequest {
         case 4:
           if ($ftype == TType::LST) {
             $this->partNames = array();
-            $_size410 = 0;
-            $_etype413 = 0;
-            $xfer += $input->readListBegin($_etype413, $_size410);
-            for ($_i414 = 0; $_i414 < $_size410; ++$_i414)
+            $_size417 = 0;
+            $_etype420 = 0;
+            $xfer += $input->readListBegin($_etype420, $_size417);
+            for ($_i421 = 0; $_i421 < $_size417; ++$_i421)
             {
-              $elem415 = null;
-              $xfer += $input->readString($elem415);
-              $this->partNames []= $elem415;
+              $elem422 = null;
+              $xfer += $input->readString($elem422);
+              $this->partNames []= $elem422;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -14018,9 +14313,9 @@ class PartitionsStatsRequest {
       {
         $output->writeListBegin(TType::STRING, count($this->colNames));
         {
-          foreach ($this->colNames as $iter416)
+          foreach ($this->colNames as $iter423)
           {
-            $xfer += $output->writeString($iter416);
+            $xfer += $output->writeString($iter423);
           }
         }
         $output->writeListEnd();
@@ -14035,9 +14330,9 @@ class PartitionsStatsRequest {
       {
         $output->writeListBegin(TType::STRING, count($this->partNames));
         {
-          foreach ($this->partNames as $iter417)
+          foreach ($this->partNames as $iter424)
           {
-            $xfer += $output->writeString($iter417);
+            $xfer += $output->writeString($iter424);
           }
         }
         $output->writeListEnd();
@@ -14128,15 +14423,15 @@ class AddPartitionsResult {
         case 1:
           if ($ftype == TType::LST) {
             $this->partitions = array();
-            $_size418 = 0;
-            $_etype421 = 0;
-            $xfer += $input->readListBegin($_etype421, $_size418);
-            for ($_i422 = 0; $_i422 < $_size418; ++$_i422)
+            $_size425 = 0;
+            $_etype428 = 0;
+            $xfer += $input->readListBegin($_etype428, $_size425);
+            for ($_i429 = 0; $_i429 < $_size425; ++$_i429)
             {
-              $elem423 = null;
-              $elem423 = new \metastore\Partition();
-              $xfer += $elem423->read($input);
-              $this->partitions []= $elem423;
+              $elem430 = null;
+              $elem430 = new \metastore\Partition();
+              $xfer += $elem430->read($input);
+              $this->partitions []= $elem430;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -14171,9 +14466,9 @@ class AddPartitionsResult {
       {
         $output->writeListBegin(TType::STRUCT, count($this->partitions));
         {
-          foreach ($this->partitions as $iter424)
+          foreach ($this->partitions as $iter431)
           {
-            $xfer += $iter424->write($output);
+            $xfer += $iter431->write($output);
           }
         }
         $output->writeListEnd();
@@ -14334,15 +14629,15 @@ class AddPartitionsRequest {
         case 3:
           if ($ftype == TType::LST) {
             $this->parts = array();
-            $_size425 = 0;
-            $_etype428 = 0;
-            $xfer += $input->readListBegin($_etype428, $_size425);
-            for ($_i429 = 0; $_i429 < $_size425; ++$_i429)
+            $_size432 = 0;
+            $_etype435 = 0;
+            $xfer += $input->readListBegin($_etype435, $_size432);
+            for ($_i436 = 0; $_i436 < $_size432; ++$_i436)
             {
-              $elem430 = null;
-              $elem430 = new \metastore\Partition();
-              $xfer += $elem430->read($input);
-              $this->parts []= $elem430;
+              $elem437 = null;
+              $elem437 = new \metastore\Partition();
+              $xfer += $elem437->read($input);
+              $this->parts []= $elem437;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -14415,9 +14710,9 @@ class AddPartitionsRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->parts));
         {
-          foreach ($this->parts as $iter431)
+          foreach ($this->parts as $iter438)
           {
-            $xfer += $iter431->write($output);
+            $xfer += $iter438->write($output);
           }
         }
         $output->writeListEnd();
@@ -14507,15 +14802,15 @@ class DropPartitionsResult {
         case 1:
           if ($ftype == TType::LST) {
             $this->partitions = array();
-            $_size432 = 0;
-            $_etype435 = 0;
-            $xfer += $input->readListBegin($_etype435, $_size432);
-            for ($_i436 = 0; $_i436 < $_size432; ++$_i436)
+            $_size439 = 0;
+            $_etype442 = 0;
+            $xfer += $input->readListBegin($_etype442, $_size439);
+            for ($_i443 = 0; $_i443 < $_size439; ++$_i443)
             {
-              $elem437 = null;
-              $elem437 = new \metastore\Partition();
-              $xfer += $elem437->read($input);
-              $this->partitions []= $elem437;
+              $elem444 = null;
+              $elem444 = new \metastore\Partition();
+              $xfer += $elem444->read($input);
+              $this->partitions []= $elem444;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -14543,9 +14838,9 @@ class DropPartitionsResult {
       {
         $output->writeListBegin(TType::STRUCT, count($this->partitions));
         {
-          foreach ($this->partitions as $iter438)
+          foreach ($this->partitions as $iter445)
           {
-            $xfer += $iter438->write($output);
+            $xfer += $iter445->write($output);
           }
         }
         $output->writeListEnd();
@@ -14723,14 +15018,14 @@ class RequestPartsSpec {
         case 1:
           if ($ftype == TType::LST) {
             $this->names = array();
-            $_size439 = 0;
-            $_etype442 = 0;
-            $xfer += $input->readListBegin($_etype442, $_size439);
-            for ($_i443 = 0; $_i443 < $_size439; ++$_i443)
+            $_size446 = 0;
+            $_etype449 = 0;
+            $xfer += $input->readListBegin($_etype449, $_size446);
+            for ($_i450 = 0; $_i450 < $_size446; ++$_i450)
             {
-              $elem444 = null;
-              $xfer += $input->readString($elem444);
-              $this->names []= $elem444;
+              $elem451 = null;
+              $xfer += $input->readString($elem451);
+              $this->names []= $elem451;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -14740,15 +15035,15 @@ class RequestPartsSpec {
         case 2:
           if ($ftype == TType::LST) {
             $this->exprs = array();
-            $_size445 = 0;
-            $_etype448 = 0;
-            $xfer += $input->readListBegin($_etype448, $_size445);
-            for ($_i449 = 0; $_i449 < $_size445; ++$_i449)
+            $_size452 = 0;
+            $_etype455 = 0;
+            $xfer += $input->readListBegin($_etype455, $_size452);
+            for ($_i456 = 0; $_i456 < $_size452; ++$_i456)
             {
-              $elem450 = null;
-              $elem450 = new \metastore\DropPartitionsExpr();
-              $xfer += $elem450->read($input);
-              $this->exprs []= $elem450;
+              $elem457 = null;
+              $elem457 = new \metastore\DropPartitionsExpr();
+              $xfer += $elem457->read($input);
+              $this->exprs []= $elem457;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -14776,9 +15071,9 @@ class RequestPartsSpec {
       {
         $output->writeListBegin(TType::STRING, count($this->names));
         {
-          foreach ($this->names as $iter451)
+          foreach ($this->names as $iter458)
           {
-            $xfer += $output->writeString($iter451);
+            $xfer += $output->writeString($iter458);
           }
         }
         $output->writeListEnd();
@@ -14793,9 +15088,9 @@ class RequestPartsSpec {
       {
         $output->writeListBegin(TType::STRUCT, count($this->exprs));
         {
-          foreach ($this->exprs as $iter452)
+          foreach ($this->exprs as $iter459)
           {
-            $xfer += $iter452->write($output);
+            $xfer += $iter459->write($output);
           }
         }
         $output->writeListEnd();
@@ -15236,15 +15531,15 @@ class PartitionValuesRequest {
         case 3:
           if ($ftype == TType::LST) {
             $this->partitionKeys = array();
-            $_size453 = 0;
-            $_etype456 = 0;
-            $xfer += $input->readListBegin($_etype456, $_size453);
-            for ($_i457 = 0; $_i457 < $_size453; ++$_i457)
+            $_size460 = 0;
+            $_etype463 = 0;
+            $xfer += $input->readListBegin($_etype463, $_size460);
+            for ($_i464 = 0; $_i464 < $_size460; ++$_i464)
             {
-              $elem458 = null;
-              $elem458 = new \metastore\FieldSchema();
-              $xfer += $elem458->read($input);
-              $this->partitionKeys []= $elem458;
+              $elem465 = null;
+              $elem465 = new \metastore\FieldSchema();
+              $xfer += $elem465->read($input);
+              $this->partitionKeys []= $elem465;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -15268,15 +15563,15 @@ class PartitionValuesRequest {
         case 6:
           if ($ftype == TType::LST) {
             $this->partitionOrder = array();
-            $_size459 = 0;
-            $_etype462 = 0;
-            $xfer += $input->readListBegin($_etype462, $_size459);
-            for ($_i463 = 0; $_i463 < $_size459; ++$_i463)
+            $_size466 = 0;
+            $_etype469 = 0;
+            $xfer += $input->readListBegin($_etype469, $_size466);
+            for ($_i470 = 0; $_i470 < $_size466; ++$_i470)
             {
-              $elem464 = null;
-              $elem464 = new \metastore\FieldSchema();
-              $xfer += $elem464->read($input);
-              $this->partitionOrder []= $elem464;
+              $elem471 = null;
+              $elem471 = new \metastore\FieldSchema();
+              $xfer += $elem471->read($input);
+              $this->partitionOrder []= $elem471;
             }
             $xfer += $input->readListEnd();
           } else {
@@ -15335,9 +15630,9 @@ class PartitionValuesRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->partitionKeys));
         {
-          foreach ($this->partitionKeys as $iter465)
+          foreach ($this->partitionKeys as $iter472)
           {
-            $xfer += $iter465->write($output);
+            $xfer += $iter472->write($output);
           }
         }
         $output->writeListEnd();
@@ -15362,9 +15657,9 @@ class PartitionValuesRequest {
       {
         $output->writeListBegin(TType::STRUCT, count($this->partitionOrder));
         {
-          foreach ($this->partitionOrder as $iter466)
+          foreach ($this->partitionOrder as $iter473)
           {
-            $xfer += $iter466->write($output);
+            $xfer += $iter473->write($output);
           }
         }
         $output->writeListEnd();
@@ -15443,14 +15738,14 @@ class PartitionValu

<TRUNCATED>

[11/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TruncateTableRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TruncateTableRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TruncateTableRequest.java
new file mode 100644
index 0000000..9fb79a3
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TruncateTableRequest.java
@@ -0,0 +1,961 @@
+/**
+ * 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 org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class TruncateTableRequest implements org.apache.thrift.TBase<TruncateTableRequest, TruncateTableRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TruncateTableRequest> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TruncateTableRequest");
+
+  private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField PART_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partNames", org.apache.thrift.protocol.TType.LIST, (short)3);
+  private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnId", org.apache.thrift.protocol.TType.I64, (short)4);
+  private static final org.apache.thrift.protocol.TField WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("writeId", org.apache.thrift.protocol.TType.I64, (short)5);
+  private static final org.apache.thrift.protocol.TField VALID_WRITE_ID_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validWriteIdList", org.apache.thrift.protocol.TType.STRING, (short)6);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TruncateTableRequestStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TruncateTableRequestTupleSchemeFactory());
+  }
+
+  private String dbName; // required
+  private String tableName; // required
+  private List<String> partNames; // optional
+  private long txnId; // optional
+  private long writeId; // optional
+  private String validWriteIdList; // 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 {
+    DB_NAME((short)1, "dbName"),
+    TABLE_NAME((short)2, "tableName"),
+    PART_NAMES((short)3, "partNames"),
+    TXN_ID((short)4, "txnId"),
+    WRITE_ID((short)5, "writeId"),
+    VALID_WRITE_ID_LIST((short)6, "validWriteIdList");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // DB_NAME
+          return DB_NAME;
+        case 2: // TABLE_NAME
+          return TABLE_NAME;
+        case 3: // PART_NAMES
+          return PART_NAMES;
+        case 4: // TXN_ID
+          return TXN_ID;
+        case 5: // WRITE_ID
+          return WRITE_ID;
+        case 6: // VALID_WRITE_ID_LIST
+          return VALID_WRITE_ID_LIST;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __TXNID_ISSET_ID = 0;
+  private static final int __WRITEID_ISSET_ID = 1;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.PART_NAMES,_Fields.TXN_ID,_Fields.WRITE_ID,_Fields.VALID_WRITE_ID_LIST};
+  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);
+    tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PART_NAMES, new org.apache.thrift.meta_data.FieldMetaData("partNames", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        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.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.WRITE_ID, new org.apache.thrift.meta_data.FieldMetaData("writeId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.VALID_WRITE_ID_LIST, new org.apache.thrift.meta_data.FieldMetaData("validWriteIdList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TruncateTableRequest.class, metaDataMap);
+  }
+
+  public TruncateTableRequest() {
+    this.txnId = -1L;
+
+    this.writeId = -1L;
+
+  }
+
+  public TruncateTableRequest(
+    String dbName,
+    String tableName)
+  {
+    this();
+    this.dbName = dbName;
+    this.tableName = tableName;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public TruncateTableRequest(TruncateTableRequest other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetDbName()) {
+      this.dbName = other.dbName;
+    }
+    if (other.isSetTableName()) {
+      this.tableName = other.tableName;
+    }
+    if (other.isSetPartNames()) {
+      List<String> __this__partNames = new ArrayList<String>(other.partNames);
+      this.partNames = __this__partNames;
+    }
+    this.txnId = other.txnId;
+    this.writeId = other.writeId;
+    if (other.isSetValidWriteIdList()) {
+      this.validWriteIdList = other.validWriteIdList;
+    }
+  }
+
+  public TruncateTableRequest deepCopy() {
+    return new TruncateTableRequest(this);
+  }
+
+  @Override
+  public void clear() {
+    this.dbName = null;
+    this.tableName = null;
+    this.partNames = null;
+    this.txnId = -1L;
+
+    this.writeId = -1L;
+
+    this.validWriteIdList = null;
+  }
+
+  public String getDbName() {
+    return this.dbName;
+  }
+
+  public void setDbName(String dbName) {
+    this.dbName = dbName;
+  }
+
+  public void unsetDbName() {
+    this.dbName = null;
+  }
+
+  /** Returns true if field dbName is set (has been assigned a value) and false otherwise */
+  public boolean isSetDbName() {
+    return this.dbName != null;
+  }
+
+  public void setDbNameIsSet(boolean value) {
+    if (!value) {
+      this.dbName = null;
+    }
+  }
+
+  public String getTableName() {
+    return this.tableName;
+  }
+
+  public void setTableName(String tableName) {
+    this.tableName = tableName;
+  }
+
+  public void unsetTableName() {
+    this.tableName = null;
+  }
+
+  /** Returns true if field tableName is set (has been assigned a value) and false otherwise */
+  public boolean isSetTableName() {
+    return this.tableName != null;
+  }
+
+  public void setTableNameIsSet(boolean value) {
+    if (!value) {
+      this.tableName = null;
+    }
+  }
+
+  public int getPartNamesSize() {
+    return (this.partNames == null) ? 0 : this.partNames.size();
+  }
+
+  public java.util.Iterator<String> getPartNamesIterator() {
+    return (this.partNames == null) ? null : this.partNames.iterator();
+  }
+
+  public void addToPartNames(String elem) {
+    if (this.partNames == null) {
+      this.partNames = new ArrayList<String>();
+    }
+    this.partNames.add(elem);
+  }
+
+  public List<String> getPartNames() {
+    return this.partNames;
+  }
+
+  public void setPartNames(List<String> partNames) {
+    this.partNames = partNames;
+  }
+
+  public void unsetPartNames() {
+    this.partNames = null;
+  }
+
+  /** Returns true if field partNames is set (has been assigned a value) and false otherwise */
+  public boolean isSetPartNames() {
+    return this.partNames != null;
+  }
+
+  public void setPartNamesIsSet(boolean value) {
+    if (!value) {
+      this.partNames = null;
+    }
+  }
+
+  public long getTxnId() {
+    return this.txnId;
+  }
+
+  public void setTxnId(long txnId) {
+    this.txnId = txnId;
+    setTxnIdIsSet(true);
+  }
+
+  public void unsetTxnId() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID);
+  }
+
+  /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
+  public boolean isSetTxnId() {
+    return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID);
+  }
+
+  public void setTxnIdIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
+  }
+
+  public long getWriteId() {
+    return this.writeId;
+  }
+
+  public void setWriteId(long writeId) {
+    this.writeId = writeId;
+    setWriteIdIsSet(true);
+  }
+
+  public void unsetWriteId() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITEID_ISSET_ID);
+  }
+
+  /** Returns true if field writeId is set (has been assigned a value) and false otherwise */
+  public boolean isSetWriteId() {
+    return EncodingUtils.testBit(__isset_bitfield, __WRITEID_ISSET_ID);
+  }
+
+  public void setWriteIdIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITEID_ISSET_ID, value);
+  }
+
+  public String getValidWriteIdList() {
+    return this.validWriteIdList;
+  }
+
+  public void setValidWriteIdList(String validWriteIdList) {
+    this.validWriteIdList = validWriteIdList;
+  }
+
+  public void unsetValidWriteIdList() {
+    this.validWriteIdList = null;
+  }
+
+  /** Returns true if field validWriteIdList is set (has been assigned a value) and false otherwise */
+  public boolean isSetValidWriteIdList() {
+    return this.validWriteIdList != null;
+  }
+
+  public void setValidWriteIdListIsSet(boolean value) {
+    if (!value) {
+      this.validWriteIdList = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case DB_NAME:
+      if (value == null) {
+        unsetDbName();
+      } else {
+        setDbName((String)value);
+      }
+      break;
+
+    case TABLE_NAME:
+      if (value == null) {
+        unsetTableName();
+      } else {
+        setTableName((String)value);
+      }
+      break;
+
+    case PART_NAMES:
+      if (value == null) {
+        unsetPartNames();
+      } else {
+        setPartNames((List<String>)value);
+      }
+      break;
+
+    case TXN_ID:
+      if (value == null) {
+        unsetTxnId();
+      } else {
+        setTxnId((Long)value);
+      }
+      break;
+
+    case WRITE_ID:
+      if (value == null) {
+        unsetWriteId();
+      } else {
+        setWriteId((Long)value);
+      }
+      break;
+
+    case VALID_WRITE_ID_LIST:
+      if (value == null) {
+        unsetValidWriteIdList();
+      } else {
+        setValidWriteIdList((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case DB_NAME:
+      return getDbName();
+
+    case TABLE_NAME:
+      return getTableName();
+
+    case PART_NAMES:
+      return getPartNames();
+
+    case TXN_ID:
+      return getTxnId();
+
+    case WRITE_ID:
+      return getWriteId();
+
+    case VALID_WRITE_ID_LIST:
+      return getValidWriteIdList();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case DB_NAME:
+      return isSetDbName();
+    case TABLE_NAME:
+      return isSetTableName();
+    case PART_NAMES:
+      return isSetPartNames();
+    case TXN_ID:
+      return isSetTxnId();
+    case WRITE_ID:
+      return isSetWriteId();
+    case VALID_WRITE_ID_LIST:
+      return isSetValidWriteIdList();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof TruncateTableRequest)
+      return this.equals((TruncateTableRequest)that);
+    return false;
+  }
+
+  public boolean equals(TruncateTableRequest that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_dbName = true && this.isSetDbName();
+    boolean that_present_dbName = true && that.isSetDbName();
+    if (this_present_dbName || that_present_dbName) {
+      if (!(this_present_dbName && that_present_dbName))
+        return false;
+      if (!this.dbName.equals(that.dbName))
+        return false;
+    }
+
+    boolean this_present_tableName = true && this.isSetTableName();
+    boolean that_present_tableName = true && that.isSetTableName();
+    if (this_present_tableName || that_present_tableName) {
+      if (!(this_present_tableName && that_present_tableName))
+        return false;
+      if (!this.tableName.equals(that.tableName))
+        return false;
+    }
+
+    boolean this_present_partNames = true && this.isSetPartNames();
+    boolean that_present_partNames = true && that.isSetPartNames();
+    if (this_present_partNames || that_present_partNames) {
+      if (!(this_present_partNames && that_present_partNames))
+        return false;
+      if (!this.partNames.equals(that.partNames))
+        return false;
+    }
+
+    boolean this_present_txnId = true && this.isSetTxnId();
+    boolean that_present_txnId = true && that.isSetTxnId();
+    if (this_present_txnId || that_present_txnId) {
+      if (!(this_present_txnId && that_present_txnId))
+        return false;
+      if (this.txnId != that.txnId)
+        return false;
+    }
+
+    boolean this_present_writeId = true && this.isSetWriteId();
+    boolean that_present_writeId = true && that.isSetWriteId();
+    if (this_present_writeId || that_present_writeId) {
+      if (!(this_present_writeId && that_present_writeId))
+        return false;
+      if (this.writeId != that.writeId)
+        return false;
+    }
+
+    boolean this_present_validWriteIdList = true && this.isSetValidWriteIdList();
+    boolean that_present_validWriteIdList = true && that.isSetValidWriteIdList();
+    if (this_present_validWriteIdList || that_present_validWriteIdList) {
+      if (!(this_present_validWriteIdList && that_present_validWriteIdList))
+        return false;
+      if (!this.validWriteIdList.equals(that.validWriteIdList))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_dbName = true && (isSetDbName());
+    list.add(present_dbName);
+    if (present_dbName)
+      list.add(dbName);
+
+    boolean present_tableName = true && (isSetTableName());
+    list.add(present_tableName);
+    if (present_tableName)
+      list.add(tableName);
+
+    boolean present_partNames = true && (isSetPartNames());
+    list.add(present_partNames);
+    if (present_partNames)
+      list.add(partNames);
+
+    boolean present_txnId = true && (isSetTxnId());
+    list.add(present_txnId);
+    if (present_txnId)
+      list.add(txnId);
+
+    boolean present_writeId = true && (isSetWriteId());
+    list.add(present_writeId);
+    if (present_writeId)
+      list.add(writeId);
+
+    boolean present_validWriteIdList = true && (isSetValidWriteIdList());
+    list.add(present_validWriteIdList);
+    if (present_validWriteIdList)
+      list.add(validWriteIdList);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(TruncateTableRequest other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDbName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTableName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPartNames()).compareTo(other.isSetPartNames());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPartNames()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partNames, other.partNames);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(other.isSetTxnId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTxnId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, other.txnId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetWriteId()).compareTo(other.isSetWriteId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetWriteId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeId, other.writeId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetValidWriteIdList()).compareTo(other.isSetValidWriteIdList());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetValidWriteIdList()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validWriteIdList, other.validWriteIdList);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("TruncateTableRequest(");
+    boolean first = true;
+
+    sb.append("dbName:");
+    if (this.dbName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.dbName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("tableName:");
+    if (this.tableName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.tableName);
+    }
+    first = false;
+    if (isSetPartNames()) {
+      if (!first) sb.append(", ");
+      sb.append("partNames:");
+      if (this.partNames == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.partNames);
+      }
+      first = false;
+    }
+    if (isSetTxnId()) {
+      if (!first) sb.append(", ");
+      sb.append("txnId:");
+      sb.append(this.txnId);
+      first = false;
+    }
+    if (isSetWriteId()) {
+      if (!first) sb.append(", ");
+      sb.append("writeId:");
+      sb.append(this.writeId);
+      first = false;
+    }
+    if (isSetValidWriteIdList()) {
+      if (!first) sb.append(", ");
+      sb.append("validWriteIdList:");
+      if (this.validWriteIdList == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.validWriteIdList);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetDbName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString());
+    }
+
+    if (!isSetTableName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  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);
+    }
+  }
+
+  private static class TruncateTableRequestStandardSchemeFactory implements SchemeFactory {
+    public TruncateTableRequestStandardScheme getScheme() {
+      return new TruncateTableRequestStandardScheme();
+    }
+  }
+
+  private static class TruncateTableRequestStandardScheme extends StandardScheme<TruncateTableRequest> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TruncateTableRequest struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // DB_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.dbName = iprot.readString();
+              struct.setDbNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // TABLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tableName = iprot.readString();
+              struct.setTableNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // PART_NAMES
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
+                struct.partNames = new ArrayList<String>(_list78.size);
+                String _elem79;
+                for (int _i80 = 0; _i80 < _list78.size; ++_i80)
+                {
+                  _elem79 = iprot.readString();
+                  struct.partNames.add(_elem79);
+                }
+                iprot.readListEnd();
+              }
+              struct.setPartNamesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TXN_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.txnId = iprot.readI64();
+              struct.setTxnIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // WRITE_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.writeId = iprot.readI64();
+              struct.setWriteIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // VALID_WRITE_ID_LIST
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.validWriteIdList = iprot.readString();
+              struct.setValidWriteIdListIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, TruncateTableRequest struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.dbName != null) {
+        oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+        oprot.writeString(struct.dbName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.tableName != null) {
+        oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.tableName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.partNames != null) {
+        if (struct.isSetPartNames()) {
+          oprot.writeFieldBegin(PART_NAMES_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partNames.size()));
+            for (String _iter81 : struct.partNames)
+            {
+              oprot.writeString(_iter81);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.isSetTxnId()) {
+        oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
+        oprot.writeI64(struct.txnId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetWriteId()) {
+        oprot.writeFieldBegin(WRITE_ID_FIELD_DESC);
+        oprot.writeI64(struct.writeId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.validWriteIdList != null) {
+        if (struct.isSetValidWriteIdList()) {
+          oprot.writeFieldBegin(VALID_WRITE_ID_LIST_FIELD_DESC);
+          oprot.writeString(struct.validWriteIdList);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TruncateTableRequestTupleSchemeFactory implements SchemeFactory {
+    public TruncateTableRequestTupleScheme getScheme() {
+      return new TruncateTableRequestTupleScheme();
+    }
+  }
+
+  private static class TruncateTableRequestTupleScheme extends TupleScheme<TruncateTableRequest> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TruncateTableRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.dbName);
+      oprot.writeString(struct.tableName);
+      BitSet optionals = new BitSet();
+      if (struct.isSetPartNames()) {
+        optionals.set(0);
+      }
+      if (struct.isSetTxnId()) {
+        optionals.set(1);
+      }
+      if (struct.isSetWriteId()) {
+        optionals.set(2);
+      }
+      if (struct.isSetValidWriteIdList()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetPartNames()) {
+        {
+          oprot.writeI32(struct.partNames.size());
+          for (String _iter82 : struct.partNames)
+          {
+            oprot.writeString(_iter82);
+          }
+        }
+      }
+      if (struct.isSetTxnId()) {
+        oprot.writeI64(struct.txnId);
+      }
+      if (struct.isSetWriteId()) {
+        oprot.writeI64(struct.writeId);
+      }
+      if (struct.isSetValidWriteIdList()) {
+        oprot.writeString(struct.validWriteIdList);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TruncateTableRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.dbName = iprot.readString();
+      struct.setDbNameIsSet(true);
+      struct.tableName = iprot.readString();
+      struct.setTableNameIsSet(true);
+      BitSet incoming = iprot.readBitSet(4);
+      if (incoming.get(0)) {
+        {
+          org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.partNames = new ArrayList<String>(_list83.size);
+          String _elem84;
+          for (int _i85 = 0; _i85 < _list83.size; ++_i85)
+          {
+            _elem84 = iprot.readString();
+            struct.partNames.add(_elem84);
+          }
+        }
+        struct.setPartNamesIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.txnId = iprot.readI64();
+        struct.setTxnIdIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.writeId = iprot.readI64();
+        struct.setWriteIdIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.validWriteIdList = iprot.readString();
+        struct.setValidWriteIdListIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TruncateTableResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TruncateTableResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TruncateTableResponse.java
new file mode 100644
index 0000000..2ebcb42
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TruncateTableResponse.java
@@ -0,0 +1,283 @@
+/**
+ * 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 org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class TruncateTableResponse implements org.apache.thrift.TBase<TruncateTableResponse, TruncateTableResponse._Fields>, java.io.Serializable, Cloneable, Comparable<TruncateTableResponse> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TruncateTableResponse");
+
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TruncateTableResponseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TruncateTableResponseTupleSchemeFactory());
+  }
+
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+  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);
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TruncateTableResponse.class, metaDataMap);
+  }
+
+  public TruncateTableResponse() {
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public TruncateTableResponse(TruncateTableResponse other) {
+  }
+
+  public TruncateTableResponse deepCopy() {
+    return new TruncateTableResponse(this);
+  }
+
+  @Override
+  public void clear() {
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof TruncateTableResponse)
+      return this.equals((TruncateTableResponse)that);
+    return false;
+  }
+
+  public boolean equals(TruncateTableResponse that) {
+    if (that == null)
+      return false;
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(TruncateTableResponse other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("TruncateTableResponse(");
+    boolean first = true;
+
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      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);
+    }
+  }
+
+  private static class TruncateTableResponseStandardSchemeFactory implements SchemeFactory {
+    public TruncateTableResponseStandardScheme getScheme() {
+      return new TruncateTableResponseStandardScheme();
+    }
+  }
+
+  private static class TruncateTableResponseStandardScheme extends StandardScheme<TruncateTableResponse> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TruncateTableResponse struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, TruncateTableResponse struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TruncateTableResponseTupleSchemeFactory implements SchemeFactory {
+    public TruncateTableResponseTupleScheme getScheme() {
+      return new TruncateTableResponseTupleScheme();
+    }
+  }
+
+  private static class TruncateTableResponseTupleScheme extends TupleScheme<TruncateTableResponse> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TruncateTableResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TruncateTableResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java
index 80dea83..1acf6f4 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/UniqueConstraintsResponse.java
@@ -354,14 +354,14 @@ import org.slf4j.LoggerFactory;
           case 1: // UNIQUE_CONSTRAINTS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list336 = iprot.readListBegin();
-                struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list336.size);
-                SQLUniqueConstraint _elem337;
-                for (int _i338 = 0; _i338 < _list336.size; ++_i338)
+                org.apache.thrift.protocol.TList _list344 = iprot.readListBegin();
+                struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list344.size);
+                SQLUniqueConstraint _elem345;
+                for (int _i346 = 0; _i346 < _list344.size; ++_i346)
                 {
-                  _elem337 = new SQLUniqueConstraint();
-                  _elem337.read(iprot);
-                  struct.uniqueConstraints.add(_elem337);
+                  _elem345 = new SQLUniqueConstraint();
+                  _elem345.read(iprot);
+                  struct.uniqueConstraints.add(_elem345);
                 }
                 iprot.readListEnd();
               }
@@ -387,9 +387,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(UNIQUE_CONSTRAINTS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.uniqueConstraints.size()));
-          for (SQLUniqueConstraint _iter339 : struct.uniqueConstraints)
+          for (SQLUniqueConstraint _iter347 : struct.uniqueConstraints)
           {
-            _iter339.write(oprot);
+            _iter347.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       {
         oprot.writeI32(struct.uniqueConstraints.size());
-        for (SQLUniqueConstraint _iter340 : struct.uniqueConstraints)
+        for (SQLUniqueConstraint _iter348 : struct.uniqueConstraints)
         {
-          _iter340.write(oprot);
+          _iter348.write(oprot);
         }
       }
     }
@@ -425,14 +425,14 @@ import org.slf4j.LoggerFactory;
     public void read(org.apache.thrift.protocol.TProtocol prot, UniqueConstraintsResponse struct) throws org.apache.thrift.TException {
       TTupleProtocol iprot = (TTupleProtocol) prot;
       {
-        org.apache.thrift.protocol.TList _list341 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list341.size);
-        SQLUniqueConstraint _elem342;
-        for (int _i343 = 0; _i343 < _list341.size; ++_i343)
+        org.apache.thrift.protocol.TList _list349 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.uniqueConstraints = new ArrayList<SQLUniqueConstraint>(_list349.size);
+        SQLUniqueConstraint _elem350;
+        for (int _i351 = 0; _i351 < _list349.size; ++_i351)
         {
-          _elem342 = new SQLUniqueConstraint();
-          _elem342.read(iprot);
-          struct.uniqueConstraints.add(_elem342);
+          _elem350 = new SQLUniqueConstraint();
+          _elem350.read(iprot);
+          struct.uniqueConstraints.add(_elem350);
         }
       }
       struct.setUniqueConstraintsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java
index 4467479..6d3ac0c 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMFullResourcePlan.java
@@ -755,14 +755,14 @@ import org.slf4j.LoggerFactory;
           case 2: // POOLS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list872 = iprot.readListBegin();
-                struct.pools = new ArrayList<WMPool>(_list872.size);
-                WMPool _elem873;
-                for (int _i874 = 0; _i874 < _list872.size; ++_i874)
+                org.apache.thrift.protocol.TList _list880 = iprot.readListBegin();
+                struct.pools = new ArrayList<WMPool>(_list880.size);
+                WMPool _elem881;
+                for (int _i882 = 0; _i882 < _list880.size; ++_i882)
                 {
-                  _elem873 = new WMPool();
-                  _elem873.read(iprot);
-                  struct.pools.add(_elem873);
+                  _elem881 = new WMPool();
+                  _elem881.read(iprot);
+                  struct.pools.add(_elem881);
                 }
                 iprot.readListEnd();
               }
@@ -774,14 +774,14 @@ import org.slf4j.LoggerFactory;
           case 3: // MAPPINGS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list875 = iprot.readListBegin();
-                struct.mappings = new ArrayList<WMMapping>(_list875.size);
-                WMMapping _elem876;
-                for (int _i877 = 0; _i877 < _list875.size; ++_i877)
+                org.apache.thrift.protocol.TList _list883 = iprot.readListBegin();
+                struct.mappings = new ArrayList<WMMapping>(_list883.size);
+                WMMapping _elem884;
+                for (int _i885 = 0; _i885 < _list883.size; ++_i885)
                 {
-                  _elem876 = new WMMapping();
-                  _elem876.read(iprot);
-                  struct.mappings.add(_elem876);
+                  _elem884 = new WMMapping();
+                  _elem884.read(iprot);
+                  struct.mappings.add(_elem884);
                 }
                 iprot.readListEnd();
               }
@@ -793,14 +793,14 @@ import org.slf4j.LoggerFactory;
           case 4: // TRIGGERS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list878 = iprot.readListBegin();
-                struct.triggers = new ArrayList<WMTrigger>(_list878.size);
-                WMTrigger _elem879;
-                for (int _i880 = 0; _i880 < _list878.size; ++_i880)
+                org.apache.thrift.protocol.TList _list886 = iprot.readListBegin();
+                struct.triggers = new ArrayList<WMTrigger>(_list886.size);
+                WMTrigger _elem887;
+                for (int _i888 = 0; _i888 < _list886.size; ++_i888)
                 {
-                  _elem879 = new WMTrigger();
-                  _elem879.read(iprot);
-                  struct.triggers.add(_elem879);
+                  _elem887 = new WMTrigger();
+                  _elem887.read(iprot);
+                  struct.triggers.add(_elem887);
                 }
                 iprot.readListEnd();
               }
@@ -812,14 +812,14 @@ import org.slf4j.LoggerFactory;
           case 5: // POOL_TRIGGERS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list881 = iprot.readListBegin();
-                struct.poolTriggers = new ArrayList<WMPoolTrigger>(_list881.size);
-                WMPoolTrigger _elem882;
-                for (int _i883 = 0; _i883 < _list881.size; ++_i883)
+                org.apache.thrift.protocol.TList _list889 = iprot.readListBegin();
+                struct.poolTriggers = new ArrayList<WMPoolTrigger>(_list889.size);
+                WMPoolTrigger _elem890;
+                for (int _i891 = 0; _i891 < _list889.size; ++_i891)
                 {
-                  _elem882 = new WMPoolTrigger();
-                  _elem882.read(iprot);
-                  struct.poolTriggers.add(_elem882);
+                  _elem890 = new WMPoolTrigger();
+                  _elem890.read(iprot);
+                  struct.poolTriggers.add(_elem890);
                 }
                 iprot.readListEnd();
               }
@@ -850,9 +850,9 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(POOLS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.pools.size()));
-          for (WMPool _iter884 : struct.pools)
+          for (WMPool _iter892 : struct.pools)
           {
-            _iter884.write(oprot);
+            _iter892.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -863,9 +863,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(MAPPINGS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mappings.size()));
-            for (WMMapping _iter885 : struct.mappings)
+            for (WMMapping _iter893 : struct.mappings)
             {
-              _iter885.write(oprot);
+              _iter893.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -877,9 +877,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(TRIGGERS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.triggers.size()));
-            for (WMTrigger _iter886 : struct.triggers)
+            for (WMTrigger _iter894 : struct.triggers)
             {
-              _iter886.write(oprot);
+              _iter894.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -891,9 +891,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(POOL_TRIGGERS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.poolTriggers.size()));
-            for (WMPoolTrigger _iter887 : struct.poolTriggers)
+            for (WMPoolTrigger _iter895 : struct.poolTriggers)
             {
-              _iter887.write(oprot);
+              _iter895.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -920,9 +920,9 @@ import org.slf4j.LoggerFactory;
       struct.plan.write(oprot);
       {
         oprot.writeI32(struct.pools.size());
-        for (WMPool _iter888 : struct.pools)
+        for (WMPool _iter896 : struct.pools)
         {
-          _iter888.write(oprot);
+          _iter896.write(oprot);
         }
       }
       BitSet optionals = new BitSet();
@@ -939,27 +939,27 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetMappings()) {
         {
           oprot.writeI32(struct.mappings.size());
-          for (WMMapping _iter889 : struct.mappings)
+          for (WMMapping _iter897 : struct.mappings)
           {
-            _iter889.write(oprot);
+            _iter897.write(oprot);
           }
         }
       }
       if (struct.isSetTriggers()) {
         {
           oprot.writeI32(struct.triggers.size());
-          for (WMTrigger _iter890 : struct.triggers)
+          for (WMTrigger _iter898 : struct.triggers)
           {
-            _iter890.write(oprot);
+            _iter898.write(oprot);
           }
         }
       }
       if (struct.isSetPoolTriggers()) {
         {
           oprot.writeI32(struct.poolTriggers.size());
-          for (WMPoolTrigger _iter891 : struct.poolTriggers)
+          for (WMPoolTrigger _iter899 : struct.poolTriggers)
           {
-            _iter891.write(oprot);
+            _iter899.write(oprot);
           }
         }
       }
@@ -972,56 +972,56 @@ import org.slf4j.LoggerFactory;
       struct.plan.read(iprot);
       struct.setPlanIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list892 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.pools = new ArrayList<WMPool>(_list892.size);
-        WMPool _elem893;
-        for (int _i894 = 0; _i894 < _list892.size; ++_i894)
+        org.apache.thrift.protocol.TList _list900 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.pools = new ArrayList<WMPool>(_list900.size);
+        WMPool _elem901;
+        for (int _i902 = 0; _i902 < _list900.size; ++_i902)
         {
-          _elem893 = new WMPool();
-          _elem893.read(iprot);
-          struct.pools.add(_elem893);
+          _elem901 = new WMPool();
+          _elem901.read(iprot);
+          struct.pools.add(_elem901);
         }
       }
       struct.setPoolsIsSet(true);
       BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list895 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.mappings = new ArrayList<WMMapping>(_list895.size);
-          WMMapping _elem896;
-          for (int _i897 = 0; _i897 < _list895.size; ++_i897)
+          org.apache.thrift.protocol.TList _list903 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.mappings = new ArrayList<WMMapping>(_list903.size);
+          WMMapping _elem904;
+          for (int _i905 = 0; _i905 < _list903.size; ++_i905)
           {
-            _elem896 = new WMMapping();
-            _elem896.read(iprot);
-            struct.mappings.add(_elem896);
+            _elem904 = new WMMapping();
+            _elem904.read(iprot);
+            struct.mappings.add(_elem904);
           }
         }
         struct.setMappingsIsSet(true);
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list898 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.triggers = new ArrayList<WMTrigger>(_list898.size);
-          WMTrigger _elem899;
-          for (int _i900 = 0; _i900 < _list898.size; ++_i900)
+          org.apache.thrift.protocol.TList _list906 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.triggers = new ArrayList<WMTrigger>(_list906.size);
+          WMTrigger _elem907;
+          for (int _i908 = 0; _i908 < _list906.size; ++_i908)
           {
-            _elem899 = new WMTrigger();
-            _elem899.read(iprot);
-            struct.triggers.add(_elem899);
+            _elem907 = new WMTrigger();
+            _elem907.read(iprot);
+            struct.triggers.add(_elem907);
           }
         }
         struct.setTriggersIsSet(true);
       }
       if (incoming.get(2)) {
         {
-          org.apache.thrift.protocol.TList _list901 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.poolTriggers = new ArrayList<WMPoolTrigger>(_list901.size);
-          WMPoolTrigger _elem902;
-          for (int _i903 = 0; _i903 < _list901.size; ++_i903)
+          org.apache.thrift.protocol.TList _list909 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.poolTriggers = new ArrayList<WMPoolTrigger>(_list909.size);
+          WMPoolTrigger _elem910;
+          for (int _i911 = 0; _i911 < _list909.size; ++_i911)
           {
-            _elem902 = new WMPoolTrigger();
-            _elem902.read(iprot);
-            struct.poolTriggers.add(_elem902);
+            _elem910 = new WMPoolTrigger();
+            _elem910.read(iprot);
+            struct.poolTriggers.add(_elem910);
           }
         }
         struct.setPoolTriggersIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java
index c6cb845..2c427b9 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetAllResourcePlanResponse.java
@@ -346,14 +346,14 @@ import org.slf4j.LoggerFactory;
           case 1: // RESOURCE_PLANS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list904 = iprot.readListBegin();
-                struct.resourcePlans = new ArrayList<WMResourcePlan>(_list904.size);
-                WMResourcePlan _elem905;
-                for (int _i906 = 0; _i906 < _list904.size; ++_i906)
+                org.apache.thrift.protocol.TList _list912 = iprot.readListBegin();
+                struct.resourcePlans = new ArrayList<WMResourcePlan>(_list912.size);
+                WMResourcePlan _elem913;
+                for (int _i914 = 0; _i914 < _list912.size; ++_i914)
                 {
-                  _elem905 = new WMResourcePlan();
-                  _elem905.read(iprot);
-                  struct.resourcePlans.add(_elem905);
+                  _elem913 = new WMResourcePlan();
+                  _elem913.read(iprot);
+                  struct.resourcePlans.add(_elem913);
                 }
                 iprot.readListEnd();
               }
@@ -380,9 +380,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(RESOURCE_PLANS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.resourcePlans.size()));
-            for (WMResourcePlan _iter907 : struct.resourcePlans)
+            for (WMResourcePlan _iter915 : struct.resourcePlans)
             {
-              _iter907.write(oprot);
+              _iter915.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetResourcePlans()) {
         {
           oprot.writeI32(struct.resourcePlans.size());
-          for (WMResourcePlan _iter908 : struct.resourcePlans)
+          for (WMResourcePlan _iter916 : struct.resourcePlans)
           {
-            _iter908.write(oprot);
+            _iter916.write(oprot);
           }
         }
       }
@@ -428,14 +428,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list909 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.resourcePlans = new ArrayList<WMResourcePlan>(_list909.size);
-          WMResourcePlan _elem910;
-          for (int _i911 = 0; _i911 < _list909.size; ++_i911)
+          org.apache.thrift.protocol.TList _list917 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.resourcePlans = new ArrayList<WMResourcePlan>(_list917.size);
+          WMResourcePlan _elem918;
+          for (int _i919 = 0; _i919 < _list917.size; ++_i919)
           {
-            _elem910 = new WMResourcePlan();
-            _elem910.read(iprot);
-            struct.resourcePlans.add(_elem910);
+            _elem918 = new WMResourcePlan();
+            _elem918.read(iprot);
+            struct.resourcePlans.add(_elem918);
           }
         }
         struct.setResourcePlansIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java
index 9eed335..57615c0 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMGetTriggersForResourePlanResponse.java
@@ -346,14 +346,14 @@ import org.slf4j.LoggerFactory;
           case 1: // TRIGGERS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list928 = iprot.readListBegin();
-                struct.triggers = new ArrayList<WMTrigger>(_list928.size);
-                WMTrigger _elem929;
-                for (int _i930 = 0; _i930 < _list928.size; ++_i930)
+                org.apache.thrift.protocol.TList _list936 = iprot.readListBegin();
+                struct.triggers = new ArrayList<WMTrigger>(_list936.size);
+                WMTrigger _elem937;
+                for (int _i938 = 0; _i938 < _list936.size; ++_i938)
                 {
-                  _elem929 = new WMTrigger();
-                  _elem929.read(iprot);
-                  struct.triggers.add(_elem929);
+                  _elem937 = new WMTrigger();
+                  _elem937.read(iprot);
+                  struct.triggers.add(_elem937);
                 }
                 iprot.readListEnd();
               }
@@ -380,9 +380,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(TRIGGERS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.triggers.size()));
-            for (WMTrigger _iter931 : struct.triggers)
+            for (WMTrigger _iter939 : struct.triggers)
             {
-              _iter931.write(oprot);
+              _iter939.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -414,9 +414,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetTriggers()) {
         {
           oprot.writeI32(struct.triggers.size());
-          for (WMTrigger _iter932 : struct.triggers)
+          for (WMTrigger _iter940 : struct.triggers)
           {
-            _iter932.write(oprot);
+            _iter940.write(oprot);
           }
         }
       }
@@ -428,14 +428,14 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list933 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-          struct.triggers = new ArrayList<WMTrigger>(_list933.size);
-          WMTrigger _elem934;
-          for (int _i935 = 0; _i935 < _list933.size; ++_i935)
+          org.apache.thrift.protocol.TList _list941 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.triggers = new ArrayList<WMTrigger>(_list941.size);
+          WMTrigger _elem942;
+          for (int _i943 = 0; _i943 < _list941.size; ++_i943)
           {
-            _elem934 = new WMTrigger();
-            _elem934.read(iprot);
-            struct.triggers.add(_elem934);
+            _elem942 = new WMTrigger();
+            _elem942.read(iprot);
+            struct.triggers.add(_elem942);
           }
         }
         struct.setTriggersIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java
index ee9251c..3f7f953 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WMValidateResourcePlanResponse.java
@@ -441,13 +441,13 @@ import org.slf4j.LoggerFactory;
           case 1: // ERRORS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list912 = iprot.readListBegin();
-                struct.errors = new ArrayList<String>(_list912.size);
-                String _elem913;
-                for (int _i914 = 0; _i914 < _list912.size; ++_i914)
+                org.apache.thrift.protocol.TList _list920 = iprot.readListBegin();
+                struct.errors = new ArrayList<String>(_list920.size);
+                String _elem921;
+                for (int _i922 = 0; _i922 < _list920.size; ++_i922)
                 {
-                  _elem913 = iprot.readString();
-                  struct.errors.add(_elem913);
+                  _elem921 = iprot.readString();
+                  struct.errors.add(_elem921);
                 }
                 iprot.readListEnd();
               }
@@ -459,13 +459,13 @@ import org.slf4j.LoggerFactory;
           case 2: // WARNINGS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list915 = iprot.readListBegin();
-                struct.warnings = new ArrayList<String>(_list915.size);
-                String _elem916;
-                for (int _i917 = 0; _i917 < _list915.size; ++_i917)
+                org.apache.thrift.protocol.TList _list923 = iprot.readListBegin();
+                struct.warnings = new ArrayList<String>(_list923.size);
+                String _elem924;
+                for (int _i925 = 0; _i925 < _list923.size; ++_i925)
                 {
-                  _elem916 = iprot.readString();
-                  struct.warnings.add(_elem916);
+                  _elem924 = iprot.readString();
+                  struct.warnings.add(_elem924);
                 }
                 iprot.readListEnd();
               }
@@ -492,9 +492,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(ERRORS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.errors.size()));
-            for (String _iter918 : struct.errors)
+            for (String _iter926 : struct.errors)
             {
-              oprot.writeString(_iter918);
+              oprot.writeString(_iter926);
             }
             oprot.writeListEnd();
           }
@@ -506,9 +506,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(WARNINGS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.warnings.size()));
-            for (String _iter919 : struct.warnings)
+            for (String _iter927 : struct.warnings)
             {
-              oprot.writeString(_iter919);
+              oprot.writeString(_iter927);
             }
             oprot.writeListEnd();
           }
@@ -543,18 +543,18 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetErrors()) {
         {
           oprot.writeI32(struct.errors.size());
-          for (String _iter920 : struct.errors)
+          for (String _iter928 : struct.errors)
           {
-            oprot.writeString(_iter920);
+            oprot.writeString(_iter928);
           }
         }
       }
       if (struct.isSetWarnings()) {
         {
           oprot.writeI32(struct.warnings.size());
-          for (String _iter921 : struct.warnings)
+          for (String _iter929 : struct.warnings)
           {
-            oprot.writeString(_iter921);
+            oprot.writeString(_iter929);
           }
         }
       }
@@ -566,26 +566,26 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list922 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.errors = new ArrayList<String>(_list922.size);
-          String _elem923;
-          for (int _i924 = 0; _i924 < _list922.size; ++_i924)
+          org.apache.thrift.protocol.TList _list930 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.errors = new ArrayList<String>(_list930.size);
+          String _elem931;
+          for (int _i932 = 0; _i932 < _list930.size; ++_i932)
           {
-            _elem923 = iprot.readString();
-            struct.errors.add(_elem923);
+            _elem931 = iprot.readString();
+            struct.errors.add(_elem931);
           }
         }
         struct.setErrorsIsSet(true);
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list925 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.warnings = new ArrayList<String>(_list925.size);
-          String _elem926;
-          for (int _i927 = 0; _i927 < _list925.size; ++_i927)
+          org.apache.thrift.protocol.TList _list933 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.warnings = new ArrayList<String>(_list933.size);
+          String _elem934;
+          for (int _i935 = 0; _i935 < _list933.size; ++_i935)
           {
-            _elem926 = iprot.readString();
-            struct.warnings.add(_elem926);
+            _elem934 = iprot.readString();
+            struct.warnings.add(_elem934);
           }
         }
         struct.setWarningsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WriteNotificationLogRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WriteNotificationLogRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WriteNotificationLogRequest.java
index 5758820..c7ef726 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WriteNotificationLogRequest.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/WriteNotificationLogRequest.java
@@ -813,13 +813,13 @@ import org.slf4j.LoggerFactory;
           case 6: // PARTITION_VALS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list764 = iprot.readListBegin();
-                struct.partitionVals = new ArrayList<String>(_list764.size);
-                String _elem765;
-                for (int _i766 = 0; _i766 < _list764.size; ++_i766)
+                org.apache.thrift.protocol.TList _list772 = iprot.readListBegin();
+                struct.partitionVals = new ArrayList<String>(_list772.size);
+                String _elem773;
+                for (int _i774 = 0; _i774 < _list772.size; ++_i774)
                 {
-                  _elem765 = iprot.readString();
-                  struct.partitionVals.add(_elem765);
+                  _elem773 = iprot.readString();
+                  struct.partitionVals.add(_elem773);
                 }
                 iprot.readListEnd();
               }
@@ -867,9 +867,9 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldBegin(PARTITION_VALS_FIELD_DESC);
           {
             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionVals.size()));
-            for (String _iter767 : struct.partitionVals)
+            for (String _iter775 : struct.partitionVals)
             {
-              oprot.writeString(_iter767);
+              oprot.writeString(_iter775);
             }
             oprot.writeListEnd();
           }
@@ -906,9 +906,9 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetPartitionVals()) {
         {
           oprot.writeI32(struct.partitionVals.size());
-          for (String _iter768 : struct.partitionVals)
+          for (String _iter776 : struct.partitionVals)
           {
-            oprot.writeString(_iter768);
+            oprot.writeString(_iter776);
           }
         }
       }
@@ -931,13 +931,13 @@ import org.slf4j.LoggerFactory;
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list769 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.partitionVals = new ArrayList<String>(_list769.size);
-          String _elem770;
-          for (int _i771 = 0; _i771 < _list769.size; ++_i771)
+          org.apache.thrift.protocol.TList _list777 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.partitionVals = new ArrayList<String>(_list777.size);
+          String _elem778;
+          for (int _i779 = 0; _i779 < _list777.size; ++_i779)
           {
-            _elem770 = iprot.readString();
-            struct.partitionVals.add(_elem770);
+            _elem778 = iprot.readString();
+            struct.partitionVals.add(_elem778);
           }
         }
         struct.setPartitionValsIsSet(true);


[20/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)


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

Branch: refs/heads/master-txnstats
Commit: 1c9947f38ba44a3c37469490669b37dae2b19b4c
Parents: c8f4984
Author: sergey <se...@apache.org>
Authored: Fri Jul 13 18:53:01 2018 -0700
Committer: sergey <se...@apache.org>
Committed: Fri Jul 13 18:53:01 2018 -0700

----------------------------------------------------------------------
 .../listener/DummyRawStoreFailEvent.java        |    30 +-
 .../metastore/SynchronizedMetaStoreClient.java  |     4 +-
 .../java/org/apache/hadoop/hive/ql/Driver.java  |    20 +-
 .../org/apache/hadoop/hive/ql/QueryPlan.java    |    10 +
 .../org/apache/hadoop/hive/ql/exec/DDLTask.java |     9 +-
 .../ql/hooks/UpdateInputAccessTimeHook.java     |     6 +-
 .../hadoop/hive/ql/hooks/WriteEntity.java       |     9 +
 .../org/apache/hadoop/hive/ql/io/AcidUtils.java |    82 +-
 .../hadoop/hive/ql/lockmgr/DbTxnManager.java    |     9 +-
 .../hadoop/hive/ql/lockmgr/DummyTxnManager.java |     1 +
 .../hadoop/hive/ql/lockmgr/HiveTxnManager.java  |     1 +
 .../apache/hadoop/hive/ql/metadata/Hive.java    |   125 +-
 .../ql/metadata/SessionHiveMetaStoreClient.java |    27 +
 .../hive/ql/parse/BaseSemanticAnalyzer.java     |     4 +
 .../hive/ql/parse/DDLSemanticAnalyzer.java      |    77 +-
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java  |   133 +-
 .../load/message/RenamePartitionHandler.java    |     2 +-
 .../hive/ql/plan/AlterMaterializedViewDesc.java |    27 +-
 .../hive/ql/plan/AlterTableAlterPartDesc.java   |    30 +-
 .../hadoop/hive/ql/plan/AlterTableDesc.java     |    30 +-
 .../hive/ql/plan/ColumnStatsUpdateWork.java     |    22 +-
 .../hive/ql/plan/RenamePartitionDesc.java       |    35 +-
 .../hadoop/hive/ql/plan/TruncateTableDesc.java  |     9 +-
 .../hive/ql/stats/StatsUpdaterThread.java       |    90 +-
 .../hadoop/hive/ql/TestTxnConcatenate.java      |     4 +-
 .../apache/hadoop/hive/ql/TestTxnNoBuckets.java |    22 +-
 .../hadoop/hive/ql/TxnCommandsBaseForTests.java |     2 +-
 .../hadoop/hive/ql/metadata/TestHive.java       |     6 +-
 .../hive/ql/stats/TestStatsUpdaterThread.java   |   154 +-
 ql/src/test/queries/clientpositive/acid_stats.q |     3 +-
 .../test/queries/clientpositive/acid_stats3.q   |    56 +
 .../test/queries/clientpositive/acid_stats4.q   |    70 +
 .../results/clientpositive/acid_stats.q.out     |    23 +-
 .../results/clientpositive/acid_stats3.q.out    |   343 +
 .../results/clientpositive/acid_stats4.q.out    |   496 +
 .../clientpositive/acid_table_stats.q.out       |     4 +-
 ...wincompatible_vectorization_false_date.q.out |     8 -
 .../llap/dynpart_sort_optimization_acid.q.out   |     2 +-
 .../materialized_view_create_rewrite_3.q.out    |     4 +-
 .../materialized_view_create_rewrite_4.q.out    |    10 +-
 .../materialized_view_create_rewrite_5.q.out    |     8 +-
 ...ized_view_create_rewrite_rebuild_dummy.q.out |     4 +-
 ...alized_view_create_rewrite_time_window.q.out |     4 +-
 .../llap/results_cache_truncate.q.out           |   256 +-
 .../clientpositive/llap/sqlmerge_stats.q.out    |    63 +-
 .../hive/metastore/api/AbortTxnsRequest.java    |    32 +-
 .../api/AddCheckConstraintRequest.java          |    36 +-
 .../api/AddDefaultConstraintRequest.java        |    36 +-
 .../metastore/api/AddDynamicPartitions.java     |    32 +-
 .../metastore/api/AddForeignKeyRequest.java     |    36 +-
 .../api/AddNotNullConstraintRequest.java        |    36 +-
 .../metastore/api/AddPartitionsRequest.java     |    36 +-
 .../hive/metastore/api/AddPartitionsResult.java |    36 +-
 .../metastore/api/AddPrimaryKeyRequest.java     |    36 +-
 .../api/AddUniqueConstraintRequest.java         |    36 +-
 .../hadoop/hive/metastore/api/AggrStats.java    |    36 +-
 .../api/AllocateTableWriteIdsRequest.java       |    68 +-
 .../api/AllocateTableWriteIdsResponse.java      |    36 +-
 .../metastore/api/AlterPartitionsRequest.java   |   265 +-
 .../hive/metastore/api/AlterTableRequest.java   |  1129 +
 .../hive/metastore/api/AlterTableResponse.java  |   283 +
 .../metastore/api/CheckConstraintsResponse.java |    36 +-
 .../metastore/api/ClearFileMetadataRequest.java |    32 +-
 .../hive/metastore/api/ClientCapabilities.java  |    32 +-
 .../hive/metastore/api/ColumnStatistics.java    |   261 +-
 .../hive/metastore/api/CommitTxnRequest.java    |    36 +-
 .../hive/metastore/api/CompactionRequest.java   |    44 +-
 .../hive/metastore/api/CreationMetadata.java    |    32 +-
 .../hadoop/hive/metastore/api/Database.java     |    44 +-
 .../api/DefaultConstraintsResponse.java         |    36 +-
 .../metastore/api/DropPartitionsResult.java     |    36 +-
 .../hive/metastore/api/EnvironmentContext.java  |    44 +-
 .../metastore/api/FindSchemasByColsResp.java    |    36 +-
 .../hive/metastore/api/FireEventRequest.java    |    32 +-
 .../hive/metastore/api/ForeignKeysResponse.java |    36 +-
 .../hadoop/hive/metastore/api/Function.java     |    36 +-
 .../metastore/api/GetAllFunctionsResponse.java  |    36 +-
 .../hive/metastore/api/GetCatalogsResponse.java |    32 +-
 .../api/GetFileMetadataByExprRequest.java       |    32 +-
 .../api/GetFileMetadataByExprResult.java        |    48 +-
 .../metastore/api/GetFileMetadataRequest.java   |    32 +-
 .../metastore/api/GetFileMetadataResult.java    |    44 +-
 .../metastore/api/GetOpenTxnsInfoResponse.java  |    36 +-
 .../hive/metastore/api/GetOpenTxnsResponse.java |    32 +-
 .../api/GetPrincipalsInRoleResponse.java        |    36 +-
 .../api/GetRoleGrantsForPrincipalResponse.java  |    36 +-
 .../hive/metastore/api/GetTablesRequest.java    |    32 +-
 .../hive/metastore/api/GetTablesResult.java     |    36 +-
 .../metastore/api/GetValidWriteIdsRequest.java  |    32 +-
 .../metastore/api/GetValidWriteIdsResponse.java |    36 +-
 .../api/HeartbeatTxnRangeResponse.java          |    64 +-
 .../metastore/api/InsertEventRequestData.java   |    96 +-
 .../hadoop/hive/metastore/api/LockRequest.java  |    36 +-
 .../hive/metastore/api/Materialization.java     |    32 +-
 .../api/NotNullConstraintsResponse.java         |    36 +-
 .../api/NotificationEventResponse.java          |    36 +-
 .../hive/metastore/api/OpenTxnRequest.java      |    32 +-
 .../hive/metastore/api/OpenTxnsResponse.java    |    32 +-
 .../hadoop/hive/metastore/api/Partition.java    |    76 +-
 .../api/PartitionListComposingSpec.java         |    36 +-
 .../api/PartitionSpecWithSharedSD.java          |    36 +-
 .../metastore/api/PartitionValuesRequest.java   |    72 +-
 .../metastore/api/PartitionValuesResponse.java  |    36 +-
 .../hive/metastore/api/PartitionValuesRow.java  |    32 +-
 .../hive/metastore/api/PartitionWithoutSD.java  |    76 +-
 .../metastore/api/PartitionsByExprResult.java   |    36 +-
 .../metastore/api/PartitionsStatsRequest.java   |    64 +-
 .../metastore/api/PartitionsStatsResult.java    |    76 +-
 .../hive/metastore/api/PrimaryKeysResponse.java |    36 +-
 .../metastore/api/PutFileMetadataRequest.java   |    64 +-
 .../api/ReplTblWriteIdStateRequest.java         |    32 +-
 .../hive/metastore/api/RequestPartsSpec.java    |    68 +-
 .../hadoop/hive/metastore/api/Schema.java       |    80 +-
 .../hive/metastore/api/SchemaVersion.java       |    36 +-
 .../hadoop/hive/metastore/api/SerDeInfo.java    |    44 +-
 .../api/SetPartitionsStatsRequest.java          |    36 +-
 .../api/SetPartitionsStatsResponse.java         |   387 +
 .../hive/metastore/api/ShowCompactResponse.java |    36 +-
 .../hive/metastore/api/ShowLocksResponse.java   |    36 +-
 .../hadoop/hive/metastore/api/SkewedInfo.java   |   164 +-
 .../hive/metastore/api/StorageDescriptor.java   |   148 +-
 .../apache/hadoop/hive/metastore/api/Table.java |    80 +-
 .../hive/metastore/api/TableStatsRequest.java   |    32 +-
 .../hive/metastore/api/TableStatsResult.java    |    36 +-
 .../hive/metastore/api/TableValidWriteIds.java  |    32 +-
 .../hive/metastore/api/ThriftHiveMetastore.java | 26382 ++++++++++-------
 .../metastore/api/TruncateTableRequest.java     |   961 +
 .../metastore/api/TruncateTableResponse.java    |   283 +
 .../api/UniqueConstraintsResponse.java          |    36 +-
 .../hive/metastore/api/WMFullResourcePlan.java  |   144 +-
 .../api/WMGetAllResourcePlanResponse.java       |    36 +-
 .../WMGetTriggersForResourePlanResponse.java    |    36 +-
 .../api/WMValidateResourcePlanResponse.java     |    64 +-
 .../api/WriteNotificationLogRequest.java        |    32 +-
 .../gen-php/metastore/ThriftHiveMetastore.php   |  3335 ++-
 .../src/gen/thrift/gen-php/metastore/Types.php  |  2920 +-
 .../hive_metastore/ThriftHiveMetastore-remote   |    36 +-
 .../hive_metastore/ThriftHiveMetastore.py       |  3201 +-
 .../gen/thrift/gen-py/hive_metastore/ttypes.py  |  2004 +-
 .../gen/thrift/gen-rb/hive_metastore_types.rb   |   133 +-
 .../gen/thrift/gen-rb/thrift_hive_metastore.rb  |   309 +-
 .../hadoop/hive/common/StatsSetupConst.java     |     9 +-
 .../hadoop/hive/metastore/AlterHandler.java     |     7 +-
 .../hadoop/hive/metastore/HiveAlterHandler.java |   144 +-
 .../hadoop/hive/metastore/HiveMetaStore.java    |   492 +-
 .../hive/metastore/HiveMetaStoreClient.java     |    96 +-
 .../hadoop/hive/metastore/IMetaStoreClient.java |    18 +-
 .../hive/metastore/MetaStoreDirectSql.java      |    26 +-
 .../hadoop/hive/metastore/ObjectStore.java      |   281 +-
 .../apache/hadoop/hive/metastore/RawStore.java  |     5 +-
 .../hive/metastore/cache/CachedStore.java       |    10 +-
 .../src/main/thrift/hive_metastore.thrift       |    64 +-
 .../DummyRawStoreControlledCommit.java          |     8 +-
 .../DummyRawStoreForJdoConnection.java          |     6 +-
 .../HiveMetaStoreClientPreCatalog.java          |    30 +-
 .../hive/metastore/TestHiveAlterHandler.java    |     6 +-
 .../hive/metastore/TestHiveMetaStore.java       |    43 +-
 .../metastore/TestMetaStoreEventListener.java   |     1 +
 .../hadoop/hive/metastore/TestObjectStore.java  |     2 +-
 .../hadoop/hive/metastore/TestOldSchema.java    |     2 +-
 .../hive/metastore/cache/TestCachedStore.java   |    14 +-
 .../metastore/client/TestAlterPartitions.java   |    48 +-
 .../metastore/client/TestAppendPartitions.java  |     6 +
 .../TestTablesCreateDropAlterTruncate.java      |    31 +-
 164 files changed, 31123 insertions(+), 18165 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
----------------------------------------------------------------------
diff --git a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
index cd036e6..270aa6c 100644
--- a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
+++ b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
@@ -399,7 +399,11 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
                               List<List<String>> partValsList, List<Partition> newParts,
                               long writeId, long queryTxnId, String queryValidWriteIds)
       throws InvalidObjectException, MetaException {
-    objectStore.alterPartitions(catName, dbName, tblName, partValsList, newParts, writeId, queryTxnId, queryValidWriteIds);
+    if (shouldEventSucceed) {
+      objectStore.alterPartitions(catName, dbName, tblName, partValsList, newParts, writeId, queryTxnId, queryValidWriteIds);
+    } else {
+      throw new RuntimeException("Event failed.");
+    }
   }
 
   @Override
@@ -422,8 +426,10 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
 
   @Override
   public List<Partition> getPartitionsByNames(String catName, String dbName, String tblName,
-                                              List<String> partNames) throws MetaException, NoSuchObjectException {
-    return objectStore.getPartitionsByNames(catName, dbName, tblName, partNames);
+      List<String> partNames)
+          throws MetaException, NoSuchObjectException {
+    return objectStore.getPartitionsByNames(
+        catName, dbName, tblName, partNames);
   }
 
   @Override
@@ -730,18 +736,16 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
   }
 
   @Override
-  public boolean updateTableColumnStatistics(ColumnStatistics statsObj)
-      throws NoSuchObjectException, MetaException, InvalidObjectException,
-      InvalidInputException {
-    return objectStore.updateTableColumnStatistics(statsObj);
+  public boolean updateTableColumnStatistics(ColumnStatistics statsObj, long txnId, String validWriteIds, long writeId)
+      throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
+    return objectStore.updateTableColumnStatistics(statsObj, txnId, validWriteIds, writeId);
   }
 
   @Override
   public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj,
-                                                 List<String> partVals)
-      throws NoSuchObjectException, MetaException, InvalidObjectException,
-      InvalidInputException {
-    return objectStore.updatePartitionColumnStatistics(statsObj, partVals);
+      List<String> partVals, long txnId, String validWriteIds, long writeId)
+      throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
+    return objectStore.updatePartitionColumnStatistics(statsObj, partVals, txnId, validWriteIds, writeId);
   }
 
   @Override
@@ -1305,4 +1309,6 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
       String dbName, String tableName) throws MetaException,
       NoSuchObjectException {
     return null;
-  }}
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/metastore/SynchronizedMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/metastore/SynchronizedMetaStoreClient.java b/ql/src/java/org/apache/hadoop/hive/metastore/SynchronizedMetaStoreClient.java
index 2ba6d07..7eddc16 100644
--- a/ql/src/java/org/apache/hadoop/hive/metastore/SynchronizedMetaStoreClient.java
+++ b/ql/src/java/org/apache/hadoop/hive/metastore/SynchronizedMetaStoreClient.java
@@ -79,8 +79,8 @@ public final class SynchronizedMetaStoreClient {
   }
 
   public synchronized void alter_partition(String dbName, String tblName,
-      Partition newPart, EnvironmentContext environmentContext) throws TException {
-    client.alter_partition(dbName, tblName, newPart, environmentContext);
+      Partition newPart, EnvironmentContext environmentContext, long txnId, String writeIdList) throws TException {
+    client.alter_partition(dbName, tblName, newPart, environmentContext, txnId, writeIdList);
   }
 
   public synchronized LockResponse checkLock(long lockid) throws TException {

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
index 78922f1..342dffb 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
@@ -1423,13 +1423,14 @@ public class Driver implements IDriver {
 
   // Write the current set of valid write ids for the operated acid tables into the conf file so
   // that it can be read by the input format.
-  private void recordValidWriteIds(HiveTxnManager txnMgr) throws LockException {
+  private ValidTxnWriteIdList recordValidWriteIds(HiveTxnManager txnMgr) throws LockException {
     String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY);
     if ((txnString == null) || (txnString.isEmpty())) {
       throw new IllegalStateException("calling recordValidWritsIdss() without initializing ValidTxnList " +
               JavaUtils.txnIdToString(txnMgr.getCurrentTxnId()));
     }
     List<String> txnTables = getTransactionalTableList(plan);
+    LOG.error("TODO# txnTables " + txnTables);
     ValidTxnWriteIdList txnWriteIds = null;
     if (compactionWriteIds != null) {
       if (txnTables.size() != 1) {
@@ -1466,6 +1467,7 @@ public class Driver implements IDriver {
       }
     }
     LOG.debug("Encoding valid txn write ids info " + writeIdStr + " txnid:" + txnMgr.getCurrentTxnId());
+    return txnWriteIds;
   }
 
   // Make the list of transactional tables list which are getting read or written by current txn
@@ -1602,10 +1604,16 @@ public class Driver implements IDriver {
         }
       }
 
-      // Note: the sinks and DDL cannot coexist at this time; but if they could we would
-      //       need to make sure we don't get two write IDs for the same table.
+      if (plan.getAcidAnalyzeTable() != null) {
+        // Allocate write ID for the table being analyzed.
+        Table t = plan.getAcidAnalyzeTable().getTable();
+        queryTxnMgr.getTableWriteId(t.getDbName(), t.getTableName());
+      }
+
+
       DDLDescWithWriteId acidDdlDesc = plan.getAcidDdlDesc();
-      if (acidDdlDesc != null && acidDdlDesc.mayNeedWriteId()) {
+      boolean hasAcidDdl = acidDdlDesc != null && acidDdlDesc.mayNeedWriteId();
+      if (hasAcidDdl) {
         String fqTableName = acidDdlDesc.getFullTableName();
         long writeId = queryTxnMgr.getTableWriteId(
             Utilities.getDatabaseName(fqTableName), Utilities.getTableName(fqTableName));
@@ -1620,9 +1628,11 @@ public class Driver implements IDriver {
         throw new IllegalStateException("calling recordValidTxn() more than once in the same " +
             JavaUtils.txnIdToString(queryTxnMgr.getCurrentTxnId()));
       }
-      if (plan.hasAcidResourcesInQuery()) {
+
+      if (plan.hasAcidResourcesInQuery() || hasAcidDdl) {
         recordValidWriteIds(queryTxnMgr);
       }
+
     } catch (Exception e) {
       errorMessage = "FAILED: Error in acquiring locks: " + e.getMessage();
       SQLState = ErrorMsg.findSQLState(e.getMessage());

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java b/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
index 79e938a..f2201dd 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
@@ -35,6 +35,7 @@ import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.curator.shaded.com.google.common.collect.Lists;
 import org.apache.hadoop.hive.metastore.api.Schema;
 import org.apache.hadoop.hive.ql.exec.ConditionalTask;
 import org.apache.hadoop.hive.ql.exec.ExplainTask;
@@ -112,6 +113,7 @@ public class QueryPlan implements Serializable {
   private final HiveOperation operation;
   private final boolean acidResourcesInQuery;
   private final Set<FileSinkDesc> acidSinks; // Note: both full-ACID and insert-only sinks.
+  private final WriteEntity acidAnalyzeTable;
   private final DDLDesc.DDLDescWithWriteId acidDdlDesc;
   private Boolean autoCommitValue;
 
@@ -125,6 +127,7 @@ public class QueryPlan implements Serializable {
     this.acidResourcesInQuery = false;
     this.acidSinks = Collections.emptySet();
     this.acidDdlDesc = null;
+    this.acidAnalyzeTable = null;
   }
 
   public QueryPlan(String queryString, BaseSemanticAnalyzer sem, Long startTime, String queryId,
@@ -151,9 +154,11 @@ public class QueryPlan implements Serializable {
     this.operation = operation;
     this.autoCommitValue = sem.getAutoCommitValue();
     this.resultSchema = resultSchema;
+    // TODO: all this ACID stuff should be in some sub-object
     this.acidResourcesInQuery = sem.hasTransactionalInQuery();
     this.acidSinks = sem.getAcidFileSinks();
     this.acidDdlDesc = sem.getAcidDdlDesc();
+    this.acidAnalyzeTable = sem.getAcidAnalyzeTable();
   }
 
   /**
@@ -162,6 +167,11 @@ public class QueryPlan implements Serializable {
   public boolean hasAcidResourcesInQuery() {
     return acidResourcesInQuery;
   }
+
+  public WriteEntity getAcidAnalyzeTable() {
+    return acidAnalyzeTable;
+  }
+
   /**
    * @return Collection of FileSinkDesc representing writes to Acid resources
    */

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
index d912d4d..397cee2 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
@@ -3933,14 +3933,13 @@ public class DDLTask extends Task<DDLWork> implements Serializable {
         environmentContext = new EnvironmentContext();
       }
       environmentContext.putToProperties(HiveMetaHook.ALTER_TABLE_OPERATION_TYPE, alterTbl.getOp().name());
-      // Note: in the old default overloads that I've removed, "transactional" was true for tables,
-      //       but false for partitions. Seems to be ok here because we are not updating
-      //       partition-stats-related stuff from this call (alterTable).
       if (allPartitions == null) {
         db.alterTable(alterTbl.getOldName(), tbl, alterTbl.getIsCascade(), environmentContext, true);
       } else {
-        db.alterPartitions(
-            Warehouse.getQualifiedName(tbl.getTTable()), allPartitions, environmentContext, false);
+        // Note: this is necessary for UPDATE_STATISTICS command, that operates via ADDPROPS (why?).
+        //       For any other updates, we don't want to do txn check on partitions when altering table.
+        boolean isTxn = alterTbl.getPartSpec() != null && alterTbl.getOp() == AlterTableTypes.ADDPROPS;
+        db.alterPartitions(Warehouse.getQualifiedName(tbl.getTTable()), allPartitions, environmentContext, isTxn);
       }
       // Add constraints if necessary
       addConstraints(db, alterTbl);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/hooks/UpdateInputAccessTimeHook.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/UpdateInputAccessTimeHook.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/UpdateInputAccessTimeHook.java
index 4cf7c25..ea0b2c3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/UpdateInputAccessTimeHook.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/UpdateInputAccessTimeHook.java
@@ -63,7 +63,7 @@ public class UpdateInputAccessTimeHook {
           String tblName = re.getTable().getTableName();
           Table t = db.getTable(dbName, tblName);
           t.setLastAccessTime(lastAccessTime);
-          db.alterTable(dbName + "." + tblName, t, false, null, true);
+          db.alterTable(dbName + "." + tblName, t, false, null, false);
           break;
         }
         case PARTITION: {
@@ -73,9 +73,9 @@ public class UpdateInputAccessTimeHook {
           Table t = db.getTable(dbName, tblName);
           p = db.getPartition(t, p.getSpec(), false);
           p.setLastAccessTime(lastAccessTime);
-          db.alterPartition(dbName, tblName, p, null, true);
+          db.alterPartition(dbName, tblName, p, null, false);
           t.setLastAccessTime(lastAccessTime);
-          db.alterTable(dbName + "." + tblName, t, false, null, true);
+          db.alterTable(dbName + "." + tblName, t, false, null, false);
           break;
         }
         default:

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/hooks/WriteEntity.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/WriteEntity.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/WriteEntity.java
index f1cf113..3afa201 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/WriteEntity.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/WriteEntity.java
@@ -39,6 +39,7 @@ public class WriteEntity extends Entity implements Serializable {
 
   private boolean isTempURI = false;
   private transient boolean isDynamicPartitionWrite = false;
+  private transient boolean isTxnAnalyze = false;
 
   public static enum WriteType {
     DDL_EXCLUSIVE, // for use in DDL statements that require an exclusive lock,
@@ -223,6 +224,7 @@ public class WriteEntity extends Entity implements Serializable {
       case ADDPARTITION:
       case ADDSERDEPROPS:
       case ADDPROPS:
+      case UPDATESTATS:
         return WriteType.DDL_SHARED;
 
       case COMPACT:
@@ -242,4 +244,11 @@ public class WriteEntity extends Entity implements Serializable {
     return toString() + " Type=" + getTyp() + " WriteType=" + getWriteType() + " isDP=" + isDynamicPartitionWrite();
   }
 
+  public boolean isTxnAnalyze() {
+    return isTxnAnalyze;
+  }
+
+  public void setTxnAnalyze(boolean isTxnAnalyze) {
+    this.isTxnAnalyze = isTxnAnalyze;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/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 e54afc4..f356682 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
@@ -72,6 +72,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.VisibleForTesting;
+
 import java.nio.charset.Charset;
 
 /**
@@ -1648,7 +1649,7 @@ public class AcidUtils {
 
     @Override
     public String toString() {
-      return "[txnId=" + txnId + ", validWriteIdList=" + validWriteIdList + "]";
+      return "[txnId=" + txnId + ", validWriteIdList=" + validWriteIdList + ", writeId=" + writeId + "]";
     }
   }
 
@@ -1661,49 +1662,60 @@ public class AcidUtils {
 
   public static TableSnapshot getTableSnapshot(
       Configuration conf, Table tbl, boolean isStatsUpdater) throws LockException {
+    return getTableSnapshot(conf, tbl, tbl.getDbName(), tbl.getTableName(), isStatsUpdater);
+  }
+
+  public static TableSnapshot getTableSnapshot(Configuration conf,
+      Table tbl, String dbName, String tblName, boolean isStatsUpdater)
+      throws LockException, AssertionError {
     if (!isTransactionalTable(tbl)) {
       return null;
-    } else {
-      long txnId = -1;
-      long writeId = -1;
-      ValidWriteIdList validWriteIdList = null;
+    }
+    if (dbName == null) {
+      dbName = tbl.getDbName();
+    }
+    if (tblName == null) {
+      tblName = tbl.getTableName();
+    }
+    long txnId = -1;
+    long writeId = -1;
+    ValidWriteIdList validWriteIdList = null;
 
-      HiveTxnManager sessionTxnMgr = SessionState.get().getTxnMgr();
+    HiveTxnManager sessionTxnMgr = SessionState.get().getTxnMgr();
 
-      if (sessionTxnMgr != null) {
-        txnId = sessionTxnMgr.getCurrentTxnId();
-      }
-      String fullTableName = getFullTableName(tbl.getDbName(), tbl.getTableName());
-      if (txnId > 0 && isTransactionalTable(tbl)) {
-        validWriteIdList = getTableValidWriteIdList(conf, fullTableName);
-        if (isStatsUpdater) {
-          writeId = SessionState.get().getTxnMgr() != null ?
-                  SessionState.get().getTxnMgr().getAllocatedTableWriteId(
-                    tbl.getDbName(), tbl.getTableName()) : -1;
-          if (writeId < 1) {
-            // TODO: this is not ideal... stats updater that doesn't have write ID is currently
-            //       "create table"; writeId would be 0/-1 here. No need to call this w/true.
-            LOG.debug("Stats updater for {}.{} doesn't have a write ID",
-                tbl.getDbName(), tbl.getTableName());
-          }
+    if (sessionTxnMgr != null) {
+      txnId = sessionTxnMgr.getCurrentTxnId();
+    }
+    String fullTableName = getFullTableName(dbName, tblName);
+    if (txnId > 0) {
+      validWriteIdList = getTableValidWriteIdList(conf, fullTableName);
+      if (isStatsUpdater) {
+        writeId = SessionState.get().getTxnMgr() != null ?
+                SessionState.get().getTxnMgr().getAllocatedTableWriteId(
+                  dbName, tblName) : -1;
+        if (writeId < 1) {
+          // TODO: this is not ideal... stats updater that doesn't have write ID is currently
+          //       "create table"; writeId would be 0/-1 here. No need to call this w/true.
+          LOG.debug("Stats updater for {}.{} doesn't have a write ID ({})",
+              dbName, tblName, writeId);
         }
+      }
 
 
-        if (HiveConf.getBoolVar(conf, ConfVars.HIVE_IN_TEST)
-            && conf.get(ValidTxnList.VALID_TXNS_KEY) == null) {
-          return null;
-        }
-        if (validWriteIdList == null) {
-          validWriteIdList = getTableValidWriteIdListWithTxnList(
-              conf, tbl.getDbName(), tbl.getTableName());
-        }
-        if (validWriteIdList == null) {
-          throw new AssertionError("Cannot find valid write ID list for " + tbl.getTableName());
-        }
+      if (HiveConf.getBoolVar(conf, ConfVars.HIVE_IN_TEST)
+          && conf.get(ValidTxnList.VALID_TXNS_KEY) == null) {
+        return null;
+      }
+      if (validWriteIdList == null) {
+        validWriteIdList = getTableValidWriteIdListWithTxnList(
+            conf, dbName, tblName);
+      }
+      if (validWriteIdList == null) {
+        throw new AssertionError("Cannot find valid write ID list for " + tblName);
       }
-      return new TableSnapshot(txnId, writeId,
-          validWriteIdList != null ? validWriteIdList.toString() : null);
     }
+    return new TableSnapshot(txnId, writeId,
+        validWriteIdList != null ? validWriteIdList.toString() : null);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/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 a05ae0c..d3eefb9 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
@@ -19,10 +19,12 @@ package org.apache.hadoop.hive.ql.lockmgr;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.common.JavaUtils;
 import org.apache.hadoop.hive.common.ValidTxnList;
 import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
 import org.apache.hadoop.hive.metastore.LockComponentBuilder;
@@ -569,7 +571,12 @@ public final class DbTxnManager extends HiveTxnManagerImpl {
         break;
       case DDL_SHARED:
         compBuilder.setShared();
-        compBuilder.setOperationType(DataOperationType.NO_TXN);
+        if (!output.isTxnAnalyze()) {
+          // Analyze needs txn components to be present, otherwise an aborted analyze write ID
+          // might be rolled under the watermark by compactor while stats written by it are
+          // still present.
+          compBuilder.setOperationType(DataOperationType.NO_TXN);
+        }
         break;
 
       case UPDATE:

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java
index 03f2ff3..17a2d20 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DummyTxnManager.java
@@ -24,6 +24,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.hadoop.hive.common.ValidTxnList;
 import org.apache.hadoop.hive.common.ValidReadTxnList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.ql.Context;

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java
index 6a01abc..ba1f1ff 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.hive.ql.lockmgr;
 
 import org.apache.hadoop.hive.common.ValidTxnList;
 import org.apache.hadoop.hive.common.ValidTxnWriteIdList;
+import org.apache.hadoop.hive.common.ValidWriteIdList;
 import org.apache.hadoop.hive.metastore.api.CommitTxnRequest;
 import org.apache.hadoop.hive.metastore.api.LockResponse;
 import org.apache.hadoop.hive.metastore.api.TxnToWriteId;

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/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 07fe43f..7a1160d 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
@@ -113,6 +113,7 @@ import org.apache.hadoop.hive.ql.exec.FunctionUtils;
 import org.apache.hadoop.hive.ql.exec.SerializationUtilities;
 import org.apache.hadoop.hive.ql.exec.Utilities;
 import org.apache.hadoop.hive.ql.io.AcidUtils;
+import org.apache.hadoop.hive.ql.io.AcidUtils.TableSnapshot;
 import org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
 import org.apache.hadoop.hive.ql.lockmgr.LockException;
 import org.apache.hadoop.hive.ql.log.PerfLogger;
@@ -584,7 +585,7 @@ public class Hive {
 
   public void alterTable(Table newTbl, boolean cascade, EnvironmentContext environmentContext,
       boolean transactional) throws HiveException {
-    alterTable(newTbl.getDbName(),
+    alterTable(newTbl.getCatName(), newTbl.getDbName(),
         newTbl.getTableName(), newTbl, cascade, environmentContext, transactional);
   }
 
@@ -605,20 +606,23 @@ public class Hive {
                          boolean transactional)
       throws HiveException {
     String[] names = Utilities.getDbTableName(fullyQlfdTblName);
-    alterTable(names[0], names[1], newTbl, false, environmentContext, transactional);
+    alterTable(null, names[0], names[1], newTbl, false, environmentContext, transactional);
   }
 
   public void alterTable(String fullyQlfdTblName, Table newTbl, boolean cascade,
       EnvironmentContext environmentContext, boolean transactional)
       throws HiveException {
     String[] names = Utilities.getDbTableName(fullyQlfdTblName);
-    alterTable(names[0], names[1], newTbl, cascade, environmentContext, transactional);
+    alterTable(null, names[0], names[1], newTbl, cascade, environmentContext, transactional);
   }
 
-  public void alterTable(String dbName, String tblName, Table newTbl, boolean cascade,
+  public void alterTable(String catName, String dbName, String tblName, Table newTbl, boolean cascade,
       EnvironmentContext environmentContext, boolean transactional)
       throws HiveException {
 
+    if (catName == null) {
+      catName = getDefaultCatalog(conf);
+    }
     try {
       // Remove the DDL_TIME so it gets refreshed
       if (newTbl.getParameters() != null) {
@@ -633,12 +637,22 @@ public class Hive {
       }
 
       // Take a table snapshot and set it to newTbl.
+      AcidUtils.TableSnapshot tableSnapshot = null;
       if (transactional) {
-        setTableSnapshotForTransactionalTable(environmentContext, conf, newTbl, true);
+        // Make sure we pass in the names, so we can get the correct snapshot for rename table.
+        tableSnapshot = AcidUtils.getTableSnapshot(conf, newTbl, dbName, tblName, true);
+        if (tableSnapshot != null) {
+          newTbl.getTTable().setWriteId(tableSnapshot.getWriteId());
+        } else {
+          LOG.warn("Cannot get a table snapshot for " + tblName);
+        }
       }
 
-      getMSC().alter_table_with_environmentContext(
-          dbName, tblName, newTbl.getTTable(), environmentContext);
+      // Why is alter_partitions synchronized while this isn't?
+      getMSC().alter_table(
+          catName, dbName, tblName, newTbl.getTTable(), environmentContext,
+          tableSnapshot == null ? -1 : tableSnapshot.getTxnId(),
+          tableSnapshot == null ? null : tableSnapshot.getValidWriteIdList());
     } catch (MetaException e) {
       throw new HiveException("Unable to alter table. " + e.getMessage(), e);
     } catch (TException e) {
@@ -703,11 +717,19 @@ public class Hive {
       if (environmentContext == null) {
         environmentContext = new EnvironmentContext();
       }
+      AcidUtils.TableSnapshot tableSnapshot = null;
       if (transactional) {
-        setTableSnapshotForTransactionalPartition(environmentContext, conf, newPart, true);
+        tableSnapshot = AcidUtils.getTableSnapshot(conf, newPart.getTable(), true);
+        if (tableSnapshot != null) {
+          newPart.getTPartition().setWriteId(tableSnapshot.getWriteId());
+        } else {
+          LOG.warn("Cannot get a table snapshot for " + tblName);
+        }
       }
       getSynchronizedMSC().alter_partition(
-          dbName, tblName, newPart.getTPartition(), environmentContext);
+          dbName, tblName, newPart.getTPartition(), environmentContext,
+          tableSnapshot == null ? -1 : tableSnapshot.getTxnId(),
+          tableSnapshot == null ? null : tableSnapshot.getValidWriteIdList());
 
     } catch (MetaException e) {
       throw new HiveException("Unable to alter partition. " + e.getMessage(), e);
@@ -895,7 +917,11 @@ public class Hive {
         }
       }
       // Set table snapshot to api.Table to make it persistent.
-      setTableSnapshotForTransactionalTable(null, conf, tbl, true);
+      TableSnapshot tableSnapshot = AcidUtils.getTableSnapshot(conf, tbl, true);
+      if (tableSnapshot != null) {
+        tbl.getTTable().setWriteId(tableSnapshot.getWriteId());
+      }
+
       if (primaryKeys == null && foreignKeys == null
               && uniqueConstraints == null && notNullConstraints == null && defaultConstraints == null
           && checkConstraints == null) {
@@ -1028,10 +1054,20 @@ public class Hive {
   public void truncateTable(String dbDotTableName, Map<String, String> partSpec) throws HiveException {
     try {
       Table table = getTable(dbDotTableName, true);
+      // TODO: we should refactor code to make sure snapshot is always obtained in the same layer e.g. Hive.java
+      AcidUtils.TableSnapshot snapshot = null;
+      if (AcidUtils.isTransactionalTable(table)) {
+        snapshot = AcidUtils.getTableSnapshot(conf, table, true);
+      }
 
       List<String> partNames = ((null == partSpec)
-                       ? null : getPartitionNames(table.getDbName(), table.getTableName(), partSpec, (short) -1));
-      getMSC().truncateTable(table.getDbName(), table.getTableName(), partNames);
+        ? null : getPartitionNames(table.getDbName(), table.getTableName(), partSpec, (short) -1));
+      if (snapshot == null) {
+        getMSC().truncateTable(table.getDbName(), table.getTableName(), partNames);
+      } else {
+        getMSC().truncateTable(table.getDbName(), table.getTableName(), partNames,
+            snapshot.getTxnId(), snapshot.getValidWriteIdList(), snapshot.getWriteId());
+      }
     } catch (Exception e) {
       throw new HiveException(e);
     }
@@ -1683,7 +1719,7 @@ public class Hive {
    *          true if there is a following task which updates the stats, so, this method need not update.
    * @param writeId write ID allocated for the current load operation
    * @param stmtId statement ID of the current load statement
-   * @param isInsertOverwrite 
+   * @param isInsertOverwrite
    * @return Partition object being loaded with data
    */
   public Partition loadPartition(Path loadPath, Table tbl, Map<String, String> partSpec,
@@ -1736,7 +1772,7 @@ public class Hive {
       List<Path> newFiles = Collections.synchronizedList(new ArrayList<Path>());
 
       perfLogger.PerfLogBegin("MoveTask", PerfLogger.FILE_MOVES);
-      
+
       // If config is set, table is not temporary and partition being inserted exists, capture
       // the list of files added. For not yet existing partitions (insert overwrite to new partition
       // or dynamic partition inserts), the add partition event will capture the list of files added.
@@ -1799,8 +1835,11 @@ public class Hive {
       Partition newTPart = oldPart != null ? oldPart : new Partition(tbl, partSpec, newPartPath);
       alterPartitionSpecInMemory(tbl, partSpec, newTPart.getTPartition(), inheritTableSpecs, newPartPath.toString());
       validatePartition(newTPart);
-      EnvironmentContext ec = new EnvironmentContext();
-      setTableSnapshotForTransactionalPartition(ec, conf, newTPart, true);
+      AcidUtils.TableSnapshot tableSnapshot = null;
+      tableSnapshot = AcidUtils.getTableSnapshot(conf, newTPart.getTable(), true);
+      if (tableSnapshot != null) {
+        newTPart.getTPartition().setWriteId(tableSnapshot.getWriteId());
+      }
 
       // If config is set, table is not temporary and partition being inserted exists, capture
       // the list of files added. For not yet existing partitions (insert overwrite to new partition
@@ -1873,7 +1912,7 @@ public class Hive {
           //  insert into table T partition (ds) values ('Joe', 'today'); -- will fail with AlreadyExistsException
           // In that case, we want to retry with alterPartition.
           LOG.debug("Caught AlreadyExistsException, trying to alter partition instead");
-          setStatsPropAndAlterPartition(hasFollowingStatsTask, tbl, newTPart, ec);
+          setStatsPropAndAlterPartition(hasFollowingStatsTask, tbl, newTPart, tableSnapshot);
         } catch (Exception e) {
           try {
             final FileSystem newPathFileSystem = newPartPath.getFileSystem(this.getConf());
@@ -1892,7 +1931,7 @@ public class Hive {
           addWriteNotificationLog(tbl, partSpec, newFiles, writeId);
         }
       } else {
-        setStatsPropAndAlterPartition(hasFollowingStatsTask, tbl, newTPart, ec);
+        setStatsPropAndAlterPartition(hasFollowingStatsTask, tbl, newTPart, tableSnapshot);
       }
 
       perfLogger.PerfLogEnd("MoveTask", PerfLogger.LOAD_PARTITION);
@@ -1989,13 +2028,16 @@ public class Hive {
   }
 
   private void setStatsPropAndAlterPartition(boolean hasFollowingStatsTask, Table tbl,
-      Partition newTPart, EnvironmentContext ec) throws MetaException, TException {
+      Partition newTPart, TableSnapshot tableSnapshot) throws MetaException, TException {
+    EnvironmentContext ec = new EnvironmentContext();
     if (hasFollowingStatsTask) {
       ec.putToProperties(StatsSetupConst.DO_NOT_UPDATE_STATS, StatsSetupConst.TRUE);
     }
     LOG.debug("Altering existing partition " + newTPart.getSpec());
-    getSynchronizedMSC().alter_partition(tbl.getDbName(), tbl.getTableName(),
-      newTPart.getTPartition(), ec);
+    getSynchronizedMSC().alter_partition(
+        tbl.getDbName(), tbl.getTableName(), newTPart.getTPartition(), new EnvironmentContext(),
+        tableSnapshot == null ? -1 : tableSnapshot.getTxnId(),
+        tableSnapshot == null ? null : tableSnapshot.getValidWriteIdList());
   }
 
   /**
@@ -2516,7 +2558,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
           out.add(new Partition(tbl, outPart));
         }
         getMSC().alter_partitions(addPartitionDesc.getDbName(), addPartitionDesc.getTableName(),
-            partsToAlter, new EnvironmentContext());
+            partsToAlter, new EnvironmentContext(), -1, null, -1);
 
         for ( org.apache.hadoop.hive.metastore.api.Partition outPart :
         getMSC().getPartitionsByNames(addPartitionDesc.getDbName(), addPartitionDesc.getTableName(),part_names)){
@@ -5362,43 +5404,4 @@ private void constructOneLBLocationMap(FileStatus fSta,
       throw new HiveException(e);
     }
   }
-
-  private void setTableSnapshotForTransactionalTable(EnvironmentContext ec, HiveConf conf,
-      Table newTbl, boolean isStatsUpdater) throws LockException {
-
-    org.apache.hadoop.hive.metastore.api.Table newTTbl = newTbl.getTTable();
-    AcidUtils.TableSnapshot tableSnapshot =
-            AcidUtils.getTableSnapshot(conf, newTbl, isStatsUpdater);
-    if (tableSnapshot == null) return;
-    if (ec != null) { // Can be null for create table case; we don't need to verify txn stats.
-      ec.putToProperties(StatsSetupConst.TXN_ID, Long.toString(tableSnapshot.getTxnId()));
-      if (tableSnapshot.getValidWriteIdList() != null) {
-        ec.putToProperties(StatsSetupConst.VALID_WRITE_IDS, tableSnapshot.getValidWriteIdList());
-      } else {
-        LOG.warn("Table snapshot has null write IDs for " + newTbl);
-      }
-    }
-
-    if (isStatsUpdater) {
-      newTTbl.setWriteId(tableSnapshot.getWriteId());
-    }
-  }
-
-  private void setTableSnapshotForTransactionalPartition(EnvironmentContext ec, HiveConf conf,
-      Partition partition, boolean isStatsUpdater) throws LockException {
-    AcidUtils.TableSnapshot tableSnapshot =
-            AcidUtils.getTableSnapshot(conf, partition.getTable(), isStatsUpdater);
-    org.apache.hadoop.hive.metastore.api.Partition tpartition = partition.getTPartition();
-    if (tableSnapshot == null) return;
-    ec.putToProperties(StatsSetupConst.TXN_ID, Long.toString(tableSnapshot.getTxnId()));
-    if (tableSnapshot.getValidWriteIdList() != null) {
-      ec.putToProperties(StatsSetupConst.VALID_WRITE_IDS, tableSnapshot.getValidWriteIdList());
-    } else {
-      LOG.warn("Table snapshot has null write IDs for " + partition);
-    }
-
-    if (isStatsUpdater) {
-      tpartition.setWriteId(tableSnapshot.getWriteId());
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
index 5d382ae..f7c9009 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
@@ -158,6 +158,18 @@ public class SessionHiveMetaStoreClient extends HiveMetaStoreClient implements I
   }
 
   @Override
+  public void truncateTable(String dbName, String tableName,
+      List<String> partNames, long txnId, String validWriteIds, long writeId)
+      throws TException {
+    org.apache.hadoop.hive.metastore.api.Table table = getTempTable(dbName, tableName);
+    if (table != null) {
+      truncateTempTable(table);
+      return;
+    }
+    super.truncateTable(dbName, tableName, partNames, txnId, validWriteIds, writeId);
+  }
+
+  @Override
   public org.apache.hadoop.hive.metastore.api.Table getTable(String dbname, String name) throws MetaException,
   TException, NoSuchObjectException {
     // First check temp tables
@@ -348,6 +360,21 @@ public class SessionHiveMetaStoreClient extends HiveMetaStoreClient implements I
   }
 
   @Override
+  public void alter_table(String catName, String dbName, String tbl_name,
+      org.apache.hadoop.hive.metastore.api.Table new_tbl,
+      EnvironmentContext envContext, long txnId, String validWriteIds)
+      throws InvalidOperationException, MetaException, TException {
+    org.apache.hadoop.hive.metastore.api.Table old_tbl = getTempTable(dbName, tbl_name);
+    if (old_tbl != null) {
+      //actually temp table does not support partitions, cascade is not applicable here
+      alterTempTable(dbName, tbl_name, old_tbl, new_tbl, null);
+      return;
+    }
+    super.alter_table(catName, dbName, tbl_name, new_tbl, envContext, txnId,
+        validWriteIds);
+  }
+
+  @Override
   public void alter_table(String dbname, String tbl_name,
       org.apache.hadoop.hive.metastore.api.Table new_tbl) throws InvalidOperationException,
       MetaException, TException {

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
index be43686..40039ac 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java
@@ -2297,4 +2297,8 @@ public abstract class BaseSemanticAnalyzer {
   public DDLDescWithWriteId getAcidDdlDesc() {
     return null;
   }
+
+  public WriteEntity getAcidAnalyzeTable() {
+    return null;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
index b6825ae..04c0808 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
@@ -661,6 +661,11 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
         new ColumnStatsUpdateWork(partName, mapProp, tbl.getDbName(), tbl.getTableName(), colName, colType);
     ColumnStatsUpdateTask cStatsUpdateTask = (ColumnStatsUpdateTask) TaskFactory
         .get(columnStatsUpdateWork);
+    // TODO: doesn't look like this path is actually ever exercised. Maybe this needs to be removed.
+    addInputsOutputsAlterTable(tblName, partSpec, AlterTableTypes.UPDATESTATS);
+    if (AcidUtils.isTransactionalTable(tbl)) {
+      setAcidDdlDesc(columnStatsUpdateWork);
+    }
     rootTasks.add(cStatsUpdateTask);
   }
 
@@ -1479,11 +1484,8 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
     }
 
     TruncateTableDesc truncateTblDesc = new TruncateTableDesc(tableName, partSpec, null, table);
-    if(truncateTblDesc.mayNeedWriteId()) {
-      if(this.ddlDescWithWriteId != null) {
-        throw new IllegalStateException("ddlDescWithWriteId is already set: " + this.ddlDescWithWriteId);
-      }
-      this.ddlDescWithWriteId = truncateTblDesc;
+    if (truncateTblDesc.mayNeedWriteId()) {
+      setAcidDdlDesc(truncateTblDesc);
     }
 
     DDLWork ddlWork = new DDLWork(getInputs(), getOutputs(), truncateTblDesc);
@@ -1757,22 +1759,41 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
     alterTblDesc.setEnvironmentContext(environmentContext);
     alterTblDesc.setOldName(tableName);
 
-    boolean isPotentialMmSwitch = AcidUtils.isTablePropertyTransactional(mapProp)
+
+
+    boolean isToTxn = AcidUtils.isTablePropertyTransactional(mapProp)
         || mapProp.containsKey(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES);
-    addInputsOutputsAlterTable(tableName, partSpec, alterTblDesc, isPotentialMmSwitch);
+    addInputsOutputsAlterTable(tableName, partSpec, alterTblDesc, isToTxn);
+    // This special handling is because we cannot generate write ID for full ACID conversion,
+    // it will break the weird 10000001-write-ID logic that is currently in use. However, we do
+    // want to generate a write ID for prop changes for existing txn tables, or MM conversion.
+    boolean isAcidConversion = isToTxn && AcidUtils.isFullAcidTable(mapProp)
+        && !AcidUtils.isFullAcidTable(getTable(qualified, true));
 
     DDLWork ddlWork = new DDLWork(getInputs(), getOutputs(), alterTblDesc);
-    if (isPotentialMmSwitch) {
-      if(this.ddlDescWithWriteId != null) {
-        throw new IllegalStateException("ddlDescWithWriteId is already set: " + this.ddlDescWithWriteId);
-      }
-      this.ddlDescWithWriteId = alterTblDesc;
+    if (isToTxn) {
+      alterTblDesc.setIsFullAcidConversion(isAcidConversion);
+      setAcidDdlDesc(alterTblDesc);
       ddlWork.setNeedLock(true); // Hmm... why don't many other operations here need locks?
     }
+    if (changeStatsSucceeded) {
+      Table table = getTable(qualified, true);
+      if (AcidUtils.isTransactionalTable(table)) {
+        alterTblDesc.setIsExplicitStatsUpdate(true);
+        setAcidDdlDesc(alterTblDesc);
+      }
+    }
 
     rootTasks.add(TaskFactory.get(ddlWork));
   }
 
+  private void setAcidDdlDesc(DDLDescWithWriteId alterTblDesc) {
+    if(this.ddlDescWithWriteId != null) {
+      throw new IllegalStateException("ddlDescWithWriteId is already set: " + this.ddlDescWithWriteId);
+    }
+    this.ddlDescWithWriteId = alterTblDesc;
+  }
+
   @Override
   public DDLDescWithWriteId getAcidDdlDesc() {
     return ddlDescWithWriteId;
@@ -3148,6 +3169,10 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
     String targetName = getDotName(target);
 
     AlterTableDesc alterTblDesc = new AlterTableDesc(sourceName, targetName, expectView, null);
+    Table table = getTable(sourceName, true);
+    if (AcidUtils.isTransactionalTable(table)) {
+      setAcidDdlDesc(alterTblDesc);
+    }
     addInputsOutputsAlterTable(sourceName, null, alterTblDesc);
     rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
         alterTblDesc)));
@@ -3270,6 +3295,11 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
           primaryKeys, foreignKeys, uniqueConstraints, notNullConstraints, defaultConstraints, checkConstraints);
     }
     addInputsOutputsAlterTable(tblName, partSpec, alterTblDesc);
+    if (AcidUtils.isTransactionalTable(tab)) {
+      // Note: we might actually need it only when certain changes (e.g. name or type?) are made.
+      setAcidDdlDesc(alterTblDesc);
+    }
+
 
     rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
         alterTblDesc)));
@@ -3292,7 +3322,11 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
     partSpecs.add(oldPartSpec);
     partSpecs.add(newPartSpec);
     addTablePartsOutputs(tab, partSpecs, WriteEntity.WriteType.DDL_EXCLUSIVE);
-    RenamePartitionDesc renamePartitionDesc = new RenamePartitionDesc(tblName, oldPartSpec, newPartSpec, null);
+    RenamePartitionDesc renamePartitionDesc = new RenamePartitionDesc(
+        tblName, oldPartSpec, newPartSpec, null, tab);
+    if (AcidUtils.isTransactionalTable(tab)) {
+      setAcidDdlDesc(renamePartitionDesc);
+    }
     rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
         renamePartitionDesc)));
   }
@@ -3325,6 +3359,10 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
 
     AlterTableDesc alterTblDesc = new AlterTableDesc(tblName, partSpec, newCols,
         alterType, isCascade);
+    Table table = getTable(tblName, true);
+    if (AcidUtils.isTransactionalTable(table)) {
+      setAcidDdlDesc(alterTblDesc);
+    }
 
     addInputsOutputsAlterTable(tblName, partSpec, alterTblDesc);
     rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
@@ -3432,6 +3470,9 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
 
     AlterTableAlterPartDesc alterTblAlterPartDesc =
             new AlterTableAlterPartDesc(getDotName(qualified), newCol);
+    if (AcidUtils.isTransactionalTable(tab)) {
+      setAcidDdlDesc(alterTblAlterPartDesc);
+    }
 
     rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),
         alterTblAlterPartDesc)));
@@ -4336,7 +4377,7 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
     }
   }
 
-  private void analyzeAlterMaterializedViewRewrite(String mvName, ASTNode ast) throws SemanticException {
+  private void analyzeAlterMaterializedViewRewrite(String fqMvName, ASTNode ast) throws SemanticException {
     // Value for the flag
     boolean enableFlag;
     switch (ast.getChild(0).getType()) {
@@ -4352,11 +4393,11 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
 
     AlterMaterializedViewDesc alterMVDesc =
         new AlterMaterializedViewDesc(AlterMaterializedViewTypes.UPDATE_REWRITE_FLAG);
-    alterMVDesc.setMaterializedViewName(mvName);
+    alterMVDesc.setFqMaterializedViewName(fqMvName);
     alterMVDesc.setRewriteEnableFlag(enableFlag);
 
     // It can be fully qualified name or use default database
-    Table materializedViewTable = getTable(mvName, true);
+    Table materializedViewTable = getTable(fqMvName, true);
 
     // One last test: if we are enabling the rewrite, we need to check that query
     // only uses transactional (MM and ACID) tables
@@ -4370,6 +4411,10 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer {
       }
     }
 
+    if (AcidUtils.isTransactionalTable(materializedViewTable)) {
+      setAcidDdlDesc(alterMVDesc);
+    }
+
     inputs.add(new ReadEntity(materializedViewTable));
     outputs.add(new WriteEntity(materializedViewTable, WriteEntity.WriteType.DDL_EXCLUSIVE));
     rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(),

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 0ca9b58..91d0834 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -56,6 +56,7 @@ import org.antlr.runtime.tree.TreeWizard.ContextVisitor;
 import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.util.ImmutableBitSet;
 import org.apache.commons.lang.StringUtils;
+import org.apache.curator.shaded.com.google.common.collect.Lists;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
@@ -386,6 +387,8 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
 
   protected AnalyzeRewriteContext analyzeRewrite;
 
+  private WriteEntity acidAnalyzeTable;
+
   // A mapping from a tableName to a table object in metastore.
   Map<String, Table> tabNameToTabObject;
 
@@ -11212,64 +11215,76 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
     // if it is not analyze command and not column stats, then do not gatherstats
     if (!qbp.isAnalyzeCommand() && qbp.getAnalyzeRewrite() == null) {
       tsDesc.setGatherStats(false);
-    } else {
-      if (HiveConf.getVar(conf, HIVESTATSDBCLASS).equalsIgnoreCase(StatDB.fs.name())) {
-        String statsTmpLoc = ctx.getTempDirForInterimJobPath(tab.getPath()).toString();
-        LOG.debug("Set stats collection dir : " + statsTmpLoc);
-        tsDesc.setTmpStatsDir(statsTmpLoc);
-      }
-      tsDesc.setGatherStats(true);
-      tsDesc.setStatsReliable(conf.getBoolVar(HiveConf.ConfVars.HIVE_STATS_RELIABLE));
+      return;
+    }
 
-      // append additional virtual columns for storing statistics
-      Iterator<VirtualColumn> vcs = VirtualColumn.getStatsRegistry(conf).iterator();
-      List<VirtualColumn> vcList = new ArrayList<VirtualColumn>();
-      while (vcs.hasNext()) {
-        VirtualColumn vc = vcs.next();
-        rwsch.put(alias, vc.getName(), new ColumnInfo(vc.getName(),
-            vc.getTypeInfo(), alias, true, vc.getIsHidden()));
-        vcList.add(vc);
+    if (HiveConf.getVar(conf, HIVESTATSDBCLASS).equalsIgnoreCase(StatDB.fs.name())) {
+      String statsTmpLoc = ctx.getTempDirForInterimJobPath(tab.getPath()).toString();
+      LOG.debug("Set stats collection dir : " + statsTmpLoc);
+      tsDesc.setTmpStatsDir(statsTmpLoc);
+    }
+    tsDesc.setGatherStats(true);
+    tsDesc.setStatsReliable(conf.getBoolVar(HiveConf.ConfVars.HIVE_STATS_RELIABLE));
+
+    // append additional virtual columns for storing statistics
+    Iterator<VirtualColumn> vcs = VirtualColumn.getStatsRegistry(conf).iterator();
+    List<VirtualColumn> vcList = new ArrayList<VirtualColumn>();
+    while (vcs.hasNext()) {
+      VirtualColumn vc = vcs.next();
+      rwsch.put(alias, vc.getName(), new ColumnInfo(vc.getName(),
+          vc.getTypeInfo(), alias, true, vc.getIsHidden()));
+      vcList.add(vc);
+    }
+    tsDesc.addVirtualCols(vcList);
+
+    String tblName = tab.getTableName();
+    // Theoretically the key prefix could be any unique string shared
+    // between TableScanOperator (when publishing) and StatsTask (when aggregating).
+    // Here we use
+    // db_name.table_name + partitionSec
+    // as the prefix for easy of read during explain and debugging.
+    // Currently, partition spec can only be static partition.
+    String k = org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.encodeTableName(tblName) + Path.SEPARATOR;
+    tsDesc.setStatsAggPrefix(tab.getDbName()+"."+k);
+
+    // set up WriteEntity for replication and txn stats
+    WriteEntity we = new WriteEntity(tab, WriteEntity.WriteType.DDL_SHARED);
+    we.setTxnAnalyze(true);
+    outputs.add(we);
+    if (AcidUtils.isTransactionalTable(tab)) {
+      if (acidAnalyzeTable != null) {
+        throw new IllegalStateException("Multiple ACID tables in analyze: "
+            + we + ", " + acidAnalyzeTable);
+      }
+      acidAnalyzeTable = we;
+    }
+
+    // add WriteEntity for each matching partition
+    if (tab.isPartitioned()) {
+      List<String> cols = new ArrayList<String>();
+      if (qbp.getAnalyzeRewrite() != null) {
+        List<FieldSchema> partitionCols = tab.getPartCols();
+        for (FieldSchema fs : partitionCols) {
+          cols.add(fs.getName());
+        }
+        tsDesc.setPartColumns(cols);
+        return;
       }
-      tsDesc.addVirtualCols(vcList);
-
-      String tblName = tab.getTableName();
-      // Theoretically the key prefix could be any unique string shared
-      // between TableScanOperator (when publishing) and StatsTask (when aggregating).
-      // Here we use
-      // db_name.table_name + partitionSec
-      // as the prefix for easy of read during explain and debugging.
-      // Currently, partition spec can only be static partition.
-      String k = org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.encodeTableName(tblName) + Path.SEPARATOR;
-      tsDesc.setStatsAggPrefix(tab.getDbName()+"."+k);
-
-      // set up WriteEntity for replication
-      outputs.add(new WriteEntity(tab, WriteEntity.WriteType.DDL_SHARED));
-
-      // add WriteEntity for each matching partition
-      if (tab.isPartitioned()) {
-        List<String> cols = new ArrayList<String>();
-        if (qbp.getAnalyzeRewrite() != null) {
-          List<FieldSchema> partitionCols = tab.getPartCols();
-          for (FieldSchema fs : partitionCols) {
-            cols.add(fs.getName());
-          }
-          tsDesc.setPartColumns(cols);
-          return;
-        }
-        TableSpec tblSpec = qbp.getTableSpec(alias);
-        Map<String, String> partSpec = tblSpec.getPartSpec();
-        if (partSpec != null) {
-          cols.addAll(partSpec.keySet());
-          tsDesc.setPartColumns(cols);
-        } else {
-          throw new SemanticException(ErrorMsg.NEED_PARTITION_SPECIFICATION.getMsg());
-        }
-        List<Partition> partitions = qbp.getTableSpec().partitions;
-        if (partitions != null) {
-          for (Partition partn : partitions) {
-            // inputs.add(new ReadEntity(partn)); // is this needed at all?
-            outputs.add(new WriteEntity(partn, WriteEntity.WriteType.DDL_NO_LOCK));
-          }
+      TableSpec tblSpec = qbp.getTableSpec(alias);
+      Map<String, String> partSpec = tblSpec.getPartSpec();
+      if (partSpec != null) {
+        cols.addAll(partSpec.keySet());
+        tsDesc.setPartColumns(cols);
+      } else {
+        throw new SemanticException(ErrorMsg.NEED_PARTITION_SPECIFICATION.getMsg());
+      }
+      List<Partition> partitions = qbp.getTableSpec().partitions;
+      if (partitions != null) {
+        for (Partition partn : partitions) {
+          // inputs.add(new ReadEntity(partn)); // is this needed at all?
+          WriteEntity pwe = new WriteEntity(partn, WriteEntity.WriteType.DDL_NO_LOCK);
+          pwe.setTxnAnalyze(true);
+          outputs.add(pwe);
         }
       }
     }
@@ -12745,7 +12760,6 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
 
   @Override
   public void validate() throws SemanticException {
-    LOG.debug("validation start");
     boolean wasAcidChecked = false;
     // Validate inputs and outputs have right protectmode to execute the query
     for (ReadEntity readEntity : getInputs()) {
@@ -14954,4 +14968,9 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer {
       rewrittenQueryStr.append(")");
     }
   }
+
+  @Override
+  public WriteEntity getAcidAnalyzeTable() {
+    return acidAnalyzeTable;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/RenamePartitionHandler.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/RenamePartitionHandler.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/RenamePartitionHandler.java
index 43f2cbc..0035026 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/RenamePartitionHandler.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/RenamePartitionHandler.java
@@ -60,7 +60,7 @@ public class RenamePartitionHandler extends AbstractMessageHandler {
     }
 
     RenamePartitionDesc renamePtnDesc = new RenamePartitionDesc(
-            tableName, oldPartSpec, newPartSpec, context.eventOnlyReplicationSpec());
+            tableName, oldPartSpec, newPartSpec, context.eventOnlyReplicationSpec(), null);
     Task<DDLWork> renamePtnTask = TaskFactory.get(
         new DDLWork(readEntitySet, writeEntitySet, renamePtnDesc), context.hiveConf);
     context.log.debug("Added rename ptn task : {}:{}->{}",

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterMaterializedViewDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterMaterializedViewDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterMaterializedViewDesc.java
index 8493368..865d143 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterMaterializedViewDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterMaterializedViewDesc.java
@@ -20,15 +20,16 @@ package org.apache.hadoop.hive.ql.plan;
 
 import java.io.Serializable;
 
+import org.apache.hadoop.hive.ql.plan.DDLDesc.DDLDescWithWriteId;
 import org.apache.hadoop.hive.ql.plan.Explain.Level;
 
 /**
  * AlterMaterializedViewDesc.
  */
 @Explain(displayName = "Alter Materialized View", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED })
-public class AlterMaterializedViewDesc extends DDLDesc implements Serializable {
+public class AlterMaterializedViewDesc extends DDLDesc implements Serializable, DDLDescWithWriteId {
   private static final long serialVersionUID = 1L;
-  private String materializedViewName;
+  private String fqMaterializedViewName;
   private boolean rewriteEnable;
 
   /**
@@ -40,6 +41,7 @@ public class AlterMaterializedViewDesc extends DDLDesc implements Serializable {
   };
 
   AlterMaterializedViewTypes op;
+  private long writeId;
 
   public AlterMaterializedViewDesc() {
   }
@@ -53,15 +55,15 @@ public class AlterMaterializedViewDesc extends DDLDesc implements Serializable {
    */
   @Explain(displayName = "name", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED })
   public String getMaterializedViewName() {
-    return materializedViewName;
+    return fqMaterializedViewName;
   }
 
   /**
    * @param materializedViewName
    *          the materializedViewName to set
    */
-  public void setMaterializedViewName(String materializedViewName) {
-    this.materializedViewName = materializedViewName;
+  public void setFqMaterializedViewName(String materializedViewName) {
+    this.fqMaterializedViewName = materializedViewName;
   }
 
   /**
@@ -102,4 +104,19 @@ public class AlterMaterializedViewDesc extends DDLDesc implements Serializable {
     this.op = op;
   }
 
+  @Override
+  public void setWriteId(long writeId) {
+    this.writeId = writeId;
+  }
+
+  @Override
+  public String getFullTableName() {
+    return fqMaterializedViewName;
+  }
+
+  @Override
+  public boolean mayNeedWriteId() {
+    return true; // Verified when this is set as DDL Desc for ACID.
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableAlterPartDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableAlterPartDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableAlterPartDesc.java
index 54687e0..652c007 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableAlterPartDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableAlterPartDesc.java
@@ -20,30 +20,31 @@ package org.apache.hadoop.hive.ql.plan;
 
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 
-public class AlterTableAlterPartDesc extends DDLDesc {
-  private String tableName;
+public class AlterTableAlterPartDesc extends DDLDesc implements DDLDesc.DDLDescWithWriteId {
+  private String fqTableName;
   private FieldSchema partKeySpec;
+  private long writeId;
 
   public AlterTableAlterPartDesc() {
   }
 
   /**
-   * @param tableName
+   * @param fqTableName
    *          table containing the partition
    * @param partKeySpec
    */
-  public AlterTableAlterPartDesc(String tableName, FieldSchema partKeySpec) {
+  public AlterTableAlterPartDesc(String fqTableName, FieldSchema partKeySpec) {
     super();
-    this.tableName = tableName;
+    this.fqTableName = fqTableName;
     this.partKeySpec = partKeySpec;
   }
 
   public String getTableName() {
-    return tableName;
+    return fqTableName;
   }
 
   public void setTableName(String tableName) {
-    this.tableName = tableName;
+    this.fqTableName = tableName;
   }
 
   public FieldSchema getPartKeySpec() {
@@ -53,4 +54,19 @@ public class AlterTableAlterPartDesc extends DDLDesc {
   public void setPartKeySpec(FieldSchema partKeySpec) {
     this.partKeySpec = partKeySpec;
   }
+
+  @Override
+  public void setWriteId(long writeId) {
+    this.writeId = writeId;
+  }
+
+  @Override
+  public String getFullTableName() {
+    return fqTableName;
+  }
+
+  @Override
+  public boolean mayNeedWriteId() {
+    return true; // Checked before setting as the acid desc.
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java
index ec04a01..680e029 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java
@@ -66,14 +66,14 @@ public class AlterTableDesc extends DDLDesc implements Serializable, DDLDesc.DDL
     ALTERSKEWEDLOCATION("alter skew location"), ALTERBUCKETNUM("alter bucket number"),
     ALTERPARTITION("alter partition"), COMPACT("compact"),
     TRUNCATE("truncate"), MERGEFILES("merge files"), DROPCONSTRAINT("drop constraint"), ADDCONSTRAINT("add constraint"),
-    UPDATECOLUMNS("update columns"), OWNER("set owner");
+    UPDATECOLUMNS("update columns"), OWNER("set owner"), UPDATESTATS("update stats");
     ;
 
     private final String name;
     private AlterTableTypes(String name) { this.name = name; }
     public String getName() { return name; }
 
-    public static final List<AlterTableTypes> nonNativeTableAllowedTypes = 
+    public static final List<AlterTableTypes> nonNativeTableAllowedTypes =
         ImmutableList.of(ADDPROPS, DROPPROPS, ADDCOLS);
   }
 
@@ -139,6 +139,7 @@ public class AlterTableDesc extends DDLDesc implements Serializable, DDLDesc.DDL
   ReplicationSpec replicationSpec;
   private Long writeId = null;
   PrincipalDesc ownerPrincipal;
+  private boolean isExplicitStatsUpdate, isFullAcidConversion;
 
   public AlterTableDesc() {
   }
@@ -960,8 +961,21 @@ public class AlterTableDesc extends DDLDesc implements Serializable, DDLDesc.DDL
 
   @Override
   public boolean mayNeedWriteId() {
-    return getOp() == AlterTableDesc.AlterTableTypes.ADDPROPS
-        && AcidUtils.isToInsertOnlyTable(null, getProps());
+    switch (getOp()) {
+    case ADDPROPS: {
+      return isExplicitStatsUpdate || AcidUtils.isToInsertOnlyTable(null, getProps())
+          || (AcidUtils.isTransactionalTable(getProps()) && !isFullAcidConversion);
+    }
+    case DROPPROPS: return isExplicitStatsUpdate;
+    // The check for the following ones is performed before setting AlterTableDesc into the acid field.
+    // These need write ID and stuff because they invalidate column stats.
+    case RENAMECOLUMN: return true;
+    case RENAME: return true;
+    case REPLACECOLS: return true;
+    case ADDCOLS: return true;
+    // RENAMEPARTITION is handled in RenamePartitionDesc
+    default: return false;
+    }
   }
 
   public Long getWriteId() {
@@ -972,4 +986,12 @@ public class AlterTableDesc extends DDLDesc implements Serializable, DDLDesc.DDL
   public String toString() {
     return this.getClass().getSimpleName() + " for " + getFullTableName();
   }
+
+  public void setIsExplicitStatsUpdate(boolean b) {
+    this.isExplicitStatsUpdate = b;
+  }
+
+  public void setIsFullAcidConversion(boolean b) {
+    this.isFullAcidConversion = b;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsUpdateWork.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsUpdateWork.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsUpdateWork.java
index cbccd87..6de1a37 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsUpdateWork.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsUpdateWork.java
@@ -20,6 +20,8 @@ package org.apache.hadoop.hive.ql.plan;
 
 import java.io.Serializable;
 import java.util.Map;
+
+import org.apache.hadoop.hive.ql.plan.DDLDesc.DDLDescWithWriteId;
 import org.apache.hadoop.hive.ql.plan.Explain.Level;
 
 
@@ -32,7 +34,7 @@ import org.apache.hadoop.hive.ql.plan.Explain.Level;
  * ('maxColLen'='4444','avgColLen'='44.4');
  */
 @Explain(displayName = "Column Stats Update Work", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED })
-public class ColumnStatsUpdateWork implements Serializable {
+public class ColumnStatsUpdateWork implements Serializable, DDLDescWithWriteId {
   private static final long serialVersionUID = 1L;
   private final String partName;
   private final Map<String, String> mapProp;
@@ -40,12 +42,13 @@ public class ColumnStatsUpdateWork implements Serializable {
   private final String tableName;
   private final String colName;
   private final String colType;
+  private long writeId;
 
   public ColumnStatsUpdateWork(String partName,
       Map<String, String> mapProp,
       String dbName,
       String tableName,
-      String colName, 
+      String colName,
       String colType) {
     this.partName = partName;
     this.mapProp = mapProp;
@@ -83,4 +86,19 @@ public class ColumnStatsUpdateWork implements Serializable {
   public String getColType() {
     return colType;
   }
+
+  @Override
+  public void setWriteId(long writeId) {
+    this.writeId = writeId;
+  }
+
+  @Override
+  public String getFullTableName() {
+    return dbName + "." + tableName;
+  }
+
+  @Override
+  public boolean mayNeedWriteId() {
+    return true; // Checked at setup time; if this is called, the table is transactional.
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/plan/RenamePartitionDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/RenamePartitionDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/RenamePartitionDesc.java
index a13ac13..a4a31a5 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/RenamePartitionDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/RenamePartitionDesc.java
@@ -17,7 +17,9 @@
  */
 package org.apache.hadoop.hive.ql.plan;
 
+import org.apache.hadoop.hive.ql.metadata.Table;
 import org.apache.hadoop.hive.ql.parse.ReplicationSpec;
+import org.apache.hadoop.hive.ql.plan.DDLDesc.DDLDescWithWriteId;
 
 import java.io.Serializable;
 import java.util.LinkedHashMap;
@@ -26,7 +28,7 @@ import java.util.Map;
 /**
  * Contains the information needed to rename a partition.
  */
-public class RenamePartitionDesc extends DDLDesc implements Serializable {
+public class RenamePartitionDesc extends DDLDesc implements Serializable, DDLDescWithWriteId {
 
   private static final long serialVersionUID = 1L;
 
@@ -35,6 +37,8 @@ public class RenamePartitionDesc extends DDLDesc implements Serializable {
   private LinkedHashMap<String, String> oldPartSpec;
   private LinkedHashMap<String, String> newPartSpec;
   private ReplicationSpec replicationSpec;
+  private String fqTableName;
+  private long writeId;
 
   /**
    * For serialization only.
@@ -49,13 +53,15 @@ public class RenamePartitionDesc extends DDLDesc implements Serializable {
    *          old partition specification.
    * @param newPartSpec
    *          new partition specification.
+   * @param table
    */
-  public RenamePartitionDesc(String tableName,
-      Map<String, String> oldPartSpec, Map<String, String> newPartSpec, ReplicationSpec replicationSpec) {
+  public RenamePartitionDesc(String tableName, Map<String, String> oldPartSpec,
+      Map<String, String> newPartSpec, ReplicationSpec replicationSpec, Table table) {
     this.tableName = tableName;
     this.oldPartSpec = new LinkedHashMap<String,String>(oldPartSpec);
     this.newPartSpec = new LinkedHashMap<String,String>(newPartSpec);
     this.replicationSpec = replicationSpec;
+    this.fqTableName = table != null ? (table.getDbName() + "." + table.getTableName()) : tableName;
   }
 
   /**
@@ -66,14 +72,6 @@ public class RenamePartitionDesc extends DDLDesc implements Serializable {
   }
 
   /**
-   * @param tableName
-   *          the table we're going to add the partitions to.
-   */
-  public void setTableName(String tableName) {
-    this.tableName = tableName;
-  }
-
-  /**
    * @return location of partition in relation to table
    */
   public String getLocation() {
@@ -123,4 +121,19 @@ public class RenamePartitionDesc extends DDLDesc implements Serializable {
    * This can result in a "RENAME IF NEWER THAN" kind of semantic
    */
   public ReplicationSpec getReplicationSpec() { return this.replicationSpec; }
+
+  @Override
+  public void setWriteId(long writeId) {
+    this.writeId = writeId;
+  }
+
+  @Override
+  public String getFullTableName() {
+    return fqTableName;
+  }
+
+  @Override
+  public boolean mayNeedWriteId() {
+    return true; // The check is done when setting this as the ACID DDLDesc.
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/ql/src/java/org/apache/hadoop/hive/ql/plan/TruncateTableDesc.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/TruncateTableDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/TruncateTableDesc.java
index 8c3d852..9e83576 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/TruncateTableDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/TruncateTableDesc.java
@@ -27,6 +27,8 @@ import org.apache.hadoop.hive.ql.io.AcidUtils;
 import org.apache.hadoop.hive.ql.metadata.Table;
 import org.apache.hadoop.hive.ql.parse.ReplicationSpec;
 import org.apache.hadoop.hive.ql.plan.Explain.Level;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -34,6 +36,7 @@ import org.apache.hadoop.hive.ql.plan.Explain.Level;
  */
 @Explain(displayName = "Truncate Table or Partition", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED })
 public class TruncateTableDesc extends DDLDesc implements DDLDesc.DDLDescWithWriteId {
+  private final static Logger LOG = LoggerFactory.getLogger(TruncateTableDesc.class);
 
   private static final long serialVersionUID = 1L;
 
@@ -51,9 +54,11 @@ public class TruncateTableDesc extends DDLDesc implements DDLDesc.DDLDescWithWri
   public TruncateTableDesc() {
   }
 
+
   public TruncateTableDesc(String tableName, Map<String, String> partSpec, ReplicationSpec replicationSpec) {
     this(tableName, partSpec, replicationSpec, null);
   }
+
   public TruncateTableDesc(String tableName, Map<String, String> partSpec,
       ReplicationSpec replicationSpec, Table table) {
     this.tableName = tableName;
@@ -124,10 +129,13 @@ public class TruncateTableDesc extends DDLDesc implements DDLDesc.DDLDescWithWri
   public void setWriteId(long writeId) {
     this.writeId = writeId;
   }
+
   @Override
   public String getFullTableName() {
     return fullTableName;
   }
+
+
   @Override
   public boolean mayNeedWriteId() {
     return isTransactional;
@@ -137,5 +145,4 @@ public class TruncateTableDesc extends DDLDesc implements DDLDesc.DDLDescWithWri
   public String toString() {
     return this.getClass().getSimpleName() + " for " + getFullTableName();
   }
-
 }


[05/20] hive git commit: HIVE-19820 : add ACID stats support to background stats updater and fix bunch of edge cases found in SU tests (Sergey Shelukhin)

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb
index 86b469c..7573eeb 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb
@@ -603,6 +603,49 @@ class GrantRevokePrivilegeResponse
   ::Thrift::Struct.generate_accessors self
 end
 
+class TruncateTableRequest
+  include ::Thrift::Struct, ::Thrift::Struct_Union
+  DBNAME = 1
+  TABLENAME = 2
+  PARTNAMES = 3
+  TXNID = 4
+  WRITEID = 5
+  VALIDWRITEIDLIST = 6
+
+  FIELDS = {
+    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
+    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
+    PARTNAMES => {:type => ::Thrift::Types::LIST, :name => 'partNames', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
+    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId', :default => -1, :optional => true},
+    WRITEID => {:type => ::Thrift::Types::I64, :name => 'writeId', :default => -1, :optional => true},
+    VALIDWRITEIDLIST => {:type => ::Thrift::Types::STRING, :name => 'validWriteIdList', :optional => true}
+  }
+
+  def struct_fields; FIELDS; end
+
+  def validate
+    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
+  end
+
+  ::Thrift::Struct.generate_accessors self
+end
+
+class TruncateTableResponse
+  include ::Thrift::Struct, ::Thrift::Struct_Union
+
+  FIELDS = {
+
+  }
+
+  def struct_fields; FIELDS; end
+
+  def validate
+  end
+
+  ::Thrift::Struct.generate_accessors self
+end
+
 class Role
   include ::Thrift::Struct, ::Thrift::Struct_Union
   ROLENAME = 1
@@ -1559,15 +1602,11 @@ class ColumnStatistics
   include ::Thrift::Struct, ::Thrift::Struct_Union
   STATSDESC = 1
   STATSOBJ = 2
-  TXNID = 3
-  VALIDWRITEIDLIST = 4
-  ISSTATSCOMPLIANT = 5
+  ISSTATSCOMPLIANT = 3
 
   FIELDS = {
     STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ::ColumnStatisticsDesc},
     STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}},
-    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId', :default => -1, :optional => true},
-    VALIDWRITEIDLIST => {:type => ::Thrift::Types::STRING, :name => 'validWriteIdList', :optional => true},
     ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
   }
 
@@ -1628,6 +1667,23 @@ class SetPartitionsStatsRequest
   ::Thrift::Struct.generate_accessors self
 end
 
+class SetPartitionsStatsResponse
+  include ::Thrift::Struct, ::Thrift::Struct_Union
+  RESULT = 1
+
+  FIELDS = {
+    RESULT => {:type => ::Thrift::Types::BOOL, :name => 'result'}
+  }
+
+  def struct_fields; FIELDS; end
+
+  def validate
+    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field result is unset!') if @result.nil?
+  end
+
+  ::Thrift::Struct.generate_accessors self
+end
+
 class Schema
   include ::Thrift::Struct, ::Thrift::Struct_Union
   FIELDSCHEMAS = 1
@@ -5057,19 +5113,21 @@ end
 
 class AlterPartitionsRequest
   include ::Thrift::Struct, ::Thrift::Struct_Union
-  DBNAME = 1
-  TABLENAME = 2
-  PARTITIONS = 3
-  ENVIRONMENTCONTEXT = 4
-  TXNID = 5
-  WRITEID = 6
-  VALIDWRITEIDLIST = 7
+  CATNAME = 1
+  DBNAME = 2
+  TABLENAME = 3
+  PARTITIONS = 4
+  ENVIRONMENTCONTEXT = 5
+  TXNID = 6
+  WRITEID = 7
+  VALIDWRITEIDLIST = 8
 
   FIELDS = {
+    CATNAME => {:type => ::Thrift::Types::STRING, :name => 'catName', :optional => true},
     DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
     TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
     PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}},
-    ENVIRONMENTCONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environmentContext', :class => ::EnvironmentContext},
+    ENVIRONMENTCONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environmentContext', :class => ::EnvironmentContext, :optional => true},
     TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId', :default => -1, :optional => true},
     WRITEID => {:type => ::Thrift::Types::I64, :name => 'writeId', :default => -1, :optional => true},
     VALIDWRITEIDLIST => {:type => ::Thrift::Types::STRING, :name => 'validWriteIdList', :optional => true}
@@ -5081,7 +5139,6 @@ class AlterPartitionsRequest
     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 partitions is unset!') unless @partitions
-    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field environmentContext is unset!') unless @environmentContext
   end
 
   ::Thrift::Struct.generate_accessors self
@@ -5102,6 +5159,54 @@ class AlterPartitionsResponse
   ::Thrift::Struct.generate_accessors self
 end
 
+class AlterTableRequest
+  include ::Thrift::Struct, ::Thrift::Struct_Union
+  CATNAME = 1
+  DBNAME = 2
+  TABLENAME = 3
+  TABLE = 4
+  ENVIRONMENTCONTEXT = 5
+  TXNID = 6
+  WRITEID = 7
+  VALIDWRITEIDLIST = 8
+
+  FIELDS = {
+    CATNAME => {:type => ::Thrift::Types::STRING, :name => 'catName', :optional => true},
+    DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
+    TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
+    TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'table', :class => ::Table},
+    ENVIRONMENTCONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environmentContext', :class => ::EnvironmentContext, :optional => true},
+    TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId', :default => -1, :optional => true},
+    WRITEID => {:type => ::Thrift::Types::I64, :name => 'writeId', :default => -1, :optional => true},
+    VALIDWRITEIDLIST => {:type => ::Thrift::Types::STRING, :name => 'validWriteIdList', :optional => true}
+  }
+
+  def struct_fields; FIELDS; end
+
+  def validate
+    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 table is unset!') unless @table
+  end
+
+  ::Thrift::Struct.generate_accessors self
+end
+
+class AlterTableResponse
+  include ::Thrift::Struct, ::Thrift::Struct_Union
+
+  FIELDS = {
+
+  }
+
+  def struct_fields; FIELDS; end
+
+  def validate
+  end
+
+  ::Thrift::Struct.generate_accessors self
+end
+
 class MetaException < ::Thrift::Exception
   include ::Thrift::Struct, ::Thrift::Struct_Union
   def initialize(message=nil)

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
index fdcd3de..0a68424 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
@@ -579,6 +579,22 @@ module ThriftHiveMetastore
       return
     end
 
+    def truncate_table_req(req)
+      send_truncate_table_req(req)
+      return recv_truncate_table_req()
+    end
+
+    def send_truncate_table_req(req)
+      send_message('truncate_table_req', Truncate_table_req_args, :req => req)
+    end
+
+    def recv_truncate_table_req()
+      result = receive_message(Truncate_table_req_result)
+      return result.success unless result.success.nil?
+      raise result.o1 unless result.o1.nil?
+      raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'truncate_table_req failed: unknown result')
+    end
+
     def get_tables(db_name, pattern)
       send_get_tables(db_name, pattern)
       return recv_get_tables()
@@ -827,6 +843,23 @@ module ThriftHiveMetastore
       return
     end
 
+    def alter_table_req(req)
+      send_alter_table_req(req)
+      return recv_alter_table_req()
+    end
+
+    def send_alter_table_req(req)
+      send_message('alter_table_req', Alter_table_req_args, :req => req)
+    end
+
+    def recv_alter_table_req()
+      result = receive_message(Alter_table_req_result)
+      return result.success unless result.success.nil?
+      raise result.o1 unless result.o1.nil?
+      raise result.o2 unless result.o2.nil?
+      raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'alter_table_req failed: unknown result')
+    end
+
     def add_partition(new_part)
       send_add_partition(new_part)
       return recv_add_partition()
@@ -1432,21 +1465,21 @@ module ThriftHiveMetastore
       return
     end
 
-    def alter_partitions_with_environment_context_req(req)
-      send_alter_partitions_with_environment_context_req(req)
-      return recv_alter_partitions_with_environment_context_req()
+    def alter_partitions_req(req)
+      send_alter_partitions_req(req)
+      return recv_alter_partitions_req()
     end
 
-    def send_alter_partitions_with_environment_context_req(req)
-      send_message('alter_partitions_with_environment_context_req', Alter_partitions_with_environment_context_req_args, :req => req)
+    def send_alter_partitions_req(req)
+      send_message('alter_partitions_req', Alter_partitions_req_args, :req => req)
     end
 
-    def recv_alter_partitions_with_environment_context_req()
-      result = receive_message(Alter_partitions_with_environment_context_req_result)
+    def recv_alter_partitions_req()
+      result = receive_message(Alter_partitions_req_result)
       return result.success unless result.success.nil?
       raise result.o1 unless result.o1.nil?
       raise result.o2 unless result.o2.nil?
-      raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'alter_partitions_with_environment_context_req failed: unknown result')
+      raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'alter_partitions_req failed: unknown result')
     end
 
     def alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context)
@@ -1726,6 +1759,44 @@ module ThriftHiveMetastore
       raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_partition_column_statistics failed: unknown result')
     end
 
+    def update_table_column_statistics_req(req)
+      send_update_table_column_statistics_req(req)
+      return recv_update_table_column_statistics_req()
+    end
+
+    def send_update_table_column_statistics_req(req)
+      send_message('update_table_column_statistics_req', Update_table_column_statistics_req_args, :req => req)
+    end
+
+    def recv_update_table_column_statistics_req()
+      result = receive_message(Update_table_column_statistics_req_result)
+      return result.success unless result.success.nil?
+      raise result.o1 unless result.o1.nil?
+      raise result.o2 unless result.o2.nil?
+      raise result.o3 unless result.o3.nil?
+      raise result.o4 unless result.o4.nil?
+      raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_table_column_statistics_req failed: unknown result')
+    end
+
+    def update_partition_column_statistics_req(req)
+      send_update_partition_column_statistics_req(req)
+      return recv_update_partition_column_statistics_req()
+    end
+
+    def send_update_partition_column_statistics_req(req)
+      send_message('update_partition_column_statistics_req', Update_partition_column_statistics_req_args, :req => req)
+    end
+
+    def recv_update_partition_column_statistics_req()
+      result = receive_message(Update_partition_column_statistics_req_result)
+      return result.success unless result.success.nil?
+      raise result.o1 unless result.o1.nil?
+      raise result.o2 unless result.o2.nil?
+      raise result.o3 unless result.o3.nil?
+      raise result.o4 unless result.o4.nil?
+      raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_partition_column_statistics_req failed: unknown result')
+    end
+
     def get_table_column_statistics(db_name, tbl_name, col_name)
       send_get_table_column_statistics(db_name, tbl_name, col_name)
       return recv_get_table_column_statistics()
@@ -3953,6 +4024,17 @@ module ThriftHiveMetastore
       write_result(result, oprot, 'truncate_table', seqid)
     end
 
+    def process_truncate_table_req(seqid, iprot, oprot)
+      args = read_args(iprot, Truncate_table_req_args)
+      result = Truncate_table_req_result.new()
+      begin
+        result.success = @handler.truncate_table_req(args.req)
+      rescue ::MetaException => o1
+        result.o1 = o1
+      end
+      write_result(result, oprot, 'truncate_table_req', seqid)
+    end
+
     def process_get_tables(seqid, iprot, oprot)
       args = read_args(iprot, Get_tables_args)
       result = Get_tables_result.new()
@@ -4140,6 +4222,19 @@ module ThriftHiveMetastore
       write_result(result, oprot, 'alter_table_with_cascade', seqid)
     end
 
+    def process_alter_table_req(seqid, iprot, oprot)
+      args = read_args(iprot, Alter_table_req_args)
+      result = Alter_table_req_result.new()
+      begin
+        result.success = @handler.alter_table_req(args.req)
+      rescue ::InvalidOperationException => o1
+        result.o1 = o1
+      rescue ::MetaException => o2
+        result.o2 = o2
+      end
+      write_result(result, oprot, 'alter_table_req', seqid)
+    end
+
     def process_add_partition(seqid, iprot, oprot)
       args = read_args(iprot, Add_partition_args)
       result = Add_partition_result.new()
@@ -4621,17 +4716,17 @@ module ThriftHiveMetastore
       write_result(result, oprot, 'alter_partitions_with_environment_context', seqid)
     end
 
-    def process_alter_partitions_with_environment_context_req(seqid, iprot, oprot)
-      args = read_args(iprot, Alter_partitions_with_environment_context_req_args)
-      result = Alter_partitions_with_environment_context_req_result.new()
+    def process_alter_partitions_req(seqid, iprot, oprot)
+      args = read_args(iprot, Alter_partitions_req_args)
+      result = Alter_partitions_req_result.new()
       begin
-        result.success = @handler.alter_partitions_with_environment_context_req(args.req)
+        result.success = @handler.alter_partitions_req(args.req)
       rescue ::InvalidOperationException => o1
         result.o1 = o1
       rescue ::MetaException => o2
         result.o2 = o2
       end
-      write_result(result, oprot, 'alter_partitions_with_environment_context_req', seqid)
+      write_result(result, oprot, 'alter_partitions_req', seqid)
     end
 
     def process_alter_partition_with_environment_context(seqid, iprot, oprot)
@@ -4858,6 +4953,40 @@ module ThriftHiveMetastore
       write_result(result, oprot, 'update_partition_column_statistics', seqid)
     end
 
+    def process_update_table_column_statistics_req(seqid, iprot, oprot)
+      args = read_args(iprot, Update_table_column_statistics_req_args)
+      result = Update_table_column_statistics_req_result.new()
+      begin
+        result.success = @handler.update_table_column_statistics_req(args.req)
+      rescue ::NoSuchObjectException => o1
+        result.o1 = o1
+      rescue ::InvalidObjectException => o2
+        result.o2 = o2
+      rescue ::MetaException => o3
+        result.o3 = o3
+      rescue ::InvalidInputException => o4
+        result.o4 = o4
+      end
+      write_result(result, oprot, 'update_table_column_statistics_req', seqid)
+    end
+
+    def process_update_partition_column_statistics_req(seqid, iprot, oprot)
+      args = read_args(iprot, Update_partition_column_statistics_req_args)
+      result = Update_partition_column_statistics_req_result.new()
+      begin
+        result.success = @handler.update_partition_column_statistics_req(args.req)
+      rescue ::NoSuchObjectException => o1
+        result.o1 = o1
+      rescue ::InvalidObjectException => o2
+        result.o2 = o2
+      rescue ::MetaException => o3
+        result.o3 = o3
+      rescue ::InvalidInputException => o4
+        result.o4 = o4
+      end
+      write_result(result, oprot, 'update_partition_column_statistics_req', seqid)
+    end
+
     def process_get_table_column_statistics(seqid, iprot, oprot)
       args = read_args(iprot, Get_table_column_statistics_args)
       result = Get_table_column_statistics_result.new()
@@ -7356,6 +7485,40 @@ module ThriftHiveMetastore
     ::Thrift::Struct.generate_accessors self
   end
 
+  class Truncate_table_req_args
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    REQ = 1
+
+    FIELDS = {
+      REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::TruncateTableRequest}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
+  class Truncate_table_req_result
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    SUCCESS = 0
+    O1 = 1
+
+    FIELDS = {
+      SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::TruncateTableResponse},
+      O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::MetaException}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
   class Get_tables_args
     include ::Thrift::Struct, ::Thrift::Struct_Union
     DB_NAME = 1
@@ -7924,6 +8087,42 @@ module ThriftHiveMetastore
     ::Thrift::Struct.generate_accessors self
   end
 
+  class Alter_table_req_args
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    REQ = 1
+
+    FIELDS = {
+      REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::AlterTableRequest}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
+  class Alter_table_req_result
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    SUCCESS = 0
+    O1 = 1
+    O2 = 2
+
+    FIELDS = {
+      SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::AlterTableResponse},
+      O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException},
+      O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
   class Add_partition_args
     include ::Thrift::Struct, ::Thrift::Struct_Union
     NEW_PART = 1
@@ -9362,7 +9561,7 @@ module ThriftHiveMetastore
     ::Thrift::Struct.generate_accessors self
   end
 
-  class Alter_partitions_with_environment_context_req_args
+  class Alter_partitions_req_args
     include ::Thrift::Struct, ::Thrift::Struct_Union
     REQ = 1
 
@@ -9378,7 +9577,7 @@ module ThriftHiveMetastore
     ::Thrift::Struct.generate_accessors self
   end
 
-  class Alter_partitions_with_environment_context_req_result
+  class Alter_partitions_req_result
     include ::Thrift::Struct, ::Thrift::Struct_Union
     SUCCESS = 0
     O1 = 1
@@ -10018,6 +10217,86 @@ module ThriftHiveMetastore
     ::Thrift::Struct.generate_accessors self
   end
 
+  class Update_table_column_statistics_req_args
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    REQ = 1
+
+    FIELDS = {
+      REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::SetPartitionsStatsRequest}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
+  class Update_table_column_statistics_req_result
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    SUCCESS = 0
+    O1 = 1
+    O2 = 2
+    O3 = 3
+    O4 = 4
+
+    FIELDS = {
+      SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::SetPartitionsStatsResponse},
+      O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException},
+      O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException},
+      O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException},
+      O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
+  class Update_partition_column_statistics_req_args
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    REQ = 1
+
+    FIELDS = {
+      REQ => {:type => ::Thrift::Types::STRUCT, :name => 'req', :class => ::SetPartitionsStatsRequest}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
+  class Update_partition_column_statistics_req_result
+    include ::Thrift::Struct, ::Thrift::Struct_Union
+    SUCCESS = 0
+    O1 = 1
+    O2 = 2
+    O3 = 3
+    O4 = 4
+
+    FIELDS = {
+      SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::SetPartitionsStatsResponse},
+      O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::NoSuchObjectException},
+      O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::InvalidObjectException},
+      O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => ::MetaException},
+      O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => ::InvalidInputException}
+    }
+
+    def struct_fields; FIELDS; end
+
+    def validate
+    end
+
+    ::Thrift::Struct.generate_accessors self
+  end
+
   class Get_table_column_statistics_args
     include ::Thrift::Struct, ::Thrift::Struct_Union
     DB_NAME = 1

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java
index af9b0b1..35be3c4 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java
@@ -157,10 +157,6 @@ public class StatsSetupConst {
 
   public static final String CASCADE = "CASCADE";
 
-  // TODO: when alter calls are switched to req/resp models, replace these and the above with fields.
-  public static final String TXN_ID = "WRITER_TXN_ID";
-  public static final String VALID_WRITE_IDS = "WRITER_WRITE_ID";
-
   public static final String TRUE = "true";
 
   public static final String FALSE = "false";
@@ -275,10 +271,11 @@ public class StatsSetupConst {
     if (params == null) {
       return false;
     }
+    // TODO: should this also check that the basic flag is valid?
     ColumnStatsAccurate stats = parseStatsAcc(params.get(COLUMN_STATS_ACCURATE));
     return stats.columnStats.containsKey(colName);
   }
-  
+
   public static void clearColumnStatsState(Map<String, String> params) {
     if (params == null) {
       return;
@@ -321,7 +318,7 @@ public class StatsSetupConst {
       setColumnStatsState(params, cols);
     }
   }
-  
+
   private static ColumnStatsAccurate parseStatsAcc(String statsAcc) {
     if (statsAcc == null) {
       return new ColumnStatsAccurate();

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/AlterHandler.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/AlterHandler.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/AlterHandler.java
index e7cf07f..f3dc264 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/AlterHandler.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/AlterHandler.java
@@ -61,7 +61,7 @@ public interface AlterHandler extends Configurable {
   default void alterTable(RawStore msdb, Warehouse wh, String catName, String dbname,
     String name, Table newTable, EnvironmentContext envContext)
       throws InvalidOperationException, MetaException {
-    alterTable(msdb, wh, catName, dbname, name, newTable, envContext, null);
+    alterTable(msdb, wh, catName, dbname, name, newTable, envContext, null, -1, null);
   }
 
   /**
@@ -88,7 +88,8 @@ public interface AlterHandler extends Configurable {
    */
   void alterTable(RawStore msdb, Warehouse wh, String catName, String dbname,
       String name, Table newTable, EnvironmentContext envContext,
-      IHMSHandler handler) throws InvalidOperationException, MetaException;
+      IHMSHandler handler, long txnId, String writeIdList)
+          throws InvalidOperationException, MetaException;
 
   /**
    * @deprecated As of release 2.2.0.  Replaced by {@link #alterPartition(RawStore, Warehouse, String,
@@ -145,7 +146,7 @@ public interface AlterHandler extends Configurable {
   Partition alterPartition(final RawStore msdb, Warehouse wh, final String catName,
                            final String dbname, final String name, final List<String> part_vals,
                            final Partition new_part, EnvironmentContext environmentContext,
-                           IHMSHandler handler)
+                           IHMSHandler handler, long txnId, String validWriteIds)
       throws InvalidOperationException, InvalidObjectException, AlreadyExistsException, MetaException;
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
index 8b2a6ba..e8226f8 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
@@ -90,7 +90,8 @@ public class HiveAlterHandler implements AlterHandler {
   @Override
   public void alterTable(RawStore msdb, Warehouse wh, String catName, String dbname,
       String name, Table newt, EnvironmentContext environmentContext,
-      IHMSHandler handler) throws InvalidOperationException, MetaException {
+      IHMSHandler handler, long txnId, String writeIdList)
+          throws InvalidOperationException, MetaException {
     catName = normalizeIdentifier(catName);
     name = name.toLowerCase();
     dbname = dbname.toLowerCase();
@@ -296,7 +297,7 @@ public class HiveAlterHandler implements AlterHandler {
                 partValues.add(part.getValues());
               }
               msdb.alterPartitions(catName, newDbName, newTblName, partValues,
-                  partBatch, -1, -1, null);
+                  partBatch, newt.getWriteId(), txnId, writeIdList);
             }
           }
 
@@ -304,14 +305,15 @@ public class HiveAlterHandler implements AlterHandler {
             ColumnStatistics newPartColStats = partColStats.getValue();
             newPartColStats.getStatsDesc().setDbName(newDbName);
             newPartColStats.getStatsDesc().setTableName(newTblName);
-            msdb.updatePartitionColumnStatistics(newPartColStats, partColStats.getKey().getValues());
+            msdb.updatePartitionColumnStatistics(newPartColStats, partColStats.getKey().getValues(),
+                txnId, writeIdList, newt.getWriteId());
           }
         } else {
-          alterTableUpdateTableColumnStats(msdb, oldt, newt, environmentContext);
+          alterTableUpdateTableColumnStats(
+              msdb, oldt, newt, environmentContext, txnId, writeIdList);
         }
       } else {
         // operations other than table rename
-
         if (MetaStoreUtils.requireCalStats(null, null, newt, environmentContext) &&
             !isPartitionedTable) {
           Database db = msdb.getDatabase(catName, newDbName);
@@ -330,23 +332,26 @@ public class HiveAlterHandler implements AlterHandler {
               ColumnStatistics colStats = updateOrGetPartitionColumnStats(msdb, catName, dbname, name,
                   part.getValues(), oldCols, oldt, part, null);
               assert(colStats == null);
-              // Note: we don't do txn stats validation here; this can only delete stats?
               if (cascade) {
-                msdb.alterPartition(catName, dbname, name, part.getValues(), part, -1, null);
+                msdb.alterPartition(
+                    catName, dbname, name, part.getValues(), part, txnId, writeIdList);
               } else {
                 // update changed properties (stats)
                 oldPart.setParameters(part.getParameters());
-                msdb.alterPartition(catName, dbname, name, part.getValues(), oldPart, -1, null);
+                msdb.alterPartition(
+                    catName, dbname, name, part.getValues(), oldPart, txnId, writeIdList);
               }
             }
             // Don't validate table-level stats for a partitoned table.
             msdb.alterTable(catName, dbname, name, newt, -1, null);
           } else {
             LOG.warn("Alter table not cascaded to partitions.");
-            alterTableUpdateTableColumnStats(msdb, oldt, newt, environmentContext);
+            alterTableUpdateTableColumnStats(
+                msdb, oldt, newt, environmentContext, txnId, writeIdList);
           }
         } else {
-          alterTableUpdateTableColumnStats(msdb, oldt, newt, environmentContext);
+          alterTableUpdateTableColumnStats(
+              msdb, oldt, newt, environmentContext, txnId, writeIdList);
         }
       }
 
@@ -426,14 +431,13 @@ public class HiveAlterHandler implements AlterHandler {
     EnvironmentContext environmentContext)
       throws InvalidOperationException, InvalidObjectException, AlreadyExistsException, MetaException {
     return alterPartition(msdb, wh, DEFAULT_CATALOG_NAME, dbname, name, part_vals, new_part,
-        environmentContext, null);
+        environmentContext, null, -1, null);
   }
 
   @Override
-  public Partition alterPartition(final RawStore msdb, Warehouse wh, final String catName,
-                                  final String dbname, final String name,
-                                  final List<String> part_vals, final Partition new_part,
-                                  EnvironmentContext environmentContext, IHMSHandler handler)
+  public Partition alterPartition(RawStore msdb, Warehouse wh, String catName, String dbname,
+      String name, List<String> part_vals, final Partition new_part,
+      EnvironmentContext environmentContext, IHMSHandler handler, long txnId, String validWriteIds)
       throws InvalidOperationException, InvalidObjectException, AlreadyExistsException, MetaException {
     boolean success = false;
     Partition oldPart;
@@ -449,13 +453,6 @@ public class HiveAlterHandler implements AlterHandler {
       new_part.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(System
           .currentTimeMillis() / 1000));
     }
-    long txnId = -1;
-    String validWriteIds = null;
-    if (environmentContext != null && environmentContext.isSetProperties()
-        && environmentContext.getProperties().containsKey(StatsSetupConst.VALID_WRITE_IDS)) {
-      txnId = Long.parseLong(environmentContext.getProperties().get(StatsSetupConst.TXN_ID));
-      validWriteIds = environmentContext.getProperties().get(StatsSetupConst.VALID_WRITE_IDS);
-    }
 
     //alter partition
     if (part_vals == null || part_vals.size() == 0) {
@@ -623,7 +620,10 @@ public class HiveAlterHandler implements AlterHandler {
       if (cs != null) {
         cs.getStatsDesc().setPartName(newPartName);
         try {
-          msdb.updatePartitionColumnStatistics(cs, new_part.getValues());
+          // Verifying ACID state again is not strictly needed here (alterPartition above does it),
+          // but we are going to use the uniform approach for simplicity.
+          msdb.updatePartitionColumnStatistics(cs, new_part.getValues(),
+              txnId, validWriteIds, new_part.getWriteId());
         } catch (InvalidInputException iie) {
           throw new InvalidOperationException("Unable to update partition stats in table rename." + iie);
         } catch (NoSuchObjectException nsoe) {
@@ -796,7 +796,7 @@ public class HiveAlterHandler implements AlterHandler {
 
   @VisibleForTesting
   void alterTableUpdateTableColumnStats(RawStore msdb, Table oldTable, Table newTable,
-      EnvironmentContext ec)
+      EnvironmentContext ec, long txnId, String validWriteIds)
       throws MetaException, InvalidObjectException {
     String catName = normalizeIdentifier(oldTable.isSetCatName() ? oldTable.getCatName() :
         getDefaultCatalog(conf));
@@ -804,77 +804,65 @@ public class HiveAlterHandler implements AlterHandler {
     String tableName = normalizeIdentifier(oldTable.getTableName());
     String newDbName = newTable.getDbName().toLowerCase();
     String newTableName = normalizeIdentifier(newTable.getTableName());
-    long txnId = -1;
-    String validWriteIds = null;
-    if (ec != null && ec.isSetProperties() && ec.getProperties().containsKey(
-        StatsSetupConst.VALID_WRITE_IDS)) {
-      txnId = Long.parseLong(ec.getProperties().get(StatsSetupConst.TXN_ID));
-      validWriteIds = ec.getProperties().get(StatsSetupConst.VALID_WRITE_IDS);
-    }
 
     try {
       List<FieldSchema> oldCols = oldTable.getSd().getCols();
       List<FieldSchema> newCols = newTable.getSd().getCols();
       List<ColumnStatisticsObj> newStatsObjs = new ArrayList<>();
       ColumnStatistics colStats = null;
-      boolean updateColumnStats = true;
-
-      // Nothing to update if everything is the same
-        if (newDbName.equals(dbName) &&
-            newTableName.equals(tableName) &&
-            MetaStoreUtils.columnsIncludedByNameType(oldCols, newCols)) {
-          updateColumnStats = false;
+      boolean updateColumnStats = !newDbName.equals(dbName) || !newTableName.equals(tableName)
+          || !MetaStoreUtils.columnsIncludedByNameType(oldCols, newCols);
+      if (updateColumnStats) {
+        List<String> oldColNames = new ArrayList<>(oldCols.size());
+        for (FieldSchema oldCol : oldCols) {
+          oldColNames.add(oldCol.getName());
         }
 
-        if (updateColumnStats) {
-          List<String> oldColNames = new ArrayList<>(oldCols.size());
-          for (FieldSchema oldCol : oldCols) {
-            oldColNames.add(oldCol.getName());
-          }
-
-          // Collect column stats which need to be rewritten and remove old stats.
-          colStats = msdb.getTableColumnStatistics(catName, dbName, tableName, oldColNames);
-          if (colStats == null) {
-            updateColumnStats = false;
-          } else {
-            List<ColumnStatisticsObj> statsObjs = colStats.getStatsObj();
-            if (statsObjs != null) {
-              List<String> deletedCols = new ArrayList<>();
-              for (ColumnStatisticsObj statsObj : statsObjs) {
-                boolean found = false;
-                for (FieldSchema newCol : newCols) {
-                  if (statsObj.getColName().equalsIgnoreCase(newCol.getName())
-                      && statsObj.getColType().equalsIgnoreCase(newCol.getType())) {
-                    found = true;
-                    break;
-                  }
+        // NOTE: this doesn't check stats being compliant, but the alterTable call below does.
+        //       The worst we can do is delete the stats.
+        // Collect column stats which need to be rewritten and remove old stats.
+        colStats = msdb.getTableColumnStatistics(catName, dbName, tableName, oldColNames);
+        if (colStats == null) {
+          updateColumnStats = false;
+        } else {
+          List<ColumnStatisticsObj> statsObjs = colStats.getStatsObj();
+          if (statsObjs != null) {
+            List<String> deletedCols = new ArrayList<>();
+            for (ColumnStatisticsObj statsObj : statsObjs) {
+              boolean found = false;
+              for (FieldSchema newCol : newCols) {
+                if (statsObj.getColName().equalsIgnoreCase(newCol.getName())
+                    && statsObj.getColType().equalsIgnoreCase(newCol.getType())) {
+                  found = true;
+                  break;
                 }
+              }
 
-                if (found) {
-                  if (!newDbName.equals(dbName) || !newTableName.equals(tableName)) {
-                    msdb.deleteTableColumnStatistics(catName, dbName, tableName, statsObj.getColName());
-                    newStatsObjs.add(statsObj);
-                    deletedCols.add(statsObj.getColName());
-                  }
-                } else {
+              if (found) {
+                if (!newDbName.equals(dbName) || !newTableName.equals(tableName)) {
                   msdb.deleteTableColumnStatistics(catName, dbName, tableName, statsObj.getColName());
+                  newStatsObjs.add(statsObj);
                   deletedCols.add(statsObj.getColName());
                 }
+              } else {
+                msdb.deleteTableColumnStatistics(catName, dbName, tableName, statsObj.getColName());
+                deletedCols.add(statsObj.getColName());
               }
-              StatsSetupConst.removeColumnStatsState(newTable.getParameters(), deletedCols);
             }
+            StatsSetupConst.removeColumnStatsState(newTable.getParameters(), deletedCols);
           }
         }
+      }
 
-        // Change to new table and append stats for the new table
-        msdb.alterTable(catName, dbName, tableName, newTable, txnId, validWriteIds);
-        if (updateColumnStats && !newStatsObjs.isEmpty()) {
-          ColumnStatisticsDesc statsDesc = colStats.getStatsDesc();
-          statsDesc.setDbName(newDbName);
-          statsDesc.setTableName(newTableName);
-          colStats.setStatsObj(newStatsObjs);
-          msdb.updateTableColumnStatistics(colStats);
-        }
+      // Change to new table and append stats for the new table
+      msdb.alterTable(catName, dbName, tableName, newTable, txnId, validWriteIds);
+      if (updateColumnStats && !newStatsObjs.isEmpty()) {
+        ColumnStatisticsDesc statsDesc = colStats.getStatsDesc();
+        statsDesc.setDbName(newDbName);
+        statsDesc.setTableName(newTableName);
+        colStats.setStatsObj(newStatsObjs);
+        msdb.updateTableColumnStatistics(colStats, txnId, validWriteIds, newTable.getWriteId());
+      }
     } catch (NoSuchObjectException nsoe) {
       LOG.debug("Could not find db entry." + nsoe);
     } catch (InvalidInputException e) {
@@ -907,7 +895,7 @@ public class HiveAlterHandler implements AlterHandler {
         oldColNames.add(oldCol.getName());
       }
       List<String> oldPartNames = Lists.newArrayList(oldPartName);
-      // Note: doesn't take txn stats into account. This method can only remove stats.
+      // TODO: doesn't take txn stats into account. This method can only remove stats.
       List<ColumnStatistics> partsColStats = msdb.getPartitionColumnStatistics(catName, dbname, tblname,
           oldPartNames, oldColNames);
       assert (partsColStats.size() <= 1);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index a46d2f9..091e5de 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -2692,12 +2692,8 @@ public class HiveMetaStore extends ThriftHiveMetastore {
       return;
     }
 
-    private void alterPartitionForTruncate(final RawStore ms,
-                                           final String catName,
-                                           final String dbName,
-                                           final String tableName,
-                                           final Table table,
-                                           final Partition partition) throws Exception {
+    private void alterPartitionForTruncate(RawStore ms, String catName, String dbName, String tableName,
+        Table table, Partition partition, long txnId, String validWriteIds, long writeId) throws Exception {
       EnvironmentContext environmentContext = new EnvironmentContext();
       updateStatsForTruncate(partition.getParameters(), environmentContext);
 
@@ -2713,20 +2709,21 @@ public class HiveMetaStore extends ThriftHiveMetastore {
                 new AlterPartitionEvent(partition, partition, table, true, true, this));
       }
 
+      if (writeId > 0) {
+        partition.setWriteId(writeId);
+      }
       alterHandler.alterPartition(ms, wh, catName, dbName, tableName, null, partition,
-          environmentContext, this);
+          environmentContext, this, txnId, validWriteIds);
     }
 
-    private void alterTableStatsForTruncate(final RawStore ms,
-                                            final String catName,
-                                            final String dbName,
-                                            final String tableName,
-                                            final Table table,
-                                            final List<String> partNames) throws Exception {
+    private void alterTableStatsForTruncate(RawStore ms, String catName, String dbName,
+        String tableName, Table table, List<String> partNames,
+        long txnId, String validWriteIds, long writeId) throws Exception {
       if (partNames == null) {
         if (0 != table.getPartitionKeysSize()) {
           for (Partition partition : ms.getPartitions(catName, dbName, tableName, Integer.MAX_VALUE)) {
-            alterPartitionForTruncate(ms, catName, dbName, tableName, table, partition);
+            alterPartitionForTruncate(ms, catName, dbName, tableName, table, partition,
+                txnId, validWriteIds, writeId);
           }
         } else {
           EnvironmentContext environmentContext = new EnvironmentContext();
@@ -2744,11 +2741,17 @@ public class HiveMetaStore extends ThriftHiveMetastore {
                     new AlterTableEvent(table, table, true, true, this));
           }
 
-          alterHandler.alterTable(ms, wh, catName, dbName, tableName, table, environmentContext, this);
+          // TODO: this should actually pass thru and set writeId for txn stats.
+          if (writeId > 0) {
+            table.setWriteId(writeId);
+          }
+          alterHandler.alterTable(ms, wh, catName, dbName, tableName, table,
+              environmentContext, this, txnId, validWriteIds);
         }
       } else {
         for (Partition partition : ms.getPartitionsByNames(catName, dbName, tableName, partNames)) {
-          alterPartitionForTruncate(ms, catName, dbName, tableName, table, partition);
+          alterPartitionForTruncate(ms, catName, dbName, tableName, table, partition,
+              txnId, validWriteIds, writeId);
         }
       }
       return;
@@ -2786,6 +2789,20 @@ public class HiveMetaStore extends ThriftHiveMetastore {
     @Override
     public void truncate_table(final String dbName, final String tableName, List<String> partNames)
       throws NoSuchObjectException, MetaException {
+      // Deprecated path, won't work for txn tables.
+      truncateTableInternal(dbName, tableName, partNames, -1, null, -1);
+    }
+
+    @Override
+    public TruncateTableResponse truncate_table_req(TruncateTableRequest req)
+        throws MetaException, TException {
+      truncateTableInternal(req.getDbName(), req.getTableName(), req.getPartNames(),
+          req.getTxnId(), req.getValidWriteIdList(), req.getWriteId());
+      return new TruncateTableResponse();
+    }
+
+    private void truncateTableInternal(String dbName, String tableName, List<String> partNames,
+        long txnId, String validWriteIds, long writeId) throws MetaException, NoSuchObjectException {
       try {
         String[] parsedDbName = parseDbName(dbName, conf);
         Table tbl = get_table_core(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName);
@@ -2817,7 +2834,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
 
         // Alter the table/partition stats and also notify truncate table event
         alterTableStatsForTruncate(getMS(), parsedDbName[CAT_NAME], parsedDbName[DB_NAME],
-            tableName, tbl, partNames);
+            tableName, tbl, partNames, txnId, validWriteIds, writeId);
       } catch (IOException e) {
         throw new MetaException(e.getMessage());
       } catch (MetaException | NoSuchObjectException e) {
@@ -4804,6 +4821,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
         final EnvironmentContext envContext)
         throws TException {
       String[] parsedDbName = parseDbName(dbName, conf);
+      // TODO: this method name is confusing, it actually does full alter (sortof)
       rename_partition(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName, null, newPartition,
           envContext);
     }
@@ -4855,7 +4873,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
         }
 
         oldPart = alterHandler.alterPartition(getMS(), wh, catName, db_name, tbl_name,
-            part_vals, new_part, envContext, this);
+            part_vals, new_part, envContext, this, -1, null);
 
         // Only fetch the table if we actually have a listener
         Table table = null;
@@ -4890,15 +4908,14 @@ public class HiveMetaStore extends ThriftHiveMetastore {
     public void alter_partitions(final String db_name, final String tbl_name,
         final List<Partition> new_parts)
         throws TException {
-      alter_partitions_with_environment_context(
-          db_name, tbl_name, new_parts, null, -1, null, -1);
+      String[] o = parseDbName(db_name, conf);
+      alter_partitions_with_environment_context(o[0], o[1],
+          tbl_name, new_parts, null, -1, null, -1);
     }
 
     @Override
-    public AlterPartitionsResponse alter_partitions_with_environment_context_req(
-            AlterPartitionsRequest req)
-            throws TException {
-      alter_partitions_with_environment_context(
+    public AlterPartitionsResponse alter_partitions_req(AlterPartitionsRequest req) throws TException {
+      alter_partitions_with_environment_context(req.getCatName(),
           req.getDbName(), req.getTableName(), req.getPartitions(), req.getEnvironmentContext(),
           req.isSetTxnId() ? req.getTxnId() : -1,
           req.isSetValidWriteIdList() ? req.getValidWriteIdList() : null,
@@ -4912,17 +4929,23 @@ public class HiveMetaStore extends ThriftHiveMetastore {
     public void alter_partitions_with_environment_context(final String db_name, final String tbl_name,
         final List<Partition> new_parts, EnvironmentContext environmentContext)
             throws TException {
-      alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environmentContext,
+      String[] o = parseDbName(db_name, conf);
+      alter_partitions_with_environment_context(o[0], o[1], tbl_name, new_parts, environmentContext,
           -1, null, -1);
     }
 
-    private void alter_partitions_with_environment_context(final String db_name, final String tbl_name,
+    private void alter_partitions_with_environment_context(String catName, String db_name, final String tbl_name,
         final List<Partition> new_parts, EnvironmentContext environmentContext,
         long txnId, String writeIdList, long writeId)
         throws TException {
+      if (environmentContext == null) {
+        environmentContext = new EnvironmentContext();
+      }
+      if (catName == null) {
+        catName = MetaStoreUtils.getDefaultCatalog(conf);
+      }
 
-      String[] parsedDbName = parseDbName(db_name, conf);
-      startTableFunction("alter_partitions", parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tbl_name);
+      startTableFunction("alter_partitions", catName, db_name, tbl_name);
 
       if (LOG.isInfoEnabled()) {
         for (Partition tmpPart : new_parts) {
@@ -4939,10 +4962,10 @@ public class HiveMetaStore extends ThriftHiveMetastore {
           if (!tmpPart.isSetCatName()) {
             tmpPart.setCatName(getDefaultCatalog(conf));
           }
-          firePreEvent(new PreAlterPartitionEvent(parsedDbName[DB_NAME], tbl_name, null, tmpPart, this));
+          firePreEvent(new PreAlterPartitionEvent(db_name, tbl_name, null, tmpPart, this));
         }
-        oldParts = alterHandler.alterPartitions(getMS(), wh, parsedDbName[CAT_NAME],
-            parsedDbName[DB_NAME], tbl_name, new_parts, environmentContext, txnId, writeIdList, writeId, this);
+        oldParts = alterHandler.alterPartitions(getMS(), wh,
+            catName, db_name, tbl_name, new_parts, environmentContext, txnId, writeIdList, writeId, this);
         Iterator<Partition> olditr = oldParts.iterator();
         // Only fetch the table if we have a listener that needs it.
         Table table = null;
@@ -4956,8 +4979,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
           }
 
           if (table == null) {
-            table = getMS().getTable(
-                parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tbl_name,  -1, null);
+            table = getMS().getTable(catName, db_name, tbl_name,  -1, null);
           }
 
           if (!listeners.isEmpty()) {
@@ -4995,7 +5017,8 @@ public class HiveMetaStore extends ThriftHiveMetastore {
         throws InvalidOperationException, MetaException {
       // Do not set an environment context.
       String[] parsedDbName = parseDbName(dbname, conf);
-      alter_table_core(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], name, newTable, null);
+      alter_table_core(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], name, newTable,
+          null, -1, null);
     }
 
     @Override
@@ -5008,7 +5031,16 @@ public class HiveMetaStore extends ThriftHiveMetastore {
         envContext.putToProperties(StatsSetupConst.CASCADE, StatsSetupConst.TRUE);
       }
       String[] parsedDbName = parseDbName(dbname, conf);
-      alter_table_core(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], name, newTable, envContext);
+      alter_table_core(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], name, newTable,
+          envContext, -1, null);
+    }
+
+    @Override
+    public AlterTableResponse alter_table_req(AlterTableRequest req)
+        throws InvalidOperationException, MetaException, TException {
+      alter_table_core(req.getCatName(), req.getDbName(), req.getTableName(),
+          req.getTable(), req.getEnvironmentContext(), req.getTxnId(), req.getValidWriteIdList());
+      return new AlterTableResponse();
     }
 
     @Override
@@ -5017,14 +5049,21 @@ public class HiveMetaStore extends ThriftHiveMetastore {
         final EnvironmentContext envContext)
         throws InvalidOperationException, MetaException {
       String[] parsedDbName = parseDbName(dbname, conf);
-      alter_table_core(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], name, newTable, envContext);
+      alter_table_core(parsedDbName[CAT_NAME], parsedDbName[DB_NAME],
+          name, newTable, envContext, -1, null);
     }
 
-    private void alter_table_core(final String catName, final String dbname, final String name,
-                                  final Table newTable, final EnvironmentContext envContext)
+    private void alter_table_core(String catName, String dbname, String name, Table newTable,
+        EnvironmentContext envContext, long txnId, String validWriteIdList)
         throws InvalidOperationException, MetaException {
       startFunction("alter_table", ": " + TableName.getQualified(catName, dbname, name)
           + " newtbl=" + newTable.getTableName());
+      if (envContext == null) {
+        envContext = new EnvironmentContext();
+      }
+      if (catName == null) {
+        catName = MetaStoreUtils.getDefaultCatalog(conf);
+      }
 
       // Update the time if it hasn't been specified.
       if (newTable.getParameters() == null ||
@@ -5052,7 +5091,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
         Table oldt = get_table_core(catName, dbname, name);
         firePreEvent(new PreAlterTableEvent(oldt, newTable, this));
         alterHandler.alterTable(getMS(), wh, catName, dbname, name, newTable,
-                envContext, this);
+                envContext, this, txnId, validWriteIdList);
         success = true;
       } catch (NoSuchObjectException e) {
         // thrown when the table to be altered does not exist
@@ -5600,6 +5639,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
     }
 
     private String lowerCaseConvertPartName(String partName) throws MetaException {
+      if (partName == null) return partName;
       boolean isFirst = true;
       Map<String, String> partSpec = Warehouse.makeEscSpecFromName(partName);
       String convertedPartName = new String();
@@ -5618,6 +5658,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
       return convertedPartName;
     }
 
+    @Deprecated
     @Override
     public ColumnStatistics get_table_column_statistics(String dbName, String tableName,
       String colName) throws TException {
@@ -5660,7 +5701,13 @@ public class HiveMetaStore extends ThriftHiveMetastore {
         ColumnStatistics cs = getMS().getTableColumnStatistics(
             catName, dbName, tblName, lowerCaseColNames,
             request.getTxnId(), request.getValidWriteIdList());
-        result = new TableStatsResult((cs == null || cs.getStatsObj() == null)
+        // Note: stats compliance is not propagated to the client; instead, we just return nothing
+        //       if stats are not compliant for now. This won't work for stats merging, but that
+        //       is currently only done on metastore size (see set_aggr...).
+        //       For some optimizations we might make use of incorrect stats that are "better than
+        //       nothing", so this may change in future.
+        result = new TableStatsResult((cs == null || cs.getStatsObj() == null
+            || (cs.isSetIsStatsCompliant() && !cs.isIsStatsCompliant()))
             ? Lists.newArrayList() : cs.getStatsObj());
       } finally {
         endFunction("get_table_statistics_req", result == null, null, tblName);
@@ -5725,8 +5772,16 @@ public class HiveMetaStore extends ThriftHiveMetastore {
             request.isSetTxnId() ? request.getTxnId() : -1,
             request.isSetValidWriteIdList() ? request.getValidWriteIdList() : null);
         Map<String, List<ColumnStatisticsObj>> map = new HashMap<>();
-        for (ColumnStatistics stat : stats) {
-          map.put(stat.getStatsDesc().getPartName(), stat.getStatsObj());
+        if (stats != null) {
+          for (ColumnStatistics stat : stats) {
+            // Note: stats compliance is not propagated to the client; instead, we just return nothing
+            //       if stats are not compliant for now. This won't work for stats merging, but that
+            //       is currently only done on metastore size (see set_aggr...).
+            //       For some optimizations we might make use of incorrect stats that are "better than
+            //       nothing", so this may change in future.
+            if (stat.isSetIsStatsCompliant() && !stat.isIsStatsCompliant()) continue;
+            map.put(stat.getStatsDesc().getPartName(), stat.getStatsObj());
+          }
         }
         result = new PartitionsStatsResult(map);
       } finally {
@@ -5737,79 +5792,73 @@ public class HiveMetaStore extends ThriftHiveMetastore {
 
     @Override
     public boolean update_table_column_statistics(ColumnStatistics colStats) throws TException {
-      String catName;
-      String dbName;
-      String tableName;
-      String colName;
-      ColumnStatisticsDesc statsDesc = colStats.getStatsDesc();
-      catName = statsDesc.isSetCatName() ? statsDesc.getCatName().toLowerCase() : getDefaultCatalog(conf);
-      dbName = statsDesc.getDbName().toLowerCase();
-      tableName = statsDesc.getTableName().toLowerCase();
-
-      statsDesc.setCatName(catName);
-      statsDesc.setDbName(dbName);
-      statsDesc.setTableName(tableName);
-      long time = System.currentTimeMillis() / 1000;
-      statsDesc.setLastAnalyzed(time);
-
-      List<ColumnStatisticsObj> statsObjs =  colStats.getStatsObj();
+      // Deprecated API, won't work for transactional tables
+      return updateTableColumnStatsInternal(colStats, -1, null, -1);
+    }
 
-      startFunction("write_column_statistics", ":  table=" +
-          TableName.getQualified(catName, dbName, tableName));
-      for (ColumnStatisticsObj statsObj:statsObjs) {
-        colName = statsObj.getColName().toLowerCase();
-        statsObj.setColName(colName);
-        statsObj.setColType(statsObj.getColType().toLowerCase());
+    @Override
+    public SetPartitionsStatsResponse update_table_column_statistics_req(
+        SetPartitionsStatsRequest req) throws NoSuchObjectException,
+        InvalidObjectException, MetaException, InvalidInputException,
+        TException {
+      if (req.getColStatsSize() != 1) {
+        throw new InvalidInputException("Only one stats object expected");
+      }
+      if (req.isNeedMerge()) {
+        throw new InvalidInputException("Merge is not supported for non-aggregate stats");
       }
+      ColumnStatistics colStats = req.getColStatsIterator().next();
+      boolean ret = updateTableColumnStatsInternal(colStats,
+          req.getTxnId(), req.getValidWriteIdList(), req.getWriteId());
+      return new SetPartitionsStatsResponse(ret);
+    }
 
-     colStats.setStatsDesc(statsDesc);
-     colStats.setStatsObj(statsObjs);
+    private boolean updateTableColumnStatsInternal(ColumnStatistics colStats,
+        long txnId, String validWriteIds, long writeId)
+        throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException {
+      normalizeColStatsInput(colStats);
 
-     boolean ret = false;
+      startFunction("write_column_statistics", ":  table=" + TableName.getQualified(
+          colStats.getStatsDesc().getCatName(), colStats.getStatsDesc().getDbName(),
+          colStats.getStatsDesc().getTableName()));
 
+      boolean ret = false;
       try {
-        ret = getMS().updateTableColumnStatistics(colStats);
-        return ret;
+        ret = getMS().updateTableColumnStatistics(colStats, txnId, validWriteIds, writeId);
       } finally {
-        endFunction("write_column_statistics", ret != false, null, tableName);
+        endFunction("write_column_statistics", ret != false, null,
+            colStats.getStatsDesc().getTableName());
       }
+      return ret;
     }
 
-    private boolean updatePartitonColStats(Table tbl, ColumnStatistics colStats)
-        throws MetaException, InvalidObjectException, NoSuchObjectException, InvalidInputException {
-      String catName;
-      String dbName;
-      String tableName;
-      String partName;
-      String colName;
-
+    private void normalizeColStatsInput(ColumnStatistics colStats) throws MetaException {
+      // TODO: is this really needed? this code is propagated from HIVE-1362 but most of it is useless.
       ColumnStatisticsDesc statsDesc = colStats.getStatsDesc();
-      catName = statsDesc.isSetCatName() ? statsDesc.getCatName().toLowerCase() : getDefaultCatalog(conf);
-      dbName = statsDesc.getDbName().toLowerCase();
-      tableName = statsDesc.getTableName().toLowerCase();
-      partName = lowerCaseConvertPartName(statsDesc.getPartName());
-
-      statsDesc.setCatName(catName);
-      statsDesc.setDbName(dbName);
-      statsDesc.setTableName(tableName);
-      statsDesc.setPartName(partName);
-
+      statsDesc.setCatName(statsDesc.isSetCatName() ? statsDesc.getCatName().toLowerCase() : getDefaultCatalog(conf));
+      statsDesc.setDbName(statsDesc.getDbName().toLowerCase());
+      statsDesc.setTableName(statsDesc.getTableName().toLowerCase());
+      statsDesc.setPartName(lowerCaseConvertPartName(statsDesc.getPartName()));
       long time = System.currentTimeMillis() / 1000;
       statsDesc.setLastAnalyzed(time);
 
-      List<ColumnStatisticsObj> statsObjs =  colStats.getStatsObj();
-
-      startFunction("write_partition_column_statistics",
-          ":  db=" + dbName + " table=" + tableName
-              + " part=" + partName);
-      for (ColumnStatisticsObj statsObj:statsObjs) {
-        colName = statsObj.getColName().toLowerCase();
-        statsObj.setColName(colName);
+      for (ColumnStatisticsObj statsObj : colStats.getStatsObj()) {
+        statsObj.setColName(statsObj.getColName().toLowerCase());
         statsObj.setColType(statsObj.getColType().toLowerCase());
       }
-
       colStats.setStatsDesc(statsDesc);
-      colStats.setStatsObj(statsObjs);
+      colStats.setStatsObj(colStats.getStatsObj());
+    }
+
+    private boolean updatePartitonColStatsInternal(Table tbl, ColumnStatistics colStats,
+        long txnId, String validWriteIds, long writeId)
+        throws MetaException, InvalidObjectException, NoSuchObjectException, InvalidInputException {
+      normalizeColStatsInput(colStats);
+
+      ColumnStatisticsDesc csd = colStats.getStatsDesc();
+      String catName = csd.getCatName(), dbName = csd.getDbName(), tableName = csd.getTableName();
+      startFunction("write_partition_column_statistics", ":  db=" + dbName  + " table=" + tableName
+              + " part=" + csd.getPartName());
 
       boolean ret = false;
 
@@ -5817,9 +5866,9 @@ public class HiveMetaStore extends ThriftHiveMetastore {
         if (tbl == null) {
           tbl = getTable(catName, dbName, tableName);
         }
-        List<String> partVals = getPartValsFromName(tbl, partName);
-        ret = getMS().updatePartitionColumnStatistics(colStats, partVals);
-        return ret;
+        List<String> partVals = getPartValsFromName(tbl, csd.getPartName());
+        return getMS().updatePartitionColumnStatistics(
+            colStats, partVals, txnId, validWriteIds, writeId);
       } finally {
         endFunction("write_partition_column_statistics", ret != false, null, tableName);
       }
@@ -5827,7 +5876,26 @@ public class HiveMetaStore extends ThriftHiveMetastore {
 
     @Override
     public boolean update_partition_column_statistics(ColumnStatistics colStats) throws TException {
-      return updatePartitonColStats(null, colStats);
+      // Deprecated API.
+      return updatePartitonColStatsInternal(null, colStats, -1, null, -1);
+    }
+
+
+    @Override
+    public SetPartitionsStatsResponse update_partition_column_statistics_req(
+        SetPartitionsStatsRequest req) throws NoSuchObjectException,
+        InvalidObjectException, MetaException, InvalidInputException,
+        TException {
+      if (req.getColStatsSize() != 1) {
+        throw new InvalidInputException("Only one stats object expected");
+      }
+      if (req.isNeedMerge()) {
+        throw new InvalidInputException("Merge is not supported for non-aggregate stats");
+      }
+      ColumnStatistics colStats = req.getColStatsIterator().next();
+      boolean ret = updatePartitonColStatsInternal(null, colStats,
+          req.getTxnId(), req.getValidWriteIdList(), req.getWriteId());
+      return new SetPartitionsStatsResponse(ret);
     }
 
     @Override
@@ -5843,13 +5911,25 @@ public class HiveMetaStore extends ThriftHiveMetastore {
       startFunction("delete_column_statistics_by_partition",": table=" +
           TableName.getQualified(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName) +
           " partition=" + convertedPartName + " column=" + colName);
-      boolean ret = false;
+      boolean ret = false, committed = false;
 
+      getMS().openTransaction();
       try {
         List<String> partVals = getPartValsFromName(getMS(), parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName, convertedPartName);
+        Table table = getMS().getTable(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName);
+        // This API looks unused; if it were used we'd need to update stats state and write ID.
+        // We cannot just randomly nuke some txn stats.
+        if (TxnUtils.isTransactionalTable(table)) {
+          throw new MetaException("Cannot delete stats via this API for a transactional table");
+        }
+
         ret = getMS().deletePartitionColumnStatistics(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName,
                                                       convertedPartName, partVals, colName);
+        committed = getMS().commitTransaction();
       } finally {
+        if (!committed) {
+          getMS().rollbackTransaction();
+        }
         endFunction("delete_column_statistics_by_partition", ret != false, null, tableName);
       }
       return ret;
@@ -5870,10 +5950,23 @@ public class HiveMetaStore extends ThriftHiveMetastore {
           TableName.getQualified(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName) + " column=" +
           colName);
 
-      boolean ret = false;
+
+      boolean ret = false, committed = false;
+      getMS().openTransaction();
       try {
+        Table table = getMS().getTable(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName);
+        // This API looks unused; if it were used we'd need to update stats state and write ID.
+        // We cannot just randomly nuke some txn stats.
+        if (TxnUtils.isTransactionalTable(table)) {
+          throw new MetaException("Cannot delete stats via this API for a transactional table");
+        }
+
         ret = getMS().deleteTableColumnStatistics(parsedDbName[CAT_NAME], parsedDbName[DB_NAME], tableName, colName);
+        committed = getMS().commitTransaction();
       } finally {
+        if (!committed) {
+          getMS().rollbackTransaction();
+        }
         endFunction("delete_column_statistics_by_table", ret != false, null, tableName);
       }
       return ret;
@@ -7489,31 +7582,13 @@ public class HiveMetaStore extends ThriftHiveMetastore {
           throw new MetaException(
               "Expecting only 1 ColumnStatistics for table's column stats, but find "
                   + request.getColStatsSize());
+        }
+        if (request.isSetNeedMerge() && request.isNeedMerge()) {
+          return updateTableColumnStatsWithMerge(catName, dbName, tableName, colNames, request);
         } else {
-          if (request.isSetNeedMerge() && request.isNeedMerge()) {
-            // one single call to get all column stats
-            ColumnStatistics csOld =
-                getMS().getTableColumnStatistics(
-                    catName, dbName, tableName, colNames,
-                    request.getTxnId(), request.getValidWriteIdList());
-            Table t = getTable(catName, dbName, tableName);
-            // we first use t.getParameters() to prune the stats
-            MetaStoreUtils.getMergableCols(firstColStats, t.getParameters());
-            // we merge those that can be merged
-            if (csOld != null && csOld.getStatsObjSize() != 0
-                && !firstColStats.getStatsObj().isEmpty()) {
-              MetaStoreUtils.mergeColStats(firstColStats, csOld);
-            }
-            if (!firstColStats.getStatsObj().isEmpty()) {
-              return update_table_column_statistics(firstColStats);
-            } else {
-              LOG.debug("All the column stats are not accurate to merge.");
-              return true;
-            }
-          } else {
-            // This is the overwrite case, we do not care about the accuracy.
-            return update_table_column_statistics(firstColStats);
-          }
+          // This is the overwrite case, we do not care about the accuracy.
+          return updateTableColumnStatsInternal(firstColStats, request.getTxnId(),
+              request.getValidWriteIdList(), request.getWriteId());
         }
       } else {
         // partition level column stats merging
@@ -7529,54 +7604,151 @@ public class HiveMetaStore extends ThriftHiveMetastore {
           newStatsMap.put(partName, csNew);
         }
 
-        Map<String, ColumnStatistics> oldStatsMap = new HashMap<>();
-        Map<String, Partition> mapToPart = new HashMap<>();
         if (request.isSetNeedMerge() && request.isNeedMerge()) {
-          // a single call to get all column stats for all partitions
-          List<String> partitionNames = new ArrayList<>();
-          partitionNames.addAll(newStatsMap.keySet());
-          List<ColumnStatistics> csOlds =
-              getMS().getPartitionColumnStatistics(
-                  catName, dbName, tableName, partitionNames, colNames,
-                  request.getTxnId(), request.getValidWriteIdList());
-          if (newStatsMap.values().size() != csOlds.size()) {
-            // some of the partitions miss stats.
-            LOG.debug("Some of the partitions miss stats.");
-          }
-          for (ColumnStatistics csOld : csOlds) {
-            oldStatsMap.put(csOld.getStatsDesc().getPartName(), csOld);
+          ret = updatePartColumnStatsWithMerge(catName, dbName, tableName,
+              colNames, newStatsMap, request);
+        } else { // No merge.
+          Table t = getTable(catName, dbName, tableName);
+          for (Entry<String, ColumnStatistics> entry : newStatsMap.entrySet()) {
+            // We don't short-circuit on errors here anymore. That can leave acid stats invalid.
+            ret = updatePartitonColStatsInternal(t, entry.getValue(), request.getTxnId(),
+                request.getValidWriteIdList(), request.getWriteId()) && ret;
           }
+        }
+      }
+      return ret;
+    }
 
-          // another single call to get all the partition objects
-          partitions = getMS().getPartitionsByNames(catName, dbName, tableName, partitionNames);
-          for (int index = 0; index < partitionNames.size(); index++) {
-            mapToPart.put(partitionNames.get(index), partitions.get(index));
-          }
+    private boolean updatePartColumnStatsWithMerge(String catName, String dbName, String tableName,
+      List<String> colNames, Map<String, ColumnStatistics> newStatsMap, SetPartitionsStatsRequest request)
+          throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException {
+      RawStore ms = getMS();
+      ms.openTransaction();
+      boolean isCommitted = false, result = false;
+      try {
+        // a single call to get all column stats for all partitions
+        List<String> partitionNames = new ArrayList<>();
+        partitionNames.addAll(newStatsMap.keySet());
+        List<ColumnStatistics> csOlds = ms.getPartitionColumnStatistics(catName, dbName, tableName,
+            partitionNames, colNames, request.getTxnId(), request.getValidWriteIdList());
+        if (newStatsMap.values().size() != csOlds.size()) {
+          // some of the partitions miss stats.
+          LOG.debug("Some of the partitions miss stats.");
         }
-        Table t = getTable(catName, dbName, tableName,
-            request.getTxnId(), request.getValidWriteIdList());
+        Map<String, ColumnStatistics> oldStatsMap = new HashMap<>();
+        for (ColumnStatistics csOld : csOlds) {
+          oldStatsMap.put(csOld.getStatsDesc().getPartName(), csOld);
+        }
+
+        // another single call to get all the partition objects
+        List<Partition> partitions = ms.getPartitionsByNames(catName, dbName, tableName, partitionNames);
+        Map<String, Partition> mapToPart = new HashMap<>();
+        for (int index = 0; index < partitionNames.size(); index++) {
+          mapToPart.put(partitionNames.get(index), partitions.get(index));
+        }
+
+        Table t = getTable(catName, dbName, tableName);
         for (Entry<String, ColumnStatistics> entry : newStatsMap.entrySet()) {
           ColumnStatistics csNew = entry.getValue();
           ColumnStatistics csOld = oldStatsMap.get(entry.getKey());
-          if (request.isSetNeedMerge() && request.isNeedMerge()) {
+          boolean isInvalidTxnStats = csOld != null
+              && csOld.isSetIsStatsCompliant() && !csOld.isIsStatsCompliant();
+          Partition part = mapToPart.get(entry.getKey());
+          if (isInvalidTxnStats) {
+            // No columns can be merged; a shortcut for getMergableCols.
+            csNew.setStatsObj(Lists.newArrayList());
+          } else {
             // we first use getParameters() to prune the stats
-            MetaStoreUtils.getMergableCols(csNew, mapToPart.get(entry.getKey()).getParameters());
+            MetaStoreUtils.getMergableCols(csNew, part.getParameters());
             // we merge those that can be merged
             if (csOld != null && csOld.getStatsObjSize() != 0 && !csNew.getStatsObj().isEmpty()) {
               MetaStoreUtils.mergeColStats(csNew, csOld);
             }
-            if (!csNew.getStatsObj().isEmpty()) {
-              ret = ret && updatePartitonColStats(t, csNew);
-            } else {
-              LOG.debug("All the column stats " + csNew.getStatsDesc().getPartName()
-                  + " are not accurate to merge.");
-            }
+          }
+
+          if (!csNew.getStatsObj().isEmpty()) {
+            // We don't short-circuit on errors here anymore. That can leave acid stats invalid.
+            result = updatePartitonColStatsInternal(t, csNew, request.getTxnId(),
+                request.getValidWriteIdList(), request.getWriteId()) && result;
+          } else if (isInvalidTxnStats) {
+            // For now because the stats state is such as it is, we will invalidate everything.
+            // Overall the sematics here are not clear - we could invalide only some columns, but does
+            // that make any physical sense? Could query affect some columns but not others?
+            part.setWriteId(request.getWriteId());
+            StatsSetupConst.clearColumnStatsState(part.getParameters());
+            StatsSetupConst.setBasicStatsState(part.getParameters(), StatsSetupConst.FALSE);
+            ms.alterPartition(catName, dbName, tableName, part.getValues(), part,
+                request.getTxnId(), request.getValidWriteIdList());
+            result = false;
           } else {
-            ret = ret && updatePartitonColStats(t, csNew);
+            // TODO: why doesn't the original call for non acid tables invalidate the stats?
+            LOG.debug("All the column stats " + csNew.getStatsDesc().getPartName()
+                + " are not accurate to merge.");
           }
         }
+        ms.commitTransaction();
+        isCommitted = true;
+      } finally {
+        if (!isCommitted) {
+          ms.rollbackTransaction();
+        }
       }
-      return ret;
+      return result;
+    }
+
+
+    private boolean updateTableColumnStatsWithMerge(String catName, String dbName, String tableName,
+        List<String> colNames, SetPartitionsStatsRequest request) throws MetaException,
+        NoSuchObjectException, InvalidObjectException, InvalidInputException {
+      ColumnStatistics firstColStats = request.getColStats().get(0);
+      RawStore ms = getMS();
+      ms.openTransaction();
+      boolean isCommitted = false, result = false;
+      try {
+        ColumnStatistics csOld = ms.getTableColumnStatistics(catName, dbName, tableName, colNames,
+            request.getTxnId(), request.getValidWriteIdList());
+        // we first use the valid stats list to prune the stats
+        boolean isInvalidTxnStats = csOld != null
+            && csOld.isSetIsStatsCompliant() && !csOld.isIsStatsCompliant();
+        if (isInvalidTxnStats) {
+          // No columns can be merged; a shortcut for getMergableCols.
+          firstColStats.setStatsObj(Lists.newArrayList());
+        } else {
+          Table t = getTable(catName, dbName, tableName);
+          MetaStoreUtils.getMergableCols(firstColStats, t.getParameters());
+
+          // we merge those that can be merged
+          if (csOld != null && csOld.getStatsObjSize() != 0 && !firstColStats.getStatsObj().isEmpty()) {
+            MetaStoreUtils.mergeColStats(firstColStats, csOld);
+          }
+        }
+
+        if (!firstColStats.getStatsObj().isEmpty()) {
+          result = updateTableColumnStatsInternal(firstColStats, request.getTxnId(),
+              request.getValidWriteIdList(), request.getWriteId());
+        } else if (isInvalidTxnStats) {
+          // For now because the stats state is such as it is, we will invalidate everything.
+          // Overall the sematics here are not clear - we could invalide only some columns, but does
+          // that make any physical sense? Could query affect some columns but not others?
+          Table t = getTable(catName, dbName, tableName);
+          t.setWriteId(request.getWriteId());
+          StatsSetupConst.clearColumnStatsState(t.getParameters());
+          StatsSetupConst.setBasicStatsState(t.getParameters(), StatsSetupConst.FALSE);
+          ms.alterTable(catName, dbName, tableName, t, request.getTxnId(), request.getValidWriteIdList());
+        } else {
+          // TODO: why doesn't the original call for non acid tables invalidate the stats?
+          LOG.debug("All the column stats are not accurate to merge.");
+          result = true;
+        }
+
+        ms.commitTransaction();
+        isCommitted = true;
+      } finally {
+        if (!isCommitted) {
+          ms.rollbackTransaction();
+        }
+      }
+      return result;
     }
 
     private Table getTable(String catName, String dbName, String tableName)

http://git-wip-us.apache.org/repos/asf/hive/blob/1c9947f3/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
index cc417ea..38327d7 100644
--- a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
+++ b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
@@ -130,7 +130,7 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
 
   //copied from ErrorMsg.java
   private static final String REPL_EVENTS_MISSING_IN_METASTORE = "Notification events are missing in the meta store.";
-  
+
   static final protected Logger LOG = LoggerFactory.getLogger(HiveMetaStoreClient.class);
 
   public HiveMetaStoreClient(Configuration conf) throws MetaException {
@@ -404,15 +404,36 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
     if (hook != null) {
       hook.preAlterTable(new_tbl, envContext);
     }
-    client.alter_table_with_environment_context(prependCatalogToDbName(dbname, conf),
-        tbl_name, new_tbl, envContext);
+    AlterTableRequest req = new AlterTableRequest(dbname, tbl_name, new_tbl);
+    req.setCatName(MetaStoreUtils.getDefaultCatalog(conf));
+    req.setEnvironmentContext(envContext);
+    client.alter_table_req(req);
   }
 
   @Override
   public void alter_table(String catName, String dbName, String tblName, Table newTable,
                          EnvironmentContext envContext) throws TException {
-    client.alter_table_with_environment_context(prependCatalogToDbName(catName,
-        dbName, conf), tblName, newTable, envContext);
+    // This never used to call the hook. Why? There's overload madness in metastore...
+    AlterTableRequest req = new AlterTableRequest(dbName, tblName, newTable);
+    req.setCatName(catName);
+    req.setEnvironmentContext(envContext);
+    client.alter_table_req(req);
+  }
+
+  @Override
+  public void alter_table(String catName, String dbName, String tbl_name, Table new_tbl,
+      EnvironmentContext envContext, long txnId, String validWriteIds)
+          throws InvalidOperationException, MetaException, TException {
+    HiveMetaHook hook = getHook(new_tbl);
+    if (hook != null) {
+      hook.preAlterTable(new_tbl, envContext);
+    }
+    AlterTableRequest req = new AlterTableRequest(dbName, tbl_name, new_tbl);
+    req.setCatName(catName);
+    req.setTxnId(txnId);
+    req.setValidWriteIdList(validWriteIds);
+    req.setEnvironmentContext(envContext);
+    client.alter_table_req(req);
   }
 
   @Override
@@ -1339,14 +1360,33 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
   }
 
   @Override
+  public void truncateTable(String dbName, String tableName, List<String> partNames,
+      long txnId, String validWriteIds, long writeId) throws TException {
+    truncateTableInternal(getDefaultCatalog(conf),
+        dbName, tableName, partNames, txnId, validWriteIds, writeId);
+  }
+
+  @Override
   public void truncateTable(String dbName, String tableName, List<String> partNames) throws TException {
-    truncateTable(getDefaultCatalog(conf), dbName, tableName, partNames);
+    truncateTableInternal(getDefaultCatalog(conf), dbName, tableName, partNames, -1, null, -1);
   }
 
   @Override
   public void truncateTable(String catName, String dbName, String tableName, List<String> partNames)
       throws TException {
-    client.truncate_table(prependCatalogToDbName(catName, dbName, conf), tableName, partNames);
+    truncateTableInternal(catName, dbName, tableName, partNames, -1, null, -1);
+  }
+
+  private void truncateTableInternal(String catName, String dbName, String tableName,
+      List<String> partNames, long txnId, String validWriteIds, long writeId)
+          throws MetaException, TException {
+    TruncateTableRequest req = new TruncateTableRequest(
+        prependCatalogToDbName(catName, dbName, conf), tableName);
+    req.setPartNames(partNames);
+    req.setTxnId(txnId);
+    req.setValidWriteIdList(validWriteIds);
+    req.setWriteId(writeId);
+    client.truncate_table_req(req);
   }
 
   /**
@@ -1870,7 +1910,8 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
   }
 
   @Override
-  public void alter_partition(String dbName, String tblName, Partition newPart, EnvironmentContext environmentContext)
+  public void alter_partition(String dbName, String tblName, Partition newPart,
+      EnvironmentContext environmentContext)
       throws InvalidOperationException, MetaException, TException {
     alter_partition(getDefaultCatalog(conf), dbName, tblName, newPart, environmentContext);
   }
@@ -1878,11 +1919,26 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
   @Override
   public void alter_partition(String catName, String dbName, String tblName, Partition newPart,
                               EnvironmentContext environmentContext) throws TException {
-    client.alter_partition_with_environment_context(prependCatalogToDbName(catName, dbName, conf), tblName,
-        newPart, environmentContext);
+    AlterPartitionsRequest req = new AlterPartitionsRequest(dbName, tblName, Lists.newArrayList(newPart));
+    req.setCatName(catName);
+    req.setEnvironmentContext(environmentContext);
+    client.alter_partitions_req(req);
   }
 
   @Override
+  public void alter_partition(String dbName, String tblName, Partition newPart,
+      EnvironmentContext environmentContext, long txnId, String writeIdList)
+      throws InvalidOperationException, MetaException, TException {
+    AlterPartitionsRequest req = new AlterPartitionsRequest(
+        dbName, tblName, Lists.newArrayList(newPart));
+    req.setEnvironmentContext(environmentContext);
+    req.setTxnId(txnId);
+    req.setValidWriteIdList(writeIdList);
+    client.alter_partitions_req(req);
+  }
+
+  @Deprecated
+  @Override
   public void alter_partitions(String dbName, String tblName, List<Partition> newParts)
       throws TException {
     alter_partitions(
@@ -1901,8 +1957,6 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
                                EnvironmentContext environmentContext,
                                long txnId, String writeIdList, long writeId)
       throws InvalidOperationException, MetaException, TException {
-    //client.alter_partition_with_environment_context(getDefaultCatalog(conf),
-      //  dbName, tblName, newParts, environmentContext);
     alter_partitions(getDefaultCatalog(conf),
         dbName, tblName, newParts, environmentContext, txnId, writeIdList, writeId);
 
@@ -1914,14 +1968,15 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
                                EnvironmentContext environmentContext,
                                long txnId, String writeIdList, long writeId) throws TException {
     AlterPartitionsRequest req = new AlterPartitionsRequest();
-    req.setDbName(prependCatalogToDbName(catName, dbName, conf));
+    req.setCatName(catName);
+    req.setDbName(dbName);
     req.setTableName(tblName);
     req.setPartitions(newParts);
     req.setEnvironmentContext(environmentContext);
     req.setTxnId(txnId);
     req.setValidWriteIdList(writeIdList);
     req.setWriteId(writeId);
-    client.alter_partitions_with_environment_context_req(req);
+    client.alter_partitions_req(req);
   }
 
   @Override
@@ -2005,7 +2060,11 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
     if (!statsObj.getStatsDesc().isSetCatName()) {
       statsObj.getStatsDesc().setCatName(getDefaultCatalog(conf));
     }
-    return client.update_table_column_statistics(statsObj);
+    // Note: currently this method doesn't set txn properties and thus won't work on txn tables.
+    SetPartitionsStatsRequest req = new SetPartitionsStatsRequest();
+    req.addToColStats(statsObj);
+    req.setNeedMerge(false);
+    return client.update_table_column_statistics_req(req).isResult();
   }
 
   @Override
@@ -2013,7 +2072,11 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
     if (!statsObj.getStatsDesc().isSetCatName()) {
       statsObj.getStatsDesc().setCatName(getDefaultCatalog(conf));
     }
-    return client.update_partition_column_statistics(statsObj);
+    // Note: currently this method doesn't set txn properties and thus won't work on txn tables.
+    SetPartitionsStatsRequest req = new SetPartitionsStatsRequest();
+    req.addToColStats(statsObj);
+    req.setNeedMerge(false);
+    return client.update_partition_column_statistics_req(req).isResult();
   }
 
   @Override
@@ -3431,5 +3494,4 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
     req.setMaxCreateTime(maxCreateTime);
     return client.get_runtime_stats(req);
   }
-
 }