http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java b/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java index 461bd08..aca3029 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java +++ b/storm-client/src/jvm/org/apache/storm/generated/LSTopoHistoryList.java @@ -16,63 +16,33 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * 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)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryList, LSTopoHistoryList._Fields>, java.io.Serializable, Cloneable, Comparable<LSTopoHistoryList> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LSTopoHistoryList"); private static final org.apache.thrift.protocol.TField TOPO_HISTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("topo_history", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LSTopoHistoryListStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LSTopoHistoryListTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LSTopoHistoryListStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LSTopoHistoryListTupleSchemeFactory(); - private List<LSTopoHistory> topo_history; // required + private java.util.List<LSTopoHistory> topo_history; // 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 { TOPO_HISTORY((short)1, "topo_history"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -95,21 +65,21 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -118,19 +88,19 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TOPO_HISTORY, new org.apache.thrift.meta_data.FieldMetaData("topo_history", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LSTopoHistory.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LSTopoHistoryList.class, metaDataMap); } @@ -138,7 +108,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL } public LSTopoHistoryList( - List<LSTopoHistory> topo_history) + java.util.List<LSTopoHistory> topo_history) { this(); this.topo_history = topo_history; @@ -149,7 +119,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL */ public LSTopoHistoryList(LSTopoHistoryList other) { if (other.is_set_topo_history()) { - List<LSTopoHistory> __this__topo_history = new ArrayList<LSTopoHistory>(other.topo_history.size()); + java.util.List<LSTopoHistory> __this__topo_history = new java.util.ArrayList<LSTopoHistory>(other.topo_history.size()); for (LSTopoHistory other_element : other.topo_history) { __this__topo_history.add(new LSTopoHistory(other_element)); } @@ -176,16 +146,16 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL public void add_to_topo_history(LSTopoHistory elem) { if (this.topo_history == null) { - this.topo_history = new ArrayList<LSTopoHistory>(); + this.topo_history = new java.util.ArrayList<LSTopoHistory>(); } this.topo_history.add(elem); } - public List<LSTopoHistory> get_topo_history() { + public java.util.List<LSTopoHistory> get_topo_history() { return this.topo_history; } - public void set_topo_history(List<LSTopoHistory> topo_history) { + public void set_topo_history(java.util.List<LSTopoHistory> topo_history) { this.topo_history = topo_history; } @@ -204,43 +174,43 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case TOPO_HISTORY: if (value == null) { unset_topo_history(); } else { - set_topo_history((List<LSTopoHistory>)value); + set_topo_history((java.util.List<LSTopoHistory>)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TOPO_HISTORY: return get_topo_history(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case TOPO_HISTORY: return is_set_topo_history(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof LSTopoHistoryList) @@ -251,6 +221,8 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL public boolean equals(LSTopoHistoryList that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_topo_history = true && this.is_set_topo_history(); boolean that_present_topo_history = true && that.is_set_topo_history(); @@ -266,14 +238,13 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_topo_history = true && (is_set_topo_history()); - list.add(present_topo_history); - if (present_topo_history) - list.add(topo_history); + hashCode = hashCode * 8191 + ((is_set_topo_history()) ? 131071 : 524287); + if (is_set_topo_history()) + hashCode = hashCode * 8191 + topo_history.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -284,7 +255,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_topo_history()).compareTo(other.is_set_topo_history()); + lastComparison = java.lang.Boolean.valueOf(is_set_topo_history()).compareTo(other.is_set_topo_history()); if (lastComparison != 0) { return lastComparison; } @@ -302,16 +273,16 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("LSTopoHistoryList("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("LSTopoHistoryList("); boolean first = true; sb.append("topo_history:"); @@ -342,7 +313,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -350,13 +321,13 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL } } - private static class LSTopoHistoryListStandardSchemeFactory implements SchemeFactory { + private static class LSTopoHistoryListStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LSTopoHistoryListStandardScheme getScheme() { return new LSTopoHistoryListStandardScheme(); } } - private static class LSTopoHistoryListStandardScheme extends StandardScheme<LSTopoHistoryList> { + private static class LSTopoHistoryListStandardScheme extends org.apache.thrift.scheme.StandardScheme<LSTopoHistoryList> { public void read(org.apache.thrift.protocol.TProtocol iprot, LSTopoHistoryList struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -372,7 +343,7 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list844 = iprot.readListBegin(); - struct.topo_history = new ArrayList<LSTopoHistory>(_list844.size); + struct.topo_history = new java.util.ArrayList<LSTopoHistory>(_list844.size); LSTopoHistory _elem845; for (int _i846 = 0; _i846 < _list844.size; ++_i846) { @@ -418,17 +389,17 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL } - private static class LSTopoHistoryListTupleSchemeFactory implements SchemeFactory { + private static class LSTopoHistoryListTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LSTopoHistoryListTupleScheme getScheme() { return new LSTopoHistoryListTupleScheme(); } } - private static class LSTopoHistoryListTupleScheme extends TupleScheme<LSTopoHistoryList> { + private static class LSTopoHistoryListTupleScheme extends org.apache.thrift.scheme.TupleScheme<LSTopoHistoryList> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, LSTopoHistoryList struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { oprot.writeI32(struct.topo_history.size()); for (LSTopoHistory _iter848 : struct.topo_history) @@ -440,10 +411,10 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL @Override public void read(org.apache.thrift.protocol.TProtocol prot, LSTopoHistoryList struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list849 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.topo_history = new ArrayList<LSTopoHistory>(_list849.size); + struct.topo_history = new java.util.ArrayList<LSTopoHistory>(_list849.size); LSTopoHistory _elem850; for (int _i851 = 0; _i851 < _list849.size; ++_i851) { @@ -456,5 +427,8 @@ public class LSTopoHistoryList implements org.apache.thrift.TBase<LSTopoHistoryL } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } }
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java b/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java index 73b9c12..7f108ee 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java +++ b/storm-client/src/jvm/org/apache/storm/generated/LSWorkerHeartbeat.java @@ -16,42 +16,15 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * 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)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartbeat, LSWorkerHeartbeat._Fields>, java.io.Serializable, Cloneable, Comparable<LSWorkerHeartbeat> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LSWorkerHeartbeat"); @@ -60,15 +33,12 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb private static final org.apache.thrift.protocol.TField EXECUTORS_FIELD_DESC = new org.apache.thrift.protocol.TField("executors", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LSWorkerHeartbeatStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LSWorkerHeartbeatTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LSWorkerHeartbeatStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LSWorkerHeartbeatTupleSchemeFactory(); private int time_secs; // required - private String topology_id; // required - private List<ExecutorInfo> executors; // required + private java.lang.String topology_id; // required + private java.util.List<ExecutorInfo> executors; // required private int port; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -78,10 +48,10 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb EXECUTORS((short)3, "executors"), PORT((short)4, "port"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -110,21 +80,21 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -133,7 +103,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -142,9 +112,9 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb private static final int __TIME_SECS_ISSET_ID = 0; private static final int __PORT_ISSET_ID = 1; private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("time_secs", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift.meta_data.FieldMetaData("topology_id", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -154,7 +124,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorInfo.class)))); tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LSWorkerHeartbeat.class, metaDataMap); } @@ -163,8 +133,8 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb public LSWorkerHeartbeat( int time_secs, - String topology_id, - List<ExecutorInfo> executors, + java.lang.String topology_id, + java.util.List<ExecutorInfo> executors, int port) { this(); @@ -186,7 +156,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb this.topology_id = other.topology_id; } if (other.is_set_executors()) { - List<ExecutorInfo> __this__executors = new ArrayList<ExecutorInfo>(other.executors.size()); + java.util.List<ExecutorInfo> __this__executors = new java.util.ArrayList<ExecutorInfo>(other.executors.size()); for (ExecutorInfo other_element : other.executors) { __this__executors.add(new ExecutorInfo(other_element)); } @@ -219,23 +189,23 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb } public void unset_time_secs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_SECS_ISSET_ID); } /** Returns true if field time_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_time_secs() { - return EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_SECS_ISSET_ID); } public void set_time_secs_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_SECS_ISSET_ID, value); } - public String get_topology_id() { + public java.lang.String get_topology_id() { return this.topology_id; } - public void set_topology_id(String topology_id) { + public void set_topology_id(java.lang.String topology_id) { this.topology_id = topology_id; } @@ -264,16 +234,16 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb public void add_to_executors(ExecutorInfo elem) { if (this.executors == null) { - this.executors = new ArrayList<ExecutorInfo>(); + this.executors = new java.util.ArrayList<ExecutorInfo>(); } this.executors.add(elem); } - public List<ExecutorInfo> get_executors() { + public java.util.List<ExecutorInfo> get_executors() { return this.executors; } - public void set_executors(List<ExecutorInfo> executors) { + public void set_executors(java.util.List<ExecutorInfo> executors) { this.executors = executors; } @@ -302,25 +272,25 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb } public void unset_port() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); } /** Returns true if field port is set (has been assigned a value) and false otherwise */ public boolean is_set_port() { - return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); } public void set_port_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case TIME_SECS: if (value == null) { unset_time_secs(); } else { - set_time_secs((Integer)value); + set_time_secs((java.lang.Integer)value); } break; @@ -328,7 +298,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb if (value == null) { unset_topology_id(); } else { - set_topology_id((String)value); + set_topology_id((java.lang.String)value); } break; @@ -336,7 +306,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb if (value == null) { unset_executors(); } else { - set_executors((List<ExecutorInfo>)value); + set_executors((java.util.List<ExecutorInfo>)value); } break; @@ -344,14 +314,14 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb if (value == null) { unset_port(); } else { - set_port((Integer)value); + set_port((java.lang.Integer)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TIME_SECS: return get_time_secs(); @@ -366,13 +336,13 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb return get_port(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -385,11 +355,11 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb case PORT: return is_set_port(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof LSWorkerHeartbeat) @@ -400,6 +370,8 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb public boolean equals(LSWorkerHeartbeat that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_time_secs = true; boolean that_present_time_secs = true; @@ -442,29 +414,21 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_time_secs = true; - list.add(present_time_secs); - if (present_time_secs) - list.add(time_secs); + hashCode = hashCode * 8191 + time_secs; - boolean present_topology_id = true && (is_set_topology_id()); - list.add(present_topology_id); - if (present_topology_id) - list.add(topology_id); + hashCode = hashCode * 8191 + ((is_set_topology_id()) ? 131071 : 524287); + if (is_set_topology_id()) + hashCode = hashCode * 8191 + topology_id.hashCode(); - boolean present_executors = true && (is_set_executors()); - list.add(present_executors); - if (present_executors) - list.add(executors); + hashCode = hashCode * 8191 + ((is_set_executors()) ? 131071 : 524287); + if (is_set_executors()) + hashCode = hashCode * 8191 + executors.hashCode(); - boolean present_port = true; - list.add(present_port); - if (present_port) - list.add(port); + hashCode = hashCode * 8191 + port; - return list.hashCode(); + return hashCode; } @Override @@ -475,7 +439,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs()); + lastComparison = java.lang.Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs()); if (lastComparison != 0) { return lastComparison; } @@ -485,7 +449,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id()); + lastComparison = java.lang.Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id()); if (lastComparison != 0) { return lastComparison; } @@ -495,7 +459,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors()); + lastComparison = java.lang.Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors()); if (lastComparison != 0) { return lastComparison; } @@ -505,7 +469,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port()); + lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port()); if (lastComparison != 0) { return lastComparison; } @@ -523,16 +487,16 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("LSWorkerHeartbeat("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("LSWorkerHeartbeat("); boolean first = true; sb.append("time_secs:"); @@ -591,7 +555,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -601,13 +565,13 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb } } - private static class LSWorkerHeartbeatStandardSchemeFactory implements SchemeFactory { + private static class LSWorkerHeartbeatStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LSWorkerHeartbeatStandardScheme getScheme() { return new LSWorkerHeartbeatStandardScheme(); } } - private static class LSWorkerHeartbeatStandardScheme extends StandardScheme<LSWorkerHeartbeat> { + private static class LSWorkerHeartbeatStandardScheme extends org.apache.thrift.scheme.StandardScheme<LSWorkerHeartbeat> { public void read(org.apache.thrift.protocol.TProtocol iprot, LSWorkerHeartbeat struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -639,7 +603,7 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list820 = iprot.readListBegin(); - struct.executors = new ArrayList<ExecutorInfo>(_list820.size); + struct.executors = new java.util.ArrayList<ExecutorInfo>(_list820.size); ExecutorInfo _elem821; for (int _i822 = 0; _i822 < _list820.size; ++_i822) { @@ -704,17 +668,17 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb } - private static class LSWorkerHeartbeatTupleSchemeFactory implements SchemeFactory { + private static class LSWorkerHeartbeatTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LSWorkerHeartbeatTupleScheme getScheme() { return new LSWorkerHeartbeatTupleScheme(); } } - private static class LSWorkerHeartbeatTupleScheme extends TupleScheme<LSWorkerHeartbeat> { + private static class LSWorkerHeartbeatTupleScheme extends org.apache.thrift.scheme.TupleScheme<LSWorkerHeartbeat> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, LSWorkerHeartbeat struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeI32(struct.time_secs); oprot.writeString(struct.topology_id); { @@ -729,14 +693,14 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb @Override public void read(org.apache.thrift.protocol.TProtocol prot, LSWorkerHeartbeat struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.time_secs = iprot.readI32(); struct.set_time_secs_isSet(true); struct.topology_id = iprot.readString(); struct.set_topology_id_isSet(true); { org.apache.thrift.protocol.TList _list825 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.executors = new ArrayList<ExecutorInfo>(_list825.size); + struct.executors = new java.util.ArrayList<ExecutorInfo>(_list825.size); ExecutorInfo _elem826; for (int _i827 = 0; _i827 < _list825.size; ++_i827) { @@ -751,5 +715,8 @@ public class LSWorkerHeartbeat implements org.apache.thrift.TBase<LSWorkerHeartb } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java b/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java index 21b3e5b..d27f0f1 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ListBlobsResult.java @@ -16,66 +16,36 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * 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)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, ListBlobsResult._Fields>, java.io.Serializable, Cloneable, Comparable<ListBlobsResult> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ListBlobsResult"); private static final org.apache.thrift.protocol.TField KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("keys", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ListBlobsResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ListBlobsResultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ListBlobsResultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ListBlobsResultTupleSchemeFactory(); - private List<String> keys; // required - private String session; // required + private java.util.List<java.lang.String> keys; // required + private java.lang.String session; // 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 { KEYS((short)1, "keys"), SESSION((short)2, "session"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -100,21 +70,21 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -123,21 +93,21 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEYS, new org.apache.thrift.meta_data.FieldMetaData("keys", org.apache.thrift.TFieldRequirementType.REQUIRED, 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.STRING)))); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ListBlobsResult.class, metaDataMap); } @@ -145,8 +115,8 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, } public ListBlobsResult( - List<String> keys, - String session) + java.util.List<java.lang.String> keys, + java.lang.String session) { this(); this.keys = keys; @@ -158,7 +128,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, */ public ListBlobsResult(ListBlobsResult other) { if (other.is_set_keys()) { - List<String> __this__keys = new ArrayList<String>(other.keys); + java.util.List<java.lang.String> __this__keys = new java.util.ArrayList<java.lang.String>(other.keys); this.keys = __this__keys; } if (other.is_set_session()) { @@ -180,22 +150,22 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, return (this.keys == null) ? 0 : this.keys.size(); } - public java.util.Iterator<String> get_keys_iterator() { + public java.util.Iterator<java.lang.String> get_keys_iterator() { return (this.keys == null) ? null : this.keys.iterator(); } - public void add_to_keys(String elem) { + public void add_to_keys(java.lang.String elem) { if (this.keys == null) { - this.keys = new ArrayList<String>(); + this.keys = new java.util.ArrayList<java.lang.String>(); } this.keys.add(elem); } - public List<String> get_keys() { + public java.util.List<java.lang.String> get_keys() { return this.keys; } - public void set_keys(List<String> keys) { + public void set_keys(java.util.List<java.lang.String> keys) { this.keys = keys; } @@ -214,11 +184,11 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, } } - public String get_session() { + public java.lang.String get_session() { return this.session; } - public void set_session(String session) { + public void set_session(java.lang.String session) { this.session = session; } @@ -237,13 +207,13 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case KEYS: if (value == null) { unset_keys(); } else { - set_keys((List<String>)value); + set_keys((java.util.List<java.lang.String>)value); } break; @@ -251,14 +221,14 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, if (value == null) { unset_session(); } else { - set_session((String)value); + set_session((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case KEYS: return get_keys(); @@ -267,13 +237,13 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, return get_session(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -282,11 +252,11 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, case SESSION: return is_set_session(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof ListBlobsResult) @@ -297,6 +267,8 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, public boolean equals(ListBlobsResult that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_keys = true && this.is_set_keys(); boolean that_present_keys = true && that.is_set_keys(); @@ -321,19 +293,17 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_keys = true && (is_set_keys()); - list.add(present_keys); - if (present_keys) - list.add(keys); + hashCode = hashCode * 8191 + ((is_set_keys()) ? 131071 : 524287); + if (is_set_keys()) + hashCode = hashCode * 8191 + keys.hashCode(); - boolean present_session = true && (is_set_session()); - list.add(present_session); - if (present_session) - list.add(session); + hashCode = hashCode * 8191 + ((is_set_session()) ? 131071 : 524287); + if (is_set_session()) + hashCode = hashCode * 8191 + session.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -344,7 +314,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_keys()).compareTo(other.is_set_keys()); + lastComparison = java.lang.Boolean.valueOf(is_set_keys()).compareTo(other.is_set_keys()); if (lastComparison != 0) { return lastComparison; } @@ -354,7 +324,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_session()).compareTo(other.is_set_session()); + lastComparison = java.lang.Boolean.valueOf(is_set_session()).compareTo(other.is_set_session()); if (lastComparison != 0) { return lastComparison; } @@ -372,16 +342,16 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("ListBlobsResult("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("ListBlobsResult("); boolean first = true; sb.append("keys:"); @@ -424,7 +394,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -432,13 +402,13 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, } } - private static class ListBlobsResultStandardSchemeFactory implements SchemeFactory { + private static class ListBlobsResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ListBlobsResultStandardScheme getScheme() { return new ListBlobsResultStandardScheme(); } } - private static class ListBlobsResultStandardScheme extends StandardScheme<ListBlobsResult> { + private static class ListBlobsResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<ListBlobsResult> { public void read(org.apache.thrift.protocol.TProtocol iprot, ListBlobsResult struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -454,8 +424,8 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list614 = iprot.readListBegin(); - struct.keys = new ArrayList<String>(_list614.size); - String _elem615; + struct.keys = new java.util.ArrayList<java.lang.String>(_list614.size); + java.lang.String _elem615; for (int _i616 = 0; _i616 < _list614.size; ++_i616) { _elem615 = iprot.readString(); @@ -493,7 +463,7 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, oprot.writeFieldBegin(KEYS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (String _iter617 : struct.keys) + for (java.lang.String _iter617 : struct.keys) { oprot.writeString(_iter617); } @@ -512,20 +482,20 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, } - private static class ListBlobsResultTupleSchemeFactory implements SchemeFactory { + private static class ListBlobsResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ListBlobsResultTupleScheme getScheme() { return new ListBlobsResultTupleScheme(); } } - private static class ListBlobsResultTupleScheme extends TupleScheme<ListBlobsResult> { + private static class ListBlobsResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<ListBlobsResult> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ListBlobsResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { oprot.writeI32(struct.keys.size()); - for (String _iter618 : struct.keys) + for (java.lang.String _iter618 : struct.keys) { oprot.writeString(_iter618); } @@ -535,11 +505,11 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, @Override public void read(org.apache.thrift.protocol.TProtocol prot, ListBlobsResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list619 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.keys = new ArrayList<String>(_list619.size); - String _elem620; + struct.keys = new java.util.ArrayList<java.lang.String>(_list619.size); + java.lang.String _elem620; for (int _i621 = 0; _i621 < _list619.size; ++_i621) { _elem620 = iprot.readString(); @@ -552,5 +522,8 @@ public class ListBlobsResult implements org.apache.thrift.TBase<ListBlobsResult, } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java b/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java index 3814124..2fdb3ef 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java +++ b/storm-client/src/jvm/org/apache/storm/generated/LocalAssignment.java @@ -16,42 +16,15 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * 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)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, LocalAssignment._Fields>, java.io.Serializable, Cloneable, Comparable<LocalAssignment> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LocalAssignment"); @@ -61,17 +34,14 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, private static final org.apache.thrift.protocol.TField TOTAL_NODE_SHARED_FIELD_DESC = new org.apache.thrift.protocol.TField("total_node_shared", org.apache.thrift.protocol.TType.DOUBLE, (short)4); 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)5); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LocalAssignmentStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LocalAssignmentTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LocalAssignmentStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LocalAssignmentTupleSchemeFactory(); - private String topology_id; // required - private List<ExecutorInfo> executors; // required + private java.lang.String topology_id; // required + private java.util.List<ExecutorInfo> executors; // required private WorkerResources resources; // optional private double total_node_shared; // optional - private String owner; // optional + private java.lang.String owner; // 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 { @@ -81,10 +51,10 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, TOTAL_NODE_SHARED((short)4, "total_node_shared"), OWNER((short)5, "owner"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -115,21 +85,21 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -138,7 +108,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -147,9 +117,9 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, private static final int __TOTAL_NODE_SHARED_ISSET_ID = 0; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.RESOURCES,_Fields.TOTAL_NODE_SHARED,_Fields.OWNER}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift.meta_data.FieldMetaData("topology_id", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.EXECUTORS, new org.apache.thrift.meta_data.FieldMetaData("executors", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -161,7 +131,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LocalAssignment.class, metaDataMap); } @@ -169,8 +139,8 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } public LocalAssignment( - String topology_id, - List<ExecutorInfo> executors) + java.lang.String topology_id, + java.util.List<ExecutorInfo> executors) { this(); this.topology_id = topology_id; @@ -186,7 +156,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, this.topology_id = other.topology_id; } if (other.is_set_executors()) { - List<ExecutorInfo> __this__executors = new ArrayList<ExecutorInfo>(other.executors.size()); + java.util.List<ExecutorInfo> __this__executors = new java.util.ArrayList<ExecutorInfo>(other.executors.size()); for (ExecutorInfo other_element : other.executors) { __this__executors.add(new ExecutorInfo(other_element)); } @@ -215,11 +185,11 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, this.owner = null; } - public String get_topology_id() { + public java.lang.String get_topology_id() { return this.topology_id; } - public void set_topology_id(String topology_id) { + public void set_topology_id(java.lang.String topology_id) { this.topology_id = topology_id; } @@ -248,16 +218,16 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, public void add_to_executors(ExecutorInfo elem) { if (this.executors == null) { - this.executors = new ArrayList<ExecutorInfo>(); + this.executors = new java.util.ArrayList<ExecutorInfo>(); } this.executors.add(elem); } - public List<ExecutorInfo> get_executors() { + public java.util.List<ExecutorInfo> get_executors() { return this.executors; } - public void set_executors(List<ExecutorInfo> executors) { + public void set_executors(java.util.List<ExecutorInfo> executors) { this.executors = executors; } @@ -309,23 +279,23 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } public void unset_total_node_shared() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID); } /** Returns true if field total_node_shared is set (has been assigned a value) and false otherwise */ public boolean is_set_total_node_shared() { - return EncodingUtils.testBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID); } public void set_total_node_shared_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOTAL_NODE_SHARED_ISSET_ID, value); } - public String get_owner() { + public java.lang.String get_owner() { return this.owner; } - public void set_owner(String owner) { + public void set_owner(java.lang.String owner) { this.owner = owner; } @@ -344,13 +314,13 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case TOPOLOGY_ID: if (value == null) { unset_topology_id(); } else { - set_topology_id((String)value); + set_topology_id((java.lang.String)value); } break; @@ -358,7 +328,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, if (value == null) { unset_executors(); } else { - set_executors((List<ExecutorInfo>)value); + set_executors((java.util.List<ExecutorInfo>)value); } break; @@ -374,7 +344,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, if (value == null) { unset_total_node_shared(); } else { - set_total_node_shared((Double)value); + set_total_node_shared((java.lang.Double)value); } break; @@ -382,14 +352,14 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, if (value == null) { unset_owner(); } else { - set_owner((String)value); + set_owner((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TOPOLOGY_ID: return get_topology_id(); @@ -407,13 +377,13 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, return get_owner(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -428,11 +398,11 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, case OWNER: return is_set_owner(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof LocalAssignment) @@ -443,6 +413,8 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, public boolean equals(LocalAssignment that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_topology_id = true && this.is_set_topology_id(); boolean that_present_topology_id = true && that.is_set_topology_id(); @@ -494,34 +466,29 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_topology_id = true && (is_set_topology_id()); - list.add(present_topology_id); - if (present_topology_id) - list.add(topology_id); + hashCode = hashCode * 8191 + ((is_set_topology_id()) ? 131071 : 524287); + if (is_set_topology_id()) + hashCode = hashCode * 8191 + topology_id.hashCode(); - boolean present_executors = true && (is_set_executors()); - list.add(present_executors); - if (present_executors) - list.add(executors); + hashCode = hashCode * 8191 + ((is_set_executors()) ? 131071 : 524287); + if (is_set_executors()) + hashCode = hashCode * 8191 + executors.hashCode(); - boolean present_resources = true && (is_set_resources()); - list.add(present_resources); - if (present_resources) - list.add(resources); + hashCode = hashCode * 8191 + ((is_set_resources()) ? 131071 : 524287); + if (is_set_resources()) + hashCode = hashCode * 8191 + resources.hashCode(); - boolean present_total_node_shared = true && (is_set_total_node_shared()); - list.add(present_total_node_shared); - if (present_total_node_shared) - list.add(total_node_shared); + hashCode = hashCode * 8191 + ((is_set_total_node_shared()) ? 131071 : 524287); + if (is_set_total_node_shared()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(total_node_shared); - boolean present_owner = true && (is_set_owner()); - list.add(present_owner); - if (present_owner) - list.add(owner); + hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287); + if (is_set_owner()) + hashCode = hashCode * 8191 + owner.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -532,7 +499,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id()); + lastComparison = java.lang.Boolean.valueOf(is_set_topology_id()).compareTo(other.is_set_topology_id()); if (lastComparison != 0) { return lastComparison; } @@ -542,7 +509,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors()); + lastComparison = java.lang.Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors()); if (lastComparison != 0) { return lastComparison; } @@ -552,7 +519,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_resources()).compareTo(other.is_set_resources()); + lastComparison = java.lang.Boolean.valueOf(is_set_resources()).compareTo(other.is_set_resources()); if (lastComparison != 0) { return lastComparison; } @@ -562,7 +529,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_total_node_shared()).compareTo(other.is_set_total_node_shared()); + lastComparison = java.lang.Boolean.valueOf(is_set_total_node_shared()).compareTo(other.is_set_total_node_shared()); if (lastComparison != 0) { return lastComparison; } @@ -572,7 +539,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner()); + lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner()); if (lastComparison != 0) { return lastComparison; } @@ -590,16 +557,16 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("LocalAssignment("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("LocalAssignment("); boolean first = true; sb.append("topology_id:"); @@ -671,7 +638,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -681,13 +648,13 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } } - private static class LocalAssignmentStandardSchemeFactory implements SchemeFactory { + private static class LocalAssignmentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LocalAssignmentStandardScheme getScheme() { return new LocalAssignmentStandardScheme(); } } - private static class LocalAssignmentStandardScheme extends StandardScheme<LocalAssignment> { + private static class LocalAssignmentStandardScheme extends org.apache.thrift.scheme.StandardScheme<LocalAssignment> { public void read(org.apache.thrift.protocol.TProtocol iprot, LocalAssignment struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -711,7 +678,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list792 = iprot.readListBegin(); - struct.executors = new ArrayList<ExecutorInfo>(_list792.size); + struct.executors = new java.util.ArrayList<ExecutorInfo>(_list792.size); ExecutorInfo _elem793; for (int _i794 = 0; _i794 < _list792.size; ++_i794) { @@ -806,17 +773,17 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } - private static class LocalAssignmentTupleSchemeFactory implements SchemeFactory { + private static class LocalAssignmentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LocalAssignmentTupleScheme getScheme() { return new LocalAssignmentTupleScheme(); } } - private static class LocalAssignmentTupleScheme extends TupleScheme<LocalAssignment> { + private static class LocalAssignmentTupleScheme extends org.apache.thrift.scheme.TupleScheme<LocalAssignment> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, LocalAssignment struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.topology_id); { oprot.writeI32(struct.executors.size()); @@ -825,7 +792,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, _iter796.write(oprot); } } - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_resources()) { optionals.set(0); } @@ -849,12 +816,12 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, @Override public void read(org.apache.thrift.protocol.TProtocol prot, LocalAssignment struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.topology_id = iprot.readString(); struct.set_topology_id_isSet(true); { org.apache.thrift.protocol.TList _list797 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.executors = new ArrayList<ExecutorInfo>(_list797.size); + struct.executors = new java.util.ArrayList<ExecutorInfo>(_list797.size); ExecutorInfo _elem798; for (int _i799 = 0; _i799 < _list797.size; ++_i799) { @@ -864,7 +831,7 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } } struct.set_executors_isSet(true); - BitSet incoming = iprot.readBitSet(3); + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.resources = new WorkerResources(); struct.resources.read(iprot); @@ -881,5 +848,8 @@ public class LocalAssignment implements org.apache.thrift.TBase<LocalAssignment, } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } }
