http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java b/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java index a99475f..8948a67 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.java +++ b/storm-client/src/jvm/org/apache/storm/generated/LocalStateData.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 LocalStateData implements org.apache.thrift.TBase<LocalStateData, LocalStateData._Fields>, java.io.Serializable, Cloneable, Comparable<LocalStateData> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LocalStateData"); private static final org.apache.thrift.protocol.TField SERIALIZED_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("serialized_parts", org.apache.thrift.protocol.TType.MAP, (short)1); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LocalStateDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LocalStateDataTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LocalStateDataStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LocalStateDataTupleSchemeFactory(); - private Map<String,ThriftSerializedObject> serialized_parts; // required + private java.util.Map<java.lang.String,ThriftSerializedObject> serialized_parts; // 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 { SERIALIZED_PARTS((short)1, "serialized_parts"); - 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 LocalStateData implements org.apache.thrift.TBase<LocalStateData, L */ 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,20 +88,20 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L 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.SERIALIZED_PARTS, new org.apache.thrift.meta_data.FieldMetaData("serialized_parts", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ThriftSerializedObject.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LocalStateData.class, metaDataMap); } @@ -139,7 +109,7 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L } public LocalStateData( - Map<String,ThriftSerializedObject> serialized_parts) + java.util.Map<java.lang.String,ThriftSerializedObject> serialized_parts) { this(); this.serialized_parts = serialized_parts; @@ -150,13 +120,13 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L */ public LocalStateData(LocalStateData other) { if (other.is_set_serialized_parts()) { - Map<String,ThriftSerializedObject> __this__serialized_parts = new HashMap<String,ThriftSerializedObject>(other.serialized_parts.size()); - for (Map.Entry<String, ThriftSerializedObject> other_element : other.serialized_parts.entrySet()) { + java.util.Map<java.lang.String,ThriftSerializedObject> __this__serialized_parts = new java.util.HashMap<java.lang.String,ThriftSerializedObject>(other.serialized_parts.size()); + for (java.util.Map.Entry<java.lang.String, ThriftSerializedObject> other_element : other.serialized_parts.entrySet()) { - String other_element_key = other_element.getKey(); + java.lang.String other_element_key = other_element.getKey(); ThriftSerializedObject other_element_value = other_element.getValue(); - String __this__serialized_parts_copy_key = other_element_key; + java.lang.String __this__serialized_parts_copy_key = other_element_key; ThriftSerializedObject __this__serialized_parts_copy_value = new ThriftSerializedObject(other_element_value); @@ -179,18 +149,18 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L return (this.serialized_parts == null) ? 0 : this.serialized_parts.size(); } - public void put_to_serialized_parts(String key, ThriftSerializedObject val) { + public void put_to_serialized_parts(java.lang.String key, ThriftSerializedObject val) { if (this.serialized_parts == null) { - this.serialized_parts = new HashMap<String,ThriftSerializedObject>(); + this.serialized_parts = new java.util.HashMap<java.lang.String,ThriftSerializedObject>(); } this.serialized_parts.put(key, val); } - public Map<String,ThriftSerializedObject> get_serialized_parts() { + public java.util.Map<java.lang.String,ThriftSerializedObject> get_serialized_parts() { return this.serialized_parts; } - public void set_serialized_parts(Map<String,ThriftSerializedObject> serialized_parts) { + public void set_serialized_parts(java.util.Map<java.lang.String,ThriftSerializedObject> serialized_parts) { this.serialized_parts = serialized_parts; } @@ -209,43 +179,43 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case SERIALIZED_PARTS: if (value == null) { unset_serialized_parts(); } else { - set_serialized_parts((Map<String,ThriftSerializedObject>)value); + set_serialized_parts((java.util.Map<java.lang.String,ThriftSerializedObject>)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SERIALIZED_PARTS: return get_serialized_parts(); } - 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 SERIALIZED_PARTS: return is_set_serialized_parts(); } - 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 LocalStateData) @@ -256,6 +226,8 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L public boolean equals(LocalStateData that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_serialized_parts = true && this.is_set_serialized_parts(); boolean that_present_serialized_parts = true && that.is_set_serialized_parts(); @@ -271,14 +243,13 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_serialized_parts = true && (is_set_serialized_parts()); - list.add(present_serialized_parts); - if (present_serialized_parts) - list.add(serialized_parts); + hashCode = hashCode * 8191 + ((is_set_serialized_parts()) ? 131071 : 524287); + if (is_set_serialized_parts()) + hashCode = hashCode * 8191 + serialized_parts.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -289,7 +260,7 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_serialized_parts()).compareTo(other.is_set_serialized_parts()); + lastComparison = java.lang.Boolean.valueOf(is_set_serialized_parts()).compareTo(other.is_set_serialized_parts()); if (lastComparison != 0) { return lastComparison; } @@ -307,16 +278,16 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L } 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("LocalStateData("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("LocalStateData("); boolean first = true; sb.append("serialized_parts:"); @@ -347,7 +318,7 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L } } - 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) { @@ -355,13 +326,13 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L } } - private static class LocalStateDataStandardSchemeFactory implements SchemeFactory { + private static class LocalStateDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LocalStateDataStandardScheme getScheme() { return new LocalStateDataStandardScheme(); } } - private static class LocalStateDataStandardScheme extends StandardScheme<LocalStateData> { + private static class LocalStateDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<LocalStateData> { public void read(org.apache.thrift.protocol.TProtocol iprot, LocalStateData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -377,8 +348,8 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map782 = iprot.readMapBegin(); - struct.serialized_parts = new HashMap<String,ThriftSerializedObject>(2*_map782.size); - String _key783; + struct.serialized_parts = new java.util.HashMap<java.lang.String,ThriftSerializedObject>(2*_map782.size); + java.lang.String _key783; ThriftSerializedObject _val784; for (int _i785 = 0; _i785 < _map782.size; ++_i785) { @@ -411,7 +382,7 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L oprot.writeFieldBegin(SERIALIZED_PARTS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.serialized_parts.size())); - for (Map.Entry<String, ThriftSerializedObject> _iter786 : struct.serialized_parts.entrySet()) + for (java.util.Map.Entry<java.lang.String, ThriftSerializedObject> _iter786 : struct.serialized_parts.entrySet()) { oprot.writeString(_iter786.getKey()); _iter786.getValue().write(oprot); @@ -426,20 +397,20 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L } - private static class LocalStateDataTupleSchemeFactory implements SchemeFactory { + private static class LocalStateDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LocalStateDataTupleScheme getScheme() { return new LocalStateDataTupleScheme(); } } - private static class LocalStateDataTupleScheme extends TupleScheme<LocalStateData> { + private static class LocalStateDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<LocalStateData> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, LocalStateData 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.serialized_parts.size()); - for (Map.Entry<String, ThriftSerializedObject> _iter787 : struct.serialized_parts.entrySet()) + for (java.util.Map.Entry<java.lang.String, ThriftSerializedObject> _iter787 : struct.serialized_parts.entrySet()) { oprot.writeString(_iter787.getKey()); _iter787.getValue().write(oprot); @@ -449,11 +420,11 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L @Override public void read(org.apache.thrift.protocol.TProtocol prot, LocalStateData 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 _map788 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.serialized_parts = new HashMap<String,ThriftSerializedObject>(2*_map788.size); - String _key789; + struct.serialized_parts = new java.util.HashMap<java.lang.String,ThriftSerializedObject>(2*_map788.size); + java.lang.String _key789; ThriftSerializedObject _val790; for (int _i791 = 0; _i791 < _map788.size; ++_i791) { @@ -467,5 +438,8 @@ public class LocalStateData implements org.apache.thrift.TBase<LocalStateData, L } } + 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/LogConfig.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/LogConfig.java b/storm-client/src/jvm/org/apache/storm/generated/LogConfig.java index f44203f..9c6ed85 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/LogConfig.java +++ b/storm-client/src/jvm/org/apache/storm/generated/LogConfig.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 LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._Fields>, java.io.Serializable, Cloneable, Comparable<LogConfig> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LogConfig"); private static final org.apache.thrift.protocol.TField NAMED_LOGGER_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("named_logger_level", org.apache.thrift.protocol.TType.MAP, (short)2); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LogConfigStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LogConfigTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LogConfigStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LogConfigTupleSchemeFactory(); - private Map<String,LogLevel> named_logger_level; // optional + private java.util.Map<java.lang.String,LogLevel> named_logger_level; // 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 { NAMED_LOGGER_LEVEL((short)2, "named_logger_level"); - 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 LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ */ 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,21 +88,21 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.NAMED_LOGGER_LEVEL}; - 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.NAMED_LOGGER_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("named_logger_level", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LogLevel.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogConfig.class, metaDataMap); } @@ -144,13 +114,13 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ */ public LogConfig(LogConfig other) { if (other.is_set_named_logger_level()) { - Map<String,LogLevel> __this__named_logger_level = new HashMap<String,LogLevel>(other.named_logger_level.size()); - for (Map.Entry<String, LogLevel> other_element : other.named_logger_level.entrySet()) { + java.util.Map<java.lang.String,LogLevel> __this__named_logger_level = new java.util.HashMap<java.lang.String,LogLevel>(other.named_logger_level.size()); + for (java.util.Map.Entry<java.lang.String, LogLevel> other_element : other.named_logger_level.entrySet()) { - String other_element_key = other_element.getKey(); + java.lang.String other_element_key = other_element.getKey(); LogLevel other_element_value = other_element.getValue(); - String __this__named_logger_level_copy_key = other_element_key; + java.lang.String __this__named_logger_level_copy_key = other_element_key; LogLevel __this__named_logger_level_copy_value = new LogLevel(other_element_value); @@ -173,18 +143,18 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ return (this.named_logger_level == null) ? 0 : this.named_logger_level.size(); } - public void put_to_named_logger_level(String key, LogLevel val) { + public void put_to_named_logger_level(java.lang.String key, LogLevel val) { if (this.named_logger_level == null) { - this.named_logger_level = new HashMap<String,LogLevel>(); + this.named_logger_level = new java.util.HashMap<java.lang.String,LogLevel>(); } this.named_logger_level.put(key, val); } - public Map<String,LogLevel> get_named_logger_level() { + public java.util.Map<java.lang.String,LogLevel> get_named_logger_level() { return this.named_logger_level; } - public void set_named_logger_level(Map<String,LogLevel> named_logger_level) { + public void set_named_logger_level(java.util.Map<java.lang.String,LogLevel> named_logger_level) { this.named_logger_level = named_logger_level; } @@ -203,43 +173,43 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case NAMED_LOGGER_LEVEL: if (value == null) { unset_named_logger_level(); } else { - set_named_logger_level((Map<String,LogLevel>)value); + set_named_logger_level((java.util.Map<java.lang.String,LogLevel>)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case NAMED_LOGGER_LEVEL: return get_named_logger_level(); } - 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 NAMED_LOGGER_LEVEL: return is_set_named_logger_level(); } - 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 LogConfig) @@ -250,6 +220,8 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ public boolean equals(LogConfig that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_named_logger_level = true && this.is_set_named_logger_level(); boolean that_present_named_logger_level = true && that.is_set_named_logger_level(); @@ -265,14 +237,13 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_named_logger_level = true && (is_set_named_logger_level()); - list.add(present_named_logger_level); - if (present_named_logger_level) - list.add(named_logger_level); + hashCode = hashCode * 8191 + ((is_set_named_logger_level()) ? 131071 : 524287); + if (is_set_named_logger_level()) + hashCode = hashCode * 8191 + named_logger_level.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -283,7 +254,7 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_named_logger_level()).compareTo(other.is_set_named_logger_level()); + lastComparison = java.lang.Boolean.valueOf(is_set_named_logger_level()).compareTo(other.is_set_named_logger_level()); if (lastComparison != 0) { return lastComparison; } @@ -301,16 +272,16 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ } 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("LogConfig("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("LogConfig("); boolean first = true; if (is_set_named_logger_level()) { @@ -339,7 +310,7 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ } } - 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) { @@ -347,13 +318,13 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ } } - private static class LogConfigStandardSchemeFactory implements SchemeFactory { + private static class LogConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LogConfigStandardScheme getScheme() { return new LogConfigStandardScheme(); } } - private static class LogConfigStandardScheme extends StandardScheme<LogConfig> { + private static class LogConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<LogConfig> { public void read(org.apache.thrift.protocol.TProtocol iprot, LogConfig struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -369,8 +340,8 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map852 = iprot.readMapBegin(); - struct.named_logger_level = new HashMap<String,LogLevel>(2*_map852.size); - String _key853; + struct.named_logger_level = new java.util.HashMap<java.lang.String,LogLevel>(2*_map852.size); + java.lang.String _key853; LogLevel _val854; for (int _i855 = 0; _i855 < _map852.size; ++_i855) { @@ -404,7 +375,7 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ oprot.writeFieldBegin(NAMED_LOGGER_LEVEL_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.named_logger_level.size())); - for (Map.Entry<String, LogLevel> _iter856 : struct.named_logger_level.entrySet()) + for (java.util.Map.Entry<java.lang.String, LogLevel> _iter856 : struct.named_logger_level.entrySet()) { oprot.writeString(_iter856.getKey()); _iter856.getValue().write(oprot); @@ -420,18 +391,18 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ } - private static class LogConfigTupleSchemeFactory implements SchemeFactory { + private static class LogConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LogConfigTupleScheme getScheme() { return new LogConfigTupleScheme(); } } - private static class LogConfigTupleScheme extends TupleScheme<LogConfig> { + private static class LogConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<LogConfig> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, LogConfig 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_named_logger_level()) { optionals.set(0); } @@ -439,7 +410,7 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ if (struct.is_set_named_logger_level()) { { oprot.writeI32(struct.named_logger_level.size()); - for (Map.Entry<String, LogLevel> _iter857 : struct.named_logger_level.entrySet()) + for (java.util.Map.Entry<java.lang.String, LogLevel> _iter857 : struct.named_logger_level.entrySet()) { oprot.writeString(_iter857.getKey()); _iter857.getValue().write(oprot); @@ -450,13 +421,13 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ @Override public void read(org.apache.thrift.protocol.TProtocol prot, LogConfig 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)) { { org.apache.thrift.protocol.TMap _map858 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.named_logger_level = new HashMap<String,LogLevel>(2*_map858.size); - String _key859; + struct.named_logger_level = new java.util.HashMap<java.lang.String,LogLevel>(2*_map858.size); + java.lang.String _key859; LogLevel _val860; for (int _i861 = 0; _i861 < _map858.size; ++_i861) { @@ -471,5 +442,8 @@ public class LogConfig implements org.apache.thrift.TBase<LogConfig, LogConfig._ } } + 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/LogLevel.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/LogLevel.java b/storm-client/src/jvm/org/apache/storm/generated/LogLevel.java index 332cabb..c0180a8 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/LogLevel.java +++ b/storm-client/src/jvm/org/apache/storm/generated/LogLevel.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 LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fields>, java.io.Serializable, Cloneable, Comparable<LogLevel> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LogLevel"); @@ -61,17 +34,14 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie private static final org.apache.thrift.protocol.TField RESET_LOG_LEVEL_TIMEOUT_EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("reset_log_level_timeout_epoch", org.apache.thrift.protocol.TType.I64, (short)4); private static final org.apache.thrift.protocol.TField RESET_LOG_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("reset_log_level", 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 LogLevelStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LogLevelTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LogLevelStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LogLevelTupleSchemeFactory(); private LogLevelAction action; // required - private String target_log_level; // optional + private java.lang.String target_log_level; // optional private int reset_log_level_timeout_secs; // optional private long reset_log_level_timeout_epoch; // optional - private String reset_log_level; // optional + private java.lang.String reset_log_level; // 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 { @@ -85,10 +55,10 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie RESET_LOG_LEVEL_TIMEOUT_EPOCH((short)4, "reset_log_level_timeout_epoch"), RESET_LOG_LEVEL((short)5, "reset_log_level"); - 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); } } @@ -119,21 +89,21 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie */ 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; } @@ -142,7 +112,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -152,9 +122,9 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie private static final int __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID = 1; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.TARGET_LOG_LEVEL,_Fields.RESET_LOG_LEVEL_TIMEOUT_SECS,_Fields.RESET_LOG_LEVEL_TIMEOUT_EPOCH,_Fields.RESET_LOG_LEVEL}; - 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.ACTION, new org.apache.thrift.meta_data.FieldMetaData("action", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LogLevelAction.class))); tmpMap.put(_Fields.TARGET_LOG_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("target_log_level", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -165,7 +135,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.RESET_LOG_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("reset_log_level", 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(LogLevel.class, metaDataMap); } @@ -243,11 +213,11 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } } - public String get_target_log_level() { + public java.lang.String get_target_log_level() { return this.target_log_level; } - public void set_target_log_level(String target_log_level) { + public void set_target_log_level(java.lang.String target_log_level) { this.target_log_level = target_log_level; } @@ -276,16 +246,16 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } public void unset_reset_log_level_timeout_secs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID); } /** Returns true if field reset_log_level_timeout_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_reset_log_level_timeout_secs() { - return EncodingUtils.testBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID); } public void set_reset_log_level_timeout_secs_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_SECS_ISSET_ID, value); } public long get_reset_log_level_timeout_epoch() { @@ -298,23 +268,23 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } public void unset_reset_log_level_timeout_epoch() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID); } /** Returns true if field reset_log_level_timeout_epoch is set (has been assigned a value) and false otherwise */ public boolean is_set_reset_log_level_timeout_epoch() { - return EncodingUtils.testBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID); } public void set_reset_log_level_timeout_epoch_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESET_LOG_LEVEL_TIMEOUT_EPOCH_ISSET_ID, value); } - public String get_reset_log_level() { + public java.lang.String get_reset_log_level() { return this.reset_log_level; } - public void set_reset_log_level(String reset_log_level) { + public void set_reset_log_level(java.lang.String reset_log_level) { this.reset_log_level = reset_log_level; } @@ -333,7 +303,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case ACTION: if (value == null) { @@ -347,7 +317,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie if (value == null) { unset_target_log_level(); } else { - set_target_log_level((String)value); + set_target_log_level((java.lang.String)value); } break; @@ -355,7 +325,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie if (value == null) { unset_reset_log_level_timeout_secs(); } else { - set_reset_log_level_timeout_secs((Integer)value); + set_reset_log_level_timeout_secs((java.lang.Integer)value); } break; @@ -363,7 +333,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie if (value == null) { unset_reset_log_level_timeout_epoch(); } else { - set_reset_log_level_timeout_epoch((Long)value); + set_reset_log_level_timeout_epoch((java.lang.Long)value); } break; @@ -371,14 +341,14 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie if (value == null) { unset_reset_log_level(); } else { - set_reset_log_level((String)value); + set_reset_log_level((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ACTION: return get_action(); @@ -396,13 +366,13 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie return get_reset_log_level(); } - 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) { @@ -417,11 +387,11 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie case RESET_LOG_LEVEL: return is_set_reset_log_level(); } - 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 LogLevel) @@ -432,6 +402,8 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie public boolean equals(LogLevel that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_action = true && this.is_set_action(); boolean that_present_action = true && that.is_set_action(); @@ -483,34 +455,29 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_action = true && (is_set_action()); - list.add(present_action); - if (present_action) - list.add(action.getValue()); + hashCode = hashCode * 8191 + ((is_set_action()) ? 131071 : 524287); + if (is_set_action()) + hashCode = hashCode * 8191 + action.getValue(); - boolean present_target_log_level = true && (is_set_target_log_level()); - list.add(present_target_log_level); - if (present_target_log_level) - list.add(target_log_level); + hashCode = hashCode * 8191 + ((is_set_target_log_level()) ? 131071 : 524287); + if (is_set_target_log_level()) + hashCode = hashCode * 8191 + target_log_level.hashCode(); - boolean present_reset_log_level_timeout_secs = true && (is_set_reset_log_level_timeout_secs()); - list.add(present_reset_log_level_timeout_secs); - if (present_reset_log_level_timeout_secs) - list.add(reset_log_level_timeout_secs); + hashCode = hashCode * 8191 + ((is_set_reset_log_level_timeout_secs()) ? 131071 : 524287); + if (is_set_reset_log_level_timeout_secs()) + hashCode = hashCode * 8191 + reset_log_level_timeout_secs; - boolean present_reset_log_level_timeout_epoch = true && (is_set_reset_log_level_timeout_epoch()); - list.add(present_reset_log_level_timeout_epoch); - if (present_reset_log_level_timeout_epoch) - list.add(reset_log_level_timeout_epoch); + hashCode = hashCode * 8191 + ((is_set_reset_log_level_timeout_epoch()) ? 131071 : 524287); + if (is_set_reset_log_level_timeout_epoch()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(reset_log_level_timeout_epoch); - boolean present_reset_log_level = true && (is_set_reset_log_level()); - list.add(present_reset_log_level); - if (present_reset_log_level) - list.add(reset_log_level); + hashCode = hashCode * 8191 + ((is_set_reset_log_level()) ? 131071 : 524287); + if (is_set_reset_log_level()) + hashCode = hashCode * 8191 + reset_log_level.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -521,7 +488,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_action()).compareTo(other.is_set_action()); + lastComparison = java.lang.Boolean.valueOf(is_set_action()).compareTo(other.is_set_action()); if (lastComparison != 0) { return lastComparison; } @@ -531,7 +498,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_target_log_level()).compareTo(other.is_set_target_log_level()); + lastComparison = java.lang.Boolean.valueOf(is_set_target_log_level()).compareTo(other.is_set_target_log_level()); if (lastComparison != 0) { return lastComparison; } @@ -541,7 +508,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_reset_log_level_timeout_secs()).compareTo(other.is_set_reset_log_level_timeout_secs()); + lastComparison = java.lang.Boolean.valueOf(is_set_reset_log_level_timeout_secs()).compareTo(other.is_set_reset_log_level_timeout_secs()); if (lastComparison != 0) { return lastComparison; } @@ -551,7 +518,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_reset_log_level_timeout_epoch()).compareTo(other.is_set_reset_log_level_timeout_epoch()); + lastComparison = java.lang.Boolean.valueOf(is_set_reset_log_level_timeout_epoch()).compareTo(other.is_set_reset_log_level_timeout_epoch()); if (lastComparison != 0) { return lastComparison; } @@ -561,7 +528,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_reset_log_level()).compareTo(other.is_set_reset_log_level()); + lastComparison = java.lang.Boolean.valueOf(is_set_reset_log_level()).compareTo(other.is_set_reset_log_level()); if (lastComparison != 0) { return lastComparison; } @@ -579,16 +546,16 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } 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("LogLevel("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("LogLevel("); boolean first = true; sb.append("action:"); @@ -651,7 +618,7 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } } - 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; @@ -661,13 +628,13 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } } - private static class LogLevelStandardSchemeFactory implements SchemeFactory { + private static class LogLevelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LogLevelStandardScheme getScheme() { return new LogLevelStandardScheme(); } } - private static class LogLevelStandardScheme extends StandardScheme<LogLevel> { + private static class LogLevelStandardScheme extends org.apache.thrift.scheme.StandardScheme<LogLevel> { public void read(org.apache.thrift.protocol.TProtocol iprot, LogLevel struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -767,19 +734,19 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } - private static class LogLevelTupleSchemeFactory implements SchemeFactory { + private static class LogLevelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public LogLevelTupleScheme getScheme() { return new LogLevelTupleScheme(); } } - private static class LogLevelTupleScheme extends TupleScheme<LogLevel> { + private static class LogLevelTupleScheme extends org.apache.thrift.scheme.TupleScheme<LogLevel> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, LogLevel 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.action.getValue()); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_target_log_level()) { optionals.set(0); } @@ -809,10 +776,10 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie @Override public void read(org.apache.thrift.protocol.TProtocol prot, LogLevel struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.action = org.apache.storm.generated.LogLevelAction.findByValue(iprot.readI32()); struct.set_action_isSet(true); - BitSet incoming = iprot.readBitSet(4); + java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.target_log_level = iprot.readString(); struct.set_target_log_level_isSet(true); @@ -832,5 +799,8 @@ public class LogLevel implements org.apache.thrift.TBase<LogLevel, LogLevel._Fie } } + 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/LogLevelAction.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java b/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java index 1f0a41a..e317271 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java +++ b/storm-client/src/jvm/org/apache/storm/generated/LogLevelAction.java @@ -16,7 +16,7 @@ * 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 @@ -24,10 +24,6 @@ package org.apache.storm.generated; -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - public enum LogLevelAction implements org.apache.thrift.TEnum { UNCHANGED(1), UPDATE(2),
