當前位置: 首頁>>代碼示例>>Java>>正文


Java TTupleProtocol.readBinary方法代碼示例

本文整理匯總了Java中org.apache.thrift.protocol.TTupleProtocol.readBinary方法的典型用法代碼示例。如果您正苦於以下問題:Java TTupleProtocol.readBinary方法的具體用法?Java TTupleProtocol.readBinary怎麽用?Java TTupleProtocol.readBinary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.thrift.protocol.TTupleProtocol的用法示例。


在下文中一共展示了TTupleProtocol.readBinary方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyedVersions struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.key = iprot.readBinary();
  struct.setKeyIsSet(true);
  {
    org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.versions = new ArrayList<VectorClock>(_list21.size);
    for (int _i22 = 0; _i22 < _list21.size; ++_i22)
    {
      VectorClock _elem23; // required
      _elem23 = new VectorClock();
      _elem23.read(iprot);
      struct.versions.add(_elem23);
    }
  }
  struct.setVersionsIsSet(true);
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:19,代碼來源:KeyedVersions.java

示例2: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, PutRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.header = new AsyncMessageHeader();
  struct.header.read(iprot);
  struct.setHeaderIsSet(true);
  struct.storeName = iprot.readString();
  struct.setStoreNameIsSet(true);
  struct.key = iprot.readBinary();
  struct.setKeyIsSet(true);
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.versionedValue = new VersionedValue();
    struct.versionedValue.read(iprot);
    struct.setVersionedValueIsSet(true);
  }
  if (incoming.get(1)) {
    struct.value = iprot.readBinary();
    struct.setValueIsSet(true);
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:22,代碼來源:PutRequestMessage.java

示例3: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BatchMutation struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.row = iprot.readBinary();
    struct.setRowIsSet(true);
  }
  if (incoming.get(1)) {
    {
      org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.mutations = new ArrayList<Mutation>(_list5.size);
      Mutation _elem6;
      for (int _i7 = 0; _i7 < _list5.size; ++_i7)
      {
        _elem6 = new Mutation();
        _elem6.read(iprot);
        struct.mutations.add(_elem6);
      }
    }
    struct.setMutationsIsSet(true);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:24,代碼來源:BatchMutation.java

示例4: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumnValue struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.family = iprot.readBinary();
  struct.setFamilyIsSet(true);
  struct.qualifier = iprot.readBinary();
  struct.setQualifierIsSet(true);
  struct.value = iprot.readBinary();
  struct.setValueIsSet(true);
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.timestamp = iprot.readI64();
    struct.setTimestampIsSet(true);
  }
  if (incoming.get(1)) {
    struct.tags = iprot.readBinary();
    struct.setTagsIsSet(true);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:20,代碼來源:TColumnValue.java

示例5: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyedValues struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.key = iprot.readBinary();
  struct.setKeyIsSet(true);
  {
    org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.values = new ArrayList<VersionedValue>(_list13.size);
    for (int _i14 = 0; _i14 < _list13.size; ++_i14)
    {
      VersionedValue _elem15; // required
      _elem15 = new VersionedValue();
      _elem15.read(iprot);
      struct.values.add(_elem15);
    }
  }
  struct.setValuesIsSet(true);
}
 
開發者ID:nsg-ethz,項目名稱:iTAP-controller,代碼行數:19,代碼來源:KeyedValues.java

示例6: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTableNames_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.success = new ArrayList<ByteBuffer>(_list55.size);
      ByteBuffer _elem56;
      for (int _i57 = 0; _i57 < _list55.size; ++_i57)
      {
        _elem56 = iprot.readBinary();
        struct.success.add(_elem56);
      }
    }
    struct.setSuccessIsSet(true);
  }
  if (incoming.get(1)) {
    struct.io = new IOError();
    struct.io.read(iprot);
    struct.setIoIsSet(true);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:24,代碼來源:Hbase.java

示例7: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.table = iprot.readBinary();
  struct.setTableIsSet(true);
  struct.tincrement = new TIncrement();
  struct.tincrement.read(iprot);
  struct.setTincrementIsSet(true);
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:10,代碼來源:THBaseService.java

示例8: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.family = iprot.readBinary();
  struct.setFamilyIsSet(true);
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.qualifier = iprot.readBinary();
    struct.setQualifierIsSet(true);
  }
  if (incoming.get(1)) {
    struct.timestamp = iprot.readI64();
    struct.setTimestampIsSet(true);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:16,代碼來源:TColumn.java

示例9: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.columnName = iprot.readBinary();
    struct.setColumnNameIsSet(true);
  }
  if (incoming.get(1)) {
    struct.cell = new TCell();
    struct.cell.read(iprot);
    struct.setCellIsSet(true);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:15,代碼來源:TColumn.java

示例10: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TRowResult struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.row = iprot.readBinary();
    struct.setRowIsSet(true);
  }
  if (incoming.get(1)) {
    {
      org.apache.thrift.protocol.TMap _map19 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.columns = new HashMap<ByteBuffer,TCell>(2*_map19.size);
      ByteBuffer _key20;
      TCell _val21;
      for (int _i22 = 0; _i22 < _map19.size; ++_i22)
      {
        _key20 = iprot.readBinary();
        _val21 = new TCell();
        _val21.read(iprot);
        struct.columns.put(_key20, _val21);
      }
    }
    struct.setColumnsIsSet(true);
  }
  if (incoming.get(2)) {
    {
      org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.sortedColumns = new ArrayList<TColumn>(_list23.size);
      TColumn _elem24;
      for (int _i25 = 0; _i25 < _list23.size; ++_i25)
      {
        _elem24 = new TColumn();
        _elem24.read(iprot);
        struct.sortedColumns.add(_elem24);
      }
    }
    struct.setSortedColumnsIsSet(true);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:40,代碼來源:TRowResult.java

示例11: read

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TIncrement struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.row = iprot.readBinary();
  struct.setRowIsSet(true);
  {
    org.apache.thrift.protocol.TList _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.columns = new ArrayList<TColumnIncrement>(_list81.size);
    TColumnIncrement _elem82;
    for (int _i83 = 0; _i83 < _list81.size; ++_i83)
    {
      _elem82 = new TColumnIncrement();
      _elem82.read(iprot);
      struct.columns.add(_elem82);
    }
  }
  struct.setColumnsIsSet(true);
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map84.size);
      ByteBuffer _key85;
      ByteBuffer _val86;
      for (int _i87 = 0; _i87 < _map84.size; ++_i87)
      {
        _key85 = iprot.readBinary();
        _val86 = iprot.readBinary();
        struct.attributes.put(_key85, _val86);
      }
    }
    struct.setAttributesIsSet(true);
  }
  if (incoming.get(1)) {
    struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32());
    struct.setDurabilityIsSet(true);
  }
  if (incoming.get(2)) {
    struct.cellVisibility = new TCellVisibility();
    struct.cellVisibility.read(iprot);
    struct.setCellVisibilityIsSet(true);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:44,代碼來源:TIncrement.java


注:本文中的org.apache.thrift.protocol.TTupleProtocol.readBinary方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。