http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java index ab11c78..cca97b6 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorStats.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 ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, ExecutorStats._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorStats> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorStats"); @@ -60,14 +33,11 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe private static final org.apache.thrift.protocol.TField SPECIFIC_FIELD_DESC = new org.apache.thrift.protocol.TField("specific", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final org.apache.thrift.protocol.TField RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("rate", org.apache.thrift.protocol.TType.DOUBLE, (short)4); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ExecutorStatsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ExecutorStatsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExecutorStatsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExecutorStatsTupleSchemeFactory(); - private Map<String,Map<String,Long>> emitted; // required - private Map<String,Map<String,Long>> transferred; // required + private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> emitted; // required + private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> transferred; // required private ExecutorSpecificStats specific; // required private double rate; // required @@ -78,10 +48,10 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe SPECIFIC((short)3, "specific"), RATE((short)4, "rate"); - 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 ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe */ 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 ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -141,9 +111,9 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe // isset id assignments private static final int __RATE_ISSET_ID = 0; 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.EMITTED, new org.apache.thrift.meta_data.FieldMetaData("emitted", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), @@ -160,7 +130,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorSpecificStats.class))); tmpMap.put(_Fields.RATE, new org.apache.thrift.meta_data.FieldMetaData("rate", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorStats.class, metaDataMap); } @@ -168,8 +138,8 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe } public ExecutorStats( - Map<String,Map<String,Long>> emitted, - Map<String,Map<String,Long>> transferred, + java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> emitted, + java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> transferred, ExecutorSpecificStats specific, double rate) { @@ -187,30 +157,30 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe public ExecutorStats(ExecutorStats other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_emitted()) { - Map<String,Map<String,Long>> __this__emitted = new HashMap<String,Map<String,Long>>(other.emitted.size()); - for (Map.Entry<String, Map<String,Long>> other_element : other.emitted.entrySet()) { + java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> __this__emitted = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(other.emitted.size()); + for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> other_element : other.emitted.entrySet()) { - String other_element_key = other_element.getKey(); - Map<String,Long> other_element_value = other_element.getValue(); + java.lang.String other_element_key = other_element.getKey(); + java.util.Map<java.lang.String,java.lang.Long> other_element_value = other_element.getValue(); - String __this__emitted_copy_key = other_element_key; + java.lang.String __this__emitted_copy_key = other_element_key; - Map<String,Long> __this__emitted_copy_value = new HashMap<String,Long>(other_element_value); + java.util.Map<java.lang.String,java.lang.Long> __this__emitted_copy_value = new java.util.HashMap<java.lang.String,java.lang.Long>(other_element_value); __this__emitted.put(__this__emitted_copy_key, __this__emitted_copy_value); } this.emitted = __this__emitted; } if (other.is_set_transferred()) { - Map<String,Map<String,Long>> __this__transferred = new HashMap<String,Map<String,Long>>(other.transferred.size()); - for (Map.Entry<String, Map<String,Long>> other_element : other.transferred.entrySet()) { + java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> __this__transferred = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(other.transferred.size()); + for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> other_element : other.transferred.entrySet()) { - String other_element_key = other_element.getKey(); - Map<String,Long> other_element_value = other_element.getValue(); + java.lang.String other_element_key = other_element.getKey(); + java.util.Map<java.lang.String,java.lang.Long> other_element_value = other_element.getValue(); - String __this__transferred_copy_key = other_element_key; + java.lang.String __this__transferred_copy_key = other_element_key; - Map<String,Long> __this__transferred_copy_value = new HashMap<String,Long>(other_element_value); + java.util.Map<java.lang.String,java.lang.Long> __this__transferred_copy_value = new java.util.HashMap<java.lang.String,java.lang.Long>(other_element_value); __this__transferred.put(__this__transferred_copy_key, __this__transferred_copy_value); } @@ -239,18 +209,18 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe return (this.emitted == null) ? 0 : this.emitted.size(); } - public void put_to_emitted(String key, Map<String,Long> val) { + public void put_to_emitted(java.lang.String key, java.util.Map<java.lang.String,java.lang.Long> val) { if (this.emitted == null) { - this.emitted = new HashMap<String,Map<String,Long>>(); + this.emitted = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(); } this.emitted.put(key, val); } - public Map<String,Map<String,Long>> get_emitted() { + public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> get_emitted() { return this.emitted; } - public void set_emitted(Map<String,Map<String,Long>> emitted) { + public void set_emitted(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> emitted) { this.emitted = emitted; } @@ -273,18 +243,18 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe return (this.transferred == null) ? 0 : this.transferred.size(); } - public void put_to_transferred(String key, Map<String,Long> val) { + public void put_to_transferred(java.lang.String key, java.util.Map<java.lang.String,java.lang.Long> val) { if (this.transferred == null) { - this.transferred = new HashMap<String,Map<String,Long>>(); + this.transferred = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(); } this.transferred.put(key, val); } - public Map<String,Map<String,Long>> get_transferred() { + public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> get_transferred() { return this.transferred; } - public void set_transferred(Map<String,Map<String,Long>> transferred) { + public void set_transferred(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> transferred) { this.transferred = transferred; } @@ -336,25 +306,25 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe } public void unset_rate() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RATE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RATE_ISSET_ID); } /** Returns true if field rate is set (has been assigned a value) and false otherwise */ public boolean is_set_rate() { - return EncodingUtils.testBit(__isset_bitfield, __RATE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RATE_ISSET_ID); } public void set_rate_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RATE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RATE_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case EMITTED: if (value == null) { unset_emitted(); } else { - set_emitted((Map<String,Map<String,Long>>)value); + set_emitted((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>)value); } break; @@ -362,7 +332,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe if (value == null) { unset_transferred(); } else { - set_transferred((Map<String,Map<String,Long>>)value); + set_transferred((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>)value); } break; @@ -378,14 +348,14 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe if (value == null) { unset_rate(); } else { - set_rate((Double)value); + set_rate((java.lang.Double)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case EMITTED: return get_emitted(); @@ -400,13 +370,13 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe return get_rate(); } - 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) { @@ -419,11 +389,11 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe case RATE: return is_set_rate(); } - 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 ExecutorStats) @@ -434,6 +404,8 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe public boolean equals(ExecutorStats that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_emitted = true && this.is_set_emitted(); boolean that_present_emitted = true && that.is_set_emitted(); @@ -476,29 +448,23 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_emitted = true && (is_set_emitted()); - list.add(present_emitted); - if (present_emitted) - list.add(emitted); + hashCode = hashCode * 8191 + ((is_set_emitted()) ? 131071 : 524287); + if (is_set_emitted()) + hashCode = hashCode * 8191 + emitted.hashCode(); - boolean present_transferred = true && (is_set_transferred()); - list.add(present_transferred); - if (present_transferred) - list.add(transferred); + hashCode = hashCode * 8191 + ((is_set_transferred()) ? 131071 : 524287); + if (is_set_transferred()) + hashCode = hashCode * 8191 + transferred.hashCode(); - boolean present_specific = true && (is_set_specific()); - list.add(present_specific); - if (present_specific) - list.add(specific); + hashCode = hashCode * 8191 + ((is_set_specific()) ? 131071 : 524287); + if (is_set_specific()) + hashCode = hashCode * 8191 + specific.hashCode(); - boolean present_rate = true; - list.add(present_rate); - if (present_rate) - list.add(rate); + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(rate); - return list.hashCode(); + return hashCode; } @Override @@ -509,7 +475,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_emitted()).compareTo(other.is_set_emitted()); + lastComparison = java.lang.Boolean.valueOf(is_set_emitted()).compareTo(other.is_set_emitted()); if (lastComparison != 0) { return lastComparison; } @@ -519,7 +485,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_transferred()).compareTo(other.is_set_transferred()); + lastComparison = java.lang.Boolean.valueOf(is_set_transferred()).compareTo(other.is_set_transferred()); if (lastComparison != 0) { return lastComparison; } @@ -529,7 +495,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_specific()).compareTo(other.is_set_specific()); + lastComparison = java.lang.Boolean.valueOf(is_set_specific()).compareTo(other.is_set_specific()); if (lastComparison != 0) { return lastComparison; } @@ -539,7 +505,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_rate()).compareTo(other.is_set_rate()); + lastComparison = java.lang.Boolean.valueOf(is_set_rate()).compareTo(other.is_set_rate()); if (lastComparison != 0) { return lastComparison; } @@ -557,16 +523,16 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe } 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("ExecutorStats("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("ExecutorStats("); boolean first = true; sb.append("emitted:"); @@ -629,7 +595,7 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe } } - 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; @@ -639,13 +605,13 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe } } - private static class ExecutorStatsStandardSchemeFactory implements SchemeFactory { + private static class ExecutorStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ExecutorStatsStandardScheme getScheme() { return new ExecutorStatsStandardScheme(); } } - private static class ExecutorStatsStandardScheme extends StandardScheme<ExecutorStats> { + private static class ExecutorStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ExecutorStats> { public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorStats struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -661,16 +627,16 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map320 = iprot.readMapBegin(); - struct.emitted = new HashMap<String,Map<String,Long>>(2*_map320.size); - String _key321; - Map<String,Long> _val322; + struct.emitted = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map320.size); + java.lang.String _key321; + java.util.Map<java.lang.String,java.lang.Long> _val322; for (int _i323 = 0; _i323 < _map320.size; ++_i323) { _key321 = iprot.readString(); { org.apache.thrift.protocol.TMap _map324 = iprot.readMapBegin(); - _val322 = new HashMap<String,Long>(2*_map324.size); - String _key325; + _val322 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map324.size); + java.lang.String _key325; long _val326; for (int _i327 = 0; _i327 < _map324.size; ++_i327) { @@ -693,16 +659,16 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map328 = iprot.readMapBegin(); - struct.transferred = new HashMap<String,Map<String,Long>>(2*_map328.size); - String _key329; - Map<String,Long> _val330; + struct.transferred = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map328.size); + java.lang.String _key329; + java.util.Map<java.lang.String,java.lang.Long> _val330; for (int _i331 = 0; _i331 < _map328.size; ++_i331) { _key329 = iprot.readString(); { org.apache.thrift.protocol.TMap _map332 = iprot.readMapBegin(); - _val330 = new HashMap<String,Long>(2*_map332.size); - String _key333; + _val330 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map332.size); + java.lang.String _key333; long _val334; for (int _i335 = 0; _i335 < _map332.size; ++_i335) { @@ -755,12 +721,12 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe oprot.writeFieldBegin(EMITTED_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.emitted.size())); - for (Map.Entry<String, Map<String,Long>> _iter336 : struct.emitted.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter336 : struct.emitted.entrySet()) { oprot.writeString(_iter336.getKey()); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, _iter336.getValue().size())); - for (Map.Entry<String, Long> _iter337 : _iter336.getValue().entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter337 : _iter336.getValue().entrySet()) { oprot.writeString(_iter337.getKey()); oprot.writeI64(_iter337.getValue()); @@ -776,12 +742,12 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe oprot.writeFieldBegin(TRANSFERRED_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.transferred.size())); - for (Map.Entry<String, Map<String,Long>> _iter338 : struct.transferred.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter338 : struct.transferred.entrySet()) { oprot.writeString(_iter338.getKey()); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, _iter338.getValue().size())); - for (Map.Entry<String, Long> _iter339 : _iter338.getValue().entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter339 : _iter338.getValue().entrySet()) { oprot.writeString(_iter339.getKey()); oprot.writeI64(_iter339.getValue()); @@ -807,25 +773,25 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe } - private static class ExecutorStatsTupleSchemeFactory implements SchemeFactory { + private static class ExecutorStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ExecutorStatsTupleScheme getScheme() { return new ExecutorStatsTupleScheme(); } } - private static class ExecutorStatsTupleScheme extends TupleScheme<ExecutorStats> { + private static class ExecutorStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ExecutorStats> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorStats 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.emitted.size()); - for (Map.Entry<String, Map<String,Long>> _iter340 : struct.emitted.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter340 : struct.emitted.entrySet()) { oprot.writeString(_iter340.getKey()); { oprot.writeI32(_iter340.getValue().size()); - for (Map.Entry<String, Long> _iter341 : _iter340.getValue().entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter341 : _iter340.getValue().entrySet()) { oprot.writeString(_iter341.getKey()); oprot.writeI64(_iter341.getValue()); @@ -835,12 +801,12 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe } { oprot.writeI32(struct.transferred.size()); - for (Map.Entry<String, Map<String,Long>> _iter342 : struct.transferred.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.Long>> _iter342 : struct.transferred.entrySet()) { oprot.writeString(_iter342.getKey()); { oprot.writeI32(_iter342.getValue().size()); - for (Map.Entry<String, Long> _iter343 : _iter342.getValue().entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.Long> _iter343 : _iter342.getValue().entrySet()) { oprot.writeString(_iter343.getKey()); oprot.writeI64(_iter343.getValue()); @@ -854,19 +820,19 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe @Override public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorStats 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.TMap _map344 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32()); - struct.emitted = new HashMap<String,Map<String,Long>>(2*_map344.size); - String _key345; - Map<String,Long> _val346; + struct.emitted = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map344.size); + java.lang.String _key345; + java.util.Map<java.lang.String,java.lang.Long> _val346; for (int _i347 = 0; _i347 < _map344.size; ++_i347) { _key345 = iprot.readString(); { org.apache.thrift.protocol.TMap _map348 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); - _val346 = new HashMap<String,Long>(2*_map348.size); - String _key349; + _val346 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map348.size); + java.lang.String _key349; long _val350; for (int _i351 = 0; _i351 < _map348.size; ++_i351) { @@ -881,16 +847,16 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe struct.set_emitted_isSet(true); { org.apache.thrift.protocol.TMap _map352 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32()); - struct.transferred = new HashMap<String,Map<String,Long>>(2*_map352.size); - String _key353; - Map<String,Long> _val354; + struct.transferred = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>(2*_map352.size); + java.lang.String _key353; + java.util.Map<java.lang.String,java.lang.Long> _val354; for (int _i355 = 0; _i355 < _map352.size; ++_i355) { _key353 = iprot.readString(); { org.apache.thrift.protocol.TMap _map356 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, iprot.readI32()); - _val354 = new HashMap<String,Long>(2*_map356.size); - String _key357; + _val354 = new java.util.HashMap<java.lang.String,java.lang.Long>(2*_map356.size); + java.lang.String _key357; long _val358; for (int _i359 = 0; _i359 < _map356.size; ++_i359) { @@ -911,5 +877,8 @@ public class ExecutorStats implements org.apache.thrift.TBase<ExecutorStats, Exe } } + 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/ExecutorSummary.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.java index ef8182e..e4fc2aa 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorSummary.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 ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, ExecutorSummary._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorSummary> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorSummary"); @@ -62,15 +35,12 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, private static final org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stats", org.apache.thrift.protocol.TType.STRUCT, (short)7); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ExecutorSummaryStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ExecutorSummaryTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExecutorSummaryStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExecutorSummaryTupleSchemeFactory(); private ExecutorInfo executor_info; // required - private String component_id; // required - private String host; // required + private java.lang.String component_id; // required + private java.lang.String host; // required private int port; // required private int uptime_secs; // required private ExecutorStats stats; // optional @@ -84,10 +54,10 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, UPTIME_SECS((short)5, "uptime_secs"), STATS((short)7, "stats"); - 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); } } @@ -120,21 +90,21 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, */ 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; } @@ -143,7 +113,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -153,9 +123,9 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, private static final int __UPTIME_SECS_ISSET_ID = 1; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.STATS}; - 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.EXECUTOR_INFO, new org.apache.thrift.meta_data.FieldMetaData("executor_info", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorInfo.class))); tmpMap.put(_Fields.COMPONENT_ID, new org.apache.thrift.meta_data.FieldMetaData("component_id", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -168,7 +138,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.STATS, new org.apache.thrift.meta_data.FieldMetaData("stats", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorStats.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorSummary.class, metaDataMap); } @@ -177,8 +147,8 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, public ExecutorSummary( ExecutorInfo executor_info, - String component_id, - String host, + java.lang.String component_id, + java.lang.String host, int port, int uptime_secs) { @@ -252,11 +222,11 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } } - public String get_component_id() { + public java.lang.String get_component_id() { return this.component_id; } - public void set_component_id(String component_id) { + public void set_component_id(java.lang.String component_id) { this.component_id = component_id; } @@ -275,11 +245,11 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } } - public String get_host() { + public java.lang.String get_host() { return this.host; } - public void set_host(String host) { + public void set_host(java.lang.String host) { this.host = host; } @@ -308,16 +278,16 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } 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 int get_uptime_secs() { @@ -330,16 +300,16 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } public void unset_uptime_secs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID); } /** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_uptime_secs() { - return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID); } public void set_uptime_secs_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value); } public ExecutorStats get_stats() { @@ -365,7 +335,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case EXECUTOR_INFO: if (value == null) { @@ -379,7 +349,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, if (value == null) { unset_component_id(); } else { - set_component_id((String)value); + set_component_id((java.lang.String)value); } break; @@ -387,7 +357,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, if (value == null) { unset_host(); } else { - set_host((String)value); + set_host((java.lang.String)value); } break; @@ -395,7 +365,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, if (value == null) { unset_port(); } else { - set_port((Integer)value); + set_port((java.lang.Integer)value); } break; @@ -403,7 +373,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, if (value == null) { unset_uptime_secs(); } else { - set_uptime_secs((Integer)value); + set_uptime_secs((java.lang.Integer)value); } break; @@ -418,7 +388,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case EXECUTOR_INFO: return get_executor_info(); @@ -439,13 +409,13 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, return get_stats(); } - 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) { @@ -462,11 +432,11 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, case STATS: return is_set_stats(); } - 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 ExecutorSummary) @@ -477,6 +447,8 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, public boolean equals(ExecutorSummary that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_executor_info = true && this.is_set_executor_info(); boolean that_present_executor_info = true && that.is_set_executor_info(); @@ -537,39 +509,29 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_executor_info = true && (is_set_executor_info()); - list.add(present_executor_info); - if (present_executor_info) - list.add(executor_info); + hashCode = hashCode * 8191 + ((is_set_executor_info()) ? 131071 : 524287); + if (is_set_executor_info()) + hashCode = hashCode * 8191 + executor_info.hashCode(); - boolean present_component_id = true && (is_set_component_id()); - list.add(present_component_id); - if (present_component_id) - list.add(component_id); + hashCode = hashCode * 8191 + ((is_set_component_id()) ? 131071 : 524287); + if (is_set_component_id()) + hashCode = hashCode * 8191 + component_id.hashCode(); - boolean present_host = true && (is_set_host()); - list.add(present_host); - if (present_host) - list.add(host); + hashCode = hashCode * 8191 + ((is_set_host()) ? 131071 : 524287); + if (is_set_host()) + hashCode = hashCode * 8191 + host.hashCode(); - boolean present_port = true; - list.add(present_port); - if (present_port) - list.add(port); + hashCode = hashCode * 8191 + port; - boolean present_uptime_secs = true; - list.add(present_uptime_secs); - if (present_uptime_secs) - list.add(uptime_secs); + hashCode = hashCode * 8191 + uptime_secs; - boolean present_stats = true && (is_set_stats()); - list.add(present_stats); - if (present_stats) - list.add(stats); + hashCode = hashCode * 8191 + ((is_set_stats()) ? 131071 : 524287); + if (is_set_stats()) + hashCode = hashCode * 8191 + stats.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -580,7 +542,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_executor_info()).compareTo(other.is_set_executor_info()); + lastComparison = java.lang.Boolean.valueOf(is_set_executor_info()).compareTo(other.is_set_executor_info()); if (lastComparison != 0) { return lastComparison; } @@ -590,7 +552,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_component_id()).compareTo(other.is_set_component_id()); + lastComparison = java.lang.Boolean.valueOf(is_set_component_id()).compareTo(other.is_set_component_id()); if (lastComparison != 0) { return lastComparison; } @@ -600,7 +562,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host()); + lastComparison = java.lang.Boolean.valueOf(is_set_host()).compareTo(other.is_set_host()); if (lastComparison != 0) { return lastComparison; } @@ -610,7 +572,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, 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; } @@ -620,7 +582,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs()); + lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs()); if (lastComparison != 0) { return lastComparison; } @@ -630,7 +592,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_stats()).compareTo(other.is_set_stats()); + lastComparison = java.lang.Boolean.valueOf(is_set_stats()).compareTo(other.is_set_stats()); if (lastComparison != 0) { return lastComparison; } @@ -648,16 +610,16 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } 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("ExecutorSummary("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("ExecutorSummary("); boolean first = true; sb.append("executor_info:"); @@ -744,7 +706,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } } - 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; @@ -754,13 +716,13 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } } - private static class ExecutorSummaryStandardSchemeFactory implements SchemeFactory { + private static class ExecutorSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ExecutorSummaryStandardScheme getScheme() { return new ExecutorSummaryStandardScheme(); } } - private static class ExecutorSummaryStandardScheme extends StandardScheme<ExecutorSummary> { + private static class ExecutorSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<ExecutorSummary> { public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorSummary struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -869,23 +831,23 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } - private static class ExecutorSummaryTupleSchemeFactory implements SchemeFactory { + private static class ExecutorSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ExecutorSummaryTupleScheme getScheme() { return new ExecutorSummaryTupleScheme(); } } - private static class ExecutorSummaryTupleScheme extends TupleScheme<ExecutorSummary> { + private static class ExecutorSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<ExecutorSummary> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorSummary struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.executor_info.write(oprot); oprot.writeString(struct.component_id); oprot.writeString(struct.host); oprot.writeI32(struct.port); oprot.writeI32(struct.uptime_secs); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_stats()) { optionals.set(0); } @@ -897,7 +859,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, @Override public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorSummary struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.executor_info = new ExecutorInfo(); struct.executor_info.read(iprot); struct.set_executor_info_isSet(true); @@ -909,7 +871,7 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, struct.set_port_isSet(true); struct.uptime_secs = iprot.readI32(); struct.set_uptime_secs_isSet(true); - BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.stats = new ExecutorStats(); struct.stats.read(iprot); @@ -918,5 +880,8 @@ public class ExecutorSummary implements org.apache.thrift.TBase<ExecutorSummary, } } + 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/GetInfoOptions.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java b/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java index de91563..7b5fa23 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java +++ b/storm-client/src/jvm/org/apache/storm/generated/GetInfoOptions.java @@ -16,52 +16,22 @@ * 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 GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, GetInfoOptions._Fields>, java.io.Serializable, Cloneable, Comparable<GetInfoOptions> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfoOptions"); private static final org.apache.thrift.protocol.TField NUM_ERR_CHOICE_FIELD_DESC = new org.apache.thrift.protocol.TField("num_err_choice", org.apache.thrift.protocol.TType.I32, (short)1); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetInfoOptionsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetInfoOptionsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GetInfoOptionsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GetInfoOptionsTupleSchemeFactory(); private NumErrorsChoice num_err_choice; // optional @@ -73,10 +43,10 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G */ NUM_ERR_CHOICE((short)1, "num_err_choice"); - 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); } } @@ -99,21 +69,21 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G */ 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; } @@ -122,19 +92,19 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.NUM_ERR_CHOICE}; - 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.NUM_ERR_CHOICE, new org.apache.thrift.meta_data.FieldMetaData("num_err_choice", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NumErrorsChoice.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetInfoOptions.class, metaDataMap); } @@ -190,7 +160,7 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case NUM_ERR_CHOICE: if (value == null) { @@ -203,30 +173,30 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case NUM_ERR_CHOICE: return get_num_err_choice(); } - 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 NUM_ERR_CHOICE: return is_set_num_err_choice(); } - 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 GetInfoOptions) @@ -237,6 +207,8 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G public boolean equals(GetInfoOptions that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_num_err_choice = true && this.is_set_num_err_choice(); boolean that_present_num_err_choice = true && that.is_set_num_err_choice(); @@ -252,14 +224,13 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_num_err_choice = true && (is_set_num_err_choice()); - list.add(present_num_err_choice); - if (present_num_err_choice) - list.add(num_err_choice.getValue()); + hashCode = hashCode * 8191 + ((is_set_num_err_choice()) ? 131071 : 524287); + if (is_set_num_err_choice()) + hashCode = hashCode * 8191 + num_err_choice.getValue(); - return list.hashCode(); + return hashCode; } @Override @@ -270,7 +241,7 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_num_err_choice()).compareTo(other.is_set_num_err_choice()); + lastComparison = java.lang.Boolean.valueOf(is_set_num_err_choice()).compareTo(other.is_set_num_err_choice()); if (lastComparison != 0) { return lastComparison; } @@ -288,16 +259,16 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G } 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("GetInfoOptions("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("GetInfoOptions("); boolean first = true; if (is_set_num_err_choice()) { @@ -326,7 +297,7 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G } } - 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) { @@ -334,13 +305,13 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G } } - private static class GetInfoOptionsStandardSchemeFactory implements SchemeFactory { + private static class GetInfoOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public GetInfoOptionsStandardScheme getScheme() { return new GetInfoOptionsStandardScheme(); } } - private static class GetInfoOptionsStandardScheme extends StandardScheme<GetInfoOptions> { + private static class GetInfoOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<GetInfoOptions> { public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfoOptions struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -386,18 +357,18 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G } - private static class GetInfoOptionsTupleSchemeFactory implements SchemeFactory { + private static class GetInfoOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public GetInfoOptionsTupleScheme getScheme() { return new GetInfoOptionsTupleScheme(); } } - private static class GetInfoOptionsTupleScheme extends TupleScheme<GetInfoOptions> { + private static class GetInfoOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<GetInfoOptions> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, GetInfoOptions struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_num_err_choice()) { optionals.set(0); } @@ -409,8 +380,8 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G @Override public void read(org.apache.thrift.protocol.TProtocol prot, GetInfoOptions struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.num_err_choice = org.apache.storm.generated.NumErrorsChoice.findByValue(iprot.readI32()); struct.set_num_err_choice_isSet(true); @@ -418,5 +389,8 @@ public class GetInfoOptions implements org.apache.thrift.TBase<GetInfoOptions, G } } + 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/GlobalStreamId.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.java b/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.java index 677dfd8..6911fec 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.java +++ b/storm-client/src/jvm/org/apache/storm/generated/GlobalStreamId.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 GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, GlobalStreamId._Fields>, java.io.Serializable, Cloneable, Comparable<GlobalStreamId> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GlobalStreamId"); private static final org.apache.thrift.protocol.TField COMPONENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("componentId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField STREAM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("streamId", 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 GlobalStreamIdStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GlobalStreamIdTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GlobalStreamIdStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GlobalStreamIdTupleSchemeFactory(); - private String componentId; // required - private String streamId; // required + private java.lang.String componentId; // required + private java.lang.String streamId; // 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 { COMPONENT_ID((short)1, "componentId"), STREAM_ID((short)2, "streamId"); - 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 GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G */ 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,20 +93,20 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G 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.COMPONENT_ID, new org.apache.thrift.meta_data.FieldMetaData("componentId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.STREAM_ID, new org.apache.thrift.meta_data.FieldMetaData("streamId", 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(GlobalStreamId.class, metaDataMap); } @@ -144,8 +114,8 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G } public GlobalStreamId( - String componentId, - String streamId) + java.lang.String componentId, + java.lang.String streamId) { this(); this.componentId = componentId; @@ -174,11 +144,11 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G this.streamId = null; } - public String get_componentId() { + public java.lang.String get_componentId() { return this.componentId; } - public void set_componentId(String componentId) { + public void set_componentId(java.lang.String componentId) { this.componentId = componentId; } @@ -197,11 +167,11 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G } } - public String get_streamId() { + public java.lang.String get_streamId() { return this.streamId; } - public void set_streamId(String streamId) { + public void set_streamId(java.lang.String streamId) { this.streamId = streamId; } @@ -220,13 +190,13 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case COMPONENT_ID: if (value == null) { unset_componentId(); } else { - set_componentId((String)value); + set_componentId((java.lang.String)value); } break; @@ -234,14 +204,14 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G if (value == null) { unset_streamId(); } else { - set_streamId((String)value); + set_streamId((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case COMPONENT_ID: return get_componentId(); @@ -250,13 +220,13 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G return get_streamId(); } - 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) { @@ -265,11 +235,11 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G case STREAM_ID: return is_set_streamId(); } - 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 GlobalStreamId) @@ -280,6 +250,8 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G public boolean equals(GlobalStreamId that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_componentId = true && this.is_set_componentId(); boolean that_present_componentId = true && that.is_set_componentId(); @@ -304,19 +276,17 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_componentId = true && (is_set_componentId()); - list.add(present_componentId); - if (present_componentId) - list.add(componentId); + hashCode = hashCode * 8191 + ((is_set_componentId()) ? 131071 : 524287); + if (is_set_componentId()) + hashCode = hashCode * 8191 + componentId.hashCode(); - boolean present_streamId = true && (is_set_streamId()); - list.add(present_streamId); - if (present_streamId) - list.add(streamId); + hashCode = hashCode * 8191 + ((is_set_streamId()) ? 131071 : 524287); + if (is_set_streamId()) + hashCode = hashCode * 8191 + streamId.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -327,7 +297,7 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_componentId()).compareTo(other.is_set_componentId()); + lastComparison = java.lang.Boolean.valueOf(is_set_componentId()).compareTo(other.is_set_componentId()); if (lastComparison != 0) { return lastComparison; } @@ -337,7 +307,7 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_streamId()).compareTo(other.is_set_streamId()); + lastComparison = java.lang.Boolean.valueOf(is_set_streamId()).compareTo(other.is_set_streamId()); if (lastComparison != 0) { return lastComparison; } @@ -355,16 +325,16 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G } 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("GlobalStreamId("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("GlobalStreamId("); boolean first = true; sb.append("componentId:"); @@ -407,7 +377,7 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G } } - 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) { @@ -415,13 +385,13 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G } } - private static class GlobalStreamIdStandardSchemeFactory implements SchemeFactory { + private static class GlobalStreamIdStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public GlobalStreamIdStandardScheme getScheme() { return new GlobalStreamIdStandardScheme(); } } - private static class GlobalStreamIdStandardScheme extends StandardScheme<GlobalStreamId> { + private static class GlobalStreamIdStandardScheme extends org.apache.thrift.scheme.StandardScheme<GlobalStreamId> { public void read(org.apache.thrift.protocol.TProtocol iprot, GlobalStreamId struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -478,24 +448,24 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G } - private static class GlobalStreamIdTupleSchemeFactory implements SchemeFactory { + private static class GlobalStreamIdTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public GlobalStreamIdTupleScheme getScheme() { return new GlobalStreamIdTupleScheme(); } } - private static class GlobalStreamIdTupleScheme extends TupleScheme<GlobalStreamId> { + private static class GlobalStreamIdTupleScheme extends org.apache.thrift.scheme.TupleScheme<GlobalStreamId> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, GlobalStreamId 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.componentId); oprot.writeString(struct.streamId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, GlobalStreamId struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.componentId = iprot.readString(); struct.set_componentId_isSet(true); struct.streamId = iprot.readString(); @@ -503,5 +473,8 @@ public class GlobalStreamId implements org.apache.thrift.TBase<GlobalStreamId, G } } + 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(); + } }
