http://git-wip-us.apache.org/repos/asf/storm/blob/f5ad9288/storm-core/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java b/storm-core/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java new file mode 100644 index 0000000..d704005 --- /dev/null +++ b/storm-core/src/jvm/org/apache/storm/generated/SupervisorPageInfo.java @@ -0,0 +1,624 @@ +/** + * 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 org.apache.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 SupervisorPageInfo implements org.apache.thrift.TBase<SupervisorPageInfo, SupervisorPageInfo._Fields>, java.io.Serializable, Cloneable, Comparable<SupervisorPageInfo> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SupervisorPageInfo"); + + private static final org.apache.thrift.protocol.TField SUPERVISOR_SUMMARIES_FIELD_DESC = new org.apache.thrift.protocol.TField("supervisor_summaries", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField WORKER_SUMMARIES_FIELD_DESC = new org.apache.thrift.protocol.TField("worker_summaries", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new SupervisorPageInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new SupervisorPageInfoTupleSchemeFactory()); + } + + private List<SupervisorSummary> supervisor_summaries; // optional + private List<WorkerSummary> worker_summaries; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUPERVISOR_SUMMARIES((short)1, "supervisor_summaries"), + WORKER_SUMMARIES((short)2, "worker_summaries"); + + 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: // SUPERVISOR_SUMMARIES + return SUPERVISOR_SUMMARIES; + case 2: // WORKER_SUMMARIES + return WORKER_SUMMARIES; + 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 _Fields optionals[] = {_Fields.SUPERVISOR_SUMMARIES,_Fields.WORKER_SUMMARIES}; + 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.SUPERVISOR_SUMMARIES, new org.apache.thrift.meta_data.FieldMetaData("supervisor_summaries", org.apache.thrift.TFieldRequirementType.OPTIONAL, + 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.WORKER_SUMMARIES, new org.apache.thrift.meta_data.FieldMetaData("worker_summaries", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "WorkerSummary")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorPageInfo.class, metaDataMap); + } + + public SupervisorPageInfo() { + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public SupervisorPageInfo(SupervisorPageInfo other) { + if (other.is_set_supervisor_summaries()) { + List<SupervisorSummary> __this__supervisor_summaries = new ArrayList<SupervisorSummary>(other.supervisor_summaries.size()); + for (SupervisorSummary other_element : other.supervisor_summaries) { + __this__supervisor_summaries.add(new SupervisorSummary(other_element)); + } + this.supervisor_summaries = __this__supervisor_summaries; + } + if (other.is_set_worker_summaries()) { + List<WorkerSummary> __this__worker_summaries = new ArrayList<WorkerSummary>(other.worker_summaries.size()); + for (WorkerSummary other_element : other.worker_summaries) { + __this__worker_summaries.add(other_element); + } + this.worker_summaries = __this__worker_summaries; + } + } + + public SupervisorPageInfo deepCopy() { + return new SupervisorPageInfo(this); + } + + @Override + public void clear() { + this.supervisor_summaries = null; + this.worker_summaries = null; + } + + public int get_supervisor_summaries_size() { + return (this.supervisor_summaries == null) ? 0 : this.supervisor_summaries.size(); + } + + public java.util.Iterator<SupervisorSummary> get_supervisor_summaries_iterator() { + return (this.supervisor_summaries == null) ? null : this.supervisor_summaries.iterator(); + } + + public void add_to_supervisor_summaries(SupervisorSummary elem) { + if (this.supervisor_summaries == null) { + this.supervisor_summaries = new ArrayList<SupervisorSummary>(); + } + this.supervisor_summaries.add(elem); + } + + public List<SupervisorSummary> get_supervisor_summaries() { + return this.supervisor_summaries; + } + + public void set_supervisor_summaries(List<SupervisorSummary> supervisor_summaries) { + this.supervisor_summaries = supervisor_summaries; + } + + public void unset_supervisor_summaries() { + this.supervisor_summaries = null; + } + + /** Returns true if field supervisor_summaries is set (has been assigned a value) and false otherwise */ + public boolean is_set_supervisor_summaries() { + return this.supervisor_summaries != null; + } + + public void set_supervisor_summaries_isSet(boolean value) { + if (!value) { + this.supervisor_summaries = null; + } + } + + public int get_worker_summaries_size() { + return (this.worker_summaries == null) ? 0 : this.worker_summaries.size(); + } + + public java.util.Iterator<WorkerSummary> get_worker_summaries_iterator() { + return (this.worker_summaries == null) ? null : this.worker_summaries.iterator(); + } + + public void add_to_worker_summaries(WorkerSummary elem) { + if (this.worker_summaries == null) { + this.worker_summaries = new ArrayList<WorkerSummary>(); + } + this.worker_summaries.add(elem); + } + + public List<WorkerSummary> get_worker_summaries() { + return this.worker_summaries; + } + + public void set_worker_summaries(List<WorkerSummary> worker_summaries) { + this.worker_summaries = worker_summaries; + } + + public void unset_worker_summaries() { + this.worker_summaries = null; + } + + /** Returns true if field worker_summaries is set (has been assigned a value) and false otherwise */ + public boolean is_set_worker_summaries() { + return this.worker_summaries != null; + } + + public void set_worker_summaries_isSet(boolean value) { + if (!value) { + this.worker_summaries = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUPERVISOR_SUMMARIES: + if (value == null) { + unset_supervisor_summaries(); + } else { + set_supervisor_summaries((List<SupervisorSummary>)value); + } + break; + + case WORKER_SUMMARIES: + if (value == null) { + unset_worker_summaries(); + } else { + set_worker_summaries((List<WorkerSummary>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUPERVISOR_SUMMARIES: + return get_supervisor_summaries(); + + case WORKER_SUMMARIES: + return get_worker_summaries(); + + } + 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 SUPERVISOR_SUMMARIES: + return is_set_supervisor_summaries(); + case WORKER_SUMMARIES: + return is_set_worker_summaries(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SupervisorPageInfo) + return this.equals((SupervisorPageInfo)that); + return false; + } + + public boolean equals(SupervisorPageInfo that) { + if (that == null) + return false; + + boolean this_present_supervisor_summaries = true && this.is_set_supervisor_summaries(); + boolean that_present_supervisor_summaries = true && that.is_set_supervisor_summaries(); + if (this_present_supervisor_summaries || that_present_supervisor_summaries) { + if (!(this_present_supervisor_summaries && that_present_supervisor_summaries)) + return false; + if (!this.supervisor_summaries.equals(that.supervisor_summaries)) + return false; + } + + boolean this_present_worker_summaries = true && this.is_set_worker_summaries(); + boolean that_present_worker_summaries = true && that.is_set_worker_summaries(); + if (this_present_worker_summaries || that_present_worker_summaries) { + if (!(this_present_worker_summaries && that_present_worker_summaries)) + return false; + if (!this.worker_summaries.equals(that.worker_summaries)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_supervisor_summaries = true && (is_set_supervisor_summaries()); + list.add(present_supervisor_summaries); + if (present_supervisor_summaries) + list.add(supervisor_summaries); + + boolean present_worker_summaries = true && (is_set_worker_summaries()); + list.add(present_worker_summaries); + if (present_worker_summaries) + list.add(worker_summaries); + + return list.hashCode(); + } + + @Override + public int compareTo(SupervisorPageInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(is_set_supervisor_summaries()).compareTo(other.is_set_supervisor_summaries()); + if (lastComparison != 0) { + return lastComparison; + } + if (is_set_supervisor_summaries()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supervisor_summaries, other.supervisor_summaries); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(is_set_worker_summaries()).compareTo(other.is_set_worker_summaries()); + if (lastComparison != 0) { + return lastComparison; + } + if (is_set_worker_summaries()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.worker_summaries, other.worker_summaries); + 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("SupervisorPageInfo("); + boolean first = true; + + if (is_set_supervisor_summaries()) { + sb.append("supervisor_summaries:"); + if (this.supervisor_summaries == null) { + sb.append("null"); + } else { + sb.append(this.supervisor_summaries); + } + first = false; + } + if (is_set_worker_summaries()) { + if (!first) sb.append(", "); + sb.append("worker_summaries:"); + if (this.worker_summaries == null) { + sb.append("null"); + } else { + sb.append(this.worker_summaries); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // 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 SupervisorPageInfoStandardSchemeFactory implements SchemeFactory { + public SupervisorPageInfoStandardScheme getScheme() { + return new SupervisorPageInfoStandardScheme(); + } + } + + private static class SupervisorPageInfoStandardScheme extends StandardScheme<SupervisorPageInfo> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, SupervisorPageInfo 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: // SUPERVISOR_SUMMARIES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list402 = iprot.readListBegin(); + struct.supervisor_summaries = new ArrayList<SupervisorSummary>(_list402.size); + SupervisorSummary _elem403; + for (int _i404 = 0; _i404 < _list402.size; ++_i404) + { + _elem403 = new SupervisorSummary(); + _elem403.read(iprot); + struct.supervisor_summaries.add(_elem403); + } + iprot.readListEnd(); + } + struct.set_supervisor_summaries_isSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // WORKER_SUMMARIES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list405 = iprot.readListBegin(); + struct.worker_summaries = new ArrayList<WorkerSummary>(_list405.size); + WorkerSummary _elem406; + for (int _i407 = 0; _i407 < _list405.size; ++_i407) + { + _elem406 = new WorkerSummary(); + _elem406.read(iprot); + struct.worker_summaries.add(_elem406); + } + iprot.readListEnd(); + } + struct.set_worker_summaries_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, SupervisorPageInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.supervisor_summaries != null) { + if (struct.is_set_supervisor_summaries()) { + oprot.writeFieldBegin(SUPERVISOR_SUMMARIES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.supervisor_summaries.size())); + for (SupervisorSummary _iter408 : struct.supervisor_summaries) + { + _iter408.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.worker_summaries != null) { + if (struct.is_set_worker_summaries()) { + oprot.writeFieldBegin(WORKER_SUMMARIES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.worker_summaries.size())); + for (WorkerSummary _iter409 : struct.worker_summaries) + { + _iter409.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class SupervisorPageInfoTupleSchemeFactory implements SchemeFactory { + public SupervisorPageInfoTupleScheme getScheme() { + return new SupervisorPageInfoTupleScheme(); + } + } + + private static class SupervisorPageInfoTupleScheme extends TupleScheme<SupervisorPageInfo> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, SupervisorPageInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.is_set_supervisor_summaries()) { + optionals.set(0); + } + if (struct.is_set_worker_summaries()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.is_set_supervisor_summaries()) { + { + oprot.writeI32(struct.supervisor_summaries.size()); + for (SupervisorSummary _iter410 : struct.supervisor_summaries) + { + _iter410.write(oprot); + } + } + } + if (struct.is_set_worker_summaries()) { + { + oprot.writeI32(struct.worker_summaries.size()); + for (WorkerSummary _iter411 : struct.worker_summaries) + { + _iter411.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorPageInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list412 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.supervisor_summaries = new ArrayList<SupervisorSummary>(_list412.size); + SupervisorSummary _elem413; + for (int _i414 = 0; _i414 < _list412.size; ++_i414) + { + _elem413 = new SupervisorSummary(); + _elem413.read(iprot); + struct.supervisor_summaries.add(_elem413); + } + } + struct.set_supervisor_summaries_isSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list415 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.worker_summaries = new ArrayList<WorkerSummary>(_list415.size); + WorkerSummary _elem416; + for (int _i417 = 0; _i417 < _list415.size; ++_i417) + { + _elem416 = new WorkerSummary(); + _elem416.read(iprot); + struct.worker_summaries.add(_elem416); + } + } + struct.set_worker_summaries_isSet(true); + } + } + } + +} +
http://git-wip-us.apache.org/repos/asf/storm/blob/f5ad9288/storm-core/src/jvm/org/apache/storm/generated/TopologyPageInfo.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/org/apache/storm/generated/TopologyPageInfo.java b/storm-core/src/jvm/org/apache/storm/generated/TopologyPageInfo.java index 1d9214b..e573ba3 100644 --- a/storm-core/src/jvm/org/apache/storm/generated/TopologyPageInfo.java +++ b/storm-core/src/jvm/org/apache/storm/generated/TopologyPageInfo.java @@ -70,6 +70,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)13); private static final org.apache.thrift.protocol.TField DEBUG_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("debug_options", org.apache.thrift.protocol.TType.STRUCT, (short)14); private static final org.apache.thrift.protocol.TField REPLICATION_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("replication_count", org.apache.thrift.protocol.TType.I32, (short)15); + private static final org.apache.thrift.protocol.TField WORKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("workers", org.apache.thrift.protocol.TType.LIST, (short)16); private static final org.apache.thrift.protocol.TField REQUESTED_MEMONHEAP_FIELD_DESC = new org.apache.thrift.protocol.TField("requested_memonheap", org.apache.thrift.protocol.TType.DOUBLE, (short)521); private static final org.apache.thrift.protocol.TField REQUESTED_MEMOFFHEAP_FIELD_DESC = new org.apache.thrift.protocol.TField("requested_memoffheap", org.apache.thrift.protocol.TType.DOUBLE, (short)522); private static final org.apache.thrift.protocol.TField REQUESTED_CPU_FIELD_DESC = new org.apache.thrift.protocol.TField("requested_cpu", org.apache.thrift.protocol.TType.DOUBLE, (short)523); @@ -98,6 +99,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf private String owner; // optional private DebugOptions debug_options; // optional private int replication_count; // optional + private List<WorkerSummary> workers; // optional private double requested_memonheap; // optional private double requested_memoffheap; // optional private double requested_cpu; // optional @@ -122,6 +124,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf OWNER((short)13, "owner"), DEBUG_OPTIONS((short)14, "debug_options"), REPLICATION_COUNT((short)15, "replication_count"), + WORKERS((short)16, "workers"), REQUESTED_MEMONHEAP((short)521, "requested_memonheap"), REQUESTED_MEMOFFHEAP((short)522, "requested_memoffheap"), REQUESTED_CPU((short)523, "requested_cpu"), @@ -172,6 +175,8 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf return DEBUG_OPTIONS; case 15: // REPLICATION_COUNT return REPLICATION_COUNT; + case 16: // WORKERS + return WORKERS; case 521: // REQUESTED_MEMONHEAP return REQUESTED_MEMONHEAP; case 522: // REQUESTED_MEMOFFHEAP @@ -236,7 +241,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf private static final int __ASSIGNED_MEMOFFHEAP_ISSET_ID = 9; private static final int __ASSIGNED_CPU_ISSET_ID = 10; private short __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.NAME,_Fields.UPTIME_SECS,_Fields.STATUS,_Fields.NUM_TASKS,_Fields.NUM_WORKERS,_Fields.NUM_EXECUTORS,_Fields.TOPOLOGY_CONF,_Fields.ID_TO_SPOUT_AGG_STATS,_Fields.ID_TO_BOLT_AGG_STATS,_Fields.SCHED_STATUS,_Fields.TOPOLOGY_STATS,_Fields.OWNER,_Fields.DEBUG_OPTIONS,_Fields.REPLICATION_COUNT,_Fields.REQUESTED_MEMONHEAP,_Fields.REQUESTED_MEMOFFHEAP,_Fields.REQUESTED_CPU,_Fields.ASSIGNED_MEMONHEAP,_Fields.ASSIGNED_MEMOFFHEAP,_Fields.ASSIGNED_CPU}; + private static final _Fields optionals[] = {_Fields.NAME,_Fields.UPTIME_SECS,_Fields.STATUS,_Fields.NUM_TASKS,_Fields.NUM_WORKERS,_Fields.NUM_EXECUTORS,_Fields.TOPOLOGY_CONF,_Fields.ID_TO_SPOUT_AGG_STATS,_Fields.ID_TO_BOLT_AGG_STATS,_Fields.SCHED_STATUS,_Fields.TOPOLOGY_STATS,_Fields.OWNER,_Fields.DEBUG_OPTIONS,_Fields.REPLICATION_COUNT,_Fields.WORKERS,_Fields.REQUESTED_MEMONHEAP,_Fields.REQUESTED_MEMOFFHEAP,_Fields.REQUESTED_CPU,_Fields.ASSIGNED_MEMONHEAP,_Fields.ASSIGNED_MEMOFFHEAP,_Fields.ASSIGNED_CPU}; 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); @@ -274,6 +279,9 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DebugOptions.class))); tmpMap.put(_Fields.REPLICATION_COUNT, new org.apache.thrift.meta_data.FieldMetaData("replication_count", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.WORKERS, new org.apache.thrift.meta_data.FieldMetaData("workers", org.apache.thrift.TFieldRequirementType.OPTIONAL, + 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, WorkerSummary.class)))); tmpMap.put(_Fields.REQUESTED_MEMONHEAP, new org.apache.thrift.meta_data.FieldMetaData("requested_memonheap", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.REQUESTED_MEMOFFHEAP, new org.apache.thrift.meta_data.FieldMetaData("requested_memoffheap", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -364,6 +372,13 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf this.debug_options = new DebugOptions(other.debug_options); } this.replication_count = other.replication_count; + if (other.is_set_workers()) { + List<WorkerSummary> __this__workers = new ArrayList<WorkerSummary>(other.workers.size()); + for (WorkerSummary other_element : other.workers) { + __this__workers.add(new WorkerSummary(other_element)); + } + this.workers = __this__workers; + } this.requested_memonheap = other.requested_memonheap; this.requested_memoffheap = other.requested_memoffheap; this.requested_cpu = other.requested_cpu; @@ -398,6 +413,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf this.debug_options = null; set_replication_count_isSet(false); this.replication_count = 0; + this.workers = null; set_requested_memonheap_isSet(false); this.requested_memonheap = 0.0; set_requested_memoffheap_isSet(false); @@ -774,6 +790,44 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REPLICATION_COUNT_ISSET_ID, value); } + public int get_workers_size() { + return (this.workers == null) ? 0 : this.workers.size(); + } + + public java.util.Iterator<WorkerSummary> get_workers_iterator() { + return (this.workers == null) ? null : this.workers.iterator(); + } + + public void add_to_workers(WorkerSummary elem) { + if (this.workers == null) { + this.workers = new ArrayList<WorkerSummary>(); + } + this.workers.add(elem); + } + + public List<WorkerSummary> get_workers() { + return this.workers; + } + + public void set_workers(List<WorkerSummary> workers) { + this.workers = workers; + } + + public void unset_workers() { + this.workers = null; + } + + /** Returns true if field workers is set (has been assigned a value) and false otherwise */ + public boolean is_set_workers() { + return this.workers != null; + } + + public void set_workers_isSet(boolean value) { + if (!value) { + this.workers = null; + } + } + public double get_requested_memonheap() { return this.requested_memonheap; } @@ -1028,6 +1082,14 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf } break; + case WORKERS: + if (value == null) { + unset_workers(); + } else { + set_workers((List<WorkerSummary>)value); + } + break; + case REQUESTED_MEMONHEAP: if (value == null) { unset_requested_memonheap(); @@ -1126,6 +1188,9 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf case REPLICATION_COUNT: return get_replication_count(); + case WORKERS: + return get_workers(); + case REQUESTED_MEMONHEAP: return get_requested_memonheap(); @@ -1185,6 +1250,8 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf return is_set_debug_options(); case REPLICATION_COUNT: return is_set_replication_count(); + case WORKERS: + return is_set_workers(); case REQUESTED_MEMONHEAP: return is_set_requested_memonheap(); case REQUESTED_MEMOFFHEAP: @@ -1349,6 +1416,15 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf return false; } + boolean this_present_workers = true && this.is_set_workers(); + boolean that_present_workers = true && that.is_set_workers(); + if (this_present_workers || that_present_workers) { + if (!(this_present_workers && that_present_workers)) + return false; + if (!this.workers.equals(that.workers)) + return false; + } + boolean this_present_requested_memonheap = true && this.is_set_requested_memonheap(); boolean that_present_requested_memonheap = true && that.is_set_requested_memonheap(); if (this_present_requested_memonheap || that_present_requested_memonheap) { @@ -1485,6 +1561,11 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf if (present_replication_count) list.add(replication_count); + boolean present_workers = true && (is_set_workers()); + list.add(present_workers); + if (present_workers) + list.add(workers); + boolean present_requested_memonheap = true && (is_set_requested_memonheap()); list.add(present_requested_memonheap); if (present_requested_memonheap) @@ -1676,6 +1757,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf return lastComparison; } } + lastComparison = Boolean.valueOf(is_set_workers()).compareTo(other.is_set_workers()); + if (lastComparison != 0) { + return lastComparison; + } + if (is_set_workers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workers, other.workers); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(is_set_requested_memonheap()).compareTo(other.is_set_requested_memonheap()); if (lastComparison != 0) { return lastComparison; @@ -1883,6 +1974,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf sb.append(this.replication_count); first = false; } + if (is_set_workers()) { + if (!first) sb.append(", "); + sb.append("workers:"); + if (this.workers == null) { + sb.append("null"); + } else { + sb.append(this.workers); + } + first = false; + } if (is_set_requested_memonheap()) { if (!first) sb.append(", "); sb.append("requested_memonheap:"); @@ -2041,16 +2142,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf case 9: // ID_TO_SPOUT_AGG_STATS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map402 = iprot.readMapBegin(); - struct.id_to_spout_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map402.size); - String _key403; - ComponentAggregateStats _val404; - for (int _i405 = 0; _i405 < _map402.size; ++_i405) + org.apache.thrift.protocol.TMap _map428 = iprot.readMapBegin(); + struct.id_to_spout_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map428.size); + String _key429; + ComponentAggregateStats _val430; + for (int _i431 = 0; _i431 < _map428.size; ++_i431) { - _key403 = iprot.readString(); - _val404 = new ComponentAggregateStats(); - _val404.read(iprot); - struct.id_to_spout_agg_stats.put(_key403, _val404); + _key429 = iprot.readString(); + _val430 = new ComponentAggregateStats(); + _val430.read(iprot); + struct.id_to_spout_agg_stats.put(_key429, _val430); } iprot.readMapEnd(); } @@ -2062,16 +2163,16 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf case 10: // ID_TO_BOLT_AGG_STATS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map406 = iprot.readMapBegin(); - struct.id_to_bolt_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map406.size); - String _key407; - ComponentAggregateStats _val408; - for (int _i409 = 0; _i409 < _map406.size; ++_i409) + org.apache.thrift.protocol.TMap _map432 = iprot.readMapBegin(); + struct.id_to_bolt_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map432.size); + String _key433; + ComponentAggregateStats _val434; + for (int _i435 = 0; _i435 < _map432.size; ++_i435) { - _key407 = iprot.readString(); - _val408 = new ComponentAggregateStats(); - _val408.read(iprot); - struct.id_to_bolt_agg_stats.put(_key407, _val408); + _key433 = iprot.readString(); + _val434 = new ComponentAggregateStats(); + _val434.read(iprot); + struct.id_to_bolt_agg_stats.put(_key433, _val434); } iprot.readMapEnd(); } @@ -2122,6 +2223,25 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 16: // WORKERS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list436 = iprot.readListBegin(); + struct.workers = new ArrayList<WorkerSummary>(_list436.size); + WorkerSummary _elem437; + for (int _i438 = 0; _i438 < _list436.size; ++_i438) + { + _elem437 = new WorkerSummary(); + _elem437.read(iprot); + struct.workers.add(_elem437); + } + iprot.readListEnd(); + } + struct.set_workers_isSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; case 521: // REQUESTED_MEMONHEAP if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.requested_memonheap = iprot.readDouble(); @@ -2234,10 +2354,10 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf oprot.writeFieldBegin(ID_TO_SPOUT_AGG_STATS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.id_to_spout_agg_stats.size())); - for (Map.Entry<String, ComponentAggregateStats> _iter410 : struct.id_to_spout_agg_stats.entrySet()) + for (Map.Entry<String, ComponentAggregateStats> _iter439 : struct.id_to_spout_agg_stats.entrySet()) { - oprot.writeString(_iter410.getKey()); - _iter410.getValue().write(oprot); + oprot.writeString(_iter439.getKey()); + _iter439.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -2249,10 +2369,10 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf oprot.writeFieldBegin(ID_TO_BOLT_AGG_STATS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.id_to_bolt_agg_stats.size())); - for (Map.Entry<String, ComponentAggregateStats> _iter411 : struct.id_to_bolt_agg_stats.entrySet()) + for (Map.Entry<String, ComponentAggregateStats> _iter440 : struct.id_to_bolt_agg_stats.entrySet()) { - oprot.writeString(_iter411.getKey()); - _iter411.getValue().write(oprot); + oprot.writeString(_iter440.getKey()); + _iter440.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -2292,6 +2412,20 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf oprot.writeI32(struct.replication_count); oprot.writeFieldEnd(); } + if (struct.workers != null) { + if (struct.is_set_workers()) { + oprot.writeFieldBegin(WORKERS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.workers.size())); + for (WorkerSummary _iter441 : struct.workers) + { + _iter441.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } if (struct.is_set_requested_memonheap()) { oprot.writeFieldBegin(REQUESTED_MEMONHEAP_FIELD_DESC); oprot.writeDouble(struct.requested_memonheap); @@ -2383,25 +2517,28 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf if (struct.is_set_replication_count()) { optionals.set(13); } - if (struct.is_set_requested_memonheap()) { + if (struct.is_set_workers()) { optionals.set(14); } - if (struct.is_set_requested_memoffheap()) { + if (struct.is_set_requested_memonheap()) { optionals.set(15); } - if (struct.is_set_requested_cpu()) { + if (struct.is_set_requested_memoffheap()) { optionals.set(16); } - if (struct.is_set_assigned_memonheap()) { + if (struct.is_set_requested_cpu()) { optionals.set(17); } - if (struct.is_set_assigned_memoffheap()) { + if (struct.is_set_assigned_memonheap()) { optionals.set(18); } - if (struct.is_set_assigned_cpu()) { + if (struct.is_set_assigned_memoffheap()) { optionals.set(19); } - oprot.writeBitSet(optionals, 20); + if (struct.is_set_assigned_cpu()) { + optionals.set(20); + } + oprot.writeBitSet(optionals, 21); if (struct.is_set_name()) { oprot.writeString(struct.name); } @@ -2426,20 +2563,20 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf if (struct.is_set_id_to_spout_agg_stats()) { { oprot.writeI32(struct.id_to_spout_agg_stats.size()); - for (Map.Entry<String, ComponentAggregateStats> _iter412 : struct.id_to_spout_agg_stats.entrySet()) + for (Map.Entry<String, ComponentAggregateStats> _iter442 : struct.id_to_spout_agg_stats.entrySet()) { - oprot.writeString(_iter412.getKey()); - _iter412.getValue().write(oprot); + oprot.writeString(_iter442.getKey()); + _iter442.getValue().write(oprot); } } } if (struct.is_set_id_to_bolt_agg_stats()) { { oprot.writeI32(struct.id_to_bolt_agg_stats.size()); - for (Map.Entry<String, ComponentAggregateStats> _iter413 : struct.id_to_bolt_agg_stats.entrySet()) + for (Map.Entry<String, ComponentAggregateStats> _iter443 : struct.id_to_bolt_agg_stats.entrySet()) { - oprot.writeString(_iter413.getKey()); - _iter413.getValue().write(oprot); + oprot.writeString(_iter443.getKey()); + _iter443.getValue().write(oprot); } } } @@ -2458,6 +2595,15 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf if (struct.is_set_replication_count()) { oprot.writeI32(struct.replication_count); } + if (struct.is_set_workers()) { + { + oprot.writeI32(struct.workers.size()); + for (WorkerSummary _iter444 : struct.workers) + { + _iter444.write(oprot); + } + } + } if (struct.is_set_requested_memonheap()) { oprot.writeDouble(struct.requested_memonheap); } @@ -2483,7 +2629,7 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf TTupleProtocol iprot = (TTupleProtocol) prot; struct.id = iprot.readString(); struct.set_id_isSet(true); - BitSet incoming = iprot.readBitSet(20); + BitSet incoming = iprot.readBitSet(21); if (incoming.get(0)) { struct.name = iprot.readString(); struct.set_name_isSet(true); @@ -2514,32 +2660,32 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf } if (incoming.get(7)) { { - org.apache.thrift.protocol.TMap _map414 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.id_to_spout_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map414.size); - String _key415; - ComponentAggregateStats _val416; - for (int _i417 = 0; _i417 < _map414.size; ++_i417) + org.apache.thrift.protocol.TMap _map445 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.id_to_spout_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map445.size); + String _key446; + ComponentAggregateStats _val447; + for (int _i448 = 0; _i448 < _map445.size; ++_i448) { - _key415 = iprot.readString(); - _val416 = new ComponentAggregateStats(); - _val416.read(iprot); - struct.id_to_spout_agg_stats.put(_key415, _val416); + _key446 = iprot.readString(); + _val447 = new ComponentAggregateStats(); + _val447.read(iprot); + struct.id_to_spout_agg_stats.put(_key446, _val447); } } struct.set_id_to_spout_agg_stats_isSet(true); } if (incoming.get(8)) { { - org.apache.thrift.protocol.TMap _map418 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.id_to_bolt_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map418.size); - String _key419; - ComponentAggregateStats _val420; - for (int _i421 = 0; _i421 < _map418.size; ++_i421) + org.apache.thrift.protocol.TMap _map449 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.id_to_bolt_agg_stats = new HashMap<String,ComponentAggregateStats>(2*_map449.size); + String _key450; + ComponentAggregateStats _val451; + for (int _i452 = 0; _i452 < _map449.size; ++_i452) { - _key419 = iprot.readString(); - _val420 = new ComponentAggregateStats(); - _val420.read(iprot); - struct.id_to_bolt_agg_stats.put(_key419, _val420); + _key450 = iprot.readString(); + _val451 = new ComponentAggregateStats(); + _val451.read(iprot); + struct.id_to_bolt_agg_stats.put(_key450, _val451); } } struct.set_id_to_bolt_agg_stats_isSet(true); @@ -2567,26 +2713,40 @@ public class TopologyPageInfo implements org.apache.thrift.TBase<TopologyPageInf struct.set_replication_count_isSet(true); } if (incoming.get(14)) { + { + org.apache.thrift.protocol.TList _list453 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.workers = new ArrayList<WorkerSummary>(_list453.size); + WorkerSummary _elem454; + for (int _i455 = 0; _i455 < _list453.size; ++_i455) + { + _elem454 = new WorkerSummary(); + _elem454.read(iprot); + struct.workers.add(_elem454); + } + } + struct.set_workers_isSet(true); + } + if (incoming.get(15)) { struct.requested_memonheap = iprot.readDouble(); struct.set_requested_memonheap_isSet(true); } - if (incoming.get(15)) { + if (incoming.get(16)) { struct.requested_memoffheap = iprot.readDouble(); struct.set_requested_memoffheap_isSet(true); } - if (incoming.get(16)) { + if (incoming.get(17)) { struct.requested_cpu = iprot.readDouble(); struct.set_requested_cpu_isSet(true); } - if (incoming.get(17)) { + if (incoming.get(18)) { struct.assigned_memonheap = iprot.readDouble(); struct.set_assigned_memonheap_isSet(true); } - if (incoming.get(18)) { + if (incoming.get(19)) { struct.assigned_memoffheap = iprot.readDouble(); struct.set_assigned_memoffheap_isSet(true); } - if (incoming.get(19)) { + if (incoming.get(20)) { struct.assigned_cpu = iprot.readDouble(); struct.set_assigned_cpu_isSet(true); }
