You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/05/23 20:03:53 UTC
[23/43] storm git commit: STORM-3061: thrift 0.11
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java b/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java
index c0c5247..cc7f95c 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NimbusSummary.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"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, NimbusSummary._Fields>, java.io.Serializable, Cloneable, Comparable<NimbusSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NimbusSummary");
@@ -61,17 +34,14 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
private static final org.apache.thrift.protocol.TField IS_LEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("isLeader", org.apache.thrift.protocol.TType.BOOL, (short)4);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", 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 NimbusSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NimbusSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NimbusSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NimbusSummaryTupleSchemeFactory();
- private String host; // required
+ private java.lang.String host; // required
private int port; // required
private int uptime_secs; // required
private boolean isLeader; // required
- private String version; // required
+ private java.lang.String version; // 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 {
@@ -81,10 +51,10 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
IS_LEADER((short)4, "isLeader"),
VERSION((short)5, "version");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -115,21 +85,21 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -138,7 +108,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -148,9 +118,9 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
private static final int __UPTIME_SECS_ISSET_ID = 1;
private static final int __ISLEADER_ISSET_ID = 2;
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.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.REQUIRED,
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.REQUIRED,
@@ -161,7 +131,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NimbusSummary.class, metaDataMap);
}
@@ -169,11 +139,11 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public NimbusSummary(
- String host,
+ java.lang.String host,
int port,
int uptime_secs,
boolean isLeader,
- String version)
+ java.lang.String version)
{
this();
this.host = host;
@@ -218,11 +188,11 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
this.version = null;
}
- 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;
}
@@ -251,16 +221,16 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public void unset_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean is_set_port() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
public int get_uptime_secs() {
@@ -273,16 +243,16 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public void unset_uptime_secs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
public boolean is_isLeader() {
@@ -295,23 +265,23 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
public void unset_isLeader() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISLEADER_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISLEADER_ISSET_ID);
}
/** Returns true if field isLeader is set (has been assigned a value) and false otherwise */
public boolean is_set_isLeader() {
- return EncodingUtils.testBit(__isset_bitfield, __ISLEADER_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISLEADER_ISSET_ID);
}
public void set_isLeader_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISLEADER_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISLEADER_ISSET_ID, value);
}
- public String get_version() {
+ public java.lang.String get_version() {
return this.version;
}
- public void set_version(String version) {
+ public void set_version(java.lang.String version) {
this.version = version;
}
@@ -330,13 +300,13 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case HOST:
if (value == null) {
unset_host();
} else {
- set_host((String)value);
+ set_host((java.lang.String)value);
}
break;
@@ -344,7 +314,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
if (value == null) {
unset_port();
} else {
- set_port((Integer)value);
+ set_port((java.lang.Integer)value);
}
break;
@@ -352,7 +322,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
if (value == null) {
unset_uptime_secs();
} else {
- set_uptime_secs((Integer)value);
+ set_uptime_secs((java.lang.Integer)value);
}
break;
@@ -360,7 +330,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
if (value == null) {
unset_isLeader();
} else {
- set_isLeader((Boolean)value);
+ set_isLeader((java.lang.Boolean)value);
}
break;
@@ -368,14 +338,14 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
if (value == null) {
unset_version();
} else {
- set_version((String)value);
+ set_version((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HOST:
return get_host();
@@ -393,13 +363,13 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return get_version();
}
- 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) {
@@ -414,11 +384,11 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
case VERSION:
return is_set_version();
}
- 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 NimbusSummary)
@@ -429,6 +399,8 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
public boolean equals(NimbusSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_host = true && this.is_set_host();
boolean that_present_host = true && that.is_set_host();
@@ -480,34 +452,23 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_host = true && (is_set_host());
- list.add(present_host);
- if (present_host)
- list.add(host);
+ hashCode = hashCode * 8191 + ((is_set_host()) ? 131071 : 524287);
+ if (is_set_host())
+ hashCode = hashCode * 8191 + host.hashCode();
- boolean present_port = true;
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + port;
- boolean present_uptime_secs = true;
- list.add(present_uptime_secs);
- if (present_uptime_secs)
- list.add(uptime_secs);
+ hashCode = hashCode * 8191 + uptime_secs;
- boolean present_isLeader = true;
- list.add(present_isLeader);
- if (present_isLeader)
- list.add(isLeader);
+ hashCode = hashCode * 8191 + ((isLeader) ? 131071 : 524287);
- boolean present_version = true && (is_set_version());
- list.add(present_version);
- if (present_version)
- list.add(version);
+ hashCode = hashCode * 8191 + ((is_set_version()) ? 131071 : 524287);
+ if (is_set_version())
+ hashCode = hashCode * 8191 + version.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -518,7 +479,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
int lastComparison = 0;
- 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;
}
@@ -528,7 +489,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
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;
}
@@ -538,7 +499,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -548,7 +509,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_isLeader()).compareTo(other.is_set_isLeader());
+ lastComparison = java.lang.Boolean.valueOf(is_set_isLeader()).compareTo(other.is_set_isLeader());
if (lastComparison != 0) {
return lastComparison;
}
@@ -558,7 +519,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
+ lastComparison = java.lang.Boolean.valueOf(is_set_version()).compareTo(other.is_set_version());
if (lastComparison != 0) {
return lastComparison;
}
@@ -576,16 +537,16 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
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("NimbusSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NimbusSummary(");
boolean first = true;
sb.append("host:");
@@ -652,7 +613,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
}
- 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;
@@ -662,13 +623,13 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
}
- private static class NimbusSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class NimbusSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NimbusSummaryStandardScheme getScheme() {
return new NimbusSummaryStandardScheme();
}
}
- private static class NimbusSummaryStandardScheme extends StandardScheme<NimbusSummary> {
+ private static class NimbusSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<NimbusSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NimbusSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -758,17 +719,17 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
- private static class NimbusSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class NimbusSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NimbusSummaryTupleScheme getScheme() {
return new NimbusSummaryTupleScheme();
}
}
- private static class NimbusSummaryTupleScheme extends TupleScheme<NimbusSummary> {
+ private static class NimbusSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<NimbusSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NimbusSummary 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.host);
oprot.writeI32(struct.port);
oprot.writeI32(struct.uptime_secs);
@@ -778,7 +739,7 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NimbusSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.host = iprot.readString();
struct.set_host_isSet(true);
struct.port = iprot.readI32();
@@ -792,5 +753,8 @@ public class NimbusSummary implements org.apache.thrift.TBase<NimbusSummary, Nim
}
}
+ 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/NodeInfo.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java b/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java
index 6bb9c1f..88cfe14 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NodeInfo.java
@@ -16,66 +16,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fields>, java.io.Serializable, Cloneable, Comparable<NodeInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NodeInfo");
private static final org.apache.thrift.protocol.TField NODE_FIELD_DESC = new org.apache.thrift.protocol.TField("node", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.SET, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NodeInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NodeInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NodeInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NodeInfoTupleSchemeFactory();
- private String node; // required
- private Set<Long> port; // required
+ private java.lang.String node; // required
+ private java.util.Set<java.lang.Long> port; // 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 {
NODE((short)1, "node"),
PORT((short)2, "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);
}
}
@@ -100,21 +70,21 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._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;
}
@@ -123,21 +93,21 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
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.NODE, new org.apache.thrift.meta_data.FieldMetaData("node", org.apache.thrift.TFieldRequirementType.REQUIRED,
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.REQUIRED,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NodeInfo.class, metaDataMap);
}
@@ -145,8 +115,8 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
public NodeInfo(
- String node,
- Set<Long> port)
+ java.lang.String node,
+ java.util.Set<java.lang.Long> port)
{
this();
this.node = node;
@@ -161,7 +131,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
this.node = other.node;
}
if (other.is_set_port()) {
- Set<Long> __this__port = new HashSet<Long>(other.port);
+ java.util.Set<java.lang.Long> __this__port = new java.util.HashSet<java.lang.Long>(other.port);
this.port = __this__port;
}
}
@@ -176,11 +146,11 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
this.port = null;
}
- public String get_node() {
+ public java.lang.String get_node() {
return this.node;
}
- public void set_node(String node) {
+ public void set_node(java.lang.String node) {
this.node = node;
}
@@ -203,22 +173,22 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
return (this.port == null) ? 0 : this.port.size();
}
- public java.util.Iterator<Long> get_port_iterator() {
+ public java.util.Iterator<java.lang.Long> get_port_iterator() {
return (this.port == null) ? null : this.port.iterator();
}
public void add_to_port(long elem) {
if (this.port == null) {
- this.port = new HashSet<Long>();
+ this.port = new java.util.HashSet<java.lang.Long>();
}
this.port.add(elem);
}
- public Set<Long> get_port() {
+ public java.util.Set<java.lang.Long> get_port() {
return this.port;
}
- public void set_port(Set<Long> port) {
+ public void set_port(java.util.Set<java.lang.Long> port) {
this.port = port;
}
@@ -237,13 +207,13 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NODE:
if (value == null) {
unset_node();
} else {
- set_node((String)value);
+ set_node((java.lang.String)value);
}
break;
@@ -251,14 +221,14 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
if (value == null) {
unset_port();
} else {
- set_port((Set<Long>)value);
+ set_port((java.util.Set<java.lang.Long>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NODE:
return get_node();
@@ -267,13 +237,13 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
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) {
@@ -282,11 +252,11 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
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 NodeInfo)
@@ -297,6 +267,8 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
public boolean equals(NodeInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_node = true && this.is_set_node();
boolean that_present_node = true && that.is_set_node();
@@ -321,19 +293,17 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_node = true && (is_set_node());
- list.add(present_node);
- if (present_node)
- list.add(node);
+ hashCode = hashCode * 8191 + ((is_set_node()) ? 131071 : 524287);
+ if (is_set_node())
+ hashCode = hashCode * 8191 + node.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.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -344,7 +314,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_node()).compareTo(other.is_set_node());
+ lastComparison = java.lang.Boolean.valueOf(is_set_node()).compareTo(other.is_set_node());
if (lastComparison != 0) {
return lastComparison;
}
@@ -354,7 +324,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
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;
}
@@ -372,16 +342,16 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._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("NodeInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NodeInfo(");
boolean first = true;
sb.append("node:");
@@ -424,7 +394,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._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 {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -432,13 +402,13 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
}
- private static class NodeInfoStandardSchemeFactory implements SchemeFactory {
+ private static class NodeInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NodeInfoStandardScheme getScheme() {
return new NodeInfoStandardScheme();
}
}
- private static class NodeInfoStandardScheme extends StandardScheme<NodeInfo> {
+ private static class NodeInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<NodeInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NodeInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -462,7 +432,7 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set658 = iprot.readSetBegin();
- struct.port = new HashSet<Long>(2*_set658.size);
+ struct.port = new java.util.HashSet<java.lang.Long>(2*_set658.size);
long _elem659;
for (int _i660 = 0; _i660 < _set658.size; ++_i660)
{
@@ -512,17 +482,17 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
}
- private static class NodeInfoTupleSchemeFactory implements SchemeFactory {
+ private static class NodeInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NodeInfoTupleScheme getScheme() {
return new NodeInfoTupleScheme();
}
}
- private static class NodeInfoTupleScheme extends TupleScheme<NodeInfo> {
+ private static class NodeInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<NodeInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NodeInfo 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.node);
{
oprot.writeI32(struct.port.size());
@@ -535,12 +505,12 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NodeInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.node = iprot.readString();
struct.set_node_isSet(true);
{
org.apache.thrift.protocol.TSet _set663 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.port = new HashSet<Long>(2*_set663.size);
+ struct.port = new java.util.HashSet<java.lang.Long>(2*_set663.size);
long _elem664;
for (int _i665 = 0; _i665 < _set663.size; ++_i665)
{
@@ -552,5 +522,8 @@ public class NodeInfo implements org.apache.thrift.TBase<NodeInfo, NodeInfo._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/NotAliveException.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java b/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java
index 8d9374a..733f4c9 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NotAliveException.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)")
-public class NotAliveException extends TException implements org.apache.thrift.TBase<NotAliveException, NotAliveException._Fields>, java.io.Serializable, Cloneable, Comparable<NotAliveException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
+public class NotAliveException extends org.apache.thrift.TException implements org.apache.thrift.TBase<NotAliveException, NotAliveException._Fields>, java.io.Serializable, Cloneable, Comparable<NotAliveException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotAliveException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NotAliveExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NotAliveExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NotAliveExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NotAliveExceptionTupleSchemeFactory();
- private String msg; // required
+ private java.lang.String msg; // 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 {
MSG((short)1, "msg");
- 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 NotAliveException extends TException implements org.apache.thrift.T
*/
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,18 +88,18 @@ public class NotAliveException extends TException implements org.apache.thrift.T
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotAliveException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
public NotAliveException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -161,11 +131,11 @@ public class NotAliveException extends TException implements org.apache.thrift.T
this.msg = null;
}
- public String get_msg() {
+ public java.lang.String get_msg() {
return this.msg;
}
- public void set_msg(String msg) {
+ public void set_msg(java.lang.String msg) {
this.msg = msg;
}
@@ -184,43 +154,43 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unset_msg();
} else {
- set_msg((String)value);
+ set_msg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return get_msg();
}
- 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 MSG:
return is_set_msg();
}
- 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 NotAliveException)
@@ -231,6 +201,8 @@ public class NotAliveException extends TException implements org.apache.thrift.T
public boolean equals(NotAliveException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.is_set_msg();
boolean that_present_msg = true && that.is_set_msg();
@@ -246,14 +218,13 @@ public class NotAliveException extends TException implements org.apache.thrift.T
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (is_set_msg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287);
+ if (is_set_msg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class NotAliveException extends TException implements org.apache.thrift.T
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
+ lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
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("NotAliveException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NotAliveException(");
boolean first = true;
sb.append("msg:");
@@ -322,7 +293,7 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
}
- 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) {
@@ -330,13 +301,13 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
}
- private static class NotAliveExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class NotAliveExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NotAliveExceptionStandardScheme getScheme() {
return new NotAliveExceptionStandardScheme();
}
}
- private static class NotAliveExceptionStandardScheme extends StandardScheme<NotAliveException> {
+ private static class NotAliveExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<NotAliveException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NotAliveException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -380,27 +351,30 @@ public class NotAliveException extends TException implements org.apache.thrift.T
}
- private static class NotAliveExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class NotAliveExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NotAliveExceptionTupleScheme getScheme() {
return new NotAliveExceptionTupleScheme();
}
}
- private static class NotAliveExceptionTupleScheme extends TupleScheme<NotAliveException> {
+ private static class NotAliveExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<NotAliveException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NotAliveException 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.msg);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NotAliveException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.msg = iprot.readString();
struct.set_msg_isSet(true);
}
}
+ 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/NullStruct.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java b/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java
index a37ecbd..e89f71b 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NullStruct.java
@@ -16,61 +16,31 @@
* 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"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruct._Fields>, java.io.Serializable, Cloneable, Comparable<NullStruct> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NullStruct");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NullStructStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NullStructTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NullStructStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NullStructTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- 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);
}
}
@@ -91,21 +61,21 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
*/
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;
}
@@ -114,14 +84,14 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NullStruct.class, metaDataMap);
}
@@ -142,30 +112,30 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- 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) {
}
- 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 NullStruct)
@@ -176,15 +146,17 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
public boolean equals(NullStruct that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -203,16 +175,16 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
}
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("NullStruct(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NullStruct(");
boolean first = true;
sb.append(")");
@@ -232,7 +204,7 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
}
}
- 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) {
@@ -240,13 +212,13 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
}
}
- private static class NullStructStandardSchemeFactory implements SchemeFactory {
+ private static class NullStructStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NullStructStandardScheme getScheme() {
return new NullStructStandardScheme();
}
}
- private static class NullStructStandardScheme extends StandardScheme<NullStruct> {
+ private static class NullStructStandardScheme extends org.apache.thrift.scheme.StandardScheme<NullStruct> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NullStruct struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -277,24 +249,27 @@ public class NullStruct implements org.apache.thrift.TBase<NullStruct, NullStruc
}
- private static class NullStructTupleSchemeFactory implements SchemeFactory {
+ private static class NullStructTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NullStructTupleScheme getScheme() {
return new NullStructTupleScheme();
}
}
- private static class NullStructTupleScheme extends TupleScheme<NullStruct> {
+ private static class NullStructTupleScheme extends org.apache.thrift.scheme.TupleScheme<NullStruct> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NullStruct struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NullStruct struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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/NumErrorsChoice.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.java b/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.java
index 73421ee..bdafbab 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/NumErrorsChoice.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 NumErrorsChoice implements org.apache.thrift.TEnum {
ALL(0),
NONE(1),