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:20 UTC
[41/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/ComponentCommon.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/ComponentCommon.java b/jstorm-client/src/main/java/backtype/storm/generated/ComponentCommon.java
deleted file mode 100644
index 273f8be..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/ComponentCommon.java
+++ /dev/null
@@ -1,707 +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 ComponentCommon implements org.apache.thrift7.TBase<ComponentCommon, ComponentCommon._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("ComponentCommon");
-
- private static final org.apache.thrift7.protocol.TField INPUTS_FIELD_DESC = new org.apache.thrift7.protocol.TField("inputs", org.apache.thrift7.protocol.TType.MAP, (short)1);
- private static final org.apache.thrift7.protocol.TField STREAMS_FIELD_DESC = new org.apache.thrift7.protocol.TField("streams", org.apache.thrift7.protocol.TType.MAP, (short)2);
- private static final org.apache.thrift7.protocol.TField PARALLELISM_HINT_FIELD_DESC = new org.apache.thrift7.protocol.TField("parallelism_hint", org.apache.thrift7.protocol.TType.I32, (short)3);
- private static final org.apache.thrift7.protocol.TField JSON_CONF_FIELD_DESC = new org.apache.thrift7.protocol.TField("json_conf", org.apache.thrift7.protocol.TType.STRING, (short)4);
-
- private Map<GlobalStreamId,Grouping> inputs; // required
- private Map<String,StreamInfo> streams; // required
- private int parallelism_hint; // required
- private String json_conf; // 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 {
- INPUTS((short)1, "inputs"),
- STREAMS((short)2, "streams"),
- PARALLELISM_HINT((short)3, "parallelism_hint"),
- JSON_CONF((short)4, "json_conf");
-
- 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: // INPUTS
- return INPUTS;
- case 2: // STREAMS
- return STREAMS;
- case 3: // PARALLELISM_HINT
- return PARALLELISM_HINT;
- case 4: // JSON_CONF
- return JSON_CONF;
- 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 __PARALLELISM_HINT_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.INPUTS, new org.apache.thrift7.meta_data.FieldMetaData("inputs", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- 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.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, Grouping.class))));
- tmpMap.put(_Fields.STREAMS, new org.apache.thrift7.meta_data.FieldMetaData("streams", 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, StreamInfo.class))));
- tmpMap.put(_Fields.PARALLELISM_HINT, new org.apache.thrift7.meta_data.FieldMetaData("parallelism_hint", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.I32)));
- tmpMap.put(_Fields.JSON_CONF, new org.apache.thrift7.meta_data.FieldMetaData("json_conf", 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(ComponentCommon.class, metaDataMap);
- }
-
- public ComponentCommon() {
- }
-
- public ComponentCommon(
- Map<GlobalStreamId,Grouping> inputs,
- Map<String,StreamInfo> streams)
- {
- this();
- this.inputs = inputs;
- this.streams = streams;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ComponentCommon(ComponentCommon other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
- if (other.is_set_inputs()) {
- Map<GlobalStreamId,Grouping> __this__inputs = new HashMap<GlobalStreamId,Grouping>();
- for (Map.Entry<GlobalStreamId, Grouping> other_element : other.inputs.entrySet()) {
-
- GlobalStreamId other_element_key = other_element.getKey();
- Grouping other_element_value = other_element.getValue();
-
- GlobalStreamId __this__inputs_copy_key = new GlobalStreamId(other_element_key);
-
- Grouping __this__inputs_copy_value = new Grouping(other_element_value);
-
- __this__inputs.put(__this__inputs_copy_key, __this__inputs_copy_value);
- }
- this.inputs = __this__inputs;
- }
- if (other.is_set_streams()) {
- Map<String,StreamInfo> __this__streams = new HashMap<String,StreamInfo>();
- for (Map.Entry<String, StreamInfo> other_element : other.streams.entrySet()) {
-
- String other_element_key = other_element.getKey();
- StreamInfo other_element_value = other_element.getValue();
-
- String __this__streams_copy_key = other_element_key;
-
- StreamInfo __this__streams_copy_value = new StreamInfo(other_element_value);
-
- __this__streams.put(__this__streams_copy_key, __this__streams_copy_value);
- }
- this.streams = __this__streams;
- }
- this.parallelism_hint = other.parallelism_hint;
- if (other.is_set_json_conf()) {
- this.json_conf = other.json_conf;
- }
- }
-
- public ComponentCommon deepCopy() {
- return new ComponentCommon(this);
- }
-
- @Override
- public void clear() {
- this.inputs = null;
- this.streams = null;
- set_parallelism_hint_isSet(false);
- this.parallelism_hint = 0;
- this.json_conf = null;
- }
-
- public int get_inputs_size() {
- return (this.inputs == null) ? 0 : this.inputs.size();
- }
-
- public void put_to_inputs(GlobalStreamId key, Grouping val) {
- if (this.inputs == null) {
- this.inputs = new HashMap<GlobalStreamId,Grouping>();
- }
- this.inputs.put(key, val);
- }
-
- public Map<GlobalStreamId,Grouping> get_inputs() {
- return this.inputs;
- }
-
- public void set_inputs(Map<GlobalStreamId,Grouping> inputs) {
- this.inputs = inputs;
- }
-
- public void unset_inputs() {
- this.inputs = null;
- }
-
- /** Returns true if field inputs is set (has been assigned a value) and false otherwise */
- public boolean is_set_inputs() {
- return this.inputs != null;
- }
-
- public void set_inputs_isSet(boolean value) {
- if (!value) {
- this.inputs = null;
- }
- }
-
- public int get_streams_size() {
- return (this.streams == null) ? 0 : this.streams.size();
- }
-
- public void put_to_streams(String key, StreamInfo val) {
- if (this.streams == null) {
- this.streams = new HashMap<String,StreamInfo>();
- }
- this.streams.put(key, val);
- }
-
- public Map<String,StreamInfo> get_streams() {
- return this.streams;
- }
-
- public void set_streams(Map<String,StreamInfo> streams) {
- this.streams = streams;
- }
-
- public void unset_streams() {
- this.streams = null;
- }
-
- /** Returns true if field streams is set (has been assigned a value) and false otherwise */
- public boolean is_set_streams() {
- return this.streams != null;
- }
-
- public void set_streams_isSet(boolean value) {
- if (!value) {
- this.streams = null;
- }
- }
-
- public int get_parallelism_hint() {
- return this.parallelism_hint;
- }
-
- public void set_parallelism_hint(int parallelism_hint) {
- this.parallelism_hint = parallelism_hint;
- set_parallelism_hint_isSet(true);
- }
-
- public void unset_parallelism_hint() {
- __isset_bit_vector.clear(__PARALLELISM_HINT_ISSET_ID);
- }
-
- /** Returns true if field parallelism_hint is set (has been assigned a value) and false otherwise */
- public boolean is_set_parallelism_hint() {
- return __isset_bit_vector.get(__PARALLELISM_HINT_ISSET_ID);
- }
-
- public void set_parallelism_hint_isSet(boolean value) {
- __isset_bit_vector.set(__PARALLELISM_HINT_ISSET_ID, value);
- }
-
- public String get_json_conf() {
- return this.json_conf;
- }
-
- public void set_json_conf(String json_conf) {
- this.json_conf = json_conf;
- }
-
- public void unset_json_conf() {
- this.json_conf = null;
- }
-
- /** Returns true if field json_conf is set (has been assigned a value) and false otherwise */
- public boolean is_set_json_conf() {
- return this.json_conf != null;
- }
-
- public void set_json_conf_isSet(boolean value) {
- if (!value) {
- this.json_conf = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case INPUTS:
- if (value == null) {
- unset_inputs();
- } else {
- set_inputs((Map<GlobalStreamId,Grouping>)value);
- }
- break;
-
- case STREAMS:
- if (value == null) {
- unset_streams();
- } else {
- set_streams((Map<String,StreamInfo>)value);
- }
- break;
-
- case PARALLELISM_HINT:
- if (value == null) {
- unset_parallelism_hint();
- } else {
- set_parallelism_hint((Integer)value);
- }
- break;
-
- case JSON_CONF:
- if (value == null) {
- unset_json_conf();
- } else {
- set_json_conf((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case INPUTS:
- return get_inputs();
-
- case STREAMS:
- return get_streams();
-
- case PARALLELISM_HINT:
- return Integer.valueOf(get_parallelism_hint());
-
- case JSON_CONF:
- return get_json_conf();
-
- }
- 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 INPUTS:
- return is_set_inputs();
- case STREAMS:
- return is_set_streams();
- case PARALLELISM_HINT:
- return is_set_parallelism_hint();
- case JSON_CONF:
- return is_set_json_conf();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ComponentCommon)
- return this.equals((ComponentCommon)that);
- return false;
- }
-
- public boolean equals(ComponentCommon that) {
- if (that == null)
- return false;
-
- boolean this_present_inputs = true && this.is_set_inputs();
- boolean that_present_inputs = true && that.is_set_inputs();
- if (this_present_inputs || that_present_inputs) {
- if (!(this_present_inputs && that_present_inputs))
- return false;
- if (!this.inputs.equals(that.inputs))
- return false;
- }
-
- boolean this_present_streams = true && this.is_set_streams();
- boolean that_present_streams = true && that.is_set_streams();
- if (this_present_streams || that_present_streams) {
- if (!(this_present_streams && that_present_streams))
- return false;
- if (!this.streams.equals(that.streams))
- return false;
- }
-
- boolean this_present_parallelism_hint = true && this.is_set_parallelism_hint();
- boolean that_present_parallelism_hint = true && that.is_set_parallelism_hint();
- if (this_present_parallelism_hint || that_present_parallelism_hint) {
- if (!(this_present_parallelism_hint && that_present_parallelism_hint))
- return false;
- if (this.parallelism_hint != that.parallelism_hint)
- return false;
- }
-
- boolean this_present_json_conf = true && this.is_set_json_conf();
- boolean that_present_json_conf = true && that.is_set_json_conf();
- if (this_present_json_conf || that_present_json_conf) {
- if (!(this_present_json_conf && that_present_json_conf))
- return false;
- if (!this.json_conf.equals(that.json_conf))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_inputs = true && (is_set_inputs());
- builder.append(present_inputs);
- if (present_inputs)
- builder.append(inputs);
-
- boolean present_streams = true && (is_set_streams());
- builder.append(present_streams);
- if (present_streams)
- builder.append(streams);
-
- boolean present_parallelism_hint = true && (is_set_parallelism_hint());
- builder.append(present_parallelism_hint);
- if (present_parallelism_hint)
- builder.append(parallelism_hint);
-
- boolean present_json_conf = true && (is_set_json_conf());
- builder.append(present_json_conf);
- if (present_json_conf)
- builder.append(json_conf);
-
- return builder.toHashCode();
- }
-
- public int compareTo(ComponentCommon other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- ComponentCommon typedOther = (ComponentCommon)other;
-
- lastComparison = Boolean.valueOf(is_set_inputs()).compareTo(typedOther.is_set_inputs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_inputs()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.inputs, typedOther.inputs);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_streams()).compareTo(typedOther.is_set_streams());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_streams()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.streams, typedOther.streams);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_parallelism_hint()).compareTo(typedOther.is_set_parallelism_hint());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_parallelism_hint()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.parallelism_hint, typedOther.parallelism_hint);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_json_conf()).compareTo(typedOther.is_set_json_conf());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_json_conf()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.json_conf, typedOther.json_conf);
- 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: // INPUTS
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.protocol.TMap _map12 = iprot.readMapBegin();
- this.inputs = new HashMap<GlobalStreamId,Grouping>(2*_map12.size);
- for (int _i13 = 0; _i13 < _map12.size; ++_i13)
- {
- GlobalStreamId _key14; // required
- Grouping _val15; // required
- _key14 = new GlobalStreamId();
- _key14.read(iprot);
- _val15 = new Grouping();
- _val15.read(iprot);
- this.inputs.put(_key14, _val15);
- }
- iprot.readMapEnd();
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // STREAMS
- if (field.type == org.apache.thrift7.protocol.TType.MAP) {
- {
- org.apache.thrift7.protocol.TMap _map16 = iprot.readMapBegin();
- this.streams = new HashMap<String,StreamInfo>(2*_map16.size);
- for (int _i17 = 0; _i17 < _map16.size; ++_i17)
- {
- String _key18; // required
- StreamInfo _val19; // required
- _key18 = iprot.readString();
- _val19 = new StreamInfo();
- _val19.read(iprot);
- this.streams.put(_key18, _val19);
- }
- iprot.readMapEnd();
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // PARALLELISM_HINT
- if (field.type == org.apache.thrift7.protocol.TType.I32) {
- this.parallelism_hint = iprot.readI32();
- set_parallelism_hint_isSet(true);
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // JSON_CONF
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.json_conf = 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.inputs != null) {
- oprot.writeFieldBegin(INPUTS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRUCT, org.apache.thrift7.protocol.TType.STRUCT, this.inputs.size()));
- for (Map.Entry<GlobalStreamId, Grouping> _iter20 : this.inputs.entrySet())
- {
- _iter20.getKey().write(oprot);
- _iter20.getValue().write(oprot);
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.streams != null) {
- oprot.writeFieldBegin(STREAMS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift7.protocol.TMap(org.apache.thrift7.protocol.TType.STRING, org.apache.thrift7.protocol.TType.STRUCT, this.streams.size()));
- for (Map.Entry<String, StreamInfo> _iter21 : this.streams.entrySet())
- {
- oprot.writeString(_iter21.getKey());
- _iter21.getValue().write(oprot);
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (is_set_parallelism_hint()) {
- oprot.writeFieldBegin(PARALLELISM_HINT_FIELD_DESC);
- oprot.writeI32(this.parallelism_hint);
- oprot.writeFieldEnd();
- }
- if (this.json_conf != null) {
- if (is_set_json_conf()) {
- oprot.writeFieldBegin(JSON_CONF_FIELD_DESC);
- oprot.writeString(this.json_conf);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ComponentCommon(");
- boolean first = true;
-
- sb.append("inputs:");
- if (this.inputs == null) {
- sb.append("null");
- } else {
- sb.append(this.inputs);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("streams:");
- if (this.streams == null) {
- sb.append("null");
- } else {
- sb.append(this.streams);
- }
- first = false;
- if (is_set_parallelism_hint()) {
- if (!first) sb.append(", ");
- sb.append("parallelism_hint:");
- sb.append(this.parallelism_hint);
- first = false;
- }
- if (is_set_json_conf()) {
- if (!first) sb.append(", ");
- sb.append("json_conf:");
- if (this.json_conf == null) {
- sb.append("null");
- } else {
- sb.append(this.json_conf);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_inputs()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'inputs' is unset! Struct:" + toString());
- }
-
- if (!is_set_streams()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'streams' 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/ComponentObject.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/ComponentObject.java b/jstorm-client/src/main/java/backtype/storm/generated/ComponentObject.java
deleted file mode 100644
index 0509519..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/ComponentObject.java
+++ /dev/null
@@ -1,385 +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 ComponentObject extends org.apache.thrift7.TUnion<ComponentObject, ComponentObject._Fields> {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("ComponentObject");
- private static final org.apache.thrift7.protocol.TField SERIALIZED_JAVA_FIELD_DESC = new org.apache.thrift7.protocol.TField("serialized_java", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift7.protocol.TField SHELL_FIELD_DESC = new org.apache.thrift7.protocol.TField("shell", org.apache.thrift7.protocol.TType.STRUCT, (short)2);
- private static final org.apache.thrift7.protocol.TField JAVA_OBJECT_FIELD_DESC = new org.apache.thrift7.protocol.TField("java_object", org.apache.thrift7.protocol.TType.STRUCT, (short)3);
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift7.TFieldIdEnum {
- SERIALIZED_JAVA((short)1, "serialized_java"),
- SHELL((short)2, "shell"),
- JAVA_OBJECT((short)3, "java_object");
-
- 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: // SERIALIZED_JAVA
- return SERIALIZED_JAVA;
- case 2: // SHELL
- return SHELL;
- case 3: // JAVA_OBJECT
- return JAVA_OBJECT;
- 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;
- }
- }
-
- 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.SERIALIZED_JAVA, new org.apache.thrift7.meta_data.FieldMetaData("serialized_java", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING , true)));
- tmpMap.put(_Fields.SHELL, new org.apache.thrift7.meta_data.FieldMetaData("shell", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, ShellComponent.class)));
- tmpMap.put(_Fields.JAVA_OBJECT, new org.apache.thrift7.meta_data.FieldMetaData("java_object", org.apache.thrift7.TFieldRequirementType.DEFAULT,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, JavaObject.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(ComponentObject.class, metaDataMap);
- }
-
- public ComponentObject() {
- super();
- }
-
- public ComponentObject(_Fields setField, Object value) {
- super(setField, value);
- }
-
- public ComponentObject(ComponentObject other) {
- super(other);
- }
- public ComponentObject deepCopy() {
- return new ComponentObject(this);
- }
-
- public static ComponentObject serialized_java(ByteBuffer value) {
- ComponentObject x = new ComponentObject();
- x.set_serialized_java(value);
- return x;
- }
-
- public static ComponentObject serialized_java(byte[] value) {
- ComponentObject x = new ComponentObject();
- x.set_serialized_java(ByteBuffer.wrap(value));
- return x;
- }
-
- public static ComponentObject shell(ShellComponent value) {
- ComponentObject x = new ComponentObject();
- x.set_shell(value);
- return x;
- }
-
- public static ComponentObject java_object(JavaObject value) {
- ComponentObject x = new ComponentObject();
- x.set_java_object(value);
- return x;
- }
-
-
- @Override
- protected void checkType(_Fields setField, Object value) throws ClassCastException {
- switch (setField) {
- case SERIALIZED_JAVA:
- if (value instanceof ByteBuffer) {
- break;
- }
- throw new ClassCastException("Was expecting value of type ByteBuffer for field 'serialized_java', but got " + value.getClass().getSimpleName());
- case SHELL:
- if (value instanceof ShellComponent) {
- break;
- }
- throw new ClassCastException("Was expecting value of type ShellComponent for field 'shell', but got " + value.getClass().getSimpleName());
- case JAVA_OBJECT:
- if (value instanceof JavaObject) {
- break;
- }
- throw new ClassCastException("Was expecting value of type JavaObject for field 'java_object', but got " + value.getClass().getSimpleName());
- default:
- throw new IllegalArgumentException("Unknown field id " + setField);
- }
- }
-
- @Override
- protected Object readValue(org.apache.thrift7.protocol.TProtocol iprot, org.apache.thrift7.protocol.TField field) throws org.apache.thrift7.TException {
- _Fields setField = _Fields.findByThriftId(field.id);
- if (setField != null) {
- switch (setField) {
- case SERIALIZED_JAVA:
- if (field.type == SERIALIZED_JAVA_FIELD_DESC.type) {
- ByteBuffer serialized_java;
- serialized_java = iprot.readBinary();
- return serialized_java;
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- return null;
- }
- case SHELL:
- if (field.type == SHELL_FIELD_DESC.type) {
- ShellComponent shell;
- shell = new ShellComponent();
- shell.read(iprot);
- return shell;
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- return null;
- }
- case JAVA_OBJECT:
- if (field.type == JAVA_OBJECT_FIELD_DESC.type) {
- JavaObject java_object;
- java_object = new JavaObject();
- java_object.read(iprot);
- return java_object;
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- return null;
- }
- default:
- throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- return null;
- }
- }
-
- @Override
- protected void writeValue(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException {
- switch (setField_) {
- case SERIALIZED_JAVA:
- ByteBuffer serialized_java = (ByteBuffer)value_;
- oprot.writeBinary(serialized_java);
- return;
- case SHELL:
- ShellComponent shell = (ShellComponent)value_;
- shell.write(oprot);
- return;
- case JAVA_OBJECT:
- JavaObject java_object = (JavaObject)value_;
- java_object.write(oprot);
- return;
- default:
- throw new IllegalStateException("Cannot write union with unknown field " + setField_);
- }
- }
-
- @Override
- protected org.apache.thrift7.protocol.TField getFieldDesc(_Fields setField) {
- switch (setField) {
- case SERIALIZED_JAVA:
- return SERIALIZED_JAVA_FIELD_DESC;
- case SHELL:
- return SHELL_FIELD_DESC;
- case JAVA_OBJECT:
- return JAVA_OBJECT_FIELD_DESC;
- default:
- throw new IllegalArgumentException("Unknown field id " + setField);
- }
- }
-
- @Override
- protected org.apache.thrift7.protocol.TStruct getStructDesc() {
- return STRUCT_DESC;
- }
-
- @Override
- protected _Fields enumForId(short id) {
- return _Fields.findByThriftIdOrThrow(id);
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
-
- public byte[] get_serialized_java() {
- set_serialized_java(org.apache.thrift7.TBaseHelper.rightSize(buffer_for_serialized_java()));
- ByteBuffer b = buffer_for_serialized_java();
- return b == null ? null : b.array();
- }
-
- public ByteBuffer buffer_for_serialized_java() {
- if (getSetField() == _Fields.SERIALIZED_JAVA) {
- return (ByteBuffer)getFieldValue();
- } else {
- throw new RuntimeException("Cannot get field 'serialized_java' because union is currently set to " + getFieldDesc(getSetField()).name);
- }
- }
-
- public void set_serialized_java(byte[] value) {
- set_serialized_java(ByteBuffer.wrap(value));
- }
-
- public void set_serialized_java(ByteBuffer value) {
- if (value == null) throw new NullPointerException();
- setField_ = _Fields.SERIALIZED_JAVA;
- value_ = value;
- }
-
- public ShellComponent get_shell() {
- if (getSetField() == _Fields.SHELL) {
- return (ShellComponent)getFieldValue();
- } else {
- throw new RuntimeException("Cannot get field 'shell' because union is currently set to " + getFieldDesc(getSetField()).name);
- }
- }
-
- public void set_shell(ShellComponent value) {
- if (value == null) throw new NullPointerException();
- setField_ = _Fields.SHELL;
- value_ = value;
- }
-
- public JavaObject get_java_object() {
- if (getSetField() == _Fields.JAVA_OBJECT) {
- return (JavaObject)getFieldValue();
- } else {
- throw new RuntimeException("Cannot get field 'java_object' because union is currently set to " + getFieldDesc(getSetField()).name);
- }
- }
-
- public void set_java_object(JavaObject value) {
- if (value == null) throw new NullPointerException();
- setField_ = _Fields.JAVA_OBJECT;
- value_ = value;
- }
-
- public boolean is_set_serialized_java() {
- return setField_ == _Fields.SERIALIZED_JAVA;
- }
-
-
- public boolean is_set_shell() {
- return setField_ == _Fields.SHELL;
- }
-
-
- public boolean is_set_java_object() {
- return setField_ == _Fields.JAVA_OBJECT;
- }
-
-
- public boolean equals(Object other) {
- if (other instanceof ComponentObject) {
- return equals((ComponentObject)other);
- } else {
- return false;
- }
- }
-
- public boolean equals(ComponentObject other) {
- return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
- }
-
- @Override
- public int compareTo(ComponentObject other) {
- int lastComparison = org.apache.thrift7.TBaseHelper.compareTo(getSetField(), other.getSetField());
- if (lastComparison == 0) {
- return org.apache.thrift7.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
- }
- return lastComparison;
- }
-
-
- @Override
- public int hashCode() {
- HashCodeBuilder hcb = new HashCodeBuilder();
- hcb.append(this.getClass().getName());
- org.apache.thrift7.TFieldIdEnum setField = getSetField();
- if (setField != null) {
- hcb.append(setField.getThriftFieldId());
- Object value = getFieldValue();
- if (value instanceof org.apache.thrift7.TEnum) {
- hcb.append(((org.apache.thrift7.TEnum)getFieldValue()).getValue());
- } else {
- hcb.append(value);
- }
- }
- return hcb.toHashCode();
- }
- 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/DRPCExecutionException.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/DRPCExecutionException.java b/jstorm-client/src/main/java/backtype/storm/generated/DRPCExecutionException.java
deleted file mode 100644
index 4dbac48..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/DRPCExecutionException.java
+++ /dev/null
@@ -1,328 +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 DRPCExecutionException extends Exception implements org.apache.thrift7.TBase<DRPCExecutionException, DRPCExecutionException._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("DRPCExecutionException");
-
- private static final org.apache.thrift7.protocol.TField MSG_FIELD_DESC = new org.apache.thrift7.protocol.TField("msg", org.apache.thrift7.protocol.TType.STRING, (short)1);
-
- private String msg; // 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 {
- MSG((short)1, "msg");
-
- 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: // MSG
- return MSG;
- 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.MSG, new org.apache.thrift7.meta_data.FieldMetaData("msg", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(DRPCExecutionException.class, metaDataMap);
- }
-
- public DRPCExecutionException() {
- }
-
- public DRPCExecutionException(
- String msg)
- {
- this();
- this.msg = msg;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public DRPCExecutionException(DRPCExecutionException other) {
- if (other.is_set_msg()) {
- this.msg = other.msg;
- }
- }
-
- public DRPCExecutionException deepCopy() {
- return new DRPCExecutionException(this);
- }
-
- @Override
- public void clear() {
- this.msg = null;
- }
-
- public String get_msg() {
- return this.msg;
- }
-
- public void set_msg(String msg) {
- this.msg = msg;
- }
-
- public void unset_msg() {
- this.msg = null;
- }
-
- /** Returns true if field msg is set (has been assigned a value) and false otherwise */
- public boolean is_set_msg() {
- return this.msg != null;
- }
-
- public void set_msg_isSet(boolean value) {
- if (!value) {
- this.msg = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case MSG:
- if (value == null) {
- unset_msg();
- } else {
- set_msg((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case MSG:
- return get_msg();
-
- }
- 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 MSG:
- return is_set_msg();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof DRPCExecutionException)
- return this.equals((DRPCExecutionException)that);
- return false;
- }
-
- public boolean equals(DRPCExecutionException that) {
- if (that == null)
- return false;
-
- boolean this_present_msg = true && this.is_set_msg();
- boolean that_present_msg = true && that.is_set_msg();
- if (this_present_msg || that_present_msg) {
- if (!(this_present_msg && that_present_msg))
- return false;
- if (!this.msg.equals(that.msg))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_msg = true && (is_set_msg());
- builder.append(present_msg);
- if (present_msg)
- builder.append(msg);
-
- return builder.toHashCode();
- }
-
- public int compareTo(DRPCExecutionException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- DRPCExecutionException typedOther = (DRPCExecutionException)other;
-
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(typedOther.is_set_msg());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_msg()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.msg, typedOther.msg);
- 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: // MSG
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.msg = 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.msg != null) {
- oprot.writeFieldBegin(MSG_FIELD_DESC);
- oprot.writeString(this.msg);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("DRPCExecutionException(");
- boolean first = true;
-
- sb.append("msg:");
- if (this.msg == null) {
- sb.append("null");
- } else {
- sb.append(this.msg);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_msg()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'msg' 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/DRPCRequest.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/DRPCRequest.java b/jstorm-client/src/main/java/backtype/storm/generated/DRPCRequest.java
deleted file mode 100644
index ce8cfb5..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/DRPCRequest.java
+++ /dev/null
@@ -1,425 +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 DRPCRequest implements org.apache.thrift7.TBase<DRPCRequest, DRPCRequest._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("DRPCRequest");
-
- private static final org.apache.thrift7.protocol.TField FUNC_ARGS_FIELD_DESC = new org.apache.thrift7.protocol.TField("func_args", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift7.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("request_id", org.apache.thrift7.protocol.TType.STRING, (short)2);
-
- private String func_args; // required
- private String request_id; // 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 {
- FUNC_ARGS((short)1, "func_args"),
- REQUEST_ID((short)2, "request_id");
-
- 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: // FUNC_ARGS
- return FUNC_ARGS;
- case 2: // REQUEST_ID
- return REQUEST_ID;
- 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.FUNC_ARGS, new org.apache.thrift7.meta_data.FieldMetaData("func_args", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift7.meta_data.FieldMetaData("request_id", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(DRPCRequest.class, metaDataMap);
- }
-
- public DRPCRequest() {
- }
-
- public DRPCRequest(
- String func_args,
- String request_id)
- {
- this();
- this.func_args = func_args;
- this.request_id = request_id;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public DRPCRequest(DRPCRequest other) {
- if (other.is_set_func_args()) {
- this.func_args = other.func_args;
- }
- if (other.is_set_request_id()) {
- this.request_id = other.request_id;
- }
- }
-
- public DRPCRequest deepCopy() {
- return new DRPCRequest(this);
- }
-
- @Override
- public void clear() {
- this.func_args = null;
- this.request_id = null;
- }
-
- public String get_func_args() {
- return this.func_args;
- }
-
- public void set_func_args(String func_args) {
- this.func_args = func_args;
- }
-
- public void unset_func_args() {
- this.func_args = null;
- }
-
- /** Returns true if field func_args is set (has been assigned a value) and false otherwise */
- public boolean is_set_func_args() {
- return this.func_args != null;
- }
-
- public void set_func_args_isSet(boolean value) {
- if (!value) {
- this.func_args = null;
- }
- }
-
- public String get_request_id() {
- return this.request_id;
- }
-
- public void set_request_id(String request_id) {
- this.request_id = request_id;
- }
-
- public void unset_request_id() {
- this.request_id = null;
- }
-
- /** Returns true if field request_id is set (has been assigned a value) and false otherwise */
- public boolean is_set_request_id() {
- return this.request_id != null;
- }
-
- public void set_request_id_isSet(boolean value) {
- if (!value) {
- this.request_id = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case FUNC_ARGS:
- if (value == null) {
- unset_func_args();
- } else {
- set_func_args((String)value);
- }
- break;
-
- case REQUEST_ID:
- if (value == null) {
- unset_request_id();
- } else {
- set_request_id((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case FUNC_ARGS:
- return get_func_args();
-
- case REQUEST_ID:
- return get_request_id();
-
- }
- 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 FUNC_ARGS:
- return is_set_func_args();
- case REQUEST_ID:
- return is_set_request_id();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof DRPCRequest)
- return this.equals((DRPCRequest)that);
- return false;
- }
-
- public boolean equals(DRPCRequest that) {
- if (that == null)
- return false;
-
- boolean this_present_func_args = true && this.is_set_func_args();
- boolean that_present_func_args = true && that.is_set_func_args();
- if (this_present_func_args || that_present_func_args) {
- if (!(this_present_func_args && that_present_func_args))
- return false;
- if (!this.func_args.equals(that.func_args))
- return false;
- }
-
- boolean this_present_request_id = true && this.is_set_request_id();
- boolean that_present_request_id = true && that.is_set_request_id();
- if (this_present_request_id || that_present_request_id) {
- if (!(this_present_request_id && that_present_request_id))
- return false;
- if (!this.request_id.equals(that.request_id))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_func_args = true && (is_set_func_args());
- builder.append(present_func_args);
- if (present_func_args)
- builder.append(func_args);
-
- boolean present_request_id = true && (is_set_request_id());
- builder.append(present_request_id);
- if (present_request_id)
- builder.append(request_id);
-
- return builder.toHashCode();
- }
-
- public int compareTo(DRPCRequest other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- DRPCRequest typedOther = (DRPCRequest)other;
-
- lastComparison = Boolean.valueOf(is_set_func_args()).compareTo(typedOther.is_set_func_args());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_func_args()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.func_args, typedOther.func_args);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_request_id()).compareTo(typedOther.is_set_request_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_request_id()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.request_id, typedOther.request_id);
- 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: // FUNC_ARGS
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.func_args = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // REQUEST_ID
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.request_id = 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.func_args != null) {
- oprot.writeFieldBegin(FUNC_ARGS_FIELD_DESC);
- oprot.writeString(this.func_args);
- oprot.writeFieldEnd();
- }
- if (this.request_id != null) {
- oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC);
- oprot.writeString(this.request_id);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("DRPCRequest(");
- boolean first = true;
-
- sb.append("func_args:");
- if (this.func_args == null) {
- sb.append("null");
- } else {
- sb.append(this.func_args);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("request_id:");
- if (this.request_id == null) {
- sb.append("null");
- } else {
- sb.append(this.request_id);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_func_args()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'func_args' is unset! Struct:" + toString());
- }
-
- if (!is_set_request_id()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'request_id' 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);
- }
- }
-
-}
-