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


Java TTupleProtocol.writeBinary方法代碼示例

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


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

示例1: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkAndDelete_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBinary(struct.table);
  oprot.writeBinary(struct.row);
  oprot.writeBinary(struct.family);
  oprot.writeBinary(struct.qualifier);
  struct.tdelete.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetValue()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetValue()) {
    oprot.writeBinary(struct.value);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:18,代碼來源:THBaseService.java

示例2: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyedVersions struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBinary(struct.key);
  {
    oprot.writeI32(struct.versions.size());
    for (VectorClock _iter20 : struct.versions)
    {
      _iter20.write(oprot);
    }
  }
}
 
開發者ID:xuraylei,項目名稱:fresco_floodlight,代碼行數:13,代碼來源:KeyedVersions.java

示例3: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getRowTs_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTableName()) {
    optionals.set(0);
  }
  if (struct.isSetRow()) {
    optionals.set(1);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(2);
  }
  if (struct.isSetAttributes()) {
    optionals.set(3);
  }
  oprot.writeBitSet(optionals, 4);
  if (struct.isSetTableName()) {
    oprot.writeBinary(struct.tableName);
  }
  if (struct.isSetRow()) {
    oprot.writeBinary(struct.row);
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetAttributes()) {
    {
      oprot.writeI32(struct.attributes.size());
      for (Map.Entry<ByteBuffer, ByteBuffer> _iter187 : struct.attributes.entrySet())
      {
        oprot.writeBinary(_iter187.getKey());
        oprot.writeBinary(_iter187.getValue());
      }
    }
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:38,代碼來源:Hbase.java

示例4: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRowResult struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetRow()) {
    optionals.set(0);
  }
  if (struct.isSetColumns()) {
    optionals.set(1);
  }
  if (struct.isSetSortedColumns()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetRow()) {
    oprot.writeBinary(struct.row);
  }
  if (struct.isSetColumns()) {
    {
      oprot.writeI32(struct.columns.size());
      for (Map.Entry<ByteBuffer, TCell> _iter17 : struct.columns.entrySet())
      {
        oprot.writeBinary(_iter17.getKey());
        _iter17.getValue().write(oprot);
      }
    }
  }
  if (struct.isSetSortedColumns()) {
    {
      oprot.writeI32(struct.sortedColumns.size());
      for (TColumn _iter18 : struct.sortedColumns)
      {
        _iter18.write(oprot);
      }
    }
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:38,代碼來源:TRowResult.java

示例5: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DeleteRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  oprot.writeString(struct.storeName);
  oprot.writeBinary(struct.key);
  BitSet optionals = new BitSet();
  if (struct.isSetVersion()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetVersion()) {
    struct.version.write(oprot);
  }
}
 
開發者ID:nsg-ethz,項目名稱:iTAP-controller,代碼行數:16,代碼來源:DeleteRequestMessage.java

示例6: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Mutation struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetIsDelete()) {
    optionals.set(0);
  }
  if (struct.isSetColumn()) {
    optionals.set(1);
  }
  if (struct.isSetValue()) {
    optionals.set(2);
  }
  if (struct.isSetWriteToWAL()) {
    optionals.set(3);
  }
  oprot.writeBitSet(optionals, 4);
  if (struct.isSetIsDelete()) {
    oprot.writeBool(struct.isDelete);
  }
  if (struct.isSetColumn()) {
    oprot.writeBinary(struct.column);
  }
  if (struct.isSetValue()) {
    oprot.writeBinary(struct.value);
  }
  if (struct.isSetWriteToWAL()) {
    oprot.writeBool(struct.writeToWAL);
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:31,代碼來源:Mutation.java

示例7: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRowMutations struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBinary(struct.row);
  {
    oprot.writeI32(struct.mutations.size());
    for (TMutation _iter128 : struct.mutations)
    {
      _iter128.write(oprot);
    }
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:13,代碼來源:TRowMutations.java

示例8: write

import org.apache.thrift.protocol.TTupleProtocol; //導入方法依賴的package包/類
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GetRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  oprot.writeString(struct.storeName);
  oprot.writeBinary(struct.key);
}
 
開發者ID:nsg-ethz,項目名稱:iTAP-controller,代碼行數:8,代碼來源:GetRequestMessage.java


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