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

The following examples show how to use org.apache.thrift.protocol.TTupleProtocol#writeBitSet() . 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: TListSentryPrivilegesByAuthResponse.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, TListSentryPrivilegesByAuthResponse struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.status.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetPrivilegesMapByAuth()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetPrivilegesMapByAuth()) {
    {
      oprot.writeI32(struct.privilegesMapByAuth.size());
      for (Map.Entry<TSentryAuthorizable, TSentryPrivilegeMap> _iter127 : struct.privilegesMapByAuth.entrySet())
      {
        _iter127.getKey().write(oprot);
        _iter127.getValue().write(oprot);
      }
    }
  }
}
 
Example 2
Source File: ColumnSlice.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, ColumnSlice struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetStart()) {
    optionals.set(0);
  }
  if (struct.isSetFinish()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetStart()) {
    oprot.writeBinary(struct.start);
  }
  if (struct.isSetFinish()) {
    oprot.writeBinary(struct.finish);
  }
}
 
Example 3
Source File: Response.java    From disruptor_thrift_server with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Response struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetId()) {
    optionals.set(0);
  }
  if (struct.isSetResult()) {
    optionals.set(1);
  }
  if (struct.isSetResType()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetId()) {
    oprot.writeI32(struct.id);
  }
  if (struct.isSetResult()) {
    oprot.writeBinary(struct.result);
  }
  if (struct.isSetResType()) {
    oprot.writeI32(struct.resType.getValue());
  }
}
 
Example 4
Source File: ProducerService.java    From DDMQ with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sendBatchSync_args struct) throws org.apache.thrift.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 (Message _iter54 : struct.messages)
      {
        _iter54.write(oprot);
      }
    }
  }
}
 
Example 5
Source File: CursorRequestMessage.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, CursorRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetStoreName()) {
    optionals.set(0);
  }
  if (struct.isSetCursorId()) {
    optionals.set(1);
  }
  if (struct.isSetClose()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetStoreName()) {
    oprot.writeString(struct.storeName);
  }
  if (struct.isSetCursorId()) {
    oprot.writeI32(struct.cursorId);
  }
  if (struct.isSetClose()) {
    oprot.writeBool(struct.close);
  }
}
 
Example 6
Source File: TListSentryPrivilegesForProviderRequest.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, TListSentryPrivilegesForProviderRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeI32(struct.protocol_version);
  {
    oprot.writeI32(struct.groups.size());
    for (String _iter76 : struct.groups)
    {
      oprot.writeString(_iter76);
    }
  }
  struct.roleSet.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetAuthorizableHierarchy()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetAuthorizableHierarchy()) {
    struct.authorizableHierarchy.write(oprot);
  }
}
 
Example 7
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 8
Source File: TListSentryPrivilegesRequest.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, TListSentryPrivilegesRequest 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.writeString(struct.serviceName);
  BitSet optionals = new BitSet();
  if (struct.isSetAuthorizables()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetAuthorizables()) {
    {
      oprot.writeI32(struct.authorizables.size());
      for (TAuthorizable _iter44 : struct.authorizables)
      {
        _iter44.write(oprot);
      }
    }
  }
}
 
Example 9
Source File: TPathsUpdate.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, TPathsUpdate struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeBool(struct.hasFullImage);
  oprot.writeI64(struct.seqNum);
  {
    oprot.writeI32(struct.pathChanges.size());
    for (TPathChanges _iter62 : struct.pathChanges)
    {
      _iter62.write(oprot);
    }
  }
  BitSet optionals = new BitSet();
  if (struct.isSetPathsDump()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetPathsDump()) {
    struct.pathsDump.write(oprot);
  }
}
 
Example 10
Source File: ConfigurationService.java    From xio with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addIpRule_args struct)
    throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetIpRule()) {
    optionals.set(0);
  }
  if (struct.isSetRuleType()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetIpRule()) {
    struct.ipRule.write(oprot);
  }
  if (struct.isSetRuleType()) {
    oprot.writeI32(struct.ruleType.getValue());
  }
}
 
Example 11
Source File: QidResponse.java    From DDMQ with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, QidResponse struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeString(struct.topic);
  oprot.writeString(struct.qid);
  {
    oprot.writeI32(struct.messages.size());
    for (Message _iter58 : struct.messages)
    {
      _iter58.write(oprot);
    }
  }
  BitSet optionals = new BitSet();
  if (struct.isSetNextRequestOffset()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetNextRequestOffset()) {
    oprot.writeI64(struct.nextRequestOffset);
  }
}
 
Example 12
Source File: TestService.java    From Firefly with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  if (struct.isSetTestException()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetSuccess()) {
    struct.success.write(oprot);
  }
  if (struct.isSetTestException()) {
    struct.testException.write(oprot);
  }
}
 
Example 13
Source File: ProducerService.java    From DDMQ with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sendDelaySync_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetDelayMessage()) {
    optionals.set(0);
  }
  if (struct.isSetTimeout()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetDelayMessage()) {
    struct.delayMessage.write(oprot);
  }
  if (struct.isSetTimeout()) {
    oprot.writeI64(struct.timeout);
  }
}
 
Example 14
Source File: TAlterSentryRoleGrantPrivilegeResponse.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, TAlterSentryRoleGrantPrivilegeResponse struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.status.write(oprot);
  BitSet optionals = new BitSet();
  if (struct.isSetPrivilege()) {
    optionals.set(0);
  }
  if (struct.isSetPrivileges()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetPrivilege()) {
    struct.privilege.write(oprot);
  }
  if (struct.isSetPrivileges()) {
    {
      oprot.writeI32(struct.privileges.size());
      for (TSentryPrivilege _iter28 : struct.privileges)
      {
        _iter28.write(oprot);
      }
    }
  }
}
 
Example 15
Source File: ConsumeStatsRequest.java    From DDMQ with Apache License 2.0 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ConsumeStatsRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  oprot.writeString(struct.group);
  BitSet optionals = new BitSet();
  if (struct.isSetTopic()) {
    optionals.set(0);
  }
  if (struct.isSetVersion()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetTopic()) {
    oprot.writeString(struct.topic);
  }
  if (struct.isSetVersion()) {
    oprot.writeString(struct.version);
  }
}
 
Example 16
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, getHealthStatus_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 17
Source File: Http1Rule.java    From xio with Apache License 2.0 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Http1Rule struct)
    throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetMethod()) {
    optionals.set(0);
  }
  if (struct.isSetUri()) {
    optionals.set(1);
  }
  if (struct.isSetVersion()) {
    optionals.set(2);
  }
  if (struct.isSetHeaders()) {
    optionals.set(3);
  }
  oprot.writeBitSet(optionals, 4);
  if (struct.isSetMethod()) {
    oprot.writeI32(struct.method.getValue());
  }
  if (struct.isSetUri()) {
    oprot.writeString(struct.uri);
  }
  if (struct.isSetVersion()) {
    oprot.writeI32(struct.version.getValue());
  }
  if (struct.isSetHeaders()) {
    {
      oprot.writeI32(struct.headers.size());
      for (Http1HeaderTuple _iter4 : struct.headers) {
        _iter4.write(oprot);
      }
    }
  }
}
 
Example 18
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 19
Source File: DelayMeta.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DelayMeta struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTimestamp()) {
    optionals.set(0);
  }
  if (struct.isSetDmsgtype()) {
    optionals.set(1);
  }
  if (struct.isSetInterval()) {
    optionals.set(2);
  }
  if (struct.isSetExpire()) {
    optionals.set(3);
  }
  if (struct.isSetTimes()) {
    optionals.set(4);
  }
  if (struct.isSetProperties()) {
    optionals.set(5);
  }
  oprot.writeBitSet(optionals, 6);
  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.isSetProperties()) {
    {
      oprot.writeI32(struct.properties.size());
      for (Map.Entry<String, String> _iter45 : struct.properties.entrySet())
      {
        oprot.writeString(_iter45.getKey());
        oprot.writeString(_iter45.getValue());
      }
    }
  }
}
 
Example 20
Source File: RowSet.java    From gemfirexd-oss with Apache License 2.0 4 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RowSet struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  {
    oprot.writeI32(struct.rows.size());
    for (Row _iter304 : struct.rows)
    {
      _iter304.write(oprot);
    }
  }
  oprot.writeByte(struct.flags);
  oprot.writeI32(struct.cursorId);
  oprot.writeI32(struct.statementId);
  oprot.writeI32(struct.connId);
  BitSet optionals = new BitSet();
  if (struct.isSetToken()) {
    optionals.set(0);
  }
  if (struct.isSetSource()) {
    optionals.set(1);
  }
  if (struct.isSetOffset()) {
    optionals.set(2);
  }
  if (struct.isSetMetadata()) {
    optionals.set(3);
  }
  if (struct.isSetCursorName()) {
    optionals.set(4);
  }
  if (struct.isSetWarnings()) {
    optionals.set(5);
  }
  if (struct.isSetRowIdsForUpdateOrDelete()) {
    optionals.set(6);
  }
  oprot.writeBitSet(optionals, 7);
  if (struct.isSetToken()) {
    oprot.writeBinary(struct.token);
  }
  if (struct.isSetSource()) {
    struct.source.write(oprot);
  }
  if (struct.isSetOffset()) {
    oprot.writeI32(struct.offset);
  }
  if (struct.isSetMetadata()) {
    {
      oprot.writeI32(struct.metadata.size());
      for (ColumnDescriptor _iter305 : struct.metadata)
      {
        _iter305.write(oprot);
      }
    }
  }
  if (struct.isSetCursorName()) {
    oprot.writeString(struct.cursorName);
  }
  if (struct.isSetWarnings()) {
    struct.warnings.write(oprot);
  }
  if (struct.isSetRowIdsForUpdateOrDelete()) {
    {
      oprot.writeI32(struct.rowIdsForUpdateOrDelete.size());
      for (long _iter306 : struct.rowIdsForUpdateOrDelete)
      {
        oprot.writeI64(_iter306);
      }
    }
  }
}