当前位置: 首页>>代码示例>>Python>>正文


Python TType.LIST属性代码示例

本文整理汇总了Python中thrift.Thrift.TType.LIST属性的典型用法代码示例。如果您正苦于以下问题:Python TType.LIST属性的具体用法?Python TType.LIST怎么用?Python TType.LIST使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在thrift.Thrift.TType的用法示例。


在下文中一共展示了TType.LIST属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: write

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('TIDEPacket')
        if self.start_range is not None:
            oprot.writeFieldBegin('start_range', TType.STRUCT, 1)
            self.start_range.write(oprot)
            oprot.writeFieldEnd()
        if self.end_range is not None:
            oprot.writeFieldBegin('end_range', TType.STRUCT, 2)
            self.end_range.write(oprot)
            oprot.writeFieldEnd()
        if self.headers is not None:
            oprot.writeFieldBegin('headers', TType.LIST, 3)
            oprot.writeListBegin(TType.STRUCT, len(self.headers))
            for iter6 in self.headers:
                iter6.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd() 
开发者ID:brunorijsman,项目名称:rift-python,代码行数:24,代码来源:ttypes.py

示例2: write

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('SuperColumn')
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 1)
            oprot.writeBinary(self.name)
            oprot.writeFieldEnd()
        if self.columns is not None:
            oprot.writeFieldBegin('columns', TType.LIST, 2)
            oprot.writeListBegin(TType.STRUCT, len(self.columns))
            for iter6 in self.columns:
                iter6.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd() 
开发者ID:apache,项目名称:cassandra-dtest,代码行数:20,代码来源:ttypes.py

示例3: write

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('SuperColumn')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 1)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.columns is not None:
      oprot.writeFieldBegin('columns', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.columns))
      for iter6 in self.columns:
        iter6.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
开发者ID:apache,项目名称:cassandra-dtest,代码行数:20,代码来源:ttypes.py

示例4: write

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('EMRUser')
    if self.developerId is not None:
      oprot.writeFieldBegin('developerId', TType.STRING, 1)
      oprot.writeString(self.developerId)
      oprot.writeFieldEnd()
    if self.clusterIds is not None:
      oprot.writeFieldBegin('clusterIds', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.clusterIds))
      for iter6 in self.clusterIds:
        oprot.writeString(iter6)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
开发者ID:XiaoMi,项目名称:galaxy-sdk-python,代码行数:20,代码来源:ttypes.py

示例5: read

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.LIST:
          self.instanceGroups = []
          (_etype91, _size88) = iprot.readListBegin()
          for _i92 in xrange(_size88):
            _elem93 = AddInstanceGroupRequest()
            _elem93.read(iprot)
            self.instanceGroups.append(_elem93)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
开发者ID:XiaoMi,项目名称:galaxy-sdk-python,代码行数:26,代码来源:EMRSchedulerService.py

示例6: read

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.LIST:
          self.metricDataList = []
          (_etype21, _size18) = iprot.readListBegin()
          for _i22 in xrange(_size18):
            _elem23 = MetricData()
            _elem23.read(iprot)
            self.metricDataList.append(_elem23)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
开发者ID:XiaoMi,项目名称:galaxy-sdk-python,代码行数:26,代码来源:ttypes.py

示例7: write

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('StreamCheckpoint')
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 1)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.topicName is not None:
      oprot.writeFieldBegin('topicName', TType.STRING, 2)
      oprot.writeString(self.topicName)
      oprot.writeFieldEnd()
    if self.partitionStates is not None:
      oprot.writeFieldBegin('partitionStates', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.partitionStates))
      for iter61 in self.partitionStates:
        iter61.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
开发者ID:XiaoMi,项目名称:galaxy-sdk-python,代码行数:24,代码来源:ttypes.py

示例8: read

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.start_range = TIEID()
                    self.start_range.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.end_range = TIEID()
                    self.end_range.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.LIST:
                    self.headers = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_size0):
                        _elem5 = TIEHeaderWithLifeTime()
                        _elem5.read(iprot)
                        self.headers.append(_elem5)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd() 
开发者ID:brunorijsman,项目名称:rift-python,代码行数:38,代码来源:ttypes.py

示例9: read

# 需要导入模块: from thrift.Thrift import TType [as 别名]
# 或者: from thrift.Thrift.TType import LIST [as 别名]
def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.name = iprot.readBinary()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.LIST:
                    self.columns = []
                    (_etype3, _size0) = iprot.readListBegin()
                    for _i4 in range(_size0):
                        _elem5 = Column()
                        _elem5.read(iprot)
                        self.columns.append(_elem5)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd() 
开发者ID:apache,项目名称:cassandra-dtest,代码行数:31,代码来源:ttypes.py


注:本文中的thrift.Thrift.TType.LIST属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。