http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java b/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java index 2ab536d..915b6cf 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ErrorInfo.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 ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._Fields>, java.io.Serializable, Cloneable, Comparable<ErrorInfo> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ErrorInfo"); @@ -60,15 +33,12 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ErrorInfoStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ErrorInfoTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ErrorInfoStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ErrorInfoTupleSchemeFactory(); - private String error; // required + private java.lang.String error; // required private int error_time_secs; // required - private String host; // optional + private java.lang.String host; // optional private int port; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -78,10 +48,10 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ HOST((short)3, "host"), PORT((short)4, "port"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -110,21 +80,21 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ */ 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 ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -143,9 +113,9 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ private static final int __PORT_ISSET_ID = 1; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.HOST,_Fields.PORT}; - 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.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ERROR_TIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("error_time_secs", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -154,7 +124,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ErrorInfo.class, metaDataMap); } @@ -162,7 +132,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ } public ErrorInfo( - String error, + java.lang.String error, int error_time_secs) { this(); @@ -200,11 +170,11 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ this.port = 0; } - public String get_error() { + public java.lang.String get_error() { return this.error; } - public void set_error(String error) { + public void set_error(java.lang.String error) { this.error = error; } @@ -233,23 +203,23 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ } public void unset_error_time_secs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID); } /** Returns true if field error_time_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_error_time_secs() { - return EncodingUtils.testBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID); } public void set_error_time_secs_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERROR_TIME_SECS_ISSET_ID, value); } - 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; } @@ -278,25 +248,25 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ } public void unset_port() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); } /** Returns true if field port is set (has been assigned a value) and false otherwise */ public boolean is_set_port() { - return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); } public void set_port_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case ERROR: if (value == null) { unset_error(); } else { - set_error((String)value); + set_error((java.lang.String)value); } break; @@ -304,7 +274,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ if (value == null) { unset_error_time_secs(); } else { - set_error_time_secs((Integer)value); + set_error_time_secs((java.lang.Integer)value); } break; @@ -312,7 +282,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ if (value == null) { unset_host(); } else { - set_host((String)value); + set_host((java.lang.String)value); } break; @@ -320,14 +290,14 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ if (value == null) { unset_port(); } else { - set_port((Integer)value); + set_port((java.lang.Integer)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ERROR: return get_error(); @@ -342,13 +312,13 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ return get_port(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -361,11 +331,11 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ case PORT: return is_set_port(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof ErrorInfo) @@ -376,6 +346,8 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ public boolean equals(ErrorInfo that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_error = true && this.is_set_error(); boolean that_present_error = true && that.is_set_error(); @@ -418,29 +390,23 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_error = true && (is_set_error()); - list.add(present_error); - if (present_error) - list.add(error); + hashCode = hashCode * 8191 + ((is_set_error()) ? 131071 : 524287); + if (is_set_error()) + hashCode = hashCode * 8191 + error.hashCode(); - boolean present_error_time_secs = true; - list.add(present_error_time_secs); - if (present_error_time_secs) - list.add(error_time_secs); + hashCode = hashCode * 8191 + error_time_secs; - 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 && (is_set_port()); - list.add(present_port); - if (present_port) - list.add(port); + hashCode = hashCode * 8191 + ((is_set_port()) ? 131071 : 524287); + if (is_set_port()) + hashCode = hashCode * 8191 + port; - return list.hashCode(); + return hashCode; } @Override @@ -451,7 +417,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_error()).compareTo(other.is_set_error()); + lastComparison = java.lang.Boolean.valueOf(is_set_error()).compareTo(other.is_set_error()); if (lastComparison != 0) { return lastComparison; } @@ -461,7 +427,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_error_time_secs()).compareTo(other.is_set_error_time_secs()); + lastComparison = java.lang.Boolean.valueOf(is_set_error_time_secs()).compareTo(other.is_set_error_time_secs()); if (lastComparison != 0) { return lastComparison; } @@ -471,7 +437,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ 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; } @@ -481,7 +447,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ 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; } @@ -499,16 +465,16 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ } 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("ErrorInfo("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("ErrorInfo("); boolean first = true; sb.append("error:"); @@ -563,7 +529,7 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ } } - 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; @@ -573,13 +539,13 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ } } - private static class ErrorInfoStandardSchemeFactory implements SchemeFactory { + private static class ErrorInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ErrorInfoStandardScheme getScheme() { return new ErrorInfoStandardScheme(); } } - private static class ErrorInfoStandardScheme extends StandardScheme<ErrorInfo> { + private static class ErrorInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<ErrorInfo> { public void read(org.apache.thrift.protocol.TProtocol iprot, ErrorInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -662,20 +628,20 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ } - private static class ErrorInfoTupleSchemeFactory implements SchemeFactory { + private static class ErrorInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ErrorInfoTupleScheme getScheme() { return new ErrorInfoTupleScheme(); } } - private static class ErrorInfoTupleScheme extends TupleScheme<ErrorInfo> { + private static class ErrorInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<ErrorInfo> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ErrorInfo 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.error); oprot.writeI32(struct.error_time_secs); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_host()) { optionals.set(0); } @@ -693,12 +659,12 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ @Override public void read(org.apache.thrift.protocol.TProtocol prot, ErrorInfo struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.error = iprot.readString(); struct.set_error_isSet(true); struct.error_time_secs = iprot.readI32(); struct.set_error_time_secs_isSet(true); - BitSet incoming = iprot.readBitSet(2); + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.host = iprot.readString(); struct.set_host_isSet(true); @@ -710,5 +676,8 @@ public class ErrorInfo implements org.apache.thrift.TBase<ErrorInfo, ErrorInfo._ } } + 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/ExecutorAggregateStats.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java index 5bc85e0..8091aca 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorAggregateStats.java @@ -16,53 +16,23 @@ * 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 ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorAggregateStats, ExecutorAggregateStats._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorAggregateStats> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorAggregateStats"); private static final org.apache.thrift.protocol.TField EXEC_SUMMARY_FIELD_DESC = new org.apache.thrift.protocol.TField("exec_summary", org.apache.thrift.protocol.TType.STRUCT, (short)1); 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)2); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ExecutorAggregateStatsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ExecutorAggregateStatsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExecutorAggregateStatsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExecutorAggregateStatsTupleSchemeFactory(); private ExecutorSummary exec_summary; // optional private ComponentAggregateStats stats; // optional @@ -72,10 +42,10 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA EXEC_SUMMARY((short)1, "exec_summary"), STATS((short)2, "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); } } @@ -100,21 +70,21 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -123,21 +93,21 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.EXEC_SUMMARY,_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.EXEC_SUMMARY, new org.apache.thrift.meta_data.FieldMetaData("exec_summary", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExecutorSummary.class))); 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, ComponentAggregateStats.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorAggregateStats.class, metaDataMap); } @@ -212,7 +182,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case EXEC_SUMMARY: if (value == null) { @@ -233,7 +203,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case EXEC_SUMMARY: return get_exec_summary(); @@ -242,13 +212,13 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA 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) { @@ -257,11 +227,11 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA 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 ExecutorAggregateStats) @@ -272,6 +242,8 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA public boolean equals(ExecutorAggregateStats that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_exec_summary = true && this.is_set_exec_summary(); boolean that_present_exec_summary = true && that.is_set_exec_summary(); @@ -296,19 +268,17 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_exec_summary = true && (is_set_exec_summary()); - list.add(present_exec_summary); - if (present_exec_summary) - list.add(exec_summary); + hashCode = hashCode * 8191 + ((is_set_exec_summary()) ? 131071 : 524287); + if (is_set_exec_summary()) + hashCode = hashCode * 8191 + exec_summary.hashCode(); - 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 @@ -319,7 +289,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_exec_summary()).compareTo(other.is_set_exec_summary()); + lastComparison = java.lang.Boolean.valueOf(is_set_exec_summary()).compareTo(other.is_set_exec_summary()); if (lastComparison != 0) { return lastComparison; } @@ -329,7 +299,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA 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; } @@ -347,16 +317,16 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA } 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("ExecutorAggregateStats("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("ExecutorAggregateStats("); boolean first = true; if (is_set_exec_summary()) { @@ -401,7 +371,7 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA } } - 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) { @@ -409,13 +379,13 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA } } - private static class ExecutorAggregateStatsStandardSchemeFactory implements SchemeFactory { + private static class ExecutorAggregateStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ExecutorAggregateStatsStandardScheme getScheme() { return new ExecutorAggregateStatsStandardScheme(); } } - private static class ExecutorAggregateStatsStandardScheme extends StandardScheme<ExecutorAggregateStats> { + private static class ExecutorAggregateStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ExecutorAggregateStats> { public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorAggregateStats struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -478,18 +448,18 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA } - private static class ExecutorAggregateStatsTupleSchemeFactory implements SchemeFactory { + private static class ExecutorAggregateStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ExecutorAggregateStatsTupleScheme getScheme() { return new ExecutorAggregateStatsTupleScheme(); } } - private static class ExecutorAggregateStatsTupleScheme extends TupleScheme<ExecutorAggregateStats> { + private static class ExecutorAggregateStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ExecutorAggregateStats> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorAggregateStats 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_exec_summary()) { optionals.set(0); } @@ -507,8 +477,8 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA @Override public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorAggregateStats struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.exec_summary = new ExecutorSummary(); struct.exec_summary.read(iprot); @@ -522,5 +492,8 @@ public class ExecutorAggregateStats implements org.apache.thrift.TBase<ExecutorA } } + 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/ExecutorInfo.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java index b3d7bab..24796c4 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorInfo.java @@ -16,53 +16,23 @@ * 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 ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, ExecutorInfo._Fields>, java.io.Serializable, Cloneable, Comparable<ExecutorInfo> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorInfo"); private static final org.apache.thrift.protocol.TField TASK_START_FIELD_DESC = new org.apache.thrift.protocol.TField("task_start", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField TASK_END_FIELD_DESC = new org.apache.thrift.protocol.TField("task_end", org.apache.thrift.protocol.TType.I32, (short)2); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ExecutorInfoStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ExecutorInfoTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExecutorInfoStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExecutorInfoTupleSchemeFactory(); private int task_start; // required private int task_end; // required @@ -72,10 +42,10 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu TASK_START((short)1, "task_start"), TASK_END((short)2, "task_end"); - 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 ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu */ 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,7 +93,7 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -132,14 +102,14 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu private static final int __TASK_START_ISSET_ID = 0; private static final int __TASK_END_ISSET_ID = 1; private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TASK_START, new org.apache.thrift.meta_data.FieldMetaData("task_start", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TASK_END, new org.apache.thrift.meta_data.FieldMetaData("task_end", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorInfo.class, metaDataMap); } @@ -188,16 +158,16 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu } public void unset_task_start() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TASK_START_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TASK_START_ISSET_ID); } /** Returns true if field task_start is set (has been assigned a value) and false otherwise */ public boolean is_set_task_start() { - return EncodingUtils.testBit(__isset_bitfield, __TASK_START_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TASK_START_ISSET_ID); } public void set_task_start_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TASK_START_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TASK_START_ISSET_ID, value); } public int get_task_end() { @@ -210,25 +180,25 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu } public void unset_task_end() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TASK_END_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TASK_END_ISSET_ID); } /** Returns true if field task_end is set (has been assigned a value) and false otherwise */ public boolean is_set_task_end() { - return EncodingUtils.testBit(__isset_bitfield, __TASK_END_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TASK_END_ISSET_ID); } public void set_task_end_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TASK_END_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TASK_END_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case TASK_START: if (value == null) { unset_task_start(); } else { - set_task_start((Integer)value); + set_task_start((java.lang.Integer)value); } break; @@ -236,14 +206,14 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu if (value == null) { unset_task_end(); } else { - set_task_end((Integer)value); + set_task_end((java.lang.Integer)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TASK_START: return get_task_start(); @@ -252,13 +222,13 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu return get_task_end(); } - 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) { @@ -267,11 +237,11 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu case TASK_END: return is_set_task_end(); } - 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 ExecutorInfo) @@ -282,6 +252,8 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu public boolean equals(ExecutorInfo that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_task_start = true; boolean that_present_task_start = true; @@ -306,19 +278,13 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_task_start = true; - list.add(present_task_start); - if (present_task_start) - list.add(task_start); + hashCode = hashCode * 8191 + task_start; - boolean present_task_end = true; - list.add(present_task_end); - if (present_task_end) - list.add(task_end); + hashCode = hashCode * 8191 + task_end; - return list.hashCode(); + return hashCode; } @Override @@ -329,7 +295,7 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_task_start()).compareTo(other.is_set_task_start()); + lastComparison = java.lang.Boolean.valueOf(is_set_task_start()).compareTo(other.is_set_task_start()); if (lastComparison != 0) { return lastComparison; } @@ -339,7 +305,7 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_task_end()).compareTo(other.is_set_task_end()); + lastComparison = java.lang.Boolean.valueOf(is_set_task_end()).compareTo(other.is_set_task_end()); if (lastComparison != 0) { return lastComparison; } @@ -357,16 +323,16 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu } 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("ExecutorInfo("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("ExecutorInfo("); boolean first = true; sb.append("task_start:"); @@ -401,7 +367,7 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu } } - 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; @@ -411,13 +377,13 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu } } - private static class ExecutorInfoStandardSchemeFactory implements SchemeFactory { + private static class ExecutorInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ExecutorInfoStandardScheme getScheme() { return new ExecutorInfoStandardScheme(); } } - private static class ExecutorInfoStandardScheme extends StandardScheme<ExecutorInfo> { + private static class ExecutorInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<ExecutorInfo> { public void read(org.apache.thrift.protocol.TProtocol iprot, ExecutorInfo struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -470,24 +436,24 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu } - private static class ExecutorInfoTupleSchemeFactory implements SchemeFactory { + private static class ExecutorInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ExecutorInfoTupleScheme getScheme() { return new ExecutorInfoTupleScheme(); } } - private static class ExecutorInfoTupleScheme extends TupleScheme<ExecutorInfo> { + private static class ExecutorInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<ExecutorInfo> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ExecutorInfo 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.task_start); oprot.writeI32(struct.task_end); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorInfo struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.task_start = iprot.readI32(); struct.set_task_start_isSet(true); struct.task_end = iprot.readI32(); @@ -495,5 +461,8 @@ public class ExecutorInfo implements org.apache.thrift.TBase<ExecutorInfo, Execu } } + 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/ExecutorSpecificStats.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java b/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java index d91f197..7e7e230 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ExecutorSpecificStats.java @@ -16,41 +16,14 @@ * 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"}) +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpecificStats, ExecutorSpecificStats._Fields> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecutorSpecificStats"); private static final org.apache.thrift.protocol.TField BOLT_FIELD_DESC = new org.apache.thrift.protocol.TField("bolt", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -61,10 +34,10 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec BOLT((short)1, "bolt"), SPOUT((short)2, "spout"); - 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); } } @@ -89,21 +62,21 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec */ 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; } @@ -112,19 +85,19 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } - 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); - tmpMap.put(_Fields.BOLT, new org.apache.thrift.meta_data.FieldMetaData("bolt", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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.BOLT, new org.apache.thrift.meta_data.FieldMetaData("bolt", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BoltStats.class))); - tmpMap.put(_Fields.SPOUT, new org.apache.thrift.meta_data.FieldMetaData("spout", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SPOUT, new org.apache.thrift.meta_data.FieldMetaData("spout", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SpoutStats.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExecutorSpecificStats.class, metaDataMap); } @@ -132,7 +105,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec super(); } - public ExecutorSpecificStats(_Fields setField, Object value) { + public ExecutorSpecificStats(_Fields setField, java.lang.Object value) { super(setField, value); } @@ -157,25 +130,25 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec @Override - protected void checkType(_Fields setField, Object value) throws ClassCastException { + protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException { switch (setField) { case BOLT: if (value instanceof BoltStats) { break; } - throw new ClassCastException("Was expecting value of type BoltStats for field 'bolt', but got " + value.getClass().getSimpleName()); + throw new java.lang.ClassCastException("Was expecting value of type BoltStats for field 'bolt', but got " + value.getClass().getSimpleName()); case SPOUT: if (value instanceof SpoutStats) { break; } - throw new ClassCastException("Was expecting value of type SpoutStats for field 'spout', but got " + value.getClass().getSimpleName()); + throw new java.lang.ClassCastException("Was expecting value of type SpoutStats for field 'spout', but got " + value.getClass().getSimpleName()); default: - throw new IllegalArgumentException("Unknown field id " + setField); + throw new java.lang.IllegalArgumentException("Unknown field id " + setField); } } @Override - protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { + protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(field.id); if (setField != null) { switch (setField) { @@ -200,7 +173,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec return null; } default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); @@ -220,12 +193,12 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec spout.write(oprot); return; default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); + throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_); } } @Override - protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { + protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(fieldID); if (setField != null) { switch (setField) { @@ -240,10 +213,10 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec spout.read(iprot); return spout; default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - throw new TProtocolException("Couldn't find a field with field id " + fieldID); + throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID); } } @@ -259,7 +232,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec spout.write(oprot); return; default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); + throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_); } } @@ -271,7 +244,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec case SPOUT: return SPOUT_FIELD_DESC; default: - throw new IllegalArgumentException("Unknown field id " + setField); + throw new java.lang.IllegalArgumentException("Unknown field id " + setField); } } @@ -294,12 +267,12 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec if (getSetField() == _Fields.BOLT) { return (BoltStats)getFieldValue(); } else { - throw new RuntimeException("Cannot get field 'bolt' because union is currently set to " + getFieldDesc(getSetField()).name); + throw new java.lang.RuntimeException("Cannot get field 'bolt' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void set_bolt(BoltStats value) { - if (value == null) throw new NullPointerException(); + if (value == null) throw new java.lang.NullPointerException(); setField_ = _Fields.BOLT; value_ = value; } @@ -308,12 +281,12 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec if (getSetField() == _Fields.SPOUT) { return (SpoutStats)getFieldValue(); } else { - throw new RuntimeException("Cannot get field 'spout' because union is currently set to " + getFieldDesc(getSetField()).name); + throw new java.lang.RuntimeException("Cannot get field 'spout' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void set_spout(SpoutStats value) { - if (value == null) throw new NullPointerException(); + if (value == null) throw new java.lang.NullPointerException(); setField_ = _Fields.SPOUT; value_ = value; } @@ -328,7 +301,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec } - public boolean equals(Object other) { + public boolean equals(java.lang.Object other) { if (other instanceof ExecutorSpecificStats) { return equals((ExecutorSpecificStats)other); } else { @@ -352,12 +325,12 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>(); list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); + java.lang.Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { @@ -375,7 +348,7 @@ public class ExecutorSpecificStats extends org.apache.thrift.TUnion<ExecutorSpec } - 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) {
