You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/07/03 18:00:26 UTC
[02/10] hive git commit: HIVE-19975 : Checking writeIdList per table
may not check the commit level of a partition on a partitioned table (Sergey
Shelukhin)
http://git-wip-us.apache.org/repos/asf/hive/blob/a47a80fe/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
index 952a158..0af7238 100644
--- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
+++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
@@ -717,7 +717,17 @@ class Iface(fb303.FacebookService.Iface):
"""
pass
- def alter_partitions_with_environment_context(self, req):
+ def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context):
+ """
+ Parameters:
+ - db_name
+ - tbl_name
+ - new_parts
+ - environment_context
+ """
+ pass
+
+ def alter_partitions_with_environment_context_req(self, req):
"""
Parameters:
- req
@@ -4738,18 +4748,24 @@ class Client(fb303.FacebookService.Client, Iface):
raise result.o2
return
- def alter_partitions_with_environment_context(self, req):
+ def alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context):
"""
Parameters:
- - req
+ - db_name
+ - tbl_name
+ - new_parts
+ - environment_context
"""
- self.send_alter_partitions_with_environment_context(req)
- return self.recv_alter_partitions_with_environment_context()
+ self.send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context)
+ self.recv_alter_partitions_with_environment_context()
- def send_alter_partitions_with_environment_context(self, req):
+ def send_alter_partitions_with_environment_context(self, db_name, tbl_name, new_parts, environment_context):
self._oprot.writeMessageBegin('alter_partitions_with_environment_context', TMessageType.CALL, self._seqid)
args = alter_partitions_with_environment_context_args()
- args.req = req
+ args.db_name = db_name
+ args.tbl_name = tbl_name
+ args.new_parts = new_parts
+ args.environment_context = environment_context
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -4765,13 +4781,46 @@ class Client(fb303.FacebookService.Client, Iface):
result = alter_partitions_with_environment_context_result()
result.read(iprot)
iprot.readMessageEnd()
+ if result.o1 is not None:
+ raise result.o1
+ if result.o2 is not None:
+ raise result.o2
+ return
+
+ def alter_partitions_with_environment_context_req(self, req):
+ """
+ Parameters:
+ - req
+ """
+ self.send_alter_partitions_with_environment_context_req(req)
+ return self.recv_alter_partitions_with_environment_context_req()
+
+ def send_alter_partitions_with_environment_context_req(self, req):
+ self._oprot.writeMessageBegin('alter_partitions_with_environment_context_req', TMessageType.CALL, self._seqid)
+ args = alter_partitions_with_environment_context_req_args()
+ args.req = req
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_alter_partitions_with_environment_context_req(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = alter_partitions_with_environment_context_req_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.o1 is not None:
raise result.o1
if result.o2 is not None:
raise result.o2
- raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_partitions_with_environment_context failed: unknown result")
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_partitions_with_environment_context_req failed: unknown result")
def alter_partition_with_environment_context(self, db_name, tbl_name, new_part, environment_context):
"""
@@ -9120,6 +9169,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
self._processMap["alter_partition"] = Processor.process_alter_partition
self._processMap["alter_partitions"] = Processor.process_alter_partitions
self._processMap["alter_partitions_with_environment_context"] = Processor.process_alter_partitions_with_environment_context
+ self._processMap["alter_partitions_with_environment_context_req"] = Processor.process_alter_partitions_with_environment_context_req
self._processMap["alter_partition_with_environment_context"] = Processor.process_alter_partition_with_environment_context
self._processMap["rename_partition"] = Processor.process_rename_partition
self._processMap["partition_name_has_valid_characters"] = Processor.process_partition_name_has_valid_characters
@@ -11398,7 +11448,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
iprot.readMessageEnd()
result = alter_partitions_with_environment_context_result()
try:
- result.success = self._handler.alter_partitions_with_environment_context(args.req)
+ self._handler.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
@@ -11417,6 +11467,31 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_alter_partitions_with_environment_context_req(self, seqid, iprot, oprot):
+ args = alter_partitions_with_environment_context_req_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = alter_partitions_with_environment_context_req_result()
+ try:
+ result.success = self._handler.alter_partitions_with_environment_context_req(args.req)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except InvalidOperationException as o1:
+ msg_type = TMessageType.REPLY
+ result.o1 = o1
+ except MetaException as o2:
+ msg_type = TMessageType.REPLY
+ result.o2 = o2
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("alter_partitions_with_environment_context_req", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_alter_partition_with_environment_context(self, seqid, iprot, oprot):
args = alter_partition_with_environment_context_args()
args.read(iprot)
@@ -29441,6 +29516,200 @@ class alter_partitions_result:
class alter_partitions_with_environment_context_args:
"""
Attributes:
+ - db_name
+ - tbl_name
+ - new_parts
+ - environment_context
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'db_name', None, None, ), # 1
+ (2, TType.STRING, 'tbl_name', None, None, ), # 2
+ (3, TType.LIST, 'new_parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 3
+ (4, TType.STRUCT, 'environment_context', (EnvironmentContext, EnvironmentContext.thrift_spec), None, ), # 4
+ )
+
+ def __init__(self, db_name=None, tbl_name=None, new_parts=None, environment_context=None,):
+ self.db_name = db_name
+ self.tbl_name = tbl_name
+ self.new_parts = new_parts
+ self.environment_context = environment_context
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.db_name = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.tbl_name = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.LIST:
+ self.new_parts = []
+ (_etype1233, _size1230) = iprot.readListBegin()
+ for _i1234 in xrange(_size1230):
+ _elem1235 = Partition()
+ _elem1235.read(iprot)
+ self.new_parts.append(_elem1235)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.environment_context = EnvironmentContext()
+ self.environment_context.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('alter_partitions_with_environment_context_args')
+ if self.db_name is not None:
+ oprot.writeFieldBegin('db_name', TType.STRING, 1)
+ oprot.writeString(self.db_name)
+ oprot.writeFieldEnd()
+ if self.tbl_name is not None:
+ oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
+ oprot.writeString(self.tbl_name)
+ oprot.writeFieldEnd()
+ if self.new_parts is not None:
+ oprot.writeFieldBegin('new_parts', TType.LIST, 3)
+ oprot.writeListBegin(TType.STRUCT, len(self.new_parts))
+ for iter1236 in self.new_parts:
+ iter1236.write(oprot)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.environment_context is not None:
+ oprot.writeFieldBegin('environment_context', TType.STRUCT, 4)
+ self.environment_context.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.db_name)
+ value = (value * 31) ^ hash(self.tbl_name)
+ value = (value * 31) ^ hash(self.new_parts)
+ value = (value * 31) ^ hash(self.environment_context)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class alter_partitions_with_environment_context_result:
+ """
+ Attributes:
+ - o1
+ - o2
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
+ )
+
+ def __init__(self, o1=None, o2=None,):
+ self.o1 = o1
+ self.o2 = o2
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRUCT:
+ self.o1 = InvalidOperationException()
+ self.o1.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.o2 = MetaException()
+ self.o2.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('alter_partitions_with_environment_context_result')
+ if self.o1 is not None:
+ oprot.writeFieldBegin('o1', TType.STRUCT, 1)
+ self.o1.write(oprot)
+ oprot.writeFieldEnd()
+ if self.o2 is not None:
+ oprot.writeFieldBegin('o2', TType.STRUCT, 2)
+ self.o2.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.o1)
+ value = (value * 31) ^ hash(self.o2)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class alter_partitions_with_environment_context_req_args:
+ """
+ Attributes:
- req
"""
@@ -29476,7 +29745,7 @@ class alter_partitions_with_environment_context_args:
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
- oprot.writeStructBegin('alter_partitions_with_environment_context_args')
+ oprot.writeStructBegin('alter_partitions_with_environment_context_req_args')
if self.req is not None:
oprot.writeFieldBegin('req', TType.STRUCT, 1)
self.req.write(oprot)
@@ -29504,7 +29773,7 @@ class alter_partitions_with_environment_context_args:
def __ne__(self, other):
return not (self == other)
-class alter_partitions_with_environment_context_result:
+class alter_partitions_with_environment_context_req_result:
"""
Attributes:
- success
@@ -29559,7 +29828,7 @@ class alter_partitions_with_environment_context_result:
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
- oprot.writeStructBegin('alter_partitions_with_environment_context_result')
+ oprot.writeStructBegin('alter_partitions_with_environment_context_req_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
@@ -29828,10 +30097,10 @@ class rename_partition_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype1233, _size1230) = iprot.readListBegin()
- for _i1234 in xrange(_size1230):
- _elem1235 = iprot.readString()
- self.part_vals.append(_elem1235)
+ (_etype1240, _size1237) = iprot.readListBegin()
+ for _i1241 in xrange(_size1237):
+ _elem1242 = iprot.readString()
+ self.part_vals.append(_elem1242)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -29862,8 +30131,8 @@ class rename_partition_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter1236 in self.part_vals:
- oprot.writeString(iter1236)
+ for iter1243 in self.part_vals:
+ oprot.writeString(iter1243)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.new_part is not None:
@@ -30005,10 +30274,10 @@ class partition_name_has_valid_characters_args:
if fid == 1:
if ftype == TType.LIST:
self.part_vals = []
- (_etype1240, _size1237) = iprot.readListBegin()
- for _i1241 in xrange(_size1237):
- _elem1242 = iprot.readString()
- self.part_vals.append(_elem1242)
+ (_etype1247, _size1244) = iprot.readListBegin()
+ for _i1248 in xrange(_size1244):
+ _elem1249 = iprot.readString()
+ self.part_vals.append(_elem1249)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -30030,8 +30299,8 @@ class partition_name_has_valid_characters_args:
if self.part_vals is not None:
oprot.writeFieldBegin('part_vals', TType.LIST, 1)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter1243 in self.part_vals:
- oprot.writeString(iter1243)
+ for iter1250 in self.part_vals:
+ oprot.writeString(iter1250)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.throw_exception is not None:
@@ -30389,10 +30658,10 @@ class partition_name_to_vals_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1247, _size1244) = iprot.readListBegin()
- for _i1248 in xrange(_size1244):
- _elem1249 = iprot.readString()
- self.success.append(_elem1249)
+ (_etype1254, _size1251) = iprot.readListBegin()
+ for _i1255 in xrange(_size1251):
+ _elem1256 = iprot.readString()
+ self.success.append(_elem1256)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -30415,8 +30684,8 @@ class partition_name_to_vals_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1250 in self.success:
- oprot.writeString(iter1250)
+ for iter1257 in self.success:
+ oprot.writeString(iter1257)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -30540,11 +30809,11 @@ class partition_name_to_spec_result:
if fid == 0:
if ftype == TType.MAP:
self.success = {}
- (_ktype1252, _vtype1253, _size1251 ) = iprot.readMapBegin()
- for _i1255 in xrange(_size1251):
- _key1256 = iprot.readString()
- _val1257 = iprot.readString()
- self.success[_key1256] = _val1257
+ (_ktype1259, _vtype1260, _size1258 ) = iprot.readMapBegin()
+ for _i1262 in xrange(_size1258):
+ _key1263 = iprot.readString()
+ _val1264 = iprot.readString()
+ self.success[_key1263] = _val1264
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -30567,9 +30836,9 @@ class partition_name_to_spec_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.MAP, 0)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
- for kiter1258,viter1259 in self.success.items():
- oprot.writeString(kiter1258)
- oprot.writeString(viter1259)
+ for kiter1265,viter1266 in self.success.items():
+ oprot.writeString(kiter1265)
+ oprot.writeString(viter1266)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -30645,11 +30914,11 @@ class markPartitionForEvent_args:
elif fid == 3:
if ftype == TType.MAP:
self.part_vals = {}
- (_ktype1261, _vtype1262, _size1260 ) = iprot.readMapBegin()
- for _i1264 in xrange(_size1260):
- _key1265 = iprot.readString()
- _val1266 = iprot.readString()
- self.part_vals[_key1265] = _val1266
+ (_ktype1268, _vtype1269, _size1267 ) = iprot.readMapBegin()
+ for _i1271 in xrange(_size1267):
+ _key1272 = iprot.readString()
+ _val1273 = iprot.readString()
+ self.part_vals[_key1272] = _val1273
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -30679,9 +30948,9 @@ class markPartitionForEvent_args:
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 kiter1267,viter1268 in self.part_vals.items():
- oprot.writeString(kiter1267)
- oprot.writeString(viter1268)
+ for kiter1274,viter1275 in self.part_vals.items():
+ oprot.writeString(kiter1274)
+ oprot.writeString(viter1275)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.eventType is not None:
@@ -30895,11 +31164,11 @@ class isPartitionMarkedForEvent_args:
elif fid == 3:
if ftype == TType.MAP:
self.part_vals = {}
- (_ktype1270, _vtype1271, _size1269 ) = iprot.readMapBegin()
- for _i1273 in xrange(_size1269):
- _key1274 = iprot.readString()
- _val1275 = iprot.readString()
- self.part_vals[_key1274] = _val1275
+ (_ktype1277, _vtype1278, _size1276 ) = iprot.readMapBegin()
+ for _i1280 in xrange(_size1276):
+ _key1281 = iprot.readString()
+ _val1282 = iprot.readString()
+ self.part_vals[_key1281] = _val1282
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -30929,9 +31198,9 @@ class isPartitionMarkedForEvent_args:
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 kiter1276,viter1277 in self.part_vals.items():
- oprot.writeString(kiter1276)
- oprot.writeString(viter1277)
+ for kiter1283,viter1284 in self.part_vals.items():
+ oprot.writeString(kiter1283)
+ oprot.writeString(viter1284)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.eventType is not None:
@@ -34583,10 +34852,10 @@ class get_functions_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1281, _size1278) = iprot.readListBegin()
- for _i1282 in xrange(_size1278):
- _elem1283 = iprot.readString()
- self.success.append(_elem1283)
+ (_etype1288, _size1285) = iprot.readListBegin()
+ for _i1289 in xrange(_size1285):
+ _elem1290 = iprot.readString()
+ self.success.append(_elem1290)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -34609,8 +34878,8 @@ class get_functions_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1284 in self.success:
- oprot.writeString(iter1284)
+ for iter1291 in self.success:
+ oprot.writeString(iter1291)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -35298,10 +35567,10 @@ class get_role_names_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1288, _size1285) = iprot.readListBegin()
- for _i1289 in xrange(_size1285):
- _elem1290 = iprot.readString()
- self.success.append(_elem1290)
+ (_etype1295, _size1292) = iprot.readListBegin()
+ for _i1296 in xrange(_size1292):
+ _elem1297 = iprot.readString()
+ self.success.append(_elem1297)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -35324,8 +35593,8 @@ class get_role_names_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1291 in self.success:
- oprot.writeString(iter1291)
+ for iter1298 in self.success:
+ oprot.writeString(iter1298)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -35839,11 +36108,11 @@ class list_roles_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1295, _size1292) = iprot.readListBegin()
- for _i1296 in xrange(_size1292):
- _elem1297 = Role()
- _elem1297.read(iprot)
- self.success.append(_elem1297)
+ (_etype1302, _size1299) = iprot.readListBegin()
+ for _i1303 in xrange(_size1299):
+ _elem1304 = Role()
+ _elem1304.read(iprot)
+ self.success.append(_elem1304)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -35866,8 +36135,8 @@ class list_roles_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1298 in self.success:
- iter1298.write(oprot)
+ for iter1305 in self.success:
+ iter1305.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -36376,10 +36645,10 @@ class get_privilege_set_args:
elif fid == 3:
if ftype == TType.LIST:
self.group_names = []
- (_etype1302, _size1299) = iprot.readListBegin()
- for _i1303 in xrange(_size1299):
- _elem1304 = iprot.readString()
- self.group_names.append(_elem1304)
+ (_etype1309, _size1306) = iprot.readListBegin()
+ for _i1310 in xrange(_size1306):
+ _elem1311 = iprot.readString()
+ self.group_names.append(_elem1311)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -36404,8 +36673,8 @@ class get_privilege_set_args:
if self.group_names is not None:
oprot.writeFieldBegin('group_names', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.group_names))
- for iter1305 in self.group_names:
- oprot.writeString(iter1305)
+ for iter1312 in self.group_names:
+ oprot.writeString(iter1312)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -36632,11 +36901,11 @@ class list_privileges_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1309, _size1306) = iprot.readListBegin()
- for _i1310 in xrange(_size1306):
- _elem1311 = HiveObjectPrivilege()
- _elem1311.read(iprot)
- self.success.append(_elem1311)
+ (_etype1316, _size1313) = iprot.readListBegin()
+ for _i1317 in xrange(_size1313):
+ _elem1318 = HiveObjectPrivilege()
+ _elem1318.read(iprot)
+ self.success.append(_elem1318)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -36659,8 +36928,8 @@ class list_privileges_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1312 in self.success:
- iter1312.write(oprot)
+ for iter1319 in self.success:
+ iter1319.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -37330,10 +37599,10 @@ class set_ugi_args:
elif fid == 2:
if ftype == TType.LIST:
self.group_names = []
- (_etype1316, _size1313) = iprot.readListBegin()
- for _i1317 in xrange(_size1313):
- _elem1318 = iprot.readString()
- self.group_names.append(_elem1318)
+ (_etype1323, _size1320) = iprot.readListBegin()
+ for _i1324 in xrange(_size1320):
+ _elem1325 = iprot.readString()
+ self.group_names.append(_elem1325)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -37354,8 +37623,8 @@ class set_ugi_args:
if self.group_names is not None:
oprot.writeFieldBegin('group_names', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.group_names))
- for iter1319 in self.group_names:
- oprot.writeString(iter1319)
+ for iter1326 in self.group_names:
+ oprot.writeString(iter1326)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -37410,10 +37679,10 @@ class set_ugi_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1323, _size1320) = iprot.readListBegin()
- for _i1324 in xrange(_size1320):
- _elem1325 = iprot.readString()
- self.success.append(_elem1325)
+ (_etype1330, _size1327) = iprot.readListBegin()
+ for _i1331 in xrange(_size1327):
+ _elem1332 = iprot.readString()
+ self.success.append(_elem1332)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -37436,8 +37705,8 @@ class set_ugi_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1326 in self.success:
- oprot.writeString(iter1326)
+ for iter1333 in self.success:
+ oprot.writeString(iter1333)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -38369,10 +38638,10 @@ class get_all_token_identifiers_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1330, _size1327) = iprot.readListBegin()
- for _i1331 in xrange(_size1327):
- _elem1332 = iprot.readString()
- self.success.append(_elem1332)
+ (_etype1337, _size1334) = iprot.readListBegin()
+ for _i1338 in xrange(_size1334):
+ _elem1339 = iprot.readString()
+ self.success.append(_elem1339)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -38389,8 +38658,8 @@ class get_all_token_identifiers_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1333 in self.success:
- oprot.writeString(iter1333)
+ for iter1340 in self.success:
+ oprot.writeString(iter1340)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -38917,10 +39186,10 @@ class get_master_keys_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1337, _size1334) = iprot.readListBegin()
- for _i1338 in xrange(_size1334):
- _elem1339 = iprot.readString()
- self.success.append(_elem1339)
+ (_etype1344, _size1341) = iprot.readListBegin()
+ for _i1345 in xrange(_size1341):
+ _elem1346 = iprot.readString()
+ self.success.append(_elem1346)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -38937,8 +39206,8 @@ class get_master_keys_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter1340 in self.success:
- oprot.writeString(iter1340)
+ for iter1347 in self.success:
+ oprot.writeString(iter1347)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -47345,11 +47614,11 @@ class get_schema_all_versions_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1344, _size1341) = iprot.readListBegin()
- for _i1345 in xrange(_size1341):
- _elem1346 = SchemaVersion()
- _elem1346.read(iprot)
- self.success.append(_elem1346)
+ (_etype1351, _size1348) = iprot.readListBegin()
+ for _i1352 in xrange(_size1348):
+ _elem1353 = SchemaVersion()
+ _elem1353.read(iprot)
+ self.success.append(_elem1353)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -47378,8 +47647,8 @@ class get_schema_all_versions_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1347 in self.success:
- iter1347.write(oprot)
+ for iter1354 in self.success:
+ iter1354.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
@@ -48854,11 +49123,11 @@ class get_runtime_stats_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype1351, _size1348) = iprot.readListBegin()
- for _i1352 in xrange(_size1348):
- _elem1353 = RuntimeStat()
- _elem1353.read(iprot)
- self.success.append(_elem1353)
+ (_etype1358, _size1355) = iprot.readListBegin()
+ for _i1359 in xrange(_size1355):
+ _elem1360 = RuntimeStat()
+ _elem1360.read(iprot)
+ self.success.append(_elem1360)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -48881,8 +49150,8 @@ class get_runtime_stats_result:
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter1354 in self.success:
- iter1354.write(oprot)
+ for iter1361 in self.success:
+ iter1361.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 is not None:
http://git-wip-us.apache.org/repos/asf/hive/blob/a47a80fe/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
index 6e0e598..df3c586 100644
--- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
+++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
@@ -305,23 +305,6 @@ class SchemaVersionState:
"DELETED": 8,
}
-class IsolationLevelCompliance:
- YES = 1
- NO = 2
- UNKNOWN = 3
-
- _VALUES_TO_NAMES = {
- 1: "YES",
- 2: "NO",
- 3: "UNKNOWN",
- }
-
- _NAMES_TO_VALUES = {
- "YES": 1,
- "NO": 2,
- "UNKNOWN": 3,
- }
-
class FunctionType:
JAVA = 1
@@ -4567,9 +4550,7 @@ class Table:
- creationMetadata
- catName
- ownerType
- - txnId
- writeId
- - validWriteIdList
- isStatsCompliant
"""
@@ -4593,13 +4574,11 @@ class Table:
(16, TType.STRUCT, 'creationMetadata', (CreationMetadata, CreationMetadata.thrift_spec), None, ), # 16
(17, TType.STRING, 'catName', None, None, ), # 17
(18, TType.I32, 'ownerType', None, 1, ), # 18
- (19, TType.I64, 'txnId', None, -1, ), # 19
- (20, TType.I64, 'writeId', None, -1, ), # 20
- (21, TType.STRING, 'validWriteIdList', None, None, ), # 21
- (22, TType.I32, 'isStatsCompliant', None, None, ), # 22
+ (19, TType.I64, 'writeId', None, -1, ), # 19
+ (20, TType.BOOL, 'isStatsCompliant', None, None, ), # 20
)
- def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None, temporary=thrift_spec[14][4], rewriteEnabled=None, creationMetadata=None, catName=None, ownerType=thrift_spec[18][4], txnId=thrift_spec[19][4], writeId=thrift_spec[20][4], validWriteIdList=None, isStatsCompliant=None,):
+ def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None, temporary=thrift_spec[14][4], rewriteEnabled=None, creationMetadata=None, catName=None, ownerType=thrift_spec[18][4], writeId=thrift_spec[19][4], isStatsCompliant=None,):
self.tableName = tableName
self.dbName = dbName
self.owner = owner
@@ -4618,9 +4597,7 @@ class Table:
self.creationMetadata = creationMetadata
self.catName = catName
self.ownerType = ownerType
- self.txnId = txnId
self.writeId = writeId
- self.validWriteIdList = validWriteIdList
self.isStatsCompliant = isStatsCompliant
def read(self, iprot):
@@ -4739,22 +4716,12 @@ class Table:
iprot.skip(ftype)
elif fid == 19:
if ftype == TType.I64:
- self.txnId = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 20:
- if ftype == TType.I64:
self.writeId = iprot.readI64()
else:
iprot.skip(ftype)
- elif fid == 21:
- if ftype == TType.STRING:
- self.validWriteIdList = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 22:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ elif fid == 20:
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -4846,21 +4813,13 @@ class Table:
oprot.writeFieldBegin('ownerType', TType.I32, 18)
oprot.writeI32(self.ownerType)
oprot.writeFieldEnd()
- if self.txnId is not None:
- oprot.writeFieldBegin('txnId', TType.I64, 19)
- oprot.writeI64(self.txnId)
- oprot.writeFieldEnd()
if self.writeId is not None:
- oprot.writeFieldBegin('writeId', TType.I64, 20)
+ oprot.writeFieldBegin('writeId', TType.I64, 19)
oprot.writeI64(self.writeId)
oprot.writeFieldEnd()
- if self.validWriteIdList is not None:
- oprot.writeFieldBegin('validWriteIdList', TType.STRING, 21)
- oprot.writeString(self.validWriteIdList)
- oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 22)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 20)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -4889,9 +4848,7 @@ class Table:
value = (value * 31) ^ hash(self.creationMetadata)
value = (value * 31) ^ hash(self.catName)
value = (value * 31) ^ hash(self.ownerType)
- value = (value * 31) ^ hash(self.txnId)
value = (value * 31) ^ hash(self.writeId)
- value = (value * 31) ^ hash(self.validWriteIdList)
value = (value * 31) ^ hash(self.isStatsCompliant)
return value
@@ -4918,9 +4875,7 @@ class Partition:
- parameters
- privileges
- catName
- - txnId
- writeId
- - validWriteIdList
- isStatsCompliant
"""
@@ -4935,13 +4890,11 @@ class Partition:
(7, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 7
(8, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 8
(9, TType.STRING, 'catName', None, None, ), # 9
- (10, TType.I64, 'txnId', None, -1, ), # 10
- (11, TType.I64, 'writeId', None, -1, ), # 11
- (12, TType.STRING, 'validWriteIdList', None, None, ), # 12
- (13, TType.I32, 'isStatsCompliant', None, None, ), # 13
+ (10, TType.I64, 'writeId', None, -1, ), # 10
+ (11, TType.BOOL, 'isStatsCompliant', None, None, ), # 11
)
- def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None, privileges=None, catName=None, txnId=thrift_spec[10][4], writeId=thrift_spec[11][4], validWriteIdList=None, isStatsCompliant=None,):
+ def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None, privileges=None, catName=None, writeId=thrift_spec[10][4], isStatsCompliant=None,):
self.values = values
self.dbName = dbName
self.tableName = tableName
@@ -4951,9 +4904,7 @@ class Partition:
self.parameters = parameters
self.privileges = privileges
self.catName = catName
- self.txnId = txnId
self.writeId = writeId
- self.validWriteIdList = validWriteIdList
self.isStatsCompliant = isStatsCompliant
def read(self, iprot):
@@ -5025,22 +4976,12 @@ class Partition:
iprot.skip(ftype)
elif fid == 10:
if ftype == TType.I64:
- self.txnId = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 11:
- if ftype == TType.I64:
self.writeId = iprot.readI64()
else:
iprot.skip(ftype)
- elif fid == 12:
- if ftype == TType.STRING:
- self.validWriteIdList = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 13:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ elif fid == 11:
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -5096,21 +5037,13 @@ class Partition:
oprot.writeFieldBegin('catName', TType.STRING, 9)
oprot.writeString(self.catName)
oprot.writeFieldEnd()
- if self.txnId is not None:
- oprot.writeFieldBegin('txnId', TType.I64, 10)
- oprot.writeI64(self.txnId)
- oprot.writeFieldEnd()
if self.writeId is not None:
- oprot.writeFieldBegin('writeId', TType.I64, 11)
+ oprot.writeFieldBegin('writeId', TType.I64, 10)
oprot.writeI64(self.writeId)
oprot.writeFieldEnd()
- if self.validWriteIdList is not None:
- oprot.writeFieldBegin('validWriteIdList', TType.STRING, 12)
- oprot.writeString(self.validWriteIdList)
- oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 13)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 11)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -5130,9 +5063,7 @@ class Partition:
value = (value * 31) ^ hash(self.parameters)
value = (value * 31) ^ hash(self.privileges)
value = (value * 31) ^ hash(self.catName)
- value = (value * 31) ^ hash(self.txnId)
value = (value * 31) ^ hash(self.writeId)
- value = (value * 31) ^ hash(self.validWriteIdList)
value = (value * 31) ^ hash(self.isStatsCompliant)
return value
@@ -5467,9 +5398,7 @@ class PartitionSpec:
- sharedSDPartitionSpec
- partitionList
- catName
- - txnId
- writeId
- - validWriteIdList
- isStatsCompliant
"""
@@ -5481,22 +5410,18 @@ class PartitionSpec:
(4, TType.STRUCT, 'sharedSDPartitionSpec', (PartitionSpecWithSharedSD, PartitionSpecWithSharedSD.thrift_spec), None, ), # 4
(5, TType.STRUCT, 'partitionList', (PartitionListComposingSpec, PartitionListComposingSpec.thrift_spec), None, ), # 5
(6, TType.STRING, 'catName', None, None, ), # 6
- (7, TType.I64, 'txnId', None, -1, ), # 7
- (8, TType.I64, 'writeId', None, -1, ), # 8
- (9, TType.STRING, 'validWriteIdList', None, None, ), # 9
- (10, TType.I32, 'isStatsCompliant', None, None, ), # 10
+ (7, TType.I64, 'writeId', None, -1, ), # 7
+ (8, TType.BOOL, 'isStatsCompliant', None, None, ), # 8
)
- def __init__(self, dbName=None, tableName=None, rootPath=None, sharedSDPartitionSpec=None, partitionList=None, catName=None, txnId=thrift_spec[7][4], writeId=thrift_spec[8][4], validWriteIdList=None, isStatsCompliant=None,):
+ def __init__(self, dbName=None, tableName=None, rootPath=None, sharedSDPartitionSpec=None, partitionList=None, catName=None, writeId=thrift_spec[7][4], isStatsCompliant=None,):
self.dbName = dbName
self.tableName = tableName
self.rootPath = rootPath
self.sharedSDPartitionSpec = sharedSDPartitionSpec
self.partitionList = partitionList
self.catName = catName
- self.txnId = txnId
self.writeId = writeId
- self.validWriteIdList = validWriteIdList
self.isStatsCompliant = isStatsCompliant
def read(self, iprot):
@@ -5542,22 +5467,12 @@ class PartitionSpec:
iprot.skip(ftype)
elif fid == 7:
if ftype == TType.I64:
- self.txnId = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.I64:
self.writeId = iprot.readI64()
else:
iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.STRING:
- self.validWriteIdList = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ elif fid == 8:
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -5594,21 +5509,13 @@ class PartitionSpec:
oprot.writeFieldBegin('catName', TType.STRING, 6)
oprot.writeString(self.catName)
oprot.writeFieldEnd()
- if self.txnId is not None:
- oprot.writeFieldBegin('txnId', TType.I64, 7)
- oprot.writeI64(self.txnId)
- oprot.writeFieldEnd()
if self.writeId is not None:
- oprot.writeFieldBegin('writeId', TType.I64, 8)
+ oprot.writeFieldBegin('writeId', TType.I64, 7)
oprot.writeI64(self.writeId)
oprot.writeFieldEnd()
- if self.validWriteIdList is not None:
- oprot.writeFieldBegin('validWriteIdList', TType.STRING, 9)
- oprot.writeString(self.validWriteIdList)
- oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 10)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 8)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -5625,9 +5532,7 @@ class PartitionSpec:
value = (value * 31) ^ hash(self.sharedSDPartitionSpec)
value = (value * 31) ^ hash(self.partitionList)
value = (value * 31) ^ hash(self.catName)
- value = (value * 31) ^ hash(self.txnId)
value = (value * 31) ^ hash(self.writeId)
- value = (value * 31) ^ hash(self.validWriteIdList)
value = (value * 31) ^ hash(self.isStatsCompliant)
return value
@@ -7025,7 +6930,7 @@ class ColumnStatistics:
(2, TType.LIST, 'statsObj', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 2
(3, TType.I64, 'txnId', None, -1, ), # 3
(4, TType.STRING, 'validWriteIdList', None, None, ), # 4
- (5, TType.I32, 'isStatsCompliant', None, None, ), # 5
+ (5, TType.BOOL, 'isStatsCompliant', None, None, ), # 5
)
def __init__(self, statsDesc=None, statsObj=None, txnId=thrift_spec[3][4], validWriteIdList=None, isStatsCompliant=None,):
@@ -7072,8 +6977,8 @@ class ColumnStatistics:
else:
iprot.skip(ftype)
elif fid == 5:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -7106,8 +7011,8 @@ class ColumnStatistics:
oprot.writeString(self.validWriteIdList)
oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 5)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 5)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -7152,7 +7057,7 @@ class AggrStats:
None, # 0
(1, TType.LIST, 'colStats', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 1
(2, TType.I64, 'partsFound', None, None, ), # 2
- (3, TType.I32, 'isStatsCompliant', None, None, ), # 3
+ (3, TType.BOOL, 'isStatsCompliant', None, None, ), # 3
)
def __init__(self, colStats=None, partsFound=None, isStatsCompliant=None,):
@@ -7186,8 +7091,8 @@ class AggrStats:
else:
iprot.skip(ftype)
elif fid == 3:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -7212,8 +7117,8 @@ class AggrStats:
oprot.writeI64(self.partsFound)
oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 3)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 3)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -9403,7 +9308,7 @@ class TableStatsResult:
thrift_spec = (
None, # 0
(1, TType.LIST, 'tableStats', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 1
- (2, TType.I32, 'isStatsCompliant', None, None, ), # 2
+ (2, TType.BOOL, 'isStatsCompliant', None, None, ), # 2
)
def __init__(self, tableStats=None, isStatsCompliant=None,):
@@ -9431,8 +9336,8 @@ class TableStatsResult:
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -9453,8 +9358,8 @@ class TableStatsResult:
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 2)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 2)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -9492,7 +9397,7 @@ class PartitionsStatsResult:
thrift_spec = (
None, # 0
(1, TType.MAP, 'partStats', (TType.STRING,None,TType.LIST,(TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec))), None, ), # 1
- (2, TType.I32, 'isStatsCompliant', None, None, ), # 2
+ (2, TType.BOOL, 'isStatsCompliant', None, None, ), # 2
)
def __init__(self, partStats=None, isStatsCompliant=None,):
@@ -9526,8 +9431,8 @@ class PartitionsStatsResult:
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -9552,8 +9457,8 @@ class PartitionsStatsResult:
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 2)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 2)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -9902,7 +9807,7 @@ class AddPartitionsResult:
thrift_spec = (
None, # 0
(1, TType.LIST, 'partitions', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 1
- (2, TType.I32, 'isStatsCompliant', None, None, ), # 2
+ (2, TType.BOOL, 'isStatsCompliant', None, None, ), # 2
)
def __init__(self, partitions=None, isStatsCompliant=None,):
@@ -9930,8 +9835,8 @@ class AddPartitionsResult:
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -9952,8 +9857,8 @@ class AddPartitionsResult:
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 2)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 2)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -17517,7 +17422,7 @@ class GetTableResult:
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'table', (Table, Table.thrift_spec), None, ), # 1
- (2, TType.I32, 'isStatsCompliant', None, None, ), # 2
+ (2, TType.BOOL, 'isStatsCompliant', None, None, ), # 2
)
def __init__(self, table=None, isStatsCompliant=None,):
@@ -17540,8 +17445,8 @@ class GetTableResult:
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.I32:
- self.isStatsCompliant = iprot.readI32()
+ if ftype == TType.BOOL:
+ self.isStatsCompliant = iprot.readBool()
else:
iprot.skip(ftype)
else:
@@ -17559,8 +17464,8 @@ class GetTableResult:
self.table.write(oprot)
oprot.writeFieldEnd()
if self.isStatsCompliant is not None:
- oprot.writeFieldBegin('isStatsCompliant', TType.I32, 2)
- oprot.writeI32(self.isStatsCompliant)
+ oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 2)
+ oprot.writeBool(self.isStatsCompliant)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
http://git-wip-us.apache.org/repos/asf/hive/blob/a47a80fe/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
index d0c44c5..86b469c 100644
--- a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
+++ b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
@@ -141,14 +141,6 @@ module SchemaVersionState
VALID_VALUES = Set.new([INITIATED, START_REVIEW, CHANGES_REQUIRED, REVIEWED, ENABLED, DISABLED, ARCHIVED, DELETED]).freeze
end
-module IsolationLevelCompliance
- YES = 1
- NO = 2
- UNKNOWN = 3
- VALUE_MAP = {1 => "YES", 2 => "NO", 3 => "UNKNOWN"}
- VALID_VALUES = Set.new([YES, NO, UNKNOWN]).freeze
-end
-
module FunctionType
JAVA = 1
VALUE_MAP = {1 => "JAVA"}
@@ -1070,10 +1062,8 @@ class Table
CREATIONMETADATA = 16
CATNAME = 17
OWNERTYPE = 18
- TXNID = 19
- WRITEID = 20
- VALIDWRITEIDLIST = 21
- ISSTATSCOMPLIANT = 22
+ WRITEID = 19
+ ISSTATSCOMPLIANT = 20
FIELDS = {
TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
@@ -1094,10 +1084,8 @@ class Table
CREATIONMETADATA => {:type => ::Thrift::Types::STRUCT, :name => 'creationMetadata', :class => ::CreationMetadata, :optional => true},
CATNAME => {:type => ::Thrift::Types::STRING, :name => 'catName', :optional => true},
OWNERTYPE => {:type => ::Thrift::Types::I32, :name => 'ownerType', :default => 1, :optional => true, :enum_class => ::PrincipalType},
- TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId', :default => -1, :optional => true},
WRITEID => {:type => ::Thrift::Types::I64, :name => 'writeId', :default => -1, :optional => true},
- VALIDWRITEIDLIST => {:type => ::Thrift::Types::STRING, :name => 'validWriteIdList', :optional => true},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
@@ -1106,9 +1094,6 @@ class Table
unless @ownerType.nil? || ::PrincipalType::VALID_VALUES.include?(@ownerType)
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field ownerType!')
end
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
@@ -1125,10 +1110,8 @@ class Partition
PARAMETERS = 7
PRIVILEGES = 8
CATNAME = 9
- TXNID = 10
- WRITEID = 11
- VALIDWRITEIDLIST = 12
- ISSTATSCOMPLIANT = 13
+ WRITEID = 10
+ ISSTATSCOMPLIANT = 11
FIELDS = {
VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}},
@@ -1140,18 +1123,13 @@ class Partition
PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
PRIVILEGES => {:type => ::Thrift::Types::STRUCT, :name => 'privileges', :class => ::PrincipalPrivilegeSet, :optional => true},
CATNAME => {:type => ::Thrift::Types::STRING, :name => 'catName', :optional => true},
- TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId', :default => -1, :optional => true},
WRITEID => {:type => ::Thrift::Types::I64, :name => 'writeId', :default => -1, :optional => true},
- VALIDWRITEIDLIST => {:type => ::Thrift::Types::STRING, :name => 'validWriteIdList', :optional => true},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
def validate
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
@@ -1225,10 +1203,8 @@ class PartitionSpec
SHAREDSDPARTITIONSPEC = 4
PARTITIONLIST = 5
CATNAME = 6
- TXNID = 7
- WRITEID = 8
- VALIDWRITEIDLIST = 9
- ISSTATSCOMPLIANT = 10
+ WRITEID = 7
+ ISSTATSCOMPLIANT = 8
FIELDS = {
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
@@ -1237,18 +1213,13 @@ class PartitionSpec
SHAREDSDPARTITIONSPEC => {:type => ::Thrift::Types::STRUCT, :name => 'sharedSDPartitionSpec', :class => ::PartitionSpecWithSharedSD, :optional => true},
PARTITIONLIST => {:type => ::Thrift::Types::STRUCT, :name => 'partitionList', :class => ::PartitionListComposingSpec, :optional => true},
CATNAME => {:type => ::Thrift::Types::STRING, :name => 'catName', :optional => true},
- TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId', :default => -1, :optional => true},
WRITEID => {:type => ::Thrift::Types::I64, :name => 'writeId', :default => -1, :optional => true},
- VALIDWRITEIDLIST => {:type => ::Thrift::Types::STRING, :name => 'validWriteIdList', :optional => true},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
def validate
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
@@ -1597,7 +1568,7 @@ class ColumnStatistics
STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}},
TXNID => {:type => ::Thrift::Types::I64, :name => 'txnId', :default => -1, :optional => true},
VALIDWRITEIDLIST => {:type => ::Thrift::Types::STRING, :name => 'validWriteIdList', :optional => true},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
@@ -1605,9 +1576,6 @@ class ColumnStatistics
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsDesc is unset!') unless @statsDesc
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsObj is unset!') unless @statsObj
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
@@ -1622,7 +1590,7 @@ class AggrStats
FIELDS = {
COLSTATS => {:type => ::Thrift::Types::LIST, :name => 'colStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}},
PARTSFOUND => {:type => ::Thrift::Types::I64, :name => 'partsFound'},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
@@ -1630,9 +1598,6 @@ class AggrStats
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colStats is unset!') unless @colStats
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partsFound is unset!') unless @partsFound
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
@@ -2120,16 +2085,13 @@ class TableStatsResult
FIELDS = {
TABLESTATS => {:type => ::Thrift::Types::LIST, :name => 'tableStats', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableStats is unset!') unless @tableStats
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
@@ -2142,16 +2104,13 @@ class PartitionsStatsResult
FIELDS = {
PARTSTATS => {:type => ::Thrift::Types::MAP, :name => 'partStats', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partStats is unset!') unless @partStats
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
@@ -2225,15 +2184,12 @@ class AddPartitionsResult
FIELDS = {
PARTITIONS => {:type => ::Thrift::Types::LIST, :name => 'partitions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}, :optional => true},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
def validate
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
@@ -3930,16 +3886,13 @@ class GetTableResult
FIELDS = {
TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'table', :class => ::Table},
- ISSTATSCOMPLIANT => {:type => ::Thrift::Types::I32, :name => 'isStatsCompliant', :optional => true, :enum_class => ::IsolationLevelCompliance}
+ ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}
}
def struct_fields; FIELDS; end
def validate
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table is unset!') unless @table
- unless @isStatsCompliant.nil? || ::IsolationLevelCompliance::VALID_VALUES.include?(@isStatsCompliant)
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field isStatsCompliant!')
- end
end
::Thrift::Struct.generate_accessors self
http://git-wip-us.apache.org/repos/asf/hive/blob/a47a80fe/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb b/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
index 992b785..fdcd3de 100644
--- a/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
+++ b/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
@@ -1416,21 +1416,37 @@ module ThriftHiveMetastore
return
end
- def alter_partitions_with_environment_context(req)
- send_alter_partitions_with_environment_context(req)
- return recv_alter_partitions_with_environment_context()
+ def alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context)
+ send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context)
+ recv_alter_partitions_with_environment_context()
end
- def send_alter_partitions_with_environment_context(req)
- send_message('alter_partitions_with_environment_context', Alter_partitions_with_environment_context_args, :req => req)
+ def send_alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environment_context)
+ send_message('alter_partitions_with_environment_context', Alter_partitions_with_environment_context_args, :db_name => db_name, :tbl_name => tbl_name, :new_parts => new_parts, :environment_context => environment_context)
end
def recv_alter_partitions_with_environment_context()
result = receive_message(Alter_partitions_with_environment_context_result)
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ return
+ end
+
+ def alter_partitions_with_environment_context_req(req)
+ send_alter_partitions_with_environment_context_req(req)
+ return recv_alter_partitions_with_environment_context_req()
+ end
+
+ def send_alter_partitions_with_environment_context_req(req)
+ send_message('alter_partitions_with_environment_context_req', Alter_partitions_with_environment_context_req_args, :req => req)
+ end
+
+ def recv_alter_partitions_with_environment_context_req()
+ result = receive_message(Alter_partitions_with_environment_context_req_result)
return result.success unless result.success.nil?
raise result.o1 unless result.o1.nil?
raise result.o2 unless result.o2.nil?
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'alter_partitions_with_environment_context failed: unknown result')
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'alter_partitions_with_environment_context_req failed: unknown result')
end
def alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context)
@@ -4596,7 +4612,7 @@ module ThriftHiveMetastore
args = read_args(iprot, Alter_partitions_with_environment_context_args)
result = Alter_partitions_with_environment_context_result.new()
begin
- result.success = @handler.alter_partitions_with_environment_context(args.req)
+ @handler.alter_partitions_with_environment_context(args.db_name, args.tbl_name, args.new_parts, args.environment_context)
rescue ::InvalidOperationException => o1
result.o1 = o1
rescue ::MetaException => o2
@@ -4605,6 +4621,19 @@ module ThriftHiveMetastore
write_result(result, oprot, 'alter_partitions_with_environment_context', seqid)
end
+ def process_alter_partitions_with_environment_context_req(seqid, iprot, oprot)
+ args = read_args(iprot, Alter_partitions_with_environment_context_req_args)
+ result = Alter_partitions_with_environment_context_req_result.new()
+ begin
+ result.success = @handler.alter_partitions_with_environment_context_req(args.req)
+ rescue ::InvalidOperationException => o1
+ result.o1 = o1
+ rescue ::MetaException => o2
+ result.o2 = o2
+ end
+ write_result(result, oprot, 'alter_partitions_with_environment_context_req', seqid)
+ end
+
def process_alter_partition_with_environment_context(seqid, iprot, oprot)
args = read_args(iprot, Alter_partition_with_environment_context_args)
result = Alter_partition_with_environment_context_result.new()
@@ -9295,6 +9324,46 @@ module ThriftHiveMetastore
class Alter_partitions_with_environment_context_args
include ::Thrift::Struct, ::Thrift::Struct_Union
+ DB_NAME = 1
+ TBL_NAME = 2
+ NEW_PARTS = 3
+ ENVIRONMENT_CONTEXT = 4
+
+ FIELDS = {
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
+ NEW_PARTS => {:type => ::Thrift::Types::LIST, :name => 'new_parts', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Partition}},
+ ENVIRONMENT_CONTEXT => {:type => ::Thrift::Types::STRUCT, :name => 'environment_context', :class => ::EnvironmentContext}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Alter_partitions_with_environment_context_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ O1 = 1
+ O2 = 2
+
+ FIELDS = {
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ::InvalidOperationException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => ::MetaException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Alter_partitions_with_environment_context_req_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
REQ = 1
FIELDS = {
@@ -9309,7 +9378,7 @@ module ThriftHiveMetastore
::Thrift::Struct.generate_accessors self
end
- class Alter_partitions_with_environment_context_result
+ class Alter_partitions_with_environment_context_req_result
include ::Thrift::Struct, ::Thrift::Struct_Union
SUCCESS = 0
O1 = 1
http://git-wip-us.apache.org/repos/asf/hive/blob/a47a80fe/standalone-metastore/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java
index 78ea01d..a13b40d 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/common/StatsSetupConst.java
@@ -149,6 +149,10 @@ public class StatsSetupConst {
public static final String CASCADE = "CASCADE";
+ // TODO: when alter calls are switched to req/resp models, replace these and the above with fields.
+ public static final String TXN_ID = "WRITER_TXN_ID";
+ public static final String VALID_WRITE_IDS = "WRITER_WRITE_ID";
+
public static final String TRUE = "true";
public static final String FALSE = "false";
http://git-wip-us.apache.org/repos/asf/hive/blob/a47a80fe/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
index 4e77197..8b2a6ba 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
@@ -150,7 +150,8 @@ public class HiveAlterHandler implements AlterHandler {
msdb.openTransaction();
// get old table
- oldt = msdb.getTable(catName, dbname, name, -1, null);
+ // Note: we don't verify stats here; it's done below in alterTableUpdateTableColumnStats.
+ oldt = msdb.getTable(catName, dbname, name, -1, null);
if (oldt == null) {
throw new InvalidOperationException("table " +
TableName.getQualified(catName, dbname, name) + " doesn't exist");
@@ -275,7 +276,8 @@ public class HiveAlterHandler implements AlterHandler {
columnStatsNeedUpdated.put(part, colStats);
}
}
- msdb.alterTable(catName, dbname, name, newt);
+ // Do not verify stats parameters on a partitioned table.
+ msdb.alterTable(catName, dbname, name, newt, -1, null);
// alterPartition is only for changing the partition location in the table rename
if (dataWasMoved) {
@@ -293,8 +295,8 @@ public class HiveAlterHandler implements AlterHandler {
for (Partition part : partBatch) {
partValues.add(part.getValues());
}
- msdb.alterPartitions(
- catName, newDbName, newTblName, partValues, partBatch, -1, null, -1);
+ msdb.alterPartitions(catName, newDbName, newTblName, partValues,
+ partBatch, -1, -1, null);
}
}
@@ -305,7 +307,7 @@ public class HiveAlterHandler implements AlterHandler {
msdb.updatePartitionColumnStatistics(newPartColStats, partColStats.getKey().getValues());
}
} else {
- alterTableUpdateTableColumnStats(msdb, oldt, newt);
+ alterTableUpdateTableColumnStats(msdb, oldt, newt, environmentContext);
}
} else {
// operations other than table rename
@@ -328,21 +330,23 @@ public class HiveAlterHandler implements AlterHandler {
ColumnStatistics colStats = updateOrGetPartitionColumnStats(msdb, catName, dbname, name,
part.getValues(), oldCols, oldt, part, null);
assert(colStats == null);
+ // Note: we don't do txn stats validation here; this can only delete stats?
if (cascade) {
- msdb.alterPartition(catName, dbname, name, part.getValues(), part);
+ msdb.alterPartition(catName, dbname, name, part.getValues(), part, -1, null);
} else {
// update changed properties (stats)
oldPart.setParameters(part.getParameters());
- msdb.alterPartition(catName, dbname, name, part.getValues(), oldPart);
+ msdb.alterPartition(catName, dbname, name, part.getValues(), oldPart, -1, null);
}
}
- msdb.alterTable(catName, dbname, name, newt);
+ // Don't validate table-level stats for a partitoned table.
+ msdb.alterTable(catName, dbname, name, newt, -1, null);
} else {
LOG.warn("Alter table not cascaded to partitions.");
- alterTableUpdateTableColumnStats(msdb, oldt, newt);
+ alterTableUpdateTableColumnStats(msdb, oldt, newt, environmentContext);
}
} else {
- alterTableUpdateTableColumnStats(msdb, oldt, newt);
+ alterTableUpdateTableColumnStats(msdb, oldt, newt, environmentContext);
}
}
@@ -445,6 +449,13 @@ public class HiveAlterHandler implements AlterHandler {
new_part.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(System
.currentTimeMillis() / 1000));
}
+ long txnId = -1;
+ String validWriteIds = null;
+ if (environmentContext != null && environmentContext.isSetProperties()
+ && environmentContext.getProperties().containsKey(StatsSetupConst.VALID_WRITE_IDS)) {
+ txnId = Long.parseLong(environmentContext.getProperties().get(StatsSetupConst.TXN_ID));
+ validWriteIds = environmentContext.getProperties().get(StatsSetupConst.VALID_WRITE_IDS);
+ }
//alter partition
if (part_vals == null || part_vals.size() == 0) {
@@ -472,7 +483,8 @@ public class HiveAlterHandler implements AlterHandler {
updateOrGetPartitionColumnStats(msdb, catName, dbname, name, new_part.getValues(),
oldPart.getSd().getCols(), tbl, new_part, null);
}
- msdb.alterPartition(catName, dbname, name, new_part.getValues(), new_part);
+ msdb.alterPartition(
+ catName, dbname, name, new_part.getValues(), new_part, txnId, validWriteIds);
if (transactionalListeners != null && !transactionalListeners.isEmpty()) {
MetaStoreListenerNotifier.notifyEvent(transactionalListeners,
EventMessage.EventType.ALTER_PARTITION,
@@ -607,7 +619,7 @@ public class HiveAlterHandler implements AlterHandler {
String newPartName = Warehouse.makePartName(tbl.getPartitionKeys(), new_part.getValues());
ColumnStatistics cs = updateOrGetPartitionColumnStats(msdb, catName, dbname, name, oldPart.getValues(),
oldPart.getSd().getCols(), tbl, new_part, null);
- msdb.alterPartition(catName, dbname, name, part_vals, new_part);
+ msdb.alterPartition(catName, dbname, name, part_vals, new_part, txnId, validWriteIds);
if (cs != null) {
cs.getStatsDesc().setPartName(newPartName);
try {
@@ -650,6 +662,7 @@ public class HiveAlterHandler implements AlterHandler {
return oldPart;
}
+ @Deprecated
@Override
public List<Partition> alterPartitions(final RawStore msdb, Warehouse wh, final String dbname,
final String name, final List<Partition> new_parts,
@@ -678,6 +691,7 @@ public class HiveAlterHandler implements AlterHandler {
try {
msdb.openTransaction();
+ // Note: should we pass in write ID here? We only update stats on parts so probably not.
Table tbl = msdb.getTable(catName, dbname, name, -1, null);
if (tbl == null) {
throw new InvalidObjectException(
@@ -713,7 +727,7 @@ public class HiveAlterHandler implements AlterHandler {
}
}
- msdb.alterPartitions(catName, dbname, name, partValsList, new_parts, txnId, writeIdList, writeId);
+ msdb.alterPartitions(catName, dbname, name, partValsList, new_parts, writeId, txnId, writeIdList);
Iterator<Partition> oldPartsIt = oldParts.iterator();
for (Partition newPart : new_parts) {
Partition oldPart;
@@ -781,7 +795,8 @@ public class HiveAlterHandler implements AlterHandler {
}
@VisibleForTesting
- void alterTableUpdateTableColumnStats(RawStore msdb, Table oldTable, Table newTable)
+ void alterTableUpdateTableColumnStats(RawStore msdb, Table oldTable, Table newTable,
+ EnvironmentContext ec)
throws MetaException, InvalidObjectException {
String catName = normalizeIdentifier(oldTable.isSetCatName() ? oldTable.getCatName() :
getDefaultCatalog(conf));
@@ -789,6 +804,13 @@ public class HiveAlterHandler implements AlterHandler {
String tableName = normalizeIdentifier(oldTable.getTableName());
String newDbName = newTable.getDbName().toLowerCase();
String newTableName = normalizeIdentifier(newTable.getTableName());
+ long txnId = -1;
+ String validWriteIds = null;
+ if (ec != null && ec.isSetProperties() && ec.getProperties().containsKey(
+ StatsSetupConst.VALID_WRITE_IDS)) {
+ txnId = Long.parseLong(ec.getProperties().get(StatsSetupConst.TXN_ID));
+ validWriteIds = ec.getProperties().get(StatsSetupConst.VALID_WRITE_IDS);
+ }
try {
List<FieldSchema> oldCols = oldTable.getSd().getCols();
@@ -810,7 +832,7 @@ public class HiveAlterHandler implements AlterHandler {
oldColNames.add(oldCol.getName());
}
- // Collect column stats which need to be rewritten and remove old stats
+ // Collect column stats which need to be rewritten and remove old stats.
colStats = msdb.getTableColumnStatistics(catName, dbName, tableName, oldColNames);
if (colStats == null) {
updateColumnStats = false;
@@ -845,7 +867,7 @@ public class HiveAlterHandler implements AlterHandler {
}
// Change to new table and append stats for the new table
- msdb.alterTable(catName, dbName, tableName, newTable);
+ msdb.alterTable(catName, dbName, tableName, newTable, txnId, validWriteIds);
if (updateColumnStats && !newStatsObjs.isEmpty()) {
ColumnStatisticsDesc statsDesc = colStats.getStatsDesc();
statsDesc.setDbName(newDbName);
@@ -885,6 +907,7 @@ public class HiveAlterHandler implements AlterHandler {
oldColNames.add(oldCol.getName());
}
List<String> oldPartNames = Lists.newArrayList(oldPartName);
+ // Note: doesn't take txn stats into account. This method can only remove stats.
List<ColumnStatistics> partsColStats = msdb.getPartitionColumnStatistics(catName, dbname, tblname,
oldPartNames, oldColNames);
assert (partsColStats.size() <= 1);
http://git-wip-us.apache.org/repos/asf/hive/blob/a47a80fe/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index 9c8b87e..746e6cd 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -708,6 +708,10 @@ public class HiveMetaStore extends ThriftHiveMetastore {
@Override
public TxnStore getTxnHandler() {
+ return getMsThreadTxnHandler(conf);
+ }
+
+ public static TxnStore getMsThreadTxnHandler(Configuration conf) {
TxnStore txn = threadLocalTxn.get();
if (txn == null) {
txn = TxnUtils.getTxnStore(conf);
@@ -4892,7 +4896,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
}
@Override
- public AlterPartitionsResponse alter_partitions_with_environment_context(
+ public AlterPartitionsResponse alter_partitions_with_environment_context_req(
AlterPartitionsRequest req)
throws TException {
alter_partitions_with_environment_context(
@@ -4903,6 +4907,16 @@ public class HiveMetaStore extends ThriftHiveMetastore {
return new AlterPartitionsResponse();
}
+ // The old API we are keeping for backward compat. Not used within Hive.
+ @Deprecated
+ @Override
+ public void alter_partitions_with_environment_context(final String db_name, final String tbl_name,
+ final List<Partition> new_parts, EnvironmentContext environmentContext)
+ throws TException {
+ alter_partitions_with_environment_context(db_name, tbl_name, new_parts, environmentContext,
+ -1, null, -1);
+ }
+
private void alter_partitions_with_environment_context(final String db_name, final String tbl_name,
final List<Partition> new_parts, EnvironmentContext environmentContext,
long txnId, String writeIdList, long writeId)
@@ -5655,9 +5669,12 @@ public class HiveMetaStore extends ThriftHiveMetastore {
return result;
}
+ @Deprecated
@Override
public ColumnStatistics get_partition_column_statistics(String dbName, String tableName,
String partName, String colName) throws TException {
+ // Note: this method appears to be unused within Hive.
+ // It doesn't take txn stats into account.
dbName = dbName.toLowerCase();
String[] parsedDbName = parseDbName(dbName, conf);
tableName = tableName.toLowerCase();
@@ -7530,6 +7547,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
for (ColumnStatistics csOld : csOlds) {
oldStatsMap.put(csOld.getStatsDesc().getPartName(), csOld);
}
+
// another single call to get all the partition objects
partitions = getMS().getPartitionsByNames(catName, dbName, tableName, partitionNames);
for (int index = 0; index < partitionNames.size(); index++) {
http://git-wip-us.apache.org/repos/asf/hive/blob/a47a80fe/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
index 6d117cd..cc417ea 100644
--- a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
@@ -1921,7 +1921,7 @@ public class HiveMetaStoreClient implements IMetaStoreClient, AutoCloseable {
req.setTxnId(txnId);
req.setValidWriteIdList(writeIdList);
req.setWriteId(writeId);
- client.alter_partitions_with_environment_context(req);
+ client.alter_partitions_with_environment_context_req(req);
}
@Override