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:10 UTC
[31/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/TopologyAssignException.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/TopologyAssignException.java b/jstorm-client/src/main/java/backtype/storm/generated/TopologyAssignException.java
deleted file mode 100644
index 2907dab..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/TopologyAssignException.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 TopologyAssignException extends Exception implements org.apache.thrift7.TBase<TopologyAssignException, TopologyAssignException._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("TopologyAssignException");
-
- 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(TopologyAssignException.class, metaDataMap);
- }
-
- public TopologyAssignException() {
- }
-
- public TopologyAssignException(
- String msg)
- {
- this();
- this.msg = msg;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public TopologyAssignException(TopologyAssignException other) {
- if (other.is_set_msg()) {
- this.msg = other.msg;
- }
- }
-
- public TopologyAssignException deepCopy() {
- return new TopologyAssignException(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 TopologyAssignException)
- return this.equals((TopologyAssignException)that);
- return false;
- }
-
- public boolean equals(TopologyAssignException 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(TopologyAssignException other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TopologyAssignException typedOther = (TopologyAssignException)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("TopologyAssignException(");
- 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/TopologyInfo.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/TopologyInfo.java b/jstorm-client/src/main/java/backtype/storm/generated/TopologyInfo.java
deleted file mode 100644
index a2566dc..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/TopologyInfo.java
+++ /dev/null
@@ -1,1022 +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 TopologyInfo implements org.apache.thrift7.TBase<TopologyInfo, TopologyInfo._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("TopologyInfo");
-
- private static final org.apache.thrift7.protocol.TField ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("id", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift7.protocol.TField NAME_FIELD_DESC = new org.apache.thrift7.protocol.TField("name", 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 WORKERS_FIELD_DESC = new org.apache.thrift7.protocol.TField("workers", org.apache.thrift7.protocol.TType.LIST, (short)4);
- private static final org.apache.thrift7.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift7.protocol.TField("status", org.apache.thrift7.protocol.TType.STRING, (short)5);
- private static final org.apache.thrift7.protocol.TField TASKS_FIELD_DESC = new org.apache.thrift7.protocol.TField("tasks", org.apache.thrift7.protocol.TType.LIST, (short)6);
- private static final org.apache.thrift7.protocol.TField USER_DEF_METRIC_FIELD_DESC = new org.apache.thrift7.protocol.TField("userDefMetric", org.apache.thrift7.protocol.TType.LIST, (short)7);
-
- private String id; // required
- private String name; // required
- private int uptime_secs; // required
- private List<WorkerSummary> workers; // required
- private String status; // required
- private List<TaskSummary> tasks; // required
- private List<UserDefMetric> userDefMetric; // 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 {
- ID((short)1, "id"),
- NAME((short)2, "name"),
- UPTIME_SECS((short)3, "uptime_secs"),
- WORKERS((short)4, "workers"),
- STATUS((short)5, "status"),
- TASKS((short)6, "tasks"),
- USER_DEF_METRIC((short)7, "userDefMetric");
-
- 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: // ID
- return ID;
- case 2: // NAME
- return NAME;
- case 3: // UPTIME_SECS
- return UPTIME_SECS;
- case 4: // WORKERS
- return WORKERS;
- case 5: // STATUS
- return STATUS;
- case 6: // TASKS
- return TASKS;
- case 7: // USER_DEF_METRIC
- return USER_DEF_METRIC;
- 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 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.ID, new org.apache.thrift7.meta_data.FieldMetaData("id", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- tmpMap.put(_Fields.NAME, new org.apache.thrift7.meta_data.FieldMetaData("name", 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.WORKERS, new org.apache.thrift7.meta_data.FieldMetaData("workers", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, WorkerSummary.class))));
- tmpMap.put(_Fields.STATUS, new org.apache.thrift7.meta_data.FieldMetaData("status", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- tmpMap.put(_Fields.TASKS, new org.apache.thrift7.meta_data.FieldMetaData("tasks", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, TaskSummary.class))));
- tmpMap.put(_Fields.USER_DEF_METRIC, new org.apache.thrift7.meta_data.FieldMetaData("userDefMetric", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, UserDefMetric.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(TopologyInfo.class, metaDataMap);
- }
-
- public TopologyInfo() {
- }
-
- public TopologyInfo(
- String id,
- String name,
- int uptime_secs,
- List<WorkerSummary> workers,
- String status,
- List<TaskSummary> tasks)
- {
- this();
- this.id = id;
- this.name = name;
- this.uptime_secs = uptime_secs;
- set_uptime_secs_isSet(true);
- this.workers = workers;
- this.status = status;
- this.tasks = tasks;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public TopologyInfo(TopologyInfo other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
- if (other.is_set_id()) {
- this.id = other.id;
- }
- if (other.is_set_name()) {
- this.name = other.name;
- }
- this.uptime_secs = other.uptime_secs;
- if (other.is_set_workers()) {
- List<WorkerSummary> __this__workers = new ArrayList<WorkerSummary>();
- for (WorkerSummary other_element : other.workers) {
- __this__workers.add(new WorkerSummary(other_element));
- }
- this.workers = __this__workers;
- }
- if (other.is_set_status()) {
- this.status = other.status;
- }
- if (other.is_set_tasks()) {
- List<TaskSummary> __this__tasks = new ArrayList<TaskSummary>();
- for (TaskSummary other_element : other.tasks) {
- __this__tasks.add(new TaskSummary(other_element));
- }
- this.tasks = __this__tasks;
- }
- if (other.is_set_userDefMetric()) {
- List<UserDefMetric> __this__userDefMetric = new ArrayList<UserDefMetric>();
- for (UserDefMetric other_element : other.userDefMetric) {
- __this__userDefMetric.add(new UserDefMetric(other_element));
- }
- this.userDefMetric = __this__userDefMetric;
- }
- }
-
- public TopologyInfo deepCopy() {
- return new TopologyInfo(this);
- }
-
- @Override
- public void clear() {
- this.id = null;
- this.name = null;
- set_uptime_secs_isSet(false);
- this.uptime_secs = 0;
- this.workers = null;
- this.status = null;
- this.tasks = null;
- this.userDefMetric = null;
- }
-
- public String get_id() {
- return this.id;
- }
-
- public void set_id(String id) {
- this.id = id;
- }
-
- public void unset_id() {
- this.id = null;
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean is_set_id() {
- return this.id != null;
- }
-
- public void set_id_isSet(boolean value) {
- if (!value) {
- this.id = null;
- }
- }
-
- public String get_name() {
- return this.name;
- }
-
- public void set_name(String name) {
- this.name = name;
- }
-
- public void unset_name() {
- this.name = null;
- }
-
- /** Returns true if field name is set (has been assigned a value) and false otherwise */
- public boolean is_set_name() {
- return this.name != null;
- }
-
- public void set_name_isSet(boolean value) {
- if (!value) {
- this.name = 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_workers_size() {
- return (this.workers == null) ? 0 : this.workers.size();
- }
-
- public java.util.Iterator<WorkerSummary> get_workers_iterator() {
- return (this.workers == null) ? null : this.workers.iterator();
- }
-
- public void add_to_workers(WorkerSummary elem) {
- if (this.workers == null) {
- this.workers = new ArrayList<WorkerSummary>();
- }
- this.workers.add(elem);
- }
-
- public List<WorkerSummary> get_workers() {
- return this.workers;
- }
-
- public void set_workers(List<WorkerSummary> workers) {
- this.workers = workers;
- }
-
- public void unset_workers() {
- this.workers = null;
- }
-
- /** Returns true if field workers is set (has been assigned a value) and false otherwise */
- public boolean is_set_workers() {
- return this.workers != null;
- }
-
- public void set_workers_isSet(boolean value) {
- if (!value) {
- this.workers = null;
- }
- }
-
- public String get_status() {
- return this.status;
- }
-
- public void set_status(String status) {
- this.status = status;
- }
-
- public void unset_status() {
- this.status = null;
- }
-
- /** Returns true if field status is set (has been assigned a value) and false otherwise */
- public boolean is_set_status() {
- return this.status != null;
- }
-
- public void set_status_isSet(boolean value) {
- if (!value) {
- this.status = null;
- }
- }
-
- public int get_tasks_size() {
- return (this.tasks == null) ? 0 : this.tasks.size();
- }
-
- public java.util.Iterator<TaskSummary> get_tasks_iterator() {
- return (this.tasks == null) ? null : this.tasks.iterator();
- }
-
- public void add_to_tasks(TaskSummary elem) {
- if (this.tasks == null) {
- this.tasks = new ArrayList<TaskSummary>();
- }
- this.tasks.add(elem);
- }
-
- public List<TaskSummary> get_tasks() {
- return this.tasks;
- }
-
- public void set_tasks(List<TaskSummary> tasks) {
- this.tasks = tasks;
- }
-
- public void unset_tasks() {
- this.tasks = null;
- }
-
- /** Returns true if field tasks is set (has been assigned a value) and false otherwise */
- public boolean is_set_tasks() {
- return this.tasks != null;
- }
-
- public void set_tasks_isSet(boolean value) {
- if (!value) {
- this.tasks = null;
- }
- }
-
- public int get_userDefMetric_size() {
- return (this.userDefMetric == null) ? 0 : this.userDefMetric.size();
- }
-
- public java.util.Iterator<UserDefMetric> get_userDefMetric_iterator() {
- return (this.userDefMetric == null) ? null : this.userDefMetric.iterator();
- }
-
- public void add_to_userDefMetric(UserDefMetric elem) {
- if (this.userDefMetric == null) {
- this.userDefMetric = new ArrayList<UserDefMetric>();
- }
- this.userDefMetric.add(elem);
- }
-
- public List<UserDefMetric> get_userDefMetric() {
- return this.userDefMetric;
- }
-
- public void set_userDefMetric(List<UserDefMetric> userDefMetric) {
- this.userDefMetric = userDefMetric;
- }
-
- public void unset_userDefMetric() {
- this.userDefMetric = null;
- }
-
- /** Returns true if field userDefMetric is set (has been assigned a value) and false otherwise */
- public boolean is_set_userDefMetric() {
- return this.userDefMetric != null;
- }
-
- public void set_userDefMetric_isSet(boolean value) {
- if (!value) {
- this.userDefMetric = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ID:
- if (value == null) {
- unset_id();
- } else {
- set_id((String)value);
- }
- break;
-
- case NAME:
- if (value == null) {
- unset_name();
- } else {
- set_name((String)value);
- }
- break;
-
- case UPTIME_SECS:
- if (value == null) {
- unset_uptime_secs();
- } else {
- set_uptime_secs((Integer)value);
- }
- break;
-
- case WORKERS:
- if (value == null) {
- unset_workers();
- } else {
- set_workers((List<WorkerSummary>)value);
- }
- break;
-
- case STATUS:
- if (value == null) {
- unset_status();
- } else {
- set_status((String)value);
- }
- break;
-
- case TASKS:
- if (value == null) {
- unset_tasks();
- } else {
- set_tasks((List<TaskSummary>)value);
- }
- break;
-
- case USER_DEF_METRIC:
- if (value == null) {
- unset_userDefMetric();
- } else {
- set_userDefMetric((List<UserDefMetric>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ID:
- return get_id();
-
- case NAME:
- return get_name();
-
- case UPTIME_SECS:
- return Integer.valueOf(get_uptime_secs());
-
- case WORKERS:
- return get_workers();
-
- case STATUS:
- return get_status();
-
- case TASKS:
- return get_tasks();
-
- case USER_DEF_METRIC:
- return get_userDefMetric();
-
- }
- 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 ID:
- return is_set_id();
- case NAME:
- return is_set_name();
- case UPTIME_SECS:
- return is_set_uptime_secs();
- case WORKERS:
- return is_set_workers();
- case STATUS:
- return is_set_status();
- case TASKS:
- return is_set_tasks();
- case USER_DEF_METRIC:
- return is_set_userDefMetric();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TopologyInfo)
- return this.equals((TopologyInfo)that);
- return false;
- }
-
- public boolean equals(TopologyInfo that) {
- if (that == null)
- return false;
-
- boolean this_present_id = true && this.is_set_id();
- boolean that_present_id = true && that.is_set_id();
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (!this.id.equals(that.id))
- return false;
- }
-
- boolean this_present_name = true && this.is_set_name();
- boolean that_present_name = true && that.is_set_name();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- 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_workers = true && this.is_set_workers();
- boolean that_present_workers = true && that.is_set_workers();
- if (this_present_workers || that_present_workers) {
- if (!(this_present_workers && that_present_workers))
- return false;
- if (!this.workers.equals(that.workers))
- return false;
- }
-
- boolean this_present_status = true && this.is_set_status();
- boolean that_present_status = true && that.is_set_status();
- if (this_present_status || that_present_status) {
- if (!(this_present_status && that_present_status))
- return false;
- if (!this.status.equals(that.status))
- return false;
- }
-
- boolean this_present_tasks = true && this.is_set_tasks();
- boolean that_present_tasks = true && that.is_set_tasks();
- if (this_present_tasks || that_present_tasks) {
- if (!(this_present_tasks && that_present_tasks))
- return false;
- if (!this.tasks.equals(that.tasks))
- return false;
- }
-
- boolean this_present_userDefMetric = true && this.is_set_userDefMetric();
- boolean that_present_userDefMetric = true && that.is_set_userDefMetric();
- if (this_present_userDefMetric || that_present_userDefMetric) {
- if (!(this_present_userDefMetric && that_present_userDefMetric))
- return false;
- if (!this.userDefMetric.equals(that.userDefMetric))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_id = true && (is_set_id());
- builder.append(present_id);
- if (present_id)
- builder.append(id);
-
- boolean present_name = true && (is_set_name());
- builder.append(present_name);
- if (present_name)
- builder.append(name);
-
- boolean present_uptime_secs = true;
- builder.append(present_uptime_secs);
- if (present_uptime_secs)
- builder.append(uptime_secs);
-
- boolean present_workers = true && (is_set_workers());
- builder.append(present_workers);
- if (present_workers)
- builder.append(workers);
-
- boolean present_status = true && (is_set_status());
- builder.append(present_status);
- if (present_status)
- builder.append(status);
-
- boolean present_tasks = true && (is_set_tasks());
- builder.append(present_tasks);
- if (present_tasks)
- builder.append(tasks);
-
- boolean present_userDefMetric = true && (is_set_userDefMetric());
- builder.append(present_userDefMetric);
- if (present_userDefMetric)
- builder.append(userDefMetric);
-
- return builder.toHashCode();
- }
-
- public int compareTo(TopologyInfo other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TopologyInfo typedOther = (TopologyInfo)other;
-
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_id()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.id, typedOther.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(typedOther.is_set_name());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_name()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.name, typedOther.name);
- 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_workers()).compareTo(typedOther.is_set_workers());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_workers()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.workers, typedOther.workers);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_status()).compareTo(typedOther.is_set_status());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_status()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.status, typedOther.status);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_tasks()).compareTo(typedOther.is_set_tasks());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_tasks()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.tasks, typedOther.tasks);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_userDefMetric()).compareTo(typedOther.is_set_userDefMetric());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_userDefMetric()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.userDefMetric, typedOther.userDefMetric);
- 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: // ID
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.id = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // NAME
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.name = 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: // WORKERS
- if (field.type == org.apache.thrift7.protocol.TType.LIST) {
- {
- org.apache.thrift7.protocol.TList _list193 = iprot.readListBegin();
- this.workers = new ArrayList<WorkerSummary>(_list193.size);
- for (int _i194 = 0; _i194 < _list193.size; ++_i194)
- {
- WorkerSummary _elem195; // required
- _elem195 = new WorkerSummary();
- _elem195.read(iprot);
- this.workers.add(_elem195);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5: // STATUS
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.status = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 6: // TASKS
- if (field.type == org.apache.thrift7.protocol.TType.LIST) {
- {
- org.apache.thrift7.protocol.TList _list196 = iprot.readListBegin();
- this.tasks = new ArrayList<TaskSummary>(_list196.size);
- for (int _i197 = 0; _i197 < _list196.size; ++_i197)
- {
- TaskSummary _elem198; // required
- _elem198 = new TaskSummary();
- _elem198.read(iprot);
- this.tasks.add(_elem198);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 7: // USER_DEF_METRIC
- if (field.type == org.apache.thrift7.protocol.TType.LIST) {
- {
- org.apache.thrift7.protocol.TList _list199 = iprot.readListBegin();
- this.userDefMetric = new ArrayList<UserDefMetric>(_list199.size);
- for (int _i200 = 0; _i200 < _list199.size; ++_i200)
- {
- UserDefMetric _elem201; // required
- _elem201 = new UserDefMetric();
- _elem201.read(iprot);
- this.userDefMetric.add(_elem201);
- }
- iprot.readListEnd();
- }
- } 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.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(this.id);
- oprot.writeFieldEnd();
- }
- if (this.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(this.name);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC);
- oprot.writeI32(this.uptime_secs);
- oprot.writeFieldEnd();
- if (this.workers != null) {
- oprot.writeFieldBegin(WORKERS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRUCT, this.workers.size()));
- for (WorkerSummary _iter202 : this.workers)
- {
- _iter202.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.status != null) {
- oprot.writeFieldBegin(STATUS_FIELD_DESC);
- oprot.writeString(this.status);
- oprot.writeFieldEnd();
- }
- if (this.tasks != null) {
- oprot.writeFieldBegin(TASKS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRUCT, this.tasks.size()));
- for (TaskSummary _iter203 : this.tasks)
- {
- _iter203.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.userDefMetric != null) {
- if (is_set_userDefMetric()) {
- oprot.writeFieldBegin(USER_DEF_METRIC_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRUCT, this.userDefMetric.size()));
- for (UserDefMetric _iter204 : this.userDefMetric)
- {
- _iter204.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TopologyInfo(");
- boolean first = true;
-
- sb.append("id:");
- if (this.id == null) {
- sb.append("null");
- } else {
- sb.append(this.id);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("uptime_secs:");
- sb.append(this.uptime_secs);
- first = false;
- if (!first) sb.append(", ");
- sb.append("workers:");
- if (this.workers == null) {
- sb.append("null");
- } else {
- sb.append(this.workers);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("status:");
- if (this.status == null) {
- sb.append("null");
- } else {
- sb.append(this.status);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("tasks:");
- if (this.tasks == null) {
- sb.append("null");
- } else {
- sb.append(this.tasks);
- }
- first = false;
- if (is_set_userDefMetric()) {
- if (!first) sb.append(", ");
- sb.append("userDefMetric:");
- if (this.userDefMetric == null) {
- sb.append("null");
- } else {
- sb.append(this.userDefMetric);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_id()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString());
- }
-
- if (!is_set_name()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'name' 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_workers()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'workers' is unset! Struct:" + toString());
- }
-
- if (!is_set_status()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString());
- }
-
- if (!is_set_tasks()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'tasks' 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/TopologyInitialStatus.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/TopologyInitialStatus.java b/jstorm-client/src/main/java/backtype/storm/generated/TopologyInitialStatus.java
deleted file mode 100644
index 2c97dd7..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/TopologyInitialStatus.java
+++ /dev/null
@@ -1,44 +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 java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift7.TEnum;
-
-public enum TopologyInitialStatus implements org.apache.thrift7.TEnum {
- ACTIVE(1),
- INACTIVE(2);
-
- private final int value;
-
- private TopologyInitialStatus(int value) {
- this.value = value;
- }
-
- /**
- * Get the integer value of this enum value, as defined in the Thrift IDL.
- */
- public int getValue() {
- return value;
- }
-
- /**
- * Find a the enum type by its integer value, as defined in the Thrift IDL.
- * @return null if the value is not found.
- */
- public static TopologyInitialStatus findByValue(int value) {
- switch (value) {
- case 1:
- return ACTIVE;
- case 2:
- return INACTIVE;
- default:
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/storm/blob/e935da91/jstorm-client/src/main/java/backtype/storm/generated/TopologyMetricInfo.java
----------------------------------------------------------------------
diff --git a/jstorm-client/src/main/java/backtype/storm/generated/TopologyMetricInfo.java b/jstorm-client/src/main/java/backtype/storm/generated/TopologyMetricInfo.java
deleted file mode 100644
index 9d584ec..0000000
--- a/jstorm-client/src/main/java/backtype/storm/generated/TopologyMetricInfo.java
+++ /dev/null
@@ -1,594 +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 TopologyMetricInfo implements org.apache.thrift7.TBase<TopologyMetricInfo, TopologyMetricInfo._Fields>, java.io.Serializable, Cloneable {
- private static final org.apache.thrift7.protocol.TStruct STRUCT_DESC = new org.apache.thrift7.protocol.TStruct("TopologyMetricInfo");
-
- private static final org.apache.thrift7.protocol.TField TOPOLOGY_ID_FIELD_DESC = new org.apache.thrift7.protocol.TField("topology_id", org.apache.thrift7.protocol.TType.STRING, (short)1);
- private static final org.apache.thrift7.protocol.TField TASK_METRIC_LIST_FIELD_DESC = new org.apache.thrift7.protocol.TField("task_metric_list", org.apache.thrift7.protocol.TType.LIST, (short)2);
- private static final org.apache.thrift7.protocol.TField WORKER_METRIC_LIST_FIELD_DESC = new org.apache.thrift7.protocol.TField("worker_metric_list", org.apache.thrift7.protocol.TType.LIST, (short)3);
-
- private String topology_id; // required
- private List<TaskMetricData> task_metric_list; // required
- private List<WorkerMetricData> worker_metric_list; // 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 {
- TOPOLOGY_ID((short)1, "topology_id"),
- TASK_METRIC_LIST((short)2, "task_metric_list"),
- WORKER_METRIC_LIST((short)3, "worker_metric_list");
-
- 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: // TOPOLOGY_ID
- return TOPOLOGY_ID;
- case 2: // TASK_METRIC_LIST
- return TASK_METRIC_LIST;
- case 3: // WORKER_METRIC_LIST
- return WORKER_METRIC_LIST;
- 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.TOPOLOGY_ID, new org.apache.thrift7.meta_data.FieldMetaData("topology_id", org.apache.thrift7.TFieldRequirementType.REQUIRED,
- new org.apache.thrift7.meta_data.FieldValueMetaData(org.apache.thrift7.protocol.TType.STRING)));
- tmpMap.put(_Fields.TASK_METRIC_LIST, new org.apache.thrift7.meta_data.FieldMetaData("task_metric_list", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, TaskMetricData.class))));
- tmpMap.put(_Fields.WORKER_METRIC_LIST, new org.apache.thrift7.meta_data.FieldMetaData("worker_metric_list", org.apache.thrift7.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift7.meta_data.ListMetaData(org.apache.thrift7.protocol.TType.LIST,
- new org.apache.thrift7.meta_data.StructMetaData(org.apache.thrift7.protocol.TType.STRUCT, WorkerMetricData.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift7.meta_data.FieldMetaData.addStructMetaDataMap(TopologyMetricInfo.class, metaDataMap);
- }
-
- public TopologyMetricInfo() {
- }
-
- public TopologyMetricInfo(
- String topology_id)
- {
- this();
- this.topology_id = topology_id;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public TopologyMetricInfo(TopologyMetricInfo other) {
- if (other.is_set_topology_id()) {
- this.topology_id = other.topology_id;
- }
- if (other.is_set_task_metric_list()) {
- List<TaskMetricData> __this__task_metric_list = new ArrayList<TaskMetricData>();
- for (TaskMetricData other_element : other.task_metric_list) {
- __this__task_metric_list.add(new TaskMetricData(other_element));
- }
- this.task_metric_list = __this__task_metric_list;
- }
- if (other.is_set_worker_metric_list()) {
- List<WorkerMetricData> __this__worker_metric_list = new ArrayList<WorkerMetricData>();
- for (WorkerMetricData other_element : other.worker_metric_list) {
- __this__worker_metric_list.add(new WorkerMetricData(other_element));
- }
- this.worker_metric_list = __this__worker_metric_list;
- }
- }
-
- public TopologyMetricInfo deepCopy() {
- return new TopologyMetricInfo(this);
- }
-
- @Override
- public void clear() {
- this.topology_id = null;
- this.task_metric_list = null;
- this.worker_metric_list = null;
- }
-
- public String get_topology_id() {
- return this.topology_id;
- }
-
- public void set_topology_id(String topology_id) {
- this.topology_id = topology_id;
- }
-
- public void unset_topology_id() {
- this.topology_id = null;
- }
-
- /** Returns true if field topology_id is set (has been assigned a value) and false otherwise */
- public boolean is_set_topology_id() {
- return this.topology_id != null;
- }
-
- public void set_topology_id_isSet(boolean value) {
- if (!value) {
- this.topology_id = null;
- }
- }
-
- public int get_task_metric_list_size() {
- return (this.task_metric_list == null) ? 0 : this.task_metric_list.size();
- }
-
- public java.util.Iterator<TaskMetricData> get_task_metric_list_iterator() {
- return (this.task_metric_list == null) ? null : this.task_metric_list.iterator();
- }
-
- public void add_to_task_metric_list(TaskMetricData elem) {
- if (this.task_metric_list == null) {
- this.task_metric_list = new ArrayList<TaskMetricData>();
- }
- this.task_metric_list.add(elem);
- }
-
- public List<TaskMetricData> get_task_metric_list() {
- return this.task_metric_list;
- }
-
- public void set_task_metric_list(List<TaskMetricData> task_metric_list) {
- this.task_metric_list = task_metric_list;
- }
-
- public void unset_task_metric_list() {
- this.task_metric_list = null;
- }
-
- /** Returns true if field task_metric_list is set (has been assigned a value) and false otherwise */
- public boolean is_set_task_metric_list() {
- return this.task_metric_list != null;
- }
-
- public void set_task_metric_list_isSet(boolean value) {
- if (!value) {
- this.task_metric_list = null;
- }
- }
-
- public int get_worker_metric_list_size() {
- return (this.worker_metric_list == null) ? 0 : this.worker_metric_list.size();
- }
-
- public java.util.Iterator<WorkerMetricData> get_worker_metric_list_iterator() {
- return (this.worker_metric_list == null) ? null : this.worker_metric_list.iterator();
- }
-
- public void add_to_worker_metric_list(WorkerMetricData elem) {
- if (this.worker_metric_list == null) {
- this.worker_metric_list = new ArrayList<WorkerMetricData>();
- }
- this.worker_metric_list.add(elem);
- }
-
- public List<WorkerMetricData> get_worker_metric_list() {
- return this.worker_metric_list;
- }
-
- public void set_worker_metric_list(List<WorkerMetricData> worker_metric_list) {
- this.worker_metric_list = worker_metric_list;
- }
-
- public void unset_worker_metric_list() {
- this.worker_metric_list = null;
- }
-
- /** Returns true if field worker_metric_list is set (has been assigned a value) and false otherwise */
- public boolean is_set_worker_metric_list() {
- return this.worker_metric_list != null;
- }
-
- public void set_worker_metric_list_isSet(boolean value) {
- if (!value) {
- this.worker_metric_list = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case TOPOLOGY_ID:
- if (value == null) {
- unset_topology_id();
- } else {
- set_topology_id((String)value);
- }
- break;
-
- case TASK_METRIC_LIST:
- if (value == null) {
- unset_task_metric_list();
- } else {
- set_task_metric_list((List<TaskMetricData>)value);
- }
- break;
-
- case WORKER_METRIC_LIST:
- if (value == null) {
- unset_worker_metric_list();
- } else {
- set_worker_metric_list((List<WorkerMetricData>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case TOPOLOGY_ID:
- return get_topology_id();
-
- case TASK_METRIC_LIST:
- return get_task_metric_list();
-
- case WORKER_METRIC_LIST:
- return get_worker_metric_list();
-
- }
- 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 TOPOLOGY_ID:
- return is_set_topology_id();
- case TASK_METRIC_LIST:
- return is_set_task_metric_list();
- case WORKER_METRIC_LIST:
- return is_set_worker_metric_list();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TopologyMetricInfo)
- return this.equals((TopologyMetricInfo)that);
- return false;
- }
-
- public boolean equals(TopologyMetricInfo that) {
- if (that == null)
- return false;
-
- boolean this_present_topology_id = true && this.is_set_topology_id();
- boolean that_present_topology_id = true && that.is_set_topology_id();
- if (this_present_topology_id || that_present_topology_id) {
- if (!(this_present_topology_id && that_present_topology_id))
- return false;
- if (!this.topology_id.equals(that.topology_id))
- return false;
- }
-
- boolean this_present_task_metric_list = true && this.is_set_task_metric_list();
- boolean that_present_task_metric_list = true && that.is_set_task_metric_list();
- if (this_present_task_metric_list || that_present_task_metric_list) {
- if (!(this_present_task_metric_list && that_present_task_metric_list))
- return false;
- if (!this.task_metric_list.equals(that.task_metric_list))
- return false;
- }
-
- boolean this_present_worker_metric_list = true && this.is_set_worker_metric_list();
- boolean that_present_worker_metric_list = true && that.is_set_worker_metric_list();
- if (this_present_worker_metric_list || that_present_worker_metric_list) {
- if (!(this_present_worker_metric_list && that_present_worker_metric_list))
- return false;
- if (!this.worker_metric_list.equals(that.worker_metric_list))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
-
- boolean present_topology_id = true && (is_set_topology_id());
- builder.append(present_topology_id);
- if (present_topology_id)
- builder.append(topology_id);
-
- boolean present_task_metric_list = true && (is_set_task_metric_list());
- builder.append(present_task_metric_list);
- if (present_task_metric_list)
- builder.append(task_metric_list);
-
- boolean present_worker_metric_list = true && (is_set_worker_metric_list());
- builder.append(present_worker_metric_list);
- if (present_worker_metric_list)
- builder.append(worker_metric_list);
-
- return builder.toHashCode();
- }
-
- public int compareTo(TopologyMetricInfo other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
- TopologyMetricInfo typedOther = (TopologyMetricInfo)other;
-
- lastComparison = Boolean.valueOf(is_set_topology_id()).compareTo(typedOther.is_set_topology_id());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_topology_id()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.topology_id, typedOther.topology_id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_task_metric_list()).compareTo(typedOther.is_set_task_metric_list());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_task_metric_list()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.task_metric_list, typedOther.task_metric_list);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_worker_metric_list()).compareTo(typedOther.is_set_worker_metric_list());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_worker_metric_list()) {
- lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.worker_metric_list, typedOther.worker_metric_list);
- 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: // TOPOLOGY_ID
- if (field.type == org.apache.thrift7.protocol.TType.STRING) {
- this.topology_id = iprot.readString();
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // TASK_METRIC_LIST
- if (field.type == org.apache.thrift7.protocol.TType.LIST) {
- {
- org.apache.thrift7.protocol.TList _list259 = iprot.readListBegin();
- this.task_metric_list = new ArrayList<TaskMetricData>(_list259.size);
- for (int _i260 = 0; _i260 < _list259.size; ++_i260)
- {
- TaskMetricData _elem261; // required
- _elem261 = new TaskMetricData();
- _elem261.read(iprot);
- this.task_metric_list.add(_elem261);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // WORKER_METRIC_LIST
- if (field.type == org.apache.thrift7.protocol.TType.LIST) {
- {
- org.apache.thrift7.protocol.TList _list262 = iprot.readListBegin();
- this.worker_metric_list = new ArrayList<WorkerMetricData>(_list262.size);
- for (int _i263 = 0; _i263 < _list262.size; ++_i263)
- {
- WorkerMetricData _elem264; // required
- _elem264 = new WorkerMetricData();
- _elem264.read(iprot);
- this.worker_metric_list.add(_elem264);
- }
- iprot.readListEnd();
- }
- } 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.topology_id != null) {
- oprot.writeFieldBegin(TOPOLOGY_ID_FIELD_DESC);
- oprot.writeString(this.topology_id);
- oprot.writeFieldEnd();
- }
- if (this.task_metric_list != null) {
- if (is_set_task_metric_list()) {
- oprot.writeFieldBegin(TASK_METRIC_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRUCT, this.task_metric_list.size()));
- for (TaskMetricData _iter265 : this.task_metric_list)
- {
- _iter265.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- if (this.worker_metric_list != null) {
- if (is_set_worker_metric_list()) {
- oprot.writeFieldBegin(WORKER_METRIC_LIST_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift7.protocol.TList(org.apache.thrift7.protocol.TType.STRUCT, this.worker_metric_list.size()));
- for (WorkerMetricData _iter266 : this.worker_metric_list)
- {
- _iter266.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TopologyMetricInfo(");
- boolean first = true;
-
- sb.append("topology_id:");
- if (this.topology_id == null) {
- sb.append("null");
- } else {
- sb.append(this.topology_id);
- }
- first = false;
- if (is_set_task_metric_list()) {
- if (!first) sb.append(", ");
- sb.append("task_metric_list:");
- if (this.task_metric_list == null) {
- sb.append("null");
- } else {
- sb.append(this.task_metric_list);
- }
- first = false;
- }
- if (is_set_worker_metric_list()) {
- if (!first) sb.append(", ");
- sb.append("worker_metric_list:");
- if (this.worker_metric_list == null) {
- sb.append("null");
- } else {
- sb.append(this.worker_metric_list);
- }
- first = false;
- }
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift7.TException {
- // check for required fields
- if (!is_set_topology_id()) {
- throw new org.apache.thrift7.protocol.TProtocolException("Required field 'topology_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);
- }
- }
-
-}
-