Java Code Examples for org.apache.thrift.protocol.TTupleProtocol#readBinary()

The following examples show how to use org.apache.thrift.protocol.TTupleProtocol#readBinary() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TMessageSet.java    From suro with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TMessageSet struct) throws TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(5);
  if (incoming.get(0)) {
    struct.app = iprot.readString();
    struct.setAppIsSet(true);
  }
  if (incoming.get(1)) {
    struct.numMessages = iprot.readI32();
    struct.setNumMessagesIsSet(true);
  }
  if (incoming.get(2)) {
    struct.compression = iprot.readByte();
    struct.setCompressionIsSet(true);
  }
  if (incoming.get(3)) {
    struct.crc = iprot.readI64();
    struct.setCrcIsSet(true);
  }
  if (incoming.get(4)) {
    struct.messages = iprot.readBinary();
    struct.setMessagesIsSet(true);
  }
}
 
Example 2
Source File: Pistachios.java    From Pistachio with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, processEvent_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.event = iprot.readBinary();
    struct.setEventIsSet(true);
  }
  if (incoming.get(1)) {
    struct.jar_url = iprot.readString();
    struct.setJar_urlIsSet(true);
  }
  if (incoming.get(2)) {
    struct.class_full_name = iprot.readString();
    struct.setClass_full_nameIsSet(true);
  }
}
 
Example 3
Source File: Packet.java    From floodlight_with_topoguard with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Packet struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.messageType = OFMessageType.findByValue(iprot.readI32());
    struct.setMessageTypeIsSet(true);
  }
  if (incoming.get(1)) {
    struct.swPortTuple = new SwitchPortTuple();
    struct.swPortTuple.read(iprot);
    struct.setSwPortTupleIsSet(true);
  }
  if (incoming.get(2)) {
    struct.data = iprot.readBinary();
    struct.setDataIsSet(true);
  }
}
 
Example 4
Source File: BlobChunk.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BlobChunk struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.chunk = iprot.readBinary();
  struct.setChunkIsSet(true);
  struct.last = iprot.readBool();
  struct.setLastIsSet(true);
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.lobId = iprot.readI32();
    struct.setLobIdIsSet(true);
  }
  if (incoming.get(1)) {
    struct.offset = iprot.readI64();
    struct.setOffsetIsSet(true);
  }
  if (incoming.get(2)) {
    struct.totalLength = iprot.readI64();
    struct.setTotalLengthIsSet(true);
  }
}
 
Example 5
Source File: CounterSuperColumn.java    From stratio-cassandra with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, CounterSuperColumn struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.name = iprot.readBinary();
  struct.setNameIsSet(true);
  {
    org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.columns = new ArrayList<CounterColumn>(_list13.size);
    for (int _i14 = 0; _i14 < _list13.size; ++_i14)
    {
      CounterColumn _elem15;
      _elem15 = new CounterColumn();
      _elem15.read(iprot);
      struct.columns.add(_elem15);
    }
  }
  struct.setColumnsIsSet(true);
}
 
Example 6
Source File: Deletion.java    From stratio-cassandra with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Deletion struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.timestamp = iprot.readI64();
    struct.setTimestampIsSet(true);
  }
  if (incoming.get(1)) {
    struct.super_column = iprot.readBinary();
    struct.setSuper_columnIsSet(true);
  }
  if (incoming.get(2)) {
    struct.predicate = new SlicePredicate();
    struct.predicate.read(iprot);
    struct.setPredicateIsSet(true);
  }
}
 
Example 7
Source File: TMessagePack.java    From luxun with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TMessagePack struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.messageList = iprot.readBinary();
  struct.setMessageListIsSet(true);
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.magic = iprot.readByte();
    struct.setMagicIsSet(true);
  }
  if (incoming.get(1)) {
    struct.attribute = iprot.readByte();
    struct.setAttributeIsSet(true);
  }
  if (incoming.get(2)) {
    struct.crc32 = iprot.readI32();
    struct.setCrc32IsSet(true);
  }
}
 
Example 8
Source File: KeyedValues.java    From floodlight_with_topoguard with Apache License 2.0 6 votes vote down vote up
@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);
}
 
Example 9
Source File: DeleteRequestMessage.java    From floodlight_with_topoguard with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, DeleteRequestMessage 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(1);
  if (incoming.get(0)) {
    struct.version = new VectorClock();
    struct.version.read(iprot);
    struct.setVersionIsSet(true);
  }
}
 
Example 10
Source File: SlicePredicate.java    From stratio-cassandra with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SlicePredicate struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.column_names = new ArrayList<ByteBuffer>(_list21.size);
      for (int _i22 = 0; _i22 < _list21.size; ++_i22)
      {
        ByteBuffer _elem23;
        _elem23 = iprot.readBinary();
        struct.column_names.add(_elem23);
      }
    }
    struct.setColumn_namesIsSet(true);
  }
  if (incoming.get(1)) {
    struct.slice_range = new SliceRange();
    struct.slice_range.read(iprot);
    struct.setSlice_rangeIsSet(true);
  }
}
 
Example 11
Source File: MultiSliceRequest.java    From stratio-cassandra with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MultiSliceRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(6);
  if (incoming.get(0)) {
    struct.key = iprot.readBinary();
    struct.setKeyIsSet(true);
  }
  if (incoming.get(1)) {
    struct.column_parent = new ColumnParent();
    struct.column_parent.read(iprot);
    struct.setColumn_parentIsSet(true);
  }
  if (incoming.get(2)) {
    {
      org.apache.thrift.protocol.TList _list221 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.column_slices = new ArrayList<ColumnSlice>(_list221.size);
      for (int _i222 = 0; _i222 < _list221.size; ++_i222)
      {
        ColumnSlice _elem223;
        _elem223 = new ColumnSlice();
        _elem223.read(iprot);
        struct.column_slices.add(_elem223);
      }
    }
    struct.setColumn_slicesIsSet(true);
  }
  if (incoming.get(3)) {
    struct.reversed = iprot.readBool();
    struct.setReversedIsSet(true);
  }
  if (incoming.get(4)) {
    struct.count = iprot.readI32();
    struct.setCountIsSet(true);
  }
  if (incoming.get(5)) {
    struct.consistency_level = ConsistencyLevel.findByValue(iprot.readI32());
    struct.setConsistency_levelIsSet(true);
  }
}
 
Example 12
Source File: VersionedValue.java    From floodlight_with_topoguard with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, VersionedValue struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.version = new VectorClock();
  struct.version.read(iprot);
  struct.setVersionIsSet(true);
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.value = iprot.readBinary();
    struct.setValueIsSet(true);
  }
}
 
Example 13
Source File: Message.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Message struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(5);
  if (incoming.get(0)) {
    struct.key = iprot.readString();
    struct.setKeyIsSet(true);
  }
  if (incoming.get(1)) {
    struct.value = iprot.readBinary();
    struct.setValueIsSet(true);
  }
  if (incoming.get(2)) {
    struct.tag = iprot.readString();
    struct.setTagIsSet(true);
  }
  if (incoming.get(3)) {
    struct.offset = iprot.readI64();
    struct.setOffsetIsSet(true);
  }
  if (incoming.get(4)) {
    {
      org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.properties = new HashMap<String,String>(2*_map6.size);
      String _key7;
      String _val8;
      for (int _i9 = 0; _i9 < _map6.size; ++_i9)
      {
        _key7 = iprot.readString();
        _val8 = iprot.readString();
        struct.properties.put(_key7, _val8);
      }
    }
    struct.setPropertiesIsSet(true);
  }
}
 
Example 14
Source File: IpRuleset.java    From xio with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, IpRuleset struct)
    throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  {
    org.apache.thrift.protocol.TSet _set10 =
        new org.apache.thrift.protocol.TSet(
            org.apache.thrift.protocol.TType.STRING, iprot.readI32());
    struct.blacklistIps = new HashSet<ByteBuffer>(2 * _set10.size);
    ByteBuffer _elem11;
    for (int _i12 = 0; _i12 < _set10.size; ++_i12) {
      _elem11 = iprot.readBinary();
      struct.blacklistIps.add(_elem11);
    }
  }
  struct.setBlacklistIpsIsSet(true);
  {
    org.apache.thrift.protocol.TSet _set13 =
        new org.apache.thrift.protocol.TSet(
            org.apache.thrift.protocol.TType.STRING, iprot.readI32());
    struct.whitelistIps = new HashSet<ByteBuffer>(2 * _set13.size);
    ByteBuffer _elem14;
    for (int _i15 = 0; _i15 < _set13.size; ++_i15) {
      _elem14 = iprot.readBinary();
      struct.whitelistIps.add(_elem14);
    }
  }
  struct.setWhitelistIpsIsSet(true);
}
 
Example 15
Source File: KeyRange.java    From stratio-cassandra with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyRange struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.count = iprot.readI32();
  struct.setCountIsSet(true);
  BitSet incoming = iprot.readBitSet(5);
  if (incoming.get(0)) {
    struct.start_key = iprot.readBinary();
    struct.setStart_keyIsSet(true);
  }
  if (incoming.get(1)) {
    struct.end_key = iprot.readBinary();
    struct.setEnd_keyIsSet(true);
  }
  if (incoming.get(2)) {
    struct.start_token = iprot.readString();
    struct.setStart_tokenIsSet(true);
  }
  if (incoming.get(3)) {
    struct.end_token = iprot.readString();
    struct.setEnd_tokenIsSet(true);
  }
  if (incoming.get(4)) {
    {
      org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.row_filter = new ArrayList<IndexExpression>(_list37.size);
      for (int _i38 = 0; _i38 < _list37.size; ++_i38)
      {
        IndexExpression _elem39;
        _elem39 = new IndexExpression();
        _elem39.read(iprot);
        struct.row_filter.add(_elem39);
      }
    }
    struct.setRow_filterIsSet(true);
  }
}
 
Example 16
Source File: DelayMessage.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, DelayMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(13);
  if (incoming.get(0)) {
    struct.topic = iprot.readString();
    struct.setTopicIsSet(true);
  }
  if (incoming.get(1)) {
    struct.uniqDelayMsgId = iprot.readString();
    struct.setUniqDelayMsgIdIsSet(true);
  }
  if (incoming.get(2)) {
    struct.body = iprot.readBinary();
    struct.setBodyIsSet(true);
  }
  if (incoming.get(3)) {
    struct.tags = iprot.readString();
    struct.setTagsIsSet(true);
  }
  if (incoming.get(4)) {
    struct.action = iprot.readI32();
    struct.setActionIsSet(true);
  }
  if (incoming.get(5)) {
    struct.timestamp = iprot.readI64();
    struct.setTimestampIsSet(true);
  }
  if (incoming.get(6)) {
    struct.dmsgtype = iprot.readI32();
    struct.setDmsgtypeIsSet(true);
  }
  if (incoming.get(7)) {
    struct.interval = iprot.readI64();
    struct.setIntervalIsSet(true);
  }
  if (incoming.get(8)) {
    struct.expire = iprot.readI64();
    struct.setExpireIsSet(true);
  }
  if (incoming.get(9)) {
    struct.times = iprot.readI64();
    struct.setTimesIsSet(true);
  }
  if (incoming.get(10)) {
    struct.uuid = iprot.readString();
    struct.setUuidIsSet(true);
  }
  if (incoming.get(11)) {
    struct.version = iprot.readString();
    struct.setVersionIsSet(true);
  }
  if (incoming.get(12)) {
    {
      org.apache.thrift.protocol.TMap _map36 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.properties = new HashMap<String,String>(2*_map36.size);
      String _key37;
      String _val38;
      for (int _i39 = 0; _i39 < _map36.size; ++_i39)
      {
        _key37 = iprot.readString();
        _val38 = iprot.readString();
        struct.properties.put(_key37, _val38);
      }
    }
    struct.setPropertiesIsSet(true);
  }
}
 
Example 17
Source File: Message.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Message struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(9);
  if (incoming.get(0)) {
    struct.topic = iprot.readString();
    struct.setTopicIsSet(true);
  }
  if (incoming.get(1)) {
    struct.key = iprot.readString();
    struct.setKeyIsSet(true);
  }
  if (incoming.get(2)) {
    struct.value = iprot.readString();
    struct.setValueIsSet(true);
  }
  if (incoming.get(3)) {
    struct.hashId = iprot.readI64();
    struct.setHashIdIsSet(true);
  }
  if (incoming.get(4)) {
    struct.tags = iprot.readString();
    struct.setTagsIsSet(true);
  }
  if (incoming.get(5)) {
    struct.partitionId = iprot.readI32();
    struct.setPartitionIdIsSet(true);
  }
  if (incoming.get(6)) {
    struct.body = iprot.readBinary();
    struct.setBodyIsSet(true);
  }
  if (incoming.get(7)) {
    struct.version = iprot.readString();
    struct.setVersionIsSet(true);
  }
  if (incoming.get(8)) {
    {
      org.apache.thrift.protocol.TMap _map26 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.properties = new HashMap<String,String>(2*_map26.size);
      String _key27;
      String _val28;
      for (int _i29 = 0; _i29 < _map26.size; ++_i29)
      {
        _key27 = iprot.readString();
        _val28 = iprot.readString();
        struct.properties.put(_key27, _val28);
      }
    }
    struct.setPropertiesIsSet(true);
  }
}
 
Example 18
Source File: RowSet.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RowSet struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  {
    org.apache.thrift.protocol.TList _list307 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.rows = new ArrayList<Row>(_list307.size);
    for (int _i308 = 0; _i308 < _list307.size; ++_i308)
    {
      Row _elem309;
      _elem309 = new Row();
      _elem309.read(iprot);
      struct.rows.add(_elem309);
    }
  }
  struct.setRowsIsSet(true);
  struct.flags = iprot.readByte();
  struct.setFlagsIsSet(true);
  struct.cursorId = iprot.readI32();
  struct.setCursorIdIsSet(true);
  struct.statementId = iprot.readI32();
  struct.setStatementIdIsSet(true);
  struct.connId = iprot.readI32();
  struct.setConnIdIsSet(true);
  BitSet incoming = iprot.readBitSet(7);
  if (incoming.get(0)) {
    struct.token = iprot.readBinary();
    struct.setTokenIsSet(true);
  }
  if (incoming.get(1)) {
    struct.source = new HostAddress();
    struct.source.read(iprot);
    struct.setSourceIsSet(true);
  }
  if (incoming.get(2)) {
    struct.offset = iprot.readI32();
    struct.setOffsetIsSet(true);
  }
  if (incoming.get(3)) {
    {
      org.apache.thrift.protocol.TList _list310 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.metadata = new ArrayList<ColumnDescriptor>(_list310.size);
      for (int _i311 = 0; _i311 < _list310.size; ++_i311)
      {
        ColumnDescriptor _elem312;
        _elem312 = new ColumnDescriptor();
        _elem312.read(iprot);
        struct.metadata.add(_elem312);
      }
    }
    struct.setMetadataIsSet(true);
  }
  if (incoming.get(4)) {
    struct.cursorName = iprot.readString();
    struct.setCursorNameIsSet(true);
  }
  if (incoming.get(5)) {
    struct.warnings = new GFXDExceptionData();
    struct.warnings.read(iprot);
    struct.setWarningsIsSet(true);
  }
  if (incoming.get(6)) {
    {
      org.apache.thrift.protocol.TList _list313 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
      struct.rowIdsForUpdateOrDelete = new ArrayList<Long>(_list313.size);
      for (int _i314 = 0; _i314 < _list313.size; ++_i314)
      {
        long _elem315;
        _elem315 = iprot.readI64();
        struct.rowIdsForUpdateOrDelete.add(_elem315);
      }
    }
    struct.setRowIdsForUpdateOrDeleteIsSet(true);
  }
}
 
Example 19
Source File: RowSet.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RowSet struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  {
    org.apache.thrift.protocol.TList _list307 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.rows = new ArrayList<Row>(_list307.size);
    for (int _i308 = 0; _i308 < _list307.size; ++_i308)
    {
      Row _elem309;
      _elem309 = new Row();
      _elem309.read(iprot);
      struct.rows.add(_elem309);
    }
  }
  struct.setRowsIsSet(true);
  struct.flags = iprot.readByte();
  struct.setFlagsIsSet(true);
  struct.cursorId = iprot.readI32();
  struct.setCursorIdIsSet(true);
  struct.statementId = iprot.readI32();
  struct.setStatementIdIsSet(true);
  struct.connId = iprot.readI32();
  struct.setConnIdIsSet(true);
  BitSet incoming = iprot.readBitSet(7);
  if (incoming.get(0)) {
    struct.token = iprot.readBinary();
    struct.setTokenIsSet(true);
  }
  if (incoming.get(1)) {
    struct.source = new HostAddress();
    struct.source.read(iprot);
    struct.setSourceIsSet(true);
  }
  if (incoming.get(2)) {
    struct.offset = iprot.readI32();
    struct.setOffsetIsSet(true);
  }
  if (incoming.get(3)) {
    {
      org.apache.thrift.protocol.TList _list310 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.metadata = new ArrayList<ColumnDescriptor>(_list310.size);
      for (int _i311 = 0; _i311 < _list310.size; ++_i311)
      {
        ColumnDescriptor _elem312;
        _elem312 = new ColumnDescriptor();
        _elem312.read(iprot);
        struct.metadata.add(_elem312);
      }
    }
    struct.setMetadataIsSet(true);
  }
  if (incoming.get(4)) {
    struct.cursorName = iprot.readString();
    struct.setCursorNameIsSet(true);
  }
  if (incoming.get(5)) {
    struct.warnings = new GFXDExceptionData();
    struct.warnings.read(iprot);
    struct.setWarningsIsSet(true);
  }
  if (incoming.get(6)) {
    {
      org.apache.thrift.protocol.TList _list313 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
      struct.rowIdsForUpdateOrDelete = new ArrayList<Long>(_list313.size);
      for (int _i314 = 0; _i314 < _list313.size; ++_i314)
      {
        long _elem315;
        _elem315 = iprot.readI64();
        struct.rowIdsForUpdateOrDelete.add(_elem315);
      }
    }
    struct.setRowIdsForUpdateOrDeleteIsSet(true);
  }
}
 
Example 20
Source File: Message.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Message struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(9);
  if (incoming.get(0)) {
    struct.topic = iprot.readString();
    struct.setTopicIsSet(true);
  }
  if (incoming.get(1)) {
    struct.key = iprot.readString();
    struct.setKeyIsSet(true);
  }
  if (incoming.get(2)) {
    struct.value = iprot.readString();
    struct.setValueIsSet(true);
  }
  if (incoming.get(3)) {
    struct.hashId = iprot.readI64();
    struct.setHashIdIsSet(true);
  }
  if (incoming.get(4)) {
    struct.tags = iprot.readString();
    struct.setTagsIsSet(true);
  }
  if (incoming.get(5)) {
    struct.partitionId = iprot.readI32();
    struct.setPartitionIdIsSet(true);
  }
  if (incoming.get(6)) {
    struct.body = iprot.readBinary();
    struct.setBodyIsSet(true);
  }
  if (incoming.get(7)) {
    struct.version = iprot.readString();
    struct.setVersionIsSet(true);
  }
  if (incoming.get(8)) {
    {
      org.apache.thrift.protocol.TMap _map26 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.properties = new HashMap<String,String>(2*_map26.size);
      String _key27;
      String _val28;
      for (int _i29 = 0; _i29 < _map26.size; ++_i29)
      {
        _key27 = iprot.readString();
        _val28 = iprot.readString();
        struct.properties.put(_key27, _val28);
      }
    }
    struct.setPropertiesIsSet(true);
  }
}