You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2016/01/11 21:57:00 UTC
[04/53] [abbrv] [partial] storm git commit: STORM-1202: Migrate APIs
to org.apache.storm, but try to provide some form of backwards compatability
http://git-wip-us.apache.org/repos/asf/storm/blob/d839d1bf/storm-core/src/jvm/backtype/storm/generated/BoltStats.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/generated/BoltStats.java b/storm-core/src/jvm/backtype/storm/generated/BoltStats.java
deleted file mode 100644
index cbadd32..0000000
--- a/storm-core/src/jvm/backtype/storm/generated/BoltStats.java
+++ /dev/null
@@ -1,1390 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package backtype.storm.generated;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-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 javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class BoltStats implements org.apache.thrift.TBase<BoltStats, BoltStats._Fields>, java.io.Serializable, Cloneable, Comparable<BoltStats> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BoltStats");
-
- private static final org.apache.thrift.protocol.TField ACKED_FIELD_DESC = new org.apache.thrift.protocol.TField("acked", org.apache.thrift.protocol.TType.MAP, (short)1);
- private static final org.apache.thrift.protocol.TField FAILED_FIELD_DESC = new org.apache.thrift.protocol.TField("failed", org.apache.thrift.protocol.TType.MAP, (short)2);
- private static final org.apache.thrift.protocol.TField PROCESS_MS_AVG_FIELD_DESC = new org.apache.thrift.protocol.TField("process_ms_avg", org.apache.thrift.protocol.TType.MAP, (short)3);
- private static final org.apache.thrift.protocol.TField EXECUTED_FIELD_DESC = new org.apache.thrift.protocol.TField("executed", org.apache.thrift.protocol.TType.MAP, (short)4);
- private static final org.apache.thrift.protocol.TField EXECUTE_MS_AVG_FIELD_DESC = new org.apache.thrift.protocol.TField("execute_ms_avg", org.apache.thrift.protocol.TType.MAP, (short)5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new BoltStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new BoltStatsTupleSchemeFactory());
- }
-
- private Map<String,Map<GlobalStreamId,Long>> acked; // required
- private Map<String,Map<GlobalStreamId,Long>> failed; // required
- private Map<String,Map<GlobalStreamId,Double>> process_ms_avg; // required
- private Map<String,Map<GlobalStreamId,Long>> executed; // required
- private Map<String,Map<GlobalStreamId,Double>> execute_ms_avg; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ACKED((short)1, "acked"),
- FAILED((short)2, "failed"),
- PROCESS_MS_AVG((short)3, "process_ms_avg"),
- EXECUTED((short)4, "executed"),
- EXECUTE_MS_AVG((short)5, "execute_ms_avg");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ACKED
- return ACKED;
- case 2: // FAILED
- return FAILED;
- case 3: // PROCESS_MS_AVG
- return PROCESS_MS_AVG;
- case 4: // EXECUTED
- return EXECUTED;
- case 5: // EXECUTE_MS_AVG
- return EXECUTE_MS_AVG;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ACKED, new org.apache.thrift.meta_data.FieldMetaData("acked", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))));
- tmpMap.put(_Fields.FAILED, new org.apache.thrift.meta_data.FieldMetaData("failed", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))));
- tmpMap.put(_Fields.PROCESS_MS_AVG, new org.apache.thrift.meta_data.FieldMetaData("process_ms_avg", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))));
- tmpMap.put(_Fields.EXECUTED, new org.apache.thrift.meta_data.FieldMetaData("executed", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))));
- tmpMap.put(_Fields.EXECUTE_MS_AVG, new org.apache.thrift.meta_data.FieldMetaData("execute_ms_avg", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class),
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BoltStats.class, metaDataMap);
- }
-
- public BoltStats() {
- }
-
- public BoltStats(
- Map<String,Map<GlobalStreamId,Long>> acked,
- Map<String,Map<GlobalStreamId,Long>> failed,
- Map<String,Map<GlobalStreamId,Double>> process_ms_avg,
- Map<String,Map<GlobalStreamId,Long>> executed,
- Map<String,Map<GlobalStreamId,Double>> execute_ms_avg)
- {
- this();
- this.acked = acked;
- this.failed = failed;
- this.process_ms_avg = process_ms_avg;
- this.executed = executed;
- this.execute_ms_avg = execute_ms_avg;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public BoltStats(BoltStats other) {
- if (other.is_set_acked()) {
- Map<String,Map<GlobalStreamId,Long>> __this__acked = new HashMap<String,Map<GlobalStreamId,Long>>(other.acked.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.acked.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
-
- String __this__acked_copy_key = other_element_key;
-
- Map<GlobalStreamId,Long> __this__acked_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__acked_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Long __this__acked_copy_value_copy_value = other_element_value_element_value;
-
- __this__acked_copy_value.put(__this__acked_copy_value_copy_key, __this__acked_copy_value_copy_value);
- }
-
- __this__acked.put(__this__acked_copy_key, __this__acked_copy_value);
- }
- this.acked = __this__acked;
- }
- if (other.is_set_failed()) {
- Map<String,Map<GlobalStreamId,Long>> __this__failed = new HashMap<String,Map<GlobalStreamId,Long>>(other.failed.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.failed.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
-
- String __this__failed_copy_key = other_element_key;
-
- Map<GlobalStreamId,Long> __this__failed_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__failed_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Long __this__failed_copy_value_copy_value = other_element_value_element_value;
-
- __this__failed_copy_value.put(__this__failed_copy_value_copy_key, __this__failed_copy_value_copy_value);
- }
-
- __this__failed.put(__this__failed_copy_key, __this__failed_copy_value);
- }
- this.failed = __this__failed;
- }
- if (other.is_set_process_ms_avg()) {
- Map<String,Map<GlobalStreamId,Double>> __this__process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(other.process_ms_avg.size());
- for (Map.Entry<String, Map<GlobalStreamId,Double>> other_element : other.process_ms_avg.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Double> other_element_value = other_element.getValue();
-
- String __this__process_ms_avg_copy_key = other_element_key;
-
- Map<GlobalStreamId,Double> __this__process_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Double> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Double other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__process_ms_avg_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Double __this__process_ms_avg_copy_value_copy_value = other_element_value_element_value;
-
- __this__process_ms_avg_copy_value.put(__this__process_ms_avg_copy_value_copy_key, __this__process_ms_avg_copy_value_copy_value);
- }
-
- __this__process_ms_avg.put(__this__process_ms_avg_copy_key, __this__process_ms_avg_copy_value);
- }
- this.process_ms_avg = __this__process_ms_avg;
- }
- if (other.is_set_executed()) {
- Map<String,Map<GlobalStreamId,Long>> __this__executed = new HashMap<String,Map<GlobalStreamId,Long>>(other.executed.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> other_element : other.executed.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Long> other_element_value = other_element.getValue();
-
- String __this__executed_copy_key = other_element_key;
-
- Map<GlobalStreamId,Long> __this__executed_copy_value = new HashMap<GlobalStreamId,Long>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Long> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Long other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__executed_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Long __this__executed_copy_value_copy_value = other_element_value_element_value;
-
- __this__executed_copy_value.put(__this__executed_copy_value_copy_key, __this__executed_copy_value_copy_value);
- }
-
- __this__executed.put(__this__executed_copy_key, __this__executed_copy_value);
- }
- this.executed = __this__executed;
- }
- if (other.is_set_execute_ms_avg()) {
- Map<String,Map<GlobalStreamId,Double>> __this__execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(other.execute_ms_avg.size());
- for (Map.Entry<String, Map<GlobalStreamId,Double>> other_element : other.execute_ms_avg.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Map<GlobalStreamId,Double> other_element_value = other_element.getValue();
-
- String __this__execute_ms_avg_copy_key = other_element_key;
-
- Map<GlobalStreamId,Double> __this__execute_ms_avg_copy_value = new HashMap<GlobalStreamId,Double>(other_element_value.size());
- for (Map.Entry<GlobalStreamId, Double> other_element_value_element : other_element_value.entrySet()) {
-
- GlobalStreamId other_element_value_element_key = other_element_value_element.getKey();
- Double other_element_value_element_value = other_element_value_element.getValue();
-
- GlobalStreamId __this__execute_ms_avg_copy_value_copy_key = new GlobalStreamId(other_element_value_element_key);
-
- Double __this__execute_ms_avg_copy_value_copy_value = other_element_value_element_value;
-
- __this__execute_ms_avg_copy_value.put(__this__execute_ms_avg_copy_value_copy_key, __this__execute_ms_avg_copy_value_copy_value);
- }
-
- __this__execute_ms_avg.put(__this__execute_ms_avg_copy_key, __this__execute_ms_avg_copy_value);
- }
- this.execute_ms_avg = __this__execute_ms_avg;
- }
- }
-
- public BoltStats deepCopy() {
- return new BoltStats(this);
- }
-
- @Override
- public void clear() {
- this.acked = null;
- this.failed = null;
- this.process_ms_avg = null;
- this.executed = null;
- this.execute_ms_avg = null;
- }
-
- public int get_acked_size() {
- return (this.acked == null) ? 0 : this.acked.size();
- }
-
- public void put_to_acked(String key, Map<GlobalStreamId,Long> val) {
- if (this.acked == null) {
- this.acked = new HashMap<String,Map<GlobalStreamId,Long>>();
- }
- this.acked.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Long>> get_acked() {
- return this.acked;
- }
-
- public void set_acked(Map<String,Map<GlobalStreamId,Long>> acked) {
- this.acked = acked;
- }
-
- public void unset_acked() {
- this.acked = null;
- }
-
- /** Returns true if field acked is set (has been assigned a value) and false otherwise */
- public boolean is_set_acked() {
- return this.acked != null;
- }
-
- public void set_acked_isSet(boolean value) {
- if (!value) {
- this.acked = null;
- }
- }
-
- public int get_failed_size() {
- return (this.failed == null) ? 0 : this.failed.size();
- }
-
- public void put_to_failed(String key, Map<GlobalStreamId,Long> val) {
- if (this.failed == null) {
- this.failed = new HashMap<String,Map<GlobalStreamId,Long>>();
- }
- this.failed.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Long>> get_failed() {
- return this.failed;
- }
-
- public void set_failed(Map<String,Map<GlobalStreamId,Long>> failed) {
- this.failed = failed;
- }
-
- public void unset_failed() {
- this.failed = null;
- }
-
- /** Returns true if field failed is set (has been assigned a value) and false otherwise */
- public boolean is_set_failed() {
- return this.failed != null;
- }
-
- public void set_failed_isSet(boolean value) {
- if (!value) {
- this.failed = null;
- }
- }
-
- public int get_process_ms_avg_size() {
- return (this.process_ms_avg == null) ? 0 : this.process_ms_avg.size();
- }
-
- public void put_to_process_ms_avg(String key, Map<GlobalStreamId,Double> val) {
- if (this.process_ms_avg == null) {
- this.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>();
- }
- this.process_ms_avg.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Double>> get_process_ms_avg() {
- return this.process_ms_avg;
- }
-
- public void set_process_ms_avg(Map<String,Map<GlobalStreamId,Double>> process_ms_avg) {
- this.process_ms_avg = process_ms_avg;
- }
-
- public void unset_process_ms_avg() {
- this.process_ms_avg = null;
- }
-
- /** Returns true if field process_ms_avg is set (has been assigned a value) and false otherwise */
- public boolean is_set_process_ms_avg() {
- return this.process_ms_avg != null;
- }
-
- public void set_process_ms_avg_isSet(boolean value) {
- if (!value) {
- this.process_ms_avg = null;
- }
- }
-
- public int get_executed_size() {
- return (this.executed == null) ? 0 : this.executed.size();
- }
-
- public void put_to_executed(String key, Map<GlobalStreamId,Long> val) {
- if (this.executed == null) {
- this.executed = new HashMap<String,Map<GlobalStreamId,Long>>();
- }
- this.executed.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Long>> get_executed() {
- return this.executed;
- }
-
- public void set_executed(Map<String,Map<GlobalStreamId,Long>> executed) {
- this.executed = executed;
- }
-
- public void unset_executed() {
- this.executed = null;
- }
-
- /** Returns true if field executed is set (has been assigned a value) and false otherwise */
- public boolean is_set_executed() {
- return this.executed != null;
- }
-
- public void set_executed_isSet(boolean value) {
- if (!value) {
- this.executed = null;
- }
- }
-
- public int get_execute_ms_avg_size() {
- return (this.execute_ms_avg == null) ? 0 : this.execute_ms_avg.size();
- }
-
- public void put_to_execute_ms_avg(String key, Map<GlobalStreamId,Double> val) {
- if (this.execute_ms_avg == null) {
- this.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>();
- }
- this.execute_ms_avg.put(key, val);
- }
-
- public Map<String,Map<GlobalStreamId,Double>> get_execute_ms_avg() {
- return this.execute_ms_avg;
- }
-
- public void set_execute_ms_avg(Map<String,Map<GlobalStreamId,Double>> execute_ms_avg) {
- this.execute_ms_avg = execute_ms_avg;
- }
-
- public void unset_execute_ms_avg() {
- this.execute_ms_avg = null;
- }
-
- /** Returns true if field execute_ms_avg is set (has been assigned a value) and false otherwise */
- public boolean is_set_execute_ms_avg() {
- return this.execute_ms_avg != null;
- }
-
- public void set_execute_ms_avg_isSet(boolean value) {
- if (!value) {
- this.execute_ms_avg = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ACKED:
- if (value == null) {
- unset_acked();
- } else {
- set_acked((Map<String,Map<GlobalStreamId,Long>>)value);
- }
- break;
-
- case FAILED:
- if (value == null) {
- unset_failed();
- } else {
- set_failed((Map<String,Map<GlobalStreamId,Long>>)value);
- }
- break;
-
- case PROCESS_MS_AVG:
- if (value == null) {
- unset_process_ms_avg();
- } else {
- set_process_ms_avg((Map<String,Map<GlobalStreamId,Double>>)value);
- }
- break;
-
- case EXECUTED:
- if (value == null) {
- unset_executed();
- } else {
- set_executed((Map<String,Map<GlobalStreamId,Long>>)value);
- }
- break;
-
- case EXECUTE_MS_AVG:
- if (value == null) {
- unset_execute_ms_avg();
- } else {
- set_execute_ms_avg((Map<String,Map<GlobalStreamId,Double>>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ACKED:
- return get_acked();
-
- case FAILED:
- return get_failed();
-
- case PROCESS_MS_AVG:
- return get_process_ms_avg();
-
- case EXECUTED:
- return get_executed();
-
- case EXECUTE_MS_AVG:
- return get_execute_ms_avg();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ACKED:
- return is_set_acked();
- case FAILED:
- return is_set_failed();
- case PROCESS_MS_AVG:
- return is_set_process_ms_avg();
- case EXECUTED:
- return is_set_executed();
- case EXECUTE_MS_AVG:
- return is_set_execute_ms_avg();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof BoltStats)
- return this.equals((BoltStats)that);
- return false;
- }
-
- public boolean equals(BoltStats that) {
- if (that == null)
- return false;
-
- boolean this_present_acked = true && this.is_set_acked();
- boolean that_present_acked = true && that.is_set_acked();
- if (this_present_acked || that_present_acked) {
- if (!(this_present_acked && that_present_acked))
- return false;
- if (!this.acked.equals(that.acked))
- return false;
- }
-
- boolean this_present_failed = true && this.is_set_failed();
- boolean that_present_failed = true && that.is_set_failed();
- if (this_present_failed || that_present_failed) {
- if (!(this_present_failed && that_present_failed))
- return false;
- if (!this.failed.equals(that.failed))
- return false;
- }
-
- boolean this_present_process_ms_avg = true && this.is_set_process_ms_avg();
- boolean that_present_process_ms_avg = true && that.is_set_process_ms_avg();
- if (this_present_process_ms_avg || that_present_process_ms_avg) {
- if (!(this_present_process_ms_avg && that_present_process_ms_avg))
- return false;
- if (!this.process_ms_avg.equals(that.process_ms_avg))
- return false;
- }
-
- boolean this_present_executed = true && this.is_set_executed();
- boolean that_present_executed = true && that.is_set_executed();
- if (this_present_executed || that_present_executed) {
- if (!(this_present_executed && that_present_executed))
- return false;
- if (!this.executed.equals(that.executed))
- return false;
- }
-
- boolean this_present_execute_ms_avg = true && this.is_set_execute_ms_avg();
- boolean that_present_execute_ms_avg = true && that.is_set_execute_ms_avg();
- if (this_present_execute_ms_avg || that_present_execute_ms_avg) {
- if (!(this_present_execute_ms_avg && that_present_execute_ms_avg))
- return false;
- if (!this.execute_ms_avg.equals(that.execute_ms_avg))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_acked = true && (is_set_acked());
- list.add(present_acked);
- if (present_acked)
- list.add(acked);
-
- boolean present_failed = true && (is_set_failed());
- list.add(present_failed);
- if (present_failed)
- list.add(failed);
-
- boolean present_process_ms_avg = true && (is_set_process_ms_avg());
- list.add(present_process_ms_avg);
- if (present_process_ms_avg)
- list.add(process_ms_avg);
-
- boolean present_executed = true && (is_set_executed());
- list.add(present_executed);
- if (present_executed)
- list.add(executed);
-
- boolean present_execute_ms_avg = true && (is_set_execute_ms_avg());
- list.add(present_execute_ms_avg);
- if (present_execute_ms_avg)
- list.add(execute_ms_avg);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(BoltStats other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(is_set_acked()).compareTo(other.is_set_acked());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_acked()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acked, other.acked);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_failed()).compareTo(other.is_set_failed());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_failed()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failed, other.failed);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_process_ms_avg()).compareTo(other.is_set_process_ms_avg());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_process_ms_avg()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.process_ms_avg, other.process_ms_avg);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_executed()).compareTo(other.is_set_executed());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_executed()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executed, other.executed);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_execute_ms_avg()).compareTo(other.is_set_execute_ms_avg());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_execute_ms_avg()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.execute_ms_avg, other.execute_ms_avg);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("BoltStats(");
- boolean first = true;
-
- sb.append("acked:");
- if (this.acked == null) {
- sb.append("null");
- } else {
- sb.append(this.acked);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("failed:");
- if (this.failed == null) {
- sb.append("null");
- } else {
- sb.append(this.failed);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("process_ms_avg:");
- if (this.process_ms_avg == null) {
- sb.append("null");
- } else {
- sb.append(this.process_ms_avg);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("executed:");
- if (this.executed == null) {
- sb.append("null");
- } else {
- sb.append(this.executed);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("execute_ms_avg:");
- if (this.execute_ms_avg == null) {
- sb.append("null");
- } else {
- sb.append(this.execute_ms_avg);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!is_set_acked()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'acked' is unset! Struct:" + toString());
- }
-
- if (!is_set_failed()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'failed' is unset! Struct:" + toString());
- }
-
- if (!is_set_process_ms_avg()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'process_ms_avg' is unset! Struct:" + toString());
- }
-
- if (!is_set_executed()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'executed' is unset! Struct:" + toString());
- }
-
- if (!is_set_execute_ms_avg()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'execute_ms_avg' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.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.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class BoltStatsStandardSchemeFactory implements SchemeFactory {
- public BoltStatsStandardScheme getScheme() {
- return new BoltStatsStandardScheme();
- }
- }
-
- private static class BoltStatsStandardScheme extends StandardScheme<BoltStats> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, BoltStats struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ACKED
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map116 = iprot.readMapBegin();
- struct.acked = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map116.size);
- String _key117;
- Map<GlobalStreamId,Long> _val118;
- for (int _i119 = 0; _i119 < _map116.size; ++_i119)
- {
- _key117 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map120 = iprot.readMapBegin();
- _val118 = new HashMap<GlobalStreamId,Long>(2*_map120.size);
- GlobalStreamId _key121;
- long _val122;
- for (int _i123 = 0; _i123 < _map120.size; ++_i123)
- {
- _key121 = new GlobalStreamId();
- _key121.read(iprot);
- _val122 = iprot.readI64();
- _val118.put(_key121, _val122);
- }
- iprot.readMapEnd();
- }
- struct.acked.put(_key117, _val118);
- }
- iprot.readMapEnd();
- }
- struct.set_acked_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // FAILED
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map124 = iprot.readMapBegin();
- struct.failed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map124.size);
- String _key125;
- Map<GlobalStreamId,Long> _val126;
- for (int _i127 = 0; _i127 < _map124.size; ++_i127)
- {
- _key125 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map128 = iprot.readMapBegin();
- _val126 = new HashMap<GlobalStreamId,Long>(2*_map128.size);
- GlobalStreamId _key129;
- long _val130;
- for (int _i131 = 0; _i131 < _map128.size; ++_i131)
- {
- _key129 = new GlobalStreamId();
- _key129.read(iprot);
- _val130 = iprot.readI64();
- _val126.put(_key129, _val130);
- }
- iprot.readMapEnd();
- }
- struct.failed.put(_key125, _val126);
- }
- iprot.readMapEnd();
- }
- struct.set_failed_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // PROCESS_MS_AVG
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map132 = iprot.readMapBegin();
- struct.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map132.size);
- String _key133;
- Map<GlobalStreamId,Double> _val134;
- for (int _i135 = 0; _i135 < _map132.size; ++_i135)
- {
- _key133 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map136 = iprot.readMapBegin();
- _val134 = new HashMap<GlobalStreamId,Double>(2*_map136.size);
- GlobalStreamId _key137;
- double _val138;
- for (int _i139 = 0; _i139 < _map136.size; ++_i139)
- {
- _key137 = new GlobalStreamId();
- _key137.read(iprot);
- _val138 = iprot.readDouble();
- _val134.put(_key137, _val138);
- }
- iprot.readMapEnd();
- }
- struct.process_ms_avg.put(_key133, _val134);
- }
- iprot.readMapEnd();
- }
- struct.set_process_ms_avg_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // EXECUTED
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map140 = iprot.readMapBegin();
- struct.executed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map140.size);
- String _key141;
- Map<GlobalStreamId,Long> _val142;
- for (int _i143 = 0; _i143 < _map140.size; ++_i143)
- {
- _key141 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map144 = iprot.readMapBegin();
- _val142 = new HashMap<GlobalStreamId,Long>(2*_map144.size);
- GlobalStreamId _key145;
- long _val146;
- for (int _i147 = 0; _i147 < _map144.size; ++_i147)
- {
- _key145 = new GlobalStreamId();
- _key145.read(iprot);
- _val146 = iprot.readI64();
- _val142.put(_key145, _val146);
- }
- iprot.readMapEnd();
- }
- struct.executed.put(_key141, _val142);
- }
- iprot.readMapEnd();
- }
- struct.set_executed_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 5: // EXECUTE_MS_AVG
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map148 = iprot.readMapBegin();
- struct.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map148.size);
- String _key149;
- Map<GlobalStreamId,Double> _val150;
- for (int _i151 = 0; _i151 < _map148.size; ++_i151)
- {
- _key149 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map152 = iprot.readMapBegin();
- _val150 = new HashMap<GlobalStreamId,Double>(2*_map152.size);
- GlobalStreamId _key153;
- double _val154;
- for (int _i155 = 0; _i155 < _map152.size; ++_i155)
- {
- _key153 = new GlobalStreamId();
- _key153.read(iprot);
- _val154 = iprot.readDouble();
- _val150.put(_key153, _val154);
- }
- iprot.readMapEnd();
- }
- struct.execute_ms_avg.put(_key149, _val150);
- }
- iprot.readMapEnd();
- }
- struct.set_execute_ms_avg_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, BoltStats struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.acked != null) {
- oprot.writeFieldBegin(ACKED_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.acked.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter156 : struct.acked.entrySet())
- {
- oprot.writeString(_iter156.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter156.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter157 : _iter156.getValue().entrySet())
- {
- _iter157.getKey().write(oprot);
- oprot.writeI64(_iter157.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.failed != null) {
- oprot.writeFieldBegin(FAILED_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.failed.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter158 : struct.failed.entrySet())
- {
- oprot.writeString(_iter158.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter158.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter159 : _iter158.getValue().entrySet())
- {
- _iter159.getKey().write(oprot);
- oprot.writeI64(_iter159.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.process_ms_avg != null) {
- oprot.writeFieldBegin(PROCESS_MS_AVG_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.process_ms_avg.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter160 : struct.process_ms_avg.entrySet())
- {
- oprot.writeString(_iter160.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter160.getValue().size()));
- for (Map.Entry<GlobalStreamId, Double> _iter161 : _iter160.getValue().entrySet())
- {
- _iter161.getKey().write(oprot);
- oprot.writeDouble(_iter161.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.executed != null) {
- oprot.writeFieldBegin(EXECUTED_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.executed.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter162 : struct.executed.entrySet())
- {
- oprot.writeString(_iter162.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter162.getValue().size()));
- for (Map.Entry<GlobalStreamId, Long> _iter163 : _iter162.getValue().entrySet())
- {
- _iter163.getKey().write(oprot);
- oprot.writeI64(_iter163.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.execute_ms_avg != null) {
- oprot.writeFieldBegin(EXECUTE_MS_AVG_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.execute_ms_avg.size()));
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter164 : struct.execute_ms_avg.entrySet())
- {
- oprot.writeString(_iter164.getKey());
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter164.getValue().size()));
- for (Map.Entry<GlobalStreamId, Double> _iter165 : _iter164.getValue().entrySet())
- {
- _iter165.getKey().write(oprot);
- oprot.writeDouble(_iter165.getValue());
- }
- oprot.writeMapEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class BoltStatsTupleSchemeFactory implements SchemeFactory {
- public BoltStatsTupleScheme getScheme() {
- return new BoltStatsTupleScheme();
- }
- }
-
- private static class BoltStatsTupleScheme extends TupleScheme<BoltStats> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, BoltStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- {
- oprot.writeI32(struct.acked.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter166 : struct.acked.entrySet())
- {
- oprot.writeString(_iter166.getKey());
- {
- oprot.writeI32(_iter166.getValue().size());
- for (Map.Entry<GlobalStreamId, Long> _iter167 : _iter166.getValue().entrySet())
- {
- _iter167.getKey().write(oprot);
- oprot.writeI64(_iter167.getValue());
- }
- }
- }
- }
- {
- oprot.writeI32(struct.failed.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter168 : struct.failed.entrySet())
- {
- oprot.writeString(_iter168.getKey());
- {
- oprot.writeI32(_iter168.getValue().size());
- for (Map.Entry<GlobalStreamId, Long> _iter169 : _iter168.getValue().entrySet())
- {
- _iter169.getKey().write(oprot);
- oprot.writeI64(_iter169.getValue());
- }
- }
- }
- }
- {
- oprot.writeI32(struct.process_ms_avg.size());
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter170 : struct.process_ms_avg.entrySet())
- {
- oprot.writeString(_iter170.getKey());
- {
- oprot.writeI32(_iter170.getValue().size());
- for (Map.Entry<GlobalStreamId, Double> _iter171 : _iter170.getValue().entrySet())
- {
- _iter171.getKey().write(oprot);
- oprot.writeDouble(_iter171.getValue());
- }
- }
- }
- }
- {
- oprot.writeI32(struct.executed.size());
- for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter172 : struct.executed.entrySet())
- {
- oprot.writeString(_iter172.getKey());
- {
- oprot.writeI32(_iter172.getValue().size());
- for (Map.Entry<GlobalStreamId, Long> _iter173 : _iter172.getValue().entrySet())
- {
- _iter173.getKey().write(oprot);
- oprot.writeI64(_iter173.getValue());
- }
- }
- }
- }
- {
- oprot.writeI32(struct.execute_ms_avg.size());
- for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter174 : struct.execute_ms_avg.entrySet())
- {
- oprot.writeString(_iter174.getKey());
- {
- oprot.writeI32(_iter174.getValue().size());
- for (Map.Entry<GlobalStreamId, Double> _iter175 : _iter174.getValue().entrySet())
- {
- _iter175.getKey().write(oprot);
- oprot.writeDouble(_iter175.getValue());
- }
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, BoltStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- {
- org.apache.thrift.protocol.TMap _map176 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.acked = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map176.size);
- String _key177;
- Map<GlobalStreamId,Long> _val178;
- for (int _i179 = 0; _i179 < _map176.size; ++_i179)
- {
- _key177 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map180 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val178 = new HashMap<GlobalStreamId,Long>(2*_map180.size);
- GlobalStreamId _key181;
- long _val182;
- for (int _i183 = 0; _i183 < _map180.size; ++_i183)
- {
- _key181 = new GlobalStreamId();
- _key181.read(iprot);
- _val182 = iprot.readI64();
- _val178.put(_key181, _val182);
- }
- }
- struct.acked.put(_key177, _val178);
- }
- }
- struct.set_acked_isSet(true);
- {
- org.apache.thrift.protocol.TMap _map184 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.failed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map184.size);
- String _key185;
- Map<GlobalStreamId,Long> _val186;
- for (int _i187 = 0; _i187 < _map184.size; ++_i187)
- {
- _key185 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map188 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val186 = new HashMap<GlobalStreamId,Long>(2*_map188.size);
- GlobalStreamId _key189;
- long _val190;
- for (int _i191 = 0; _i191 < _map188.size; ++_i191)
- {
- _key189 = new GlobalStreamId();
- _key189.read(iprot);
- _val190 = iprot.readI64();
- _val186.put(_key189, _val190);
- }
- }
- struct.failed.put(_key185, _val186);
- }
- }
- struct.set_failed_isSet(true);
- {
- org.apache.thrift.protocol.TMap _map192 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map192.size);
- String _key193;
- Map<GlobalStreamId,Double> _val194;
- for (int _i195 = 0; _i195 < _map192.size; ++_i195)
- {
- _key193 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map196 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- _val194 = new HashMap<GlobalStreamId,Double>(2*_map196.size);
- GlobalStreamId _key197;
- double _val198;
- for (int _i199 = 0; _i199 < _map196.size; ++_i199)
- {
- _key197 = new GlobalStreamId();
- _key197.read(iprot);
- _val198 = iprot.readDouble();
- _val194.put(_key197, _val198);
- }
- }
- struct.process_ms_avg.put(_key193, _val194);
- }
- }
- struct.set_process_ms_avg_isSet(true);
- {
- org.apache.thrift.protocol.TMap _map200 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.executed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map200.size);
- String _key201;
- Map<GlobalStreamId,Long> _val202;
- for (int _i203 = 0; _i203 < _map200.size; ++_i203)
- {
- _key201 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map204 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- _val202 = new HashMap<GlobalStreamId,Long>(2*_map204.size);
- GlobalStreamId _key205;
- long _val206;
- for (int _i207 = 0; _i207 < _map204.size; ++_i207)
- {
- _key205 = new GlobalStreamId();
- _key205.read(iprot);
- _val206 = iprot.readI64();
- _val202.put(_key205, _val206);
- }
- }
- struct.executed.put(_key201, _val202);
- }
- }
- struct.set_executed_isSet(true);
- {
- org.apache.thrift.protocol.TMap _map208 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map208.size);
- String _key209;
- Map<GlobalStreamId,Double> _val210;
- for (int _i211 = 0; _i211 < _map208.size; ++_i211)
- {
- _key209 = iprot.readString();
- {
- org.apache.thrift.protocol.TMap _map212 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- _val210 = new HashMap<GlobalStreamId,Double>(2*_map212.size);
- GlobalStreamId _key213;
- double _val214;
- for (int _i215 = 0; _i215 < _map212.size; ++_i215)
- {
- _key213 = new GlobalStreamId();
- _key213.read(iprot);
- _val214 = iprot.readDouble();
- _val210.put(_key213, _val214);
- }
- }
- struct.execute_ms_avg.put(_key209, _val210);
- }
- }
- struct.set_execute_ms_avg_isSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/storm/blob/d839d1bf/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java b/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java
deleted file mode 100644
index 9c42427..0000000
--- a/storm-core/src/jvm/backtype/storm/generated/ClusterSummary.java
+++ /dev/null
@@ -1,879 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Autogenerated by Thrift Compiler (0.9.3)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
- */
-package backtype.storm.generated;
-
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-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 javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class ClusterSummary implements org.apache.thrift.TBase<ClusterSummary, ClusterSummary._Fields>, java.io.Serializable, Cloneable, Comparable<ClusterSummary> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClusterSummary");
-
- private static final org.apache.thrift.protocol.TField SUPERVISORS_FIELD_DESC = new org.apache.thrift.protocol.TField("supervisors", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final org.apache.thrift.protocol.TField NIMBUS_UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("nimbus_uptime_secs", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final org.apache.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.thrift.protocol.TField("topologies", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final org.apache.thrift.protocol.TField NIMBUSES_FIELD_DESC = new org.apache.thrift.protocol.TField("nimbuses", org.apache.thrift.protocol.TType.LIST, (short)4);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ClusterSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ClusterSummaryTupleSchemeFactory());
- }
-
- private List<SupervisorSummary> supervisors; // required
- private int nimbus_uptime_secs; // optional
- private List<TopologySummary> topologies; // required
- private List<NimbusSummary> nimbuses; // required
-
- /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
- public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUPERVISORS((short)1, "supervisors"),
- NIMBUS_UPTIME_SECS((short)2, "nimbus_uptime_secs"),
- TOPOLOGIES((short)3, "topologies"),
- NIMBUSES((short)4, "nimbuses");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // SUPERVISORS
- return SUPERVISORS;
- case 2: // NIMBUS_UPTIME_SECS
- return NIMBUS_UPTIME_SECS;
- case 3: // TOPOLOGIES
- return TOPOLOGIES;
- case 4: // NIMBUSES
- return NIMBUSES;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __NIMBUS_UPTIME_SECS_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.NIMBUS_UPTIME_SECS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
- static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUPERVISORS, new org.apache.thrift.meta_data.FieldMetaData("supervisors", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SupervisorSummary.class))));
- tmpMap.put(_Fields.NIMBUS_UPTIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("nimbus_uptime_secs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.TOPOLOGIES, new org.apache.thrift.meta_data.FieldMetaData("topologies", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TopologySummary.class))));
- tmpMap.put(_Fields.NIMBUSES, new org.apache.thrift.meta_data.FieldMetaData("nimbuses", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NimbusSummary.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClusterSummary.class, metaDataMap);
- }
-
- public ClusterSummary() {
- this.nimbus_uptime_secs = 0;
-
- }
-
- public ClusterSummary(
- List<SupervisorSummary> supervisors,
- List<TopologySummary> topologies,
- List<NimbusSummary> nimbuses)
- {
- this();
- this.supervisors = supervisors;
- this.topologies = topologies;
- this.nimbuses = nimbuses;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public ClusterSummary(ClusterSummary other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.is_set_supervisors()) {
- List<SupervisorSummary> __this__supervisors = new ArrayList<SupervisorSummary>(other.supervisors.size());
- for (SupervisorSummary other_element : other.supervisors) {
- __this__supervisors.add(new SupervisorSummary(other_element));
- }
- this.supervisors = __this__supervisors;
- }
- this.nimbus_uptime_secs = other.nimbus_uptime_secs;
- if (other.is_set_topologies()) {
- List<TopologySummary> __this__topologies = new ArrayList<TopologySummary>(other.topologies.size());
- for (TopologySummary other_element : other.topologies) {
- __this__topologies.add(new TopologySummary(other_element));
- }
- this.topologies = __this__topologies;
- }
- if (other.is_set_nimbuses()) {
- List<NimbusSummary> __this__nimbuses = new ArrayList<NimbusSummary>(other.nimbuses.size());
- for (NimbusSummary other_element : other.nimbuses) {
- __this__nimbuses.add(new NimbusSummary(other_element));
- }
- this.nimbuses = __this__nimbuses;
- }
- }
-
- public ClusterSummary deepCopy() {
- return new ClusterSummary(this);
- }
-
- @Override
- public void clear() {
- this.supervisors = null;
- this.nimbus_uptime_secs = 0;
-
- this.topologies = null;
- this.nimbuses = null;
- }
-
- public int get_supervisors_size() {
- return (this.supervisors == null) ? 0 : this.supervisors.size();
- }
-
- public java.util.Iterator<SupervisorSummary> get_supervisors_iterator() {
- return (this.supervisors == null) ? null : this.supervisors.iterator();
- }
-
- public void add_to_supervisors(SupervisorSummary elem) {
- if (this.supervisors == null) {
- this.supervisors = new ArrayList<SupervisorSummary>();
- }
- this.supervisors.add(elem);
- }
-
- public List<SupervisorSummary> get_supervisors() {
- return this.supervisors;
- }
-
- public void set_supervisors(List<SupervisorSummary> supervisors) {
- this.supervisors = supervisors;
- }
-
- public void unset_supervisors() {
- this.supervisors = null;
- }
-
- /** Returns true if field supervisors is set (has been assigned a value) and false otherwise */
- public boolean is_set_supervisors() {
- return this.supervisors != null;
- }
-
- public void set_supervisors_isSet(boolean value) {
- if (!value) {
- this.supervisors = null;
- }
- }
-
- public int get_nimbus_uptime_secs() {
- return this.nimbus_uptime_secs;
- }
-
- public void set_nimbus_uptime_secs(int nimbus_uptime_secs) {
- this.nimbus_uptime_secs = nimbus_uptime_secs;
- set_nimbus_uptime_secs_isSet(true);
- }
-
- public void unset_nimbus_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
- }
-
- /** Returns true if field nimbus_uptime_secs is set (has been assigned a value) and false otherwise */
- public boolean is_set_nimbus_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID);
- }
-
- public void set_nimbus_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID, value);
- }
-
- public int get_topologies_size() {
- return (this.topologies == null) ? 0 : this.topologies.size();
- }
-
- public java.util.Iterator<TopologySummary> get_topologies_iterator() {
- return (this.topologies == null) ? null : this.topologies.iterator();
- }
-
- public void add_to_topologies(TopologySummary elem) {
- if (this.topologies == null) {
- this.topologies = new ArrayList<TopologySummary>();
- }
- this.topologies.add(elem);
- }
-
- public List<TopologySummary> get_topologies() {
- return this.topologies;
- }
-
- public void set_topologies(List<TopologySummary> topologies) {
- this.topologies = topologies;
- }
-
- public void unset_topologies() {
- this.topologies = null;
- }
-
- /** Returns true if field topologies is set (has been assigned a value) and false otherwise */
- public boolean is_set_topologies() {
- return this.topologies != null;
- }
-
- public void set_topologies_isSet(boolean value) {
- if (!value) {
- this.topologies = null;
- }
- }
-
- public int get_nimbuses_size() {
- return (this.nimbuses == null) ? 0 : this.nimbuses.size();
- }
-
- public java.util.Iterator<NimbusSummary> get_nimbuses_iterator() {
- return (this.nimbuses == null) ? null : this.nimbuses.iterator();
- }
-
- public void add_to_nimbuses(NimbusSummary elem) {
- if (this.nimbuses == null) {
- this.nimbuses = new ArrayList<NimbusSummary>();
- }
- this.nimbuses.add(elem);
- }
-
- public List<NimbusSummary> get_nimbuses() {
- return this.nimbuses;
- }
-
- public void set_nimbuses(List<NimbusSummary> nimbuses) {
- this.nimbuses = nimbuses;
- }
-
- public void unset_nimbuses() {
- this.nimbuses = null;
- }
-
- /** Returns true if field nimbuses is set (has been assigned a value) and false otherwise */
- public boolean is_set_nimbuses() {
- return this.nimbuses != null;
- }
-
- public void set_nimbuses_isSet(boolean value) {
- if (!value) {
- this.nimbuses = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case SUPERVISORS:
- if (value == null) {
- unset_supervisors();
- } else {
- set_supervisors((List<SupervisorSummary>)value);
- }
- break;
-
- case NIMBUS_UPTIME_SECS:
- if (value == null) {
- unset_nimbus_uptime_secs();
- } else {
- set_nimbus_uptime_secs((Integer)value);
- }
- break;
-
- case TOPOLOGIES:
- if (value == null) {
- unset_topologies();
- } else {
- set_topologies((List<TopologySummary>)value);
- }
- break;
-
- case NIMBUSES:
- if (value == null) {
- unset_nimbuses();
- } else {
- set_nimbuses((List<NimbusSummary>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case SUPERVISORS:
- return get_supervisors();
-
- case NIMBUS_UPTIME_SECS:
- return get_nimbus_uptime_secs();
-
- case TOPOLOGIES:
- return get_topologies();
-
- case NIMBUSES:
- return get_nimbuses();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case SUPERVISORS:
- return is_set_supervisors();
- case NIMBUS_UPTIME_SECS:
- return is_set_nimbus_uptime_secs();
- case TOPOLOGIES:
- return is_set_topologies();
- case NIMBUSES:
- return is_set_nimbuses();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof ClusterSummary)
- return this.equals((ClusterSummary)that);
- return false;
- }
-
- public boolean equals(ClusterSummary that) {
- if (that == null)
- return false;
-
- boolean this_present_supervisors = true && this.is_set_supervisors();
- boolean that_present_supervisors = true && that.is_set_supervisors();
- if (this_present_supervisors || that_present_supervisors) {
- if (!(this_present_supervisors && that_present_supervisors))
- return false;
- if (!this.supervisors.equals(that.supervisors))
- return false;
- }
-
- boolean this_present_nimbus_uptime_secs = true && this.is_set_nimbus_uptime_secs();
- boolean that_present_nimbus_uptime_secs = true && that.is_set_nimbus_uptime_secs();
- if (this_present_nimbus_uptime_secs || that_present_nimbus_uptime_secs) {
- if (!(this_present_nimbus_uptime_secs && that_present_nimbus_uptime_secs))
- return false;
- if (this.nimbus_uptime_secs != that.nimbus_uptime_secs)
- return false;
- }
-
- boolean this_present_topologies = true && this.is_set_topologies();
- boolean that_present_topologies = true && that.is_set_topologies();
- if (this_present_topologies || that_present_topologies) {
- if (!(this_present_topologies && that_present_topologies))
- return false;
- if (!this.topologies.equals(that.topologies))
- return false;
- }
-
- boolean this_present_nimbuses = true && this.is_set_nimbuses();
- boolean that_present_nimbuses = true && that.is_set_nimbuses();
- if (this_present_nimbuses || that_present_nimbuses) {
- if (!(this_present_nimbuses && that_present_nimbuses))
- return false;
- if (!this.nimbuses.equals(that.nimbuses))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_supervisors = true && (is_set_supervisors());
- list.add(present_supervisors);
- if (present_supervisors)
- list.add(supervisors);
-
- boolean present_nimbus_uptime_secs = true && (is_set_nimbus_uptime_secs());
- list.add(present_nimbus_uptime_secs);
- if (present_nimbus_uptime_secs)
- list.add(nimbus_uptime_secs);
-
- boolean present_topologies = true && (is_set_topologies());
- list.add(present_topologies);
- if (present_topologies)
- list.add(topologies);
-
- boolean present_nimbuses = true && (is_set_nimbuses());
- list.add(present_nimbuses);
- if (present_nimbuses)
- list.add(nimbuses);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(ClusterSummary other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(is_set_supervisors()).compareTo(other.is_set_supervisors());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_supervisors()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supervisors, other.supervisors);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_nimbus_uptime_secs()).compareTo(other.is_set_nimbus_uptime_secs());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_nimbus_uptime_secs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nimbus_uptime_secs, other.nimbus_uptime_secs);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_topologies()).compareTo(other.is_set_topologies());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_topologies()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.topologies, other.topologies);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(is_set_nimbuses()).compareTo(other.is_set_nimbuses());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (is_set_nimbuses()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nimbuses, other.nimbuses);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ClusterSummary(");
- boolean first = true;
-
- sb.append("supervisors:");
- if (this.supervisors == null) {
- sb.append("null");
- } else {
- sb.append(this.supervisors);
- }
- first = false;
- if (is_set_nimbus_uptime_secs()) {
- if (!first) sb.append(", ");
- sb.append("nimbus_uptime_secs:");
- sb.append(this.nimbus_uptime_secs);
- first = false;
- }
- if (!first) sb.append(", ");
- sb.append("topologies:");
- if (this.topologies == null) {
- sb.append("null");
- } else {
- sb.append(this.topologies);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("nimbuses:");
- if (this.nimbuses == null) {
- sb.append("null");
- } else {
- sb.append(this.nimbuses);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!is_set_supervisors()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'supervisors' is unset! Struct:" + toString());
- }
-
- if (!is_set_topologies()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'topologies' is unset! Struct:" + toString());
- }
-
- if (!is_set_nimbuses()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'nimbuses' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.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_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class ClusterSummaryStandardSchemeFactory implements SchemeFactory {
- public ClusterSummaryStandardScheme getScheme() {
- return new ClusterSummaryStandardScheme();
- }
- }
-
- private static class ClusterSummaryStandardScheme extends StandardScheme<ClusterSummary> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, ClusterSummary struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // SUPERVISORS
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list92 = iprot.readListBegin();
- struct.supervisors = new ArrayList<SupervisorSummary>(_list92.size);
- SupervisorSummary _elem93;
- for (int _i94 = 0; _i94 < _list92.size; ++_i94)
- {
- _elem93 = new SupervisorSummary();
- _elem93.read(iprot);
- struct.supervisors.add(_elem93);
- }
- iprot.readListEnd();
- }
- struct.set_supervisors_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // NIMBUS_UPTIME_SECS
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.nimbus_uptime_secs = iprot.readI32();
- struct.set_nimbus_uptime_secs_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // TOPOLOGIES
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list95 = iprot.readListBegin();
- struct.topologies = new ArrayList<TopologySummary>(_list95.size);
- TopologySummary _elem96;
- for (int _i97 = 0; _i97 < _list95.size; ++_i97)
- {
- _elem96 = new TopologySummary();
- _elem96.read(iprot);
- struct.topologies.add(_elem96);
- }
- iprot.readListEnd();
- }
- struct.set_topologies_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 4: // NIMBUSES
- if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list98 = iprot.readListBegin();
- struct.nimbuses = new ArrayList<NimbusSummary>(_list98.size);
- NimbusSummary _elem99;
- for (int _i100 = 0; _i100 < _list98.size; ++_i100)
- {
- _elem99 = new NimbusSummary();
- _elem99.read(iprot);
- struct.nimbuses.add(_elem99);
- }
- iprot.readListEnd();
- }
- struct.set_nimbuses_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, ClusterSummary struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.supervisors != null) {
- oprot.writeFieldBegin(SUPERVISORS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.supervisors.size()));
- for (SupervisorSummary _iter101 : struct.supervisors)
- {
- _iter101.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.is_set_nimbus_uptime_secs()) {
- oprot.writeFieldBegin(NIMBUS_UPTIME_SECS_FIELD_DESC);
- oprot.writeI32(struct.nimbus_uptime_secs);
- oprot.writeFieldEnd();
- }
- if (struct.topologies != null) {
- oprot.writeFieldBegin(TOPOLOGIES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.topologies.size()));
- for (TopologySummary _iter102 : struct.topologies)
- {
- _iter102.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.nimbuses != null) {
- oprot.writeFieldBegin(NIMBUSES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nimbuses.size()));
- for (NimbusSummary _iter103 : struct.nimbuses)
- {
- _iter103.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class ClusterSummaryTupleSchemeFactory implements SchemeFactory {
- public ClusterSummaryTupleScheme getScheme() {
- return new ClusterSummaryTupleScheme();
- }
- }
-
- private static class ClusterSummaryTupleScheme extends TupleScheme<ClusterSummary> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ClusterSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- {
- oprot.writeI32(struct.supervisors.size());
- for (SupervisorSummary _iter104 : struct.supervisors)
- {
- _iter104.write(oprot);
- }
- }
- {
- oprot.writeI32(struct.topologies.size());
- for (TopologySummary _iter105 : struct.topologies)
- {
- _iter105.write(oprot);
- }
- }
- {
- oprot.writeI32(struct.nimbuses.size());
- for (NimbusSummary _iter106 : struct.nimbuses)
- {
- _iter106.write(oprot);
- }
- }
- BitSet optionals = new BitSet();
- if (struct.is_set_nimbus_uptime_secs()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.is_set_nimbus_uptime_secs()) {
- oprot.writeI32(struct.nimbus_uptime_secs);
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ClusterSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- {
- org.apache.thrift.protocol.TList _list107 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.supervisors = new ArrayList<SupervisorSummary>(_list107.size);
- SupervisorSummary _elem108;
- for (int _i109 = 0; _i109 < _list107.size; ++_i109)
- {
- _elem108 = new SupervisorSummary();
- _elem108.read(iprot);
- struct.supervisors.add(_elem108);
- }
- }
- struct.set_supervisors_isSet(true);
- {
- org.apache.thrift.protocol.TList _list110 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.topologies = new ArrayList<TopologySummary>(_list110.size);
- TopologySummary _elem111;
- for (int _i112 = 0; _i112 < _list110.size; ++_i112)
- {
- _elem111 = new TopologySummary();
- _elem111.read(iprot);
- struct.topologies.add(_elem111);
- }
- }
- struct.set_topologies_isSet(true);
- {
- org.apache.thrift.protocol.TList _list113 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.nimbuses = new ArrayList<NimbusSummary>(_list113.size);
- NimbusSummary _elem114;
- for (int _i115 = 0; _i115 < _list113.size; ++_i115)
- {
- _elem114 = new NimbusSummary();
- _elem114.read(iprot);
- struct.nimbuses.add(_elem114);
- }
- }
- struct.set_nimbuses_isSet(true);
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.nimbus_uptime_secs = iprot.readI32();
- struct.set_nimbus_uptime_secs_isSet(true);
- }
- }
- }
-
-}
-