| /** |
| * 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.2) |
| * |
| * 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.2)", date = "2015-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 _map98 = iprot.readMapBegin(); |
| struct.acked = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map98.size); |
| String _key99; |
| Map<GlobalStreamId,Long> _val100; |
| for (int _i101 = 0; _i101 < _map98.size; ++_i101) |
| { |
| _key99 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map102 = iprot.readMapBegin(); |
| _val100 = new HashMap<GlobalStreamId,Long>(2*_map102.size); |
| GlobalStreamId _key103; |
| long _val104; |
| for (int _i105 = 0; _i105 < _map102.size; ++_i105) |
| { |
| _key103 = new GlobalStreamId(); |
| _key103.read(iprot); |
| _val104 = iprot.readI64(); |
| _val100.put(_key103, _val104); |
| } |
| iprot.readMapEnd(); |
| } |
| struct.acked.put(_key99, _val100); |
| } |
| 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 _map106 = iprot.readMapBegin(); |
| struct.failed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map106.size); |
| String _key107; |
| Map<GlobalStreamId,Long> _val108; |
| for (int _i109 = 0; _i109 < _map106.size; ++_i109) |
| { |
| _key107 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map110 = iprot.readMapBegin(); |
| _val108 = new HashMap<GlobalStreamId,Long>(2*_map110.size); |
| GlobalStreamId _key111; |
| long _val112; |
| for (int _i113 = 0; _i113 < _map110.size; ++_i113) |
| { |
| _key111 = new GlobalStreamId(); |
| _key111.read(iprot); |
| _val112 = iprot.readI64(); |
| _val108.put(_key111, _val112); |
| } |
| iprot.readMapEnd(); |
| } |
| struct.failed.put(_key107, _val108); |
| } |
| 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 _map114 = iprot.readMapBegin(); |
| struct.process_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map114.size); |
| String _key115; |
| Map<GlobalStreamId,Double> _val116; |
| for (int _i117 = 0; _i117 < _map114.size; ++_i117) |
| { |
| _key115 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map118 = iprot.readMapBegin(); |
| _val116 = new HashMap<GlobalStreamId,Double>(2*_map118.size); |
| GlobalStreamId _key119; |
| double _val120; |
| for (int _i121 = 0; _i121 < _map118.size; ++_i121) |
| { |
| _key119 = new GlobalStreamId(); |
| _key119.read(iprot); |
| _val120 = iprot.readDouble(); |
| _val116.put(_key119, _val120); |
| } |
| iprot.readMapEnd(); |
| } |
| struct.process_ms_avg.put(_key115, _val116); |
| } |
| 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 _map122 = iprot.readMapBegin(); |
| struct.executed = new HashMap<String,Map<GlobalStreamId,Long>>(2*_map122.size); |
| String _key123; |
| Map<GlobalStreamId,Long> _val124; |
| for (int _i125 = 0; _i125 < _map122.size; ++_i125) |
| { |
| _key123 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map126 = iprot.readMapBegin(); |
| _val124 = new HashMap<GlobalStreamId,Long>(2*_map126.size); |
| GlobalStreamId _key127; |
| long _val128; |
| for (int _i129 = 0; _i129 < _map126.size; ++_i129) |
| { |
| _key127 = new GlobalStreamId(); |
| _key127.read(iprot); |
| _val128 = iprot.readI64(); |
| _val124.put(_key127, _val128); |
| } |
| iprot.readMapEnd(); |
| } |
| struct.executed.put(_key123, _val124); |
| } |
| 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 _map130 = iprot.readMapBegin(); |
| struct.execute_ms_avg = new HashMap<String,Map<GlobalStreamId,Double>>(2*_map130.size); |
| String _key131; |
| Map<GlobalStreamId,Double> _val132; |
| for (int _i133 = 0; _i133 < _map130.size; ++_i133) |
| { |
| _key131 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map134 = iprot.readMapBegin(); |
| _val132 = new HashMap<GlobalStreamId,Double>(2*_map134.size); |
| GlobalStreamId _key135; |
| double _val136; |
| for (int _i137 = 0; _i137 < _map134.size; ++_i137) |
| { |
| _key135 = new GlobalStreamId(); |
| _key135.read(iprot); |
| _val136 = iprot.readDouble(); |
| _val132.put(_key135, _val136); |
| } |
| iprot.readMapEnd(); |
| } |
| struct.execute_ms_avg.put(_key131, _val132); |
| } |
| 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>> _iter138 : struct.acked.entrySet()) |
| { |
| oprot.writeString(_iter138.getKey()); |
| { |
| oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter138.getValue().size())); |
| for (Map.Entry<GlobalStreamId, Long> _iter139 : _iter138.getValue().entrySet()) |
| { |
| _iter139.getKey().write(oprot); |
| oprot.writeI64(_iter139.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>> _iter140 : struct.failed.entrySet()) |
| { |
| oprot.writeString(_iter140.getKey()); |
| { |
| oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter140.getValue().size())); |
| for (Map.Entry<GlobalStreamId, Long> _iter141 : _iter140.getValue().entrySet()) |
| { |
| _iter141.getKey().write(oprot); |
| oprot.writeI64(_iter141.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>> _iter142 : struct.process_ms_avg.entrySet()) |
| { |
| oprot.writeString(_iter142.getKey()); |
| { |
| oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter142.getValue().size())); |
| for (Map.Entry<GlobalStreamId, Double> _iter143 : _iter142.getValue().entrySet()) |
| { |
| _iter143.getKey().write(oprot); |
| oprot.writeDouble(_iter143.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>> _iter144 : struct.executed.entrySet()) |
| { |
| oprot.writeString(_iter144.getKey()); |
| { |
| oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter144.getValue().size())); |
| for (Map.Entry<GlobalStreamId, Long> _iter145 : _iter144.getValue().entrySet()) |
| { |
| _iter145.getKey().write(oprot); |
| oprot.writeI64(_iter145.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>> _iter146 : struct.execute_ms_avg.entrySet()) |
| { |
| oprot.writeString(_iter146.getKey()); |
| { |
| oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter146.getValue().size())); |
| for (Map.Entry<GlobalStreamId, Double> _iter147 : _iter146.getValue().entrySet()) |
| { |
| _iter147.getKey().write(oprot); |
| oprot.writeDouble(_iter147.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>> _iter148 : struct.acked.entrySet()) |
| { |
| oprot.writeString(_iter148.getKey()); |
| { |
| oprot.writeI32(_iter148.getValue().size()); |
| for (Map.Entry<GlobalStreamId, Long> _iter149 : _iter148.getValue().entrySet()) |
| { |
| _iter149.getKey().write(oprot); |
| oprot.writeI64(_iter149.getValue()); |
| } |
| } |
| } |
| } |
| { |
| oprot.writeI32(struct.failed.size()); |
| for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter150 : struct.failed.entrySet()) |
| { |
| oprot.writeString(_iter150.getKey()); |
| { |
| oprot.writeI32(_iter150.getValue().size()); |
| for (Map.Entry<GlobalStreamId, Long> _iter151 : _iter150.getValue().entrySet()) |
| { |
| _iter151.getKey().write(oprot); |
| oprot.writeI64(_iter151.getValue()); |
| } |
| } |
| } |
| } |
| { |
| oprot.writeI32(struct.process_ms_avg.size()); |
| for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter152 : struct.process_ms_avg.entrySet()) |
| { |
| oprot.writeString(_iter152.getKey()); |
| { |
| oprot.writeI32(_iter152.getValue().size()); |
| for (Map.Entry<GlobalStreamId, Double> _iter153 : _iter152.getValue().entrySet()) |
| { |
| _iter153.getKey().write(oprot); |
| oprot.writeDouble(_iter153.getValue()); |
| } |
| } |
| } |
| } |
| { |
| oprot.writeI32(struct.executed.size()); |
| for (Map.Entry<String, Map<GlobalStreamId,Long>> _iter154 : struct.executed.entrySet()) |
| { |
| oprot.writeString(_iter154.getKey()); |
| { |
| oprot.writeI32(_iter154.getValue().size()); |
| for (Map.Entry<GlobalStreamId, Long> _iter155 : _iter154.getValue().entrySet()) |
| { |
| _iter155.getKey().write(oprot); |
| oprot.writeI64(_iter155.getValue()); |
| } |
| } |
| } |
| } |
| { |
| oprot.writeI32(struct.execute_ms_avg.size()); |
| for (Map.Entry<String, Map<GlobalStreamId,Double>> _iter156 : struct.execute_ms_avg.entrySet()) |
| { |
| oprot.writeString(_iter156.getKey()); |
| { |
| oprot.writeI32(_iter156.getValue().size()); |
| for (Map.Entry<GlobalStreamId, Double> _iter157 : _iter156.getValue().entrySet()) |
| { |
| _iter157.getKey().write(oprot); |
| oprot.writeDouble(_iter157.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 _map158 = 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*_map158.size); |
| String _key159; |
| Map<GlobalStreamId,Long> _val160; |
| for (int _i161 = 0; _i161 < _map158.size; ++_i161) |
| { |
| _key159 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map162 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32()); |
| _val160 = new HashMap<GlobalStreamId,Long>(2*_map162.size); |
| GlobalStreamId _key163; |
| long _val164; |
| for (int _i165 = 0; _i165 < _map162.size; ++_i165) |
| { |
| _key163 = new GlobalStreamId(); |
| _key163.read(iprot); |
| _val164 = iprot.readI64(); |
| _val160.put(_key163, _val164); |
| } |
| } |
| struct.acked.put(_key159, _val160); |
| } |
| } |
| struct.set_acked_isSet(true); |
| { |
| org.apache.thrift.protocol.TMap _map166 = 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*_map166.size); |
| String _key167; |
| Map<GlobalStreamId,Long> _val168; |
| for (int _i169 = 0; _i169 < _map166.size; ++_i169) |
| { |
| _key167 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map170 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32()); |
| _val168 = new HashMap<GlobalStreamId,Long>(2*_map170.size); |
| GlobalStreamId _key171; |
| long _val172; |
| for (int _i173 = 0; _i173 < _map170.size; ++_i173) |
| { |
| _key171 = new GlobalStreamId(); |
| _key171.read(iprot); |
| _val172 = iprot.readI64(); |
| _val168.put(_key171, _val172); |
| } |
| } |
| struct.failed.put(_key167, _val168); |
| } |
| } |
| struct.set_failed_isSet(true); |
| { |
| org.apache.thrift.protocol.TMap _map174 = 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*_map174.size); |
| String _key175; |
| Map<GlobalStreamId,Double> _val176; |
| for (int _i177 = 0; _i177 < _map174.size; ++_i177) |
| { |
| _key175 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map178 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); |
| _val176 = new HashMap<GlobalStreamId,Double>(2*_map178.size); |
| GlobalStreamId _key179; |
| double _val180; |
| for (int _i181 = 0; _i181 < _map178.size; ++_i181) |
| { |
| _key179 = new GlobalStreamId(); |
| _key179.read(iprot); |
| _val180 = iprot.readDouble(); |
| _val176.put(_key179, _val180); |
| } |
| } |
| struct.process_ms_avg.put(_key175, _val176); |
| } |
| } |
| struct.set_process_ms_avg_isSet(true); |
| { |
| org.apache.thrift.protocol.TMap _map182 = 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*_map182.size); |
| String _key183; |
| Map<GlobalStreamId,Long> _val184; |
| for (int _i185 = 0; _i185 < _map182.size; ++_i185) |
| { |
| _key183 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map186 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32()); |
| _val184 = new HashMap<GlobalStreamId,Long>(2*_map186.size); |
| GlobalStreamId _key187; |
| long _val188; |
| for (int _i189 = 0; _i189 < _map186.size; ++_i189) |
| { |
| _key187 = new GlobalStreamId(); |
| _key187.read(iprot); |
| _val188 = iprot.readI64(); |
| _val184.put(_key187, _val188); |
| } |
| } |
| struct.executed.put(_key183, _val184); |
| } |
| } |
| struct.set_executed_isSet(true); |
| { |
| org.apache.thrift.protocol.TMap _map190 = 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*_map190.size); |
| String _key191; |
| Map<GlobalStreamId,Double> _val192; |
| for (int _i193 = 0; _i193 < _map190.size; ++_i193) |
| { |
| _key191 = iprot.readString(); |
| { |
| org.apache.thrift.protocol.TMap _map194 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); |
| _val192 = new HashMap<GlobalStreamId,Double>(2*_map194.size); |
| GlobalStreamId _key195; |
| double _val196; |
| for (int _i197 = 0; _i197 < _map194.size; ++_i197) |
| { |
| _key195 = new GlobalStreamId(); |
| _key195.read(iprot); |
| _val196 = iprot.readDouble(); |
| _val192.put(_key195, _val196); |
| } |
| } |
| struct.execute_ms_avg.put(_key191, _val192); |
| } |
| } |
| struct.set_execute_ms_avg_isSet(true); |
| } |
| } |
| |
| } |
| |