hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [43/50] [abbrv] hive git commit: HIVE-14671 : merge master into hive-14535 (Wei Zheng)
Date Mon, 08 May 2017 22:18:00 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
----------------------------------------------------------------------
diff --cc metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
index f547651,8ee84af..1de9056
--- a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
+++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
@@@ -14947,6 -14782,171 +15014,171 @@@ class drop_table_with_environment_conte
    def __ne__(self, other):
      return not (self == other)
  
+ class truncate_table_args:
+   """
+   Attributes:
+    - dbName
+    - tableName
+    - partNames
+   """
+ 
+   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
+   )
+ 
+   def __init__(self, dbName=None, tableName=None, partNames=None,):
+     self.dbName = dbName
+     self.tableName = tableName
+     self.partNames = partNames
+ 
+   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 = []
 -          (_etype662, _size659) = iprot.readListBegin()
 -          for _i663 in xrange(_size659):
 -            _elem664 = iprot.readString()
 -            self.partNames.append(_elem664)
++          (_etype669, _size666) = iprot.readListBegin()
++          for _i670 in xrange(_size666):
++            _elem671 = iprot.readString()
++            self.partNames.append(_elem671)
+           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('truncate_table_args')
+     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 iter665 in self.partNames:
 -        oprot.writeString(iter665)
++      for iter672 in self.partNames:
++        oprot.writeString(iter672)
+       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.tableName)
+     value = (value * 31) ^ hash(self.partNames)
+     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 truncate_table_result:
+   """
+   Attributes:
+    - o1
+   """
+ 
+   thrift_spec = (
+     None, # 0
+     (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
+   )
+ 
+   def __init__(self, o1=None,):
+     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 == 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('truncate_table_result')
+     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.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_args:
    """
    Attributes:
@@@ -15053,10 -15053,10 +15285,10 @@@ class get_tables_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype669, _size666) = iprot.readListBegin()
--          for _i670 in xrange(_size666):
--            _elem671 = iprot.readString()
--            self.success.append(_elem671)
++          (_etype676, _size673) = iprot.readListBegin()
++          for _i677 in xrange(_size673):
++            _elem678 = iprot.readString()
++            self.success.append(_elem678)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -15079,8 -15079,8 +15311,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter672 in self.success:
--        oprot.writeString(iter672)
++      for iter679 in self.success:
++        oprot.writeString(iter679)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -15230,10 -15230,10 +15462,10 @@@ class get_tables_by_type_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype676, _size673) = iprot.readListBegin()
--          for _i677 in xrange(_size673):
--            _elem678 = iprot.readString()
--            self.success.append(_elem678)
++          (_etype683, _size680) = iprot.readListBegin()
++          for _i684 in xrange(_size680):
++            _elem685 = iprot.readString()
++            self.success.append(_elem685)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -15256,8 -15256,8 +15488,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter679 in self.success:
--        oprot.writeString(iter679)
++      for iter686 in self.success:
++        oprot.writeString(iter686)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -15330,10 -15330,10 +15562,10 @@@ class get_table_meta_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.tbl_types = []
--          (_etype683, _size680) = iprot.readListBegin()
--          for _i684 in xrange(_size680):
--            _elem685 = iprot.readString()
--            self.tbl_types.append(_elem685)
++          (_etype690, _size687) = iprot.readListBegin()
++          for _i691 in xrange(_size687):
++            _elem692 = iprot.readString()
++            self.tbl_types.append(_elem692)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -15358,8 -15358,8 +15590,8 @@@
      if self.tbl_types is not None:
        oprot.writeFieldBegin('tbl_types', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.tbl_types))
--      for iter686 in self.tbl_types:
--        oprot.writeString(iter686)
++      for iter693 in self.tbl_types:
++        oprot.writeString(iter693)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -15415,11 -15415,11 +15647,11 @@@ class get_table_meta_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype690, _size687) = iprot.readListBegin()
--          for _i691 in xrange(_size687):
--            _elem692 = TableMeta()
--            _elem692.read(iprot)
--            self.success.append(_elem692)
++          (_etype697, _size694) = iprot.readListBegin()
++          for _i698 in xrange(_size694):
++            _elem699 = TableMeta()
++            _elem699.read(iprot)
++            self.success.append(_elem699)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -15442,8 -15442,8 +15674,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter693 in self.success:
--        iter693.write(oprot)
++      for iter700 in self.success:
++        iter700.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -15567,10 -15567,10 +15799,10 @@@ class get_all_tables_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype697, _size694) = iprot.readListBegin()
--          for _i698 in xrange(_size694):
--            _elem699 = iprot.readString()
--            self.success.append(_elem699)
++          (_etype704, _size701) = iprot.readListBegin()
++          for _i705 in xrange(_size701):
++            _elem706 = iprot.readString()
++            self.success.append(_elem706)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -15593,8 -15593,8 +15825,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter700 in self.success:
--        oprot.writeString(iter700)
++      for iter707 in self.success:
++        oprot.writeString(iter707)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -15830,10 -15830,10 +16062,10 @@@ class get_table_objects_by_name_args
        elif fid == 2:
          if ftype == TType.LIST:
            self.tbl_names = []
--          (_etype704, _size701) = iprot.readListBegin()
--          for _i705 in xrange(_size701):
--            _elem706 = iprot.readString()
--            self.tbl_names.append(_elem706)
++          (_etype711, _size708) = iprot.readListBegin()
++          for _i712 in xrange(_size708):
++            _elem713 = iprot.readString()
++            self.tbl_names.append(_elem713)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -15854,8 -15854,8 +16086,8 @@@
      if self.tbl_names is not None:
        oprot.writeFieldBegin('tbl_names', TType.LIST, 2)
        oprot.writeListBegin(TType.STRING, len(self.tbl_names))
--      for iter707 in self.tbl_names:
--        oprot.writeString(iter707)
++      for iter714 in self.tbl_names:
++        oprot.writeString(iter714)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -15907,11 -15907,11 +16139,11 @@@ class get_table_objects_by_name_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype711, _size708) = iprot.readListBegin()
--          for _i712 in xrange(_size708):
--            _elem713 = Table()
--            _elem713.read(iprot)
--            self.success.append(_elem713)
++          (_etype718, _size715) = iprot.readListBegin()
++          for _i719 in xrange(_size715):
++            _elem720 = Table()
++            _elem720.read(iprot)
++            self.success.append(_elem720)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -15928,8 -15928,8 +16160,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter714 in self.success:
--        iter714.write(oprot)
++      for iter721 in self.success:
++        iter721.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -16412,10 -16412,10 +16644,10 @@@ class get_table_names_by_filter_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype718, _size715) = iprot.readListBegin()
--          for _i719 in xrange(_size715):
--            _elem720 = iprot.readString()
--            self.success.append(_elem720)
++          (_etype725, _size722) = iprot.readListBegin()
++          for _i726 in xrange(_size722):
++            _elem727 = iprot.readString()
++            self.success.append(_elem727)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -16450,8 -16450,8 +16682,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter721 in self.success:
--        oprot.writeString(iter721)
++      for iter728 in self.success:
++        oprot.writeString(iter728)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -17421,11 -17421,11 +17653,11 @@@ class add_partitions_args
        if fid == 1:
          if ftype == TType.LIST:
            self.new_parts = []
--          (_etype725, _size722) = iprot.readListBegin()
--          for _i726 in xrange(_size722):
--            _elem727 = Partition()
--            _elem727.read(iprot)
--            self.new_parts.append(_elem727)
++          (_etype732, _size729) = iprot.readListBegin()
++          for _i733 in xrange(_size729):
++            _elem734 = Partition()
++            _elem734.read(iprot)
++            self.new_parts.append(_elem734)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -17442,8 -17442,8 +17674,8 @@@
      if self.new_parts is not None:
        oprot.writeFieldBegin('new_parts', TType.LIST, 1)
        oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
--      for iter728 in self.new_parts:
--        iter728.write(oprot)
++      for iter735 in self.new_parts:
++        iter735.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -17601,11 -17601,11 +17833,11 @@@ class add_partitions_pspec_args
        if fid == 1:
          if ftype == TType.LIST:
            self.new_parts = []
--          (_etype732, _size729) = iprot.readListBegin()
--          for _i733 in xrange(_size729):
--            _elem734 = PartitionSpec()
--            _elem734.read(iprot)
--            self.new_parts.append(_elem734)
++          (_etype739, _size736) = iprot.readListBegin()
++          for _i740 in xrange(_size736):
++            _elem741 = PartitionSpec()
++            _elem741.read(iprot)
++            self.new_parts.append(_elem741)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -17622,8 -17622,8 +17854,8 @@@
      if self.new_parts is not None:
        oprot.writeFieldBegin('new_parts', TType.LIST, 1)
        oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
--      for iter735 in self.new_parts:
--        iter735.write(oprot)
++      for iter742 in self.new_parts:
++        iter742.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -17797,10 -17797,10 +18029,10 @@@ class append_partition_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype739, _size736) = iprot.readListBegin()
--          for _i740 in xrange(_size736):
--            _elem741 = iprot.readString()
--            self.part_vals.append(_elem741)
++          (_etype746, _size743) = iprot.readListBegin()
++          for _i747 in xrange(_size743):
++            _elem748 = iprot.readString()
++            self.part_vals.append(_elem748)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -17825,8 -17825,8 +18057,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter742 in self.part_vals:
--        oprot.writeString(iter742)
++      for iter749 in self.part_vals:
++        oprot.writeString(iter749)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -18179,10 -18179,10 +18411,10 @@@ class append_partition_with_environment
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype746, _size743) = iprot.readListBegin()
--          for _i747 in xrange(_size743):
--            _elem748 = iprot.readString()
--            self.part_vals.append(_elem748)
++          (_etype753, _size750) = iprot.readListBegin()
++          for _i754 in xrange(_size750):
++            _elem755 = iprot.readString()
++            self.part_vals.append(_elem755)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -18213,8 -18213,8 +18445,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter749 in self.part_vals:
--        oprot.writeString(iter749)
++      for iter756 in self.part_vals:
++        oprot.writeString(iter756)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.environment_context is not None:
@@@ -18809,10 -18809,10 +19041,10 @@@ class drop_partition_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype753, _size750) = iprot.readListBegin()
--          for _i754 in xrange(_size750):
--            _elem755 = iprot.readString()
--            self.part_vals.append(_elem755)
++          (_etype760, _size757) = iprot.readListBegin()
++          for _i761 in xrange(_size757):
++            _elem762 = iprot.readString()
++            self.part_vals.append(_elem762)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -18842,8 -18842,8 +19074,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter756 in self.part_vals:
--        oprot.writeString(iter756)
++      for iter763 in self.part_vals:
++        oprot.writeString(iter763)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.deleteData is not None:
@@@ -19016,10 -19016,10 +19248,10 @@@ class drop_partition_with_environment_c
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype760, _size757) = iprot.readListBegin()
--          for _i761 in xrange(_size757):
--            _elem762 = iprot.readString()
--            self.part_vals.append(_elem762)
++          (_etype767, _size764) = iprot.readListBegin()
++          for _i768 in xrange(_size764):
++            _elem769 = iprot.readString()
++            self.part_vals.append(_elem769)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -19055,8 -19055,8 +19287,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter763 in self.part_vals:
--        oprot.writeString(iter763)
++      for iter770 in self.part_vals:
++        oprot.writeString(iter770)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.deleteData is not None:
@@@ -19793,10 -19793,10 +20025,10 @@@ class get_partition_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype767, _size764) = iprot.readListBegin()
--          for _i768 in xrange(_size764):
--            _elem769 = iprot.readString()
--            self.part_vals.append(_elem769)
++          (_etype774, _size771) = iprot.readListBegin()
++          for _i775 in xrange(_size771):
++            _elem776 = iprot.readString()
++            self.part_vals.append(_elem776)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -19821,8 -19821,8 +20053,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter770 in self.part_vals:
--        oprot.writeString(iter770)
++      for iter777 in self.part_vals:
++        oprot.writeString(iter777)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -19981,11 -19981,11 +20213,11 @@@ class exchange_partition_args
        if fid == 1:
          if ftype == TType.MAP:
            self.partitionSpecs = {}
--          (_ktype772, _vtype773, _size771 ) = iprot.readMapBegin()
--          for _i775 in xrange(_size771):
--            _key776 = iprot.readString()
--            _val777 = iprot.readString()
--            self.partitionSpecs[_key776] = _val777
++          (_ktype779, _vtype780, _size778 ) = iprot.readMapBegin()
++          for _i782 in xrange(_size778):
++            _key783 = iprot.readString()
++            _val784 = iprot.readString()
++            self.partitionSpecs[_key783] = _val784
            iprot.readMapEnd()
          else:
            iprot.skip(ftype)
@@@ -20022,9 -20022,9 +20254,9 @@@
      if self.partitionSpecs is not None:
        oprot.writeFieldBegin('partitionSpecs', TType.MAP, 1)
        oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs))
--      for kiter778,viter779 in self.partitionSpecs.items():
--        oprot.writeString(kiter778)
--        oprot.writeString(viter779)
++      for kiter785,viter786 in self.partitionSpecs.items():
++        oprot.writeString(kiter785)
++        oprot.writeString(viter786)
        oprot.writeMapEnd()
        oprot.writeFieldEnd()
      if self.source_db is not None:
@@@ -20229,11 -20229,11 +20461,11 @@@ class exchange_partitions_args
        if fid == 1:
          if ftype == TType.MAP:
            self.partitionSpecs = {}
--          (_ktype781, _vtype782, _size780 ) = iprot.readMapBegin()
--          for _i784 in xrange(_size780):
--            _key785 = iprot.readString()
--            _val786 = iprot.readString()
--            self.partitionSpecs[_key785] = _val786
++          (_ktype788, _vtype789, _size787 ) = iprot.readMapBegin()
++          for _i791 in xrange(_size787):
++            _key792 = iprot.readString()
++            _val793 = iprot.readString()
++            self.partitionSpecs[_key792] = _val793
            iprot.readMapEnd()
          else:
            iprot.skip(ftype)
@@@ -20270,9 -20270,9 +20502,9 @@@
      if self.partitionSpecs is not None:
        oprot.writeFieldBegin('partitionSpecs', TType.MAP, 1)
        oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.partitionSpecs))
--      for kiter787,viter788 in self.partitionSpecs.items():
--        oprot.writeString(kiter787)
--        oprot.writeString(viter788)
++      for kiter794,viter795 in self.partitionSpecs.items():
++        oprot.writeString(kiter794)
++        oprot.writeString(viter795)
        oprot.writeMapEnd()
        oprot.writeFieldEnd()
      if self.source_db is not None:
@@@ -20355,11 -20355,11 +20587,11 @@@ class exchange_partitions_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype792, _size789) = iprot.readListBegin()
--          for _i793 in xrange(_size789):
--            _elem794 = Partition()
--            _elem794.read(iprot)
--            self.success.append(_elem794)
++          (_etype799, _size796) = iprot.readListBegin()
++          for _i800 in xrange(_size796):
++            _elem801 = Partition()
++            _elem801.read(iprot)
++            self.success.append(_elem801)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -20400,8 -20400,8 +20632,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter795 in self.success:
--        iter795.write(oprot)
++      for iter802 in self.success:
++        iter802.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -20495,10 -20495,10 +20727,10 @@@ class get_partition_with_auth_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype799, _size796) = iprot.readListBegin()
--          for _i800 in xrange(_size796):
--            _elem801 = iprot.readString()
--            self.part_vals.append(_elem801)
++          (_etype806, _size803) = iprot.readListBegin()
++          for _i807 in xrange(_size803):
++            _elem808 = iprot.readString()
++            self.part_vals.append(_elem808)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -20510,10 -20510,10 +20742,10 @@@
        elif fid == 5:
          if ftype == TType.LIST:
            self.group_names = []
--          (_etype805, _size802) = iprot.readListBegin()
--          for _i806 in xrange(_size802):
--            _elem807 = iprot.readString()
--            self.group_names.append(_elem807)
++          (_etype812, _size809) = iprot.readListBegin()
++          for _i813 in xrange(_size809):
++            _elem814 = iprot.readString()
++            self.group_names.append(_elem814)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -20538,8 -20538,8 +20770,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter808 in self.part_vals:
--        oprot.writeString(iter808)
++      for iter815 in self.part_vals:
++        oprot.writeString(iter815)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.user_name is not None:
@@@ -20549,8 -20549,8 +20781,8 @@@
      if self.group_names is not None:
        oprot.writeFieldBegin('group_names', TType.LIST, 5)
        oprot.writeListBegin(TType.STRING, len(self.group_names))
--      for iter809 in self.group_names:
--        oprot.writeString(iter809)
++      for iter816 in self.group_names:
++        oprot.writeString(iter816)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -20979,11 -20979,11 +21211,11 @@@ class get_partitions_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype813, _size810) = iprot.readListBegin()
--          for _i814 in xrange(_size810):
--            _elem815 = Partition()
--            _elem815.read(iprot)
--            self.success.append(_elem815)
++          (_etype820, _size817) = iprot.readListBegin()
++          for _i821 in xrange(_size817):
++            _elem822 = Partition()
++            _elem822.read(iprot)
++            self.success.append(_elem822)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21012,8 -21012,8 +21244,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter816 in self.success:
--        iter816.write(oprot)
++      for iter823 in self.success:
++        iter823.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -21107,10 -21107,10 +21339,10 @@@ class get_partitions_with_auth_args
        elif fid == 5:
          if ftype == TType.LIST:
            self.group_names = []
--          (_etype820, _size817) = iprot.readListBegin()
--          for _i821 in xrange(_size817):
--            _elem822 = iprot.readString()
--            self.group_names.append(_elem822)
++          (_etype827, _size824) = iprot.readListBegin()
++          for _i828 in xrange(_size824):
++            _elem829 = iprot.readString()
++            self.group_names.append(_elem829)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21143,8 -21143,8 +21375,8 @@@
      if self.group_names is not None:
        oprot.writeFieldBegin('group_names', TType.LIST, 5)
        oprot.writeListBegin(TType.STRING, len(self.group_names))
--      for iter823 in self.group_names:
--        oprot.writeString(iter823)
++      for iter830 in self.group_names:
++        oprot.writeString(iter830)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -21205,11 -21205,11 +21437,11 @@@ class get_partitions_with_auth_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype827, _size824) = iprot.readListBegin()
--          for _i828 in xrange(_size824):
--            _elem829 = Partition()
--            _elem829.read(iprot)
--            self.success.append(_elem829)
++          (_etype834, _size831) = iprot.readListBegin()
++          for _i835 in xrange(_size831):
++            _elem836 = Partition()
++            _elem836.read(iprot)
++            self.success.append(_elem836)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21238,8 -21238,8 +21470,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter830 in self.success:
--        iter830.write(oprot)
++      for iter837 in self.success:
++        iter837.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -21397,11 -21397,11 +21629,11 @@@ class get_partitions_pspec_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype834, _size831) = iprot.readListBegin()
--          for _i835 in xrange(_size831):
--            _elem836 = PartitionSpec()
--            _elem836.read(iprot)
--            self.success.append(_elem836)
++          (_etype841, _size838) = iprot.readListBegin()
++          for _i842 in xrange(_size838):
++            _elem843 = PartitionSpec()
++            _elem843.read(iprot)
++            self.success.append(_elem843)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21430,8 -21430,8 +21662,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter837 in self.success:
--        iter837.write(oprot)
++      for iter844 in self.success:
++        iter844.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -21586,10 -21586,10 +21818,10 @@@ class get_partition_names_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype841, _size838) = iprot.readListBegin()
--          for _i842 in xrange(_size838):
--            _elem843 = iprot.readString()
--            self.success.append(_elem843)
++          (_etype848, _size845) = iprot.readListBegin()
++          for _i849 in xrange(_size845):
++            _elem850 = iprot.readString()
++            self.success.append(_elem850)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21612,8 -21612,8 +21844,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter844 in self.success:
--        oprot.writeString(iter844)
++      for iter851 in self.success:
++        oprot.writeString(iter851)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o2 is not None:
@@@ -21689,10 -21689,10 +21921,10 @@@ class get_partitions_ps_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype848, _size845) = iprot.readListBegin()
--          for _i849 in xrange(_size845):
--            _elem850 = iprot.readString()
--            self.part_vals.append(_elem850)
++          (_etype855, _size852) = iprot.readListBegin()
++          for _i856 in xrange(_size852):
++            _elem857 = iprot.readString()
++            self.part_vals.append(_elem857)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21722,8 -21722,8 +21954,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter851 in self.part_vals:
--        oprot.writeString(iter851)
++      for iter858 in self.part_vals:
++        oprot.writeString(iter858)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.max_parts is not None:
@@@ -21787,11 -21787,11 +22019,11 @@@ class get_partitions_ps_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype855, _size852) = iprot.readListBegin()
--          for _i856 in xrange(_size852):
--            _elem857 = Partition()
--            _elem857.read(iprot)
--            self.success.append(_elem857)
++          (_etype862, _size859) = iprot.readListBegin()
++          for _i863 in xrange(_size859):
++            _elem864 = Partition()
++            _elem864.read(iprot)
++            self.success.append(_elem864)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21820,8 -21820,8 +22052,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter858 in self.success:
--        iter858.write(oprot)
++      for iter865 in self.success:
++        iter865.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -21908,10 -21908,10 +22140,10 @@@ class get_partitions_ps_with_auth_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype862, _size859) = iprot.readListBegin()
--          for _i863 in xrange(_size859):
--            _elem864 = iprot.readString()
--            self.part_vals.append(_elem864)
++          (_etype869, _size866) = iprot.readListBegin()
++          for _i870 in xrange(_size866):
++            _elem871 = iprot.readString()
++            self.part_vals.append(_elem871)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21928,10 -21928,10 +22160,10 @@@
        elif fid == 6:
          if ftype == TType.LIST:
            self.group_names = []
--          (_etype868, _size865) = iprot.readListBegin()
--          for _i869 in xrange(_size865):
--            _elem870 = iprot.readString()
--            self.group_names.append(_elem870)
++          (_etype875, _size872) = iprot.readListBegin()
++          for _i876 in xrange(_size872):
++            _elem877 = iprot.readString()
++            self.group_names.append(_elem877)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -21956,8 -21956,8 +22188,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter871 in self.part_vals:
--        oprot.writeString(iter871)
++      for iter878 in self.part_vals:
++        oprot.writeString(iter878)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.max_parts is not None:
@@@ -21971,8 -21971,8 +22203,8 @@@
      if self.group_names is not None:
        oprot.writeFieldBegin('group_names', TType.LIST, 6)
        oprot.writeListBegin(TType.STRING, len(self.group_names))
--      for iter872 in self.group_names:
--        oprot.writeString(iter872)
++      for iter879 in self.group_names:
++        oprot.writeString(iter879)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -22034,11 -22034,11 +22266,11 @@@ class get_partitions_ps_with_auth_resul
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype876, _size873) = iprot.readListBegin()
--          for _i877 in xrange(_size873):
--            _elem878 = Partition()
--            _elem878.read(iprot)
--            self.success.append(_elem878)
++          (_etype883, _size880) = iprot.readListBegin()
++          for _i884 in xrange(_size880):
++            _elem885 = Partition()
++            _elem885.read(iprot)
++            self.success.append(_elem885)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -22067,8 -22067,8 +22299,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter879 in self.success:
--        iter879.write(oprot)
++      for iter886 in self.success:
++        iter886.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -22149,10 -22149,10 +22381,10 @@@ class get_partition_names_ps_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype883, _size880) = iprot.readListBegin()
--          for _i884 in xrange(_size880):
--            _elem885 = iprot.readString()
--            self.part_vals.append(_elem885)
++          (_etype890, _size887) = iprot.readListBegin()
++          for _i891 in xrange(_size887):
++            _elem892 = iprot.readString()
++            self.part_vals.append(_elem892)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -22182,8 -22182,8 +22414,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter886 in self.part_vals:
--        oprot.writeString(iter886)
++      for iter893 in self.part_vals:
++        oprot.writeString(iter893)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.max_parts is not None:
@@@ -22247,10 -22247,10 +22479,10 @@@ class get_partition_names_ps_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype890, _size887) = iprot.readListBegin()
--          for _i891 in xrange(_size887):
--            _elem892 = iprot.readString()
--            self.success.append(_elem892)
++          (_etype897, _size894) = iprot.readListBegin()
++          for _i898 in xrange(_size894):
++            _elem899 = iprot.readString()
++            self.success.append(_elem899)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -22279,8 -22279,8 +22511,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter893 in self.success:
--        oprot.writeString(iter893)
++      for iter900 in self.success:
++        oprot.writeString(iter900)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -22451,11 -22451,11 +22683,11 @@@ class get_partitions_by_filter_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype897, _size894) = iprot.readListBegin()
--          for _i898 in xrange(_size894):
--            _elem899 = Partition()
--            _elem899.read(iprot)
--            self.success.append(_elem899)
++          (_etype904, _size901) = iprot.readListBegin()
++          for _i905 in xrange(_size901):
++            _elem906 = Partition()
++            _elem906.read(iprot)
++            self.success.append(_elem906)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -22484,8 -22484,8 +22716,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter900 in self.success:
--        iter900.write(oprot)
++      for iter907 in self.success:
++        iter907.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -22656,11 -22656,11 +22888,11 @@@ class get_part_specs_by_filter_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype904, _size901) = iprot.readListBegin()
--          for _i905 in xrange(_size901):
--            _elem906 = PartitionSpec()
--            _elem906.read(iprot)
--            self.success.append(_elem906)
++          (_etype911, _size908) = iprot.readListBegin()
++          for _i912 in xrange(_size908):
++            _elem913 = PartitionSpec()
++            _elem913.read(iprot)
++            self.success.append(_elem913)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -22689,8 -22689,8 +22921,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter907 in self.success:
--        iter907.write(oprot)
++      for iter914 in self.success:
++        iter914.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -23110,10 -23110,10 +23342,10 @@@ class get_partitions_by_names_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.names = []
--          (_etype911, _size908) = iprot.readListBegin()
--          for _i912 in xrange(_size908):
--            _elem913 = iprot.readString()
--            self.names.append(_elem913)
++          (_etype918, _size915) = iprot.readListBegin()
++          for _i919 in xrange(_size915):
++            _elem920 = iprot.readString()
++            self.names.append(_elem920)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -23138,8 -23138,8 +23370,8 @@@
      if self.names is not None:
        oprot.writeFieldBegin('names', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.names))
--      for iter914 in self.names:
--        oprot.writeString(iter914)
++      for iter921 in self.names:
++        oprot.writeString(iter921)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -23198,11 -23198,11 +23430,11 @@@ class get_partitions_by_names_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype918, _size915) = iprot.readListBegin()
--          for _i919 in xrange(_size915):
--            _elem920 = Partition()
--            _elem920.read(iprot)
--            self.success.append(_elem920)
++          (_etype925, _size922) = iprot.readListBegin()
++          for _i926 in xrange(_size922):
++            _elem927 = Partition()
++            _elem927.read(iprot)
++            self.success.append(_elem927)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -23231,8 -23231,8 +23463,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter921 in self.success:
--        iter921.write(oprot)
++      for iter928 in self.success:
++        iter928.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -23482,11 -23482,11 +23714,11 @@@ class alter_partitions_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.new_parts = []
--          (_etype925, _size922) = iprot.readListBegin()
--          for _i926 in xrange(_size922):
--            _elem927 = Partition()
--            _elem927.read(iprot)
--            self.new_parts.append(_elem927)
++          (_etype932, _size929) = iprot.readListBegin()
++          for _i933 in xrange(_size929):
++            _elem934 = Partition()
++            _elem934.read(iprot)
++            self.new_parts.append(_elem934)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -23511,8 -23511,8 +23743,8 @@@
      if self.new_parts is not None:
        oprot.writeFieldBegin('new_parts', TType.LIST, 3)
        oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
--      for iter928 in self.new_parts:
--        iter928.write(oprot)
++      for iter935 in self.new_parts:
++        iter935.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -23665,11 -23665,11 +23897,11 @@@ class alter_partitions_with_environment
        elif fid == 3:
          if ftype == TType.LIST:
            self.new_parts = []
--          (_etype932, _size929) = iprot.readListBegin()
--          for _i933 in xrange(_size929):
--            _elem934 = Partition()
--            _elem934.read(iprot)
--            self.new_parts.append(_elem934)
++          (_etype939, _size936) = iprot.readListBegin()
++          for _i940 in xrange(_size936):
++            _elem941 = Partition()
++            _elem941.read(iprot)
++            self.new_parts.append(_elem941)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -23700,8 -23700,8 +23932,8 @@@
      if self.new_parts is not None:
        oprot.writeFieldBegin('new_parts', TType.LIST, 3)
        oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
--      for iter935 in self.new_parts:
--        iter935.write(oprot)
++      for iter942 in self.new_parts:
++        iter942.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.environment_context is not None:
@@@ -24045,10 -24045,10 +24277,10 @@@ class rename_partition_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype939, _size936) = iprot.readListBegin()
--          for _i940 in xrange(_size936):
--            _elem941 = iprot.readString()
--            self.part_vals.append(_elem941)
++          (_etype946, _size943) = iprot.readListBegin()
++          for _i947 in xrange(_size943):
++            _elem948 = iprot.readString()
++            self.part_vals.append(_elem948)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -24079,8 -24079,8 +24311,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter942 in self.part_vals:
--        oprot.writeString(iter942)
++      for iter949 in self.part_vals:
++        oprot.writeString(iter949)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.new_part is not None:
@@@ -24222,10 -24222,10 +24454,10 @@@ class partition_name_has_valid_characte
        if fid == 1:
          if ftype == TType.LIST:
            self.part_vals = []
--          (_etype946, _size943) = iprot.readListBegin()
--          for _i947 in xrange(_size943):
--            _elem948 = iprot.readString()
--            self.part_vals.append(_elem948)
++          (_etype953, _size950) = iprot.readListBegin()
++          for _i954 in xrange(_size950):
++            _elem955 = iprot.readString()
++            self.part_vals.append(_elem955)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -24247,8 -24247,8 +24479,8 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.LIST, 1)
        oprot.writeListBegin(TType.STRING, len(self.part_vals))
--      for iter949 in self.part_vals:
--        oprot.writeString(iter949)
++      for iter956 in self.part_vals:
++        oprot.writeString(iter956)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.throw_exception is not None:
@@@ -24606,10 -24606,10 +24838,10 @@@ class partition_name_to_vals_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype953, _size950) = iprot.readListBegin()
--          for _i954 in xrange(_size950):
--            _elem955 = iprot.readString()
--            self.success.append(_elem955)
++          (_etype960, _size957) = iprot.readListBegin()
++          for _i961 in xrange(_size957):
++            _elem962 = iprot.readString()
++            self.success.append(_elem962)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -24632,8 -24632,8 +24864,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter956 in self.success:
--        oprot.writeString(iter956)
++      for iter963 in self.success:
++        oprot.writeString(iter963)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -24757,11 -24757,11 +24989,11 @@@ class partition_name_to_spec_result
        if fid == 0:
          if ftype == TType.MAP:
            self.success = {}
--          (_ktype958, _vtype959, _size957 ) = iprot.readMapBegin()
--          for _i961 in xrange(_size957):
--            _key962 = iprot.readString()
--            _val963 = iprot.readString()
--            self.success[_key962] = _val963
++          (_ktype965, _vtype966, _size964 ) = iprot.readMapBegin()
++          for _i968 in xrange(_size964):
++            _key969 = iprot.readString()
++            _val970 = iprot.readString()
++            self.success[_key969] = _val970
            iprot.readMapEnd()
          else:
            iprot.skip(ftype)
@@@ -24784,9 -24784,9 +25016,9 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.MAP, 0)
        oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
--      for kiter964,viter965 in self.success.items():
--        oprot.writeString(kiter964)
--        oprot.writeString(viter965)
++      for kiter971,viter972 in self.success.items():
++        oprot.writeString(kiter971)
++        oprot.writeString(viter972)
        oprot.writeMapEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -24862,11 -24862,11 +25094,11 @@@ class markPartitionForEvent_args
        elif fid == 3:
          if ftype == TType.MAP:
            self.part_vals = {}
--          (_ktype967, _vtype968, _size966 ) = iprot.readMapBegin()
--          for _i970 in xrange(_size966):
--            _key971 = iprot.readString()
--            _val972 = iprot.readString()
--            self.part_vals[_key971] = _val972
++          (_ktype974, _vtype975, _size973 ) = iprot.readMapBegin()
++          for _i977 in xrange(_size973):
++            _key978 = iprot.readString()
++            _val979 = iprot.readString()
++            self.part_vals[_key978] = _val979
            iprot.readMapEnd()
          else:
            iprot.skip(ftype)
@@@ -24896,9 -24896,9 +25128,9 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.MAP, 3)
        oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals))
--      for kiter973,viter974 in self.part_vals.items():
--        oprot.writeString(kiter973)
--        oprot.writeString(viter974)
++      for kiter980,viter981 in self.part_vals.items():
++        oprot.writeString(kiter980)
++        oprot.writeString(viter981)
        oprot.writeMapEnd()
        oprot.writeFieldEnd()
      if self.eventType is not None:
@@@ -25112,11 -25112,11 +25344,11 @@@ class isPartitionMarkedForEvent_args
        elif fid == 3:
          if ftype == TType.MAP:
            self.part_vals = {}
--          (_ktype976, _vtype977, _size975 ) = iprot.readMapBegin()
--          for _i979 in xrange(_size975):
--            _key980 = iprot.readString()
--            _val981 = iprot.readString()
--            self.part_vals[_key980] = _val981
++          (_ktype983, _vtype984, _size982 ) = iprot.readMapBegin()
++          for _i986 in xrange(_size982):
++            _key987 = iprot.readString()
++            _val988 = iprot.readString()
++            self.part_vals[_key987] = _val988
            iprot.readMapEnd()
          else:
            iprot.skip(ftype)
@@@ -25146,9 -25146,9 +25378,9 @@@
      if self.part_vals is not None:
        oprot.writeFieldBegin('part_vals', TType.MAP, 3)
        oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals))
--      for kiter982,viter983 in self.part_vals.items():
--        oprot.writeString(kiter982)
--        oprot.writeString(viter983)
++      for kiter989,viter990 in self.part_vals.items():
++        oprot.writeString(kiter989)
++        oprot.writeString(viter990)
        oprot.writeMapEnd()
        oprot.writeFieldEnd()
      if self.eventType is not None:
@@@ -26203,11 -26203,11 +26435,11 @@@ class get_indexes_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype987, _size984) = iprot.readListBegin()
--          for _i988 in xrange(_size984):
--            _elem989 = Index()
--            _elem989.read(iprot)
--            self.success.append(_elem989)
++          (_etype994, _size991) = iprot.readListBegin()
++          for _i995 in xrange(_size991):
++            _elem996 = Index()
++            _elem996.read(iprot)
++            self.success.append(_elem996)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -26236,8 -26236,8 +26468,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter990 in self.success:
--        iter990.write(oprot)
++      for iter997 in self.success:
++        iter997.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -26392,10 -26392,10 +26624,10 @@@ class get_index_names_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype994, _size991) = iprot.readListBegin()
--          for _i995 in xrange(_size991):
--            _elem996 = iprot.readString()
--            self.success.append(_elem996)
++          (_etype1001, _size998) = iprot.readListBegin()
++          for _i1002 in xrange(_size998):
++            _elem1003 = iprot.readString()
++            self.success.append(_elem1003)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -26418,8 -26418,8 +26650,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter997 in self.success:
--        oprot.writeString(iter997)
++      for iter1004 in self.success:
++        oprot.writeString(iter1004)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o2 is not None:
@@@ -29285,10 -29285,10 +29517,10 @@@ class get_functions_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype1001, _size998) = iprot.readListBegin()
--          for _i1002 in xrange(_size998):
--            _elem1003 = iprot.readString()
--            self.success.append(_elem1003)
++          (_etype1008, _size1005) = iprot.readListBegin()
++          for _i1009 in xrange(_size1005):
++            _elem1010 = iprot.readString()
++            self.success.append(_elem1010)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -29311,8 -29311,8 +29543,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter1004 in self.success:
--        oprot.writeString(iter1004)
++      for iter1011 in self.success:
++        oprot.writeString(iter1011)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -30000,10 -30000,10 +30232,10 @@@ class get_role_names_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype1008, _size1005) = iprot.readListBegin()
--          for _i1009 in xrange(_size1005):
--            _elem1010 = iprot.readString()
--            self.success.append(_elem1010)
++          (_etype1015, _size1012) = iprot.readListBegin()
++          for _i1016 in xrange(_size1012):
++            _elem1017 = iprot.readString()
++            self.success.append(_elem1017)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -30026,8 -30026,8 +30258,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter1011 in self.success:
--        oprot.writeString(iter1011)
++      for iter1018 in self.success:
++        oprot.writeString(iter1018)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -30541,11 -30541,11 +30773,11 @@@ class list_roles_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype1015, _size1012) = iprot.readListBegin()
--          for _i1016 in xrange(_size1012):
--            _elem1017 = Role()
--            _elem1017.read(iprot)
--            self.success.append(_elem1017)
++          (_etype1022, _size1019) = iprot.readListBegin()
++          for _i1023 in xrange(_size1019):
++            _elem1024 = Role()
++            _elem1024.read(iprot)
++            self.success.append(_elem1024)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -30568,8 -30568,8 +30800,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter1018 in self.success:
--        iter1018.write(oprot)
++      for iter1025 in self.success:
++        iter1025.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -31078,10 -31078,10 +31310,10 @@@ class get_privilege_set_args
        elif fid == 3:
          if ftype == TType.LIST:
            self.group_names = []
--          (_etype1022, _size1019) = iprot.readListBegin()
--          for _i1023 in xrange(_size1019):
--            _elem1024 = iprot.readString()
--            self.group_names.append(_elem1024)
++          (_etype1029, _size1026) = iprot.readListBegin()
++          for _i1030 in xrange(_size1026):
++            _elem1031 = iprot.readString()
++            self.group_names.append(_elem1031)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -31106,8 -31106,8 +31338,8 @@@
      if self.group_names is not None:
        oprot.writeFieldBegin('group_names', TType.LIST, 3)
        oprot.writeListBegin(TType.STRING, len(self.group_names))
--      for iter1025 in self.group_names:
--        oprot.writeString(iter1025)
++      for iter1032 in self.group_names:
++        oprot.writeString(iter1032)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -31334,11 -31334,11 +31566,11 @@@ class list_privileges_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype1029, _size1026) = iprot.readListBegin()
--          for _i1030 in xrange(_size1026):
--            _elem1031 = HiveObjectPrivilege()
--            _elem1031.read(iprot)
--            self.success.append(_elem1031)
++          (_etype1036, _size1033) = iprot.readListBegin()
++          for _i1037 in xrange(_size1033):
++            _elem1038 = HiveObjectPrivilege()
++            _elem1038.read(iprot)
++            self.success.append(_elem1038)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -31361,8 -31361,8 +31593,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRUCT, len(self.success))
--      for iter1032 in self.success:
--        iter1032.write(oprot)
++      for iter1039 in self.success:
++        iter1039.write(oprot)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -31860,10 -31860,10 +32092,10 @@@ class set_ugi_args
        elif fid == 2:
          if ftype == TType.LIST:
            self.group_names = []
--          (_etype1036, _size1033) = iprot.readListBegin()
--          for _i1037 in xrange(_size1033):
--            _elem1038 = iprot.readString()
--            self.group_names.append(_elem1038)
++          (_etype1043, _size1040) = iprot.readListBegin()
++          for _i1044 in xrange(_size1040):
++            _elem1045 = iprot.readString()
++            self.group_names.append(_elem1045)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -31884,8 -31884,8 +32116,8 @@@
      if self.group_names is not None:
        oprot.writeFieldBegin('group_names', TType.LIST, 2)
        oprot.writeListBegin(TType.STRING, len(self.group_names))
--      for iter1039 in self.group_names:
--        oprot.writeString(iter1039)
++      for iter1046 in self.group_names:
++        oprot.writeString(iter1046)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -31940,10 -31940,10 +32172,10 @@@ class set_ugi_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype1043, _size1040) = iprot.readListBegin()
--          for _i1044 in xrange(_size1040):
--            _elem1045 = iprot.readString()
--            self.success.append(_elem1045)
++          (_etype1050, _size1047) = iprot.readListBegin()
++          for _i1051 in xrange(_size1047):
++            _elem1052 = iprot.readString()
++            self.success.append(_elem1052)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -31966,8 -31966,8 +32198,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter1046 in self.success:
--        oprot.writeString(iter1046)
++      for iter1053 in self.success:
++        oprot.writeString(iter1053)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      if self.o1 is not None:
@@@ -32899,10 -32899,10 +33131,10 @@@ class get_all_token_identifiers_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype1050, _size1047) = iprot.readListBegin()
--          for _i1051 in xrange(_size1047):
--            _elem1052 = iprot.readString()
--            self.success.append(_elem1052)
++          (_etype1057, _size1054) = iprot.readListBegin()
++          for _i1058 in xrange(_size1054):
++            _elem1059 = iprot.readString()
++            self.success.append(_elem1059)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -32919,8 -32919,8 +33151,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter1053 in self.success:
--        oprot.writeString(iter1053)
++      for iter1060 in self.success:
++        oprot.writeString(iter1060)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()
@@@ -33447,10 -33447,10 +33679,10 @@@ class get_master_keys_result
        if fid == 0:
          if ftype == TType.LIST:
            self.success = []
--          (_etype1057, _size1054) = iprot.readListBegin()
--          for _i1058 in xrange(_size1054):
--            _elem1059 = iprot.readString()
--            self.success.append(_elem1059)
++          (_etype1064, _size1061) = iprot.readListBegin()
++          for _i1065 in xrange(_size1061):
++            _elem1066 = iprot.readString()
++            self.success.append(_elem1066)
            iprot.readListEnd()
          else:
            iprot.skip(ftype)
@@@ -33467,8 -33467,8 +33699,8 @@@
      if self.success is not None:
        oprot.writeFieldBegin('success', TType.LIST, 0)
        oprot.writeListBegin(TType.STRING, len(self.success))
--      for iter1060 in self.success:
--        oprot.writeString(iter1060)
++      for iter1067 in self.success:
++        oprot.writeString(iter1067)
        oprot.writeListEnd()
        oprot.writeFieldEnd()
      oprot.writeFieldStop()

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
----------------------------------------------------------------------
diff --cc metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index 915bce3,cbcfc72..ff3505a
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@@ -78,7 -81,7 +82,8 @@@ import org.apache.hadoop.hive.common.me
  import org.apache.hadoop.hive.common.metrics.common.MetricsVariable;
  import org.apache.hadoop.hive.conf.HiveConf;
  import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
+ import org.apache.hadoop.hive.io.HdfsUtils;
 +import org.apache.hadoop.hive.metastore.TableType;
  import org.apache.hadoop.hive.metastore.api.*;
  import org.apache.hadoop.hive.metastore.events.AddIndexEvent;
  import org.apache.hadoop.hive.metastore.events.AddPartitionEvent;
@@@ -114,7 -117,7 +119,8 @@@ import org.apache.hadoop.hive.metastore
  import org.apache.hadoop.hive.metastore.events.PreReadDatabaseEvent;
  import org.apache.hadoop.hive.metastore.events.PreReadTableEvent;
  import org.apache.hadoop.hive.metastore.filemeta.OrcFileMetadataHandler;
+ import org.apache.hadoop.hive.metastore.messaging.EventMessage.EventType;
 +import org.apache.hadoop.hive.metastore.model.MTableWrite;
  import org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy;
  import org.apache.hadoop.hive.metastore.txn.TxnStore;
  import org.apache.hadoop.hive.metastore.txn.TxnUtils;
@@@ -7535,4 -7541,4 +7708,4 @@@ public class HiveMetaStore extends Thri
      }
      return fmHandlers;
    }
--}
++}

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java
----------------------------------------------------------------------
diff --cc metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java
index 6259cda,870896c..e1c59ec
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java
@@@ -1933,59 -1930,27 +1933,82 @@@ public class MetaStoreUtils 
      csNew.setStatsObj(list);
    }
  
+   /**
+    * convert Exception to MetaException, which sets the cause to such exception
+    * @param e cause of the exception
+    * @return  the MetaException with the specified exception as the cause
+    */
+   public static MetaException newMetaException(Exception e) {
+     return newMetaException(e != null ? e.getMessage() : null, e);
+   }
+ 
+   /**
+    * convert Exception to MetaException, which sets the cause to such exception
+    * @param errorMessage  the error message for this MetaException
+    * @param e             cause of the exception
+    * @return  the MetaException with the specified exception as the cause
+    */
+   public static MetaException newMetaException(String errorMessage, Exception e) {
+     MetaException metaException = new MetaException(errorMessage);
+     if (e != null) {
+       metaException.initCause(e);
+     }
+     return metaException;
+   }
+ 
 +  // TODO The following two utility methods can be moved to AcidUtils once no class in metastore is relying on them,
 +  // right now ObjectStore.getAllMmTablesForCleanup is calling these method
 +  /**
 +   * Checks if a table is an ACID table that only supports INSERT, but not UPDATE/DELETE
 +   * @param params table properties
 +   * @return true if table is an INSERT_ONLY table, false otherwise
 +   */
 +  // TODO# also check that transactional is true
 +  public static boolean isInsertOnlyTable(Map<String, String> params) {
 +    return isInsertOnlyTable(params, false);
 +  }
 +
 +  public static boolean isInsertOnlyTable(Map<String, String> params, boolean isCtas) {
 +    String transactionalProp = params.get(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES);
 +    return (transactionalProp != null && "insert_only".equalsIgnoreCase(transactionalProp));
 +  }
 +
 +   public static boolean isInsertOnlyTable(Properties params) {
 +    // TODO#  redirect for now - fix before merge
 +    HashMap<String, String> testMap = new HashMap<String, String>();
 +    for (String n  : params.stringPropertyNames()) {
 +      testMap.put(n, params.getProperty(n));
 +    }
 +    return isInsertOnlyTable(testMap);
 +  }
 +
 +   /** The method for altering table props; may set the table to MM, non-MM, or not affect MM. */
 +  public static Boolean isToInsertOnlyTable(Map<String, String> props) {
 +    // TODO# Setting these separately is a very hairy issue in certain combinations, since we
 +    //       cannot decide what type of table this becomes without taking both into account, and
 +    //       in many cases the conversion might be illegal.
 +    //       The only thing we allow is tx = true w/o tx-props, for backward compat.
 +    String transactional = props.get(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL);
 +    String transactionalProp = props.get(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES);
 +    if (transactional == null && transactionalProp == null) return null; // Not affected.
 +    boolean isSetToTxn = "true".equalsIgnoreCase(transactional);
 +    if (transactionalProp == null) {
 +      if (isSetToTxn) return false; // Assume the full ACID table.
 +      throw new RuntimeException("Cannot change '" + hive_metastoreConstants.TABLE_IS_TRANSACTIONAL
 +          + "' without '" + hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES + "'");
 +    }
 +    if (!"insert_only".equalsIgnoreCase(transactionalProp)) return false; // Not MM.
 +    if (!isSetToTxn) {
 +      throw new RuntimeException("Cannot set '"
 +          + hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES + "' to 'insert_only' without "
 +          + "setting '" + hive_metastoreConstants.TABLE_IS_TRANSACTIONAL + "' to 'true'");
 +    }
 +    return true;
 +  }
 +
 +  public static boolean isRemovedInsertOnlyTable(Set<String> removedSet) {
 +    boolean hasTxn = removedSet.contains(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL),
 +        hasProps = removedSet.contains(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES);
 +    return hasTxn || hasProps;
 +  }
  }

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
----------------------------------------------------------------------
diff --cc metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
index 51bc6d0,a83e12e..c351ffd
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
@@@ -8790,192 -8460,43 +8556,232 @@@ public class ObjectStore implements Raw
      }
    }
  
+   /**
+    * This is a cleanup method which is used to rollback a active transaction
+    * if the success flag is false and close the associated Query object. This method is used
+    * internally and visible for testing purposes only
+    * @param success Rollback the current active transaction if false
+    * @param query Query object which needs to be closed
+    */
+   @VisibleForTesting
+   void rollbackAndCleanup(boolean success, Query query) {
+     try {
 -      if(!success) {
++      if (!success) {
+         rollbackTransaction();
+       }
+     } finally {
+       if (query != null) {
+         query.closeAll();
+       }
+     }
+   }
+ 
+   /**
+    * This is a cleanup method which is used to rollback a active transaction
+    * if the success flag is false and close the associated QueryWrapper object. This method is used
+    * internally and visible for testing purposes only
+    * @param success Rollback the current active transaction if false
+    * @param queryWrapper QueryWrapper object which needs to be closed
+    */
+   @VisibleForTesting
+   void rollbackAndCleanup(boolean success, QueryWrapper queryWrapper) {
+     try {
 -      if(!success) {
++      if (!success) {
+         rollbackTransaction();
+       }
+     } finally {
+       if (queryWrapper != null) {
+         queryWrapper.close();
+       }
+     }
+   }
++
 +  @Override
 +  public void createTableWrite(Table tbl, long writeId, char state, long heartbeat) {
 +    boolean success = false;
 +    openTransaction();
 +    try {
 +      MTable mtbl = getMTable(tbl.getDbName(), tbl.getTableName());
 +      MTableWrite tw = new MTableWrite(mtbl, writeId, String.valueOf(state), heartbeat, heartbeat);
 +      pm.makePersistent(tw);
 +      success = true;
 +    } finally {
 +      if (success) {
 +        commitTransaction();
 +      } else {
 +        rollbackTransaction();
 +      }
 +    }
 +  }
 +
 +  @Override
 +  public void updateTableWrite(MTableWrite tw) {
 +    boolean success = false;
 +    openTransaction();
 +    try {
 +      pm.makePersistent(tw);
 +      success = true;
 +    } finally {
 +      if (success) {
 +        commitTransaction();
 +      } else {
 +        rollbackTransaction();
 +      }
 +    }
 +  }
 +
 +  @Override
 +  public MTableWrite getTableWrite(
 +      String dbName, String tblName, long writeId) throws MetaException {
 +    boolean success = false;
 +    Query query = null;
 +    openTransaction();
 +    try {
 +      query = pm.newQuery(MTableWrite.class,
 +              "table.tableName == t1 && table.database.name == t2 && writeId == t3");
 +      query.declareParameters("java.lang.String t1, java.lang.String t2, java.lang.Long t3");
 +      @SuppressWarnings("unchecked")
 +      List<MTableWrite> writes = (List<MTableWrite>) query.execute(tblName, dbName, writeId);
 +      pm.retrieveAll(writes);
 +      success = true;
 +      if (writes == null || writes.isEmpty()) return null;
 +      if (writes.size() > 1) {
 +        throw new MetaException(
 +            "More than one TableWrite for " + dbName + "." + tblName + " and " + writeId);
 +      }
 +      return writes.get(0);
 +    } finally {
 +      closeTransaction(success, query);
 +    }
 +  }
 +
 +  @Override
 +  public List<Long> getTableWriteIds(String dbName, String tblName,
 +      long watermarkId, long nextWriteId, char state) throws MetaException {
 +    boolean success = false;
 +    Query query = null;
 +    openTransaction();
 +    try {
 +      boolean hasState = (state != '\0');
 +      query = pm.newQuery("select writeId from org.apache.hadoop.hive.metastore.model.MTableWrite"
 +          + " where table.tableName == t1 && table.database.name == t2 && writeId > t3"
 +          + " && writeId < t4" + (hasState ? " && state == t5" : ""));
 +      query.declareParameters("java.lang.String t1, java.lang.String t2, java.lang.Long t3, "
 +          + "java.lang.Long t4" + (hasState ? ", java.lang.String t5" : ""));
 +      query.setResult("writeId");
 +      query.setOrdering("writeId asc");
 +      @SuppressWarnings("unchecked")
 +      List<Long> writes = (List<Long>) (hasState
 +          ? query.executeWithArray(tblName, dbName, watermarkId, nextWriteId, String.valueOf(state))
 +          : query.executeWithArray(tblName, dbName, watermarkId, nextWriteId));
 +      success = true;
 +      return (writes == null) ? new ArrayList<Long>() : new ArrayList<>(writes);
 +    } finally {
 +      closeTransaction(success, query);
 +    }
 +  }
 +
 +  @Override
 +  public List<MTableWrite> getTableWrites(
 +      String dbName, String tblName, long from, long to) throws MetaException {
 +    boolean success = false;
 +    dbName = HiveStringUtils.normalizeIdentifier(dbName);
 +    tblName = HiveStringUtils.normalizeIdentifier(tblName);
 +    Query query = null;
 +    openTransaction();
 +    try {
 +      String queryStr = "table.tableName == t1 && table.database.name == t2 && writeId > t3",
 +          argStr = "java.lang.String t1, java.lang.String t2, java.lang.Long t3";
 +      if (to >= 0) {
 +        queryStr += " && writeId < t4";
 +        argStr += ", java.lang.Long t4";
 +      }
 +      query = pm.newQuery(MTableWrite.class, queryStr);
 +      query.declareParameters(argStr);
 +      query.setOrdering("writeId asc");
 +      @SuppressWarnings("unchecked")
 +      List<MTableWrite> writes = (List<MTableWrite>)(to >= 0
 +         ? query.executeWithArray(tblName, dbName, from, to)
 +         : query.executeWithArray(tblName, dbName, from));
 +      pm.retrieveAll(writes);
 +      success = true;
 +      return (writes == null || writes.isEmpty()) ? null : new ArrayList<>(writes);
 +    } finally {
 +      closeTransaction(success, query);
 +    }
 +  }
 +
 +
 +  @Override
 +  public void deleteTableWrites(
 +      String dbName, String tblName, long from, long to) throws MetaException {
 +    boolean success = false;
 +    Query query = null;
 +    openTransaction();
 +    try {
 +      query = pm.newQuery(MTableWrite.class,
 +          "table.tableName == t1 && table.database.name == t2 && writeId > t3 && writeId < t4");
 +      query.declareParameters(
 +          "java.lang.String t1, java.lang.String t2, java.lang.Long t3, java.lang.Long t4");
 +      query.deletePersistentAll(tblName, dbName, from, to);
 +      success = true;
 +    } finally {
 +      closeTransaction(success, query);
 +    }
 +  }
 +
 +  @Override
 +  public List<FullTableName > getAllMmTablesForCleanup() throws MetaException {
 +    boolean success = false;
 +    Query query = null;
 +    openTransaction();
 +    try {
 +      // If the table had no MM writes, there's nothing to clean up
 +      query = pm.newQuery(MTable.class, "mmNextWriteId > 0");
 +      @SuppressWarnings("unchecked")
 +      List<MTable> tables = (List<MTable>) query.execute();
 +      pm.retrieveAll(tables);
 +      ArrayList<FullTableName> result = new ArrayList<>(tables.size());
 +      for (MTable table : tables) {
 +        if (MetaStoreUtils.isInsertOnlyTable(table.getParameters())) {
 +          result.add(new FullTableName(table.getDatabase().getName(), table.getTableName()));
 +        }
 +      }
 +      success = true;
 +      return result;
 +    } finally {
 +      closeTransaction(success, query);
 +    }
 +  }
 +
 +  @Override
 +  public Collection<String> getAllPartitionLocations(String dbName, String tblName) {
 +    boolean success = false;
 +    Query query = null;
 +    openTransaction();
 +    try {
 +      String q = "select sd.location from org.apache.hadoop.hive.metastore.model.MPartition"
 +          + " where table.tableName == t1 && table.database.name == t2";
 +      query = pm.newQuery();
 +      query.declareParameters("java.lang.String t1, java.lang.String t2");
 +      @SuppressWarnings("unchecked")
 +      List<String> tables = (List<String>) query.execute();
 +      pm.retrieveAll(tables);
 +      success = true;
 +      return new ArrayList<>(tables);
 +    } finally {
 +      closeTransaction(success, query);
 +    }
 +  }
 +
 +  private void closeTransaction(boolean success, Query query) {
 +    if (success) {
 +      commitTransaction();
 +    } else {
 +      rollbackTransaction();
 +    }
 +    if (query != null) {
 +      query.closeAll();
 +    }
 +  }
  }

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/1ceaf357/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
----------------------------------------------------------------------


Mime
View raw message