Repository: hive
Updated Branches:
  refs/heads/master f20ec2e93 -> 3252bed8f


HIVE-15010 Make LockComponent aware if it's part of dynamic partition operation 
(Eugene Koifman, reviewed by Wei Zheng)


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

Branch: refs/heads/master
Commit: 3252bed8faccc84cdf560e43674d31a9144abbe4
Parents: f20ec2e
Author: Eugene Koifman <ekoif...@hortonworks.com>
Authored: Wed Oct 19 14:20:29 2016 -0700
Committer: Eugene Koifman <ekoif...@hortonworks.com>
Committed: Wed Oct 19 14:20:29 2016 -0700

----------------------------------------------------------------------
 metastore/if/hive_metastore.thrift              |   3 +-
 .../gen/thrift/gen-cpp/hive_metastore_types.cpp |  22 ++++
 .../gen/thrift/gen-cpp/hive_metastore_types.h   |  12 +-
 .../hive/metastore/api/LockComponent.java       | 109 ++++++++++++++++++-
 .../src/gen/thrift/gen-php/metastore/Types.php  |  23 ++++
 .../gen/thrift/gen-py/hive_metastore/ttypes.py  |  15 ++-
 .../gen/thrift/gen-rb/hive_metastore_types.rb   |   4 +-
 7 files changed, 179 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/3252bed8/metastore/if/hive_metastore.thrift
----------------------------------------------------------------------
diff --git a/metastore/if/hive_metastore.thrift 
b/metastore/if/hive_metastore.thrift
index 9f6ef91..42cb6f0 100755
--- a/metastore/if/hive_metastore.thrift
+++ b/metastore/if/hive_metastore.thrift
@@ -670,7 +670,8 @@ struct LockComponent {
     4: optional string tablename,
     5: optional string partitionname,
     6: optional DataOperationType operationType = DataOperationType.UNSET,
-    7: optional bool isAcid = false
+    7: optional bool isAcid = false,
+    8: optional bool isDynamicPartitionWrite = false
 }
 
 struct LockRequest {

http://git-wip-us.apache.org/repos/asf/hive/blob/3252bed8/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp 
b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
index 89541fa..f3aaf7e 100644
--- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
+++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
@@ -12675,6 +12675,11 @@ void LockComponent::__set_isAcid(const bool val) {
 __isset.isAcid = true;
 }
 
+void LockComponent::__set_isDynamicPartitionWrite(const bool val) {
+  this->isDynamicPartitionWrite = val;
+__isset.isDynamicPartitionWrite = true;
+}
+
 uint32_t LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -12761,6 +12766,14 @@ uint32_t 
LockComponent::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
+      case 8:
+        if (ftype == ::apache::thrift::protocol::T_BOOL) {
+          xfer += iprot->readBool(this->isDynamicPartitionWrite);
+          this->__isset.isDynamicPartitionWrite = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -12816,6 +12829,11 @@ uint32_t 
LockComponent::write(::apache::thrift::protocol::TProtocol* oprot) cons
     xfer += oprot->writeBool(this->isAcid);
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.isDynamicPartitionWrite) {
+    xfer += oprot->writeFieldBegin("isDynamicPartitionWrite", 
::apache::thrift::protocol::T_BOOL, 8);
+    xfer += oprot->writeBool(this->isDynamicPartitionWrite);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -12830,6 +12848,7 @@ void swap(LockComponent &a, LockComponent &b) {
   swap(a.partitionname, b.partitionname);
   swap(a.operationType, b.operationType);
   swap(a.isAcid, b.isAcid);
+  swap(a.isDynamicPartitionWrite, b.isDynamicPartitionWrite);
   swap(a.__isset, b.__isset);
 }
 
@@ -12841,6 +12860,7 @@ LockComponent::LockComponent(const LockComponent& 
other551) {
   partitionname = other551.partitionname;
   operationType = other551.operationType;
   isAcid = other551.isAcid;
+  isDynamicPartitionWrite = other551.isDynamicPartitionWrite;
   __isset = other551.__isset;
 }
 LockComponent& LockComponent::operator=(const LockComponent& other552) {
@@ -12851,6 +12871,7 @@ LockComponent& LockComponent::operator=(const 
LockComponent& other552) {
   partitionname = other552.partitionname;
   operationType = other552.operationType;
   isAcid = other552.isAcid;
+  isDynamicPartitionWrite = other552.isDynamicPartitionWrite;
   __isset = other552.__isset;
   return *this;
 }
@@ -12864,6 +12885,7 @@ void LockComponent::printTo(std::ostream& out) const {
   out << ", " << "partitionname="; (__isset.partitionname ? (out << 
to_string(partitionname)) : (out << "<null>"));
   out << ", " << "operationType="; (__isset.operationType ? (out << 
to_string(operationType)) : (out << "<null>"));
   out << ", " << "isAcid="; (__isset.isAcid ? (out << to_string(isAcid)) : 
(out << "<null>"));
+  out << ", " << "isDynamicPartitionWrite="; (__isset.isDynamicPartitionWrite 
? (out << to_string(isDynamicPartitionWrite)) : (out << "<null>"));
   out << ")";
 }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/3252bed8/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h 
b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
index 303c298..1252a2d 100644
--- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
+++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
@@ -5179,11 +5179,12 @@ inline std::ostream& operator<<(std::ostream& out, 
const CommitTxnRequest& obj)
 }
 
 typedef struct _LockComponent__isset {
-  _LockComponent__isset() : tablename(false), partitionname(false), 
operationType(true), isAcid(true) {}
+  _LockComponent__isset() : tablename(false), partitionname(false), 
operationType(true), isAcid(true), isDynamicPartitionWrite(true) {}
   bool tablename :1;
   bool partitionname :1;
   bool operationType :1;
   bool isAcid :1;
+  bool isDynamicPartitionWrite :1;
 } _LockComponent__isset;
 
 class LockComponent {
@@ -5191,7 +5192,7 @@ class LockComponent {
 
   LockComponent(const LockComponent&);
   LockComponent& operator=(const LockComponent&);
-  LockComponent() : type((LockType::type)0), level((LockLevel::type)0), 
dbname(), tablename(), partitionname(), 
operationType((DataOperationType::type)5), isAcid(false) {
+  LockComponent() : type((LockType::type)0), level((LockLevel::type)0), 
dbname(), tablename(), partitionname(), 
operationType((DataOperationType::type)5), isAcid(false), 
isDynamicPartitionWrite(false) {
     operationType = (DataOperationType::type)5;
 
   }
@@ -5204,6 +5205,7 @@ class LockComponent {
   std::string partitionname;
   DataOperationType::type operationType;
   bool isAcid;
+  bool isDynamicPartitionWrite;
 
   _LockComponent__isset __isset;
 
@@ -5221,6 +5223,8 @@ class LockComponent {
 
   void __set_isAcid(const bool val);
 
+  void __set_isDynamicPartitionWrite(const bool val);
+
   bool operator == (const LockComponent & rhs) const
   {
     if (!(type == rhs.type))
@@ -5245,6 +5249,10 @@ class LockComponent {
       return false;
     else if (__isset.isAcid && !(isAcid == rhs.isAcid))
       return false;
+    if (__isset.isDynamicPartitionWrite != rhs.__isset.isDynamicPartitionWrite)
+      return false;
+    else if (__isset.isDynamicPartitionWrite && !(isDynamicPartitionWrite == 
rhs.isDynamicPartitionWrite))
+      return false;
     return true;
   }
   bool operator != (const LockComponent &rhs) const {

http://git-wip-us.apache.org/repos/asf/hive/blob/3252bed8/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
----------------------------------------------------------------------
diff --git 
a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
 
b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
index 26d1b76..d349508 100644
--- 
a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
+++ 
b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
@@ -45,6 +45,7 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
   private static final org.apache.thrift.protocol.TField 
PARTITIONNAME_FIELD_DESC = new 
org.apache.thrift.protocol.TField("partitionname", 
org.apache.thrift.protocol.TType.STRING, (short)5);
   private static final org.apache.thrift.protocol.TField 
OPERATION_TYPE_FIELD_DESC = new 
org.apache.thrift.protocol.TField("operationType", 
org.apache.thrift.protocol.TType.I32, (short)6);
   private static final org.apache.thrift.protocol.TField IS_ACID_FIELD_DESC = 
new org.apache.thrift.protocol.TField("isAcid", 
org.apache.thrift.protocol.TType.BOOL, (short)7);
+  private static final org.apache.thrift.protocol.TField 
IS_DYNAMIC_PARTITION_WRITE_FIELD_DESC = new 
org.apache.thrift.protocol.TField("isDynamicPartitionWrite", 
org.apache.thrift.protocol.TType.BOOL, (short)8);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = 
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -59,6 +60,7 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
   private String partitionname; // optional
   private DataOperationType operationType; // optional
   private boolean isAcid; // optional
+  private boolean isDynamicPartitionWrite; // 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 {
@@ -80,7 +82,8 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
      * @see DataOperationType
      */
     OPERATION_TYPE((short)6, "operationType"),
-    IS_ACID((short)7, "isAcid");
+    IS_ACID((short)7, "isAcid"),
+    IS_DYNAMIC_PARTITION_WRITE((short)8, "isDynamicPartitionWrite");
 
     private static final Map<String, _Fields> byName = new HashMap<String, 
_Fields>();
 
@@ -109,6 +112,8 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
           return OPERATION_TYPE;
         case 7: // IS_ACID
           return IS_ACID;
+        case 8: // IS_DYNAMIC_PARTITION_WRITE
+          return IS_DYNAMIC_PARTITION_WRITE;
         default:
           return null;
       }
@@ -150,8 +155,9 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
 
   // isset id assignments
   private static final int __ISACID_ISSET_ID = 0;
+  private static final int __ISDYNAMICPARTITIONWRITE_ISSET_ID = 1;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = 
{_Fields.TABLENAME,_Fields.PARTITIONNAME,_Fields.OPERATION_TYPE,_Fields.IS_ACID};
+  private static final _Fields optionals[] = 
{_Fields.TABLENAME,_Fields.PARTITIONNAME,_Fields.OPERATION_TYPE,_Fields.IS_ACID,_Fields.IS_DYNAMIC_PARTITION_WRITE};
   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);
@@ -169,6 +175,8 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
         new 
org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, 
DataOperationType.class)));
     tmpMap.put(_Fields.IS_ACID, new 
org.apache.thrift.meta_data.FieldMetaData("isAcid", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.IS_DYNAMIC_PARTITION_WRITE, new 
org.apache.thrift.meta_data.FieldMetaData("isDynamicPartitionWrite", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockComponent.class,
 metaDataMap);
   }
@@ -178,6 +186,8 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
 
     this.isAcid = false;
 
+    this.isDynamicPartitionWrite = false;
+
   }
 
   public LockComponent(
@@ -215,6 +225,7 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
       this.operationType = other.operationType;
     }
     this.isAcid = other.isAcid;
+    this.isDynamicPartitionWrite = other.isDynamicPartitionWrite;
   }
 
   public LockComponent deepCopy() {
@@ -232,6 +243,8 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
 
     this.isAcid = false;
 
+    this.isDynamicPartitionWrite = false;
+
   }
 
   /**
@@ -418,6 +431,28 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, 
__ISACID_ISSET_ID, value);
   }
 
+  public boolean isIsDynamicPartitionWrite() {
+    return this.isDynamicPartitionWrite;
+  }
+
+  public void setIsDynamicPartitionWrite(boolean isDynamicPartitionWrite) {
+    this.isDynamicPartitionWrite = isDynamicPartitionWrite;
+    setIsDynamicPartitionWriteIsSet(true);
+  }
+
+  public void unsetIsDynamicPartitionWrite() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, 
__ISDYNAMICPARTITIONWRITE_ISSET_ID);
+  }
+
+  /** Returns true if field isDynamicPartitionWrite is set (has been assigned 
a value) and false otherwise */
+  public boolean isSetIsDynamicPartitionWrite() {
+    return EncodingUtils.testBit(__isset_bitfield, 
__ISDYNAMICPARTITIONWRITE_ISSET_ID);
+  }
+
+  public void setIsDynamicPartitionWriteIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, 
__ISDYNAMICPARTITIONWRITE_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case TYPE:
@@ -476,6 +511,14 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
       }
       break;
 
+    case IS_DYNAMIC_PARTITION_WRITE:
+      if (value == null) {
+        unsetIsDynamicPartitionWrite();
+      } else {
+        setIsDynamicPartitionWrite((Boolean)value);
+      }
+      break;
+
     }
   }
 
@@ -502,6 +545,9 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
     case IS_ACID:
       return isIsAcid();
 
+    case IS_DYNAMIC_PARTITION_WRITE:
+      return isIsDynamicPartitionWrite();
+
     }
     throw new IllegalStateException();
   }
@@ -527,6 +573,8 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
       return isSetOperationType();
     case IS_ACID:
       return isSetIsAcid();
+    case IS_DYNAMIC_PARTITION_WRITE:
+      return isSetIsDynamicPartitionWrite();
     }
     throw new IllegalStateException();
   }
@@ -607,6 +655,15 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
         return false;
     }
 
+    boolean this_present_isDynamicPartitionWrite = true && 
this.isSetIsDynamicPartitionWrite();
+    boolean that_present_isDynamicPartitionWrite = true && 
that.isSetIsDynamicPartitionWrite();
+    if (this_present_isDynamicPartitionWrite || 
that_present_isDynamicPartitionWrite) {
+      if (!(this_present_isDynamicPartitionWrite && 
that_present_isDynamicPartitionWrite))
+        return false;
+      if (this.isDynamicPartitionWrite != that.isDynamicPartitionWrite)
+        return false;
+    }
+
     return true;
   }
 
@@ -649,6 +706,11 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
     if (present_isAcid)
       list.add(isAcid);
 
+    boolean present_isDynamicPartitionWrite = true && 
(isSetIsDynamicPartitionWrite());
+    list.add(present_isDynamicPartitionWrite);
+    if (present_isDynamicPartitionWrite)
+      list.add(isDynamicPartitionWrite);
+
     return list.hashCode();
   }
 
@@ -730,6 +792,16 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
         return lastComparison;
       }
     }
+    lastComparison = 
Boolean.valueOf(isSetIsDynamicPartitionWrite()).compareTo(other.isSetIsDynamicPartitionWrite());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetIsDynamicPartitionWrite()) {
+      lastComparison = 
org.apache.thrift.TBaseHelper.compareTo(this.isDynamicPartitionWrite, 
other.isDynamicPartitionWrite);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -809,6 +881,12 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
       sb.append(this.isAcid);
       first = false;
     }
+    if (isSetIsDynamicPartitionWrite()) {
+      if (!first) sb.append(", ");
+      sb.append("isDynamicPartitionWrite:");
+      sb.append(this.isDynamicPartitionWrite);
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -922,6 +1000,14 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
             }
             break;
+          case 8: // IS_DYNAMIC_PARTITION_WRITE
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.isDynamicPartitionWrite = iprot.readBool();
+              struct.setIsDynamicPartitionWriteIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
         }
@@ -976,6 +1062,11 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
         oprot.writeBool(struct.isAcid);
         oprot.writeFieldEnd();
       }
+      if (struct.isSetIsDynamicPartitionWrite()) {
+        oprot.writeFieldBegin(IS_DYNAMIC_PARTITION_WRITE_FIELD_DESC);
+        oprot.writeBool(struct.isDynamicPartitionWrite);
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -1009,7 +1100,10 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
       if (struct.isSetIsAcid()) {
         optionals.set(3);
       }
-      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetIsDynamicPartitionWrite()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
       if (struct.isSetTablename()) {
         oprot.writeString(struct.tablename);
       }
@@ -1022,6 +1116,9 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
       if (struct.isSetIsAcid()) {
         oprot.writeBool(struct.isAcid);
       }
+      if (struct.isSetIsDynamicPartitionWrite()) {
+        oprot.writeBool(struct.isDynamicPartitionWrite);
+      }
     }
 
     @Override
@@ -1033,7 +1130,7 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
       struct.setLevelIsSet(true);
       struct.dbname = iprot.readString();
       struct.setDbnameIsSet(true);
-      BitSet incoming = iprot.readBitSet(4);
+      BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
         struct.tablename = iprot.readString();
         struct.setTablenameIsSet(true);
@@ -1050,6 +1147,10 @@ public class LockComponent implements 
org.apache.thrift.TBase<LockComponent, Loc
         struct.isAcid = iprot.readBool();
         struct.setIsAcidIsSet(true);
       }
+      if (incoming.get(4)) {
+        struct.isDynamicPartitionWrite = iprot.readBool();
+        struct.setIsDynamicPartitionWriteIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/3252bed8/metastore/src/gen/thrift/gen-php/metastore/Types.php
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-php/metastore/Types.php 
b/metastore/src/gen/thrift/gen-php/metastore/Types.php
index 18895cf..61171c2 100644
--- a/metastore/src/gen/thrift/gen-php/metastore/Types.php
+++ b/metastore/src/gen/thrift/gen-php/metastore/Types.php
@@ -12719,6 +12719,10 @@ class LockComponent {
    * @var bool
    */
   public $isAcid = false;
+  /**
+   * @var bool
+   */
+  public $isDynamicPartitionWrite = false;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -12751,6 +12755,10 @@ class LockComponent {
           'var' => 'isAcid',
           'type' => TType::BOOL,
           ),
+        8 => array(
+          'var' => 'isDynamicPartitionWrite',
+          'type' => TType::BOOL,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -12775,6 +12783,9 @@ class LockComponent {
       if (isset($vals['isAcid'])) {
         $this->isAcid = $vals['isAcid'];
       }
+      if (isset($vals['isDynamicPartitionWrite'])) {
+        $this->isDynamicPartitionWrite = $vals['isDynamicPartitionWrite'];
+      }
     }
   }
 
@@ -12846,6 +12857,13 @@ class LockComponent {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 8:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isDynamicPartitionWrite);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -12894,6 +12912,11 @@ class LockComponent {
       $xfer += $output->writeBool($this->isAcid);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->isDynamicPartitionWrite !== null) {
+      $xfer += $output->writeFieldBegin('isDynamicPartitionWrite', 
TType::BOOL, 8);
+      $xfer += $output->writeBool($this->isDynamicPartitionWrite);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/hive/blob/3252bed8/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py 
b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
index 65a65dd..879fc99 100644
--- a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
+++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
@@ -8792,6 +8792,7 @@ class LockComponent:
    - partitionname
    - operationType
    - isAcid
+   - isDynamicPartitionWrite
   """
 
   thrift_spec = (
@@ -8803,9 +8804,10 @@ class LockComponent:
     (5, TType.STRING, 'partitionname', None, None, ), # 5
     (6, TType.I32, 'operationType', None,     5, ), # 6
     (7, TType.BOOL, 'isAcid', None, False, ), # 7
+    (8, TType.BOOL, 'isDynamicPartitionWrite', None, False, ), # 8
   )
 
-  def __init__(self, type=None, level=None, dbname=None, tablename=None, 
partitionname=None, operationType=thrift_spec[6][4], isAcid=thrift_spec[7][4],):
+  def __init__(self, type=None, level=None, dbname=None, tablename=None, 
partitionname=None, operationType=thrift_spec[6][4], isAcid=thrift_spec[7][4], 
isDynamicPartitionWrite=thrift_spec[8][4],):
     self.type = type
     self.level = level
     self.dbname = dbname
@@ -8813,6 +8815,7 @@ class LockComponent:
     self.partitionname = partitionname
     self.operationType = operationType
     self.isAcid = isAcid
+    self.isDynamicPartitionWrite = isDynamicPartitionWrite
 
   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:
@@ -8858,6 +8861,11 @@ class LockComponent:
           self.isAcid = iprot.readBool()
         else:
           iprot.skip(ftype)
+      elif fid == 8:
+        if ftype == TType.BOOL:
+          self.isDynamicPartitionWrite = iprot.readBool()
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -8896,6 +8904,10 @@ class LockComponent:
       oprot.writeFieldBegin('isAcid', TType.BOOL, 7)
       oprot.writeBool(self.isAcid)
       oprot.writeFieldEnd()
+    if self.isDynamicPartitionWrite is not None:
+      oprot.writeFieldBegin('isDynamicPartitionWrite', TType.BOOL, 8)
+      oprot.writeBool(self.isDynamicPartitionWrite)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -8918,6 +8930,7 @@ class LockComponent:
     value = (value * 31) ^ hash(self.partitionname)
     value = (value * 31) ^ hash(self.operationType)
     value = (value * 31) ^ hash(self.isAcid)
+    value = (value * 31) ^ hash(self.isDynamicPartitionWrite)
     return value
 
   def __repr__(self):

http://git-wip-us.apache.org/repos/asf/hive/blob/3252bed8/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb 
b/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
index 51adf50..cf64423 100644
--- a/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
+++ b/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
@@ -1967,6 +1967,7 @@ class LockComponent
   PARTITIONNAME = 5
   OPERATIONTYPE = 6
   ISACID = 7
+  ISDYNAMICPARTITIONWRITE = 8
 
   FIELDS = {
     TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => 
::LockType},
@@ -1975,7 +1976,8 @@ class LockComponent
     TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', 
:optional => true},
     PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 
'partitionname', :optional => true},
     OPERATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'operationType', 
:default =>     5, :optional => true, :enum_class => ::DataOperationType},
-    ISACID => {:type => ::Thrift::Types::BOOL, :name => 'isAcid', :default => 
false, :optional => true}
+    ISACID => {:type => ::Thrift::Types::BOOL, :name => 'isAcid', :default => 
false, :optional => true},
+    ISDYNAMICPARTITIONWRITE => {:type => ::Thrift::Types::BOOL, :name => 
'isDynamicPartitionWrite', :default => false, :optional => true}
   }
 
   def struct_fields; FIELDS; end

Reply via email to