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

The following examples show how to use org.apache.thrift.protocol.TTupleProtocol#readBitSet() . 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: DistributedRPC.java    From jstorm with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.success = iprot.readString();
    struct.set_success_isSet(true);
  }
  if (incoming.get(1)) {
    struct.e = new DRPCExecutionException();
    struct.e.read(iprot);
    struct.set_e_isSet(true);
  }
  if (incoming.get(2)) {
    struct.aze = new AuthorizationException();
    struct.aze.read(iprot);
    struct.set_aze_isSet(true);
  }
}
 
Example 2
Source File: NamespaceDescriptor.java    From hbase with Apache License 2.0 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NamespaceDescriptor struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.name = iprot.readString();
  struct.setNameIsSet(true);
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TMap _map186 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.configuration = new HashMap<String,String>(2*_map186.size);
      String _key187;
      String _val188;
      for (int _i189 = 0; _i189 < _map186.size; ++_i189)
      {
        _key187 = iprot.readString();
        _val188 = iprot.readString();
        struct.configuration.put(_key187, _val188);
      }
    }
    struct.setConfigurationIsSet(true);
  }
}
 
Example 3
Source File: Result.java    From DDMQ with Apache License 2.0 6 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(3);
  if (incoming.get(0)) {
    struct.code = iprot.readI32();
    struct.setCodeIsSet(true);
  }
  if (incoming.get(1)) {
    struct.msg = iprot.readString();
    struct.setMsgIsSet(true);
  }
  if (incoming.get(2)) {
    struct.key = iprot.readString();
    struct.setKeyIsSet(true);
  }
}
 
Example 4
Source File: ConnectionProperties.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, ConnectionProperties struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.connId = iprot.readI32();
  struct.setConnIdIsSet(true);
  struct.clientHostName = iprot.readString();
  struct.setClientHostNameIsSet(true);
  struct.clientID = iprot.readString();
  struct.setClientIDIsSet(true);
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.userName = iprot.readString();
    struct.setUserNameIsSet(true);
  }
  if (incoming.get(1)) {
    struct.token = iprot.readBinary();
    struct.setTokenIsSet(true);
  }
}
 
Example 5
Source File: HelloService.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, sayBye_result struct) throws TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.success = iprot.readString();
    struct.setSuccessIsSet(true);
  }
}
 
Example 6
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, fetch_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.request = new FetchRequest();
    struct.request.read(iprot);
    struct.setRequestIsSet(true);
  }
}
 
Example 7
Source File: TGenericException.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGenericException struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.message = iprot.readString();
    struct.setMessageIsSet(true);
  }
  if (incoming.get(1)) {
    struct.originalExceptionClass = iprot.readString();
    struct.setOriginalExceptionClassIsSet(true);
  }
}
 
Example 8
Source File: SuroServer.java    From suro with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, process_args struct) throws TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.messageSet = new TMessageSet();
    struct.messageSet.read(iprot);
    struct.setMessageSetIsSet(true);
  }
}
 
Example 9
Source File: QueueService.java    From luxun with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, findClosestIndexByTime_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.findClosestIndexByTimeRequest = new FindClosestIndexByTimeRequest();
    struct.findClosestIndexByTimeRequest.read(iprot);
    struct.setFindClosestIndexByTimeRequestIsSet(true);
  }
}
 
Example 10
Source File: MyQueryService.java    From easy-mapper with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, submitQuery_result struct) throws TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.success = new QueryResponse();
    struct.success.read(iprot);
    struct.setSuccessIsSet(true);
  }
}
 
Example 11
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_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.result = new AckResult();
    struct.result.read(iprot);
    struct.setResultIsSet(true);
  }
}
 
Example 12
Source File: TExceptionValue.java    From pinpoint with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TExceptionValue struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.id = iprot.readI32();
    struct.setIdIsSet(true);
  }
  if (incoming.get(1)) {
    struct.exceptionMessage = iprot.readString();
    struct.setExceptionMessageIsSet(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, pull_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.success = new PullResponse();
    struct.success.read(iprot);
    struct.setSuccessIsSet(true);
  }
  if (incoming.get(1)) {
    struct.error = new PullException();
    struct.error.read(iprot);
    struct.setErrorIsSet(true);
  }
}
 
Example 14
Source File: ApiVersion1.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, send_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.success = new Result1();
    struct.success.read(iprot);
    struct.setSuccessIsSet(true);
  }
}
 
Example 15
Source File: ConsumeStatsRequest.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ConsumeStatsRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.group = iprot.readString();
  struct.setGroupIsSet(true);
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.topic = iprot.readString();
    struct.setTopicIsSet(true);
  }
  if (incoming.get(1)) {
    struct.version = iprot.readString();
    struct.setVersionIsSet(true);
  }
}
 
Example 16
Source File: SupervisorSummary.java    From jstorm with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorSummary struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.host = iprot.readString();
  struct.set_host_isSet(true);
  struct.supervisorId = iprot.readString();
  struct.set_supervisorId_isSet(true);
  struct.uptimeSecs = iprot.readI32();
  struct.set_uptimeSecs_isSet(true);
  struct.numWorkers = iprot.readI32();
  struct.set_numWorkers_isSet(true);
  struct.numUsedWorkers = iprot.readI32();
  struct.set_numUsedWorkers_isSet(true);
  BitSet incoming = iprot.readBitSet(4);
  if (incoming.get(0)) {
    struct.version = iprot.readString();
    struct.set_version_isSet(true);
  }
  if (incoming.get(1)) {
    struct.buildTs = iprot.readString();
    struct.set_buildTs_isSet(true);
  }
  if (incoming.get(2)) {
    struct.port = iprot.readI32();
    struct.set_port_isSet(true);
  }
  if (incoming.get(3)) {
    struct.errorMessage = iprot.readString();
    struct.set_errorMessage_isSet(true);
  }
}
 
Example 17
Source File: QueueService.java    From luxun with Apache License 2.0 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, produce_result struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.success = new ProduceResponse();
    struct.success.read(iprot);
    struct.setSuccessIsSet(true);
  }
}
 
Example 18
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 19
Source File: FetchRequest.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, FetchRequest struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.consumerId = iprot.readString();
  struct.setConsumerIdIsSet(true);
  struct.groupId = iprot.readString();
  struct.setGroupIdIsSet(true);
  struct.cluster = iprot.readString();
  struct.setClusterIsSet(true);
  BitSet incoming = iprot.readBitSet(4);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TMap _map46 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
      struct.fetchOffset = new HashMap<String,Map<String,Long>>(2*_map46.size);
      String _key47;
      Map<String,Long> _val48;
      for (int _i49 = 0; _i49 < _map46.size; ++_i49)
      {
        _key47 = iprot.readString();
        {
          org.apache.thrift.protocol.TMap _map50 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32());
          _val48 = new HashMap<String,Long>(2*_map50.size);
          String _key51;
          long _val52;
          for (int _i53 = 0; _i53 < _map50.size; ++_i53)
          {
            _key51 = iprot.readString();
            _val52 = iprot.readI64();
            _val48.put(_key51, _val52);
          }
        }
        struct.fetchOffset.put(_key47, _val48);
      }
    }
    struct.setFetchOffsetIsSet(true);
  }
  if (incoming.get(1)) {
    struct.maxBatchSize = iprot.readI32();
    struct.setMaxBatchSizeIsSet(true);
  }
  if (incoming.get(2)) {
    struct.maxLingerTime = iprot.readI32();
    struct.setMaxLingerTimeIsSet(true);
  }
  if (incoming.get(3)) {
    struct.version = iprot.readString();
    struct.setVersionIsSet(true);
  }
}
 
Example 20
Source File: TSentryMappingData.java    From incubator-sentry with Apache License 2.0 4 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSentryMappingData struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TMap _map154 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32());
      struct.groupRolesMap = new HashMap<String,Set<String>>(2*_map154.size);
      for (int _i155 = 0; _i155 < _map154.size; ++_i155)
      {
        String _key156; // required
        Set<String> _val157; // required
        _key156 = iprot.readString();
        {
          org.apache.thrift.protocol.TSet _set158 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          _val157 = new HashSet<String>(2*_set158.size);
          for (int _i159 = 0; _i159 < _set158.size; ++_i159)
          {
            String _elem160; // required
            _elem160 = iprot.readString();
            _val157.add(_elem160);
          }
        }
        struct.groupRolesMap.put(_key156, _val157);
      }
    }
    struct.setGroupRolesMapIsSet(true);
  }
  if (incoming.get(1)) {
    {
      org.apache.thrift.protocol.TMap _map161 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32());
      struct.rolePrivilegesMap = new HashMap<String,Set<TSentryPrivilege>>(2*_map161.size);
      for (int _i162 = 0; _i162 < _map161.size; ++_i162)
      {
        String _key163; // required
        Set<TSentryPrivilege> _val164; // required
        _key163 = iprot.readString();
        {
          org.apache.thrift.protocol.TSet _set165 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          _val164 = new HashSet<TSentryPrivilege>(2*_set165.size);
          for (int _i166 = 0; _i166 < _set165.size; ++_i166)
          {
            TSentryPrivilege _elem167; // required
            _elem167 = new TSentryPrivilege();
            _elem167.read(iprot);
            _val164.add(_elem167);
          }
        }
        struct.rolePrivilegesMap.put(_key163, _val164);
      }
    }
    struct.setRolePrivilegesMapIsSet(true);
  }
}