PageRenderTime 125ms CodeModel.GetById 19ms app.highlight 94ms RepoModel.GetById 2ms app.codeStats 0ms

/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 | 740 complexity | 4deaee89168db6706450dbd402da15cf MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1#
   2# Autogenerated by Thrift
   3#
   4# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
   5#
   6
   7from thrift.Thrift import *
   8import fb303.ttypes
   9
  10
  11from thrift.transport import TTransport
  12from thrift.protocol import TBinaryProtocol, TProtocol
  13try:
  14  from thrift.protocol import fastbinary
  15except:
  16  fastbinary = None
  17
  18
  19class HiveObjectType:
  20  GLOBAL = 1
  21  DATABASE = 2
  22  TABLE = 3
  23  PARTITION = 4
  24  COLUMN = 5
  25
  26  _VALUES_TO_NAMES = {
  27    1: "GLOBAL",
  28    2: "DATABASE",
  29    3: "TABLE",
  30    4: "PARTITION",
  31    5: "COLUMN",
  32  }
  33
  34  _NAMES_TO_VALUES = {
  35    "GLOBAL": 1,
  36    "DATABASE": 2,
  37    "TABLE": 3,
  38    "PARTITION": 4,
  39    "COLUMN": 5,
  40  }
  41
  42class PrincipalType:
  43  USER = 1
  44  ROLE = 2
  45  GROUP = 3
  46
  47  _VALUES_TO_NAMES = {
  48    1: "USER",
  49    2: "ROLE",
  50    3: "GROUP",
  51  }
  52
  53  _NAMES_TO_VALUES = {
  54    "USER": 1,
  55    "ROLE": 2,
  56    "GROUP": 3,
  57  }
  58
  59
  60class Version:
  61  """
  62  Attributes:
  63   - version
  64   - comments
  65  """
  66
  67  thrift_spec = (
  68    None, # 0
  69    (1, TType.STRING, 'version', None, None, ), # 1
  70    (2, TType.STRING, 'comments', None, None, ), # 2
  71  )
  72
  73  def __init__(self, version=None, comments=None,):
  74    self.version = version
  75    self.comments = comments
  76
  77  def read(self, iprot):
  78    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  79      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  80      return
  81    iprot.readStructBegin()
  82    while True:
  83      (fname, ftype, fid) = iprot.readFieldBegin()
  84      if ftype == TType.STOP:
  85        break
  86      if fid == 1:
  87        if ftype == TType.STRING:
  88          self.version = iprot.readString();
  89        else:
  90          iprot.skip(ftype)
  91      elif fid == 2:
  92        if ftype == TType.STRING:
  93          self.comments = iprot.readString();
  94        else:
  95          iprot.skip(ftype)
  96      else:
  97        iprot.skip(ftype)
  98      iprot.readFieldEnd()
  99    iprot.readStructEnd()
 100
 101  def write(self, oprot):
 102    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 103      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 104      return
 105    oprot.writeStructBegin('Version')
 106    if self.version != None:
 107      oprot.writeFieldBegin('version', TType.STRING, 1)
 108      oprot.writeString(self.version)
 109      oprot.writeFieldEnd()
 110    if self.comments != None:
 111      oprot.writeFieldBegin('comments', TType.STRING, 2)
 112      oprot.writeString(self.comments)
 113      oprot.writeFieldEnd()
 114    oprot.writeFieldStop()
 115    oprot.writeStructEnd()
 116    def validate(self):
 117      return
 118
 119
 120  def __repr__(self):
 121    L = ['%s=%r' % (key, value)
 122      for key, value in self.__dict__.iteritems()]
 123    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 124
 125  def __eq__(self, other):
 126    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 127
 128  def __ne__(self, other):
 129    return not (self == other)
 130
 131class FieldSchema:
 132  """
 133  Attributes:
 134   - name
 135   - type
 136   - comment
 137  """
 138
 139  thrift_spec = (
 140    None, # 0
 141    (1, TType.STRING, 'name', None, None, ), # 1
 142    (2, TType.STRING, 'type', None, None, ), # 2
 143    (3, TType.STRING, 'comment', None, None, ), # 3
 144  )
 145
 146  def __init__(self, name=None, type=None, comment=None,):
 147    self.name = name
 148    self.type = type
 149    self.comment = comment
 150
 151  def read(self, iprot):
 152    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 153      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 154      return
 155    iprot.readStructBegin()
 156    while True:
 157      (fname, ftype, fid) = iprot.readFieldBegin()
 158      if ftype == TType.STOP:
 159        break
 160      if fid == 1:
 161        if ftype == TType.STRING:
 162          self.name = iprot.readString();
 163        else:
 164          iprot.skip(ftype)
 165      elif fid == 2:
 166        if ftype == TType.STRING:
 167          self.type = iprot.readString();
 168        else:
 169          iprot.skip(ftype)
 170      elif fid == 3:
 171        if ftype == TType.STRING:
 172          self.comment = iprot.readString();
 173        else:
 174          iprot.skip(ftype)
 175      else:
 176        iprot.skip(ftype)
 177      iprot.readFieldEnd()
 178    iprot.readStructEnd()
 179
 180  def write(self, oprot):
 181    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 182      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 183      return
 184    oprot.writeStructBegin('FieldSchema')
 185    if self.name != None:
 186      oprot.writeFieldBegin('name', TType.STRING, 1)
 187      oprot.writeString(self.name)
 188      oprot.writeFieldEnd()
 189    if self.type != None:
 190      oprot.writeFieldBegin('type', TType.STRING, 2)
 191      oprot.writeString(self.type)
 192      oprot.writeFieldEnd()
 193    if self.comment != None:
 194      oprot.writeFieldBegin('comment', TType.STRING, 3)
 195      oprot.writeString(self.comment)
 196      oprot.writeFieldEnd()
 197    oprot.writeFieldStop()
 198    oprot.writeStructEnd()
 199    def validate(self):
 200      return
 201
 202
 203  def __repr__(self):
 204    L = ['%s=%r' % (key, value)
 205      for key, value in self.__dict__.iteritems()]
 206    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 207
 208  def __eq__(self, other):
 209    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 210
 211  def __ne__(self, other):
 212    return not (self == other)
 213
 214class Type:
 215  """
 216  Attributes:
 217   - name
 218   - type1
 219   - type2
 220   - fields
 221  """
 222
 223  thrift_spec = (
 224    None, # 0
 225    (1, TType.STRING, 'name', None, None, ), # 1
 226    (2, TType.STRING, 'type1', None, None, ), # 2
 227    (3, TType.STRING, 'type2', None, None, ), # 3
 228    (4, TType.LIST, 'fields', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 4
 229  )
 230
 231  def __init__(self, name=None, type1=None, type2=None, fields=None,):
 232    self.name = name
 233    self.type1 = type1
 234    self.type2 = type2
 235    self.fields = fields
 236
 237  def read(self, iprot):
 238    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 239      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 240      return
 241    iprot.readStructBegin()
 242    while True:
 243      (fname, ftype, fid) = iprot.readFieldBegin()
 244      if ftype == TType.STOP:
 245        break
 246      if fid == 1:
 247        if ftype == TType.STRING:
 248          self.name = iprot.readString();
 249        else:
 250          iprot.skip(ftype)
 251      elif fid == 2:
 252        if ftype == TType.STRING:
 253          self.type1 = iprot.readString();
 254        else:
 255          iprot.skip(ftype)
 256      elif fid == 3:
 257        if ftype == TType.STRING:
 258          self.type2 = iprot.readString();
 259        else:
 260          iprot.skip(ftype)
 261      elif fid == 4:
 262        if ftype == TType.LIST:
 263          self.fields = []
 264          (_etype3, _size0) = iprot.readListBegin()
 265          for _i4 in xrange(_size0):
 266            _elem5 = FieldSchema()
 267            _elem5.read(iprot)
 268            self.fields.append(_elem5)
 269          iprot.readListEnd()
 270        else:
 271          iprot.skip(ftype)
 272      else:
 273        iprot.skip(ftype)
 274      iprot.readFieldEnd()
 275    iprot.readStructEnd()
 276
 277  def write(self, oprot):
 278    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 279      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 280      return
 281    oprot.writeStructBegin('Type')
 282    if self.name != None:
 283      oprot.writeFieldBegin('name', TType.STRING, 1)
 284      oprot.writeString(self.name)
 285      oprot.writeFieldEnd()
 286    if self.type1 != None:
 287      oprot.writeFieldBegin('type1', TType.STRING, 2)
 288      oprot.writeString(self.type1)
 289      oprot.writeFieldEnd()
 290    if self.type2 != None:
 291      oprot.writeFieldBegin('type2', TType.STRING, 3)
 292      oprot.writeString(self.type2)
 293      oprot.writeFieldEnd()
 294    if self.fields != None:
 295      oprot.writeFieldBegin('fields', TType.LIST, 4)
 296      oprot.writeListBegin(TType.STRUCT, len(self.fields))
 297      for iter6 in self.fields:
 298        iter6.write(oprot)
 299      oprot.writeListEnd()
 300      oprot.writeFieldEnd()
 301    oprot.writeFieldStop()
 302    oprot.writeStructEnd()
 303    def validate(self):
 304      return
 305
 306
 307  def __repr__(self):
 308    L = ['%s=%r' % (key, value)
 309      for key, value in self.__dict__.iteritems()]
 310    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 311
 312  def __eq__(self, other):
 313    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 314
 315  def __ne__(self, other):
 316    return not (self == other)
 317
 318class HiveObjectRef:
 319  """
 320  Attributes:
 321   - objectType
 322   - dbName
 323   - objectName
 324   - partValues
 325   - columnName
 326  """
 327
 328  thrift_spec = (
 329    None, # 0
 330    (1, TType.I32, 'objectType', None, None, ), # 1
 331    (2, TType.STRING, 'dbName', None, None, ), # 2
 332    (3, TType.STRING, 'objectName', None, None, ), # 3
 333    (4, TType.LIST, 'partValues', (TType.STRING,None), None, ), # 4
 334    (5, TType.STRING, 'columnName', None, None, ), # 5
 335  )
 336
 337  def __init__(self, objectType=None, dbName=None, objectName=None, partValues=None, columnName=None,):
 338    self.objectType = objectType
 339    self.dbName = dbName
 340    self.objectName = objectName
 341    self.partValues = partValues
 342    self.columnName = columnName
 343
 344  def read(self, iprot):
 345    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 346      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 347      return
 348    iprot.readStructBegin()
 349    while True:
 350      (fname, ftype, fid) = iprot.readFieldBegin()
 351      if ftype == TType.STOP:
 352        break
 353      if fid == 1:
 354        if ftype == TType.I32:
 355          self.objectType = iprot.readI32();
 356        else:
 357          iprot.skip(ftype)
 358      elif fid == 2:
 359        if ftype == TType.STRING:
 360          self.dbName = iprot.readString();
 361        else:
 362          iprot.skip(ftype)
 363      elif fid == 3:
 364        if ftype == TType.STRING:
 365          self.objectName = iprot.readString();
 366        else:
 367          iprot.skip(ftype)
 368      elif fid == 4:
 369        if ftype == TType.LIST:
 370          self.partValues = []
 371          (_etype10, _size7) = iprot.readListBegin()
 372          for _i11 in xrange(_size7):
 373            _elem12 = iprot.readString();
 374            self.partValues.append(_elem12)
 375          iprot.readListEnd()
 376        else:
 377          iprot.skip(ftype)
 378      elif fid == 5:
 379        if ftype == TType.STRING:
 380          self.columnName = iprot.readString();
 381        else:
 382          iprot.skip(ftype)
 383      else:
 384        iprot.skip(ftype)
 385      iprot.readFieldEnd()
 386    iprot.readStructEnd()
 387
 388  def write(self, oprot):
 389    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 390      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 391      return
 392    oprot.writeStructBegin('HiveObjectRef')
 393    if self.objectType != None:
 394      oprot.writeFieldBegin('objectType', TType.I32, 1)
 395      oprot.writeI32(self.objectType)
 396      oprot.writeFieldEnd()
 397    if self.dbName != None:
 398      oprot.writeFieldBegin('dbName', TType.STRING, 2)
 399      oprot.writeString(self.dbName)
 400      oprot.writeFieldEnd()
 401    if self.objectName != None:
 402      oprot.writeFieldBegin('objectName', TType.STRING, 3)
 403      oprot.writeString(self.objectName)
 404      oprot.writeFieldEnd()
 405    if self.partValues != None:
 406      oprot.writeFieldBegin('partValues', TType.LIST, 4)
 407      oprot.writeListBegin(TType.STRING, len(self.partValues))
 408      for iter13 in self.partValues:
 409        oprot.writeString(iter13)
 410      oprot.writeListEnd()
 411      oprot.writeFieldEnd()
 412    if self.columnName != None:
 413      oprot.writeFieldBegin('columnName', TType.STRING, 5)
 414      oprot.writeString(self.columnName)
 415      oprot.writeFieldEnd()
 416    oprot.writeFieldStop()
 417    oprot.writeStructEnd()
 418    def validate(self):
 419      return
 420
 421
 422  def __repr__(self):
 423    L = ['%s=%r' % (key, value)
 424      for key, value in self.__dict__.iteritems()]
 425    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 426
 427  def __eq__(self, other):
 428    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 429
 430  def __ne__(self, other):
 431    return not (self == other)
 432
 433class PrivilegeGrantInfo:
 434  """
 435  Attributes:
 436   - privilege
 437   - createTime
 438   - grantor
 439   - grantorType
 440   - grantOption
 441  """
 442
 443  thrift_spec = (
 444    None, # 0
 445    (1, TType.STRING, 'privilege', None, None, ), # 1
 446    (2, TType.I32, 'createTime', None, None, ), # 2
 447    (3, TType.STRING, 'grantor', None, None, ), # 3
 448    (4, TType.I32, 'grantorType', None, None, ), # 4
 449    (5, TType.BOOL, 'grantOption', None, None, ), # 5
 450  )
 451
 452  def __init__(self, privilege=None, createTime=None, grantor=None, grantorType=None, grantOption=None,):
 453    self.privilege = privilege
 454    self.createTime = createTime
 455    self.grantor = grantor
 456    self.grantorType = grantorType
 457    self.grantOption = grantOption
 458
 459  def read(self, iprot):
 460    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 461      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 462      return
 463    iprot.readStructBegin()
 464    while True:
 465      (fname, ftype, fid) = iprot.readFieldBegin()
 466      if ftype == TType.STOP:
 467        break
 468      if fid == 1:
 469        if ftype == TType.STRING:
 470          self.privilege = iprot.readString();
 471        else:
 472          iprot.skip(ftype)
 473      elif fid == 2:
 474        if ftype == TType.I32:
 475          self.createTime = iprot.readI32();
 476        else:
 477          iprot.skip(ftype)
 478      elif fid == 3:
 479        if ftype == TType.STRING:
 480          self.grantor = iprot.readString();
 481        else:
 482          iprot.skip(ftype)
 483      elif fid == 4:
 484        if ftype == TType.I32:
 485          self.grantorType = iprot.readI32();
 486        else:
 487          iprot.skip(ftype)
 488      elif fid == 5:
 489        if ftype == TType.BOOL:
 490          self.grantOption = iprot.readBool();
 491        else:
 492          iprot.skip(ftype)
 493      else:
 494        iprot.skip(ftype)
 495      iprot.readFieldEnd()
 496    iprot.readStructEnd()
 497
 498  def write(self, oprot):
 499    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 500      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 501      return
 502    oprot.writeStructBegin('PrivilegeGrantInfo')
 503    if self.privilege != None:
 504      oprot.writeFieldBegin('privilege', TType.STRING, 1)
 505      oprot.writeString(self.privilege)
 506      oprot.writeFieldEnd()
 507    if self.createTime != None:
 508      oprot.writeFieldBegin('createTime', TType.I32, 2)
 509      oprot.writeI32(self.createTime)
 510      oprot.writeFieldEnd()
 511    if self.grantor != None:
 512      oprot.writeFieldBegin('grantor', TType.STRING, 3)
 513      oprot.writeString(self.grantor)
 514      oprot.writeFieldEnd()
 515    if self.grantorType != None:
 516      oprot.writeFieldBegin('grantorType', TType.I32, 4)
 517      oprot.writeI32(self.grantorType)
 518      oprot.writeFieldEnd()
 519    if self.grantOption != None:
 520      oprot.writeFieldBegin('grantOption', TType.BOOL, 5)
 521      oprot.writeBool(self.grantOption)
 522      oprot.writeFieldEnd()
 523    oprot.writeFieldStop()
 524    oprot.writeStructEnd()
 525    def validate(self):
 526      return
 527
 528
 529  def __repr__(self):
 530    L = ['%s=%r' % (key, value)
 531      for key, value in self.__dict__.iteritems()]
 532    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 533
 534  def __eq__(self, other):
 535    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 536
 537  def __ne__(self, other):
 538    return not (self == other)
 539
 540class HiveObjectPrivilege:
 541  """
 542  Attributes:
 543   - hiveObject
 544   - principalName
 545   - principalType
 546   - grantInfo
 547  """
 548
 549  thrift_spec = (
 550    None, # 0
 551    (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1
 552    (2, TType.STRING, 'principalName', None, None, ), # 2
 553    (3, TType.I32, 'principalType', None, None, ), # 3
 554    (4, TType.STRUCT, 'grantInfo', (PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec), None, ), # 4
 555  )
 556
 557  def __init__(self, hiveObject=None, principalName=None, principalType=None, grantInfo=None,):
 558    self.hiveObject = hiveObject
 559    self.principalName = principalName
 560    self.principalType = principalType
 561    self.grantInfo = grantInfo
 562
 563  def read(self, iprot):
 564    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 565      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 566      return
 567    iprot.readStructBegin()
 568    while True:
 569      (fname, ftype, fid) = iprot.readFieldBegin()
 570      if ftype == TType.STOP:
 571        break
 572      if fid == 1:
 573        if ftype == TType.STRUCT:
 574          self.hiveObject = HiveObjectRef()
 575          self.hiveObject.read(iprot)
 576        else:
 577          iprot.skip(ftype)
 578      elif fid == 2:
 579        if ftype == TType.STRING:
 580          self.principalName = iprot.readString();
 581        else:
 582          iprot.skip(ftype)
 583      elif fid == 3:
 584        if ftype == TType.I32:
 585          self.principalType = iprot.readI32();
 586        else:
 587          iprot.skip(ftype)
 588      elif fid == 4:
 589        if ftype == TType.STRUCT:
 590          self.grantInfo = PrivilegeGrantInfo()
 591          self.grantInfo.read(iprot)
 592        else:
 593          iprot.skip(ftype)
 594      else:
 595        iprot.skip(ftype)
 596      iprot.readFieldEnd()
 597    iprot.readStructEnd()
 598
 599  def write(self, oprot):
 600    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 601      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 602      return
 603    oprot.writeStructBegin('HiveObjectPrivilege')
 604    if self.hiveObject != None:
 605      oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1)
 606      self.hiveObject.write(oprot)
 607      oprot.writeFieldEnd()
 608    if self.principalName != None:
 609      oprot.writeFieldBegin('principalName', TType.STRING, 2)
 610      oprot.writeString(self.principalName)
 611      oprot.writeFieldEnd()
 612    if self.principalType != None:
 613      oprot.writeFieldBegin('principalType', TType.I32, 3)
 614      oprot.writeI32(self.principalType)
 615      oprot.writeFieldEnd()
 616    if self.grantInfo != None:
 617      oprot.writeFieldBegin('grantInfo', TType.STRUCT, 4)
 618      self.grantInfo.write(oprot)
 619      oprot.writeFieldEnd()
 620    oprot.writeFieldStop()
 621    oprot.writeStructEnd()
 622    def validate(self):
 623      return
 624
 625
 626  def __repr__(self):
 627    L = ['%s=%r' % (key, value)
 628      for key, value in self.__dict__.iteritems()]
 629    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 630
 631  def __eq__(self, other):
 632    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 633
 634  def __ne__(self, other):
 635    return not (self == other)
 636
 637class PrivilegeBag:
 638  """
 639  Attributes:
 640   - privileges
 641  """
 642
 643  thrift_spec = (
 644    None, # 0
 645    (1, TType.LIST, 'privileges', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 1
 646  )
 647
 648  def __init__(self, privileges=None,):
 649    self.privileges = privileges
 650
 651  def read(self, iprot):
 652    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 653      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 654      return
 655    iprot.readStructBegin()
 656    while True:
 657      (fname, ftype, fid) = iprot.readFieldBegin()
 658      if ftype == TType.STOP:
 659        break
 660      if fid == 1:
 661        if ftype == TType.LIST:
 662          self.privileges = []
 663          (_etype17, _size14) = iprot.readListBegin()
 664          for _i18 in xrange(_size14):
 665            _elem19 = HiveObjectPrivilege()
 666            _elem19.read(iprot)
 667            self.privileges.append(_elem19)
 668          iprot.readListEnd()
 669        else:
 670          iprot.skip(ftype)
 671      else:
 672        iprot.skip(ftype)
 673      iprot.readFieldEnd()
 674    iprot.readStructEnd()
 675
 676  def write(self, oprot):
 677    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 678      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 679      return
 680    oprot.writeStructBegin('PrivilegeBag')
 681    if self.privileges != None:
 682      oprot.writeFieldBegin('privileges', TType.LIST, 1)
 683      oprot.writeListBegin(TType.STRUCT, len(self.privileges))
 684      for iter20 in self.privileges:
 685        iter20.write(oprot)
 686      oprot.writeListEnd()
 687      oprot.writeFieldEnd()
 688    oprot.writeFieldStop()
 689    oprot.writeStructEnd()
 690    def validate(self):
 691      return
 692
 693
 694  def __repr__(self):
 695    L = ['%s=%r' % (key, value)
 696      for key, value in self.__dict__.iteritems()]
 697    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 698
 699  def __eq__(self, other):
 700    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 701
 702  def __ne__(self, other):
 703    return not (self == other)
 704
 705class PrincipalPrivilegeSet:
 706  """
 707  Attributes:
 708   - userPrivileges
 709   - groupPrivileges
 710   - rolePrivileges
 711  """
 712
 713  thrift_spec = (
 714    None, # 0
 715    (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 1
 716    (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 2
 717    (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 3
 718  )
 719
 720  def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,):
 721    self.userPrivileges = userPrivileges
 722    self.groupPrivileges = groupPrivileges
 723    self.rolePrivileges = rolePrivileges
 724
 725  def read(self, iprot):
 726    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 727      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 728      return
 729    iprot.readStructBegin()
 730    while True:
 731      (fname, ftype, fid) = iprot.readFieldBegin()
 732      if ftype == TType.STOP:
 733        break
 734      if fid == 1:
 735        if ftype == TType.MAP:
 736          self.userPrivileges = {}
 737          (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() 
 738          for _i25 in xrange(_size21):
 739            _key26 = iprot.readString();
 740            _val27 = []
 741            (_etype31, _size28) = iprot.readListBegin()
 742            for _i32 in xrange(_size28):
 743              _elem33 = PrivilegeGrantInfo()
 744              _elem33.read(iprot)
 745              _val27.append(_elem33)
 746            iprot.readListEnd()
 747            self.userPrivileges[_key26] = _val27
 748          iprot.readMapEnd()
 749        else:
 750          iprot.skip(ftype)
 751      elif fid == 2:
 752        if ftype == TType.MAP:
 753          self.groupPrivileges = {}
 754          (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() 
 755          for _i38 in xrange(_size34):
 756            _key39 = iprot.readString();
 757            _val40 = []
 758            (_etype44, _size41) = iprot.readListBegin()
 759            for _i45 in xrange(_size41):
 760              _elem46 = PrivilegeGrantInfo()
 761              _elem46.read(iprot)
 762              _val40.append(_elem46)
 763            iprot.readListEnd()
 764            self.groupPrivileges[_key39] = _val40
 765          iprot.readMapEnd()
 766        else:
 767          iprot.skip(ftype)
 768      elif fid == 3:
 769        if ftype == TType.MAP:
 770          self.rolePrivileges = {}
 771          (_ktype48, _vtype49, _size47 ) = iprot.readMapBegin() 
 772          for _i51 in xrange(_size47):
 773            _key52 = iprot.readString();
 774            _val53 = []
 775            (_etype57, _size54) = iprot.readListBegin()
 776            for _i58 in xrange(_size54):
 777              _elem59 = PrivilegeGrantInfo()
 778              _elem59.read(iprot)
 779              _val53.append(_elem59)
 780            iprot.readListEnd()
 781            self.rolePrivileges[_key52] = _val53
 782          iprot.readMapEnd()
 783        else:
 784          iprot.skip(ftype)
 785      else:
 786        iprot.skip(ftype)
 787      iprot.readFieldEnd()
 788    iprot.readStructEnd()
 789
 790  def write(self, oprot):
 791    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 792      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 793      return
 794    oprot.writeStructBegin('PrincipalPrivilegeSet')
 795    if self.userPrivileges != None:
 796      oprot.writeFieldBegin('userPrivileges', TType.MAP, 1)
 797      oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.userPrivileges))
 798      for kiter60,viter61 in self.userPrivileges.items():
 799        oprot.writeString(kiter60)
 800        oprot.writeListBegin(TType.STRUCT, len(viter61))
 801        for iter62 in viter61:
 802          iter62.write(oprot)
 803        oprot.writeListEnd()
 804      oprot.writeMapEnd()
 805      oprot.writeFieldEnd()
 806    if self.groupPrivileges != None:
 807      oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2)
 808      oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.groupPrivileges))
 809      for kiter63,viter64 in self.groupPrivileges.items():
 810        oprot.writeString(kiter63)
 811        oprot.writeListBegin(TType.STRUCT, len(viter64))
 812        for iter65 in viter64:
 813          iter65.write(oprot)
 814        oprot.writeListEnd()
 815      oprot.writeMapEnd()
 816      oprot.writeFieldEnd()
 817    if self.rolePrivileges != None:
 818      oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3)
 819      oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.rolePrivileges))
 820      for kiter66,viter67 in self.rolePrivileges.items():
 821        oprot.writeString(kiter66)
 822        oprot.writeListBegin(TType.STRUCT, len(viter67))
 823        for iter68 in viter67:
 824          iter68.write(oprot)
 825        oprot.writeListEnd()
 826      oprot.writeMapEnd()
 827      oprot.writeFieldEnd()
 828    oprot.writeFieldStop()
 829    oprot.writeStructEnd()
 830    def validate(self):
 831      return
 832
 833
 834  def __repr__(self):
 835    L = ['%s=%r' % (key, value)
 836      for key, value in self.__dict__.iteritems()]
 837    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 838
 839  def __eq__(self, other):
 840    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 841
 842  def __ne__(self, other):
 843    return not (self == other)
 844
 845class Role:
 846  """
 847  Attributes:
 848   - roleName
 849   - createTime
 850   - ownerName
 851  """
 852
 853  thrift_spec = (
 854    None, # 0
 855    (1, TType.STRING, 'roleName', None, None, ), # 1
 856    (2, TType.I32, 'createTime', None, None, ), # 2
 857    (3, TType.STRING, 'ownerName', None, None, ), # 3
 858  )
 859
 860  def __init__(self, roleName=None, createTime=None, ownerName=None,):
 861    self.roleName = roleName
 862    self.createTime = createTime
 863    self.ownerName = ownerName
 864
 865  def read(self, iprot):
 866    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 867      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 868      return
 869    iprot.readStructBegin()
 870    while True:
 871      (fname, ftype, fid) = iprot.readFieldBegin()
 872      if ftype == TType.STOP:
 873        break
 874      if fid == 1:
 875        if ftype == TType.STRING:
 876          self.roleName = iprot.readString();
 877        else:
 878          iprot.skip(ftype)
 879      elif fid == 2:
 880        if ftype == TType.I32:
 881          self.createTime = iprot.readI32();
 882        else:
 883          iprot.skip(ftype)
 884      elif fid == 3:
 885        if ftype == TType.STRING:
 886          self.ownerName = iprot.readString();
 887        else:
 888          iprot.skip(ftype)
 889      else:
 890        iprot.skip(ftype)
 891      iprot.readFieldEnd()
 892    iprot.readStructEnd()
 893
 894  def write(self, oprot):
 895    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 896      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 897      return
 898    oprot.writeStructBegin('Role')
 899    if self.roleName != None:
 900      oprot.writeFieldBegin('roleName', TType.STRING, 1)
 901      oprot.writeString(self.roleName)
 902      oprot.writeFieldEnd()
 903    if self.createTime != None:
 904      oprot.writeFieldBegin('createTime', TType.I32, 2)
 905      oprot.writeI32(self.createTime)
 906      oprot.writeFieldEnd()
 907    if self.ownerName != None:
 908      oprot.writeFieldBegin('ownerName', TType.STRING, 3)
 909      oprot.writeString(self.ownerName)
 910      oprot.writeFieldEnd()
 911    oprot.writeFieldStop()
 912    oprot.writeStructEnd()
 913    def validate(self):
 914      return
 915
 916
 917  def __repr__(self):
 918    L = ['%s=%r' % (key, value)
 919      for key, value in self.__dict__.iteritems()]
 920    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 921
 922  def __eq__(self, other):
 923    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 924
 925  def __ne__(self, other):
 926    return not (self == other)
 927
 928class Database:
 929  """
 930  Attributes:
 931   - name
 932   - description
 933   - locationUri
 934   - parameters
 935   - privileges
 936  """
 937
 938  thrift_spec = (
 939    None, # 0
 940    (1, TType.STRING, 'name', None, None, ), # 1
 941    (2, TType.STRING, 'description', None, None, ), # 2
 942    (3, TType.STRING, 'locationUri', None, None, ), # 3
 943    (4, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 4
 944    (5, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 5
 945  )
 946
 947  def __init__(self, name=None, description=None, locationUri=None, parameters=None, privileges=None,):
 948    self.name = name
 949    self.description = description
 950    self.locationUri = locationUri
 951    self.parameters = parameters
 952    self.privileges = privileges
 953
 954  def read(self, iprot):
 955    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 956      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 957      return
 958    iprot.readStructBegin()
 959    while True:
 960      (fname, ftype, fid) = iprot.readFieldBegin()
 961      if ftype == TType.STOP:
 962        break
 963      if fid == 1:
 964        if ftype == TType.STRING:
 965          self.name = iprot.readString();
 966        else:
 967          iprot.skip(ftype)
 968      elif fid == 2:
 969        if ftype == TType.STRING:
 970          self.description = iprot.readString();
 971        else:
 972          iprot.skip(ftype)
 973      elif fid == 3:
 974        if ftype == TType.STRING:
 975          self.locationUri = iprot.readString();
 976        else:
 977          iprot.skip(ftype)
 978      elif fid == 4:
 979        if ftype == TType.MAP:
 980          self.parameters = {}
 981          (_ktype70, _vtype71, _size69 ) = iprot.readMapBegin() 
 982          for _i73 in xrange(_size69):
 983            _key74 = iprot.readString();
 984            _val75 = iprot.readString();
 985            self.parameters[_key74] = _val75
 986          iprot.readMapEnd()
 987        else:
 988          iprot.skip(ftype)
 989      elif fid == 5:
 990        if ftype == TType.STRUCT:
 991          self.privileges = PrincipalPrivilegeSet()
 992          self.privileges.read(iprot)
 993        else:
 994          iprot.skip(ftype)
 995      else:
 996        iprot.skip(ftype)
 997      iprot.readFieldEnd()
 998    iprot.readStructEnd()
 999
1000  def write(self, oprot):
1001    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1002      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1003      return
1004    oprot.writeStructBegin('Database')
1005    if self.name != None:
1006      oprot.writeFieldBegin('name', TType.STRING, 1)
1007      oprot.writeString(self.name)
1008      oprot.writeFieldEnd()
1009    if self.description != None:
1010      oprot.writeFieldBegin('description', TType.STRING, 2)
1011      oprot.writeString(self.description)
1012      oprot.writeFieldEnd()
1013    if self.locationUri != None:
1014      oprot.writeFieldBegin('locationUri', TType.STRING, 3)
1015      oprot.writeString(self.locationUri)
1016      oprot.writeFieldEnd()
1017    if self.parameters != None:
1018      oprot.writeFieldBegin('parameters', TType.MAP, 4)
1019      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
1020      for kiter76,viter77 in self.parameters.items():
1021        oprot.writeString(kiter76)
1022        oprot.writeString(viter77)
1023      oprot.writeMapEnd()
1024      oprot.writeFieldEnd()
1025    if self.privileges != None:
1026      oprot.writeFieldBegin('privileges', TType.STRUCT, 5)
1027      self.privileges.write(oprot)
1028      oprot.writeFieldEnd()
1029    oprot.writeFieldStop()
1030    oprot.writeStructEnd()
1031    def validate(self):
1032      return
1033
1034
1035  def __repr__(self):
1036    L = ['%s=%r' % (key, value)
1037      for key, value in self.__dict__.iteritems()]
1038    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1039
1040  def __eq__(self, other):
1041    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1042
1043  def __ne__(self, other):
1044    return not (self == other)
1045
1046class SerDeInfo:
1047  """
1048  Attributes:
1049   - name
1050   - serializationLib
1051   - parameters
1052  """
1053
1054  thrift_spec = (
1055    None, # 0
1056    (1, TType.STRING, 'name', None, None, ), # 1
1057    (2, TType.STRING, 'serializationLib', None, None, ), # 2
1058    (3, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 3
1059  )
1060
1061  def __init__(self, name=None, serializationLib=None, parameters=None,):
1062    self.name = name
1063    self.serializationLib = serializationLib
1064    self.parameters = parameters
1065
1066  def read(self, iprot):
1067    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1068      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1069      return
1070    iprot.readStructBegin()
1071    while True:
1072      (fname, ftype, fid) = iprot.readFieldBegin()
1073      if ftype == TType.STOP:
1074        break
1075      if fid == 1:
1076        if ftype == TType.STRING:
1077          self.name = iprot.readString();
1078        else:
1079          iprot.skip(ftype)
1080      elif fid == 2:
1081        if ftype == TType.STRING:
1082          self.serializationLib = iprot.readString();
1083        else:
1084          iprot.skip(ftype)
1085      elif fid == 3:
1086        if ftype == TType.MAP:
1087          self.parameters = {}
1088          (_ktype79, _vtype80, _size78 ) = iprot.readMapBegin() 
1089          for _i82 in xrange(_size78):
1090            _key83 = iprot.readString();
1091            _val84 = iprot.readString();
1092            self.parameters[_key83] = _val84
1093          iprot.readMapEnd()
1094        else:
1095          iprot.skip(ftype)
1096      else:
1097        iprot.skip(ftype)
1098      iprot.readFieldEnd()
1099    iprot.readStructEnd()
1100
1101  def write(self, oprot):
1102    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1103      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1104      return
1105    oprot.writeStructBegin('SerDeInfo')
1106    if self.name != None:
1107      oprot.writeFieldBegin('name', TType.STRING, 1)
1108      oprot.writeString(self.name)
1109      oprot.writeFieldEnd()
1110    if self.serializationLib != None:
1111      oprot.writeFieldBegin('serializationLib', TType.STRING, 2)
1112      oprot.writeString(self.serializationLib)
1113      oprot.writeFieldEnd()
1114    if self.parameters != None:
1115      oprot.writeFieldBegin('parameters', TType.MAP, 3)
1116      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
1117      for kiter85,viter86 in self.parameters.items():
1118        oprot.writeString(kiter85)
1119        oprot.writeString(viter86)
1120      oprot.writeMapEnd()
1121      oprot.writeFieldEnd()
1122    oprot.writeFieldStop()
1123    oprot.writeStructEnd()
1124    def validate(self):
1125      return
1126
1127
1128  def __repr__(self):
1129    L = ['%s=%r' % (key, value)
1130      for key, value in self.__dict__.iteritems()]
1131    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1132
1133  def __eq__(self, other):
1134    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1135
1136  def __ne__(self, other):
1137    return not (self == other)
1138
1139class Order:
1140  """
1141  Attributes:
1142   - col
1143   - order
1144  """
1145
1146  thrift_spec = (
1147    None, # 0
1148    (1, TType.STRING, 'col', None, None, ), # 1
1149    (2, TType.I32, 'order', None, None, ), # 2
1150  )
1151
1152  def __init__(self, col=None, order=None,):
1153    self.col = col
1154    self.order = order
1155
1156  def read(self, iprot):
1157    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1158      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1159      return
1160    iprot.readStructBegin()
1161    while True:
1162      (fname, ftype, fid) = iprot.readFieldBegin()
1163      if ftype == TType.STOP:
1164        break
1165      if fid == 1:
1166        if ftype == TType.STRING:
1167          self.col = iprot.readString();
1168        else:
1169          iprot.skip(ftype)
1170      elif fid == 2:
1171        if ftype == TType.I32:
1172          self.order = iprot.readI32();
1173        else:
1174          iprot.skip(ftype)
1175      else:
1176        iprot.skip(ftype)
1177      iprot.readFieldEnd()
1178    iprot.readStructEnd()
1179
1180  def write(self, oprot):
1181    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1182      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1183      return
1184    oprot.writeStructBegin('Order')
1185    if self.col != None:
1186      oprot.writeFieldBegin('col', TType.STRING, 1)
1187      oprot.writeString(self.col)
1188      oprot.writeFieldEnd()
1189    if self.order != None:
1190      oprot.writeFieldBegin('order', TType.I32, 2)
1191      oprot.writeI32(self.order)
1192      oprot.writeFieldEnd()
1193    oprot.writeFieldStop()
1194    oprot.writeStructEnd()
1195    def validate(self):
1196      return
1197
1198
1199  def __repr__(self):
1200    L = ['%s=%r' % (key, value)
1201      for key, value in self.__dict__.iteritems()]
1202    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1203
1204  def __eq__(self, other):
1205    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1206
1207  def __ne__(self, other):
1208    return not (self == other)
1209
1210class StorageDescriptor:
1211  """
1212  Attributes:
1213   - cols
1214   - location
1215   - inputFormat
1216   - outputFormat
1217   - compressed
1218   - numBuckets
1219   - serdeInfo
1220   - bucketCols
1221   - sortCols
1222   - parameters
1223  """
1224
1225  thrift_spec = (
1226    None, # 0
1227    (1, TType.LIST, 'cols', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1
1228    (2, TType.STRING, 'location', None, None, ), # 2
1229    (3, TType.STRING, 'inputFormat', None, None, ), # 3
1230    (4, TType.STRING, 'outputFormat', None, None, ), # 4
1231    (5, TType.BOOL, 'compressed', None, None, ), # 5
1232    (6, TType.I32, 'numBuckets', None, None, ), # 6
1233    (7, TType.STRUCT, 'serdeInfo', (SerDeInfo, SerDeInfo.thrift_spec), None, ), # 7
1234    (8, TType.LIST, 'bucketCols', (TType.STRING,None), None, ), # 8
1235    (9, TType.LIST, 'sortCols', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 9
1236    (10, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 10
1237  )
1238
1239  def __init__(self, cols=None, location=None, inputFormat=None, outputFormat=None, compressed=None, numBuckets=None, serdeInfo=None, bucketCols=None, sortCols=None, parameters=None,):
1240    self.cols = cols
1241    self.location = location
1242    self.inputFormat = inputFormat
1243    self.outputFormat = outputFormat
1244    self.compressed = compressed
1245    self.numBuckets = numBuckets
1246    self.serdeInfo = serdeInfo
1247    self.bucketCols = bucketCols
1248    self.sortCols = sortCols
1249    self.parameters = parameters
1250
1251  def read(self, iprot):
1252    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1253      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1254      return
1255    iprot.readStructBegin()
1256    while True:
1257      (fname, ftype, fid) = iprot.readFieldBegin()
1258      if ftype == TType.STOP:
1259        break
1260      if fid == 1:
1261        if ftype == TType.LIST:
1262          self.cols = []
1263          (_etype90, _size87) = iprot.readListBegin()
1264          for _i91 in xrange(_size87):
1265            _elem92 = FieldSchema()
1266            _elem92.read(iprot)
1267            self.cols.append(_elem92)
1268          iprot.readListEnd()
1269        else:
1270          iprot.skip(ftype)
1271      elif fid == 2:
1272        if ftype == TType.STRING:
1273          self.location = iprot.readString();
1274        else:
1275          iprot.skip(ftype)
1276      elif fid == 3:
1277        if ftype == TType.STRING:
1278          self.inputFormat = iprot.readString();
1279        else:
1280          iprot.skip(ftype)
1281      elif fid == 4:
1282        if ftype == TType.STRING:
1283          self.outputFormat = iprot.readString();
1284        else:
1285          iprot.skip(ftype)
1286      elif fid == 5:
1287        if ftype == TType.BOOL:
1288          self.compressed = iprot.readBool();
1289        else:
1290          iprot.skip(ftype)
1291      elif fid == 6:
1292        if ftype == TType.I32:
1293          self.numBuckets = iprot.readI32();
1294        else:
1295          iprot.skip(ftype)
1296      elif fid == 7:
1297        if ftype == TType.STRUCT:
1298          self.serdeInfo = SerDeInfo()
1299          self.serdeInfo.read(iprot)
1300        else:
1301          iprot.skip(ftype)
1302      elif fid == 8:
1303        if ftype == TType.LIST:
1304          self.bucketCols = []
1305          (_etype96, _size93) = iprot.readListBegin()
1306          for _i97 in xrange(_size93):
1307            _elem98 = iprot.readString();
1308            self.bucketCols.append(_elem98)
1309          iprot.readListEnd()
1310        else:
1311          iprot.skip(ftype)
1312      elif fid == 9:
1313        if ftype == TType.LIST:
1314          self.sortCols = []
1315          (_etype102, _size99) = iprot.readListBegin()
1316          for _i103 in xrange(_size99):
1317            _elem104 = Order()
1318            _elem104.read(iprot)
1319            self.sortCols.append(_elem104)
1320          iprot.readListEnd()
1321        else:
1322          iprot.skip(ftype)
1323      elif fid == 10:
1324        if ftype == TType.MAP:
1325          self.parameters = {}
1326          (_ktype106, _vtype107, _size105 ) = iprot.readMapBegin() 
1327          for _i109 in xrange(_size105):
1328            _key110 = iprot.readString();
1329            _val111 = iprot.readString();
1330            self.parameters[_key110] = _val111
1331          iprot.readMapEnd()
1332        else:
1333          iprot.skip(ftype)
1334      else:
1335        iprot.skip(ftype)
1336      iprot.readFieldEnd()
1337    iprot.readStructEnd()
1338
1339  def write(self, oprot):
1340    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1341      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1342      return
1343    oprot.writeStructBegin('StorageDescriptor')
1344    if self.cols != None:
1345      oprot.writeFieldBegin('cols', TType.LIST, 1)
1346      oprot.writeListBegin(TType.STRUCT, len(self.cols))
1347      for iter112 in self.cols:
1348        iter112.write(oprot)
1349      oprot.writeListEnd()
1350      oprot.writeFieldEnd()
1351    if self.location != None:
1352      oprot.writeFieldBegin('location', TType.STRING, 2)
1353      oprot.writeString(self.location)
1354      oprot.writeFieldEnd()
1355    if self.inputFormat != None:
1356      oprot.writeFieldBegin('inputFormat', TType.STRING, 3)
1357      oprot.writeString(self.inputFormat)
1358      oprot.writeFieldEnd()
1359    if self.outputFormat != None:
1360      oprot.writeFieldBegin('outputFormat', TType.STRING, 4)
1361      oprot.writeString(self.outputFormat)
1362      oprot.writeFieldEnd()
1363    if self.compressed != None:
1364      oprot.writeFieldBegin('compressed', TType.BOOL, 5)
1365      oprot.writeBool(self.compressed)
1366      oprot.writeFieldEnd()
1367    if self.numBuckets != None:
1368      oprot.writeFieldBegin('numBuckets', TType.I32, 6)
1369      oprot.writeI32(self.numBuckets)
1370      oprot.writeFieldEnd()
1371    if self.serdeInfo != None:
1372      oprot.writeFieldBegin('serdeInfo', TType.STRUCT, 7)
1373      self.serdeInfo.write(oprot)
1374      oprot.writeFieldEnd()
1375    if self.bucketCols != None:
1376      oprot.writeFieldBegin('bucketCols', TType.LIST, 8)
1377      oprot.writeListBegin(TType.STRING, len(self.bucketCols))
1378      for iter113 in self.bucketCols:
1379        oprot.writeString(iter113)
1380      oprot.writeListEnd()
1381      oprot.writeFieldEnd()
1382    if self.sortCols != None:
1383      oprot.writeFieldBegin('sortCols', TType.LIST, 9)
1384      oprot.writeListBegin(TType.STRUCT, len(self.sortCols))
1385      for iter114 in self.sortCols:
1386        iter114.write(oprot)
1387      oprot.writeListEnd()
1388      oprot.writeFieldEnd()
1389    if self.parameters != None:
1390      oprot.writeFieldBegin('parameters', TType.MAP, 10)
1391      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
1392      for kiter115,viter116 in self.parameters.items():
1393        oprot.writeString(kiter115)
1394        oprot.writeString(viter116)
1395      oprot.writeMapEnd()
1396      oprot.writeFieldEnd()
1397    oprot.writeFieldStop()
1398    oprot.writeStructEnd()
1399    def validate(self):
1400      return
1401
1402
1403  def __repr__(self):
1404    L = ['%s=%r' % (key, value)
1405      for key, value in self.__dict__.iteritems()]
1406    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1407
1408  def __eq__(self, other):
1409    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1410
1411  def __ne__(self, other):
1412    return not (self == other)
1413
1414class Table:
1415  """
1416  Attributes:
1417   - tableName
1418   - dbName
1419   - owner
1420   - createTime
1421   - lastAccessTime
1422   - retention
1423   - sd
1424   - partitionKeys
1425   - parameters
1426   - viewOriginalText
1427   - viewExpandedText
1428   - tableType
1429   - privileges
1430  """
1431
1432  thrift_spec = (
1433    None, # 0
1434    (1, TType.STRING, 'tableName', None, None, ), # 1
1435    (2, TType.STRING, 'dbName', None, None, ), # 2
1436    (3, TType.STRING, 'owner', None, None, ), # 3
1437    (4, TType.I32, 'createTime', None, None, ), # 4
1438    (5, TType.I32, 'lastAccessTime', None, None, ), # 5
1439    (6, TType.I32, 'retention', None, None, ), # 6
1440    (7, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 7
1441    (8, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 8
1442    (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9
1443    (10, TType.STRING, 'viewOriginalText', None, None, ), # 10
1444    (11, TType.STRING, 'viewExpandedText', None, None, ), # 11
1445    (12, TType.STRING, 'tableType', None, None, ), # 12
1446    (13, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 13
1447  )
1448
1449  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,):
1450    self.tableName = tableName
1451    self.dbName = dbName
1452    self.owner = owner
1453    self.createTime = createTime
1454    self.lastAccessTime = lastAccessTime
1455    self.retention = retention
1456    self.sd = sd
1457    self.partitionKeys = partitionKeys
1458    self.parameters = parameters
1459    self.viewOriginalText = viewOriginalText
1460    self.viewExpandedText = viewExpandedText
1461    self.tableType = tableType
1462    self.privileges = privileges
1463
1464  def read(self, iprot):
1465    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1466      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1467      return
1468    iprot.readStructBegin()
1469    while True:
1470      (fname, ftype, fid) = iprot.readFieldBegin()
1471      if ftype == TType.STOP:
1472        break
1473      if fid == 1:
1474        if ftype == TType.STRING:
1475          self.tableName = iprot.readString();
1476        else:
1477          iprot.skip(ftype)
1478      elif fid == 2:
1479        if ftype == TType.STRING:
1480          self.dbName = iprot.readString();
1481        else:
1482          iprot.skip(ftype)
1483      elif fid == 3:
1484        if ftype == TType.STRING:
1485          self.owner = iprot.readString();
1486        else:
1487          iprot.skip(ftype)
1488      elif fid == 4:
1489        if ftype == TType.I32:
1490          self.createTime = iprot.readI32();
1491        else:
1492          iprot.skip(ftype)
1493      elif fid == 5:
1494        if ftype == TType.I32:
1495          self.lastAccessTime = iprot.readI32();
1496        else:
1497          iprot.skip(ftype)
1498      elif fid == 6:
1499        if ftype == TType.I32:
1500          self.retention = iprot.readI32();
1501        else:
1502          iprot.skip(ftype)
1503      elif fid == 7:
1504        if ftype == TType.STRUCT:
1505          self.sd = StorageDescriptor()
1506          self.sd.read(iprot)
1507        else:
1508          iprot.skip(ftype)
1509      elif fid == 8:
1510        if ftype == TType.LIST:
1511          self.partitionKeys = []
1512          (_etype120, _size117) = iprot.readListBegin()
1513          for _i121 in xrange(_size117):
1514            _elem122 = FieldSchema()
1515            _elem122.read(iprot)
1516            self.partitionKeys.append(_elem122)
1517          iprot.readListEnd()
1518        else:
1519          iprot.skip(ftype)
1520      elif fid == 9:
1521        if ftype == TType.MAP:
1522          self.parameters = {}
1523          (_ktype124, _vtype125, _size123 ) = iprot.readMapBegin() 
1524          for _i127 in xrange(_size123):
1525            _key128 = iprot.readString();
1526            _val129 = iprot.readString();
1527            self.parameters[_key128] = _val129
1528          iprot.readMapEnd()
1529        else:
1530          iprot.skip(ftype)
1531      elif fid == 10:
1532        if ftype == TType.STRING:
1533         

Large files files are truncated, but you can click here to view the full file