You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by cw...@apache.org on 2012/11/07 05:55:04 UTC
svn commit: r1406465 [11/15] - in /hive/trunk:
common/src/java/org/apache/hadoop/hive/conf/ conf/ data/files/
metastore/if/ metastore/src/gen/thrift/gen-cpp/
metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen/...
Modified: hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py?rev=1406465&r1=1406464&r2=1406465&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py Wed Nov 7 04:55:00 2012
@@ -2142,6 +2142,902 @@ class Index:
def __ne__(self, other):
return not (self == other)
+class BooleanColumnStatsData:
+ """
+ Attributes:
+ - numTrues
+ - numFalses
+ - numNulls
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I64, 'numTrues', None, None, ), # 1
+ (2, TType.I64, 'numFalses', None, None, ), # 2
+ (3, TType.I64, 'numNulls', None, None, ), # 3
+ )
+
+ def __init__(self, numTrues=None, numFalses=None, numNulls=None,):
+ self.numTrues = numTrues
+ self.numFalses = numFalses
+ self.numNulls = numNulls
+
+ 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.I64:
+ self.numTrues = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I64:
+ self.numFalses = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I64:
+ self.numNulls = iprot.readI64();
+ 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('BooleanColumnStatsData')
+ if self.numTrues is not None:
+ oprot.writeFieldBegin('numTrues', TType.I64, 1)
+ oprot.writeI64(self.numTrues)
+ oprot.writeFieldEnd()
+ if self.numFalses is not None:
+ oprot.writeFieldBegin('numFalses', TType.I64, 2)
+ oprot.writeI64(self.numFalses)
+ oprot.writeFieldEnd()
+ if self.numNulls is not None:
+ oprot.writeFieldBegin('numNulls', TType.I64, 3)
+ oprot.writeI64(self.numNulls)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.numTrues is None:
+ raise TProtocol.TProtocolException(message='Required field numTrues is unset!')
+ if self.numFalses is None:
+ raise TProtocol.TProtocolException(message='Required field numFalses is unset!')
+ if self.numNulls is None:
+ raise TProtocol.TProtocolException(message='Required field numNulls is unset!')
+ return
+
+
+ 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 DoubleColumnStatsData:
+ """
+ Attributes:
+ - lowValue
+ - highValue
+ - numNulls
+ - numDVs
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.DOUBLE, 'lowValue', None, None, ), # 1
+ (2, TType.DOUBLE, 'highValue', None, None, ), # 2
+ (3, TType.I64, 'numNulls', None, None, ), # 3
+ (4, TType.I64, 'numDVs', None, None, ), # 4
+ )
+
+ def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None,):
+ self.lowValue = lowValue
+ self.highValue = highValue
+ self.numNulls = numNulls
+ self.numDVs = numDVs
+
+ 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.DOUBLE:
+ self.lowValue = iprot.readDouble();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.DOUBLE:
+ self.highValue = iprot.readDouble();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I64:
+ self.numNulls = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.I64:
+ self.numDVs = iprot.readI64();
+ 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('DoubleColumnStatsData')
+ if self.lowValue is not None:
+ oprot.writeFieldBegin('lowValue', TType.DOUBLE, 1)
+ oprot.writeDouble(self.lowValue)
+ oprot.writeFieldEnd()
+ if self.highValue is not None:
+ oprot.writeFieldBegin('highValue', TType.DOUBLE, 2)
+ oprot.writeDouble(self.highValue)
+ oprot.writeFieldEnd()
+ if self.numNulls is not None:
+ oprot.writeFieldBegin('numNulls', TType.I64, 3)
+ oprot.writeI64(self.numNulls)
+ oprot.writeFieldEnd()
+ if self.numDVs is not None:
+ oprot.writeFieldBegin('numDVs', TType.I64, 4)
+ oprot.writeI64(self.numDVs)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.lowValue is None:
+ raise TProtocol.TProtocolException(message='Required field lowValue is unset!')
+ if self.highValue is None:
+ raise TProtocol.TProtocolException(message='Required field highValue is unset!')
+ if self.numNulls is None:
+ raise TProtocol.TProtocolException(message='Required field numNulls is unset!')
+ if self.numDVs is None:
+ raise TProtocol.TProtocolException(message='Required field numDVs is unset!')
+ return
+
+
+ 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 LongColumnStatsData:
+ """
+ Attributes:
+ - lowValue
+ - highValue
+ - numNulls
+ - numDVs
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I64, 'lowValue', None, None, ), # 1
+ (2, TType.I64, 'highValue', None, None, ), # 2
+ (3, TType.I64, 'numNulls', None, None, ), # 3
+ (4, TType.I64, 'numDVs', None, None, ), # 4
+ )
+
+ def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None,):
+ self.lowValue = lowValue
+ self.highValue = highValue
+ self.numNulls = numNulls
+ self.numDVs = numDVs
+
+ 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.I64:
+ self.lowValue = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I64:
+ self.highValue = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I64:
+ self.numNulls = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.I64:
+ self.numDVs = iprot.readI64();
+ 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('LongColumnStatsData')
+ if self.lowValue is not None:
+ oprot.writeFieldBegin('lowValue', TType.I64, 1)
+ oprot.writeI64(self.lowValue)
+ oprot.writeFieldEnd()
+ if self.highValue is not None:
+ oprot.writeFieldBegin('highValue', TType.I64, 2)
+ oprot.writeI64(self.highValue)
+ oprot.writeFieldEnd()
+ if self.numNulls is not None:
+ oprot.writeFieldBegin('numNulls', TType.I64, 3)
+ oprot.writeI64(self.numNulls)
+ oprot.writeFieldEnd()
+ if self.numDVs is not None:
+ oprot.writeFieldBegin('numDVs', TType.I64, 4)
+ oprot.writeI64(self.numDVs)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.lowValue is None:
+ raise TProtocol.TProtocolException(message='Required field lowValue is unset!')
+ if self.highValue is None:
+ raise TProtocol.TProtocolException(message='Required field highValue is unset!')
+ if self.numNulls is None:
+ raise TProtocol.TProtocolException(message='Required field numNulls is unset!')
+ if self.numDVs is None:
+ raise TProtocol.TProtocolException(message='Required field numDVs is unset!')
+ return
+
+
+ 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 StringColumnStatsData:
+ """
+ Attributes:
+ - maxColLen
+ - avgColLen
+ - numNulls
+ - numDVs
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I64, 'maxColLen', None, None, ), # 1
+ (2, TType.DOUBLE, 'avgColLen', None, None, ), # 2
+ (3, TType.I64, 'numNulls', None, None, ), # 3
+ (4, TType.I64, 'numDVs', None, None, ), # 4
+ )
+
+ def __init__(self, maxColLen=None, avgColLen=None, numNulls=None, numDVs=None,):
+ self.maxColLen = maxColLen
+ self.avgColLen = avgColLen
+ self.numNulls = numNulls
+ self.numDVs = numDVs
+
+ 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.I64:
+ self.maxColLen = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.DOUBLE:
+ self.avgColLen = iprot.readDouble();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I64:
+ self.numNulls = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.I64:
+ self.numDVs = iprot.readI64();
+ 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('StringColumnStatsData')
+ if self.maxColLen is not None:
+ oprot.writeFieldBegin('maxColLen', TType.I64, 1)
+ oprot.writeI64(self.maxColLen)
+ oprot.writeFieldEnd()
+ if self.avgColLen is not None:
+ oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2)
+ oprot.writeDouble(self.avgColLen)
+ oprot.writeFieldEnd()
+ if self.numNulls is not None:
+ oprot.writeFieldBegin('numNulls', TType.I64, 3)
+ oprot.writeI64(self.numNulls)
+ oprot.writeFieldEnd()
+ if self.numDVs is not None:
+ oprot.writeFieldBegin('numDVs', TType.I64, 4)
+ oprot.writeI64(self.numDVs)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.maxColLen is None:
+ raise TProtocol.TProtocolException(message='Required field maxColLen is unset!')
+ if self.avgColLen is None:
+ raise TProtocol.TProtocolException(message='Required field avgColLen is unset!')
+ if self.numNulls is None:
+ raise TProtocol.TProtocolException(message='Required field numNulls is unset!')
+ if self.numDVs is None:
+ raise TProtocol.TProtocolException(message='Required field numDVs is unset!')
+ return
+
+
+ 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 BinaryColumnStatsData:
+ """
+ Attributes:
+ - maxColLen
+ - avgColLen
+ - numNulls
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I64, 'maxColLen', None, None, ), # 1
+ (2, TType.DOUBLE, 'avgColLen', None, None, ), # 2
+ (3, TType.I64, 'numNulls', None, None, ), # 3
+ )
+
+ def __init__(self, maxColLen=None, avgColLen=None, numNulls=None,):
+ self.maxColLen = maxColLen
+ self.avgColLen = avgColLen
+ self.numNulls = numNulls
+
+ 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.I64:
+ self.maxColLen = iprot.readI64();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.DOUBLE:
+ self.avgColLen = iprot.readDouble();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I64:
+ self.numNulls = iprot.readI64();
+ 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('BinaryColumnStatsData')
+ if self.maxColLen is not None:
+ oprot.writeFieldBegin('maxColLen', TType.I64, 1)
+ oprot.writeI64(self.maxColLen)
+ oprot.writeFieldEnd()
+ if self.avgColLen is not None:
+ oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2)
+ oprot.writeDouble(self.avgColLen)
+ oprot.writeFieldEnd()
+ if self.numNulls is not None:
+ oprot.writeFieldBegin('numNulls', TType.I64, 3)
+ oprot.writeI64(self.numNulls)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.maxColLen is None:
+ raise TProtocol.TProtocolException(message='Required field maxColLen is unset!')
+ if self.avgColLen is None:
+ raise TProtocol.TProtocolException(message='Required field avgColLen is unset!')
+ if self.numNulls is None:
+ raise TProtocol.TProtocolException(message='Required field numNulls is unset!')
+ return
+
+
+ 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 ColumnStatisticsData:
+ """
+ Attributes:
+ - booleanStats
+ - longStats
+ - doubleStats
+ - stringStats
+ - binaryStats
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'booleanStats', (BooleanColumnStatsData, BooleanColumnStatsData.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'longStats', (LongColumnStatsData, LongColumnStatsData.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'doubleStats', (DoubleColumnStatsData, DoubleColumnStatsData.thrift_spec), None, ), # 3
+ (4, TType.STRUCT, 'stringStats', (StringColumnStatsData, StringColumnStatsData.thrift_spec), None, ), # 4
+ (5, TType.STRUCT, 'binaryStats', (BinaryColumnStatsData, BinaryColumnStatsData.thrift_spec), None, ), # 5
+ )
+
+ def __init__(self, booleanStats=None, longStats=None, doubleStats=None, stringStats=None, binaryStats=None,):
+ self.booleanStats = booleanStats
+ self.longStats = longStats
+ self.doubleStats = doubleStats
+ self.stringStats = stringStats
+ self.binaryStats = binaryStats
+
+ 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.booleanStats = BooleanColumnStatsData()
+ self.booleanStats.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.longStats = LongColumnStatsData()
+ self.longStats.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.doubleStats = DoubleColumnStatsData()
+ self.doubleStats.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRUCT:
+ self.stringStats = StringColumnStatsData()
+ self.stringStats.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 5:
+ if ftype == TType.STRUCT:
+ self.binaryStats = BinaryColumnStatsData()
+ self.binaryStats.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('ColumnStatisticsData')
+ if self.booleanStats is not None:
+ oprot.writeFieldBegin('booleanStats', TType.STRUCT, 1)
+ self.booleanStats.write(oprot)
+ oprot.writeFieldEnd()
+ if self.longStats is not None:
+ oprot.writeFieldBegin('longStats', TType.STRUCT, 2)
+ self.longStats.write(oprot)
+ oprot.writeFieldEnd()
+ if self.doubleStats is not None:
+ oprot.writeFieldBegin('doubleStats', TType.STRUCT, 3)
+ self.doubleStats.write(oprot)
+ oprot.writeFieldEnd()
+ if self.stringStats is not None:
+ oprot.writeFieldBegin('stringStats', TType.STRUCT, 4)
+ self.stringStats.write(oprot)
+ oprot.writeFieldEnd()
+ if self.binaryStats is not None:
+ oprot.writeFieldBegin('binaryStats', TType.STRUCT, 5)
+ self.binaryStats.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ 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 ColumnStatisticsObj:
+ """
+ Attributes:
+ - colName
+ - colType
+ - statsData
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'colName', None, None, ), # 1
+ (2, TType.STRING, 'colType', None, None, ), # 2
+ (3, TType.STRUCT, 'statsData', (ColumnStatisticsData, ColumnStatisticsData.thrift_spec), None, ), # 3
+ )
+
+ def __init__(self, colName=None, colType=None, statsData=None,):
+ self.colName = colName
+ self.colType = colType
+ self.statsData = statsData
+
+ 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.colName = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.colType = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.statsData = ColumnStatisticsData()
+ self.statsData.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('ColumnStatisticsObj')
+ if self.colName is not None:
+ oprot.writeFieldBegin('colName', TType.STRING, 1)
+ oprot.writeString(self.colName)
+ oprot.writeFieldEnd()
+ if self.colType is not None:
+ oprot.writeFieldBegin('colType', TType.STRING, 2)
+ oprot.writeString(self.colType)
+ oprot.writeFieldEnd()
+ if self.statsData is not None:
+ oprot.writeFieldBegin('statsData', TType.STRUCT, 3)
+ self.statsData.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.colName is None:
+ raise TProtocol.TProtocolException(message='Required field colName is unset!')
+ if self.colType is None:
+ raise TProtocol.TProtocolException(message='Required field colType is unset!')
+ if self.statsData is None:
+ raise TProtocol.TProtocolException(message='Required field statsData is unset!')
+ return
+
+
+ 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 ColumnStatisticsDesc:
+ """
+ Attributes:
+ - isTblLevel
+ - dbName
+ - tableName
+ - partName
+ - lastAnalyzed
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.BOOL, 'isTblLevel', None, None, ), # 1
+ (2, TType.STRING, 'dbName', None, None, ), # 2
+ (3, TType.STRING, 'tableName', None, None, ), # 3
+ (4, TType.STRING, 'partName', None, None, ), # 4
+ (5, TType.I64, 'lastAnalyzed', None, None, ), # 5
+ )
+
+ def __init__(self, isTblLevel=None, dbName=None, tableName=None, partName=None, lastAnalyzed=None,):
+ self.isTblLevel = isTblLevel
+ self.dbName = dbName
+ self.tableName = tableName
+ self.partName = partName
+ self.lastAnalyzed = lastAnalyzed
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.BOOL:
+ self.isTblLevel = iprot.readBool();
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.dbName = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRING:
+ self.tableName = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.STRING:
+ self.partName = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ elif fid == 5:
+ if ftype == TType.I64:
+ self.lastAnalyzed = iprot.readI64();
+ 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('ColumnStatisticsDesc')
+ if self.isTblLevel is not None:
+ oprot.writeFieldBegin('isTblLevel', TType.BOOL, 1)
+ oprot.writeBool(self.isTblLevel)
+ oprot.writeFieldEnd()
+ if self.dbName is not None:
+ oprot.writeFieldBegin('dbName', TType.STRING, 2)
+ oprot.writeString(self.dbName)
+ oprot.writeFieldEnd()
+ if self.tableName is not None:
+ oprot.writeFieldBegin('tableName', TType.STRING, 3)
+ oprot.writeString(self.tableName)
+ oprot.writeFieldEnd()
+ if self.partName is not None:
+ oprot.writeFieldBegin('partName', TType.STRING, 4)
+ oprot.writeString(self.partName)
+ oprot.writeFieldEnd()
+ if self.lastAnalyzed is not None:
+ oprot.writeFieldBegin('lastAnalyzed', TType.I64, 5)
+ oprot.writeI64(self.lastAnalyzed)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.isTblLevel is None:
+ raise TProtocol.TProtocolException(message='Required field isTblLevel is unset!')
+ if self.dbName is None:
+ raise TProtocol.TProtocolException(message='Required field dbName is unset!')
+ if self.tableName is None:
+ raise TProtocol.TProtocolException(message='Required field tableName is unset!')
+ return
+
+
+ def __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 ColumnStatistics:
+ """
+ Attributes:
+ - statsDesc
+ - statsObj
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'statsDesc', (ColumnStatisticsDesc, ColumnStatisticsDesc.thrift_spec), None, ), # 1
+ (2, TType.LIST, 'statsObj', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 2
+ )
+
+ def __init__(self, statsDesc=None, statsObj=None,):
+ self.statsDesc = statsDesc
+ self.statsObj = statsObj
+
+ 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.statsDesc = ColumnStatisticsDesc()
+ self.statsDesc.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.LIST:
+ self.statsObj = []
+ (_etype198, _size195) = iprot.readListBegin()
+ for _i199 in xrange(_size195):
+ _elem200 = ColumnStatisticsObj()
+ _elem200.read(iprot)
+ self.statsObj.append(_elem200)
+ 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('ColumnStatistics')
+ if self.statsDesc is not None:
+ oprot.writeFieldBegin('statsDesc', TType.STRUCT, 1)
+ self.statsDesc.write(oprot)
+ oprot.writeFieldEnd()
+ if self.statsObj is not None:
+ oprot.writeFieldBegin('statsObj', TType.LIST, 2)
+ oprot.writeListBegin(TType.STRUCT, len(self.statsObj))
+ for iter201 in self.statsObj:
+ iter201.write(oprot)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.statsDesc is None:
+ raise TProtocol.TProtocolException(message='Required field statsDesc is unset!')
+ if self.statsObj is None:
+ raise TProtocol.TProtocolException(message='Required field statsObj is unset!')
+ return
+
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
class Schema:
"""
Attributes:
@@ -2171,22 +3067,22 @@ class Schema:
if fid == 1:
if ftype == TType.LIST:
self.fieldSchemas = []
- (_etype198, _size195) = iprot.readListBegin()
- for _i199 in xrange(_size195):
- _elem200 = FieldSchema()
- _elem200.read(iprot)
- self.fieldSchemas.append(_elem200)
+ (_etype205, _size202) = iprot.readListBegin()
+ for _i206 in xrange(_size202):
+ _elem207 = FieldSchema()
+ _elem207.read(iprot)
+ self.fieldSchemas.append(_elem207)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.MAP:
self.properties = {}
- (_ktype202, _vtype203, _size201 ) = iprot.readMapBegin()
- for _i205 in xrange(_size201):
- _key206 = iprot.readString();
- _val207 = iprot.readString();
- self.properties[_key206] = _val207
+ (_ktype209, _vtype210, _size208 ) = iprot.readMapBegin()
+ for _i212 in xrange(_size208):
+ _key213 = iprot.readString();
+ _val214 = iprot.readString();
+ self.properties[_key213] = _val214
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -2203,16 +3099,16 @@ class Schema:
if self.fieldSchemas is not None:
oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas))
- for iter208 in self.fieldSchemas:
- iter208.write(oprot)
+ for iter215 in self.fieldSchemas:
+ iter215.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.properties is not None:
oprot.writeFieldBegin('properties', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
- for kiter209,viter210 in self.properties.items():
- oprot.writeString(kiter209)
- oprot.writeString(viter210)
+ for kiter216,viter217 in self.properties.items():
+ oprot.writeString(kiter216)
+ oprot.writeString(viter217)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -2259,11 +3155,11 @@ class EnvironmentContext:
if fid == 1:
if ftype == TType.MAP:
self.properties = {}
- (_ktype212, _vtype213, _size211 ) = iprot.readMapBegin()
- for _i215 in xrange(_size211):
- _key216 = iprot.readString();
- _val217 = iprot.readString();
- self.properties[_key216] = _val217
+ (_ktype219, _vtype220, _size218 ) = iprot.readMapBegin()
+ for _i222 in xrange(_size218):
+ _key223 = iprot.readString();
+ _val224 = iprot.readString();
+ self.properties[_key223] = _val224
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -2280,9 +3176,9 @@ class EnvironmentContext:
if self.properties is not None:
oprot.writeFieldBegin('properties', TType.MAP, 1)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
- for kiter218,viter219 in self.properties.items():
- oprot.writeString(kiter218)
- oprot.writeString(viter219)
+ for kiter225,viter226 in self.properties.items():
+ oprot.writeString(kiter225)
+ oprot.writeString(viter226)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -2995,3 +3891,66 @@ class ConfigValSecurityException(Excepti
def __ne__(self, other):
return not (self == other)
+
+class InvalidInputException(Exception):
+ """
+ Attributes:
+ - message
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'message', None, None, ), # 1
+ )
+
+ def __init__(self, message=None,):
+ self.message = message
+
+ 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.message = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('InvalidInputException')
+ if self.message is not None:
+ oprot.writeFieldBegin('message', TType.STRING, 1)
+ oprot.writeString(self.message)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __str__(self):
+ return repr(self)
+
+ 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)
Modified: hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb?rev=1406465&r1=1406464&r2=1406465&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb Wed Nov 7 04:55:00 2012
@@ -448,6 +448,247 @@ class Index
::Thrift::Struct.generate_accessors self
end
+class BooleanColumnStatsData
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ NUMTRUES = 1
+ NUMFALSES = 2
+ NUMNULLS = 3
+
+ FIELDS = {
+ NUMTRUES => {:type => ::Thrift::Types::I64, :name => 'numTrues'},
+ NUMFALSES => {:type => ::Thrift::Types::I64, :name => 'numFalses'},
+ NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numTrues is unset!') unless @numTrues
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numFalses is unset!') unless @numFalses
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class DoubleColumnStatsData
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ LOWVALUE = 1
+ HIGHVALUE = 2
+ NUMNULLS = 3
+ NUMDVS = 4
+
+ FIELDS = {
+ LOWVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'lowValue'},
+ HIGHVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'highValue'},
+ NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
+ NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lowValue is unset!') unless @lowValue
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field highValue is unset!') unless @highValue
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class LongColumnStatsData
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ LOWVALUE = 1
+ HIGHVALUE = 2
+ NUMNULLS = 3
+ NUMDVS = 4
+
+ FIELDS = {
+ LOWVALUE => {:type => ::Thrift::Types::I64, :name => 'lowValue'},
+ HIGHVALUE => {:type => ::Thrift::Types::I64, :name => 'highValue'},
+ NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
+ NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lowValue is unset!') unless @lowValue
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field highValue is unset!') unless @highValue
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class StringColumnStatsData
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ MAXCOLLEN = 1
+ AVGCOLLEN = 2
+ NUMNULLS = 3
+ NUMDVS = 4
+
+ FIELDS = {
+ MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'},
+ AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'},
+ NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'},
+ NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class BinaryColumnStatsData
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ MAXCOLLEN = 1
+ AVGCOLLEN = 2
+ NUMNULLS = 3
+
+ FIELDS = {
+ MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'},
+ AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'},
+ NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class ColumnStatisticsData < ::Thrift::Union
+ include ::Thrift::Struct_Union
+ class << self
+ def booleanStats(val)
+ ColumnStatisticsData.new(:booleanStats, val)
+ end
+
+ def longStats(val)
+ ColumnStatisticsData.new(:longStats, val)
+ end
+
+ def doubleStats(val)
+ ColumnStatisticsData.new(:doubleStats, val)
+ end
+
+ def stringStats(val)
+ ColumnStatisticsData.new(:stringStats, val)
+ end
+
+ def binaryStats(val)
+ ColumnStatisticsData.new(:binaryStats, val)
+ end
+ end
+
+ BOOLEANSTATS = 1
+ LONGSTATS = 2
+ DOUBLESTATS = 3
+ STRINGSTATS = 4
+ BINARYSTATS = 5
+
+ FIELDS = {
+ BOOLEANSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'booleanStats', :class => BooleanColumnStatsData},
+ LONGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'longStats', :class => LongColumnStatsData},
+ DOUBLESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'doubleStats', :class => DoubleColumnStatsData},
+ STRINGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'stringStats', :class => StringColumnStatsData},
+ BINARYSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'binaryStats', :class => BinaryColumnStatsData}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
+ end
+
+ ::Thrift::Union.generate_accessors self
+end
+
+class ColumnStatisticsObj
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ COLNAME = 1
+ COLTYPE = 2
+ STATSDATA = 3
+
+ FIELDS = {
+ COLNAME => {:type => ::Thrift::Types::STRING, :name => 'colName'},
+ COLTYPE => {:type => ::Thrift::Types::STRING, :name => 'colType'},
+ STATSDATA => {:type => ::Thrift::Types::STRUCT, :name => 'statsData', :class => ColumnStatisticsData}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colName is unset!') unless @colName
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colType is unset!') unless @colType
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsData is unset!') unless @statsData
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class ColumnStatisticsDesc
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ ISTBLLEVEL = 1
+ DBNAME = 2
+ TABLENAME = 3
+ PARTNAME = 4
+ LASTANALYZED = 5
+
+ FIELDS = {
+ ISTBLLEVEL => {:type => ::Thrift::Types::BOOL, :name => 'isTblLevel'},
+ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'},
+ TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'},
+ PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName', :optional => true},
+ LASTANALYZED => {:type => ::Thrift::Types::I64, :name => 'lastAnalyzed', :optional => true}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isTblLevel is unset!') if @isTblLevel.nil?
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class ColumnStatistics
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ STATSDESC = 1
+ STATSOBJ = 2
+
+ FIELDS = {
+ STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ColumnStatisticsDesc},
+ STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ColumnStatisticsObj}}
+ }
+
+ def struct_fields; FIELDS; end
+
+ 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
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
class Schema
include ::Thrift::Struct, ::Thrift::Struct_Union
FIELDSCHEMAS = 1
@@ -713,3 +954,24 @@ class ConfigValSecurityException < ::Thr
::Thrift::Struct.generate_accessors self
end
+class InvalidInputException < ::Thrift::Exception
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ def initialize(message=nil)
+ super()
+ self.message = message
+ end
+
+ MESSAGE = 1
+
+ FIELDS = {
+ MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
Modified: hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb?rev=1406465&r1=1406464&r2=1406465&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb Wed Nov 7 04:55:00 2012
@@ -948,6 +948,120 @@ module ThriftHiveMetastore
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result')
end
+ def update_table_column_statistics(stats_obj)
+ send_update_table_column_statistics(stats_obj)
+ return recv_update_table_column_statistics()
+ end
+
+ def send_update_table_column_statistics(stats_obj)
+ send_message('update_table_column_statistics', Update_table_column_statistics_args, :stats_obj => stats_obj)
+ end
+
+ def recv_update_table_column_statistics()
+ result = receive_message(Update_table_column_statistics_result)
+ return result.success unless result.success.nil?
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ raise result.o3 unless result.o3.nil?
+ raise result.o4 unless result.o4.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_table_column_statistics failed: unknown result')
+ end
+
+ def update_partition_column_statistics(stats_obj)
+ send_update_partition_column_statistics(stats_obj)
+ return recv_update_partition_column_statistics()
+ end
+
+ def send_update_partition_column_statistics(stats_obj)
+ send_message('update_partition_column_statistics', Update_partition_column_statistics_args, :stats_obj => stats_obj)
+ end
+
+ def recv_update_partition_column_statistics()
+ result = receive_message(Update_partition_column_statistics_result)
+ return result.success unless result.success.nil?
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ raise result.o3 unless result.o3.nil?
+ raise result.o4 unless result.o4.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_partition_column_statistics failed: unknown result')
+ end
+
+ def get_table_column_statistics(db_name, tbl_name, col_name)
+ send_get_table_column_statistics(db_name, tbl_name, col_name)
+ return recv_get_table_column_statistics()
+ end
+
+ def send_get_table_column_statistics(db_name, tbl_name, col_name)
+ send_message('get_table_column_statistics', Get_table_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name)
+ end
+
+ def recv_get_table_column_statistics()
+ result = receive_message(Get_table_column_statistics_result)
+ return result.success unless result.success.nil?
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ raise result.o3 unless result.o3.nil?
+ raise result.o4 unless result.o4.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_column_statistics failed: unknown result')
+ end
+
+ def get_partition_column_statistics(db_name, tbl_name, part_name, col_name)
+ send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name)
+ return recv_get_partition_column_statistics()
+ end
+
+ def send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name)
+ send_message('get_partition_column_statistics', Get_partition_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name)
+ end
+
+ def recv_get_partition_column_statistics()
+ result = receive_message(Get_partition_column_statistics_result)
+ return result.success unless result.success.nil?
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ raise result.o3 unless result.o3.nil?
+ raise result.o4 unless result.o4.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_column_statistics failed: unknown result')
+ end
+
+ def delete_partition_column_statistics(db_name, tbl_name, part_name, col_name)
+ send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name)
+ return recv_delete_partition_column_statistics()
+ end
+
+ def send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name)
+ send_message('delete_partition_column_statistics', Delete_partition_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name)
+ end
+
+ def recv_delete_partition_column_statistics()
+ result = receive_message(Delete_partition_column_statistics_result)
+ return result.success unless result.success.nil?
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ raise result.o3 unless result.o3.nil?
+ raise result.o4 unless result.o4.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_partition_column_statistics failed: unknown result')
+ end
+
+ def delete_table_column_statistics(db_name, tbl_name, col_name)
+ send_delete_table_column_statistics(db_name, tbl_name, col_name)
+ return recv_delete_table_column_statistics()
+ end
+
+ def send_delete_table_column_statistics(db_name, tbl_name, col_name)
+ send_message('delete_table_column_statistics', Delete_table_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name)
+ end
+
+ def recv_delete_table_column_statistics()
+ result = receive_message(Delete_table_column_statistics_result)
+ return result.success unless result.success.nil?
+ raise result.o1 unless result.o1.nil?
+ raise result.o2 unless result.o2.nil?
+ raise result.o3 unless result.o3.nil?
+ raise result.o4 unless result.o4.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_table_column_statistics failed: unknown result')
+ end
+
def create_role(role)
send_create_role(role)
return recv_create_role()
@@ -1921,6 +2035,108 @@ module ThriftHiveMetastore
write_result(result, oprot, 'get_index_names', seqid)
end
+ def process_update_table_column_statistics(seqid, iprot, oprot)
+ args = read_args(iprot, Update_table_column_statistics_args)
+ result = Update_table_column_statistics_result.new()
+ begin
+ result.success = @handler.update_table_column_statistics(args.stats_obj)
+ rescue NoSuchObjectException => o1
+ result.o1 = o1
+ rescue InvalidObjectException => o2
+ result.o2 = o2
+ rescue MetaException => o3
+ result.o3 = o3
+ rescue InvalidInputException => o4
+ result.o4 = o4
+ end
+ write_result(result, oprot, 'update_table_column_statistics', seqid)
+ end
+
+ def process_update_partition_column_statistics(seqid, iprot, oprot)
+ args = read_args(iprot, Update_partition_column_statistics_args)
+ result = Update_partition_column_statistics_result.new()
+ begin
+ result.success = @handler.update_partition_column_statistics(args.stats_obj)
+ rescue NoSuchObjectException => o1
+ result.o1 = o1
+ rescue InvalidObjectException => o2
+ result.o2 = o2
+ rescue MetaException => o3
+ result.o3 = o3
+ rescue InvalidInputException => o4
+ result.o4 = o4
+ end
+ write_result(result, oprot, 'update_partition_column_statistics', seqid)
+ end
+
+ def process_get_table_column_statistics(seqid, iprot, oprot)
+ args = read_args(iprot, Get_table_column_statistics_args)
+ result = Get_table_column_statistics_result.new()
+ begin
+ result.success = @handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name)
+ rescue NoSuchObjectException => o1
+ result.o1 = o1
+ rescue MetaException => o2
+ result.o2 = o2
+ rescue InvalidInputException => o3
+ result.o3 = o3
+ rescue InvalidObjectException => o4
+ result.o4 = o4
+ end
+ write_result(result, oprot, 'get_table_column_statistics', seqid)
+ end
+
+ def process_get_partition_column_statistics(seqid, iprot, oprot)
+ args = read_args(iprot, Get_partition_column_statistics_args)
+ result = Get_partition_column_statistics_result.new()
+ begin
+ result.success = @handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name)
+ rescue NoSuchObjectException => o1
+ result.o1 = o1
+ rescue MetaException => o2
+ result.o2 = o2
+ rescue InvalidInputException => o3
+ result.o3 = o3
+ rescue InvalidObjectException => o4
+ result.o4 = o4
+ end
+ write_result(result, oprot, 'get_partition_column_statistics', seqid)
+ end
+
+ def process_delete_partition_column_statistics(seqid, iprot, oprot)
+ args = read_args(iprot, Delete_partition_column_statistics_args)
+ result = Delete_partition_column_statistics_result.new()
+ begin
+ result.success = @handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name)
+ rescue NoSuchObjectException => o1
+ result.o1 = o1
+ rescue MetaException => o2
+ result.o2 = o2
+ rescue InvalidObjectException => o3
+ result.o3 = o3
+ rescue InvalidInputException => o4
+ result.o4 = o4
+ end
+ write_result(result, oprot, 'delete_partition_column_statistics', seqid)
+ end
+
+ def process_delete_table_column_statistics(seqid, iprot, oprot)
+ args = read_args(iprot, Delete_table_column_statistics_args)
+ result = Delete_table_column_statistics_result.new()
+ begin
+ result.success = @handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name)
+ rescue NoSuchObjectException => o1
+ result.o1 = o1
+ rescue MetaException => o2
+ result.o2 = o2
+ rescue InvalidObjectException => o3
+ result.o3 = o3
+ rescue InvalidInputException => o4
+ result.o4 = o4
+ end
+ write_result(result, oprot, 'delete_table_column_statistics', seqid)
+ end
+
def process_create_role(seqid, iprot, oprot)
args = read_args(iprot, Create_role_args)
result = Create_role_result.new()
@@ -4248,6 +4464,266 @@ module ThriftHiveMetastore
::Thrift::Struct.generate_accessors self
end
+ class Update_table_column_statistics_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ STATS_OBJ = 1
+
+ FIELDS = {
+ STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ColumnStatistics}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Update_table_column_statistics_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ O1 = 1
+ O2 = 2
+ O3 = 3
+ O4 = 4
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException},
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException},
+ O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Update_partition_column_statistics_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ STATS_OBJ = 1
+
+ FIELDS = {
+ STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ColumnStatistics}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Update_partition_column_statistics_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ O1 = 1
+ O2 = 2
+ O3 = 3
+ O4 = 4
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException},
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException},
+ O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Get_table_column_statistics_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ DB_NAME = 1
+ TBL_NAME = 2
+ COL_NAME = 3
+
+ FIELDS = {
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
+ COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Get_table_column_statistics_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ O1 = 1
+ O2 = 2
+ O3 = 3
+ O4 = 4
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ColumnStatistics},
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException},
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidInputException},
+ O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidObjectException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Get_partition_column_statistics_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ DB_NAME = 1
+ TBL_NAME = 2
+ PART_NAME = 3
+ COL_NAME = 4
+
+ FIELDS = {
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
+ PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'},
+ COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Get_partition_column_statistics_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ O1 = 1
+ O2 = 2
+ O3 = 3
+ O4 = 4
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ColumnStatistics},
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException},
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidInputException},
+ O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidObjectException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Delete_partition_column_statistics_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ DB_NAME = 1
+ TBL_NAME = 2
+ PART_NAME = 3
+ COL_NAME = 4
+
+ FIELDS = {
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
+ PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'},
+ COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Delete_partition_column_statistics_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ O1 = 1
+ O2 = 2
+ O3 = 3
+ O4 = 4
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException},
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidObjectException},
+ O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Delete_table_column_statistics_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ DB_NAME = 1
+ TBL_NAME = 2
+ COL_NAME = 3
+
+ FIELDS = {
+ DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'},
+ TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'},
+ COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Delete_table_column_statistics_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+ O1 = 1
+ O2 = 2
+ O3 = 3
+ O4 = 4
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
+ O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException},
+ O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException},
+ O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidObjectException},
+ O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
class Create_role_args
include ::Thrift::Struct, ::Thrift::Struct_Union
ROLE = 1
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java?rev=1406465&r1=1406464&r2=1406465&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java Wed Nov 7 04:55:00 2012
@@ -55,6 +55,9 @@ import org.apache.hadoop.hive.common.met
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
import org.apache.hadoop.hive.metastore.api.AlreadyExistsException;
+import org.apache.hadoop.hive.metastore.api.ColumnStatistics;
+import org.apache.hadoop.hive.metastore.api.ColumnStatisticsDesc;
+import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj;
import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException;
import org.apache.hadoop.hive.metastore.api.Constants;
import org.apache.hadoop.hive.metastore.api.Database;
@@ -65,6 +68,7 @@ import org.apache.hadoop.hive.metastore.
import org.apache.hadoop.hive.metastore.api.HiveObjectType;
import org.apache.hadoop.hive.metastore.api.Index;
import org.apache.hadoop.hive.metastore.api.IndexAlreadyExistsException;
+import org.apache.hadoop.hive.metastore.api.InvalidInputException;
import org.apache.hadoop.hive.metastore.api.InvalidObjectException;
import org.apache.hadoop.hive.metastore.api.InvalidOperationException;
import org.apache.hadoop.hive.metastore.api.InvalidPartitionException;
@@ -648,7 +652,7 @@ public class HiveMetaStore extends Thrif
private void drop_database_core(RawStore ms,
final String name, final boolean deleteData, final boolean cascade)
throws NoSuchObjectException, InvalidOperationException, MetaException,
- IOException {
+ IOException, InvalidObjectException, InvalidInputException {
boolean success = false;
Database db = null;
List<Path> tablePaths = new ArrayList<Path>();
@@ -1113,10 +1117,9 @@ public class HiveMetaStore extends Thrif
return (ms.getTable(dbname, name) != null);
}
- private void drop_table_core(final RawStore ms, final String dbname,
- final String name, final boolean deleteData)
- throws NoSuchObjectException, MetaException, IOException {
-
+ private void drop_table_core(final RawStore ms, final String dbname, final String name,
+ final boolean deleteData) throws NoSuchObjectException, MetaException, IOException,
+ InvalidObjectException, InvalidInputException {
boolean success = false;
boolean isExternal = false;
Path tblPath = null;
@@ -1243,11 +1246,14 @@ public class HiveMetaStore extends Thrif
* @return
* @throws MetaException
* @throws IOException
+ * @throws InvalidInputException
+ * @throws InvalidObjectException
+ * @throws NoSuchObjectException
*/
private List<Path> dropPartitionsAndGetLocations(RawStore ms, String dbName,
- String tableName, Path tablePath, List<FieldSchema> partitionKeys, boolean checkLocation)
- throws MetaException, IOException {
-
+ String tableName, Path tablePath, List<FieldSchema> partitionKeys, boolean checkLocation)
+ throws MetaException, IOException, NoSuchObjectException, InvalidObjectException,
+ InvalidInputException {
int partitionBatchSize = HiveConf.getIntVar(hiveConf,
ConfVars.METASTORE_BATCH_RETRIEVE_MAX);
Path tableDnsPath = null;
@@ -1816,9 +1822,9 @@ public class HiveMetaStore extends Thrif
}
private boolean drop_partition_common(RawStore ms, String db_name, String tbl_name,
- List<String> part_vals, final boolean deleteData)
- throws MetaException, NoSuchObjectException, IOException {
-
+ List<String> part_vals, final boolean deleteData)
+ throws MetaException, NoSuchObjectException, IOException, InvalidObjectException,
+ InvalidInputException {
boolean success = false;
Path partPath = null;
Table tbl = null;
@@ -2628,7 +2634,7 @@ public class HiveMetaStore extends Thrif
private boolean drop_partition_by_name_core(final RawStore ms,
final String db_name, final String tbl_name, final String part_name,
final boolean deleteData) throws NoSuchObjectException,
- MetaException, TException, IOException {
+ MetaException, TException, IOException, InvalidObjectException, InvalidInputException {
List<String> partVals = null;
try {
@@ -2913,7 +2919,7 @@ public class HiveMetaStore extends Thrif
private boolean drop_index_by_name_core(final RawStore ms,
final String dbName, final String tblName,
final String indexName, final boolean deleteData) throws NoSuchObjectException,
- MetaException, TException, IOException {
+ MetaException, TException, IOException, InvalidObjectException, InvalidInputException {
boolean success = false;
Path tblPath = null;
@@ -3066,6 +3072,195 @@ public class HiveMetaStore extends Thrif
return ret;
}
+ private String lowerCaseConvertPartName(String partName) throws MetaException {
+ boolean isFirst = true;
+ Map<String, String> partSpec = Warehouse.makeEscSpecFromName(partName);
+ String convertedPartName = new String();
+
+ for (Map.Entry<String, String> entry : partSpec.entrySet()) {
+ String partColName = entry.getKey();
+ String partColVal = entry.getValue();
+
+ if (!isFirst) {
+ convertedPartName += "/";
+ } else {
+ isFirst = false;
+ }
+ convertedPartName += partColName.toLowerCase() + "=" + partColVal;
+ }
+ return convertedPartName;
+ }
+
+ public ColumnStatistics get_table_column_statistics(String dbName, String tableName,
+ String colName) throws NoSuchObjectException, MetaException, TException,
+ InvalidInputException, InvalidObjectException
+ {
+ dbName = dbName.toLowerCase();
+ tableName = tableName.toLowerCase();
+ colName = colName.toLowerCase();
+ startFunction("get_column_statistics_by_table: db=" + dbName + " table=" + tableName +
+ " column=" + colName);
+ ColumnStatistics statsObj = null;
+ try {
+ statsObj = getMS().getTableColumnStatistics(dbName, tableName, colName);
+ } finally {
+ endFunction("get_column_statistics_by_table: ", statsObj != null);
+ }
+ return statsObj;
+ }
+
+ public ColumnStatistics get_partition_column_statistics(String dbName, String tableName,
+ String partName, String colName) throws NoSuchObjectException, MetaException,
+ InvalidInputException, TException,InvalidObjectException
+ {
+ dbName = dbName.toLowerCase();
+ tableName = tableName.toLowerCase();
+ colName = colName.toLowerCase();
+ String convertedPartName = lowerCaseConvertPartName(partName);
+ startFunction("get_column_statistics_by_partition: db=" + dbName + " table=" + tableName +
+ " partition=" + convertedPartName + " column=" + colName);
+ ColumnStatistics statsObj = null;
+
+ try {
+ List<String> partVals = getPartValsFromName(getMS(), dbName, tableName, partName);
+ statsObj = getMS().getPartitionColumnStatistics(dbName, tableName, convertedPartName,
+ partVals, colName);
+ } finally {
+ endFunction("get_column_statistics_by_partition: ", statsObj != null);
+ }
+ return statsObj;
+ }
+
+ public boolean update_table_column_statistics(ColumnStatistics colStats)
+ throws NoSuchObjectException,InvalidObjectException,MetaException,TException,
+ InvalidInputException
+ {
+ String dbName = null;
+ String tableName = null;
+ String colName = null;
+ ColumnStatisticsDesc statsDesc = colStats.getStatsDesc();
+ dbName = statsDesc.getDbName().toLowerCase();
+ tableName = statsDesc.getTableName().toLowerCase();
+
+ statsDesc.setDbName(dbName);
+ statsDesc.setTableName(tableName);
+ long time = System.currentTimeMillis() / 1000;
+ statsDesc.setLastAnalyzed(time);
+
+ List<ColumnStatisticsObj> statsObjs = colStats.getStatsObj();
+
+ for (ColumnStatisticsObj statsObj:statsObjs) {
+ colName = statsObj.getColName().toLowerCase();
+ statsObj.setColName(colName);
+ startFunction("write_column_statistics: db=" + dbName + " table=" + tableName +
+ " column=" + colName);
+ }
+
+ colStats.setStatsDesc(statsDesc);
+ colStats.setStatsObj(statsObjs);
+
+ boolean ret = false;
+
+ try {
+ ret = getMS().updateTableColumnStatistics(colStats);
+ return ret;
+ } finally {
+ endFunction("write_column_statistics: ", ret != false);
+ }
+ }
+
+ public boolean update_partition_column_statistics(ColumnStatistics colStats)
+ throws NoSuchObjectException,InvalidObjectException,MetaException,TException,
+ InvalidInputException
+ {
+
+ String dbName = null;
+ String tableName = null;
+ String partName = null;
+ String colName = null;
+
+ ColumnStatisticsDesc statsDesc = colStats.getStatsDesc();
+ dbName = statsDesc.getDbName().toLowerCase();
+ tableName = statsDesc.getTableName().toLowerCase();
+ partName = lowerCaseConvertPartName(statsDesc.getPartName());
+
+ statsDesc.setDbName(dbName);
+ statsDesc.setTableName(tableName);
+ statsDesc.setPartName(partName);
+
+ long time = System.currentTimeMillis() / 1000;
+ statsDesc.setLastAnalyzed(time);
+
+ List<ColumnStatisticsObj> statsObjs = colStats.getStatsObj();
+
+ for (ColumnStatisticsObj statsObj:statsObjs) {
+ colName = statsObj.getColName().toLowerCase();
+ statsObj.setColName(colName);
+ startFunction("write_partition_column_statistics: db=" + dbName + " table=" + tableName +
+ " part=" + partName + "column=" + colName);
+ }
+
+ colStats.setStatsDesc(statsDesc);
+ colStats.setStatsObj(statsObjs);
+
+ boolean ret = false;
+
+ try {
+ List<String> partVals = getPartValsFromName(getMS(), dbName,
+ tableName, partName);
+ ret = getMS().updatePartitionColumnStatistics(colStats, partVals);
+ return ret;
+ } finally {
+ endFunction("write_partition_column_statistics: ", ret != false);
+ }
+ }
+
+ public boolean delete_partition_column_statistics(String dbName, String tableName,
+ String partName, String colName) throws NoSuchObjectException, MetaException,
+ InvalidObjectException, TException, InvalidInputException
+ {
+ dbName = dbName.toLowerCase();
+ tableName = tableName.toLowerCase();
+ if (colName != null) {
+ colName = colName.toLowerCase();
+ }
+ String convertedPartName = lowerCaseConvertPartName(partName);
+ startFunction("delete_column_statistics_by_partition: db=" + dbName + " table=" + tableName +
+ " partition=" + convertedPartName + " column=" + colName);
+ boolean ret = false;
+
+ try {
+ List<String> partVals = getPartValsFromName(getMS(), dbName, tableName, convertedPartName);
+ ret = getMS().deletePartitionColumnStatistics(dbName, tableName,
+ convertedPartName, partVals, colName);
+ } finally {
+ endFunction("delete_column_statistics_by_partition: ", ret != false);
+ }
+ return ret;
+ }
+
+ public boolean delete_table_column_statistics(String dbName, String tableName, String colName)
+ throws NoSuchObjectException, MetaException, InvalidObjectException, TException,
+ InvalidInputException
+ {
+ dbName = dbName.toLowerCase();
+ tableName = tableName.toLowerCase();
+
+ if (colName != null) {
+ colName = colName.toLowerCase();
+ }
+ startFunction("delete_column_statistics_by_table: db=" + dbName + " table=" + tableName +
+ " column=" + colName);
+
+ boolean ret = false;
+ try {
+ ret = getMS().deleteTableColumnStatistics(dbName, tableName, colName);
+ } finally {
+ endFunction("delete_column_statistics_by_table: ", ret != false);
+ }
+ return ret;
+ }
+
@Override
public List<Partition> get_partitions_by_filter(final String dbName,
final String tblName, final String filter, final short maxParts)
@@ -3810,6 +4005,7 @@ public class HiveMetaStore extends Thrif
}
+
/**
* Discard a current delegation token.
*
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java?rev=1406465&r1=1406464&r2=1406465&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java Wed Nov 7 04:55:00 2012
@@ -41,12 +41,14 @@ import org.apache.commons.logging.LogFac
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
import org.apache.hadoop.hive.metastore.api.AlreadyExistsException;
+import org.apache.hadoop.hive.metastore.api.ColumnStatistics;
import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException;
import org.apache.hadoop.hive.metastore.api.Database;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege;
import org.apache.hadoop.hive.metastore.api.HiveObjectRef;
import org.apache.hadoop.hive.metastore.api.Index;
+import org.apache.hadoop.hive.metastore.api.InvalidInputException;
import org.apache.hadoop.hive.metastore.api.InvalidObjectException;
import org.apache.hadoop.hive.metastore.api.InvalidOperationException;
import org.apache.hadoop.hive.metastore.api.InvalidPartitionException;
@@ -943,6 +945,50 @@ public class HiveMetaStoreClient impleme
return client.get_indexes(dbName, tblName, max);
}
+ /** {@inheritDoc} */
+ public boolean updateTableColumnStatistics(ColumnStatistics statsObj)
+ throws NoSuchObjectException, InvalidObjectException, MetaException, TException,
+ InvalidInputException{
+ return client.update_table_column_statistics(statsObj);
+ }
+
+ /** {@inheritDoc} */
+ public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj)
+ throws NoSuchObjectException, InvalidObjectException, MetaException, TException,
+ InvalidInputException{
+ return client.update_partition_column_statistics(statsObj);
+ }
+
+ /** {@inheritDoc} */
+ public ColumnStatistics getTableColumnStatistics(String dbName, String tableName,String colName)
+ throws NoSuchObjectException, MetaException, TException, InvalidInputException,
+ InvalidObjectException {
+ return client.get_table_column_statistics(dbName, tableName, colName);
+ }
+
+ /** {@inheritDoc} */
+ public ColumnStatistics getPartitionColumnStatistics(String dbName, String tableName,
+ String partName, String colName) throws NoSuchObjectException, MetaException, TException,
+ InvalidInputException, InvalidObjectException {
+ return client.get_partition_column_statistics(dbName, tableName, partName, colName);
+ }
+
+ /** {@inheritDoc} */
+ public boolean deletePartitionColumnStatistics(String dbName, String tableName, String partName,
+ String colName) throws NoSuchObjectException, InvalidObjectException, MetaException,
+ TException, InvalidInputException
+ {
+ return client.delete_partition_column_statistics(dbName, tableName, partName, colName);
+ }
+
+ /** {@inheritDoc} */
+ public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName)
+ throws NoSuchObjectException, InvalidObjectException, MetaException, TException,
+ InvalidInputException
+ {
+ return client.delete_table_column_statistics(dbName, tableName, colName);
+ }
+
/**
* @param db
* @param tableName
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java?rev=1406465&r1=1406464&r2=1406465&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java Wed Nov 7 04:55:00 2012
@@ -22,12 +22,14 @@ import java.util.List;
import java.util.Map;
import org.apache.hadoop.hive.metastore.api.AlreadyExistsException;
+import org.apache.hadoop.hive.metastore.api.ColumnStatistics;
import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException;
import org.apache.hadoop.hive.metastore.api.Database;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege;
import org.apache.hadoop.hive.metastore.api.HiveObjectRef;
import org.apache.hadoop.hive.metastore.api.Index;
+import org.apache.hadoop.hive.metastore.api.InvalidInputException;
import org.apache.hadoop.hive.metastore.api.InvalidObjectException;
import org.apache.hadoop.hive.metastore.api.InvalidOperationException;
import org.apache.hadoop.hive.metastore.api.InvalidPartitionException;
@@ -726,6 +728,105 @@ public interface IMetaStoreClient {
MetaException, TException;
/**
+ * Write table level column statistics to persistent store
+ * @param statsObj
+ * @return boolean indicating the status of the operation
+ * @throws NoSuchObjectException
+ * @throws InvalidObjectException
+ * @throws MetaException
+ * @throws TException
+ * @throws InvalidInputException
+ */
+
+ public boolean updateTableColumnStatistics(ColumnStatistics statsObj)
+ throws NoSuchObjectException, InvalidObjectException, MetaException, TException,
+ InvalidInputException;
+
+ /**
+ * Write partition level column statistics to persistent store
+ * @param statsObj
+ * @return boolean indicating the status of the operation
+ * @throws NoSuchObjectException
+ * @throws InvalidObjectException
+ * @throws MetaException
+ * @throws TException
+ * @throws InvalidInputException
+ */
+
+ public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj)
+ throws NoSuchObjectException, InvalidObjectException, MetaException, TException,
+ InvalidInputException;
+
+ /**
+ * Get table level column statistics given dbName, tableName and colName
+ * @param dbName
+ * @param tableName
+ * @param colName
+ * @return ColumnStatistics struct for a given db, table and col
+ * @throws NoSuchObjectException
+ * @throws MetaException
+ * @throws TException
+ * @throws InvalidInputException
+ * @throws InvalidObjectException
+ */
+
+ public ColumnStatistics getTableColumnStatistics(String dbName, String tableName, String colName)
+ throws NoSuchObjectException, MetaException, TException,
+ InvalidInputException, InvalidObjectException;
+
+ /**
+ * Get partition level column statistics given dbName, tableName, partitionName and colName
+ * @param dbName
+ * @param tableName
+ * @param partitionName
+ * @param colName
+ * @return ColumnStatistics struct for a given db, table, partition and col
+ * @throws NoSuchObjectException
+ * @throws MetaException
+ * @throws TException
+ * @throws InvalidInputException
+ * @throws InvalidObjectException
+ */
+
+ public ColumnStatistics getPartitionColumnStatistics(String dbName, String tableName,
+ String partitionName, String colName) throws NoSuchObjectException, MetaException, TException,
+ InvalidInputException, InvalidObjectException;
+
+ /**
+ * Delete partition level column statistics given dbName, tableName, partName and colName
+ * @param dbName
+ * @param tableName
+ * @param partName
+ * @param colName
+ * @return boolean indicating outcome of the operation
+ * @throws NoSuchObjectException
+ * @throws InvalidObjectException
+ * @throws MetaException
+ * @throws TException
+ * @throws InvalidInputException
+ */
+
+ public boolean deletePartitionColumnStatistics(String dbName, String tableName,
+ String partName, String colName) throws NoSuchObjectException, MetaException,
+ InvalidObjectException, TException, InvalidInputException;
+
+ /**
+ * Delete table level column statistics given dbName, tableName and colName
+ * @param dbName
+ * @param tableName
+ * @param colName
+ * @return boolean indicating the outcome of the operation
+ * @throws NoSuchObjectException
+ * @throws MetaException
+ * @throws InvalidObjectException
+ * @throws TException
+ * @throws InvalidInputException
+ */
+
+ public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) throws
+ NoSuchObjectException, MetaException, InvalidObjectException, TException, InvalidInputException;
+
+ /**
* @param role
* role object
* @return true on success