List of usage examples for org.apache.thrift.protocol TProtocol readI32
public abstract int readI32() throws TException;
From source file:backtype.storm.generated.ClusterSummary.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();/* w ww. ja v a 2 s . c om*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // SUPERVISORS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list37 = iprot.readListBegin(); this.supervisors = new ArrayList<SupervisorSummary>(_list37.size); for (int _i38 = 0; _i38 < _list37.size; ++_i38) { SupervisorSummary _elem39; // required _elem39 = new SupervisorSummary(); _elem39.read(iprot); this.supervisors.add(_elem39); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // NIMBUS_UPTIME_SECS if (field.type == org.apache.thrift.protocol.TType.I32) { this.nimbus_uptime_secs = iprot.readI32(); set_nimbus_uptime_secs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TOPOLOGIES if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list40 = iprot.readListBegin(); this.topologies = new ArrayList<TopologySummary>(_list40.size); for (int _i41 = 0; _i41 < _list40.size; ++_i41) { TopologySummary _elem42; // required _elem42 = new TopologySummary(); _elem42.read(iprot); this.topologies.add(_elem42); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
From source file:backtype.storm.generated.ComponentCommon.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();// w w w .j a va 2 s. com while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // INPUTS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin(); this.inputs = new HashMap<GlobalStreamId, Grouping>(2 * _map12.size); for (int _i13 = 0; _i13 < _map12.size; ++_i13) { GlobalStreamId _key14; // required Grouping _val15; // required _key14 = new GlobalStreamId(); _key14.read(iprot); _val15 = new Grouping(); _val15.read(iprot); this.inputs.put(_key14, _val15); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // STREAMS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin(); this.streams = new HashMap<String, StreamInfo>(2 * _map16.size); for (int _i17 = 0; _i17 < _map16.size; ++_i17) { String _key18; // required StreamInfo _val19; // required _key18 = iprot.readString(); _val19 = new StreamInfo(); _val19.read(iprot); this.streams.put(_key18, _val19); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PARALLELISM_HINT if (field.type == org.apache.thrift.protocol.TType.I32) { this.parallelism_hint = iprot.readI32(); set_parallelism_hint_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // JSON_CONF if (field.type == org.apache.thrift.protocol.TType.STRING) { this.json_conf = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
From source file:backtype.storm.generated.ErrorInfo.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();//from w w w. j a v a2 s .co m while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ERROR if (field.type == org.apache.thrift.protocol.TType.STRING) { this.error = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // ERROR_TIME_SECS if (field.type == org.apache.thrift.protocol.TType.I32) { this.error_time_secs = iprot.readI32(); set_error_time_secs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // HOST if (field.type == org.apache.thrift.protocol.TType.STRING) { this.host = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // PORT if (field.type == org.apache.thrift.protocol.TType.I32) { this.port = iprot.readI32(); set_port_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
From source file:backtype.storm.generated.ExecutorInfo.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();/*from ww w . j a va 2s .c om*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // TASK_START if (field.type == org.apache.thrift.protocol.TType.I32) { this.task_start = iprot.readI32(); set_task_start_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TASK_END if (field.type == org.apache.thrift.protocol.TType.I32) { this.task_end = iprot.readI32(); set_task_end_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
From source file:backtype.storm.generated.ExecutorSummary.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();/*from w w w.j a v a 2s. c o m*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // EXECUTOR_INFO if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.executor_info = new ExecutorInfo(); this.executor_info.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // COMPONENT_ID if (field.type == org.apache.thrift.protocol.TType.STRING) { this.component_id = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // HOST if (field.type == org.apache.thrift.protocol.TType.STRING) { this.host = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // PORT if (field.type == org.apache.thrift.protocol.TType.I32) { this.port = iprot.readI32(); set_port_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // UPTIME_SECS if (field.type == org.apache.thrift.protocol.TType.I32) { this.uptime_secs = iprot.readI32(); set_uptime_secs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 7: // STATS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.stats = new ExecutorStats(); this.stats.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
From source file:backtype.storm.generated.JavaObjectArg.java
License:Apache License
@Override protected Object readValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(field.id); if (setField != null) { switch (setField) { case INT_ARG: if (field.type == INT_ARG_FIELD_DESC.type) { Integer int_arg; int_arg = iprot.readI32(); return int_arg; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; }/*from ww w. j a va 2 s .c o m*/ case LONG_ARG: if (field.type == LONG_ARG_FIELD_DESC.type) { Long long_arg; long_arg = iprot.readI64(); return long_arg; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case STRING_ARG: if (field.type == STRING_ARG_FIELD_DESC.type) { String string_arg; string_arg = iprot.readString(); return string_arg; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case BOOL_ARG: if (field.type == BOOL_ARG_FIELD_DESC.type) { Boolean bool_arg; bool_arg = iprot.readBool(); return bool_arg; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case BINARY_ARG: if (field.type == BINARY_ARG_FIELD_DESC.type) { ByteBuffer binary_arg; binary_arg = iprot.readBinary(); return binary_arg; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case DOUBLE_ARG: if (field.type == DOUBLE_ARG_FIELD_DESC.type) { Double double_arg; double_arg = iprot.readDouble(); return double_arg; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } default: throw new IllegalStateException( "setField wasn't null, but didn't match any of the case statements!"); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } }
From source file:backtype.storm.generated.KillOptions.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();//from w w w. j ava2 s. c o m while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // WAIT_SECS if (field.type == org.apache.thrift.protocol.TType.I32) { this.wait_secs = iprot.readI32(); set_wait_secs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
From source file:backtype.storm.generated.RebalanceOptions.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();/*from w ww . j a va2s .c o m*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // WAIT_SECS if (field.type == org.apache.thrift.protocol.TType.I32) { this.wait_secs = iprot.readI32(); set_wait_secs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // NUM_WORKERS if (field.type == org.apache.thrift.protocol.TType.I32) { this.num_workers = iprot.readI32(); set_num_workers_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // NUM_EXECUTORS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map158 = iprot.readMapBegin(); this.num_executors = new HashMap<String, Integer>(2 * _map158.size); for (int _i159 = 0; _i159 < _map158.size; ++_i159) { String _key160; // required int _val161; // required _key160 = iprot.readString(); _val161 = iprot.readI32(); this.num_executors.put(_key160, _val161); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
From source file:backtype.storm.generated.SubmitOptions.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();/*from www. j a va 2 s . com*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // INITIAL_STATUS if (field.type == org.apache.thrift.protocol.TType.I32) { this.initial_status = TopologyInitialStatus.findByValue(iprot.readI32()); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // CREDS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.creds = new Credentials(); this.creds.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
From source file:backtype.storm.generated.SupervisorSummary.java
License:Apache License
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin();//from www .j a va 2 s.co m while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // HOST if (field.type == org.apache.thrift.protocol.TType.STRING) { this.host = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UPTIME_SECS if (field.type == org.apache.thrift.protocol.TType.I32) { this.uptime_secs = iprot.readI32(); set_uptime_secs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // NUM_WORKERS if (field.type == org.apache.thrift.protocol.TType.I32) { this.num_workers = iprot.readI32(); set_num_workers_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // NUM_USED_WORKERS if (field.type == org.apache.thrift.protocol.TType.I32) { this.num_used_workers = iprot.readI32(); set_num_used_workers_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // SUPERVISOR_ID if (field.type == org.apache.thrift.protocol.TType.STRING) { this.supervisor_id = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }