List of usage examples for org.apache.thrift.protocol TProtocol readString
public abstract String readString() throws TException;
From source file:backtype.storm.generated.AlreadyAliveException.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();/* www . j a v a 2s .co m*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // MSG if (field.type == org.apache.thrift.protocol.TType.STRING) { this.msg = 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.BoltStats.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 .ja va2 s .c om*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ACKED if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map45 = iprot.readMapBegin(); this.acked = new HashMap<String, Map<GlobalStreamId, Long>>(2 * _map45.size); for (int _i46 = 0; _i46 < _map45.size; ++_i46) { String _key47; // required Map<GlobalStreamId, Long> _val48; // required _key47 = iprot.readString(); { org.apache.thrift.protocol.TMap _map49 = iprot.readMapBegin(); _val48 = new HashMap<GlobalStreamId, Long>(2 * _map49.size); for (int _i50 = 0; _i50 < _map49.size; ++_i50) { GlobalStreamId _key51; // required long _val52; // required _key51 = new GlobalStreamId(); _key51.read(iprot); _val52 = iprot.readI64(); _val48.put(_key51, _val52); } iprot.readMapEnd(); } this.acked.put(_key47, _val48); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // FAILED if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map53 = iprot.readMapBegin(); this.failed = new HashMap<String, Map<GlobalStreamId, Long>>(2 * _map53.size); for (int _i54 = 0; _i54 < _map53.size; ++_i54) { String _key55; // required Map<GlobalStreamId, Long> _val56; // required _key55 = iprot.readString(); { org.apache.thrift.protocol.TMap _map57 = iprot.readMapBegin(); _val56 = new HashMap<GlobalStreamId, Long>(2 * _map57.size); for (int _i58 = 0; _i58 < _map57.size; ++_i58) { GlobalStreamId _key59; // required long _val60; // required _key59 = new GlobalStreamId(); _key59.read(iprot); _val60 = iprot.readI64(); _val56.put(_key59, _val60); } iprot.readMapEnd(); } this.failed.put(_key55, _val56); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PROCESS_MS_AVG if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map61 = iprot.readMapBegin(); this.process_ms_avg = new HashMap<String, Map<GlobalStreamId, Double>>(2 * _map61.size); for (int _i62 = 0; _i62 < _map61.size; ++_i62) { String _key63; // required Map<GlobalStreamId, Double> _val64; // required _key63 = iprot.readString(); { org.apache.thrift.protocol.TMap _map65 = iprot.readMapBegin(); _val64 = new HashMap<GlobalStreamId, Double>(2 * _map65.size); for (int _i66 = 0; _i66 < _map65.size; ++_i66) { GlobalStreamId _key67; // required double _val68; // required _key67 = new GlobalStreamId(); _key67.read(iprot); _val68 = iprot.readDouble(); _val64.put(_key67, _val68); } iprot.readMapEnd(); } this.process_ms_avg.put(_key63, _val64); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // EXECUTED if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map69 = iprot.readMapBegin(); this.executed = new HashMap<String, Map<GlobalStreamId, Long>>(2 * _map69.size); for (int _i70 = 0; _i70 < _map69.size; ++_i70) { String _key71; // required Map<GlobalStreamId, Long> _val72; // required _key71 = iprot.readString(); { org.apache.thrift.protocol.TMap _map73 = iprot.readMapBegin(); _val72 = new HashMap<GlobalStreamId, Long>(2 * _map73.size); for (int _i74 = 0; _i74 < _map73.size; ++_i74) { GlobalStreamId _key75; // required long _val76; // required _key75 = new GlobalStreamId(); _key75.read(iprot); _val76 = iprot.readI64(); _val72.put(_key75, _val76); } iprot.readMapEnd(); } this.executed.put(_key71, _val72); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // EXECUTE_MS_AVG if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map77 = iprot.readMapBegin(); this.execute_ms_avg = new HashMap<String, Map<GlobalStreamId, Double>>(2 * _map77.size); for (int _i78 = 0; _i78 < _map77.size; ++_i78) { String _key79; // required Map<GlobalStreamId, Double> _val80; // required _key79 = iprot.readString(); { org.apache.thrift.protocol.TMap _map81 = iprot.readMapBegin(); _val80 = new HashMap<GlobalStreamId, Double>(2 * _map81.size); for (int _i82 = 0; _i82 < _map81.size; ++_i82) { GlobalStreamId _key83; // required double _val84; // required _key83 = new GlobalStreamId(); _key83.read(iprot); _val84 = iprot.readDouble(); _val80.put(_key83, _val84); } iprot.readMapEnd(); } this.execute_ms_avg.put(_key79, _val80); } 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.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();/*from w w w . j a va 2 s . c om*/ 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.Credentials.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 av 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: // CREDS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map163 = iprot.readMapBegin(); this.creds = new HashMap<String, String>(2 * _map163.size); for (int _i164 = 0; _i164 < _map163.size; ++_i164) { String _key165; // required String _val166; // required _key165 = iprot.readString(); _val166 = iprot.readString(); this.creds.put(_key165, _val166); } 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.DRPCRequest.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. ja 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: // FUNC_ARGS if (field.type == org.apache.thrift.protocol.TType.STRING) { this.func_args = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // REQUEST_ID if (field.type == org.apache.thrift.protocol.TType.STRING) { this.request_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(); }
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 www . ja v a2 s. c om*/ 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.ExecutorStats.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();/*www .j a v a2s.com*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // EMITTED if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map125 = iprot.readMapBegin(); this.emitted = new HashMap<String, Map<String, Long>>(2 * _map125.size); for (int _i126 = 0; _i126 < _map125.size; ++_i126) { String _key127; // required Map<String, Long> _val128; // required _key127 = iprot.readString(); { org.apache.thrift.protocol.TMap _map129 = iprot.readMapBegin(); _val128 = new HashMap<String, Long>(2 * _map129.size); for (int _i130 = 0; _i130 < _map129.size; ++_i130) { String _key131; // required long _val132; // required _key131 = iprot.readString(); _val132 = iprot.readI64(); _val128.put(_key131, _val132); } iprot.readMapEnd(); } this.emitted.put(_key127, _val128); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TRANSFERRED if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map133 = iprot.readMapBegin(); this.transferred = new HashMap<String, Map<String, Long>>(2 * _map133.size); for (int _i134 = 0; _i134 < _map133.size; ++_i134) { String _key135; // required Map<String, Long> _val136; // required _key135 = iprot.readString(); { org.apache.thrift.protocol.TMap _map137 = iprot.readMapBegin(); _val136 = new HashMap<String, Long>(2 * _map137.size); for (int _i138 = 0; _i138 < _map137.size; ++_i138) { String _key139; // required long _val140; // required _key139 = iprot.readString(); _val140 = iprot.readI64(); _val136.put(_key139, _val140); } iprot.readMapEnd(); } this.transferred.put(_key135, _val136); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // SPECIFIC if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.specific = new ExecutorSpecificStats(); this.specific.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.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. ja v a2s .co 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.GlobalStreamId.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 va 2s.com*/ while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // COMPONENT_ID if (field.type == org.apache.thrift.protocol.TType.STRING) { this.componentId = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // STREAM_ID if (field.type == org.apache.thrift.protocol.TType.STRING) { this.streamId = 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.Grouping.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 FIELDS: if (field.type == FIELDS_FIELD_DESC.type) { List<String> fields; {//from w ww. j a v a 2 s . c o m org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); fields = new ArrayList<String>(_list4.size); for (int _i5 = 0; _i5 < _list4.size; ++_i5) { String _elem6; // required _elem6 = iprot.readString(); fields.add(_elem6); } iprot.readListEnd(); } return fields; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case SHUFFLE: if (field.type == SHUFFLE_FIELD_DESC.type) { NullStruct shuffle; shuffle = new NullStruct(); shuffle.read(iprot); return shuffle; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case ALL: if (field.type == ALL_FIELD_DESC.type) { NullStruct all; all = new NullStruct(); all.read(iprot); return all; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case NONE: if (field.type == NONE_FIELD_DESC.type) { NullStruct none; none = new NullStruct(); none.read(iprot); return none; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case DIRECT: if (field.type == DIRECT_FIELD_DESC.type) { NullStruct direct; direct = new NullStruct(); direct.read(iprot); return direct; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case CUSTOM_OBJECT: if (field.type == CUSTOM_OBJECT_FIELD_DESC.type) { JavaObject custom_object; custom_object = new JavaObject(); custom_object.read(iprot); return custom_object; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case CUSTOM_SERIALIZED: if (field.type == CUSTOM_SERIALIZED_FIELD_DESC.type) { ByteBuffer custom_serialized; custom_serialized = iprot.readBinary(); return custom_serialized; } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case LOCAL_OR_SHUFFLE: if (field.type == LOCAL_OR_SHUFFLE_FIELD_DESC.type) { NullStruct local_or_shuffle; local_or_shuffle = new NullStruct(); local_or_shuffle.read(iprot); return local_or_shuffle; } 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; } }