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:13 UTC
[34/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/StateSpoutSpec.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/StateSpoutSpec.java b/jstorm-client/src/main/java/backtype/storm/generated/StateSpoutSpec.java
deleted file mode 100644
index 4d1baf3..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/StateSpoutSpec.java
+++ /dev/null
@@ -1,427 +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 StateSpoutSpec implements org.apache.thrift7.TBase<StateSpoutSpec, StateSpoutSpec._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("StateSpoutSpec");
-
- private static final org.apache.thrift7.protocol.TField STATE_SPOUT_OBJECT_FIELD_DESC = new org.apache.thrift7.protocol.TField("state_spout_object", org.apache.thrift7.protocol.TType.STRUCT, (short)1);
- private static final org.apache.thrift7.protocol.TField COMMON_FIELD_DESC = new org.apache.thrift7.protocol.TField("common", org.apache.thrift7.protocol.TType.STRUCT, (short)2);
-
- private ComponentObject state_spout_object; // required
- private ComponentCommon common; // 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 {
- STATE_SPOUT_OBJECT((short)1, "state_spout_object"),
- COMMON((short)2, "common");
-
- 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: // STATE_SPOUT_OBJECT
- return STATE_SPOUT_OBJECT;
- case 2: // COMMON
- return COMMON;
- 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.STATE_SPOUT_OBJECT, new org.apache.thrift7.meta_data.FieldMetaData("state_spout_object", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, ComponentObject.class)));
- tmpMap.put(_Fields.COMMON, new org.apache.thrift7.meta_data.FieldMetaData("common", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, ComponentCommon.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(StateSpoutSpec.class, metaDataMap);
- }
-
- public StateSpoutSpec() {
- }
-
- public StateSpoutSpec(
- ComponentObject state_spout_object,
- ComponentCommon common)
- {
- this();
- this.state_spout_object = state_spout_object;
- this.common = common;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public StateSpoutSpec(StateSpoutSpec other) {
- if (other.is_set_state_spout_object()) {
- this.state_spout_object = new ComponentObject(other.state_spout_object);
- }
- if (other.is_set_common()) {
- this.common = new ComponentCommon(other.common);
- }
- }
-
- public StateSpoutSpec deepCopy() {
- return new StateSpoutSpec(this);
- }
-
- @Override
- public void clear() {
- this.state_spout_object = null;
- this.common = null;
- }
-
- public ComponentObject get_state_spout_object() {
- return this.state_spout_object;
- }
-
- public void set_state_spout_object(ComponentObject state_spout_object) {
- this.state_spout_object = state_spout_object;
- }
-
- public void unset_state_spout_object() {
- this.state_spout_object = null;
- }
-
- /** Returns true if field state_spout_object is set (has been assigned a value) and false otherwise */
- public boolean is_set_state_spout_object() {
- return this.state_spout_object != null;
- }
-
- public void set_state_spout_object_isSet(boolean value) {
- if (!value) {
- this.state_spout_object = null;
- }
- }
-
- public ComponentCommon get_common() {
- return this.common;
- }
-
- public void set_common(ComponentCommon common) {
- this.common = common;
- }
-
- public void unset_common() {
- this.common = null;
- }
-
- /** Returns true if field common is set (has been assigned a value) and false otherwise */
- public boolean is_set_common() {
- return this.common != null;
- }
-
- public void set_common_isSet(boolean value) {
- if (!value) {
- this.common = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case STATE_SPOUT_OBJECT:
- if (value == null) {
- unset_state_spout_object();
- } else {
- set_state_spout_object((ComponentObject)value);
- }
- break;
-
- case COMMON:
- if (value == null) {
- unset_common();
- } else {
- set_common((ComponentCommon)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case STATE_SPOUT_OBJECT:
- return get_state_spout_object();
-
- case COMMON:
- return get_common();
-
- }
- 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 STATE_SPOUT_OBJECT:
- return is_set_state_spout_object();
- case COMMON:
- return is_set_common();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof StateSpoutSpec)
- return this.equals((StateSpoutSpec)that);
- return false;
- }
-
- public boolean equals(StateSpoutSpec that) {
- if (that == null)
- return false;
-
- boolean this_present_state_spout_object = true && this.is_set_state_spout_object();
- boolean that_present_state_spout_object = true && that.is_set_state_spout_object();
- if (this_present_state_spout_object || that_present_state_spout_object) {
- if (!(this_present_state_spout_object && that_present_state_spout_object))
- return false;
- if (!this.state_spout_object.equals(that.state_spout_object))
- return false;
- }
-
- boolean this_present_common = true && this.is_set_common();
- boolean that_present_common = true && that.is_set_common();
- if (this_present_common || that_present_common) {
- if (!(this_present_common && that_present_common))
- return false;
- if (!this.common.equals(that.common))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_state_spout_object = true && (is_set_state_spout_object());
- builder.append(present_state_spout_object);
- if (present_state_spout_object)
- builder.append(state_spout_object);
-
- boolean present_common = true && (is_set_common());
- builder.append(present_common);
- if (present_common)
- builder.append(common);
-
- return builder.toHashCode();
- }
-
- public int compareTo(StateSpoutSpec other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- StateSpoutSpec typedOther = (StateSpoutSpec)other;
-
- lastComparison = Boolean.valueOf(is_set_state_spout_object()).compareTo(typedOther.is_set_state_spout_object());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_state_spout_object()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.state_spout_object, typedOther.state_spout_object);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_common()).compareTo(typedOther.is_set_common());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_common()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.common, typedOther.common);
- 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: // STATE_SPOUT_OBJECT
- if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
- this.state_spout_object = new ComponentObject();
- this.state_spout_object.read(iprot);
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // COMMON
- if (field.type == org.apache.thrift7.protocol.TType.STRUCT) {
- this.common = new ComponentCommon();
- this.common.read(iprot);
- } 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.state_spout_object != null) {
- oprot.writeFieldBegin(STATE_SPOUT_OBJECT_FIELD_DESC);
- this.state_spout_object.write(oprot);
- oprot.writeFieldEnd();
- }
- if (this.common != null) {
- oprot.writeFieldBegin(COMMON_FIELD_DESC);
- this.common.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("StateSpoutSpec(");
- boolean first = true;
-
- sb.append("state_spout_object:");
- if (this.state_spout_object == null) {
- sb.append("null");
- } else {
- sb.append(this.state_spout_object);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("common:");
- if (this.common == null) {
- sb.append("null");
- } else {
- sb.append(this.common);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_state_spout_object()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'state_spout_object' is unset! Struct:" + toString());
- }
-
- if (!is_set_common()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'common' 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/StormTopology.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/StormTopology.java b/jstorm-client/src/main/java/backtype/storm/generated/StormTopology.java
deleted file mode 100644
index bfe2984..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/StormTopology.java
+++ /dev/null
@@ -1,660 +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 StormTopology implements org.apache.thrift7.TBase<StormTopology, StormTopology._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("StormTopology");
-
- private static final org.apache.thrift7.protocol.TField SPOUTS_FIELD_DESC = new org.apache.thrift7.protocol.TField("spouts", org.apache.thrift7.protocol.TType.MAP, (short)1);
- private static final org.apache.thrift7.protocol.TField BOLTS_FIELD_DESC = new org.apache.thrift7.protocol.TField("bolts", org.apache.thrift7.protocol.TType.MAP, (short)2);
- private static final org.apache.thrift7.protocol.TField STATE_SPOUTS_FIELD_DESC = new org.apache.thrift7.protocol.TField("state_spouts", org.apache.thrift7.protocol.TType.MAP, (short)3);
-
- private Map<String,SpoutSpec> spouts; // required
- private Map<String,Bolt> bolts; // required
- private Map<String,StateSpoutSpec> state_spouts; // 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 {
- SPOUTS((short)1, "spouts"),
- BOLTS((short)2, "bolts"),
- STATE_SPOUTS((short)3, "state_spouts");
-
- 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: // SPOUTS
- return SPOUTS;
- case 2: // BOLTS
- return BOLTS;
- case 3: // STATE_SPOUTS
- return STATE_SPOUTS;
- 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.SPOUTS, new org.apache.thrift7.meta_data.FieldMetaData("spouts", 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.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, SpoutSpec.class))));
- tmpMap.put(_Fields.BOLTS, new org.apache.thrift7.meta_data.FieldMetaData("bolts", 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.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, Bolt.class))));
- tmpMap.put(_Fields.STATE_SPOUTS, new org.apache.thrift7.meta_data.FieldMetaData("state_spouts", 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.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, StateSpoutSpec.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(StormTopology.class, metaDataMap);
- }
-
- public StormTopology() {
- }
-
- public StormTopology(
- Map<String,SpoutSpec> spouts,
- Map<String,Bolt> bolts,
- Map<String,StateSpoutSpec> state_spouts)
- {
- this();
- this.spouts = spouts;
- this.bolts = bolts;
- this.state_spouts = state_spouts;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public StormTopology(StormTopology other) {
- if (other.is_set_spouts()) {
- Map<String,SpoutSpec> __this__spouts = new HashMap<String,SpoutSpec>();
- for (Map.Entry<String, SpoutSpec> other_element : other.spouts.entrySet()) {
-
- String other_element_key = other_element.getKey();
- SpoutSpec other_element_value = other_element.getValue();
-
- String __this__spouts_copy_key = other_element_key;
-
- SpoutSpec __this__spouts_copy_value = new SpoutSpec(other_element_value);
-
- __this__spouts.put(__this__spouts_copy_key, __this__spouts_copy_value);
- }
- this.spouts = __this__spouts;
- }
- if (other.is_set_bolts()) {
- Map<String,Bolt> __this__bolts = new HashMap<String,Bolt>();
- for (Map.Entry<String, Bolt> other_element : other.bolts.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Bolt other_element_value = other_element.getValue();
-
- String __this__bolts_copy_key = other_element_key;
-
- Bolt __this__bolts_copy_value = new Bolt(other_element_value);
-
- __this__bolts.put(__this__bolts_copy_key, __this__bolts_copy_value);
- }
- this.bolts = __this__bolts;
- }
- if (other.is_set_state_spouts()) {
- Map<String,StateSpoutSpec> __this__state_spouts = new HashMap<String,StateSpoutSpec>();
- for (Map.Entry<String, StateSpoutSpec> other_element : other.state_spouts.entrySet()) {
-
- String other_element_key = other_element.getKey();
- StateSpoutSpec other_element_value = other_element.getValue();
-
- String __this__state_spouts_copy_key = other_element_key;
-
- StateSpoutSpec __this__state_spouts_copy_value = new StateSpoutSpec(other_element_value);
-
- __this__state_spouts.put(__this__state_spouts_copy_key, __this__state_spouts_copy_value);
- }
- this.state_spouts = __this__state_spouts;
- }
- }
-
- public StormTopology deepCopy() {
- return new StormTopology(this);
- }
-
- @Override
- public void clear() {
- this.spouts = null;
- this.bolts = null;
- this.state_spouts = null;
- }
-
- public int get_spouts_size() {
- return (this.spouts == null) ? 0 : this.spouts.size();
- }
-
- public void put_to_spouts(String key, SpoutSpec val) {
- if (this.spouts == null) {
- this.spouts = new HashMap<String,SpoutSpec>();
- }
- this.spouts.put(key, val);
- }
-
- public Map<String,SpoutSpec> get_spouts() {
- return this.spouts;
- }
-
- public void set_spouts(Map<String,SpoutSpec> spouts) {
- this.spouts = spouts;
- }
-
- public void unset_spouts() {
- this.spouts = null;
- }
-
- /** Returns true if field spouts is set (has been assigned a value) and false otherwise */
- public boolean is_set_spouts() {
- return this.spouts != null;
- }
-
- public void set_spouts_isSet(boolean value) {
- if (!value) {
- this.spouts = null;
- }
- }
-
- public int get_bolts_size() {
- return (this.bolts == null) ? 0 : this.bolts.size();
- }
-
- public void put_to_bolts(String key, Bolt val) {
- if (this.bolts == null) {
- this.bolts = new HashMap<String,Bolt>();
- }
- this.bolts.put(key, val);
- }
-
- public Map<String,Bolt> get_bolts() {
- return this.bolts;
- }
-
- public void set_bolts(Map<String,Bolt> bolts) {
- this.bolts = bolts;
- }
-
- public void unset_bolts() {
- this.bolts = null;
- }
-
- /** Returns true if field bolts is set (has been assigned a value) and false otherwise */
- public boolean is_set_bolts() {
- return this.bolts != null;
- }
-
- public void set_bolts_isSet(boolean value) {
- if (!value) {
- this.bolts = null;
- }
- }
-
- public int get_state_spouts_size() {
- return (this.state_spouts == null) ? 0 : this.state_spouts.size();
- }
-
- public void put_to_state_spouts(String key, StateSpoutSpec val) {
- if (this.state_spouts == null) {
- this.state_spouts = new HashMap<String,StateSpoutSpec>();
- }
- this.state_spouts.put(key, val);
- }
-
- public Map<String,StateSpoutSpec> get_state_spouts() {
- return this.state_spouts;
- }
-
- public void set_state_spouts(Map<String,StateSpoutSpec> state_spouts) {
- this.state_spouts = state_spouts;
- }
-
- public void unset_state_spouts() {
- this.state_spouts = null;
- }
-
- /** Returns true if field state_spouts is set (has been assigned a value) and false otherwise */
- public boolean is_set_state_spouts() {
- return this.state_spouts != null;
- }
-
- public void set_state_spouts_isSet(boolean value) {
- if (!value) {
- this.state_spouts = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SPOUTS:
- if (value == null) {
- unset_spouts();
- } else {
- set_spouts((Map<String,SpoutSpec>)value);
- }
- break;
-
- case BOLTS:
- if (value == null) {
- unset_bolts();
- } else {
- set_bolts((Map<String,Bolt>)value);
- }
- break;
-
- case STATE_SPOUTS:
- if (value == null) {
- unset_state_spouts();
- } else {
- set_state_spouts((Map<String,StateSpoutSpec>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SPOUTS:
- return get_spouts();
-
- case BOLTS:
- return get_bolts();
-
- case STATE_SPOUTS:
- return get_state_spouts();
-
- }
- 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 SPOUTS:
- return is_set_spouts();
- case BOLTS:
- return is_set_bolts();
- case STATE_SPOUTS:
- return is_set_state_spouts();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof StormTopology)
- return this.equals((StormTopology)that);
- return false;
- }
-
- public boolean equals(StormTopology that) {
- if (that == null)
- return false;
-
- boolean this_present_spouts = true && this.is_set_spouts();
- boolean that_present_spouts = true && that.is_set_spouts();
- if (this_present_spouts || that_present_spouts) {
- if (!(this_present_spouts && that_present_spouts))
- return false;
- if (!this.spouts.equals(that.spouts))
- return false;
- }
-
- boolean this_present_bolts = true && this.is_set_bolts();
- boolean that_present_bolts = true && that.is_set_bolts();
- if (this_present_bolts || that_present_bolts) {
- if (!(this_present_bolts && that_present_bolts))
- return false;
- if (!this.bolts.equals(that.bolts))
- return false;
- }
-
- boolean this_present_state_spouts = true && this.is_set_state_spouts();
- boolean that_present_state_spouts = true && that.is_set_state_spouts();
- if (this_present_state_spouts || that_present_state_spouts) {
- if (!(this_present_state_spouts && that_present_state_spouts))
- return false;
- if (!this.state_spouts.equals(that.state_spouts))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_spouts = true && (is_set_spouts());
- builder.append(present_spouts);
- if (present_spouts)
- builder.append(spouts);
-
- boolean present_bolts = true && (is_set_bolts());
- builder.append(present_bolts);
- if (present_bolts)
- builder.append(bolts);
-
- boolean present_state_spouts = true && (is_set_state_spouts());
- builder.append(present_state_spouts);
- if (present_state_spouts)
- builder.append(state_spouts);
-
- return builder.toHashCode();
- }
-
- public int compareTo(StormTopology other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- StormTopology typedOther = (StormTopology)other;
-
- lastComparison = Boolean.valueOf(is_set_spouts()).compareTo(typedOther.is_set_spouts());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_spouts()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.spouts, typedOther.spouts);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_bolts()).compareTo(typedOther.is_set_bolts());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_bolts()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.bolts, typedOther.bolts);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_state_spouts()).compareTo(typedOther.is_set_state_spouts());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_state_spouts()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.state_spouts, typedOther.state_spouts);
- 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: // SPOUTS
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.protocol.TMap _map22 = iprot.readMapBegin();
- this.spouts = new HashMap<String,SpoutSpec>(2*_map22.size);
- for (int _i23 = 0; _i23 < _map22.size; ++_i23)
- {
- String _key24; // required
- SpoutSpec _val25; // required
- _key24 = iprot.readString();
- _val25 = new SpoutSpec();
- _val25.read(iprot);
- this.spouts.put(_key24, _val25);
- }
- iprot.readMapEnd();
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // BOLTS
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.protocol.TMap _map26 = iprot.readMapBegin();
- this.bolts = new HashMap<String,Bolt>(2*_map26.size);
- for (int _i27 = 0; _i27 < _map26.size; ++_i27)
- {
- String _key28; // required
- Bolt _val29; // required
- _key28 = iprot.readString();
- _val29 = new Bolt();
- _val29.read(iprot);
- this.bolts.put(_key28, _val29);
- }
- iprot.readMapEnd();
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // STATE_SPOUTS
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.protocol.TMap _map30 = iprot.readMapBegin();
- this.state_spouts = new HashMap<String,StateSpoutSpec>(2*_map30.size);
- for (int _i31 = 0; _i31 < _map30.size; ++_i31)
- {
- String _key32; // required
- StateSpoutSpec _val33; // required
- _key32 = iprot.readString();
- _val33 = new StateSpoutSpec();
- _val33.read(iprot);
- this.state_spouts.put(_key32, _val33);
- }
- 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.spouts != null) {
- oprot.writeFieldBegin(SPOUTS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.STRUCT, this.spouts.size()));
- for (Map.Entry<String, SpoutSpec> _iter34 : this.spouts.entrySet())
- {
- oprot.writeString(_iter34.getKey());
- _iter34.getValue().write(oprot);
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.bolts != null) {
- oprot.writeFieldBegin(BOLTS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.STRUCT, this.bolts.size()));
- for (Map.Entry<String, Bolt> _iter35 : this.bolts.entrySet())
- {
- oprot.writeString(_iter35.getKey());
- _iter35.getValue().write(oprot);
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.state_spouts != null) {
- oprot.writeFieldBegin(STATE_SPOUTS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.STRUCT, this.state_spouts.size()));
- for (Map.Entry<String, StateSpoutSpec> _iter36 : this.state_spouts.entrySet())
- {
- oprot.writeString(_iter36.getKey());
- _iter36.getValue().write(oprot);
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("StormTopology(");
- boolean first = true;
-
- sb.append("spouts:");
- if (this.spouts == null) {
- sb.append("null");
- } else {
- sb.append(this.spouts);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("bolts:");
- if (this.bolts == null) {
- sb.append("null");
- } else {
- sb.append(this.bolts);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("state_spouts:");
- if (this.state_spouts == null) {
- sb.append("null");
- } else {
- sb.append(this.state_spouts);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_spouts()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'spouts' is unset! Struct:" + toString());
- }
-
- if (!is_set_bolts()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'bolts' is unset! Struct:" + toString());
- }
-
- if (!is_set_state_spouts()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'state_spouts' 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/StreamInfo.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/StreamInfo.java b/jstorm-client/src/main/java/backtype/storm/generated/StreamInfo.java
deleted file mode 100644
index 83a23df..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/StreamInfo.java
+++ /dev/null
@@ -1,462 +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 StreamInfo implements org.apache.thrift7.TBase<StreamInfo, StreamInfo._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("StreamInfo");
-
- private static final org.apache.thrift7.protocol.TField OUTPUT_FIELDS_FIELD_DESC = new org.apache.thrift7.protocol.TField("output_fields", org.apache.thrift7.protocol.TType.LIST, (short)1);
- private static final org.apache.thrift7.protocol.TField DIRECT_FIELD_DESC = new org.apache.thrift7.protocol.TField("direct", org.apache.thrift7.protocol.TType.BOOL, (short)2);
-
- private List<String> output_fields; // required
- private boolean direct; // 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 {
- OUTPUT_FIELDS((short)1, "output_fields"),
- DIRECT((short)2, "direct");
-
- 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: // OUTPUT_FIELDS
- return OUTPUT_FIELDS;
- case 2: // DIRECT
- return DIRECT;
- 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 __DIRECT_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.OUTPUT_FIELDS, new org.apache.thrift7.meta_data.FieldMetaData("output_fields", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING))));
- tmpMap.put(_Fields.DIRECT, new org.apache.thrift7.meta_data.FieldMetaData("direct", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(StreamInfo.class, metaDataMap);
- }
-
- public StreamInfo() {
- }
-
- public StreamInfo(
- List<String> output_fields,
- boolean direct)
- {
- this();
- this.output_fields = output_fields;
- this.direct = direct;
- set_direct_isSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public StreamInfo(StreamInfo other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
- if (other.is_set_output_fields()) {
- List<String> __this__output_fields = new ArrayList<String>();
- for (String other_element : other.output_fields) {
- __this__output_fields.add(other_element);
- }
- this.output_fields = __this__output_fields;
- }
- this.direct = other.direct;
- }
-
- public StreamInfo deepCopy() {
- return new StreamInfo(this);
- }
-
- @Override
- public void clear() {
- this.output_fields = null;
- set_direct_isSet(false);
- this.direct = false;
- }
-
- public int get_output_fields_size() {
- return (this.output_fields == null) ? 0 : this.output_fields.size();
- }
-
- public java.util.Iterator<String> get_output_fields_iterator() {
- return (this.output_fields == null) ? null : this.output_fields.iterator();
- }
-
- public void add_to_output_fields(String elem) {
- if (this.output_fields == null) {
- this.output_fields = new ArrayList<String>();
- }
- this.output_fields.add(elem);
- }
-
- public List<String> get_output_fields() {
- return this.output_fields;
- }
-
- public void set_output_fields(List<String> output_fields) {
- this.output_fields = output_fields;
- }
-
- public void unset_output_fields() {
- this.output_fields = null;
- }
-
- /** Returns true if field output_fields is set (has been assigned a value) and false otherwise */
- public boolean is_set_output_fields() {
- return this.output_fields != null;
- }
-
- public void set_output_fields_isSet(boolean value) {
- if (!value) {
- this.output_fields = null;
- }
- }
-
- public boolean is_direct() {
- return this.direct;
- }
-
- public void set_direct(boolean direct) {
- this.direct = direct;
- set_direct_isSet(true);
- }
-
- public void unset_direct() {
- __isset_bit_vector.clear(__DIRECT_ISSET_ID);
- }
-
- /** Returns true if field direct is set (has been assigned a value) and false otherwise */
- public boolean is_set_direct() {
- return __isset_bit_vector.get(__DIRECT_ISSET_ID);
- }
-
- public void set_direct_isSet(boolean value) {
- __isset_bit_vector.set(__DIRECT_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case OUTPUT_FIELDS:
- if (value == null) {
- unset_output_fields();
- } else {
- set_output_fields((List<String>)value);
- }
- break;
-
- case DIRECT:
- if (value == null) {
- unset_direct();
- } else {
- set_direct((Boolean)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case OUTPUT_FIELDS:
- return get_output_fields();
-
- case DIRECT:
- return Boolean.valueOf(is_direct());
-
- }
- 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 OUTPUT_FIELDS:
- return is_set_output_fields();
- case DIRECT:
- return is_set_direct();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof StreamInfo)
- return this.equals((StreamInfo)that);
- return false;
- }
-
- public boolean equals(StreamInfo that) {
- if (that == null)
- return false;
-
- boolean this_present_output_fields = true && this.is_set_output_fields();
- boolean that_present_output_fields = true && that.is_set_output_fields();
- if (this_present_output_fields || that_present_output_fields) {
- if (!(this_present_output_fields && that_present_output_fields))
- return false;
- if (!this.output_fields.equals(that.output_fields))
- return false;
- }
-
- boolean this_present_direct = true;
- boolean that_present_direct = true;
- if (this_present_direct || that_present_direct) {
- if (!(this_present_direct && that_present_direct))
- return false;
- if (this.direct != that.direct)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_output_fields = true && (is_set_output_fields());
- builder.append(present_output_fields);
- if (present_output_fields)
- builder.append(output_fields);
-
- boolean present_direct = true;
- builder.append(present_direct);
- if (present_direct)
- builder.append(direct);
-
- return builder.toHashCode();
- }
-
- public int compareTo(StreamInfo other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- StreamInfo typedOther = (StreamInfo)other;
-
- lastComparison = Boolean.valueOf(is_set_output_fields()).compareTo(typedOther.is_set_output_fields());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_output_fields()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.output_fields, typedOther.output_fields);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_direct()).compareTo(typedOther.is_set_direct());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_direct()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.direct, typedOther.direct);
- 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: // OUTPUT_FIELDS
- if (field.type == org.apache.thrift7.protocol.TType.LIST) {
- {
- org.apache.thrift7.protocol.TList _list8 = iprot.readListBegin();
- this.output_fields = new ArrayList<String>(_list8.size);
- for (int _i9 = 0; _i9 < _list8.size; ++_i9)
- {
- String _elem10; // required
- _elem10 = iprot.readString();
- this.output_fields.add(_elem10);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // DIRECT
- if (field.type == org.apache.thrift7.protocol.TType.BOOL) {
- this.direct = iprot.readBool();
- set_direct_isSet(true);
- } 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.output_fields != null) {
- oprot.writeFieldBegin(OUTPUT_FIELDS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRING, this.output_fields.size()));
- for (String _iter11 : this.output_fields)
- {
- oprot.writeString(_iter11);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(DIRECT_FIELD_DESC);
- oprot.writeBool(this.direct);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("StreamInfo(");
- boolean first = true;
-
- sb.append("output_fields:");
- if (this.output_fields == null) {
- sb.append("null");
- } else {
- sb.append(this.output_fields);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("direct:");
- sb.append(this.direct);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_output_fields()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'output_fields' is unset! Struct:" + toString());
- }
-
- if (!is_set_direct()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'direct' 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);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/storm/blob/e935da91/jstorm-client/src/main/java/backtype/storm/generated/SubmitOptions.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/SubmitOptions.java b/jstorm-client/src/main/java/backtype/storm/generated/SubmitOptions.java
deleted file mode 100644
index 8b4ffc7..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/SubmitOptions.java
+++ /dev/null
@@ -1,340 +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 SubmitOptions implements org.apache.thrift7.TBase<SubmitOptions, SubmitOptions._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("SubmitOptions");
-
- private static final org.apache.thrift7.protocol.TField INITIAL_STATUS_FIELD_DESC = new org.apache.thrift7.protocol.TField("initial_status", org.apache.thrift7.protocol.TType.I32, (short)1);
-
- private TopologyInitialStatus initial_status; // 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 {
- /**
- *
- * @see TopologyInitialStatus
- */
- INITIAL_STATUS((short)1, "initial_status");
-
- 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: // INITIAL_STATUS
- return INITIAL_STATUS;
- 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.INITIAL_STATUS, new org.apache.thrift7.meta_data.FieldMetaData("initial_status", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.EnumMetaData(org.apache.thrift7.protocol.TType.ENUM, TopologyInitialStatus.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(SubmitOptions.class, metaDataMap);
- }
-
- public SubmitOptions() {
- }
-
- public SubmitOptions(
- TopologyInitialStatus initial_status)
- {
- this();
- this.initial_status = initial_status;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public SubmitOptions(SubmitOptions other) {
- if (other.is_set_initial_status()) {
- this.initial_status = other.initial_status;
- }
- }
-
- public SubmitOptions deepCopy() {
- return new SubmitOptions(this);
- }
-
- @Override
- public void clear() {
- this.initial_status = null;
- }
-
- /**
- *
- * @see TopologyInitialStatus
- */
- public TopologyInitialStatus get_initial_status() {
- return this.initial_status;
- }
-
- /**
- *
- * @see TopologyInitialStatus
- */
- public void set_initial_status(TopologyInitialStatus initial_status) {
- this.initial_status = initial_status;
- }
-
- public void unset_initial_status() {
- this.initial_status = null;
- }
-
- /** Returns true if field initial_status is set (has been assigned a value) and false otherwise */
- public boolean is_set_initial_status() {
- return this.initial_status != null;
- }
-
- public void set_initial_status_isSet(boolean value) {
- if (!value) {
- this.initial_status = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case INITIAL_STATUS:
- if (value == null) {
- unset_initial_status();
- } else {
- set_initial_status((TopologyInitialStatus)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case INITIAL_STATUS:
- return get_initial_status();
-
- }
- 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 INITIAL_STATUS:
- return is_set_initial_status();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof SubmitOptions)
- return this.equals((SubmitOptions)that);
- return false;
- }
-
- public boolean equals(SubmitOptions that) {
- if (that == null)
- return false;
-
- boolean this_present_initial_status = true && this.is_set_initial_status();
- boolean that_present_initial_status = true && that.is_set_initial_status();
- if (this_present_initial_status || that_present_initial_status) {
- if (!(this_present_initial_status && that_present_initial_status))
- return false;
- if (!this.initial_status.equals(that.initial_status))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_initial_status = true && (is_set_initial_status());
- builder.append(present_initial_status);
- if (present_initial_status)
- builder.append(initial_status.getValue());
-
- return builder.toHashCode();
- }
-
- public int compareTo(SubmitOptions other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- SubmitOptions typedOther = (SubmitOptions)other;
-
- lastComparison = Boolean.valueOf(is_set_initial_status()).compareTo(typedOther.is_set_initial_status());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_initial_status()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.initial_status, typedOther.initial_status);
- 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: // INITIAL_STATUS
- if (field.type == org.apache.thrift7.protocol.TType.I32) {
- this.initial_status = TopologyInitialStatus.findByValue(iprot.readI32());
- } 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.initial_status != null) {
- oprot.writeFieldBegin(INITIAL_STATUS_FIELD_DESC);
- oprot.writeI32(this.initial_status.getValue());
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SubmitOptions(");
- boolean first = true;
-
- sb.append("initial_status:");
- if (this.initial_status == null) {
- sb.append("null");
- } else {
- sb.append(this.initial_status);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_initial_status()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'initial_status' 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/SupervisorSummary.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/SupervisorSummary.java b/jstorm-client/src/main/java/backtype/storm/generated/SupervisorSummary.java
deleted file mode 100644
index 4f7cb8a..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/SupervisorSummary.java
+++ /dev/null
@@ -1,706 +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 SupervisorSummary implements org.apache.thrift7.TBase<SupervisorSummary, SupervisorSummary._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("SupervisorSummary");
-
- private static final org.apache.thrift7.protocol.TField HOST_FIELD_DESC = new org.apache.thrift7.protocol.TField("host", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift7.protocol.TField SUPERVISOR_ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("supervisor_id", org.apache.thrift7.protocol.TType.STRING, (short)2);
- private static final org.apache.thrift7.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift7.protocol.TField("uptime_secs", org.apache.thrift7.protocol.TType.I32, (short)3);
- private static final org.apache.thrift7.protocol.TField NUM_WORKERS_FIELD_DESC = new org.apache.thrift7.protocol.TField("num_workers", org.apache.thrift7.protocol.TType.I32, (short)4);
- private static final org.apache.thrift7.protocol.TField NUM_USED_WORKERS_FIELD_DESC = new org.apache.thrift7.protocol.TField("num_used_workers", org.apache.thrift7.protocol.TType.I32, (short)5);
-
- private String host; // required
- private String supervisor_id; // required
- private int uptime_secs; // required
- private int num_workers; // required
- private int num_used_workers; // 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 {
- HOST((short)1, "host"),
- SUPERVISOR_ID((short)2, "supervisor_id"),
- UPTIME_SECS((short)3, "uptime_secs"),
- NUM_WORKERS((short)4, "num_workers"),
- NUM_USED_WORKERS((short)5, "num_used_workers");
-
- 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: // HOST
- return HOST;
- case 2: // SUPERVISOR_ID
- return SUPERVISOR_ID;
- case 3: // UPTIME_SECS
- return UPTIME_SECS;
- case 4: // NUM_WORKERS
- return NUM_WORKERS;
- case 5: // NUM_USED_WORKERS
- return NUM_USED_WORKERS;
- 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 __UPTIME_SECS_ISSET_ID = 0;
- private static final int __NUM_WORKERS_ISSET_ID = 1;
- private static final int __NUM_USED_WORKERS_ISSET_ID = 2;
- private BitSet __isset_bit_vector = new BitSet(3);
-
- 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.HOST, new org.apache.thrift7.meta_data.FieldMetaData("host", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- tmpMap.put(_Fields.SUPERVISOR_ID, new org.apache.thrift7.meta_data.FieldMetaData("supervisor_id", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- tmpMap.put(_Fields.UPTIME_SECS, new org.apache.thrift7.meta_data.FieldMetaData("uptime_secs", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
- tmpMap.put(_Fields.NUM_WORKERS, new org.apache.thrift7.meta_data.FieldMetaData("num_workers", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
- tmpMap.put(_Fields.NUM_USED_WORKERS, new org.apache.thrift7.meta_data.FieldMetaData("num_used_workers", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorSummary.class, metaDataMap);
- }
-
- public SupervisorSummary() {
- }
-
- public SupervisorSummary(
- String host,
- String supervisor_id,
- int uptime_secs,
- int num_workers,
- int num_used_workers)
- {
- this();
- this.host = host;
- this.supervisor_id = supervisor_id;
- this.uptime_secs = uptime_secs;
- set_uptime_secs_isSet(true);
- this.num_workers = num_workers;
- set_num_workers_isSet(true);
- this.num_used_workers = num_used_workers;
- set_num_used_workers_isSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public SupervisorSummary(SupervisorSummary other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
- if (other.is_set_host()) {
- this.host = other.host;
- }
- if (other.is_set_supervisor_id()) {
- this.supervisor_id = other.supervisor_id;
- }
- this.uptime_secs = other.uptime_secs;
- this.num_workers = other.num_workers;
- this.num_used_workers = other.num_used_workers;
- }
-
- public SupervisorSummary deepCopy() {
- return new SupervisorSummary(this);
- }
-
- @Override
- public void clear() {
- this.host = null;
- this.supervisor_id = null;
- set_uptime_secs_isSet(false);
- this.uptime_secs = 0;
- set_num_workers_isSet(false);
- this.num_workers = 0;
- set_num_used_workers_isSet(false);
- this.num_used_workers = 0;
- }
-
- public String get_host() {
- return this.host;
- }
-
- public void set_host(String host) {
- this.host = host;
- }
-
- public void unset_host() {
- this.host = null;
- }
-
- /** Returns true if field host is set (has been assigned a value) and false otherwise */
- public boolean is_set_host() {
- return this.host != null;
- }
-
- public void set_host_isSet(boolean value) {
- if (!value) {
- this.host = null;
- }
- }
-
- public String get_supervisor_id() {
- return this.supervisor_id;
- }
-
- public void set_supervisor_id(String supervisor_id) {
- this.supervisor_id = supervisor_id;
- }
-
- public void unset_supervisor_id() {
- this.supervisor_id = null;
- }
-
- /** Returns true if field supervisor_id is set (has been assigned a value) and false otherwise */
- public boolean is_set_supervisor_id() {
- return this.supervisor_id != null;
- }
-
- public void set_supervisor_id_isSet(boolean value) {
- if (!value) {
- this.supervisor_id = null;
- }
- }
-
- public int get_uptime_secs() {
- return this.uptime_secs;
- }
-
- public void set_uptime_secs(int uptime_secs) {
- this.uptime_secs = uptime_secs;
- set_uptime_secs_isSet(true);
- }
-
- public void unset_uptime_secs() {
- __isset_bit_vector.clear(__UPTIME_SECS_ISSET_ID);
- }
-
- /** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
- public boolean is_set_uptime_secs() {
- return __isset_bit_vector.get(__UPTIME_SECS_ISSET_ID);
- }
-
- public void set_uptime_secs_isSet(boolean value) {
- __isset_bit_vector.set(__UPTIME_SECS_ISSET_ID, value);
- }
-
- public int get_num_workers() {
- return this.num_workers;
- }
-
- public void set_num_workers(int num_workers) {
- this.num_workers = num_workers;
- set_num_workers_isSet(true);
- }
-
- public void unset_num_workers() {
- __isset_bit_vector.clear(__NUM_WORKERS_ISSET_ID);
- }
-
- /** Returns true if field num_workers is set (has been assigned a value) and false otherwise */
- public boolean is_set_num_workers() {
- return __isset_bit_vector.get(__NUM_WORKERS_ISSET_ID);
- }
-
- public void set_num_workers_isSet(boolean value) {
- __isset_bit_vector.set(__NUM_WORKERS_ISSET_ID, value);
- }
-
- public int get_num_used_workers() {
- return this.num_used_workers;
- }
-
- public void set_num_used_workers(int num_used_workers) {
- this.num_used_workers = num_used_workers;
- set_num_used_workers_isSet(true);
- }
-
- public void unset_num_used_workers() {
- __isset_bit_vector.clear(__NUM_USED_WORKERS_ISSET_ID);
- }
-
- /** Returns true if field num_used_workers is set (has been assigned a value) and false otherwise */
- public boolean is_set_num_used_workers() {
- return __isset_bit_vector.get(__NUM_USED_WORKERS_ISSET_ID);
- }
-
- public void set_num_used_workers_isSet(boolean value) {
- __isset_bit_vector.set(__NUM_USED_WORKERS_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case HOST:
- if (value == null) {
- unset_host();
- } else {
- set_host((String)value);
- }
- break;
-
- case SUPERVISOR_ID:
- if (value == null) {
- unset_supervisor_id();
- } else {
- set_supervisor_id((String)value);
- }
- break;
-
- case UPTIME_SECS:
- if (value == null) {
- unset_uptime_secs();
- } else {
- set_uptime_secs((Integer)value);
- }
- break;
-
- case NUM_WORKERS:
- if (value == null) {
- unset_num_workers();
- } else {
- set_num_workers((Integer)value);
- }
- break;
-
- case NUM_USED_WORKERS:
- if (value == null) {
- unset_num_used_workers();
- } else {
- set_num_used_workers((Integer)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case HOST:
- return get_host();
-
- case SUPERVISOR_ID:
- return get_supervisor_id();
-
- case UPTIME_SECS:
- return Integer.valueOf(get_uptime_secs());
-
- case NUM_WORKERS:
- return Integer.valueOf(get_num_workers());
-
- case NUM_USED_WORKERS:
- return Integer.valueOf(get_num_used_workers());
-
- }
- 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 HOST:
- return is_set_host();
- case SUPERVISOR_ID:
- return is_set_supervisor_id();
- case UPTIME_SECS:
- return is_set_uptime_secs();
- case NUM_WORKERS:
- return is_set_num_workers();
- case NUM_USED_WORKERS:
- return is_set_num_used_workers();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof SupervisorSummary)
- return this.equals((SupervisorSummary)that);
- return false;
- }
-
- public boolean equals(SupervisorSummary that) {
- if (that == null)
- return false;
-
- boolean this_present_host = true && this.is_set_host();
- boolean that_present_host = true && that.is_set_host();
- if (this_present_host || that_present_host) {
- if (!(this_present_host && that_present_host))
- return false;
- if (!this.host.equals(that.host))
- return false;
- }
-
- boolean this_present_supervisor_id = true && this.is_set_supervisor_id();
- boolean that_present_supervisor_id = true && that.is_set_supervisor_id();
- if (this_present_supervisor_id || that_present_supervisor_id) {
- if (!(this_present_supervisor_id && that_present_supervisor_id))
- return false;
- if (!this.supervisor_id.equals(that.supervisor_id))
- return false;
- }
-
- boolean this_present_uptime_secs = true;
- boolean that_present_uptime_secs = true;
- if (this_present_uptime_secs || that_present_uptime_secs) {
- if (!(this_present_uptime_secs && that_present_uptime_secs))
- return false;
- if (this.uptime_secs != that.uptime_secs)
- return false;
- }
-
- boolean this_present_num_workers = true;
- boolean that_present_num_workers = true;
- if (this_present_num_workers || that_present_num_workers) {
- if (!(this_present_num_workers && that_present_num_workers))
- return false;
- if (this.num_workers != that.num_workers)
- return false;
- }
-
- boolean this_present_num_used_workers = true;
- boolean that_present_num_used_workers = true;
- if (this_present_num_used_workers || that_present_num_used_workers) {
- if (!(this_present_num_used_workers && that_present_num_used_workers))
- return false;
- if (this.num_used_workers != that.num_used_workers)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_host = true && (is_set_host());
- builder.append(present_host);
- if (present_host)
- builder.append(host);
-
- boolean present_supervisor_id = true && (is_set_supervisor_id());
- builder.append(present_supervisor_id);
- if (present_supervisor_id)
- builder.append(supervisor_id);
-
- boolean present_uptime_secs = true;
- builder.append(present_uptime_secs);
- if (present_uptime_secs)
- builder.append(uptime_secs);
-
- boolean present_num_workers = true;
- builder.append(present_num_workers);
- if (present_num_workers)
- builder.append(num_workers);
-
- boolean present_num_used_workers = true;
- builder.append(present_num_used_workers);
- if (present_num_used_workers)
- builder.append(num_used_workers);
-
- return builder.toHashCode();
- }
-
- public int compareTo(SupervisorSummary other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- SupervisorSummary typedOther = (SupervisorSummary)other;
-
- lastComparison = Boolean.valueOf(is_set_host()).compareTo(typedOther.is_set_host());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_host()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.host, typedOther.host);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_supervisor_id()).compareTo(typedOther.is_set_supervisor_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_supervisor_id()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.supervisor_id, typedOther.supervisor_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(typedOther.is_set_uptime_secs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_uptime_secs()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_num_workers()).compareTo(typedOther.is_set_num_workers());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_num_workers()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.num_workers, typedOther.num_workers);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_num_used_workers()).compareTo(typedOther.is_set_num_used_workers());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_num_used_workers()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.num_used_workers, typedOther.num_used_workers);
- 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: // HOST
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.host = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // SUPERVISOR_ID
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.supervisor_id = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // UPTIME_SECS
- if (field.type == org.apache.thrift7.protocol.TType.I32) {
- this.uptime_secs = iprot.readI32();
- set_uptime_secs_isSet(true);
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // NUM_WORKERS
- if (field.type == org.apache.thrift7.protocol.TType.I32) {
- this.num_workers = iprot.readI32();
- set_num_workers_isSet(true);
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5: // NUM_USED_WORKERS
- if (field.type == org.apache.thrift7.protocol.TType.I32) {
- this.num_used_workers = iprot.readI32();
- set_num_used_workers_isSet(true);
- } 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.host != null) {
- oprot.writeFieldBegin(HOST_FIELD_DESC);
- oprot.writeString(this.host);
- oprot.writeFieldEnd();
- }
- if (this.supervisor_id != null) {
- oprot.writeFieldBegin(SUPERVISOR_ID_FIELD_DESC);
- oprot.writeString(this.supervisor_id);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC);
- oprot.writeI32(this.uptime_secs);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NUM_WORKERS_FIELD_DESC);
- oprot.writeI32(this.num_workers);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NUM_USED_WORKERS_FIELD_DESC);
- oprot.writeI32(this.num_used_workers);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SupervisorSummary(");
- boolean first = true;
-
- sb.append("host:");
- if (this.host == null) {
- sb.append("null");
- } else {
- sb.append(this.host);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("supervisor_id:");
- if (this.supervisor_id == null) {
- sb.append("null");
- } else {
- sb.append(this.supervisor_id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("uptime_secs:");
- sb.append(this.uptime_secs);
- first = false;
- if (!first) sb.append(", ");
- sb.append("num_workers:");
- sb.append(this.num_workers);
- first = false;
- if (!first) sb.append(", ");
- sb.append("num_used_workers:");
- sb.append(this.num_used_workers);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_host()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'host' is unset! Struct:" + toString());
- }
-
- if (!is_set_supervisor_id()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'supervisor_id' is unset! Struct:" + toString());
- }
-
- if (!is_set_uptime_secs()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString());
- }
-
- if (!is_set_num_workers()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'num_workers' is unset! Struct:" + toString());
- }
-
- if (!is_set_num_used_workers()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'num_used_workers' 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);
- }
- }
-
-}
-