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

The following examples show how to use org.apache.thrift.protocol.TTupleProtocol#writeI32() . 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: GFXDException.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GFXDException struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.exceptionData.write(oprot);
  oprot.writeString(struct.serverInfo);
  BitSet optionals = new BitSet();
  if (struct.isSetNextExceptions()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetNextExceptions()) {
    {
      oprot.writeI32(struct.nextExceptions.size());
      for (GFXDExceptionData _iter254 : struct.nextExceptions)
      {
        _iter254.write(oprot);
      }
    }
  }
}
 
Example 2
Source File: SyncRequestMessage.java    From floodlight_with_topoguard with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SyncRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  struct.store.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetKeys()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetKeys()) {
    {
      oprot.writeI32(struct.keys.size());
      for (ByteBuffer _iter52 : struct.keys)
      {
        oprot.writeBinary(_iter52);
      }
    }
  }
}
 
Example 3
Source File: Column.java    From stratio-cassandra with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Column struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBinary(struct.name);
  BitSet optionals = new BitSet();
  if (struct.isSetValue()) {
    optionals.set(0);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(1);
  }
  if (struct.isSetTtl()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetValue()) {
    oprot.writeBinary(struct.value);
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetTtl()) {
    oprot.writeI32(struct.ttl);
  }
}
 
Example 4
Source File: TListSentryPrivilegesResponse.java    From incubator-sentry with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TListSentryPrivilegesResponse struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.status.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetPrivileges()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetPrivileges()) {
    {
      oprot.writeI32(struct.privileges.size());
      for (TSentryPrivilege _iter60 : struct.privileges)
      {
        _iter60.write(oprot);
      }
    }
  }
}
 
Example 5
Source File: TweetSearchResult.java    From octo-rpc with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TweetSearchResult struct) throws TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTweets()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetTweets()) {
    {
      oprot.writeI32(struct.tweets.size());
      for (Tweet _iter4 : struct.tweets)
      {
        _iter4.write(oprot);
      }
    }
  }
}
 
Example 6
Source File: NimbusSummary.java    From jstorm with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NimbusSummary struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.nimbusMaster.write(oprot);
  {
    oprot.writeI32(struct.nimbusSlaves.size());
    for (NimbusStat _iter78 : struct.nimbusSlaves)
    {
      _iter78.write(oprot);
    }
  }
  oprot.writeI32(struct.supervisorNum);
  oprot.writeI32(struct.totalPortNum);
  oprot.writeI32(struct.usedPortNum);
  oprot.writeI32(struct.freePortNum);
  oprot.writeString(struct.version);
}
 
Example 7
Source File: Result.java    From DDMQ with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetCode()) {
    optionals.set(0);
  }
  if (struct.isSetMsg()) {
    optionals.set(1);
  }
  if (struct.isSetKey()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetCode()) {
    oprot.writeI32(struct.code);
  }
  if (struct.isSetMsg()) {
    oprot.writeString(struct.msg);
  }
  if (struct.isSetKey()) {
    oprot.writeString(struct.key);
  }
}
 
Example 8
Source File: PullException.java    From DDMQ with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, PullException struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetCode()) {
    optionals.set(0);
  }
  if (struct.isSetMessage()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetCode()) {
    oprot.writeI32(struct.code);
  }
  if (struct.isSetMessage()) {
    oprot.writeString(struct.message);
  }
}
 
Example 9
Source File: scribe.java    From drift with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Log_args struct)
        throws TException
{
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetMessages()) {
        optionals.set(0);
    }
    oprot.writeBitSet(optionals, 1);
    if (struct.isSetMessages()) {
        {
            oprot.writeI32(struct.messages.size());
            for (LogEntry _iter4 : struct.messages) {
                _iter4.write(oprot);
            }
        }
    }
}
 
Example 10
Source File: TDssService.java    From light_drtc with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, rtcStats_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSuccess()) {
    oprot.writeI32(struct.success);
  }
}
 
Example 11
Source File: TAlterSentryRoleDeleteGroupsRequest.java    From incubator-sentry with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAlterSentryRoleDeleteGroupsRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.protocol_version);
  oprot.writeString(struct.requestorUserName);
  oprot.writeString(struct.roleName);
  oprot.writeString(struct.component);
  {
    oprot.writeI32(struct.groups.size());
    for (String _iter20 : struct.groups)
    {
      oprot.writeString(_iter20);
    }
  }
}
 
Example 12
Source File: GFXDExceptionData.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GFXDExceptionData struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeString(struct.reason);
  oprot.writeString(struct.sqlState);
  oprot.writeI32(struct.severity);
}
 
Example 13
Source File: AsyncMessageHeader.java    From floodlight_with_topoguard with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AsyncMessageHeader struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTransactionId()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetTransactionId()) {
    oprot.writeI32(struct.transactionId);
  }
}
 
Example 14
Source File: TCalculator.java    From nettythrift with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, add_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSuccess()) {
    oprot.writeI32(struct.success);
  }
}
 
Example 15
Source File: Tweet.java    From octo-rpc with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Tweet struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.userId);
  oprot.writeString(struct.userName);
  oprot.writeString(struct.text);
  BitSet optionals = new BitSet();
  if (struct.isSetLoc()) {
    optionals.set(0);
  }
  if (struct.isSetTweetType()) {
    optionals.set(1);
  }
  if (struct.isSetAge()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetLoc()) {
    struct.loc.write(oprot);
  }
  if (struct.isSetTweetType()) {
    oprot.writeI32(struct.tweetType.getValue());
  }
  if (struct.isSetAge()) {
    oprot.writeI32(struct.age);
  }
}
 
Example 16
Source File: PDXNode.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, PDXNode struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSingleField()) {
    optionals.set(0);
  }
  if (struct.isSetFields()) {
    optionals.set(1);
  }
  if (struct.isSetRefId()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetSingleField()) {
    struct.singleField.write(oprot);
  }
  if (struct.isSetFields()) {
    {
      oprot.writeI32(struct.fields.size());
      for (FieldValue _iter76 : struct.fields)
      {
        _iter76.write(oprot);
      }
    }
  }
  if (struct.isSetRefId()) {
    oprot.writeI32(struct.refId);
  }
}
 
Example 17
Source File: WorkerSummary.java    From jstorm with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerSummary struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.port);
  oprot.writeI32(struct.uptime);
  oprot.writeString(struct.topology);
  {
    oprot.writeI32(struct.tasks.size());
    for (TaskComponent _iter102 : struct.tasks)
    {
      _iter102.write(oprot);
    }
  }
}
 
Example 18
Source File: TTransaction.java    From phoenix-tephra with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TTransaction struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTransactionId()) {
    optionals.set(0);
  }
  if (struct.isSetReadPointer()) {
    optionals.set(1);
  }
  if (struct.isSetInvalids()) {
    optionals.set(2);
  }
  if (struct.isSetInProgress()) {
    optionals.set(3);
  }
  if (struct.isSetFirstShort()) {
    optionals.set(4);
  }
  if (struct.isSetType()) {
    optionals.set(5);
  }
  if (struct.isSetWritePointer()) {
    optionals.set(6);
  }
  if (struct.isSetCheckpointWritePointers()) {
    optionals.set(7);
  }
  if (struct.isSetVisibilityLevel()) {
    optionals.set(8);
  }
  oprot.writeBitSet(optionals, 9);
  if (struct.isSetTransactionId()) {
    oprot.writeI64(struct.transactionId);
  }
  if (struct.isSetReadPointer()) {
    oprot.writeI64(struct.readPointer);
  }
  if (struct.isSetInvalids()) {
    {
      oprot.writeI32(struct.invalids.size());
      for (long _iter12 : struct.invalids)
      {
        oprot.writeI64(_iter12);
      }
    }
  }
  if (struct.isSetInProgress()) {
    {
      oprot.writeI32(struct.inProgress.size());
      for (long _iter13 : struct.inProgress)
      {
        oprot.writeI64(_iter13);
      }
    }
  }
  if (struct.isSetFirstShort()) {
    oprot.writeI64(struct.firstShort);
  }
  if (struct.isSetType()) {
    oprot.writeI32(struct.type.getValue());
  }
  if (struct.isSetWritePointer()) {
    oprot.writeI64(struct.writePointer);
  }
  if (struct.isSetCheckpointWritePointers()) {
    {
      oprot.writeI32(struct.checkpointWritePointers.size());
      for (long _iter14 : struct.checkpointWritePointers)
      {
        oprot.writeI64(_iter14);
      }
    }
  }
  if (struct.isSetVisibilityLevel()) {
    oprot.writeI32(struct.visibilityLevel.getValue());
  }
}
 
Example 19
Source File: TestService.java    From Firefly with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, notifyWithoutOneway_args struct) throws TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.id);
}
 
Example 20
Source File: DelayMessage.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DelayMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTopic()) {
    optionals.set(0);
  }
  if (struct.isSetUniqDelayMsgId()) {
    optionals.set(1);
  }
  if (struct.isSetBody()) {
    optionals.set(2);
  }
  if (struct.isSetTags()) {
    optionals.set(3);
  }
  if (struct.isSetAction()) {
    optionals.set(4);
  }
  if (struct.isSetTimestamp()) {
    optionals.set(5);
  }
  if (struct.isSetDmsgtype()) {
    optionals.set(6);
  }
  if (struct.isSetInterval()) {
    optionals.set(7);
  }
  if (struct.isSetExpire()) {
    optionals.set(8);
  }
  if (struct.isSetTimes()) {
    optionals.set(9);
  }
  if (struct.isSetUuid()) {
    optionals.set(10);
  }
  if (struct.isSetVersion()) {
    optionals.set(11);
  }
  if (struct.isSetProperties()) {
    optionals.set(12);
  }
  oprot.writeBitSet(optionals, 13);
  if (struct.isSetTopic()) {
    oprot.writeString(struct.topic);
  }
  if (struct.isSetUniqDelayMsgId()) {
    oprot.writeString(struct.uniqDelayMsgId);
  }
  if (struct.isSetBody()) {
    oprot.writeBinary(struct.body);
  }
  if (struct.isSetTags()) {
    oprot.writeString(struct.tags);
  }
  if (struct.isSetAction()) {
    oprot.writeI32(struct.action);
  }
  if (struct.isSetTimestamp()) {
    oprot.writeI64(struct.timestamp);
  }
  if (struct.isSetDmsgtype()) {
    oprot.writeI32(struct.dmsgtype);
  }
  if (struct.isSetInterval()) {
    oprot.writeI64(struct.interval);
  }
  if (struct.isSetExpire()) {
    oprot.writeI64(struct.expire);
  }
  if (struct.isSetTimes()) {
    oprot.writeI64(struct.times);
  }
  if (struct.isSetUuid()) {
    oprot.writeString(struct.uuid);
  }
  if (struct.isSetVersion()) {
    oprot.writeString(struct.version);
  }
  if (struct.isSetProperties()) {
    {
      oprot.writeI32(struct.properties.size());
      for (Map.Entry<String, String> _iter35 : struct.properties.entrySet())
      {
        oprot.writeString(_iter35.getKey());
        oprot.writeString(_iter35.getValue());
      }
    }
  }
}