/tags/release-0.1-rc2/hive/external/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
Python | 2625 lines | 2196 code | 254 blank | 175 comment | 725 complexity | 4deaee89168db6706450dbd402da15cf MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
- #
- # Autogenerated by Thrift
- #
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- #
- from thrift.Thrift import *
- import fb303.ttypes
- from thrift.transport import TTransport
- from thrift.protocol import TBinaryProtocol, TProtocol
- try:
- from thrift.protocol import fastbinary
- except:
- fastbinary = None
- class HiveObjectType:
- GLOBAL = 1
- DATABASE = 2
- TABLE = 3
- PARTITION = 4
- COLUMN = 5
- _VALUES_TO_NAMES = {
- 1: "GLOBAL",
- 2: "DATABASE",
- 3: "TABLE",
- 4: "PARTITION",
- 5: "COLUMN",
- }
- _NAMES_TO_VALUES = {
- "GLOBAL": 1,
- "DATABASE": 2,
- "TABLE": 3,
- "PARTITION": 4,
- "COLUMN": 5,
- }
- class PrincipalType:
- USER = 1
- ROLE = 2
- GROUP = 3
- _VALUES_TO_NAMES = {
- 1: "USER",
- 2: "ROLE",
- 3: "GROUP",
- }
- _NAMES_TO_VALUES = {
- "USER": 1,
- "ROLE": 2,
- "GROUP": 3,
- }
- class Version:
- """
- Attributes:
- - version
- - comments
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'version', None, None, ), # 1
- (2, TType.STRING, 'comments', None, None, ), # 2
- )
- def __init__(self, version=None, comments=None,):
- self.version = version
- self.comments = comments
- 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.version = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.comments = 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('Version')
- if self.version != None:
- oprot.writeFieldBegin('version', TType.STRING, 1)
- oprot.writeString(self.version)
- oprot.writeFieldEnd()
- if self.comments != None:
- oprot.writeFieldBegin('comments', TType.STRING, 2)
- oprot.writeString(self.comments)
- 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 FieldSchema:
- """
- Attributes:
- - name
- - type
- - comment
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'name', None, None, ), # 1
- (2, TType.STRING, 'type', None, None, ), # 2
- (3, TType.STRING, 'comment', None, None, ), # 3
- )
- def __init__(self, name=None, type=None, comment=None,):
- self.name = name
- self.type = type
- self.comment = comment
- 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.name = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.type = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.comment = 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('FieldSchema')
- if self.name != None:
- oprot.writeFieldBegin('name', TType.STRING, 1)
- oprot.writeString(self.name)
- oprot.writeFieldEnd()
- if self.type != None:
- oprot.writeFieldBegin('type', TType.STRING, 2)
- oprot.writeString(self.type)
- oprot.writeFieldEnd()
- if self.comment != None:
- oprot.writeFieldBegin('comment', TType.STRING, 3)
- oprot.writeString(self.comment)
- 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 Type:
- """
- Attributes:
- - name
- - type1
- - type2
- - fields
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'name', None, None, ), # 1
- (2, TType.STRING, 'type1', None, None, ), # 2
- (3, TType.STRING, 'type2', None, None, ), # 3
- (4, TType.LIST, 'fields', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 4
- )
- def __init__(self, name=None, type1=None, type2=None, fields=None,):
- self.name = name
- self.type1 = type1
- self.type2 = type2
- self.fields = fields
- 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.name = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.type1 = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.type2 = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.LIST:
- self.fields = []
- (_etype3, _size0) = iprot.readListBegin()
- for _i4 in xrange(_size0):
- _elem5 = FieldSchema()
- _elem5.read(iprot)
- self.fields.append(_elem5)
- 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('Type')
- if self.name != None:
- oprot.writeFieldBegin('name', TType.STRING, 1)
- oprot.writeString(self.name)
- oprot.writeFieldEnd()
- if self.type1 != None:
- oprot.writeFieldBegin('type1', TType.STRING, 2)
- oprot.writeString(self.type1)
- oprot.writeFieldEnd()
- if self.type2 != None:
- oprot.writeFieldBegin('type2', TType.STRING, 3)
- oprot.writeString(self.type2)
- oprot.writeFieldEnd()
- if self.fields != None:
- oprot.writeFieldBegin('fields', TType.LIST, 4)
- oprot.writeListBegin(TType.STRUCT, len(self.fields))
- for iter6 in self.fields:
- iter6.write(oprot)
- oprot.writeListEnd()
- 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 HiveObjectRef:
- """
- Attributes:
- - objectType
- - dbName
- - objectName
- - partValues
- - columnName
- """
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'objectType', None, None, ), # 1
- (2, TType.STRING, 'dbName', None, None, ), # 2
- (3, TType.STRING, 'objectName', None, None, ), # 3
- (4, TType.LIST, 'partValues', (TType.STRING,None), None, ), # 4
- (5, TType.STRING, 'columnName', None, None, ), # 5
- )
- def __init__(self, objectType=None, dbName=None, objectName=None, partValues=None, columnName=None,):
- self.objectType = objectType
- self.dbName = dbName
- self.objectName = objectName
- self.partValues = partValues
- self.columnName = columnName
- 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.I32:
- self.objectType = iprot.readI32();
- 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.objectName = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.LIST:
- self.partValues = []
- (_etype10, _size7) = iprot.readListBegin()
- for _i11 in xrange(_size7):
- _elem12 = iprot.readString();
- self.partValues.append(_elem12)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.STRING:
- self.columnName = 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('HiveObjectRef')
- if self.objectType != None:
- oprot.writeFieldBegin('objectType', TType.I32, 1)
- oprot.writeI32(self.objectType)
- oprot.writeFieldEnd()
- if self.dbName != None:
- oprot.writeFieldBegin('dbName', TType.STRING, 2)
- oprot.writeString(self.dbName)
- oprot.writeFieldEnd()
- if self.objectName != None:
- oprot.writeFieldBegin('objectName', TType.STRING, 3)
- oprot.writeString(self.objectName)
- oprot.writeFieldEnd()
- if self.partValues != None:
- oprot.writeFieldBegin('partValues', TType.LIST, 4)
- oprot.writeListBegin(TType.STRING, len(self.partValues))
- for iter13 in self.partValues:
- oprot.writeString(iter13)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.columnName != None:
- oprot.writeFieldBegin('columnName', TType.STRING, 5)
- oprot.writeString(self.columnName)
- 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 PrivilegeGrantInfo:
- """
- Attributes:
- - privilege
- - createTime
- - grantor
- - grantorType
- - grantOption
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'privilege', None, None, ), # 1
- (2, TType.I32, 'createTime', None, None, ), # 2
- (3, TType.STRING, 'grantor', None, None, ), # 3
- (4, TType.I32, 'grantorType', None, None, ), # 4
- (5, TType.BOOL, 'grantOption', None, None, ), # 5
- )
- def __init__(self, privilege=None, createTime=None, grantor=None, grantorType=None, grantOption=None,):
- self.privilege = privilege
- self.createTime = createTime
- self.grantor = grantor
- self.grantorType = grantorType
- self.grantOption = grantOption
- 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.privilege = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I32:
- self.createTime = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.grantor = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.I32:
- self.grantorType = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.BOOL:
- self.grantOption = iprot.readBool();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('PrivilegeGrantInfo')
- if self.privilege != None:
- oprot.writeFieldBegin('privilege', TType.STRING, 1)
- oprot.writeString(self.privilege)
- oprot.writeFieldEnd()
- if self.createTime != None:
- oprot.writeFieldBegin('createTime', TType.I32, 2)
- oprot.writeI32(self.createTime)
- oprot.writeFieldEnd()
- if self.grantor != None:
- oprot.writeFieldBegin('grantor', TType.STRING, 3)
- oprot.writeString(self.grantor)
- oprot.writeFieldEnd()
- if self.grantorType != None:
- oprot.writeFieldBegin('grantorType', TType.I32, 4)
- oprot.writeI32(self.grantorType)
- oprot.writeFieldEnd()
- if self.grantOption != None:
- oprot.writeFieldBegin('grantOption', TType.BOOL, 5)
- oprot.writeBool(self.grantOption)
- 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 HiveObjectPrivilege:
- """
- Attributes:
- - hiveObject
- - principalName
- - principalType
- - grantInfo
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1
- (2, TType.STRING, 'principalName', None, None, ), # 2
- (3, TType.I32, 'principalType', None, None, ), # 3
- (4, TType.STRUCT, 'grantInfo', (PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec), None, ), # 4
- )
- def __init__(self, hiveObject=None, principalName=None, principalType=None, grantInfo=None,):
- self.hiveObject = hiveObject
- self.principalName = principalName
- self.principalType = principalType
- self.grantInfo = grantInfo
- 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.hiveObject = HiveObjectRef()
- self.hiveObject.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.principalName = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.I32:
- self.principalType = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRUCT:
- self.grantInfo = PrivilegeGrantInfo()
- self.grantInfo.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('HiveObjectPrivilege')
- if self.hiveObject != None:
- oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1)
- self.hiveObject.write(oprot)
- oprot.writeFieldEnd()
- if self.principalName != None:
- oprot.writeFieldBegin('principalName', TType.STRING, 2)
- oprot.writeString(self.principalName)
- oprot.writeFieldEnd()
- if self.principalType != None:
- oprot.writeFieldBegin('principalType', TType.I32, 3)
- oprot.writeI32(self.principalType)
- oprot.writeFieldEnd()
- if self.grantInfo != None:
- oprot.writeFieldBegin('grantInfo', TType.STRUCT, 4)
- self.grantInfo.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 PrivilegeBag:
- """
- Attributes:
- - privileges
- """
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'privileges', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 1
- )
- def __init__(self, privileges=None,):
- self.privileges = privileges
- 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.LIST:
- self.privileges = []
- (_etype17, _size14) = iprot.readListBegin()
- for _i18 in xrange(_size14):
- _elem19 = HiveObjectPrivilege()
- _elem19.read(iprot)
- self.privileges.append(_elem19)
- 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('PrivilegeBag')
- if self.privileges != None:
- oprot.writeFieldBegin('privileges', TType.LIST, 1)
- oprot.writeListBegin(TType.STRUCT, len(self.privileges))
- for iter20 in self.privileges:
- iter20.write(oprot)
- oprot.writeListEnd()
- 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 PrincipalPrivilegeSet:
- """
- Attributes:
- - userPrivileges
- - groupPrivileges
- - rolePrivileges
- """
- thrift_spec = (
- None, # 0
- (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 1
- (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 2
- (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 3
- )
- def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,):
- self.userPrivileges = userPrivileges
- self.groupPrivileges = groupPrivileges
- self.rolePrivileges = rolePrivileges
- 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.MAP:
- self.userPrivileges = {}
- (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin()
- for _i25 in xrange(_size21):
- _key26 = iprot.readString();
- _val27 = []
- (_etype31, _size28) = iprot.readListBegin()
- for _i32 in xrange(_size28):
- _elem33 = PrivilegeGrantInfo()
- _elem33.read(iprot)
- _val27.append(_elem33)
- iprot.readListEnd()
- self.userPrivileges[_key26] = _val27
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.MAP:
- self.groupPrivileges = {}
- (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin()
- for _i38 in xrange(_size34):
- _key39 = iprot.readString();
- _val40 = []
- (_etype44, _size41) = iprot.readListBegin()
- for _i45 in xrange(_size41):
- _elem46 = PrivilegeGrantInfo()
- _elem46.read(iprot)
- _val40.append(_elem46)
- iprot.readListEnd()
- self.groupPrivileges[_key39] = _val40
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.MAP:
- self.rolePrivileges = {}
- (_ktype48, _vtype49, _size47 ) = iprot.readMapBegin()
- for _i51 in xrange(_size47):
- _key52 = iprot.readString();
- _val53 = []
- (_etype57, _size54) = iprot.readListBegin()
- for _i58 in xrange(_size54):
- _elem59 = PrivilegeGrantInfo()
- _elem59.read(iprot)
- _val53.append(_elem59)
- iprot.readListEnd()
- self.rolePrivileges[_key52] = _val53
- iprot.readMapEnd()
- 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('PrincipalPrivilegeSet')
- if self.userPrivileges != None:
- oprot.writeFieldBegin('userPrivileges', TType.MAP, 1)
- oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.userPrivileges))
- for kiter60,viter61 in self.userPrivileges.items():
- oprot.writeString(kiter60)
- oprot.writeListBegin(TType.STRUCT, len(viter61))
- for iter62 in viter61:
- iter62.write(oprot)
- oprot.writeListEnd()
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.groupPrivileges != None:
- oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2)
- oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.groupPrivileges))
- for kiter63,viter64 in self.groupPrivileges.items():
- oprot.writeString(kiter63)
- oprot.writeListBegin(TType.STRUCT, len(viter64))
- for iter65 in viter64:
- iter65.write(oprot)
- oprot.writeListEnd()
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.rolePrivileges != None:
- oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3)
- oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.rolePrivileges))
- for kiter66,viter67 in self.rolePrivileges.items():
- oprot.writeString(kiter66)
- oprot.writeListBegin(TType.STRUCT, len(viter67))
- for iter68 in viter67:
- iter68.write(oprot)
- oprot.writeListEnd()
- oprot.writeMapEnd()
- 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 Role:
- """
- Attributes:
- - roleName
- - createTime
- - ownerName
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'roleName', None, None, ), # 1
- (2, TType.I32, 'createTime', None, None, ), # 2
- (3, TType.STRING, 'ownerName', None, None, ), # 3
- )
- def __init__(self, roleName=None, createTime=None, ownerName=None,):
- self.roleName = roleName
- self.createTime = createTime
- self.ownerName = ownerName
- 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.roleName = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I32:
- self.createTime = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.ownerName = 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('Role')
- if self.roleName != None:
- oprot.writeFieldBegin('roleName', TType.STRING, 1)
- oprot.writeString(self.roleName)
- oprot.writeFieldEnd()
- if self.createTime != None:
- oprot.writeFieldBegin('createTime', TType.I32, 2)
- oprot.writeI32(self.createTime)
- oprot.writeFieldEnd()
- if self.ownerName != None:
- oprot.writeFieldBegin('ownerName', TType.STRING, 3)
- oprot.writeString(self.ownerName)
- 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 Database:
- """
- Attributes:
- - name
- - description
- - locationUri
- - parameters
- - privileges
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'name', None, None, ), # 1
- (2, TType.STRING, 'description', None, None, ), # 2
- (3, TType.STRING, 'locationUri', None, None, ), # 3
- (4, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 4
- (5, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 5
- )
- def __init__(self, name=None, description=None, locationUri=None, parameters=None, privileges=None,):
- self.name = name
- self.description = description
- self.locationUri = locationUri
- self.parameters = parameters
- self.privileges = privileges
- 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.name = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.description = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.locationUri = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.MAP:
- self.parameters = {}
- (_ktype70, _vtype71, _size69 ) = iprot.readMapBegin()
- for _i73 in xrange(_size69):
- _key74 = iprot.readString();
- _val75 = iprot.readString();
- self.parameters[_key74] = _val75
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.STRUCT:
- self.privileges = PrincipalPrivilegeSet()
- self.privileges.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('Database')
- if self.name != None:
- oprot.writeFieldBegin('name', TType.STRING, 1)
- oprot.writeString(self.name)
- oprot.writeFieldEnd()
- if self.description != None:
- oprot.writeFieldBegin('description', TType.STRING, 2)
- oprot.writeString(self.description)
- oprot.writeFieldEnd()
- if self.locationUri != None:
- oprot.writeFieldBegin('locationUri', TType.STRING, 3)
- oprot.writeString(self.locationUri)
- oprot.writeFieldEnd()
- if self.parameters != None:
- oprot.writeFieldBegin('parameters', TType.MAP, 4)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
- for kiter76,viter77 in self.parameters.items():
- oprot.writeString(kiter76)
- oprot.writeString(viter77)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.privileges != None:
- oprot.writeFieldBegin('privileges', TType.STRUCT, 5)
- self.privileges.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 SerDeInfo:
- """
- Attributes:
- - name
- - serializationLib
- - parameters
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'name', None, None, ), # 1
- (2, TType.STRING, 'serializationLib', None, None, ), # 2
- (3, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 3
- )
- def __init__(self, name=None, serializationLib=None, parameters=None,):
- self.name = name
- self.serializationLib = serializationLib
- self.parameters = parameters
- 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.name = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.serializationLib = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.MAP:
- self.parameters = {}
- (_ktype79, _vtype80, _size78 ) = iprot.readMapBegin()
- for _i82 in xrange(_size78):
- _key83 = iprot.readString();
- _val84 = iprot.readString();
- self.parameters[_key83] = _val84
- iprot.readMapEnd()
- 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('SerDeInfo')
- if self.name != None:
- oprot.writeFieldBegin('name', TType.STRING, 1)
- oprot.writeString(self.name)
- oprot.writeFieldEnd()
- if self.serializationLib != None:
- oprot.writeFieldBegin('serializationLib', TType.STRING, 2)
- oprot.writeString(self.serializationLib)
- oprot.writeFieldEnd()
- if self.parameters != None:
- oprot.writeFieldBegin('parameters', TType.MAP, 3)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
- for kiter85,viter86 in self.parameters.items():
- oprot.writeString(kiter85)
- oprot.writeString(viter86)
- oprot.writeMapEnd()
- 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 Order:
- """
- Attributes:
- - col
- - order
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'col', None, None, ), # 1
- (2, TType.I32, 'order', None, None, ), # 2
- )
- def __init__(self, col=None, order=None,):
- self.col = col
- self.order = order
- 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.col = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I32:
- self.order = iprot.readI32();
- 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('Order')
- if self.col != None:
- oprot.writeFieldBegin('col', TType.STRING, 1)
- oprot.writeString(self.col)
- oprot.writeFieldEnd()
- if self.order != None:
- oprot.writeFieldBegin('order', TType.I32, 2)
- oprot.writeI32(self.order)
- 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 StorageDescriptor:
- """
- Attributes:
- - cols
- - location
- - inputFormat
- - outputFormat
- - compressed
- - numBuckets
- - serdeInfo
- - bucketCols
- - sortCols
- - parameters
- """
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'cols', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1
- (2, TType.STRING, 'location', None, None, ), # 2
- (3, TType.STRING, 'inputFormat', None, None, ), # 3
- (4, TType.STRING, 'outputFormat', None, None, ), # 4
- (5, TType.BOOL, 'compressed', None, None, ), # 5
- (6, TType.I32, 'numBuckets', None, None, ), # 6
- (7, TType.STRUCT, 'serdeInfo', (SerDeInfo, SerDeInfo.thrift_spec), None, ), # 7
- (8, TType.LIST, 'bucketCols', (TType.STRING,None), None, ), # 8
- (9, TType.LIST, 'sortCols', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 9
- (10, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 10
- )
- def __init__(self, cols=None, location=None, inputFormat=None, outputFormat=None, compressed=None, numBuckets=None, serdeInfo=None, bucketCols=None, sortCols=None, parameters=None,):
- self.cols = cols
- self.location = location
- self.inputFormat = inputFormat
- self.outputFormat = outputFormat
- self.compressed = compressed
- self.numBuckets = numBuckets
- self.serdeInfo = serdeInfo
- self.bucketCols = bucketCols
- self.sortCols = sortCols
- self.parameters = parameters
- 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.LIST:
- self.cols = []
- (_etype90, _size87) = iprot.readListBegin()
- for _i91 in xrange(_size87):
- _elem92 = FieldSchema()
- _elem92.read(iprot)
- self.cols.append(_elem92)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.location = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.inputFormat = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRING:
- self.outputFormat = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.BOOL:
- self.compressed = iprot.readBool();
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.I32:
- self.numBuckets = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.STRUCT:
- self.serdeInfo = SerDeInfo()
- self.serdeInfo.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.LIST:
- self.bucketCols = []
- (_etype96, _size93) = iprot.readListBegin()
- for _i97 in xrange(_size93):
- _elem98 = iprot.readString();
- self.bucketCols.append(_elem98)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.LIST:
- self.sortCols = []
- (_etype102, _size99) = iprot.readListBegin()
- for _i103 in xrange(_size99):
- _elem104 = Order()
- _elem104.read(iprot)
- self.sortCols.append(_elem104)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.MAP:
- self.parameters = {}
- (_ktype106, _vtype107, _size105 ) = iprot.readMapBegin()
- for _i109 in xrange(_size105):
- _key110 = iprot.readString();
- _val111 = iprot.readString();
- self.parameters[_key110] = _val111
- iprot.readMapEnd()
- 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('StorageDescriptor')
- if self.cols != None:
- oprot.writeFieldBegin('cols', TType.LIST, 1)
- oprot.writeListBegin(TType.STRUCT, len(self.cols))
- for iter112 in self.cols:
- iter112.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.location != None:
- oprot.writeFieldBegin('location', TType.STRING, 2)
- oprot.writeString(self.location)
- oprot.writeFieldEnd()
- if self.inputFormat != None:
- oprot.writeFieldBegin('inputFormat', TType.STRING, 3)
- oprot.writeString(self.inputFormat)
- oprot.writeFieldEnd()
- if self.outputFormat != None:
- oprot.writeFieldBegin('outputFormat', TType.STRING, 4)
- oprot.writeString(self.outputFormat)
- oprot.writeFieldEnd()
- if self.compressed != None:
- oprot.writeFieldBegin('compressed', TType.BOOL, 5)
- oprot.writeBool(self.compressed)
- oprot.writeFieldEnd()
- if self.numBuckets != None:
- oprot.writeFieldBegin('numBuckets', TType.I32, 6)
- oprot.writeI32(self.numBuckets)
- oprot.writeFieldEnd()
- if self.serdeInfo != None:
- oprot.writeFieldBegin('serdeInfo', TType.STRUCT, 7)
- self.serdeInfo.write(oprot)
- oprot.writeFieldEnd()
- if self.bucketCols != None:
- oprot.writeFieldBegin('bucketCols', TType.LIST, 8)
- oprot.writeListBegin(TType.STRING, len(self.bucketCols))
- for iter113 in self.bucketCols:
- oprot.writeString(iter113)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.sortCols != None:
- oprot.writeFieldBegin('sortCols', TType.LIST, 9)
- oprot.writeListBegin(TType.STRUCT, len(self.sortCols))
- for iter114 in self.sortCols:
- iter114.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.parameters != None:
- oprot.writeFieldBegin('parameters', TType.MAP, 10)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
- for kiter115,viter116 in self.parameters.items():
- oprot.writeString(kiter115)
- oprot.writeString(viter116)
- oprot.writeMapEnd()
- 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 Table:
- """
- Attributes:
- - tableName
- - dbName
- - owner
- - createTime
- - lastAccessTime
- - retention
- - sd
- - partitionKeys
- - parameters
- - viewOriginalText
- - viewExpandedText
- - tableType
- - privileges
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'tableName', None, None, ), # 1
- (2, TType.STRING, 'dbName', None, None, ), # 2
- (3, TType.STRING, 'owner', None, None, ), # 3
- (4, TType.I32, 'createTime', None, None, ), # 4
- (5, TType.I32, 'lastAccessTime', None, None, ), # 5
- (6, TType.I32, 'retention', None, None, ), # 6
- (7, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 7
- (8, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 8
- (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9
- (10, TType.STRING, 'viewOriginalText', None, None, ), # 10
- (11, TType.STRING, 'viewExpandedText', None, None, ), # 11
- (12, TType.STRING, 'tableType', None, None, ), # 12
- (13, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 13
- )
- 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,):
- self.tableName = tableName
- self.dbName = dbName
- self.owner = owner
- self.createTime = createTime
- self.lastAccessTime = lastAccessTime
- self.retention = retention
- self.sd = sd
- self.partitionKeys = partitionKeys
- self.parameters = parameters
- self.viewOriginalText = viewOriginalText
- self.viewExpandedText = viewExpandedText
- self.tableType = tableType
- self.privileges = privileges
- 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.tableName = iprot.readString();
- 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.owner = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.I32:
- self.createTime = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.lastAccessTime = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.I32:
- self.retention = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.STRUCT:
- self.sd = StorageDescriptor()
- self.sd.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.LIST:
- self.partitionKeys = []
- (_etype120, _size117) = iprot.readListBegin()
- for _i121 in xrange(_size117):
- _elem122 = FieldSchema()
- _elem122.read(iprot)
- self.partitionKeys.append(_elem122)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.MAP:
- self.parameters = {}
- (_ktype124, _vtype125, _size123 ) = iprot.readMapBegin()
- for _i127 in xrange(_size123):
- _key128 = iprot.readString();
- _val129 = iprot.readString();
- self.parameters[_key128] = _val129
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.STRING:
- self.viewOriginalText = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 11:
- if ftype == TType.STRING:
- self.viewExpandedText = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 12:
- if ftype == TType.STRING:
- self.tableType = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 13:
- if ftype == TType.STRUCT:
- self.privileges = PrincipalPrivilegeSet()
- self.privileges.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('Table')
- if self.tableName != None:
- oprot.writeFieldBegin('tableName', TType.STRING, 1)
- oprot.writeString(self.tableName)
- oprot.writeFieldEnd()
- if self.dbName != None:
- oprot.writeFieldBegin('dbName', TType.STRING, 2)
- oprot.writeString(self.dbName)
- oprot.writeFieldEnd()
- if self.owner != None:
- oprot.writeFieldBegin('owner', TType.STRING, 3)
- oprot.writeString(self.owner)
- oprot.writeFieldEnd()
- if self.createTime != None:
- oprot.writeFieldBegin('createTime', TType.I32, 4)
- oprot.writeI32(self.createTime)
- oprot.writeFieldEnd()
- if self.lastAccessTime != None:
- oprot.writeFieldBegin('lastAccessTime', TType.I32, 5)
- oprot.writeI32(self.lastAccessTime)
- oprot.writeFieldEnd()
- if self.retention != None:
- oprot.writeFieldBegin('retention', TType.I32, 6)
- oprot.writeI32(self.retention)
- oprot.writeFieldEnd()
- if self.sd != None:
- oprot.writeFieldBegin('sd', TType.STRUCT, 7)
- self.sd.write(oprot)
- oprot.writeFieldEnd()
- if self.partitionKeys != None:
- oprot.writeFieldBegin('partitionKeys', TType.LIST, 8)
- oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys))
- for iter130 in self.partitionKeys:
- iter130.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.parameters != None:
- oprot.writeFieldBegin('parameters', TType.MAP, 9)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
- for kiter131,viter132 in self.parameters.items():
- oprot.writeString(kiter131)
- oprot.writeString(viter132)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.viewOriginalText != None:
- oprot.writeFieldBegin('viewOriginalText', TType.STRING, 10)
- oprot.writeString(self.viewOriginalText)
- oprot.writeFieldEnd()
- if self.viewExpandedText != None:
- oprot.writeFieldBegin('viewExpandedText', TType.STRING, 11)
- oprot.writeString(self.viewExpandedText)
- oprot.writeFieldEnd()
- if self.tableType != None:
- oprot.writeFieldBegin('tableType', TType.STRING, 12)
- oprot.writeString(self.tableType)
- oprot.writeFieldEnd()
- if self.privileges != None:
- oprot.writeFieldBegin('privileges', TType.STRUCT, 13)
- self.privileges.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 Partition:
- """
- Attributes:
- - values
- - dbName
- - tableName
- - createTime
- - lastAccessTime
- - sd
- - parameters
- - privileges
- """
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'values', (TType.STRING,None), None, ), # 1
- (2, TType.STRING, 'dbName', None, None, ), # 2
- (3, TType.STRING, 'tableName', None, None, ), # 3
- (4, TType.I32, 'createTime', None, None, ), # 4
- (5, TType.I32, 'lastAccessTime', None, None, ), # 5
- (6, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 6
- (7, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 7
- (8, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 8
- )
- def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None, privileges=None,):
- self.values = values
- self.dbName = dbName
- self.tableName = tableName
- self.createTime = createTime
- self.lastAccessTime = lastAccessTime
- self.sd = sd
- self.parameters = parameters
- self.privileges = privileges
- 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.LIST:
- self.values = []
- (_etype136, _size133) = iprot.readListBegin()
- for _i137 in xrange(_size133):
- _elem138 = iprot.readString();
- self.values.append(_elem138)
- iprot.readListEnd()
- 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.I32:
- self.createTime = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.lastAccessTime = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.STRUCT:
- self.sd = StorageDescriptor()
- self.sd.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.MAP:
- self.parameters = {}
- (_ktype140, _vtype141, _size139 ) = iprot.readMapBegin()
- for _i143 in xrange(_size139):
- _key144 = iprot.readString();
- _val145 = iprot.readString();
- self.parameters[_key144] = _val145
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.STRUCT:
- self.privileges = PrincipalPrivilegeSet()
- self.privileges.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('Partition')
- if self.values != None:
- oprot.writeFieldBegin('values', TType.LIST, 1)
- oprot.writeListBegin(TType.STRING, len(self.values))
- for iter146 in self.values:
- oprot.writeString(iter146)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.dbName != None:
- oprot.writeFieldBegin('dbName', TType.STRING, 2)
- oprot.writeString(self.dbName)
- oprot.writeFieldEnd()
- if self.tableName != None:
- oprot.writeFieldBegin('tableName', TType.STRING, 3)
- oprot.writeString(self.tableName)
- oprot.writeFieldEnd()
- if self.createTime != None:
- oprot.writeFieldBegin('createTime', TType.I32, 4)
- oprot.writeI32(self.createTime)
- oprot.writeFieldEnd()
- if self.lastAccessTime != None:
- oprot.writeFieldBegin('lastAccessTime', TType.I32, 5)
- oprot.writeI32(self.lastAccessTime)
- oprot.writeFieldEnd()
- if self.sd != None:
- oprot.writeFieldBegin('sd', TType.STRUCT, 6)
- self.sd.write(oprot)
- oprot.writeFieldEnd()
- if self.parameters != None:
- oprot.writeFieldBegin('parameters', TType.MAP, 7)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
- for kiter147,viter148 in self.parameters.items():
- oprot.writeString(kiter147)
- oprot.writeString(viter148)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.privileges != None:
- oprot.writeFieldBegin('privileges', TType.STRUCT, 8)
- self.privileges.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 Index:
- """
- Attributes:
- - indexName
- - indexHandlerClass
- - dbName
- - origTableName
- - createTime
- - lastAccessTime
- - indexTableName
- - sd
- - parameters
- - deferredRebuild
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'indexName', None, None, ), # 1
- (2, TType.STRING, 'indexHandlerClass', None, None, ), # 2
- (3, TType.STRING, 'dbName', None, None, ), # 3
- (4, TType.STRING, 'origTableName', None, None, ), # 4
- (5, TType.I32, 'createTime', None, None, ), # 5
- (6, TType.I32, 'lastAccessTime', None, None, ), # 6
- (7, TType.STRING, 'indexTableName', None, None, ), # 7
- (8, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 8
- (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9
- (10, TType.BOOL, 'deferredRebuild', None, None, ), # 10
- )
- def __init__(self, indexName=None, indexHandlerClass=None, dbName=None, origTableName=None, createTime=None, lastAccessTime=None, indexTableName=None, sd=None, parameters=None, deferredRebuild=None,):
- self.indexName = indexName
- self.indexHandlerClass = indexHandlerClass
- self.dbName = dbName
- self.origTableName = origTableName
- self.createTime = createTime
- self.lastAccessTime = lastAccessTime
- self.indexTableName = indexTableName
- self.sd = sd
- self.parameters = parameters
- self.deferredRebuild = deferredRebuild
- 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.indexName = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.indexHandlerClass = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.dbName = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRING:
- self.origTableName = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.createTime = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.I32:
- self.lastAccessTime = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.STRING:
- self.indexTableName = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.STRUCT:
- self.sd = StorageDescriptor()
- self.sd.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.MAP:
- self.parameters = {}
- (_ktype150, _vtype151, _size149 ) = iprot.readMapBegin()
- for _i153 in xrange(_size149):
- _key154 = iprot.readString();
- _val155 = iprot.readString();
- self.parameters[_key154] = _val155
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.BOOL:
- self.deferredRebuild = iprot.readBool();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('Index')
- if self.indexName != None:
- oprot.writeFieldBegin('indexName', TType.STRING, 1)
- oprot.writeString(self.indexName)
- oprot.writeFieldEnd()
- if self.indexHandlerClass != None:
- oprot.writeFieldBegin('indexHandlerClass', TType.STRING, 2)
- oprot.writeString(self.indexHandlerClass)
- oprot.writeFieldEnd()
- if self.dbName != None:
- oprot.writeFieldBegin('dbName', TType.STRING, 3)
- oprot.writeString(self.dbName)
- oprot.writeFieldEnd()
- if self.origTableName != None:
- oprot.writeFieldBegin('origTableName', TType.STRING, 4)
- oprot.writeString(self.origTableName)
- oprot.writeFieldEnd()
- if self.createTime != None:
- oprot.writeFieldBegin('createTime', TType.I32, 5)
- oprot.writeI32(self.createTime)
- oprot.writeFieldEnd()
- if self.lastAccessTime != None:
- oprot.writeFieldBegin('lastAccessTime', TType.I32, 6)
- oprot.writeI32(self.lastAccessTime)
- oprot.writeFieldEnd()
- if self.indexTableName != None:
- oprot.writeFieldBegin('indexTableName', TType.STRING, 7)
- oprot.writeString(self.indexTableName)
- oprot.writeFieldEnd()
- if self.sd != None:
- oprot.writeFieldBegin('sd', TType.STRUCT, 8)
- self.sd.write(oprot)
- oprot.writeFieldEnd()
- if self.parameters != None:
- oprot.writeFieldBegin('parameters', TType.MAP, 9)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
- for kiter156,viter157 in self.parameters.items():
- oprot.writeString(kiter156)
- oprot.writeString(viter157)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.deferredRebuild != None:
- oprot.writeFieldBegin('deferredRebuild', TType.BOOL, 10)
- oprot.writeBool(self.deferredRebuild)
- 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 Schema:
- """
- Attributes:
- - fieldSchemas
- - properties
- """
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'fieldSchemas', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1
- (2, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 2
- )
- def __init__(self, fieldSchemas=None, properties=None,):
- self.fieldSchemas = fieldSchemas
- self.properties = properties
- 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.LIST:
- self.fieldSchemas = []
- (_etype161, _size158) = iprot.readListBegin()
- for _i162 in xrange(_size158):
- _elem163 = FieldSchema()
- _elem163.read(iprot)
- self.fieldSchemas.append(_elem163)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.MAP:
- self.properties = {}
- (_ktype165, _vtype166, _size164 ) = iprot.readMapBegin()
- for _i168 in xrange(_size164):
- _key169 = iprot.readString();
- _val170 = iprot.readString();
- self.properties[_key169] = _val170
- iprot.readMapEnd()
- 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('Schema')
- if self.fieldSchemas != None:
- oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1)
- oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas))
- for iter171 in self.fieldSchemas:
- iter171.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.properties != None:
- oprot.writeFieldBegin('properties', TType.MAP, 2)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
- for kiter172,viter173 in self.properties.items():
- oprot.writeString(kiter172)
- oprot.writeString(viter173)
- oprot.writeMapEnd()
- 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 MetaException(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('MetaException')
- if self.message != 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)
- class UnknownTableException(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('UnknownTableException')
- if self.message != 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)
- class UnknownDBException(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('UnknownDBException')
- if self.message != 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)
- class AlreadyExistsException(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('AlreadyExistsException')
- if self.message != 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)
- class InvalidObjectException(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('InvalidObjectException')
- if self.message != 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)
- class NoSuchObjectException(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('NoSuchObjectException')
- if self.message != 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)
- class IndexAlreadyExistsException(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('IndexAlreadyExistsException')
- if self.message != 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)
- class InvalidOperationException(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('InvalidOperationException')
- if self.message != 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)
- class ConfigValSecurityException(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('ConfigValSecurityException')
- if self.message != 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)