You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by kn...@apache.org on 2015/02/17 18:11:21 UTC
[12/18] storm git commit: Upgrade to thrift-0.9.2
http://git-wip-us.apache.org/repos/asf/storm/blob/ef51dbee/storm-core/src/jvm/backtype/storm/generated/BoltStats.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/generated/BoltStats.java b/storm-core/src/jvm/backtype/storm/generated/BoltStats.java
index d4b6326..4c1af29 100644
--- a/storm-core/src/jvm/backtype/storm/generated/BoltStats.java
+++ b/storm-core/src/jvm/backtype/storm/generated/BoltStats.java
@@ -16,13 +16,24 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package backtype.storm.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -35,10 +46,13 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._Fields>, java.io.Serializable, Cloneable {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-2-2")
+public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._Fields>, java.io.Serializable, Cloneable, Comparable<BoltStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BoltStats");
private static final org.apache.thrift.protocol.TField ACKED_FIELD_DESC = new org.apache.thrift.protocol.TField("acked", org.apache.thrift.protocol.TType.MAP, (short)1);
@@ -47,6 +61,12 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
private static final org.apache.thrift.protocol.TField EXECUTED_FIELD_DESC = new org.apache.thrift.protocol.TField("executed", org.apache.thrift.protocol.TType.MAP, (short)4);
private static final org.apache.thrift.protocol.TField EXECUTE_MS_AVG_FIELD_DESC = new org.apache.thrift.protocol.TField("execute_ms_avg", org.apache.thrift.protocol.TType.MAP, (short)5);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new BoltStatsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new BoltStatsTupleSchemeFactory());
+ }
+
private Map<String,Map<GlobalStreamId,Long>> acked; // required
private Map<String,Map<GlobalStreamId,Long>> failed; // required
private Map<String,Map<GlobalStreamId,Double>> process_ms_avg; // required
@@ -124,7 +144,6 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -185,7 +204,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
*/
public BoltStats(BoltStats other) {
if (other.is_set_acked()) {
- Map<String,Map<GlobalStreamId,Long>> __this__acked = new HashMap<String,Map<GlobalStreamId,Long>>();
+ Map<String,Map<GlobalStreamId,Long>> __this__acked = new HashMap<String,Map<GlobalStreamId,Long>>(other.acked.size());
for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.acked.entrySet()) {
String other_element_key = other_element.getKey();
@@ -193,7 +212,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
String __this__acked_copy_key = other_element_key;
- Map<GlobalStreamId,Long> __this__acked_copy_value = new HashMap<GlobalStreamId,Long>();
+ Map<GlobalStreamId,Long> __this__acked_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
@@ -211,7 +230,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
this.acked = __this__acked;
}
if (other.is_set_failed()) {
- Map<String,Map<GlobalStreamId,Long>> __this__failed = new HashMap<String,Map<GlobalStreamId,Long>>();
+ Map<String,Map<GlobalStreamId,Long>> __this__failed = new HashMap<String,Map<GlobalStreamId,Long>>(other.failed.size());
for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.failed.entrySet()) {
String other_element_key = other_element.getKey();
@@ -219,7 +238,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
String __this__failed_copy_key = other_element_key;
- Map<GlobalStreamId,Long> __this__failed_copy_value = new HashMap<GlobalStreamId,Long>();
+ Map<GlobalStreamId,Long> __this__failed_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
@@ -237,7 +256,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
this.failed = __this__failed;
}
if (other.is_set_process_ms_avg()) {
- Map<String,Map<GlobalStreamId,Double>> __this__process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>();
+ Map<String,Map<GlobalStreamId,Double>> __this__process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(other.process_ms_avg.size());
for (Map.Entry<String, Map<GlobalStreamId,Double>> other_element : other.process_ms_avg.entrySet()) {
String other_element_key = other_element.getKey();
@@ -245,7 +264,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
String __this__process_ms_avg_copy_key = other_element_key;
- Map<GlobalStreamId,Double> __this__process_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>();
+ Map<GlobalStreamId,Double> __this__process_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>(other_element_value.size());
for (Map.Entry<GlobalStreamId, Double> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
@@ -263,7 +282,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
this.process_ms_avg = __this__process_ms_avg;
}
if (other.is_set_executed()) {
- Map<String,Map<GlobalStreamId,Long>> __this__executed = new HashMap<String,Map<GlobalStreamId,Long>>();
+ Map<String,Map<GlobalStreamId,Long>> __this__executed = new HashMap<String,Map<GlobalStreamId,Long>>(other.executed.size());
for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.executed.entrySet()) {
String other_element_key = other_element.getKey();
@@ -271,7 +290,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
String __this__executed_copy_key = other_element_key;
- Map<GlobalStreamId,Long> __this__executed_copy_value = new HashMap<GlobalStreamId,Long>();
+ Map<GlobalStreamId,Long> __this__executed_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
@@ -289,7 +308,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
this.executed = __this__executed;
}
if (other.is_set_execute_ms_avg()) {
- Map<String,Map<GlobalStreamId,Double>> __this__execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>();
+ Map<String,Map<GlobalStreamId,Double>> __this__execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(other.execute_ms_avg.size());
for (Map.Entry<String, Map<GlobalStreamId,Double>> other_element : other.execute_ms_avg.entrySet()) {
String other_element_key = other_element.getKey();
@@ -297,7 +316,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
String __this__execute_ms_avg_copy_key = other_element_key;
- Map<GlobalStreamId,Double> __this__execute_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>();
+ Map<GlobalStreamId,Double> __this__execute_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>(other_element_value.size());
for (Map.Entry<GlobalStreamId, Double> other_element_value_element : other_element_value.entrySet()) {
GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
@@ -649,90 +668,90 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_acked = true && (is_set_acked());
- builder.append(present_acked);
+ list.add(present_acked);
if (present_acked)
- builder.append(acked);
+ list.add(acked);
boolean present_failed = true && (is_set_failed());
- builder.append(present_failed);
+ list.add(present_failed);
if (present_failed)
- builder.append(failed);
+ list.add(failed);
boolean present_process_ms_avg = true && (is_set_process_ms_avg());
- builder.append(present_process_ms_avg);
+ list.add(present_process_ms_avg);
if (present_process_ms_avg)
- builder.append(process_ms_avg);
+ list.add(process_ms_avg);
boolean present_executed = true && (is_set_executed());
- builder.append(present_executed);
+ list.add(present_executed);
if (present_executed)
- builder.append(executed);
+ list.add(executed);
boolean present_execute_ms_avg = true && (is_set_execute_ms_avg());
- builder.append(present_execute_ms_avg);
+ list.add(present_execute_ms_avg);
if (present_execute_ms_avg)
- builder.append(execute_ms_avg);
+ list.add(execute_ms_avg);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(BoltStats other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- BoltStats typedOther = (BoltStats)other;
- lastComparison = Boolean.valueOf(is_set_acked()).compareTo(typedOther.is_set_acked());
+ lastComparison = Boolean.valueOf(is_set_acked()).compareTo(other.is_set_acked());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_acked()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acked, typedOther.acked);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acked, other.acked);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_failed()).compareTo(typedOther.is_set_failed());
+ lastComparison = Boolean.valueOf(is_set_failed()).compareTo(other.is_set_failed());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_failed()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failed, typedOther.failed);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failed, other.failed);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_process_ms_avg()).compareTo(typedOther.is_set_process_ms_avg());
+ lastComparison = Boolean.valueOf(is_set_process_ms_avg()).compareTo(other.is_set_process_ms_avg());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_process_ms_avg()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.process_ms_avg, typedOther.process_ms_avg);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.process_ms_avg, other.process_ms_avg);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executed()).compareTo(typedOther.is_set_executed());
+ lastComparison = Boolean.valueOf(is_set_executed()).compareTo(other.is_set_executed());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_executed()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executed, typedOther.executed);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executed, other.executed);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_execute_ms_avg()).compareTo(typedOther.is_set_execute_ms_avg());
+ lastComparison = Boolean.valueOf(is_set_execute_ms_avg()).compareTo(other.is_set_execute_ms_avg());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_execute_ms_avg()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.execute_ms_avg, typedOther.execute_ms_avg);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.execute_ms_avg, other.execute_ms_avg);
if (lastComparison != 0) {
return lastComparison;
}
@@ -745,295 +764,11 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- 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();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.acked != null) {
- oprot.writeFieldBegin(ACKED_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.acked.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter85 : this.acked.entrySet())
- {
- oprot.writeString(_iter85.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter85.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter86 : _iter85.getValue().entrySet())
- {
- _iter86.getKey().write(oprot);
- oprot.writeI64(_iter86.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.failed != null) {
- oprot.writeFieldBegin(FAILED_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.failed.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter87 : this.failed.entrySet())
- {
- oprot.writeString(_iter87.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter87.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter88 : _iter87.getValue().entrySet())
- {
- _iter88.getKey().write(oprot);
- oprot.writeI64(_iter88.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.process_ms_avg != null) {
- oprot.writeFieldBegin(PROCESS_MS_AVG_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.process_ms_avg.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter89 : this.process_ms_avg.entrySet())
- {
- oprot.writeString(_iter89.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter89.getValue().size()));
- for (Map.Entry<GlobalStreamId, Double> _iter90 : _iter89.getValue().entrySet())
- {
- _iter90.getKey().write(oprot);
- oprot.writeDouble(_iter90.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.executed != null) {
- oprot.writeFieldBegin(EXECUTED_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.executed.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter91 : this.executed.entrySet())
- {
- oprot.writeString(_iter91.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter91.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter92 : _iter91.getValue().entrySet())
- {
- _iter92.getKey().write(oprot);
- oprot.writeI64(_iter92.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.execute_ms_avg != null) {
- oprot.writeFieldBegin(EXECUTE_MS_AVG_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.execute_ms_avg.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter93 : this.execute_ms_avg.entrySet())
- {
- oprot.writeString(_iter93.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter93.getValue().size()));
- for (Map.Entry<GlobalStreamId, Double> _iter94 : _iter93.getValue().entrySet())
- {
- _iter94.getKey().write(oprot);
- oprot.writeDouble(_iter94.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -1106,6 +841,7 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
throw new org.apache.thrift.protocol.TProtocolException("Required field 'execute_ms_avg' is unset! Struct:" + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -1124,5 +860,531 @@ public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._
}
}
+ private static class BoltStatsStandardSchemeFactory implements SchemeFactory {
+ public BoltStatsStandardScheme getScheme() {
+ return new BoltStatsStandardScheme();
+ }
+ }
+
+ private static class BoltStatsStandardScheme extends StandardScheme<BoltStats> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, BoltStats struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // ACKED
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map90 = iprot.readMapBegin();
+ struct.acked = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map90.size);
+ String _key91;
+ Map<GlobalStreamId,Long> _val92;
+ for (int _i93 = 0; _i93 < _map90.size; ++_i93)
+ {
+ _key91 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map94 = iprot.readMapBegin();
+ _val92 = new HashMap<GlobalStreamId,Long>(2*_map94.size);
+ GlobalStreamId _key95;
+ long _val96;
+ for (int _i97 = 0; _i97 < _map94.size; ++_i97)
+ {
+ _key95 = new GlobalStreamId();
+ _key95.read(iprot);
+ _val96 = iprot.readI64();
+ _val92.put(_key95, _val96);
+ }
+ iprot.readMapEnd();
+ }
+ struct.acked.put(_key91, _val92);
+ }
+ iprot.readMapEnd();
+ }
+ struct.set_acked_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // FAILED
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map98 = iprot.readMapBegin();
+ struct.failed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map98.size);
+ String _key99;
+ Map<GlobalStreamId,Long> _val100;
+ for (int _i101 = 0; _i101 < _map98.size; ++_i101)
+ {
+ _key99 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map102 = iprot.readMapBegin();
+ _val100 = new HashMap<GlobalStreamId,Long>(2*_map102.size);
+ GlobalStreamId _key103;
+ long _val104;
+ for (int _i105 = 0; _i105 < _map102.size; ++_i105)
+ {
+ _key103 = new GlobalStreamId();
+ _key103.read(iprot);
+ _val104 = iprot.readI64();
+ _val100.put(_key103, _val104);
+ }
+ iprot.readMapEnd();
+ }
+ struct.failed.put(_key99, _val100);
+ }
+ iprot.readMapEnd();
+ }
+ struct.set_failed_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PROCESS_MS_AVG
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin();
+ struct.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map106.size);
+ String _key107;
+ Map<GlobalStreamId,Double> _val108;
+ for (int _i109 = 0; _i109 < _map106.size; ++_i109)
+ {
+ _key107 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map110 = iprot.readMapBegin();
+ _val108 = new HashMap<GlobalStreamId,Double>(2*_map110.size);
+ GlobalStreamId _key111;
+ double _val112;
+ for (int _i113 = 0; _i113 < _map110.size; ++_i113)
+ {
+ _key111 = new GlobalStreamId();
+ _key111.read(iprot);
+ _val112 = iprot.readDouble();
+ _val108.put(_key111, _val112);
+ }
+ iprot.readMapEnd();
+ }
+ struct.process_ms_avg.put(_key107, _val108);
+ }
+ iprot.readMapEnd();
+ }
+ struct.set_process_ms_avg_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // EXECUTED
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map114 = iprot.readMapBegin();
+ struct.executed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map114.size);
+ String _key115;
+ Map<GlobalStreamId,Long> _val116;
+ for (int _i117 = 0; _i117 < _map114.size; ++_i117)
+ {
+ _key115 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map118 = iprot.readMapBegin();
+ _val116 = new HashMap<GlobalStreamId,Long>(2*_map118.size);
+ GlobalStreamId _key119;
+ long _val120;
+ for (int _i121 = 0; _i121 < _map118.size; ++_i121)
+ {
+ _key119 = new GlobalStreamId();
+ _key119.read(iprot);
+ _val120 = iprot.readI64();
+ _val116.put(_key119, _val120);
+ }
+ iprot.readMapEnd();
+ }
+ struct.executed.put(_key115, _val116);
+ }
+ iprot.readMapEnd();
+ }
+ struct.set_executed_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // EXECUTE_MS_AVG
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map122 = iprot.readMapBegin();
+ struct.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map122.size);
+ String _key123;
+ Map<GlobalStreamId,Double> _val124;
+ for (int _i125 = 0; _i125 < _map122.size; ++_i125)
+ {
+ _key123 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map126 = iprot.readMapBegin();
+ _val124 = new HashMap<GlobalStreamId,Double>(2*_map126.size);
+ GlobalStreamId _key127;
+ double _val128;
+ for (int _i129 = 0; _i129 < _map126.size; ++_i129)
+ {
+ _key127 = new GlobalStreamId();
+ _key127.read(iprot);
+ _val128 = iprot.readDouble();
+ _val124.put(_key127, _val128);
+ }
+ iprot.readMapEnd();
+ }
+ struct.execute_ms_avg.put(_key123, _val124);
+ }
+ iprot.readMapEnd();
+ }
+ struct.set_execute_ms_avg_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, BoltStats struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.acked != null) {
+ oprot.writeFieldBegin(ACKED_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.acked.size()));
+ for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter130 : struct.acked.entrySet())
+ {
+ oprot.writeString(_iter130.getKey());
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter130.getValue().size()));
+ for (Map.Entry<GlobalStreamId, Long> _iter131 : _iter130.getValue().entrySet())
+ {
+ _iter131.getKey().write(oprot);
+ oprot.writeI64(_iter131.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.failed != null) {
+ oprot.writeFieldBegin(FAILED_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.failed.size()));
+ for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter132 : struct.failed.entrySet())
+ {
+ oprot.writeString(_iter132.getKey());
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter132.getValue().size()));
+ for (Map.Entry<GlobalStreamId, Long> _iter133 : _iter132.getValue().entrySet())
+ {
+ _iter133.getKey().write(oprot);
+ oprot.writeI64(_iter133.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.process_ms_avg != null) {
+ oprot.writeFieldBegin(PROCESS_MS_AVG_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.process_ms_avg.size()));
+ for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter134 : struct.process_ms_avg.entrySet())
+ {
+ oprot.writeString(_iter134.getKey());
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter134.getValue().size()));
+ for (Map.Entry<GlobalStreamId, Double> _iter135 : _iter134.getValue().entrySet())
+ {
+ _iter135.getKey().write(oprot);
+ oprot.writeDouble(_iter135.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.executed != null) {
+ oprot.writeFieldBegin(EXECUTED_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.executed.size()));
+ for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter136 : struct.executed.entrySet())
+ {
+ oprot.writeString(_iter136.getKey());
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter136.getValue().size()));
+ for (Map.Entry<GlobalStreamId, Long> _iter137 : _iter136.getValue().entrySet())
+ {
+ _iter137.getKey().write(oprot);
+ oprot.writeI64(_iter137.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.execute_ms_avg != null) {
+ oprot.writeFieldBegin(EXECUTE_MS_AVG_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.execute_ms_avg.size()));
+ for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter138 : struct.execute_ms_avg.entrySet())
+ {
+ oprot.writeString(_iter138.getKey());
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter138.getValue().size()));
+ for (Map.Entry<GlobalStreamId, Double> _iter139 : _iter138.getValue().entrySet())
+ {
+ _iter139.getKey().write(oprot);
+ oprot.writeDouble(_iter139.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class BoltStatsTupleSchemeFactory implements SchemeFactory {
+ public BoltStatsTupleScheme getScheme() {
+ return new BoltStatsTupleScheme();
+ }
+ }
+
+ private static class BoltStatsTupleScheme extends TupleScheme<BoltStats> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, BoltStats struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.acked.size());
+ for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter140 : struct.acked.entrySet())
+ {
+ oprot.writeString(_iter140.getKey());
+ {
+ oprot.writeI32(_iter140.getValue().size());
+ for (Map.Entry<GlobalStreamId, Long> _iter141 : _iter140.getValue().entrySet())
+ {
+ _iter141.getKey().write(oprot);
+ oprot.writeI64(_iter141.getValue());
+ }
+ }
+ }
+ }
+ {
+ oprot.writeI32(struct.failed.size());
+ for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter142 : struct.failed.entrySet())
+ {
+ oprot.writeString(_iter142.getKey());
+ {
+ oprot.writeI32(_iter142.getValue().size());
+ for (Map.Entry<GlobalStreamId, Long> _iter143 : _iter142.getValue().entrySet())
+ {
+ _iter143.getKey().write(oprot);
+ oprot.writeI64(_iter143.getValue());
+ }
+ }
+ }
+ }
+ {
+ oprot.writeI32(struct.process_ms_avg.size());
+ for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter144 : struct.process_ms_avg.entrySet())
+ {
+ oprot.writeString(_iter144.getKey());
+ {
+ oprot.writeI32(_iter144.getValue().size());
+ for (Map.Entry<GlobalStreamId, Double> _iter145 : _iter144.getValue().entrySet())
+ {
+ _iter145.getKey().write(oprot);
+ oprot.writeDouble(_iter145.getValue());
+ }
+ }
+ }
+ }
+ {
+ oprot.writeI32(struct.executed.size());
+ for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter146 : struct.executed.entrySet())
+ {
+ oprot.writeString(_iter146.getKey());
+ {
+ oprot.writeI32(_iter146.getValue().size());
+ for (Map.Entry<GlobalStreamId, Long> _iter147 : _iter146.getValue().entrySet())
+ {
+ _iter147.getKey().write(oprot);
+ oprot.writeI64(_iter147.getValue());
+ }
+ }
+ }
+ }
+ {
+ oprot.writeI32(struct.execute_ms_avg.size());
+ for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter148 : struct.execute_ms_avg.entrySet())
+ {
+ oprot.writeString(_iter148.getKey());
+ {
+ oprot.writeI32(_iter148.getValue().size());
+ for (Map.Entry<GlobalStreamId, Double> _iter149 : _iter148.getValue().entrySet())
+ {
+ _iter149.getKey().write(oprot);
+ oprot.writeDouble(_iter149.getValue());
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, BoltStats struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TMap _map150 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
+ struct.acked = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map150.size);
+ String _key151;
+ Map<GlobalStreamId,Long> _val152;
+ for (int _i153 = 0; _i153 < _map150.size; ++_i153)
+ {
+ _key151 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map154 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ _val152 = new HashMap<GlobalStreamId,Long>(2*_map154.size);
+ GlobalStreamId _key155;
+ long _val156;
+ for (int _i157 = 0; _i157 < _map154.size; ++_i157)
+ {
+ _key155 = new GlobalStreamId();
+ _key155.read(iprot);
+ _val156 = iprot.readI64();
+ _val152.put(_key155, _val156);
+ }
+ }
+ struct.acked.put(_key151, _val152);
+ }
+ }
+ struct.set_acked_isSet(true);
+ {
+ org.apache.thrift.protocol.TMap _map158 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
+ struct.failed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map158.size);
+ String _key159;
+ Map<GlobalStreamId,Long> _val160;
+ for (int _i161 = 0; _i161 < _map158.size; ++_i161)
+ {
+ _key159 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map162 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ _val160 = new HashMap<GlobalStreamId,Long>(2*_map162.size);
+ GlobalStreamId _key163;
+ long _val164;
+ for (int _i165 = 0; _i165 < _map162.size; ++_i165)
+ {
+ _key163 = new GlobalStreamId();
+ _key163.read(iprot);
+ _val164 = iprot.readI64();
+ _val160.put(_key163, _val164);
+ }
+ }
+ struct.failed.put(_key159, _val160);
+ }
+ }
+ struct.set_failed_isSet(true);
+ {
+ org.apache.thrift.protocol.TMap _map166 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
+ struct.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map166.size);
+ String _key167;
+ Map<GlobalStreamId,Double> _val168;
+ for (int _i169 = 0; _i169 < _map166.size; ++_i169)
+ {
+ _key167 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map170 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
+ _val168 = new HashMap<GlobalStreamId,Double>(2*_map170.size);
+ GlobalStreamId _key171;
+ double _val172;
+ for (int _i173 = 0; _i173 < _map170.size; ++_i173)
+ {
+ _key171 = new GlobalStreamId();
+ _key171.read(iprot);
+ _val172 = iprot.readDouble();
+ _val168.put(_key171, _val172);
+ }
+ }
+ struct.process_ms_avg.put(_key167, _val168);
+ }
+ }
+ struct.set_process_ms_avg_isSet(true);
+ {
+ org.apache.thrift.protocol.TMap _map174 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
+ struct.executed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map174.size);
+ String _key175;
+ Map<GlobalStreamId,Long> _val176;
+ for (int _i177 = 0; _i177 < _map174.size; ++_i177)
+ {
+ _key175 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map178 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ _val176 = new HashMap<GlobalStreamId,Long>(2*_map178.size);
+ GlobalStreamId _key179;
+ long _val180;
+ for (int _i181 = 0; _i181 < _map178.size; ++_i181)
+ {
+ _key179 = new GlobalStreamId();
+ _key179.read(iprot);
+ _val180 = iprot.readI64();
+ _val176.put(_key179, _val180);
+ }
+ }
+ struct.executed.put(_key175, _val176);
+ }
+ }
+ struct.set_executed_isSet(true);
+ {
+ org.apache.thrift.protocol.TMap _map182 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
+ struct.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map182.size);
+ String _key183;
+ Map<GlobalStreamId,Double> _val184;
+ for (int _i185 = 0; _i185 < _map182.size; ++_i185)
+ {
+ _key183 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TMap _map186 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
+ _val184 = new HashMap<GlobalStreamId,Double>(2*_map186.size);
+ GlobalStreamId _key187;
+ double _val188;
+ for (int _i189 = 0; _i189 < _map186.size; ++_i189)
+ {
+ _key187 = new GlobalStreamId();
+ _key187.read(iprot);
+ _val188 = iprot.readDouble();
+ _val184.put(_key187, _val188);
+ }
+ }
+ struct.execute_ms_avg.put(_key183, _val184);
+ }
+ }
+ struct.set_execute_ms_avg_isSet(true);
+ }
+ }
+
}
http://git-wip-us.apache.org/repos/asf/storm/blob/ef51dbee/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java b/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java
index a2623ab..093bd9a 100644
--- a/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java
+++ b/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java
@@ -16,13 +16,24 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package backtype.storm.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -35,16 +46,25 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, ClusterSummary._Fields>, java.io.Serializable, Cloneable {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-2-2")
+public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, ClusterSummary._Fields>, java.io.Serializable, Cloneable, Comparable<ClusterSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClusterSummary");
private static final org.apache.thrift.protocol.TField SUPERVISORS_FIELD_DESC = new org.apache.thrift.protocol.TField("supervisors", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField NIMBUS_UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("nimbus_uptime_secs", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.thrift.protocol.TField("topologies", org.apache.thrift.protocol.TType.LIST, (short)3);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ClusterSummaryStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ClusterSummaryTupleSchemeFactory());
+ }
+
private List<SupervisorSummary> supervisors; // required
private int nimbus_uptime_secs; // required
private List<TopologySummary> topologies; // required
@@ -115,8 +135,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
// isset id assignments
private static final int __NIMBUS_UPTIME_SECS_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
-
+ private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -151,10 +170,9 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
* Performs a deep copy on <i>other</i>.
*/
public ClusterSummary(ClusterSummary other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.is_set_supervisors()) {
- List<SupervisorSummary> __this__supervisors = new ArrayList<SupervisorSummary>();
+ List<SupervisorSummary> __this__supervisors = new ArrayList<SupervisorSummary>(other.supervisors.size());
for (SupervisorSummary other_element : other.supervisors) {
__this__supervisors.add(new SupervisorSummary(other_element));
}
@@ -162,7 +180,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
this.nimbus_uptime_secs = other.nimbus_uptime_secs;
if (other.is_set_topologies()) {
- List<TopologySummary> __this__topologies = new ArrayList<TopologySummary>();
+ List<TopologySummary> __this__topologies = new ArrayList<TopologySummary>(other.topologies.size());
for (TopologySummary other_element : other.topologies) {
__this__topologies.add(new TopologySummary(other_element));
}
@@ -230,16 +248,16 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
public void unset_nimbus_uptime_secs() {
- __isset_bit_vector.clear(__NIMBUS_UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
}
/** Returns true if field nimbus_uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_nimbus_uptime_secs() {
- return __isset_bit_vector.get(__NIMBUS_UPTIME_SECS_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
}
public void set_nimbus_uptime_secs_isSet(boolean value) {
- __isset_bit_vector.set(__NIMBUS_UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID, value);
}
public int get_topologies_size() {
@@ -386,60 +404,60 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_supervisors = true && (is_set_supervisors());
- builder.append(present_supervisors);
+ list.add(present_supervisors);
if (present_supervisors)
- builder.append(supervisors);
+ list.add(supervisors);
boolean present_nimbus_uptime_secs = true;
- builder.append(present_nimbus_uptime_secs);
+ list.add(present_nimbus_uptime_secs);
if (present_nimbus_uptime_secs)
- builder.append(nimbus_uptime_secs);
+ list.add(nimbus_uptime_secs);
boolean present_topologies = true && (is_set_topologies());
- builder.append(present_topologies);
+ list.add(present_topologies);
if (present_topologies)
- builder.append(topologies);
+ list.add(topologies);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(ClusterSummary other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- ClusterSummary typedOther = (ClusterSummary)other;
- lastComparison = Boolean.valueOf(is_set_supervisors()).compareTo(typedOther.is_set_supervisors());
+ lastComparison = Boolean.valueOf(is_set_supervisors()).compareTo(other.is_set_supervisors());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_supervisors()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supervisors, typedOther.supervisors);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supervisors, other.supervisors);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_nimbus_uptime_secs()).compareTo(typedOther.is_set_nimbus_uptime_secs());
+ lastComparison = Boolean.valueOf(is_set_nimbus_uptime_secs()).compareTo(other.is_set_nimbus_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_nimbus_uptime_secs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nimbus_uptime_secs, typedOther.nimbus_uptime_secs);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nimbus_uptime_secs, other.nimbus_uptime_secs);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_topologies()).compareTo(typedOther.is_set_topologies());
+ lastComparison = Boolean.valueOf(is_set_topologies()).compareTo(other.is_set_topologies());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_topologies()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.topologies, typedOther.topologies);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.topologies, other.topologies);
if (lastComparison != 0) {
return lastComparison;
}
@@ -452,101 +470,11 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField field;
- iprot.readStructBegin();
- 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();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.supervisors != null) {
- oprot.writeFieldBegin(SUPERVISORS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.supervisors.size()));
- for (SupervisorSummary _iter43 : this.supervisors)
- {
- _iter43.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(NIMBUS_UPTIME_SECS_FIELD_DESC);
- oprot.writeI32(this.nimbus_uptime_secs);
- oprot.writeFieldEnd();
- if (this.topologies != null) {
- oprot.writeFieldBegin(TOPOLOGIES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.topologies.size()));
- for (TopologySummary _iter44 : this.topologies)
- {
- _iter44.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -591,6 +519,7 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
throw new org.apache.thrift.protocol.TProtocolException("Required field 'topologies' is unset! Struct:" + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -604,12 +533,182 @@ public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, C
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bit_vector = new BitSet(1);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
+ private static class ClusterSummaryStandardSchemeFactory implements SchemeFactory {
+ public ClusterSummaryStandardScheme getScheme() {
+ return new ClusterSummaryStandardScheme();
+ }
+ }
+
+ private static class ClusterSummaryStandardScheme extends StandardScheme<ClusterSummary> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ClusterSummary struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // SUPERVISORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list74 = iprot.readListBegin();
+ struct.supervisors = new ArrayList<SupervisorSummary>(_list74.size);
+ SupervisorSummary _elem75;
+ for (int _i76 = 0; _i76 < _list74.size; ++_i76)
+ {
+ _elem75 = new SupervisorSummary();
+ _elem75.read(iprot);
+ struct.supervisors.add(_elem75);
+ }
+ iprot.readListEnd();
+ }
+ struct.set_supervisors_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NIMBUS_UPTIME_SECS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.nimbus_uptime_secs = iprot.readI32();
+ struct.set_nimbus_uptime_secs_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TOPOLOGIES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list77 = iprot.readListBegin();
+ struct.topologies = new ArrayList<TopologySummary>(_list77.size);
+ TopologySummary _elem78;
+ for (int _i79 = 0; _i79 < _list77.size; ++_i79)
+ {
+ _elem78 = new TopologySummary();
+ _elem78.read(iprot);
+ struct.topologies.add(_elem78);
+ }
+ iprot.readListEnd();
+ }
+ struct.set_topologies_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ClusterSummary struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.supervisors != null) {
+ oprot.writeFieldBegin(SUPERVISORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.supervisors.size()));
+ for (SupervisorSummary _iter80 : struct.supervisors)
+ {
+ _iter80.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(NIMBUS_UPTIME_SECS_FIELD_DESC);
+ oprot.writeI32(struct.nimbus_uptime_secs);
+ oprot.writeFieldEnd();
+ if (struct.topologies != null) {
+ oprot.writeFieldBegin(TOPOLOGIES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.topologies.size()));
+ for (TopologySummary _iter81 : struct.topologies)
+ {
+ _iter81.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ClusterSummaryTupleSchemeFactory implements SchemeFactory {
+ public ClusterSummaryTupleScheme getScheme() {
+ return new ClusterSummaryTupleScheme();
+ }
+ }
+
+ private static class ClusterSummaryTupleScheme extends TupleScheme<ClusterSummary> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ClusterSummary struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.supervisors.size());
+ for (SupervisorSummary _iter82 : struct.supervisors)
+ {
+ _iter82.write(oprot);
+ }
+ }
+ oprot.writeI32(struct.nimbus_uptime_secs);
+ {
+ oprot.writeI32(struct.topologies.size());
+ for (TopologySummary _iter83 : struct.topologies)
+ {
+ _iter83.write(oprot);
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ClusterSummary struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TList _list84 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.supervisors = new ArrayList<SupervisorSummary>(_list84.size);
+ SupervisorSummary _elem85;
+ for (int _i86 = 0; _i86 < _list84.size; ++_i86)
+ {
+ _elem85 = new SupervisorSummary();
+ _elem85.read(iprot);
+ struct.supervisors.add(_elem85);
+ }
+ }
+ struct.set_supervisors_isSet(true);
+ struct.nimbus_uptime_secs = iprot.readI32();
+ struct.set_nimbus_uptime_secs_isSet(true);
+ {
+ org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.topologies = new ArrayList<TopologySummary>(_list87.size);
+ TopologySummary _elem88;
+ for (int _i89 = 0; _i89 < _list87.size; ++_i89)
+ {
+ _elem88 = new TopologySummary();
+ _elem88.read(iprot);
+ struct.topologies.add(_elem88);
+ }
+ }
+ struct.set_topologies_isSet(true);
+ }
+ }
+
}