• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python fastbinary.encode_binary函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中thrift.protocol.fastbinary.encode_binary函数的典型用法代码示例。如果您正苦于以下问题:Python encode_binary函数的具体用法?Python encode_binary怎么用?Python encode_binary使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: write

 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('Span')
   if self.timestamp is not None:
     oprot.writeFieldBegin('timestamp', TType.I64, 1)
     oprot.writeI64(self.timestamp)
     oprot.writeFieldEnd()
   if self.trace_id is not None:
     oprot.writeFieldBegin('trace_id', TType.I64, 2)
     oprot.writeI64(self.trace_id)
     oprot.writeFieldEnd()
   if self.name is not None:
     oprot.writeFieldBegin('name', TType.STRING, 3)
     oprot.writeString(self.name)
     oprot.writeFieldEnd()
   if self.id is not None:
     oprot.writeFieldBegin('id', TType.I64, 4)
     oprot.writeI64(self.id)
     oprot.writeFieldEnd()
   if self.parent_id is not None:
     oprot.writeFieldBegin('parent_id', TType.I64, 5)
     oprot.writeI64(self.parent_id)
     oprot.writeFieldEnd()
   if self.duration is not None:
     oprot.writeFieldBegin('duration', TType.I32, 6)
     oprot.writeI32(self.duration)
     oprot.writeFieldEnd()
   if self.host is not None:
     oprot.writeFieldBegin('host', TType.STRING, 7)
     oprot.writeString(self.host)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:yancl,项目名称:collectd,代码行数:35,代码来源:ttypes.py


示例2: write

 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('HqlResult')
   if self.results != None:
     oprot.writeFieldBegin('results', TType.LIST, 1)
     oprot.writeListBegin(TType.STRING, len(self.results))
     for iter12 in self.results:
       oprot.writeString(iter12)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.cells != None:
     oprot.writeFieldBegin('cells', TType.LIST, 2)
     oprot.writeListBegin(TType.STRUCT, len(self.cells))
     for iter13 in self.cells:
       iter13.write(oprot)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.scanner != None:
     oprot.writeFieldBegin('scanner', TType.I64, 3)
     oprot.writeI64(self.scanner)
     oprot.writeFieldEnd()
   if self.mutator != None:
     oprot.writeFieldBegin('mutator', TType.I64, 4)
     oprot.writeI64(self.mutator)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:soker,项目名称:hypertable,代码行数:29,代码来源:ttypes.py


示例3: write

 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('ThriftFlumeReport')
   if self.stringMetrics != None:
     oprot.writeFieldBegin('stringMetrics', TType.MAP, 3)
     oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.stringMetrics))
     for kiter21,viter22 in self.stringMetrics.items():
       oprot.writeString(kiter21)
       oprot.writeString(viter22)
     oprot.writeMapEnd()
     oprot.writeFieldEnd()
   if self.longMetrics != None:
     oprot.writeFieldBegin('longMetrics', TType.MAP, 4)
     oprot.writeMapBegin(TType.STRING, TType.I64, len(self.longMetrics))
     for kiter23,viter24 in self.longMetrics.items():
       oprot.writeString(kiter23)
       oprot.writeI64(viter24)
     oprot.writeMapEnd()
     oprot.writeFieldEnd()
   if self.doubleMetrics != None:
     oprot.writeFieldBegin('doubleMetrics', TType.MAP, 5)
     oprot.writeMapBegin(TType.STRING, TType.DOUBLE, len(self.doubleMetrics))
     for kiter25,viter26 in self.doubleMetrics.items():
       oprot.writeString(kiter25)
       oprot.writeDouble(viter26)
     oprot.writeMapEnd()
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
开发者ID:pcdinh,项目名称:plume,代码行数:33,代码来源:ttypes.py


示例4: write

 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('FuncStat')
   if self.file is not None:
     oprot.writeFieldBegin('file', TType.STRING, 1)
     oprot.writeString(self.file)
     oprot.writeFieldEnd()
   if self.line is not None:
     oprot.writeFieldBegin('line', TType.I32, 2)
     oprot.writeI32(self.line)
     oprot.writeFieldEnd()
   if self.func_name is not None:
     oprot.writeFieldBegin('func_name', TType.STRING, 3)
     oprot.writeString(self.func_name)
     oprot.writeFieldEnd()
   if self.calls_count is not None:
     oprot.writeFieldBegin('calls_count', TType.I32, 4)
     oprot.writeI32(self.calls_count)
     oprot.writeFieldEnd()
   if self.total_time is not None:
     oprot.writeFieldBegin('total_time', TType.DOUBLE, 5)
     oprot.writeDouble(self.total_time)
     oprot.writeFieldEnd()
   if self.own_time is not None:
     oprot.writeFieldBegin('own_time', TType.DOUBLE, 6)
     oprot.writeDouble(self.own_time)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:AndyHovingh,项目名称:intellij-community,代码行数:31,代码来源:ttypes.py


示例5: write

 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('Graph')
   if self.nodeType is not None:
     oprot.writeFieldBegin('nodeType', TType.I32, 1)
     oprot.writeI32(self.nodeType)
     oprot.writeFieldEnd()
   if self.roots is not None:
     oprot.writeFieldBegin('roots', TType.LIST, 2)
     oprot.writeListBegin(TType.STRING, len(self.roots))
     for iter19 in self.roots:
       oprot.writeString(iter19)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.adjacencyList is not None:
     oprot.writeFieldBegin('adjacencyList', TType.LIST, 3)
     oprot.writeListBegin(TType.STRUCT, len(self.adjacencyList))
     for iter20 in self.adjacencyList:
       iter20.write(oprot)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:1ack,项目名称:Impala,代码行数:25,代码来源:ttypes.py


示例6: write

 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('Shaping')
   if self.rate is not None:
     oprot.writeFieldBegin('rate', TType.I32, 1)
     oprot.writeI32(self.rate)
     oprot.writeFieldEnd()
   if self.delay is not None:
     oprot.writeFieldBegin('delay', TType.STRUCT, 2)
     self.delay.write(oprot)
     oprot.writeFieldEnd()
   if self.loss is not None:
     oprot.writeFieldBegin('loss', TType.STRUCT, 3)
     self.loss.write(oprot)
     oprot.writeFieldEnd()
   if self.reorder is not None:
     oprot.writeFieldBegin('reorder', TType.STRUCT, 4)
     self.reorder.write(oprot)
     oprot.writeFieldEnd()
   if self.corruption is not None:
     oprot.writeFieldBegin('corruption', TType.STRUCT, 5)
     self.corruption.write(oprot)
     oprot.writeFieldEnd()
   if self.iptables_options is not None:
     oprot.writeFieldBegin('iptables_options', TType.LIST, 6)
     oprot.writeListBegin(TType.STRING, len(self.iptables_options))
     for iter6 in self.iptables_options:
       oprot.writeString(iter6)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:duydb2,项目名称:ZTC,代码行数:34,代码来源:ttypes.py


示例7: write

 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('HeartbeatAppInfo')
   if self.app_name is not None:
     oprot.writeFieldBegin('app_name', TType.STRING, 1)
     oprot.writeString(self.app_name)
     oprot.writeFieldEnd()
   if self.state is not None:
     oprot.writeFieldBegin('state', TType.I32, 2)
     oprot.writeI32(self.state)
     oprot.writeFieldEnd()
   if self.error_id is not None:
     oprot.writeFieldBegin('error_id', TType.I32, 3)
     oprot.writeI32(self.error_id)
     oprot.writeFieldEnd()
   if self.app_x is not None:
     oprot.writeFieldBegin('app_x', TType.STRING, 4)
     oprot.writeString(self.app_x)
     oprot.writeFieldEnd()
   if self.app_y is not None:
     oprot.writeFieldBegin('app_y', TType.I32, 5)
     oprot.writeI32(self.app_y)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:yes-txh,项目名称:test,代码行数:27,代码来源:ttypes.py


示例8: write

 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('AuthenticationResult')
   if self.currentTime != None:
     oprot.writeFieldBegin('currentTime', TType.I64, 1)
     oprot.writeI64(self.currentTime)
     oprot.writeFieldEnd()
   if self.authenticationToken != None:
     oprot.writeFieldBegin('authenticationToken', TType.STRING, 2)
     oprot.writeString(self.authenticationToken)
     oprot.writeFieldEnd()
   if self.expiration != None:
     oprot.writeFieldBegin('expiration', TType.I64, 3)
     oprot.writeI64(self.expiration)
     oprot.writeFieldEnd()
   if self.user != None:
     oprot.writeFieldBegin('user', TType.STRUCT, 4)
     self.user.write(oprot)
     oprot.writeFieldEnd()
   if self.publicUserInfo != None:
     oprot.writeFieldBegin('publicUserInfo', TType.STRUCT, 5)
     self.publicUserInfo.write(oprot)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:cconrad,项目名称:evernotebackup,代码行数:27,代码来源:ttypes.py


示例9: write

 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('ProblemaCondicaoAvaliacaoAIThrift')
   if self.ciaps is not None:
     oprot.writeFieldBegin('ciaps', TType.LIST, 1)
     oprot.writeListBegin(TType.STRING, len(self.ciaps))
     for iter13 in self.ciaps:
       oprot.writeString(iter13)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.outroCiap1 is not None:
     oprot.writeFieldBegin('outroCiap1', TType.STRING, 2)
     oprot.writeString(self.outroCiap1)
     oprot.writeFieldEnd()
   if self.outroCiap2 is not None:
     oprot.writeFieldBegin('outroCiap2', TType.STRING, 3)
     oprot.writeString(self.outroCiap2)
     oprot.writeFieldEnd()
   if self.cid10 is not None:
     oprot.writeFieldBegin('cid10', TType.STRING, 4)
     oprot.writeString(self.cid10)
     oprot.writeFieldEnd()
   if self.cid10_2 is not None:
     oprot.writeFieldBegin('cid10_2', TType.STRING, 5)
     oprot.writeString(self.cid10_2)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:felipenedel,项目名称:integracao,代码行数:30,代码来源:ttypes.py


示例10: write

 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('LocationInfo')
   if self.parent is not None:
     oprot.writeFieldBegin('parent', TType.STRUCT, 1)
     self.parent.write(oprot)
     oprot.writeFieldEnd()
   if self.peers is not None:
     oprot.writeFieldBegin('peers', TType.LIST, 2)
     oprot.writeListBegin(TType.STRUCT, len(self.peers))
     for iter12 in self.peers:
       iter12.write(oprot)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.children is not None:
     oprot.writeFieldBegin('children', TType.LIST, 3)
     oprot.writeListBegin(TType.STRUCT, len(self.children))
     for iter13 in self.children:
       iter13.write(oprot)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:HarrisonW,项目名称:SuperPub,代码行数:25,代码来源:ttypes.py


示例11: write

 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('MailObject')
   if self.sendto is not None:
     oprot.writeFieldBegin('sendto', TType.STRING, 1)
     oprot.writeString(self.sendto)
     oprot.writeFieldEnd()
   if self.subject is not None:
     oprot.writeFieldBegin('subject', TType.STRING, 2)
     oprot.writeString(self.subject)
     oprot.writeFieldEnd()
   if self.content is not None:
     oprot.writeFieldBegin('content', TType.STRING, 3)
     oprot.writeString(self.content)
     oprot.writeFieldEnd()
   if self.attach_files is not None:
     oprot.writeFieldBegin('attach_files', TType.LIST, 4)
     oprot.writeListBegin(TType.STRING, len(self.attach_files))
     for iter6 in self.attach_files:
       oprot.writeString(iter6)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.priority is not None:
     oprot.writeFieldBegin('priority', TType.I32, 5)
     oprot.writeI32(self.priority)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:dreamcatcher2015,项目名称:email_sender,代码行数:30,代码来源:ttypes.py


示例12: write

 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('addDevice_args')
   if self.deviceId is not None:
     oprot.writeFieldBegin('deviceId', TType.I64, 1)
     oprot.writeI64(self.deviceId)
     oprot.writeFieldEnd()
   if self.deviceKey is not None:
     oprot.writeFieldBegin('deviceKey', TType.STRING, 2)
     oprot.writeString(self.deviceKey)
     oprot.writeFieldEnd()
   if self.serverType is not None:
     oprot.writeFieldBegin('serverType', TType.STRING, 3)
     oprot.writeString(self.serverType)
     oprot.writeFieldEnd()
   if self.supportedTaskTypes is not None:
     oprot.writeFieldBegin('supportedTaskTypes', TType.LIST, 4)
     oprot.writeListBegin(TType.STRING, len(self.supportedTaskTypes))
     for iter6 in self.supportedTaskTypes:
       oprot.writeString(iter6)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   if self.deviceInfo is not None:
     oprot.writeFieldBegin('deviceInfo', TType.STRING, 5)
     oprot.writeString(self.deviceInfo)
     oprot.writeFieldEnd()
   if self.connectToServerNeeded is not None:
     oprot.writeFieldBegin('connectToServerNeeded', TType.BOOL, 6)
     oprot.writeBool(self.connectToServerNeeded)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:guanxingquan,项目名称:workspace,代码行数:34,代码来源:DeviceArbiterService.py


示例13: write

 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('TAdminCommentQueryData')
   if self.totalCount is not None:
     oprot.writeFieldBegin('totalCount', TType.I32, 1)
     oprot.writeI32(self.totalCount)
     oprot.writeFieldEnd()
   if self.totalPage is not None:
     oprot.writeFieldBegin('totalPage', TType.I32, 2)
     oprot.writeI32(self.totalPage)
     oprot.writeFieldEnd()
   if self.pageSize is not None:
     oprot.writeFieldBegin('pageSize', TType.I32, 3)
     oprot.writeI32(self.pageSize)
     oprot.writeFieldEnd()
   if self.currPage is not None:
     oprot.writeFieldBegin('currPage', TType.I32, 4)
     oprot.writeI32(self.currPage)
     oprot.writeFieldEnd()
   if self.dataList is not None:
     oprot.writeFieldBegin('dataList', TType.LIST, 5)
     oprot.writeListBegin(TType.STRUCT, len(self.dataList))
     for iter6 in self.dataList:
       iter6.write(oprot)
     oprot.writeListEnd()
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:ybg555,项目名称:vue-tvBox,代码行数:30,代码来源:ttypes.py


示例14: write

 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('performBinaryUpdate_args')
   if self.relationName is not None:
     oprot.writeFieldBegin('relationName', TType.STRING, 1)
     oprot.writeString(self.relationName)
     oprot.writeFieldEnd()
   if self.old_column1 is not None:
     oprot.writeFieldBegin('old_column1', TType.STRING, 2)
     oprot.writeString(self.old_column1)
     oprot.writeFieldEnd()
   if self.old_column2 is not None:
     oprot.writeFieldBegin('old_column2', TType.STRING, 3)
     oprot.writeString(self.old_column2)
     oprot.writeFieldEnd()
   if self.new_column1 is not None:
     oprot.writeFieldBegin('new_column1', TType.STRING, 4)
     oprot.writeString(self.new_column1)
     oprot.writeFieldEnd()
   if self.new_column2 is not None:
     oprot.writeFieldBegin('new_column2', TType.STRING, 5)
     oprot.writeString(self.new_column2)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:FTSRG,项目名称:mondo-mondix-teiiddemo,代码行数:27,代码来源:TeiidChangeService.py


示例15: write

 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('FavoritesRemoveRequest')
   if self.type is not None:
     oprot.writeFieldBegin('type', TType.I32, 1)
     oprot.writeI32(self.type)
     oprot.writeFieldEnd()
   if self.userId is not None:
     oprot.writeFieldBegin('userId', TType.I32, 2)
     oprot.writeI32(self.userId)
     oprot.writeFieldEnd()
   if self.favUsrIds is not None:
     oprot.writeFieldBegin('favUsrIds', TType.SET, 3)
     oprot.writeSetBegin(TType.I32, len(self.favUsrIds))
     for iter19 in self.favUsrIds:
       oprot.writeI32(iter19)
     oprot.writeSetEnd()
     oprot.writeFieldEnd()
   if self.favWareIds is not None:
     oprot.writeFieldBegin('favWareIds', TType.SET, 4)
     oprot.writeSetBegin(TType.STRING, len(self.favWareIds))
     for iter20 in self.favWareIds:
       oprot.writeString(iter20)
     oprot.writeSetEnd()
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:Maksim1988,项目名称:test,代码行数:29,代码来源:ttypes.py


示例16: write

 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('CellInterval')
   if self.start_row != None:
     oprot.writeFieldBegin('start_row', TType.STRING, 1)
     oprot.writeString(self.start_row)
     oprot.writeFieldEnd()
   if self.start_column != None:
     oprot.writeFieldBegin('start_column', TType.STRING, 2)
     oprot.writeString(self.start_column)
     oprot.writeFieldEnd()
   if self.start_inclusive != None:
     oprot.writeFieldBegin('start_inclusive', TType.BOOL, 3)
     oprot.writeBool(self.start_inclusive)
     oprot.writeFieldEnd()
   if self.end_row != None:
     oprot.writeFieldBegin('end_row', TType.STRING, 4)
     oprot.writeString(self.end_row)
     oprot.writeFieldEnd()
   if self.end_column != None:
     oprot.writeFieldBegin('end_column', TType.STRING, 5)
     oprot.writeString(self.end_column)
     oprot.writeFieldEnd()
   if self.end_inclusive != None:
     oprot.writeFieldBegin('end_inclusive', TType.BOOL, 6)
     oprot.writeBool(self.end_inclusive)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:stan1y,项目名称:hypertable,代码行数:31,代码来源:ttypes.py


示例17: write

 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('readBlock_args')
   if self.block != None:
     oprot.writeFieldBegin('block', TType.STRUCT, 1)
     self.block.write(oprot)
     oprot.writeFieldEnd()
   if self.offset != None:
     oprot.writeFieldBegin('offset', TType.I64, 2)
     oprot.writeI64(self.offset)
     oprot.writeFieldEnd()
   if self.length != None:
     oprot.writeFieldBegin('length', TType.I32, 3)
     oprot.writeI32(self.length)
     oprot.writeFieldEnd()
   if self.ctx != None:
     oprot.writeFieldBegin('ctx', TType.STRUCT, 10)
     self.ctx.write(oprot)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
开发者ID:abayer,项目名称:hue,代码行数:25,代码来源:Datanode.py


示例18: write

    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("RestResponse")
        if self.status != None:
            oprot.writeFieldBegin("status", TType.I32, 1)
            oprot.writeI32(self.status)
            oprot.writeFieldEnd()
        if self.headers != None:
            oprot.writeFieldBegin("headers", TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.headers))
            for kiter25, viter26 in self.headers.items():
                oprot.writeString(kiter25)
                oprot.writeString(viter26)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.body != None:
            oprot.writeFieldBegin("body", TType.STRING, 3)
            oprot.writeString(self.body)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

        def validate(self):
            if self.status is None:
                raise TProtocol.TProtocolException(message="Required field status is unset!")
            return
开发者ID:mkramb,项目名称:zaposlim.se,代码行数:32,代码来源:ttypes.py


示例19: write

 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('DataObject')
   if self.dbname is not None:
     oprot.writeFieldBegin('dbname', TType.STRING, 1)
     oprot.writeString(self.dbname)
     oprot.writeFieldEnd()
   if self.key is not None:
     oprot.writeFieldBegin('key', TType.STRING, 2)
     oprot.writeString(self.key)
     oprot.writeFieldEnd()
   if self.data is not None:
     oprot.writeFieldBegin('data', TType.STRING, 3)
     oprot.writeString(self.data)
     oprot.writeFieldEnd()
   if self.extension is not None:
     oprot.writeFieldBegin('extension', TType.STRING, 4)
     oprot.writeString(self.extension)
     oprot.writeFieldEnd()
   if self.timestamp is not None:
     oprot.writeFieldBegin('timestamp', TType.I64, 5)
     oprot.writeI64(self.timestamp)
     oprot.writeFieldEnd()
   if self.size is not None:
     oprot.writeFieldBegin('size', TType.I32, 6)
     oprot.writeI32(self.size)
     oprot.writeFieldEnd()
   if self.state is not None:
     oprot.writeFieldBegin('state', TType.I32, 7)
     oprot.writeI32(self.state)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
开发者ID:bcolombini,项目名称:sparrowdb,代码行数:35,代码来源:ttypes.py


示例20: write

 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('User')
   if self.firstname != None:
     oprot.writeFieldBegin('firstname', TType.STRING, 1)
     oprot.writeString(self.firstname)
     oprot.writeFieldEnd()
   if self.lastname != None:
     oprot.writeFieldBegin('lastname', TType.STRING, 2)
     oprot.writeString(self.lastname)
     oprot.writeFieldEnd()
   if self.user_id != None:
     oprot.writeFieldBegin('user_id', TType.I32, 3)
     oprot.writeI32(self.user_id)
     oprot.writeFieldEnd()
   if self.sex != None:
     oprot.writeFieldBegin('sex', TType.I32, 4)
     oprot.writeI32(self.sex)
     oprot.writeFieldEnd()
   if self.active != None:
     oprot.writeFieldBegin('active', TType.BOOL, 5)
     oprot.writeBool(self.active)
     oprot.writeFieldEnd()
   if self.description != None:
     oprot.writeFieldBegin('description', TType.STRING, 6)
     oprot.writeString(self.description)
     oprot.writeFieldEnd()
   oprot.writeFieldStop()
   oprot.writeStructEnd()
   def validate(self):
     return
开发者ID:johnnyshi1225,项目名称:hello_thrift,代码行数:33,代码来源:ttypes.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python fastproto.decode函数代码示例发布时间:2022-05-27
下一篇:
Python fastbinary.decode_binary函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap