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

The following examples show how to use org.apache.thrift.protocol.TTupleProtocol#readBool() . 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: 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 2
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 3
Source File: TSentryActiveRoleSet.java    From incubator-sentry with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSentryActiveRoleSet struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.all = iprot.readBool();
  struct.setAllIsSet(true);
  {
    org.apache.thrift.protocol.TSet _set69 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
    struct.roles = new HashSet<String>(2*_set69.size);
    for (int _i70 = 0; _i70 < _set69.size; ++_i70)
    {
      String _elem71; // required
      _elem71 = iprot.readString();
      struct.roles.add(_elem71);
    }
  }
  struct.setRolesIsSet(true);
}
 
Example 4
Source File: TPermissionsUpdate.java    From incubator-sentry with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TPermissionsUpdate struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.hasfullImage = iprot.readBool();
  struct.setHasfullImageIsSet(true);
  struct.seqNum = iprot.readI64();
  struct.setSeqNumIsSet(true);
  {
    org.apache.thrift.protocol.TMap _map114 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.privilegeChanges = new HashMap<String,TPrivilegeChanges>(2*_map114.size);
    for (int _i115 = 0; _i115 < _map114.size; ++_i115)
    {
      String _key116; // required
      TPrivilegeChanges _val117; // required
      _key116 = iprot.readString();
      _val117 = new TPrivilegeChanges();
      _val117.read(iprot);
      struct.privilegeChanges.put(_key116, _val117);
    }
  }
  struct.setPrivilegeChangesIsSet(true);
  {
    org.apache.thrift.protocol.TMap _map118 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
    struct.roleChanges = new HashMap<String,TRoleChanges>(2*_map118.size);
    for (int _i119 = 0; _i119 < _map118.size; ++_i119)
    {
      String _key120; // required
      TRoleChanges _val121; // required
      _key120 = iprot.readString();
      _val121 = new TRoleChanges();
      _val121.read(iprot);
      struct.roleChanges.put(_key120, _val121);
    }
  }
  struct.setRoleChangesIsSet(true);
}
 
Example 5
Source File: Pistachios.java    From Pistachio with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, registerPartitioner_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.success = iprot.readBool();
    struct.setSuccessIsSet(true);
  }
}
 
Example 6
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 7
Source File: Pistachios.java    From Pistachio with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, store_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.success = iprot.readBool();
    struct.setSuccessIsSet(true);
  }
}
 
Example 8
Source File: SliceRange.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, SliceRange struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.start = iprot.readBinary();
  struct.setStartIsSet(true);
  struct.finish = iprot.readBinary();
  struct.setFinishIsSet(true);
  struct.reversed = iprot.readBool();
  struct.setReversedIsSet(true);
  struct.count = iprot.readI32();
  struct.setCountIsSet(true);
}
 
Example 9
Source File: TSentryImportMappingDataRequest.java    From incubator-sentry with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSentryImportMappingDataRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.protocol_version = iprot.readI32();
  struct.setProtocol_versionIsSet(true);
  struct.requestorUserName = iprot.readString();
  struct.setRequestorUserNameIsSet(true);
  struct.overwriteRole = iprot.readBool();
  struct.setOverwriteRoleIsSet(true);
  struct.mappingData = new TSentryMappingData();
  struct.mappingData.read(iprot);
  struct.setMappingDataIsSet(true);
}
 
Example 10
Source File: SentryHDFSService.java    From incubator-sentry with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, get_all_related_paths_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.path = iprot.readString();
    struct.setPathIsSet(true);
  }
  if (incoming.get(1)) {
    struct.exactMatch = iprot.readBool();
    struct.setExactMatchIsSet(true);
  }
}
 
Example 11
Source File: Result.java    From xio with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Result struct)
    throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.success = iprot.readBool();
    struct.setSuccessIsSet(true);
  }
  if (incoming.get(1)) {
    struct.errorReason = iprot.readString();
    struct.setErrorReasonIsSet(true);
  }
}
 
Example 12
Source File: TraceInfo.java    From octo-rpc with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TraceInfo struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.clientAppkey = iprot.readString();
  struct.setClientAppkeyIsSet(true);
  BitSet incoming = iprot.readBitSet(8);
  if (incoming.get(0)) {
    struct.traceId = iprot.readString();
    struct.setTraceIdIsSet(true);
  }
  if (incoming.get(1)) {
    struct.spanId = iprot.readString();
    struct.setSpanIdIsSet(true);
  }
  if (incoming.get(2)) {
    struct.rootMessageId = iprot.readString();
    struct.setRootMessageIdIsSet(true);
  }
  if (incoming.get(3)) {
    struct.currentMessageId = iprot.readString();
    struct.setCurrentMessageIdIsSet(true);
  }
  if (incoming.get(4)) {
    struct.serverMessageId = iprot.readString();
    struct.setServerMessageIdIsSet(true);
  }
  if (incoming.get(5)) {
    struct.debug = iprot.readBool();
    struct.setDebugIsSet(true);
  }
  if (incoming.get(6)) {
    struct.sample = iprot.readBool();
    struct.setSampleIsSet(true);
  }
  if (incoming.get(7)) {
    struct.clientIp = iprot.readString();
    struct.setClientIpIsSet(true);
  }
}
 
Example 13
Source File: ConsumerService.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ack_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.success = iprot.readBool();
    struct.setSuccessIsSet(true);
  }
}
 
Example 14
Source File: ConsumerService.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, submit_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.success = iprot.readBool();
    struct.setSuccessIsSet(true);
  }
  if (incoming.get(1)) {
    struct.error = new PullException();
    struct.error.read(iprot);
    struct.setErrorIsSet(true);
  }
}
 
Example 15
Source File: Result.java    From xio with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Result struct)
    throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.success = iprot.readBool();
    struct.setSuccessIsSet(true);
  }
  if (incoming.get(1)) {
    struct.errorReason = iprot.readString();
    struct.setErrorReasonIsSet(true);
  }
}
 
Example 16
Source File: ThriftSampleData.java    From incubator-pinot with Apache License 2.0 4 votes vote down vote up
public void read(TProtocol prot, ThriftSampleData struct)
    throws TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(7);
  if (incoming.get(0)) {
    struct.id = iprot.readI32();
    struct.setIdIsSet(true);
  }

  if (incoming.get(1)) {
    struct.name = iprot.readString();
    struct.setNameIsSet(true);
  }

  if (incoming.get(2)) {
    struct.created_at = iprot.readI64();
    struct.setCreated_atIsSet(true);
  }

  if (incoming.get(3)) {
    struct.active = iprot.readBool();
    struct.setActiveIsSet(true);
  }

  int _i25;
  if (incoming.get(4)) {
    TList _list16 = new TList((byte) 6, iprot.readI32());
    struct.groups = new ArrayList(_list16.size);

    for (_i25 = 0; _i25 < _list16.size; ++_i25) {
      short _elem17 = iprot.readI16();
      struct.groups.add(_elem17);
    }

    struct.setGroupsIsSet(true);
  }

  String _elem24;
  if (incoming.get(5)) {
    TMap _map19 = new TMap((byte) 11, (byte) 10, iprot.readI32());
    struct.map_values = new HashMap(2 * _map19.size);

    for (int _i22 = 0; _i22 < _map19.size; ++_i22) {
      _elem24 = iprot.readString();
      long _val21 = iprot.readI64();
      struct.map_values.put(_elem24, _val21);
    }

    struct.setMap_valuesIsSet(true);
  }

  if (incoming.get(6)) {
    TSet _set23 = new TSet((byte) 11, iprot.readI32());
    struct.set_values = new HashSet(2 * _set23.size);

    for (_i25 = 0; _i25 < _set23.size; ++_i25) {
      _elem24 = iprot.readString();
      struct.set_values.add(_elem24);
    }

    struct.setSet_valuesIsSet(true);
  }
}
 
Example 17
Source File: JSONField.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, JSONField struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(8);
  if (incoming.get(0)) {
    struct.string_val = iprot.readString();
    struct.setString_valIsSet(true);
  }
  if (incoming.get(1)) {
    struct.bool_val = iprot.readBool();
    struct.setBool_valIsSet(true);
  }
  if (incoming.get(2)) {
    struct.i32_val = iprot.readI32();
    struct.setI32_valIsSet(true);
  }
  if (incoming.get(3)) {
    struct.i64_val = iprot.readI64();
    struct.setI64_valIsSet(true);
  }
  if (incoming.get(4)) {
    struct.double_val = iprot.readDouble();
    struct.setDouble_valIsSet(true);
  }
  if (incoming.get(5)) {
    struct.null_val = iprot.readBool();
    struct.setNull_valIsSet(true);
  }
  if (incoming.get(6)) {
    struct.ref_val = iprot.readI32();
    struct.setRef_valIsSet(true);
  }
  if (incoming.get(7)) {
    {
      org.apache.thrift.protocol.TList _list117 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
      struct.array_val = new ArrayList<Integer>(_list117.size);
      for (int _i118 = 0; _i118 < _list117.size; ++_i118)
      {
        int _elem119;
        _elem119 = iprot.readI32();
        struct.array_val.add(_elem119);
      }
    }
    struct.setArray_valIsSet(true);
  }
}
 
Example 18
Source File: RequestHeader.java    From octo-rpc with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RequestHeader struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(11);
  if (incoming.get(0)) {
    struct.traceId = iprot.readString();
    struct.setTraceIdIsSet(true);
  }
  if (incoming.get(1)) {
    struct.spanId = iprot.readString();
    struct.setSpanIdIsSet(true);
  }
  if (incoming.get(2)) {
    struct.clientAppkey = iprot.readString();
    struct.setClientAppkeyIsSet(true);
  }
  if (incoming.get(3)) {
    struct.clientIp = iprot.readString();
    struct.setClientIpIsSet(true);
  }
  if (incoming.get(4)) {
    struct.spanName = iprot.readString();
    struct.setSpanNameIsSet(true);
  }
  if (incoming.get(5)) {
    struct.serverIpPort = iprot.readString();
    struct.setServerIpPortIsSet(true);
  }
  if (incoming.get(6)) {
    struct.debug = iprot.readBool();
    struct.setDebugIsSet(true);
  }
  if (incoming.get(7)) {
    struct.sample = iprot.readBool();
    struct.setSampleIsSet(true);
  }
  if (incoming.get(8)) {
    struct.version = iprot.readString();
    struct.setVersionIsSet(true);
  }
  if (incoming.get(9)) {
    {
      org.apache.thrift.protocol.TMap _map12 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.localContext = new HashMap<String,String>(2*_map12.size);
      for (int _i13 = 0; _i13 < _map12.size; ++_i13)
      {
        String _key14; // required
        String _val15; // required
        _key14 = iprot.readString();
        _val15 = iprot.readString();
        struct.localContext.put(_key14, _val15);
      }
    }
    struct.setLocalContextIsSet(true);
  }
  if (incoming.get(10)) {
    {
      org.apache.thrift.protocol.TMap _map16 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.globalContext = new HashMap<String,String>(2*_map16.size);
      for (int _i17 = 0; _i17 < _map16.size; ++_i17)
      {
        String _key18; // required
        String _val19; // required
        _key18 = iprot.readString();
        _val19 = iprot.readString();
        struct.globalContext.put(_key18, _val19);
      }
    }
    struct.setGlobalContextIsSet(true);
  }
}
 
Example 19
Source File: OpenConnectionArgs.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, OpenConnectionArgs struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.clientHostName = iprot.readString();
  struct.setClientHostNameIsSet(true);
  struct.clientID = iprot.readString();
  struct.setClientIDIsSet(true);
  struct.security = SecurityMechanism.findByValue(iprot.readI32());
  struct.setSecurityIsSet(true);
  BitSet incoming = iprot.readBitSet(5);
  if (incoming.get(0)) {
    struct.userName = iprot.readString();
    struct.setUserNameIsSet(true);
  }
  if (incoming.get(1)) {
    struct.password = iprot.readString();
    struct.setPasswordIsSet(true);
  }
  if (incoming.get(2)) {
    struct.tokenSize = iprot.readI32();
    struct.setTokenSizeIsSet(true);
  }
  if (incoming.get(3)) {
    struct.useStringForDecimal = iprot.readBool();
    struct.setUseStringForDecimalIsSet(true);
  }
  if (incoming.get(4)) {
    {
      org.apache.thrift.protocol.TMap _map246 = 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*_map246.size);
      for (int _i247 = 0; _i247 < _map246.size; ++_i247)
      {
        String _key248;
        String _val249;
        _key248 = iprot.readString();
        _val249 = iprot.readString();
        struct.properties.put(_key248, _val249);
      }
    }
    struct.setPropertiesIsSet(true);
  }
}
 
Example 20
Source File: OpenConnectionArgs.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, OpenConnectionArgs struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.clientHostName = iprot.readString();
  struct.setClientHostNameIsSet(true);
  struct.clientID = iprot.readString();
  struct.setClientIDIsSet(true);
  struct.security = SecurityMechanism.findByValue(iprot.readI32());
  struct.setSecurityIsSet(true);
  BitSet incoming = iprot.readBitSet(5);
  if (incoming.get(0)) {
    struct.userName = iprot.readString();
    struct.setUserNameIsSet(true);
  }
  if (incoming.get(1)) {
    struct.password = iprot.readString();
    struct.setPasswordIsSet(true);
  }
  if (incoming.get(2)) {
    struct.tokenSize = iprot.readI32();
    struct.setTokenSizeIsSet(true);
  }
  if (incoming.get(3)) {
    struct.useStringForDecimal = iprot.readBool();
    struct.setUseStringForDecimalIsSet(true);
  }
  if (incoming.get(4)) {
    {
      org.apache.thrift.protocol.TMap _map246 = 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*_map246.size);
      for (int _i247 = 0; _i247 < _map246.size; ++_i247)
      {
        String _key248;
        String _val249;
        _key248 = iprot.readString();
        _val249 = iprot.readString();
        struct.properties.put(_key248, _val249);
      }
    }
    struct.setPropertiesIsSet(true);
  }
}