PageRenderTime 179ms CodeModel.GetById 10ms app.highlight 161ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/gen/thrift/gen-py/queryplan/ttypes.py

#
Python | 1089 lines | 943 code | 82 blank | 64 comment | 262 complexity | 39df4e91e9a378be0efe772111c170fc MD5 | raw 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 *
   8
   9from thrift.transport import TTransport
  10from thrift.protocol import TBinaryProtocol, TProtocol
  11try:
  12  from thrift.protocol import fastbinary
  13except:
  14  fastbinary = None
  15
  16
  17class AdjacencyType:
  18  CONJUNCTIVE = 0
  19  DISJUNCTIVE = 1
  20
  21  _VALUES_TO_NAMES = {
  22    0: "CONJUNCTIVE",
  23    1: "DISJUNCTIVE",
  24  }
  25
  26  _NAMES_TO_VALUES = {
  27    "CONJUNCTIVE": 0,
  28    "DISJUNCTIVE": 1,
  29  }
  30
  31class NodeType:
  32  OPERATOR = 0
  33  STAGE = 1
  34
  35  _VALUES_TO_NAMES = {
  36    0: "OPERATOR",
  37    1: "STAGE",
  38  }
  39
  40  _NAMES_TO_VALUES = {
  41    "OPERATOR": 0,
  42    "STAGE": 1,
  43  }
  44
  45class OperatorType:
  46  JOIN = 0
  47  MAPJOIN = 1
  48  EXTRACT = 2
  49  FILTER = 3
  50  FORWARD = 4
  51  GROUPBY = 5
  52  LIMIT = 6
  53  SCRIPT = 7
  54  SELECT = 8
  55  TABLESCAN = 9
  56  FILESINK = 10
  57  REDUCESINK = 11
  58  UNION = 12
  59  UDTF = 13
  60  LATERALVIEWJOIN = 14
  61  LATERALVIEWFORWARD = 15
  62  HASHTABLESINK = 16
  63  HASHTABLEDUMMY = 17
  64
  65  _VALUES_TO_NAMES = {
  66    0: "JOIN",
  67    1: "MAPJOIN",
  68    2: "EXTRACT",
  69    3: "FILTER",
  70    4: "FORWARD",
  71    5: "GROUPBY",
  72    6: "LIMIT",
  73    7: "SCRIPT",
  74    8: "SELECT",
  75    9: "TABLESCAN",
  76    10: "FILESINK",
  77    11: "REDUCESINK",
  78    12: "UNION",
  79    13: "UDTF",
  80    14: "LATERALVIEWJOIN",
  81    15: "LATERALVIEWFORWARD",
  82    16: "HASHTABLESINK",
  83    17: "HASHTABLEDUMMY",
  84  }
  85
  86  _NAMES_TO_VALUES = {
  87    "JOIN": 0,
  88    "MAPJOIN": 1,
  89    "EXTRACT": 2,
  90    "FILTER": 3,
  91    "FORWARD": 4,
  92    "GROUPBY": 5,
  93    "LIMIT": 6,
  94    "SCRIPT": 7,
  95    "SELECT": 8,
  96    "TABLESCAN": 9,
  97    "FILESINK": 10,
  98    "REDUCESINK": 11,
  99    "UNION": 12,
 100    "UDTF": 13,
 101    "LATERALVIEWJOIN": 14,
 102    "LATERALVIEWFORWARD": 15,
 103    "HASHTABLESINK": 16,
 104    "HASHTABLEDUMMY": 17,
 105  }
 106
 107class TaskType:
 108  MAP = 0
 109  REDUCE = 1
 110  OTHER = 2
 111
 112  _VALUES_TO_NAMES = {
 113    0: "MAP",
 114    1: "REDUCE",
 115    2: "OTHER",
 116  }
 117
 118  _NAMES_TO_VALUES = {
 119    "MAP": 0,
 120    "REDUCE": 1,
 121    "OTHER": 2,
 122  }
 123
 124class StageType:
 125  CONDITIONAL = 0
 126  COPY = 1
 127  DDL = 2
 128  MAPRED = 3
 129  EXPLAIN = 4
 130  FETCH = 5
 131  FUNC = 6
 132  MAPREDLOCAL = 7
 133  MOVE = 8
 134  STATS = 9
 135
 136  _VALUES_TO_NAMES = {
 137    0: "CONDITIONAL",
 138    1: "COPY",
 139    2: "DDL",
 140    3: "MAPRED",
 141    4: "EXPLAIN",
 142    5: "FETCH",
 143    6: "FUNC",
 144    7: "MAPREDLOCAL",
 145    8: "MOVE",
 146    9: "STATS",
 147  }
 148
 149  _NAMES_TO_VALUES = {
 150    "CONDITIONAL": 0,
 151    "COPY": 1,
 152    "DDL": 2,
 153    "MAPRED": 3,
 154    "EXPLAIN": 4,
 155    "FETCH": 5,
 156    "FUNC": 6,
 157    "MAPREDLOCAL": 7,
 158    "MOVE": 8,
 159    "STATS": 9,
 160  }
 161
 162
 163class Adjacency:
 164  """
 165  Attributes:
 166   - node
 167   - children
 168   - adjacencyType
 169  """
 170
 171  thrift_spec = (
 172    None, # 0
 173    (1, TType.STRING, 'node', None, None, ), # 1
 174    (2, TType.LIST, 'children', (TType.STRING,None), None, ), # 2
 175    (3, TType.I32, 'adjacencyType', None, None, ), # 3
 176  )
 177
 178  def __init__(self, node=None, children=None, adjacencyType=None,):
 179    self.node = node
 180    self.children = children
 181    self.adjacencyType = adjacencyType
 182
 183  def read(self, iprot):
 184    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 185      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 186      return
 187    iprot.readStructBegin()
 188    while True:
 189      (fname, ftype, fid) = iprot.readFieldBegin()
 190      if ftype == TType.STOP:
 191        break
 192      if fid == 1:
 193        if ftype == TType.STRING:
 194          self.node = iprot.readString();
 195        else:
 196          iprot.skip(ftype)
 197      elif fid == 2:
 198        if ftype == TType.LIST:
 199          self.children = []
 200          (_etype3, _size0) = iprot.readListBegin()
 201          for _i4 in xrange(_size0):
 202            _elem5 = iprot.readString();
 203            self.children.append(_elem5)
 204          iprot.readListEnd()
 205        else:
 206          iprot.skip(ftype)
 207      elif fid == 3:
 208        if ftype == TType.I32:
 209          self.adjacencyType = iprot.readI32();
 210        else:
 211          iprot.skip(ftype)
 212      else:
 213        iprot.skip(ftype)
 214      iprot.readFieldEnd()
 215    iprot.readStructEnd()
 216
 217  def write(self, oprot):
 218    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 219      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 220      return
 221    oprot.writeStructBegin('Adjacency')
 222    if self.node != None:
 223      oprot.writeFieldBegin('node', TType.STRING, 1)
 224      oprot.writeString(self.node)
 225      oprot.writeFieldEnd()
 226    if self.children != None:
 227      oprot.writeFieldBegin('children', TType.LIST, 2)
 228      oprot.writeListBegin(TType.STRING, len(self.children))
 229      for iter6 in self.children:
 230        oprot.writeString(iter6)
 231      oprot.writeListEnd()
 232      oprot.writeFieldEnd()
 233    if self.adjacencyType != None:
 234      oprot.writeFieldBegin('adjacencyType', TType.I32, 3)
 235      oprot.writeI32(self.adjacencyType)
 236      oprot.writeFieldEnd()
 237    oprot.writeFieldStop()
 238    oprot.writeStructEnd()
 239    def validate(self):
 240      return
 241
 242
 243  def __repr__(self):
 244    L = ['%s=%r' % (key, value)
 245      for key, value in self.__dict__.iteritems()]
 246    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 247
 248  def __eq__(self, other):
 249    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 250
 251  def __ne__(self, other):
 252    return not (self == other)
 253
 254class Graph:
 255  """
 256  Attributes:
 257   - nodeType
 258   - roots
 259   - adjacencyList
 260  """
 261
 262  thrift_spec = (
 263    None, # 0
 264    (1, TType.I32, 'nodeType', None, None, ), # 1
 265    (2, TType.LIST, 'roots', (TType.STRING,None), None, ), # 2
 266    (3, TType.LIST, 'adjacencyList', (TType.STRUCT,(Adjacency, Adjacency.thrift_spec)), None, ), # 3
 267  )
 268
 269  def __init__(self, nodeType=None, roots=None, adjacencyList=None,):
 270    self.nodeType = nodeType
 271    self.roots = roots
 272    self.adjacencyList = adjacencyList
 273
 274  def read(self, iprot):
 275    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 276      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 277      return
 278    iprot.readStructBegin()
 279    while True:
 280      (fname, ftype, fid) = iprot.readFieldBegin()
 281      if ftype == TType.STOP:
 282        break
 283      if fid == 1:
 284        if ftype == TType.I32:
 285          self.nodeType = iprot.readI32();
 286        else:
 287          iprot.skip(ftype)
 288      elif fid == 2:
 289        if ftype == TType.LIST:
 290          self.roots = []
 291          (_etype10, _size7) = iprot.readListBegin()
 292          for _i11 in xrange(_size7):
 293            _elem12 = iprot.readString();
 294            self.roots.append(_elem12)
 295          iprot.readListEnd()
 296        else:
 297          iprot.skip(ftype)
 298      elif fid == 3:
 299        if ftype == TType.LIST:
 300          self.adjacencyList = []
 301          (_etype16, _size13) = iprot.readListBegin()
 302          for _i17 in xrange(_size13):
 303            _elem18 = Adjacency()
 304            _elem18.read(iprot)
 305            self.adjacencyList.append(_elem18)
 306          iprot.readListEnd()
 307        else:
 308          iprot.skip(ftype)
 309      else:
 310        iprot.skip(ftype)
 311      iprot.readFieldEnd()
 312    iprot.readStructEnd()
 313
 314  def write(self, oprot):
 315    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 316      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 317      return
 318    oprot.writeStructBegin('Graph')
 319    if self.nodeType != None:
 320      oprot.writeFieldBegin('nodeType', TType.I32, 1)
 321      oprot.writeI32(self.nodeType)
 322      oprot.writeFieldEnd()
 323    if self.roots != None:
 324      oprot.writeFieldBegin('roots', TType.LIST, 2)
 325      oprot.writeListBegin(TType.STRING, len(self.roots))
 326      for iter19 in self.roots:
 327        oprot.writeString(iter19)
 328      oprot.writeListEnd()
 329      oprot.writeFieldEnd()
 330    if self.adjacencyList != None:
 331      oprot.writeFieldBegin('adjacencyList', TType.LIST, 3)
 332      oprot.writeListBegin(TType.STRUCT, len(self.adjacencyList))
 333      for iter20 in self.adjacencyList:
 334        iter20.write(oprot)
 335      oprot.writeListEnd()
 336      oprot.writeFieldEnd()
 337    oprot.writeFieldStop()
 338    oprot.writeStructEnd()
 339    def validate(self):
 340      return
 341
 342
 343  def __repr__(self):
 344    L = ['%s=%r' % (key, value)
 345      for key, value in self.__dict__.iteritems()]
 346    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 347
 348  def __eq__(self, other):
 349    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 350
 351  def __ne__(self, other):
 352    return not (self == other)
 353
 354class Operator:
 355  """
 356  Attributes:
 357   - operatorId
 358   - operatorType
 359   - operatorAttributes
 360   - operatorCounters
 361   - done
 362   - started
 363  """
 364
 365  thrift_spec = (
 366    None, # 0
 367    (1, TType.STRING, 'operatorId', None, None, ), # 1
 368    (2, TType.I32, 'operatorType', None, None, ), # 2
 369    (3, TType.MAP, 'operatorAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3
 370    (4, TType.MAP, 'operatorCounters', (TType.STRING,None,TType.I64,None), None, ), # 4
 371    (5, TType.BOOL, 'done', None, None, ), # 5
 372    (6, TType.BOOL, 'started', None, None, ), # 6
 373  )
 374
 375  def __init__(self, operatorId=None, operatorType=None, operatorAttributes=None, operatorCounters=None, done=None, started=None,):
 376    self.operatorId = operatorId
 377    self.operatorType = operatorType
 378    self.operatorAttributes = operatorAttributes
 379    self.operatorCounters = operatorCounters
 380    self.done = done
 381    self.started = started
 382
 383  def read(self, iprot):
 384    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 385      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 386      return
 387    iprot.readStructBegin()
 388    while True:
 389      (fname, ftype, fid) = iprot.readFieldBegin()
 390      if ftype == TType.STOP:
 391        break
 392      if fid == 1:
 393        if ftype == TType.STRING:
 394          self.operatorId = iprot.readString();
 395        else:
 396          iprot.skip(ftype)
 397      elif fid == 2:
 398        if ftype == TType.I32:
 399          self.operatorType = iprot.readI32();
 400        else:
 401          iprot.skip(ftype)
 402      elif fid == 3:
 403        if ftype == TType.MAP:
 404          self.operatorAttributes = {}
 405          (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() 
 406          for _i25 in xrange(_size21):
 407            _key26 = iprot.readString();
 408            _val27 = iprot.readString();
 409            self.operatorAttributes[_key26] = _val27
 410          iprot.readMapEnd()
 411        else:
 412          iprot.skip(ftype)
 413      elif fid == 4:
 414        if ftype == TType.MAP:
 415          self.operatorCounters = {}
 416          (_ktype29, _vtype30, _size28 ) = iprot.readMapBegin() 
 417          for _i32 in xrange(_size28):
 418            _key33 = iprot.readString();
 419            _val34 = iprot.readI64();
 420            self.operatorCounters[_key33] = _val34
 421          iprot.readMapEnd()
 422        else:
 423          iprot.skip(ftype)
 424      elif fid == 5:
 425        if ftype == TType.BOOL:
 426          self.done = iprot.readBool();
 427        else:
 428          iprot.skip(ftype)
 429      elif fid == 6:
 430        if ftype == TType.BOOL:
 431          self.started = iprot.readBool();
 432        else:
 433          iprot.skip(ftype)
 434      else:
 435        iprot.skip(ftype)
 436      iprot.readFieldEnd()
 437    iprot.readStructEnd()
 438
 439  def write(self, oprot):
 440    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 441      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 442      return
 443    oprot.writeStructBegin('Operator')
 444    if self.operatorId != None:
 445      oprot.writeFieldBegin('operatorId', TType.STRING, 1)
 446      oprot.writeString(self.operatorId)
 447      oprot.writeFieldEnd()
 448    if self.operatorType != None:
 449      oprot.writeFieldBegin('operatorType', TType.I32, 2)
 450      oprot.writeI32(self.operatorType)
 451      oprot.writeFieldEnd()
 452    if self.operatorAttributes != None:
 453      oprot.writeFieldBegin('operatorAttributes', TType.MAP, 3)
 454      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.operatorAttributes))
 455      for kiter35,viter36 in self.operatorAttributes.items():
 456        oprot.writeString(kiter35)
 457        oprot.writeString(viter36)
 458      oprot.writeMapEnd()
 459      oprot.writeFieldEnd()
 460    if self.operatorCounters != None:
 461      oprot.writeFieldBegin('operatorCounters', TType.MAP, 4)
 462      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.operatorCounters))
 463      for kiter37,viter38 in self.operatorCounters.items():
 464        oprot.writeString(kiter37)
 465        oprot.writeI64(viter38)
 466      oprot.writeMapEnd()
 467      oprot.writeFieldEnd()
 468    if self.done != None:
 469      oprot.writeFieldBegin('done', TType.BOOL, 5)
 470      oprot.writeBool(self.done)
 471      oprot.writeFieldEnd()
 472    if self.started != None:
 473      oprot.writeFieldBegin('started', TType.BOOL, 6)
 474      oprot.writeBool(self.started)
 475      oprot.writeFieldEnd()
 476    oprot.writeFieldStop()
 477    oprot.writeStructEnd()
 478    def validate(self):
 479      return
 480
 481
 482  def __repr__(self):
 483    L = ['%s=%r' % (key, value)
 484      for key, value in self.__dict__.iteritems()]
 485    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 486
 487  def __eq__(self, other):
 488    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 489
 490  def __ne__(self, other):
 491    return not (self == other)
 492
 493class Task:
 494  """
 495  Attributes:
 496   - taskId
 497   - taskType
 498   - taskAttributes
 499   - taskCounters
 500   - operatorGraph
 501   - operatorList
 502   - done
 503   - started
 504  """
 505
 506  thrift_spec = (
 507    None, # 0
 508    (1, TType.STRING, 'taskId', None, None, ), # 1
 509    (2, TType.I32, 'taskType', None, None, ), # 2
 510    (3, TType.MAP, 'taskAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3
 511    (4, TType.MAP, 'taskCounters', (TType.STRING,None,TType.I64,None), None, ), # 4
 512    (5, TType.STRUCT, 'operatorGraph', (Graph, Graph.thrift_spec), None, ), # 5
 513    (6, TType.LIST, 'operatorList', (TType.STRUCT,(Operator, Operator.thrift_spec)), None, ), # 6
 514    (7, TType.BOOL, 'done', None, None, ), # 7
 515    (8, TType.BOOL, 'started', None, None, ), # 8
 516  )
 517
 518  def __init__(self, taskId=None, taskType=None, taskAttributes=None, taskCounters=None, operatorGraph=None, operatorList=None, done=None, started=None,):
 519    self.taskId = taskId
 520    self.taskType = taskType
 521    self.taskAttributes = taskAttributes
 522    self.taskCounters = taskCounters
 523    self.operatorGraph = operatorGraph
 524    self.operatorList = operatorList
 525    self.done = done
 526    self.started = started
 527
 528  def read(self, iprot):
 529    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 530      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 531      return
 532    iprot.readStructBegin()
 533    while True:
 534      (fname, ftype, fid) = iprot.readFieldBegin()
 535      if ftype == TType.STOP:
 536        break
 537      if fid == 1:
 538        if ftype == TType.STRING:
 539          self.taskId = iprot.readString();
 540        else:
 541          iprot.skip(ftype)
 542      elif fid == 2:
 543        if ftype == TType.I32:
 544          self.taskType = iprot.readI32();
 545        else:
 546          iprot.skip(ftype)
 547      elif fid == 3:
 548        if ftype == TType.MAP:
 549          self.taskAttributes = {}
 550          (_ktype40, _vtype41, _size39 ) = iprot.readMapBegin() 
 551          for _i43 in xrange(_size39):
 552            _key44 = iprot.readString();
 553            _val45 = iprot.readString();
 554            self.taskAttributes[_key44] = _val45
 555          iprot.readMapEnd()
 556        else:
 557          iprot.skip(ftype)
 558      elif fid == 4:
 559        if ftype == TType.MAP:
 560          self.taskCounters = {}
 561          (_ktype47, _vtype48, _size46 ) = iprot.readMapBegin() 
 562          for _i50 in xrange(_size46):
 563            _key51 = iprot.readString();
 564            _val52 = iprot.readI64();
 565            self.taskCounters[_key51] = _val52
 566          iprot.readMapEnd()
 567        else:
 568          iprot.skip(ftype)
 569      elif fid == 5:
 570        if ftype == TType.STRUCT:
 571          self.operatorGraph = Graph()
 572          self.operatorGraph.read(iprot)
 573        else:
 574          iprot.skip(ftype)
 575      elif fid == 6:
 576        if ftype == TType.LIST:
 577          self.operatorList = []
 578          (_etype56, _size53) = iprot.readListBegin()
 579          for _i57 in xrange(_size53):
 580            _elem58 = Operator()
 581            _elem58.read(iprot)
 582            self.operatorList.append(_elem58)
 583          iprot.readListEnd()
 584        else:
 585          iprot.skip(ftype)
 586      elif fid == 7:
 587        if ftype == TType.BOOL:
 588          self.done = iprot.readBool();
 589        else:
 590          iprot.skip(ftype)
 591      elif fid == 8:
 592        if ftype == TType.BOOL:
 593          self.started = iprot.readBool();
 594        else:
 595          iprot.skip(ftype)
 596      else:
 597        iprot.skip(ftype)
 598      iprot.readFieldEnd()
 599    iprot.readStructEnd()
 600
 601  def write(self, oprot):
 602    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 603      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 604      return
 605    oprot.writeStructBegin('Task')
 606    if self.taskId != None:
 607      oprot.writeFieldBegin('taskId', TType.STRING, 1)
 608      oprot.writeString(self.taskId)
 609      oprot.writeFieldEnd()
 610    if self.taskType != None:
 611      oprot.writeFieldBegin('taskType', TType.I32, 2)
 612      oprot.writeI32(self.taskType)
 613      oprot.writeFieldEnd()
 614    if self.taskAttributes != None:
 615      oprot.writeFieldBegin('taskAttributes', TType.MAP, 3)
 616      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.taskAttributes))
 617      for kiter59,viter60 in self.taskAttributes.items():
 618        oprot.writeString(kiter59)
 619        oprot.writeString(viter60)
 620      oprot.writeMapEnd()
 621      oprot.writeFieldEnd()
 622    if self.taskCounters != None:
 623      oprot.writeFieldBegin('taskCounters', TType.MAP, 4)
 624      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.taskCounters))
 625      for kiter61,viter62 in self.taskCounters.items():
 626        oprot.writeString(kiter61)
 627        oprot.writeI64(viter62)
 628      oprot.writeMapEnd()
 629      oprot.writeFieldEnd()
 630    if self.operatorGraph != None:
 631      oprot.writeFieldBegin('operatorGraph', TType.STRUCT, 5)
 632      self.operatorGraph.write(oprot)
 633      oprot.writeFieldEnd()
 634    if self.operatorList != None:
 635      oprot.writeFieldBegin('operatorList', TType.LIST, 6)
 636      oprot.writeListBegin(TType.STRUCT, len(self.operatorList))
 637      for iter63 in self.operatorList:
 638        iter63.write(oprot)
 639      oprot.writeListEnd()
 640      oprot.writeFieldEnd()
 641    if self.done != None:
 642      oprot.writeFieldBegin('done', TType.BOOL, 7)
 643      oprot.writeBool(self.done)
 644      oprot.writeFieldEnd()
 645    if self.started != None:
 646      oprot.writeFieldBegin('started', TType.BOOL, 8)
 647      oprot.writeBool(self.started)
 648      oprot.writeFieldEnd()
 649    oprot.writeFieldStop()
 650    oprot.writeStructEnd()
 651    def validate(self):
 652      return
 653
 654
 655  def __repr__(self):
 656    L = ['%s=%r' % (key, value)
 657      for key, value in self.__dict__.iteritems()]
 658    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 659
 660  def __eq__(self, other):
 661    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 662
 663  def __ne__(self, other):
 664    return not (self == other)
 665
 666class Stage:
 667  """
 668  Attributes:
 669   - stageId
 670   - stageType
 671   - stageAttributes
 672   - stageCounters
 673   - taskList
 674   - done
 675   - started
 676  """
 677
 678  thrift_spec = (
 679    None, # 0
 680    (1, TType.STRING, 'stageId', None, None, ), # 1
 681    (2, TType.I32, 'stageType', None, None, ), # 2
 682    (3, TType.MAP, 'stageAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3
 683    (4, TType.MAP, 'stageCounters', (TType.STRING,None,TType.I64,None), None, ), # 4
 684    (5, TType.LIST, 'taskList', (TType.STRUCT,(Task, Task.thrift_spec)), None, ), # 5
 685    (6, TType.BOOL, 'done', None, None, ), # 6
 686    (7, TType.BOOL, 'started', None, None, ), # 7
 687  )
 688
 689  def __init__(self, stageId=None, stageType=None, stageAttributes=None, stageCounters=None, taskList=None, done=None, started=None,):
 690    self.stageId = stageId
 691    self.stageType = stageType
 692    self.stageAttributes = stageAttributes
 693    self.stageCounters = stageCounters
 694    self.taskList = taskList
 695    self.done = done
 696    self.started = started
 697
 698  def read(self, iprot):
 699    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 700      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 701      return
 702    iprot.readStructBegin()
 703    while True:
 704      (fname, ftype, fid) = iprot.readFieldBegin()
 705      if ftype == TType.STOP:
 706        break
 707      if fid == 1:
 708        if ftype == TType.STRING:
 709          self.stageId = iprot.readString();
 710        else:
 711          iprot.skip(ftype)
 712      elif fid == 2:
 713        if ftype == TType.I32:
 714          self.stageType = iprot.readI32();
 715        else:
 716          iprot.skip(ftype)
 717      elif fid == 3:
 718        if ftype == TType.MAP:
 719          self.stageAttributes = {}
 720          (_ktype65, _vtype66, _size64 ) = iprot.readMapBegin() 
 721          for _i68 in xrange(_size64):
 722            _key69 = iprot.readString();
 723            _val70 = iprot.readString();
 724            self.stageAttributes[_key69] = _val70
 725          iprot.readMapEnd()
 726        else:
 727          iprot.skip(ftype)
 728      elif fid == 4:
 729        if ftype == TType.MAP:
 730          self.stageCounters = {}
 731          (_ktype72, _vtype73, _size71 ) = iprot.readMapBegin() 
 732          for _i75 in xrange(_size71):
 733            _key76 = iprot.readString();
 734            _val77 = iprot.readI64();
 735            self.stageCounters[_key76] = _val77
 736          iprot.readMapEnd()
 737        else:
 738          iprot.skip(ftype)
 739      elif fid == 5:
 740        if ftype == TType.LIST:
 741          self.taskList = []
 742          (_etype81, _size78) = iprot.readListBegin()
 743          for _i82 in xrange(_size78):
 744            _elem83 = Task()
 745            _elem83.read(iprot)
 746            self.taskList.append(_elem83)
 747          iprot.readListEnd()
 748        else:
 749          iprot.skip(ftype)
 750      elif fid == 6:
 751        if ftype == TType.BOOL:
 752          self.done = iprot.readBool();
 753        else:
 754          iprot.skip(ftype)
 755      elif fid == 7:
 756        if ftype == TType.BOOL:
 757          self.started = iprot.readBool();
 758        else:
 759          iprot.skip(ftype)
 760      else:
 761        iprot.skip(ftype)
 762      iprot.readFieldEnd()
 763    iprot.readStructEnd()
 764
 765  def write(self, oprot):
 766    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 767      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 768      return
 769    oprot.writeStructBegin('Stage')
 770    if self.stageId != None:
 771      oprot.writeFieldBegin('stageId', TType.STRING, 1)
 772      oprot.writeString(self.stageId)
 773      oprot.writeFieldEnd()
 774    if self.stageType != None:
 775      oprot.writeFieldBegin('stageType', TType.I32, 2)
 776      oprot.writeI32(self.stageType)
 777      oprot.writeFieldEnd()
 778    if self.stageAttributes != None:
 779      oprot.writeFieldBegin('stageAttributes', TType.MAP, 3)
 780      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.stageAttributes))
 781      for kiter84,viter85 in self.stageAttributes.items():
 782        oprot.writeString(kiter84)
 783        oprot.writeString(viter85)
 784      oprot.writeMapEnd()
 785      oprot.writeFieldEnd()
 786    if self.stageCounters != None:
 787      oprot.writeFieldBegin('stageCounters', TType.MAP, 4)
 788      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.stageCounters))
 789      for kiter86,viter87 in self.stageCounters.items():
 790        oprot.writeString(kiter86)
 791        oprot.writeI64(viter87)
 792      oprot.writeMapEnd()
 793      oprot.writeFieldEnd()
 794    if self.taskList != None:
 795      oprot.writeFieldBegin('taskList', TType.LIST, 5)
 796      oprot.writeListBegin(TType.STRUCT, len(self.taskList))
 797      for iter88 in self.taskList:
 798        iter88.write(oprot)
 799      oprot.writeListEnd()
 800      oprot.writeFieldEnd()
 801    if self.done != None:
 802      oprot.writeFieldBegin('done', TType.BOOL, 6)
 803      oprot.writeBool(self.done)
 804      oprot.writeFieldEnd()
 805    if self.started != None:
 806      oprot.writeFieldBegin('started', TType.BOOL, 7)
 807      oprot.writeBool(self.started)
 808      oprot.writeFieldEnd()
 809    oprot.writeFieldStop()
 810    oprot.writeStructEnd()
 811    def validate(self):
 812      return
 813
 814
 815  def __repr__(self):
 816    L = ['%s=%r' % (key, value)
 817      for key, value in self.__dict__.iteritems()]
 818    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 819
 820  def __eq__(self, other):
 821    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 822
 823  def __ne__(self, other):
 824    return not (self == other)
 825
 826class Query:
 827  """
 828  Attributes:
 829   - queryId
 830   - queryType
 831   - queryAttributes
 832   - queryCounters
 833   - stageGraph
 834   - stageList
 835   - done
 836   - started
 837  """
 838
 839  thrift_spec = (
 840    None, # 0
 841    (1, TType.STRING, 'queryId', None, None, ), # 1
 842    (2, TType.STRING, 'queryType', None, None, ), # 2
 843    (3, TType.MAP, 'queryAttributes', (TType.STRING,None,TType.STRING,None), None, ), # 3
 844    (4, TType.MAP, 'queryCounters', (TType.STRING,None,TType.I64,None), None, ), # 4
 845    (5, TType.STRUCT, 'stageGraph', (Graph, Graph.thrift_spec), None, ), # 5
 846    (6, TType.LIST, 'stageList', (TType.STRUCT,(Stage, Stage.thrift_spec)), None, ), # 6
 847    (7, TType.BOOL, 'done', None, None, ), # 7
 848    (8, TType.BOOL, 'started', None, None, ), # 8
 849  )
 850
 851  def __init__(self, queryId=None, queryType=None, queryAttributes=None, queryCounters=None, stageGraph=None, stageList=None, done=None, started=None,):
 852    self.queryId = queryId
 853    self.queryType = queryType
 854    self.queryAttributes = queryAttributes
 855    self.queryCounters = queryCounters
 856    self.stageGraph = stageGraph
 857    self.stageList = stageList
 858    self.done = done
 859    self.started = started
 860
 861  def read(self, iprot):
 862    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
 863      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
 864      return
 865    iprot.readStructBegin()
 866    while True:
 867      (fname, ftype, fid) = iprot.readFieldBegin()
 868      if ftype == TType.STOP:
 869        break
 870      if fid == 1:
 871        if ftype == TType.STRING:
 872          self.queryId = iprot.readString();
 873        else:
 874          iprot.skip(ftype)
 875      elif fid == 2:
 876        if ftype == TType.STRING:
 877          self.queryType = iprot.readString();
 878        else:
 879          iprot.skip(ftype)
 880      elif fid == 3:
 881        if ftype == TType.MAP:
 882          self.queryAttributes = {}
 883          (_ktype90, _vtype91, _size89 ) = iprot.readMapBegin() 
 884          for _i93 in xrange(_size89):
 885            _key94 = iprot.readString();
 886            _val95 = iprot.readString();
 887            self.queryAttributes[_key94] = _val95
 888          iprot.readMapEnd()
 889        else:
 890          iprot.skip(ftype)
 891      elif fid == 4:
 892        if ftype == TType.MAP:
 893          self.queryCounters = {}
 894          (_ktype97, _vtype98, _size96 ) = iprot.readMapBegin() 
 895          for _i100 in xrange(_size96):
 896            _key101 = iprot.readString();
 897            _val102 = iprot.readI64();
 898            self.queryCounters[_key101] = _val102
 899          iprot.readMapEnd()
 900        else:
 901          iprot.skip(ftype)
 902      elif fid == 5:
 903        if ftype == TType.STRUCT:
 904          self.stageGraph = Graph()
 905          self.stageGraph.read(iprot)
 906        else:
 907          iprot.skip(ftype)
 908      elif fid == 6:
 909        if ftype == TType.LIST:
 910          self.stageList = []
 911          (_etype106, _size103) = iprot.readListBegin()
 912          for _i107 in xrange(_size103):
 913            _elem108 = Stage()
 914            _elem108.read(iprot)
 915            self.stageList.append(_elem108)
 916          iprot.readListEnd()
 917        else:
 918          iprot.skip(ftype)
 919      elif fid == 7:
 920        if ftype == TType.BOOL:
 921          self.done = iprot.readBool();
 922        else:
 923          iprot.skip(ftype)
 924      elif fid == 8:
 925        if ftype == TType.BOOL:
 926          self.started = iprot.readBool();
 927        else:
 928          iprot.skip(ftype)
 929      else:
 930        iprot.skip(ftype)
 931      iprot.readFieldEnd()
 932    iprot.readStructEnd()
 933
 934  def write(self, oprot):
 935    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
 936      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
 937      return
 938    oprot.writeStructBegin('Query')
 939    if self.queryId != None:
 940      oprot.writeFieldBegin('queryId', TType.STRING, 1)
 941      oprot.writeString(self.queryId)
 942      oprot.writeFieldEnd()
 943    if self.queryType != None:
 944      oprot.writeFieldBegin('queryType', TType.STRING, 2)
 945      oprot.writeString(self.queryType)
 946      oprot.writeFieldEnd()
 947    if self.queryAttributes != None:
 948      oprot.writeFieldBegin('queryAttributes', TType.MAP, 3)
 949      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.queryAttributes))
 950      for kiter109,viter110 in self.queryAttributes.items():
 951        oprot.writeString(kiter109)
 952        oprot.writeString(viter110)
 953      oprot.writeMapEnd()
 954      oprot.writeFieldEnd()
 955    if self.queryCounters != None:
 956      oprot.writeFieldBegin('queryCounters', TType.MAP, 4)
 957      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.queryCounters))
 958      for kiter111,viter112 in self.queryCounters.items():
 959        oprot.writeString(kiter111)
 960        oprot.writeI64(viter112)
 961      oprot.writeMapEnd()
 962      oprot.writeFieldEnd()
 963    if self.stageGraph != None:
 964      oprot.writeFieldBegin('stageGraph', TType.STRUCT, 5)
 965      self.stageGraph.write(oprot)
 966      oprot.writeFieldEnd()
 967    if self.stageList != None:
 968      oprot.writeFieldBegin('stageList', TType.LIST, 6)
 969      oprot.writeListBegin(TType.STRUCT, len(self.stageList))
 970      for iter113 in self.stageList:
 971        iter113.write(oprot)
 972      oprot.writeListEnd()
 973      oprot.writeFieldEnd()
 974    if self.done != None:
 975      oprot.writeFieldBegin('done', TType.BOOL, 7)
 976      oprot.writeBool(self.done)
 977      oprot.writeFieldEnd()
 978    if self.started != None:
 979      oprot.writeFieldBegin('started', TType.BOOL, 8)
 980      oprot.writeBool(self.started)
 981      oprot.writeFieldEnd()
 982    oprot.writeFieldStop()
 983    oprot.writeStructEnd()
 984    def validate(self):
 985      return
 986
 987
 988  def __repr__(self):
 989    L = ['%s=%r' % (key, value)
 990      for key, value in self.__dict__.iteritems()]
 991    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
 992
 993  def __eq__(self, other):
 994    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
 995
 996  def __ne__(self, other):
 997    return not (self == other)
 998
 999class QueryPlan:
1000  """
1001  Attributes:
1002   - queries
1003   - done
1004   - started
1005  """
1006
1007  thrift_spec = (
1008    None, # 0
1009    (1, TType.LIST, 'queries', (TType.STRUCT,(Query, Query.thrift_spec)), None, ), # 1
1010    (2, TType.BOOL, 'done', None, None, ), # 2
1011    (3, TType.BOOL, 'started', None, None, ), # 3
1012  )
1013
1014  def __init__(self, queries=None, done=None, started=None,):
1015    self.queries = queries
1016    self.done = done
1017    self.started = started
1018
1019  def read(self, iprot):
1020    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1021      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1022      return
1023    iprot.readStructBegin()
1024    while True:
1025      (fname, ftype, fid) = iprot.readFieldBegin()
1026      if ftype == TType.STOP:
1027        break
1028      if fid == 1:
1029        if ftype == TType.LIST:
1030          self.queries = []
1031          (_etype117, _size114) = iprot.readListBegin()
1032          for _i118 in xrange(_size114):
1033            _elem119 = Query()
1034            _elem119.read(iprot)
1035            self.queries.append(_elem119)
1036          iprot.readListEnd()
1037        else:
1038          iprot.skip(ftype)
1039      elif fid == 2:
1040        if ftype == TType.BOOL:
1041          self.done = iprot.readBool();
1042        else:
1043          iprot.skip(ftype)
1044      elif fid == 3:
1045        if ftype == TType.BOOL:
1046          self.started = iprot.readBool();
1047        else:
1048          iprot.skip(ftype)
1049      else:
1050        iprot.skip(ftype)
1051      iprot.readFieldEnd()
1052    iprot.readStructEnd()
1053
1054  def write(self, oprot):
1055    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1056      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1057      return
1058    oprot.writeStructBegin('QueryPlan')
1059    if self.queries != None:
1060      oprot.writeFieldBegin('queries', TType.LIST, 1)
1061      oprot.writeListBegin(TType.STRUCT, len(self.queries))
1062      for iter120 in self.queries:
1063        iter120.write(oprot)
1064      oprot.writeListEnd()
1065      oprot.writeFieldEnd()
1066    if self.done != None:
1067      oprot.writeFieldBegin('done', TType.BOOL, 2)
1068      oprot.writeBool(self.done)
1069      oprot.writeFieldEnd()
1070    if self.started != None:
1071      oprot.writeFieldBegin('started', TType.BOOL, 3)
1072      oprot.writeBool(self.started)
1073      oprot.writeFieldEnd()
1074    oprot.writeFieldStop()
1075    oprot.writeStructEnd()
1076    def validate(self):
1077      return
1078
1079
1080  def __repr__(self):
1081    L = ['%s=%r' % (key, value)
1082      for key, value in self.__dict__.iteritems()]
1083    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1084
1085  def __eq__(self, other):
1086    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1087
1088  def __ne__(self, other):
1089    return not (self == other)