You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2015/11/05 21:41:21 UTC
[42/60] [abbrv] [partial] storm git commit: Release 2.0.4-SNAPSHOT
http://git-wip-us.apache.org/repos/asf/storm/blob/e935da91/jstorm-client/src/main/java/backtype/storm/generated/BoltStats.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/BoltStats.java b/jstorm-client/src/main/java/backtype/storm/generated/BoltStats.java
deleted file mode 100644
index 31dced0..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/BoltStats.java
+++ /dev/null
@@ -1,1111 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.7.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
-package backtype.storm.generated;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class BoltStats implements org.apache.thrift7.TBase<BoltStats, BoltStats._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("BoltStats");
-
- private static final org.apache.thrift7.protocol.TField ACKED_FIELD_DESC = new org.apache.thrift7.protocol.TField("acked", org.apache.thrift7.protocol.TType.MAP, (short)1);
- private static final org.apache.thrift7.protocol.TField FAILED_FIELD_DESC = new org.apache.thrift7.protocol.TField("failed", org.apache.thrift7.protocol.TType.MAP, (short)2);
- private static final org.apache.thrift7.protocol.TField PROCESS_MS_AVG_FIELD_DESC = new org.apache.thrift7.protocol.TField("process_ms_avg", org.apache.thrift7.protocol.TType.MAP, (short)3);
- private static final org.apache.thrift7.protocol.TField EXECUTED_FIELD_DESC = new org.apache.thrift7.protocol.TField("executed", org.apache.thrift7.protocol.TType.MAP, (short)4);
- private static final org.apache.thrift7.protocol.TField EXECUTE_MS_AVG_FIELD_DESC = new org.apache.thrift7.protocol.TField("execute_ms_avg", org.apache.thrift7.protocol.TType.MAP, (short)5);
-
- 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
- private Map<String,Map<GlobalStreamId,Long>> executed; // required
- private Map<String,Map<GlobalStreamId,Double>> execute_ms_avg; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- ACKED((short)1, "acked"),
- FAILED((short)2, "failed"),
- PROCESS_MS_AVG((short)3, "process_ms_avg"),
- EXECUTED((short)4, "executed"),
- EXECUTE_MS_AVG((short)5, "execute_ms_avg");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ACKED
- return ACKED;
- case 2: // FAILED
- return FAILED;
- case 3: // PROCESS_MS_AVG
- return PROCESS_MS_AVG;
- case 4: // EXECUTED
- return EXECUTED;
- case 5: // EXECUTE_MS_AVG
- return EXECUTE_MS_AVG;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
-
- public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ACKED, new org.apache.thrift7.meta_data.FieldMetaData("acked", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I64)))));
- tmpMap.put(_Fields.FAILED, new org.apache.thrift7.meta_data.FieldMetaData("failed", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I64)))));
- tmpMap.put(_Fields.PROCESS_MS_AVG, new org.apache.thrift7.meta_data.FieldMetaData("process_ms_avg", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.DOUBLE)))));
- tmpMap.put(_Fields.EXECUTED, new org.apache.thrift7.meta_data.FieldMetaData("executed", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I64)))));
- tmpMap.put(_Fields.EXECUTE_MS_AVG, new org.apache.thrift7.meta_data.FieldMetaData("execute_ms_avg", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING),
- new org.apache.thrift7.meta_data.MapMetaData(org.apache.thrift7.protocol.TType.MAP,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.DOUBLE)))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(BoltStats.class, metaDataMap);
- }
-
- public BoltStats() {
- }
-
- public BoltStats(
- Map<String,Map<GlobalStreamId,Long>> acked,
- Map<String,Map<GlobalStreamId,Long>> failed,
- Map<String,Map<GlobalStreamId,Double>> process_ms_avg,
- Map<String,Map<GlobalStreamId,Long>> executed,
- Map<String,Map<GlobalStreamId,Double>> execute_ms_avg)
- {
- this();
- this.acked = acked;
- this.failed = failed;
- this.process_ms_avg = process_ms_avg;
- this.executed = executed;
- this.execute_ms_avg = execute_ms_avg;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public BoltStats(BoltStats other) {
- if (other.is_set_acked()) {
- Map<String,Map<GlobalStreamId,Long>> __this__acked = new HashMap<String,Map<GlobalStreamId,Long>>();
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.acked.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
-
- String __this__acked_copy_key = other_element_key;
-
- Map<GlobalStreamId,Long> __this__acked_copy_value = new HashMap<GlobalStreamId,Long>();
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__acked_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Long __this__acked_copy_value_copy_value = other_element_value_element_value;
-
- __this__acked_copy_value.put(__this__acked_copy_value_copy_key, __this__acked_copy_value_copy_value);
- }
-
- __this__acked.put(__this__acked_copy_key, __this__acked_copy_value);
- }
- this.acked = __this__acked;
- }
- if (other.is_set_failed()) {
- Map<String,Map<GlobalStreamId,Long>> __this__failed = new HashMap<String,Map<GlobalStreamId,Long>>();
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.failed.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
-
- String __this__failed_copy_key = other_element_key;
-
- Map<GlobalStreamId,Long> __this__failed_copy_value = new HashMap<GlobalStreamId,Long>();
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__failed_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Long __this__failed_copy_value_copy_value = other_element_value_element_value;
-
- __this__failed_copy_value.put(__this__failed_copy_value_copy_key, __this__failed_copy_value_copy_value);
- }
-
- __this__failed.put(__this__failed_copy_key, __this__failed_copy_value);
- }
- 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>>();
- for (Map.Entry<String, Map<GlobalStreamId,Double>> other_element : other.process_ms_avg.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Double> other_element_value = other_element.getValue();
-
- String __this__process_ms_avg_copy_key = other_element_key;
-
- Map<GlobalStreamId,Double> __this__process_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>();
- for (Map.Entry<GlobalStreamId, Double> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Double other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__process_ms_avg_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Double __this__process_ms_avg_copy_value_copy_value = other_element_value_element_value;
-
- __this__process_ms_avg_copy_value.put(__this__process_ms_avg_copy_value_copy_key, __this__process_ms_avg_copy_value_copy_value);
- }
-
- __this__process_ms_avg.put(__this__process_ms_avg_copy_key, __this__process_ms_avg_copy_value);
- }
- 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>>();
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.executed.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
-
- String __this__executed_copy_key = other_element_key;
-
- Map<GlobalStreamId,Long> __this__executed_copy_value = new HashMap<GlobalStreamId,Long>();
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__executed_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Long __this__executed_copy_value_copy_value = other_element_value_element_value;
-
- __this__executed_copy_value.put(__this__executed_copy_value_copy_key, __this__executed_copy_value_copy_value);
- }
-
- __this__executed.put(__this__executed_copy_key, __this__executed_copy_value);
- }
- 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>>();
- for (Map.Entry<String, Map<GlobalStreamId,Double>> other_element : other.execute_ms_avg.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Double> other_element_value = other_element.getValue();
-
- String __this__execute_ms_avg_copy_key = other_element_key;
-
- Map<GlobalStreamId,Double> __this__execute_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>();
- for (Map.Entry<GlobalStreamId, Double> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Double other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__execute_ms_avg_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Double __this__execute_ms_avg_copy_value_copy_value = other_element_value_element_value;
-
- __this__execute_ms_avg_copy_value.put(__this__execute_ms_avg_copy_value_copy_key, __this__execute_ms_avg_copy_value_copy_value);
- }
-
- __this__execute_ms_avg.put(__this__execute_ms_avg_copy_key, __this__execute_ms_avg_copy_value);
- }
- this.execute_ms_avg = __this__execute_ms_avg;
- }
- }
-
- public BoltStats deepCopy() {
- return new BoltStats(this);
- }
-
- @Override
- public void clear() {
- this.acked = null;
- this.failed = null;
- this.process_ms_avg = null;
- this.executed = null;
- this.execute_ms_avg = null;
- }
-
- public int get_acked_size() {
- return (this.acked == null) ? 0 : this.acked.size();
- }
-
- public void put_to_acked(String key, Map<GlobalStreamId,Long> val) {
- if (this.acked == null) {
- this.acked = new HashMap<String,Map<GlobalStreamId,Long>>();
- }
- this.acked.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Long>> get_acked() {
- return this.acked;
- }
-
- public void set_acked(Map<String,Map<GlobalStreamId,Long>> acked) {
- this.acked = acked;
- }
-
- public void unset_acked() {
- this.acked = null;
- }
-
- /** Returns true if field acked is set (has been assigned a value) and false otherwise */
- public boolean is_set_acked() {
- return this.acked != null;
- }
-
- public void set_acked_isSet(boolean value) {
- if (!value) {
- this.acked = null;
- }
- }
-
- public int get_failed_size() {
- return (this.failed == null) ? 0 : this.failed.size();
- }
-
- public void put_to_failed(String key, Map<GlobalStreamId,Long> val) {
- if (this.failed == null) {
- this.failed = new HashMap<String,Map<GlobalStreamId,Long>>();
- }
- this.failed.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Long>> get_failed() {
- return this.failed;
- }
-
- public void set_failed(Map<String,Map<GlobalStreamId,Long>> failed) {
- this.failed = failed;
- }
-
- public void unset_failed() {
- this.failed = null;
- }
-
- /** Returns true if field failed is set (has been assigned a value) and false otherwise */
- public boolean is_set_failed() {
- return this.failed != null;
- }
-
- public void set_failed_isSet(boolean value) {
- if (!value) {
- this.failed = null;
- }
- }
-
- public int get_process_ms_avg_size() {
- return (this.process_ms_avg == null) ? 0 : this.process_ms_avg.size();
- }
-
- public void put_to_process_ms_avg(String key, Map<GlobalStreamId,Double> val) {
- if (this.process_ms_avg == null) {
- this.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>();
- }
- this.process_ms_avg.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Double>> get_process_ms_avg() {
- return this.process_ms_avg;
- }
-
- public void set_process_ms_avg(Map<String,Map<GlobalStreamId,Double>> process_ms_avg) {
- this.process_ms_avg = process_ms_avg;
- }
-
- public void unset_process_ms_avg() {
- this.process_ms_avg = null;
- }
-
- /** Returns true if field process_ms_avg is set (has been assigned a value) and false otherwise */
- public boolean is_set_process_ms_avg() {
- return this.process_ms_avg != null;
- }
-
- public void set_process_ms_avg_isSet(boolean value) {
- if (!value) {
- this.process_ms_avg = null;
- }
- }
-
- public int get_executed_size() {
- return (this.executed == null) ? 0 : this.executed.size();
- }
-
- public void put_to_executed(String key, Map<GlobalStreamId,Long> val) {
- if (this.executed == null) {
- this.executed = new HashMap<String,Map<GlobalStreamId,Long>>();
- }
- this.executed.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Long>> get_executed() {
- return this.executed;
- }
-
- public void set_executed(Map<String,Map<GlobalStreamId,Long>> executed) {
- this.executed = executed;
- }
-
- public void unset_executed() {
- this.executed = null;
- }
-
- /** Returns true if field executed is set (has been assigned a value) and false otherwise */
- public boolean is_set_executed() {
- return this.executed != null;
- }
-
- public void set_executed_isSet(boolean value) {
- if (!value) {
- this.executed = null;
- }
- }
-
- public int get_execute_ms_avg_size() {
- return (this.execute_ms_avg == null) ? 0 : this.execute_ms_avg.size();
- }
-
- public void put_to_execute_ms_avg(String key, Map<GlobalStreamId,Double> val) {
- if (this.execute_ms_avg == null) {
- this.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>();
- }
- this.execute_ms_avg.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Double>> get_execute_ms_avg() {
- return this.execute_ms_avg;
- }
-
- public void set_execute_ms_avg(Map<String,Map<GlobalStreamId,Double>> execute_ms_avg) {
- this.execute_ms_avg = execute_ms_avg;
- }
-
- public void unset_execute_ms_avg() {
- this.execute_ms_avg = null;
- }
-
- /** Returns true if field execute_ms_avg is set (has been assigned a value) and false otherwise */
- public boolean is_set_execute_ms_avg() {
- return this.execute_ms_avg != null;
- }
-
- public void set_execute_ms_avg_isSet(boolean value) {
- if (!value) {
- this.execute_ms_avg = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ACKED:
- if (value == null) {
- unset_acked();
- } else {
- set_acked((Map<String,Map<GlobalStreamId,Long>>)value);
- }
- break;
-
- case FAILED:
- if (value == null) {
- unset_failed();
- } else {
- set_failed((Map<String,Map<GlobalStreamId,Long>>)value);
- }
- break;
-
- case PROCESS_MS_AVG:
- if (value == null) {
- unset_process_ms_avg();
- } else {
- set_process_ms_avg((Map<String,Map<GlobalStreamId,Double>>)value);
- }
- break;
-
- case EXECUTED:
- if (value == null) {
- unset_executed();
- } else {
- set_executed((Map<String,Map<GlobalStreamId,Long>>)value);
- }
- break;
-
- case EXECUTE_MS_AVG:
- if (value == null) {
- unset_execute_ms_avg();
- } else {
- set_execute_ms_avg((Map<String,Map<GlobalStreamId,Double>>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ACKED:
- return get_acked();
-
- case FAILED:
- return get_failed();
-
- case PROCESS_MS_AVG:
- return get_process_ms_avg();
-
- case EXECUTED:
- return get_executed();
-
- case EXECUTE_MS_AVG:
- return get_execute_ms_avg();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ACKED:
- return is_set_acked();
- case FAILED:
- return is_set_failed();
- case PROCESS_MS_AVG:
- return is_set_process_ms_avg();
- case EXECUTED:
- return is_set_executed();
- case EXECUTE_MS_AVG:
- return is_set_execute_ms_avg();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof BoltStats)
- return this.equals((BoltStats)that);
- return false;
- }
-
- public boolean equals(BoltStats that) {
- if (that == null)
- return false;
-
- boolean this_present_acked = true && this.is_set_acked();
- boolean that_present_acked = true && that.is_set_acked();
- if (this_present_acked || that_present_acked) {
- if (!(this_present_acked && that_present_acked))
- return false;
- if (!this.acked.equals(that.acked))
- return false;
- }
-
- boolean this_present_failed = true && this.is_set_failed();
- boolean that_present_failed = true && that.is_set_failed();
- if (this_present_failed || that_present_failed) {
- if (!(this_present_failed && that_present_failed))
- return false;
- if (!this.failed.equals(that.failed))
- return false;
- }
-
- boolean this_present_process_ms_avg = true && this.is_set_process_ms_avg();
- boolean that_present_process_ms_avg = true && that.is_set_process_ms_avg();
- if (this_present_process_ms_avg || that_present_process_ms_avg) {
- if (!(this_present_process_ms_avg && that_present_process_ms_avg))
- return false;
- if (!this.process_ms_avg.equals(that.process_ms_avg))
- return false;
- }
-
- boolean this_present_executed = true && this.is_set_executed();
- boolean that_present_executed = true && that.is_set_executed();
- if (this_present_executed || that_present_executed) {
- if (!(this_present_executed && that_present_executed))
- return false;
- if (!this.executed.equals(that.executed))
- return false;
- }
-
- boolean this_present_execute_ms_avg = true && this.is_set_execute_ms_avg();
- boolean that_present_execute_ms_avg = true && that.is_set_execute_ms_avg();
- if (this_present_execute_ms_avg || that_present_execute_ms_avg) {
- if (!(this_present_execute_ms_avg && that_present_execute_ms_avg))
- return false;
- if (!this.execute_ms_avg.equals(that.execute_ms_avg))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_acked = true && (is_set_acked());
- builder.append(present_acked);
- if (present_acked)
- builder.append(acked);
-
- boolean present_failed = true && (is_set_failed());
- builder.append(present_failed);
- if (present_failed)
- builder.append(failed);
-
- boolean present_process_ms_avg = true && (is_set_process_ms_avg());
- builder.append(present_process_ms_avg);
- if (present_process_ms_avg)
- builder.append(process_ms_avg);
-
- boolean present_executed = true && (is_set_executed());
- builder.append(present_executed);
- if (present_executed)
- builder.append(executed);
-
- boolean present_execute_ms_avg = true && (is_set_execute_ms_avg());
- builder.append(present_execute_ms_avg);
- if (present_execute_ms_avg)
- builder.append(execute_ms_avg);
-
- return builder.toHashCode();
- }
-
- 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());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_acked()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.acked, typedOther.acked);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_failed()).compareTo(typedOther.is_set_failed());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_failed()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.failed, typedOther.failed);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_process_ms_avg()).compareTo(typedOther.is_set_process_ms_avg());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_process_ms_avg()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.process_ms_avg, typedOther.process_ms_avg);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_executed()).compareTo(typedOther.is_set_executed());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_executed()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.executed, typedOther.executed);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_execute_ms_avg()).compareTo(typedOther.is_set_execute_ms_avg());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_execute_ms_avg()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.execute_ms_avg, typedOther.execute_ms_avg);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
- org.apache.thrift7.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift7.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // ACKED
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.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.thrift7.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.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // FAILED
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.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.thrift7.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.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // PROCESS_MS_AVG
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.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.thrift7.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.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // EXECUTED
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.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.thrift7.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.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5: // EXECUTE_MS_AVG
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.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.thrift7.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.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
- }
-
- public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.acked != null) {
- oprot.writeFieldBegin(ACKED_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRUCT, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRUCT, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRUCT, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRUCT, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.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.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRUCT, org.apache.thrift7.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();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("BoltStats(");
- boolean first = true;
-
- sb.append("acked:");
- if (this.acked == null) {
- sb.append("null");
- } else {
- sb.append(this.acked);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failed:");
- if (this.failed == null) {
- sb.append("null");
- } else {
- sb.append(this.failed);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("process_ms_avg:");
- if (this.process_ms_avg == null) {
- sb.append("null");
- } else {
- sb.append(this.process_ms_avg);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("executed:");
- if (this.executed == null) {
- sb.append("null");
- } else {
- sb.append(this.executed);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("execute_ms_avg:");
- if (this.execute_ms_avg == null) {
- sb.append("null");
- } else {
- sb.append(this.execute_ms_avg);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_acked()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'acked' is unset! Struct:" + toString());
- }
-
- if (!is_set_failed()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'failed' is unset! Struct:" + toString());
- }
-
- if (!is_set_process_ms_avg()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'process_ms_avg' is unset! Struct:" + toString());
- }
-
- if (!is_set_executed()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'executed' is unset! Struct:" + toString());
- }
-
- if (!is_set_execute_ms_avg()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'execute_ms_avg' is unset! Struct:" + toString());
- }
-
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift7.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift7.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/storm/blob/e935da91/jstorm-client/src/main/java/backtype/storm/generated/ClusterSummary.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/ClusterSummary.java b/jstorm-client/src/main/java/backtype/storm/generated/ClusterSummary.java
deleted file mode 100644
index 9e42140..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/ClusterSummary.java
+++ /dev/null
@@ -1,693 +0,0 @@
-/**
- * Autogenerated by Thrift Compiler (0.7.0)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
-package backtype.storm.generated;
-
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ClusterSummary implements org.apache.thrift7.TBase<ClusterSummary, ClusterSummary._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("ClusterSummary");
-
- private static final org.apache.thrift7.protocol.TField SUPERVISORS_FIELD_DESC = new org.apache.thrift7.protocol.TField("supervisors", org.apache.thrift7.protocol.TType.LIST, (short)1);
- private static final org.apache.thrift7.protocol.TField NIMBUS_UPTIME_SECS_FIELD_DESC = new org.apache.thrift7.protocol.TField("nimbus_uptime_secs", org.apache.thrift7.protocol.TType.I32, (short)2);
- private static final org.apache.thrift7.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.thrift7.protocol.TField("topologies", org.apache.thrift7.protocol.TType.LIST, (short)3);
- private static final org.apache.thrift7.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift7.protocol.TField("version", org.apache.thrift7.protocol.TType.STRING, (short)4);
-
- private List<SupervisorSummary> supervisors; // required
- private int nimbus_uptime_secs; // required
- private List<TopologySummary> topologies; // required
- private String version; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- SUPERVISORS((short)1, "supervisors"),
- NIMBUS_UPTIME_SECS((short)2, "nimbus_uptime_secs"),
- TOPOLOGIES((short)3, "topologies"),
- VERSION((short)4, "version");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SUPERVISORS
- return SUPERVISORS;
- case 2: // NIMBUS_UPTIME_SECS
- return NIMBUS_UPTIME_SECS;
- case 3: // TOPOLOGIES
- return TOPOLOGIES;
- case 4: // VERSION
- return VERSION;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __NIMBUS_UPTIME_SECS_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
-
- public static final Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift7.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift7.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUPERVISORS, new org.apache.thrift7.meta_data.FieldMetaData("supervisors", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, SupervisorSummary.class))));
- tmpMap.put(_Fields.NIMBUS_UPTIME_SECS, new org.apache.thrift7.meta_data.FieldMetaData("nimbus_uptime_secs", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
- tmpMap.put(_Fields.TOPOLOGIES, new org.apache.thrift7.meta_data.FieldMetaData("topologies", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, TopologySummary.class))));
- tmpMap.put(_Fields.VERSION, new org.apache.thrift7.meta_data.FieldMetaData("version", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(ClusterSummary.class, metaDataMap);
- }
-
- public ClusterSummary() {
- }
-
- public ClusterSummary(
- List<SupervisorSummary> supervisors,
- int nimbus_uptime_secs,
- List<TopologySummary> topologies)
- {
- this();
- this.supervisors = supervisors;
- this.nimbus_uptime_secs = nimbus_uptime_secs;
- set_nimbus_uptime_secs_isSet(true);
- this.topologies = topologies;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ClusterSummary(ClusterSummary other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
- if (other.is_set_supervisors()) {
- List<SupervisorSummary> __this__supervisors = new ArrayList<SupervisorSummary>();
- for (SupervisorSummary other_element : other.supervisors) {
- __this__supervisors.add(new SupervisorSummary(other_element));
- }
- this.supervisors = __this__supervisors;
- }
- this.nimbus_uptime_secs = other.nimbus_uptime_secs;
- if (other.is_set_topologies()) {
- List<TopologySummary> __this__topologies = new ArrayList<TopologySummary>();
- for (TopologySummary other_element : other.topologies) {
- __this__topologies.add(new TopologySummary(other_element));
- }
- this.topologies = __this__topologies;
- }
- if (other.is_set_version()) {
- this.version = other.version;
- }
- }
-
- public ClusterSummary deepCopy() {
- return new ClusterSummary(this);
- }
-
- @Override
- public void clear() {
- this.supervisors = null;
- set_nimbus_uptime_secs_isSet(false);
- this.nimbus_uptime_secs = 0;
- this.topologies = null;
- this.version = null;
- }
-
- public int get_supervisors_size() {
- return (this.supervisors == null) ? 0 : this.supervisors.size();
- }
-
- public java.util.Iterator<SupervisorSummary> get_supervisors_iterator() {
- return (this.supervisors == null) ? null : this.supervisors.iterator();
- }
-
- public void add_to_supervisors(SupervisorSummary elem) {
- if (this.supervisors == null) {
- this.supervisors = new ArrayList<SupervisorSummary>();
- }
- this.supervisors.add(elem);
- }
-
- public List<SupervisorSummary> get_supervisors() {
- return this.supervisors;
- }
-
- public void set_supervisors(List<SupervisorSummary> supervisors) {
- this.supervisors = supervisors;
- }
-
- public void unset_supervisors() {
- this.supervisors = null;
- }
-
- /** Returns true if field supervisors is set (has been assigned a value) and false otherwise */
- public boolean is_set_supervisors() {
- return this.supervisors != null;
- }
-
- public void set_supervisors_isSet(boolean value) {
- if (!value) {
- this.supervisors = null;
- }
- }
-
- public int get_nimbus_uptime_secs() {
- return this.nimbus_uptime_secs;
- }
-
- public void set_nimbus_uptime_secs(int nimbus_uptime_secs) {
- this.nimbus_uptime_secs = nimbus_uptime_secs;
- set_nimbus_uptime_secs_isSet(true);
- }
-
- public void unset_nimbus_uptime_secs() {
- __isset_bit_vector.clear(__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);
- }
-
- public void set_nimbus_uptime_secs_isSet(boolean value) {
- __isset_bit_vector.set(__NIMBUS_UPTIME_SECS_ISSET_ID, value);
- }
-
- public int get_topologies_size() {
- return (this.topologies == null) ? 0 : this.topologies.size();
- }
-
- public java.util.Iterator<TopologySummary> get_topologies_iterator() {
- return (this.topologies == null) ? null : this.topologies.iterator();
- }
-
- public void add_to_topologies(TopologySummary elem) {
- if (this.topologies == null) {
- this.topologies = new ArrayList<TopologySummary>();
- }
- this.topologies.add(elem);
- }
-
- public List<TopologySummary> get_topologies() {
- return this.topologies;
- }
-
- public void set_topologies(List<TopologySummary> topologies) {
- this.topologies = topologies;
- }
-
- public void unset_topologies() {
- this.topologies = null;
- }
-
- /** Returns true if field topologies is set (has been assigned a value) and false otherwise */
- public boolean is_set_topologies() {
- return this.topologies != null;
- }
-
- public void set_topologies_isSet(boolean value) {
- if (!value) {
- this.topologies = null;
- }
- }
-
- public String get_version() {
- return this.version;
- }
-
- public void set_version(String version) {
- this.version = version;
- }
-
- public void unset_version() {
- this.version = null;
- }
-
- /** Returns true if field version is set (has been assigned a value) and false otherwise */
- public boolean is_set_version() {
- return this.version != null;
- }
-
- public void set_version_isSet(boolean value) {
- if (!value) {
- this.version = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUPERVISORS:
- if (value == null) {
- unset_supervisors();
- } else {
- set_supervisors((List<SupervisorSummary>)value);
- }
- break;
-
- case NIMBUS_UPTIME_SECS:
- if (value == null) {
- unset_nimbus_uptime_secs();
- } else {
- set_nimbus_uptime_secs((Integer)value);
- }
- break;
-
- case TOPOLOGIES:
- if (value == null) {
- unset_topologies();
- } else {
- set_topologies((List<TopologySummary>)value);
- }
- break;
-
- case VERSION:
- if (value == null) {
- unset_version();
- } else {
- set_version((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUPERVISORS:
- return get_supervisors();
-
- case NIMBUS_UPTIME_SECS:
- return Integer.valueOf(get_nimbus_uptime_secs());
-
- case TOPOLOGIES:
- return get_topologies();
-
- case VERSION:
- return get_version();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUPERVISORS:
- return is_set_supervisors();
- case NIMBUS_UPTIME_SECS:
- return is_set_nimbus_uptime_secs();
- case TOPOLOGIES:
- return is_set_topologies();
- case VERSION:
- return is_set_version();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ClusterSummary)
- return this.equals((ClusterSummary)that);
- return false;
- }
-
- public boolean equals(ClusterSummary that) {
- if (that == null)
- return false;
-
- boolean this_present_supervisors = true && this.is_set_supervisors();
- boolean that_present_supervisors = true && that.is_set_supervisors();
- if (this_present_supervisors || that_present_supervisors) {
- if (!(this_present_supervisors && that_present_supervisors))
- return false;
- if (!this.supervisors.equals(that.supervisors))
- return false;
- }
-
- boolean this_present_nimbus_uptime_secs = true;
- boolean that_present_nimbus_uptime_secs = true;
- if (this_present_nimbus_uptime_secs || that_present_nimbus_uptime_secs) {
- if (!(this_present_nimbus_uptime_secs && that_present_nimbus_uptime_secs))
- return false;
- if (this.nimbus_uptime_secs != that.nimbus_uptime_secs)
- return false;
- }
-
- boolean this_present_topologies = true && this.is_set_topologies();
- boolean that_present_topologies = true && that.is_set_topologies();
- if (this_present_topologies || that_present_topologies) {
- if (!(this_present_topologies && that_present_topologies))
- return false;
- if (!this.topologies.equals(that.topologies))
- return false;
- }
-
- boolean this_present_version = true && this.is_set_version();
- boolean that_present_version = true && that.is_set_version();
- if (this_present_version || that_present_version) {
- if (!(this_present_version && that_present_version))
- return false;
- if (!this.version.equals(that.version))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_supervisors = true && (is_set_supervisors());
- builder.append(present_supervisors);
- if (present_supervisors)
- builder.append(supervisors);
-
- boolean present_nimbus_uptime_secs = true;
- builder.append(present_nimbus_uptime_secs);
- if (present_nimbus_uptime_secs)
- builder.append(nimbus_uptime_secs);
-
- boolean present_topologies = true && (is_set_topologies());
- builder.append(present_topologies);
- if (present_topologies)
- builder.append(topologies);
-
- boolean present_version = true && (is_set_version());
- builder.append(present_version);
- if (present_version)
- builder.append(version);
-
- return builder.toHashCode();
- }
-
- 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());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_supervisors()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.supervisors, typedOther.supervisors);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_nimbus_uptime_secs()).compareTo(typedOther.is_set_nimbus_uptime_secs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_nimbus_uptime_secs()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.nimbus_uptime_secs, typedOther.nimbus_uptime_secs);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_topologies()).compareTo(typedOther.is_set_topologies());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_topologies()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.topologies, typedOther.topologies);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_version()).compareTo(typedOther.is_set_version());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_version()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.version, typedOther.version);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift7.protocol.TProtocol iprot) throws org.apache.thrift7.TException {
- org.apache.thrift7.protocol.TField field;
- iprot.readStructBegin();
- while (true)
- {
- field = iprot.readFieldBegin();
- if (field.type == org.apache.thrift7.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // SUPERVISORS
- if (field.type == org.apache.thrift7.protocol.TType.LIST) {
- {
- org.apache.thrift7.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.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // NIMBUS_UPTIME_SECS
- if (field.type == org.apache.thrift7.protocol.TType.I32) {
- this.nimbus_uptime_secs = iprot.readI32();
- set_nimbus_uptime_secs_isSet(true);
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // TOPOLOGIES
- if (field.type == org.apache.thrift7.protocol.TType.LIST) {
- {
- org.apache.thrift7.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.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // VERSION
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.version = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
- }
-
- public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.supervisors != null) {
- oprot.writeFieldBegin(SUPERVISORS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.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.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRUCT, this.topologies.size()));
- for (TopologySummary _iter44 : this.topologies)
- {
- _iter44.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.version != null) {
- if (is_set_version()) {
- oprot.writeFieldBegin(VERSION_FIELD_DESC);
- oprot.writeString(this.version);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ClusterSummary(");
- boolean first = true;
-
- sb.append("supervisors:");
- if (this.supervisors == null) {
- sb.append("null");
- } else {
- sb.append(this.supervisors);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("nimbus_uptime_secs:");
- sb.append(this.nimbus_uptime_secs);
- first = false;
- if (!first) sb.append(", ");
- sb.append("topologies:");
- if (this.topologies == null) {
- sb.append("null");
- } else {
- sb.append(this.topologies);
- }
- first = false;
- if (is_set_version()) {
- if (!first) sb.append(", ");
- sb.append("version:");
- if (this.version == null) {
- sb.append("null");
- } else {
- sb.append(this.version);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_supervisors()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'supervisors' is unset! Struct:" + toString());
- }
-
- if (!is_set_nimbus_uptime_secs()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'nimbus_uptime_secs' is unset! Struct:" + toString());
- }
-
- if (!is_set_topologies()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'topologies' is unset! Struct:" + toString());
- }
-
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift7.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- 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);
- read(new org.apache.thrift7.protocol.TCompactProtocol(new org.apache.thrift7.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift7.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
-}
-