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


Python fastbinary.decode_binary函数代码示例

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


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

示例1: read

 def read(self, iprot):
   if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
     fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
     return
   iprot.readStructBegin()
   while True:
     (fname, ftype, fid) = iprot.readFieldBegin()
     if ftype == TType.STOP:
       break
     if fid == 1:
       if ftype == TType.STRUCT:
         self.schema = hive_metastore.ttypes.Schema()
         self.schema.read(iprot)
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.STRING:
         self.table_dir = iprot.readString();
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.STRING:
         self.in_tablename = iprot.readString();
       else:
         iprot.skip(ftype)
     elif fid == 4:
       if ftype == TType.STRING:
         self.delim = iprot.readString();
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:DatalakeInc,项目名称:hortonworks-sandbox,代码行数:34,代码来源:ttypes.py

示例2: read

 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 == 0:
       if ftype == TType.LIST:
         self.success = []
         (_etype10, _size7) = iprot.readListBegin()
         for _i11 in xrange(_size7):
           _elem12 = iprot.readString();
           self.success.append(_elem12)
         iprot.readListEnd()
       else:
         iprot.skip(ftype)
     elif fid == 1:
       if ftype == TType.STRUCT:
         self.ex = HiveServerException()
         self.ex.read(iprot)
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:bhargav08,项目名称:hiver,代码行数:29,代码来源:ThriftHive.py

示例3: read

 def read(self, iprot):
   if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
     fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
     return
   iprot.readStructBegin()
   while True:
     (fname, ftype, fid) = iprot.readFieldBegin()
     if ftype == TType.STOP:
       break
     if fid == 1:
       if ftype == TType.STRING:
         self.entity = iprot.readString().decode('utf-8')
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.STRING:
         self.tag = iprot.readString().decode('utf-8')
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.I32:
         self.startOffset = iprot.readI32();
       else:
         iprot.skip(ftype)
     elif fid == 4:
       if ftype == TType.I32:
         self.endOffset = iprot.readI32();
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:relwell,项目名称:stanford-thrift,代码行数:33,代码来源:ttypes.py

示例4: read

 def read(self, iprot):
   if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
     fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
     return
   iprot.readStructBegin()
   while True:
     (fname, ftype, fid) = iprot.readFieldBegin()
     if ftype == TType.STOP:
       break
     if fid == 1:
       if ftype == TType.I32:
         self.id = iprot.readI32();
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.STRUCT:
         self.ystats = Stats()
         self.ystats.read(iprot)
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.STRING:
         self.snapshot_filepath = iprot.readString();
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:AndyHovingh,项目名称:intellij-community,代码行数:29,代码来源:ttypes.py

示例5: read

 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 == 0:
             if ftype == TType.LIST:
                 self.success = []
                 (_etype24, _size21) = iprot.readListBegin()
                 for _i25 in xrange(_size21):
                     _elem26 = elephantdb.ttypes.Value()
                     _elem26.read(iprot)
                     self.success.append(_elem26)
                 iprot.readListEnd()
             else:
                 iprot.skip(ftype)
         else:
             iprot.skip(ftype)
         iprot.readFieldEnd()
     iprot.readStructEnd()
开发者ID:strategist922,项目名称:elephantdb,代码行数:29,代码来源:ElephantDBList.py

示例6: read

 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 == 10:
       if ftype == TType.STRUCT:
         self.ctx = hadoop.api.common.ttypes.RequestContext()
         self.ctx.read(iprot)
       else:
         iprot.skip(ftype)
     elif fid == 1:
       if ftype == TType.STRUCT:
         self.block = Block()
         self.block.read(iprot)
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.I64:
         self.offset = iprot.readI64();
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.I32:
         self.length = iprot.readI32();
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:abayer,项目名称:hue,代码行数:35,代码来源:Datanode.py

示例7: read

 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 == 0:
       if ftype == TType.STRUCT:
         self.success = JdQueryResult()
         self.success.read(iprot)
       else:
         iprot.skip(ftype)
     elif fid == 1:
       if ftype == TType.STRUCT:
         self.namedError = ipin.rpc.common.ttypes.NamedError()
         self.namedError.read(iprot)
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:haogods,项目名称:etl_task,代码行数:25,代码来源:JdQueryService.py

示例8: read

 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.I64:
         self.timestamp = iprot.readI64();
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.STRING:
         self.value = iprot.readString();
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.STRUCT:
         self.host = Endpoint()
         self.host.read(iprot)
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:2216288075,项目名称:meiduo_project,代码行数:29,代码来源:ttypes.py

示例9: read

 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.image = []
         (_etype3, _size0) = iprot.readListBegin()
         for _i4 in xrange(_size0):
           _elem5 = []
           (_etype9, _size6) = iprot.readListBegin()
           for _i10 in xrange(_size6):
             _elem11 = []
             (_etype15, _size12) = iprot.readListBegin()
             for _i16 in xrange(_size12):
               _elem17 = iprot.readDouble();
               _elem11.append(_elem17)
             iprot.readListEnd()
             _elem5.append(_elem11)
           iprot.readListEnd()
           self.image.append(_elem5)
         iprot.readListEnd()
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:timotiusnc,项目名称:mnist,代码行数:33,代码来源:MNIST.py

示例10: read

 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.BOOL:
         self.result = iprot.readBool();
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.MAP:
         self.options = {}
         (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
         for _i4 in xrange(_size0):
           _key5 = iprot.readString();
           _val6 = iprot.readString();
           self.options[_key5] = _val6
         iprot.readMapEnd()
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:hobbit-vt,项目名称:livetex-fake-services,代码行数:29,代码来源:ttypes.py

示例11: read

 def read(self, iprot):
   if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
     fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
     return
   iprot.readStructBegin()
   while True:
     (fname, ftype, fid) = iprot.readFieldBegin()
     if ftype == TType.STOP:
       break
     if fid == 1:
       if ftype == TType.I32:
         self.communityId = iprot.readI32();
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.I32:
         self.labelId = iprot.readI32();
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.I32:
         self.currentPage = iprot.readI32();
       else:
         iprot.skip(ftype)
     elif fid == 4:
       if ftype == TType.I32:
         self.pageSize = iprot.readI32();
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:ybg555,项目名称:vue-tvBox,代码行数:33,代码来源:ISocialServiceGetPostList.py

示例12: read

 def read(self, iprot):
   if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
     fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
     return
   iprot.readStructBegin()
   while True:
     (fname, ftype, fid) = iprot.readFieldBegin()
     if ftype == TType.STOP:
       break
     if fid == 1:
       if ftype == TType.STRUCT:
         self.invalid = InvalidOperation()
         self.invalid.read(iprot)
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.STRUCT:
         self.ouch = InternalError()
         self.ouch.read(iprot)
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.STRUCT:
         self.not_logged_in = NotLoggedIn()
         self.not_logged_in.read(iprot)
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:hodduc,项目名称:otl,代码行数:31,代码来源:ReadStatusManager.py

示例13: read

 def read(self, iprot):
   if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
     fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
     return
   iprot.readStructBegin()
   while True:
     (fname, ftype, fid) = iprot.readFieldBegin()
     if ftype == TType.STOP:
       break
     if fid == 1:
       if ftype == TType.STRING:
         self.id = iprot.readString()
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.STRING:
         self.name = iprot.readString()
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.BOOL:
         self.done = iprot.readBool()
       else:
         iprot.skip(ftype)
     elif fid == 4:
       if ftype == TType.STRING:
         self.userId = iprot.readString()
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:danielfbm,项目名称:thrift-demo,代码行数:33,代码来源:Tasks.py

示例14: read

 def read(self, iprot):
   if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
     fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
     return
   iprot.readStructBegin()
   while True:
     (fname, ftype, fid) = iprot.readFieldBegin()
     if ftype == TType.STOP:
       break
     if fid == 1:
       if ftype == TType.I32:
         self.delay = iprot.readI32();
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.I32:
         self.jitter = iprot.readI32();
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.DOUBLE:
         self.correlation = iprot.readDouble();
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:duydb2,项目名称:ZTC,代码行数:28,代码来源:ttypes.py

示例15: read

 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 == 4:
       if ftype == TType.STRING:
         self.first = iprot.readString()
       else:
         iprot.skip(ftype)
     elif fid == 3:
       if ftype == TType.I16:
         self.second = iprot.readI16()
       else:
         iprot.skip(ftype)
     elif fid == 2:
       if ftype == TType.I32:
         self.third = iprot.readI32()
       else:
         iprot.skip(ftype)
     elif fid == 1:
       if ftype == TType.I64:
         self.fourth = iprot.readI64()
       else:
         iprot.skip(ftype)
     else:
       iprot.skip(ftype)
     iprot.readFieldEnd()
   iprot.readStructEnd()
开发者ID:BinaryMelody,项目名称:ThriftDocs,代码行数:33,代码来源:ReverseOrderService.py


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