From c89270bb7d92c04bb38b987f14933281bb39f706 Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Tue, 18 Oct 2011 19:35:54 -0700 Subject: [PATCH] upgraded to thrift 7 --- project.clj | 3 +- src/clj/backtype/storm/daemon/drpc.clj | 15 +- src/clj/backtype/storm/daemon/nimbus.clj | 42 +- src/genthrift.sh | 2 +- src/jvm/backtype/storm/StormSubmitter.java | 3 +- .../generated/AlreadyAliveException.java | 96 +- src/jvm/backtype/storm/generated/Bolt.java | 148 +- .../backtype/storm/generated/BoltStats.java | 208 +- .../storm/generated/ClusterSummary.java | 157 +- .../storm/generated/ComponentCommon.java | 131 +- .../storm/generated/ComponentObject.java | 132 +- .../storm/generated/DistributedRPC.java | 620 ++-- .../backtype/storm/generated/ErrorInfo.java | 121 +- .../storm/generated/GlobalStreamId.java | 124 +- .../backtype/storm/generated/Grouping.java | 151 +- .../generated/InvalidTopologyException.java | 96 +- src/jvm/backtype/storm/generated/Nimbus.java | 3088 ++++++++--------- .../storm/generated/NotAliveException.java | 96 +- .../backtype/storm/generated/NullStruct.java | 76 +- .../storm/generated/ShellComponent.java | 112 +- .../backtype/storm/generated/SpoutSpec.java | 141 +- .../backtype/storm/generated/SpoutStats.java | 208 +- .../storm/generated/StateSpoutSpec.java | 116 +- .../storm/generated/StormTopology.java | 172 +- .../backtype/storm/generated/StreamInfo.java | 129 +- .../storm/generated/SupervisorSummary.java | 167 +- .../storm/generated/TaskSpecificStats.java | 104 +- .../backtype/storm/generated/TaskStats.java | 184 +- .../backtype/storm/generated/TaskSummary.java | 240 +- .../storm/generated/TopologyInfo.java | 169 +- .../storm/generated/TopologySummary.java | 187 +- src/jvm/backtype/storm/utils/Utils.java | 13 +- src/py/storm/DistributedRPC-remote | 12 +- src/py/storm/DistributedRPC.py | 133 +- src/py/storm/Nimbus-remote | 12 +- src/py/storm/Nimbus.py | 653 +--- src/py/storm/constants.py | 3 +- src/py/storm/ttypes.py | 884 ++--- 38 files changed, 4308 insertions(+), 4640 deletions(-) diff --git a/project.clj b/project.clj index 69e1d35d3..be8b7f5c5 100644 --- a/project.clj +++ b/project.clj @@ -10,7 +10,7 @@ [commons-io "1.4"] [org.apache.commons/commons-exec "1.1"] [jvyaml "1.0.0"] - [backtype/thriftjava "1.0.0"] + [org.apache.thrift/libthrift "0.7.0"] [clj-time "0.3.0"] [log4j/log4j "1.2.16"] [org.apache.zookeeper/zookeeper "3.3.2"] @@ -19,6 +19,7 @@ [compojure "0.6.4"] [hiccup "0.3.6"] [ring/ring-jetty-adapter "0.3.11"] + [org.slf4j/slf4j-log4j12 "1.5.8"] ] :uberjar-exclusions [#"META-INF.*"] :dev-dependencies [ diff --git a/src/clj/backtype/storm/daemon/drpc.clj b/src/clj/backtype/storm/daemon/drpc.clj index 17dfded78..fb0dd97ed 100644 --- a/src/clj/backtype/storm/daemon/drpc.clj +++ b/src/clj/backtype/storm/daemon/drpc.clj @@ -1,5 +1,5 @@ (ns backtype.storm.daemon.drpc - (:import [org.apache.thrift.server THsHaServer THsHaServer$Options]) + (:import [org.apache.thrift.server THsHaServer THsHaServer$Args]) (:import [org.apache.thrift.protocol TBinaryProtocol TBinaryProtocol$Factory]) (:import [org.apache.thrift TException]) (:import [org.apache.thrift.transport TNonblockingServerTransport TNonblockingServerSocket]) @@ -64,13 +64,12 @@ ([spout-adder] (launch-server! DEFAULT-PORT spout-adder)) ([port spout-adder] - (let [options (THsHaServer$Options.) - _ (set! (. options maxWorkerThreads) 64) - service-handler (service-handler spout-adder port) - server (THsHaServer. - (DistributedRPC$Processor. service-handler) - (TNonblockingServerSocket. port) - (TBinaryProtocol$Factory.) options)] + (let [service-handler (service-handler spout-adder port) + options (THsHaServer$Args. (TNonblockingServerSocket. port)) + _ (set! (. options maxWorkerThreads) 64) + _ (set! (. options processor) (DistributedRPC$Processor. service-handler)) + _ (set! (. options protocolFactory) (TBinaryProtocol$Factory.)) + server (THsHaServer. options)] (.addShutdownHook (Runtime/getRuntime) (Thread. (fn [] (.stop server)))) (log-message "Starting Distributed RPC server...") (.serve server)))) diff --git a/src/clj/backtype/storm/daemon/nimbus.clj b/src/clj/backtype/storm/daemon/nimbus.clj index 5bd4392ba..16825e996 100644 --- a/src/clj/backtype/storm/daemon/nimbus.clj +++ b/src/clj/backtype/storm/daemon/nimbus.clj @@ -1,8 +1,10 @@ (ns backtype.storm.daemon.nimbus - (:import [org.apache.thrift.server THsHaServer THsHaServer$Options]) + (:import [org.apache.thrift.server THsHaServer THsHaServer$Args]) (:import [org.apache.thrift.protocol TBinaryProtocol TBinaryProtocol$Factory]) (:import [org.apache.thrift TException]) (:import [org.apache.thrift.transport TNonblockingServerTransport TNonblockingServerSocket]) + (:import [java.nio ByteBuffer]) + (:import [java.nio.channels Channels WritableByteChannel]) (:use [backtype.storm bootstrap]) (:use [backtype.storm.daemon common]) (:gen-class)) @@ -469,26 +471,26 @@ (beginFileUpload [this] (let [fileloc (str inbox "/stormjar-" (uuid) ".jar")] - (.put uploaders fileloc (FileOutputStream. fileloc)) + (.put uploaders fileloc (Channels/newChannel (FileOutputStream. fileloc))) (log-message "Uploading file from client to " fileloc) fileloc )) - (^void uploadChunk [this ^String location ^bytes chunk] - (let [^FileOutputStream os (.get uploaders location)] - (when-not os + (^void uploadChunk [this ^String location ^ByteBuffer chunk] + (let [^WritableByteChannel channel (.get uploaders location)] + (when-not channel (throw (RuntimeException. "File for that location does not exist (or timed out)"))) - (.write os chunk) - (.put uploaders location os) + (.write channel chunk) + (.put uploaders location channel) )) (^void finishFileUpload [this ^String location] - (let [^FileOutputStream os (.get uploaders location)] - (when-not os + (let [^WritableByteChannel channel (.get uploaders location)] + (when-not channel (throw (RuntimeException. "File for that location does not exist (or timed out)"))) - (.close os) + (.close channel) (log-message "Finished uploading file from client: " location) (.remove uploaders location) )) @@ -500,7 +502,7 @@ id )) - (^bytes downloadChunk [this ^String id] + (^ByteBuffer downloadChunk [this ^String id] (let [^BufferFileInputStream is (.get downloaders id)] (when-not is (throw (RuntimeException. @@ -509,7 +511,7 @@ (.put downloaders id is) (when (empty? ret) (.remove downloaders id)) - ret + (ByteBuffer/wrap ret) ))) (^String getTopologyConf [this ^String id] @@ -604,13 +606,15 @@ (defn launch-server! [conf] (validate-distributed-mode! conf) - (let [options (THsHaServer$Options.) - _ (set! (. options maxWorkerThreads) 64) - service-handler (service-handler conf) - server (THsHaServer. - (Nimbus$Processor. service-handler) - (TNonblockingServerSocket. (int (conf NIMBUS-THRIFT-PORT))) - (TBinaryProtocol$Factory.) options)] + (let [service-handler (service-handler conf) + options (THsHaServer$Args. + (TNonblockingServerSocket. (int (conf NIMBUS-THRIFT-PORT)))) + _ (set! (. options workerThreads) 64) + _ (set! (. options processor) (Nimbus$Processor. service-handler)) + _ (set! (. options protocolFactory) (TBinaryProtocol$Factory.)) + _ (set! (. options maxWorkerThreads) 64) + + server (THsHaServer. options)] (.addShutdownHook (Runtime/getRuntime) (Thread. (fn [] (.shutdown service-handler) (.stop server)))) (log-message "Starting Nimbus server...") (.serve server))) diff --git a/src/genthrift.sh b/src/genthrift.sh index 593bf3a4e..b5fe374d4 100644 --- a/src/genthrift.sh +++ b/src/genthrift.sh @@ -1,6 +1,6 @@ rm -rf gen-javabean gen-py py rm -rf jvm/backtype/storm/generated -thrift --gen java:beans,hashcode,nocamel --gen py:utf8strings storm.thrift +thrift7 --gen java:beans,hashcode,nocamel --gen py:utf8strings storm.thrift mv gen-javabean/backtype/storm/generated jvm/backtype/storm/generated mv gen-py py rm -rf gen-javabean diff --git a/src/jvm/backtype/storm/StormSubmitter.java b/src/jvm/backtype/storm/StormSubmitter.java index f31d04abe..e00d58369 100644 --- a/src/jvm/backtype/storm/StormSubmitter.java +++ b/src/jvm/backtype/storm/StormSubmitter.java @@ -7,6 +7,7 @@ import backtype.storm.utils.BufferFileInputStream; import backtype.storm.utils.NimbusClient; import backtype.storm.utils.Utils; +import java.nio.ByteBuffer; import java.util.Map; import org.apache.log4j.Logger; import org.apache.thrift.TException; @@ -82,7 +83,7 @@ public static String submitJar(Map conf, String localJar) { while(true) { byte[] toSubmit = is.read(); if(toSubmit.length==0) break; - client.getClient().uploadChunk(uploadLocation, toSubmit); + client.getClient().uploadChunk(uploadLocation, ByteBuffer.wrap(toSubmit)); } client.getClient().finishFileUpload(uploadLocation); LOG.info("Successfully uploaded topology jar to assigned location: " + uploadLocation); diff --git a/src/jvm/backtype/storm/generated/AlreadyAliveException.java b/src/jvm/backtype/storm/generated/AlreadyAliveException.java index 04a43269d..1306f8b11 100644 --- a/src/jvm/backtype/storm/generated/AlreadyAliveException.java +++ b/src/jvm/backtype/storm/generated/AlreadyAliveException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,25 +16,20 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class AlreadyAliveException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyAliveException"); -public class AlreadyAliveException extends Exception implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("AlreadyAliveException"); + 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 TField MSG_FIELD_DESC = new TField("msg", TType.STRING, (short)1); - - private String msg; + private String msg; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { MSG((short)1, "msg"); private static final Map byName = new HashMap(); @@ -93,13 +88,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.MSG, new FieldMetaData("msg", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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); - FieldMetaData.addStructMetaDataMap(AlreadyAliveException.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlreadyAliveException.class, metaDataMap); } public AlreadyAliveException() { @@ -125,9 +120,9 @@ public AlreadyAliveException deepCopy() { return new AlreadyAliveException(this); } - @Deprecated - public AlreadyAliveException clone() { - return new AlreadyAliveException(this); + @Override + public void clear() { + this.msg = null; } public String get_msg() { @@ -142,7 +137,7 @@ public void unset_msg() { this.msg = null; } - /** Returns true if field msg is set (has been asigned a value) and false otherwise */ + /** Returns true if field msg is set (has been assigned a value) and false otherwise */ public boolean is_set_msg() { return this.msg != null; } @@ -166,10 +161,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case MSG: @@ -179,12 +170,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case MSG: return is_set_msg(); @@ -192,10 +183,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -245,7 +232,8 @@ public int compareTo(AlreadyAliveException other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_msg()) { lastComparison = TBaseHelper.compareTo(this.msg, typedOther.msg); + if (is_set_msg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.msg, typedOther.msg); if (lastComparison != 0) { return lastComparison; } @@ -253,25 +241,29 @@ public int compareTo(AlreadyAliveException other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // MSG - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.msg = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -279,7 +271,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -308,12 +300,28 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_msg()) { - throw new TProtocolException("Required field 'msg' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'msg' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/Bolt.java b/src/jvm/backtype/storm/generated/Bolt.java index fa41601f7..dc6b4ec46 100644 --- a/src/jvm/backtype/storm/generated/Bolt.java +++ b/src/jvm/backtype/storm/generated/Bolt.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,29 +16,24 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class Bolt implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Bolt"); -public class Bolt implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("Bolt"); + private static final org.apache.thrift.protocol.TField INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("inputs", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField BOLT_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("bolt_object", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField COMMON_FIELD_DESC = new org.apache.thrift.protocol.TField("common", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final TField INPUTS_FIELD_DESC = new TField("inputs", TType.MAP, (short)1); - private static final TField BOLT_OBJECT_FIELD_DESC = new TField("bolt_object", TType.STRUCT, (short)2); - private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)3); - - private Map inputs; - private ComponentObject bolt_object; - private ComponentCommon common; + private Map inputs; // required + private ComponentObject bolt_object; // required + private ComponentCommon common; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { INPUTS((short)1, "inputs"), BOLT_OBJECT((short)2, "bolt_object"), COMMON((short)3, "common"); @@ -103,19 +98,19 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.INPUTS, new FieldMetaData("inputs", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new StructMetaData(TType.STRUCT, GlobalStreamId.class), - new StructMetaData(TType.STRUCT, Grouping.class)))); - tmpMap.put(_Fields.BOLT_OBJECT, new FieldMetaData("bolt_object", TFieldRequirementType.REQUIRED, - new StructMetaData(TType.STRUCT, ComponentObject.class))); - tmpMap.put(_Fields.COMMON, new FieldMetaData("common", TFieldRequirementType.REQUIRED, - new StructMetaData(TType.STRUCT, ComponentCommon.class))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.INPUTS, new org.apache.thrift.meta_data.FieldMetaData("inputs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Grouping.class)))); + tmpMap.put(_Fields.BOLT_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("bolt_object", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentObject.class))); + tmpMap.put(_Fields.COMMON, new org.apache.thrift.meta_data.FieldMetaData("common", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(Bolt.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Bolt.class, metaDataMap); } public Bolt() { @@ -163,9 +158,11 @@ public Bolt deepCopy() { return new Bolt(this); } - @Deprecated - public Bolt clone() { - return new Bolt(this); + @Override + public void clear() { + this.inputs = null; + this.bolt_object = null; + this.common = null; } public int get_inputs_size() { @@ -191,7 +188,7 @@ public void unset_inputs() { this.inputs = null; } - /** Returns true if field inputs is set (has been asigned a value) and false otherwise */ + /** Returns true if field inputs is set (has been assigned a value) and false otherwise */ public boolean is_set_inputs() { return this.inputs != null; } @@ -214,7 +211,7 @@ public void unset_bolt_object() { this.bolt_object = null; } - /** Returns true if field bolt_object is set (has been asigned a value) and false otherwise */ + /** Returns true if field bolt_object is set (has been assigned a value) and false otherwise */ public boolean is_set_bolt_object() { return this.bolt_object != null; } @@ -237,7 +234,7 @@ public void unset_common() { this.common = null; } - /** Returns true if field common is set (has been asigned a value) and false otherwise */ + /** Returns true if field common is set (has been assigned a value) and false otherwise */ public boolean is_set_common() { return this.common != null; } @@ -277,10 +274,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case INPUTS: @@ -296,12 +289,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case INPUTS: return is_set_inputs(); @@ -313,10 +306,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -394,7 +383,8 @@ public int compareTo(Bolt other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_inputs()) { lastComparison = TBaseHelper.compareTo(this.inputs, typedOther.inputs); + if (is_set_inputs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inputs, typedOther.inputs); if (lastComparison != 0) { return lastComparison; } @@ -403,7 +393,8 @@ public int compareTo(Bolt other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_bolt_object()) { lastComparison = TBaseHelper.compareTo(this.bolt_object, typedOther.bolt_object); + if (is_set_bolt_object()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bolt_object, typedOther.bolt_object); if (lastComparison != 0) { return lastComparison; } @@ -412,7 +403,8 @@ public int compareTo(Bolt other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_common()) { lastComparison = TBaseHelper.compareTo(this.common, typedOther.common); + if (is_set_common()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.common, typedOther.common); if (lastComparison != 0) { return lastComparison; } @@ -420,25 +412,29 @@ public int compareTo(Bolt other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // INPUTS - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map13 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map13 = iprot.readMapBegin(); this.inputs = new HashMap(2*_map13.size); for (int _i14 = 0; _i14 < _map13.size; ++_i14) { - GlobalStreamId _key15; - Grouping _val16; + GlobalStreamId _key15; // required + Grouping _val16; // required _key15 = new GlobalStreamId(); _key15.read(iprot); _val16 = new Grouping(); @@ -448,27 +444,27 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // BOLT_OBJECT - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.bolt_object = new ComponentObject(); this.bolt_object.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COMMON - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.common = new ComponentCommon(); this.common.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -476,14 +472,14 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.inputs != null) { oprot.writeFieldBegin(INPUTS_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRUCT, TType.STRUCT, this.inputs.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, this.inputs.size())); for (Map.Entry _iter17 : this.inputs.entrySet()) { _iter17.getKey().write(oprot); @@ -539,21 +535,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_inputs()) { - throw new TProtocolException("Required field 'inputs' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'inputs' is unset! Struct:" + toString()); } if (!is_set_bolt_object()) { - throw new TProtocolException("Required field 'bolt_object' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'bolt_object' is unset! Struct:" + toString()); } if (!is_set_common()) { - throw new TProtocolException("Required field 'common' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'common' is unset! Struct:" + toString()); } } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/BoltStats.java b/src/jvm/backtype/storm/generated/BoltStats.java index 41462c40c..8bbdf5840 100644 --- a/src/jvm/backtype/storm/generated/BoltStats.java +++ b/src/jvm/backtype/storm/generated/BoltStats.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,29 +16,24 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class BoltStats implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BoltStats"); -public class BoltStats implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("BoltStats"); + private static final org.apache.thrift.protocol.TField ACKED_FIELD_DESC = new org.apache.thrift.protocol.TField("acked", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField FAILED_FIELD_DESC = new org.apache.thrift.protocol.TField("failed", org.apache.thrift.protocol.TType.MAP, (short)2); + private static final org.apache.thrift.protocol.TField PROCESS_MS_AVG_FIELD_DESC = new org.apache.thrift.protocol.TField("process_ms_avg", org.apache.thrift.protocol.TType.MAP, (short)3); - private static final TField ACKED_FIELD_DESC = new TField("acked", TType.MAP, (short)1); - private static final TField FAILED_FIELD_DESC = new TField("failed", TType.MAP, (short)2); - private static final TField PROCESS_MS_AVG_FIELD_DESC = new TField("process_ms_avg", TType.MAP, (short)3); - - private Map> acked; - private Map> failed; - private Map> process_ms_avg; + private Map> acked; // required + private Map> failed; // required + private Map> process_ms_avg; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ACKED((short)1, "acked"), FAILED((short)2, "failed"), PROCESS_MS_AVG((short)3, "process_ms_avg"); @@ -103,29 +98,29 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ACKED, new FieldMetaData("acked", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new MapMetaData(TType.MAP, - new StructMetaData(TType.STRUCT, GlobalStreamId.class), - new FieldValueMetaData(TType.I64))))); - tmpMap.put(_Fields.FAILED, new FieldMetaData("failed", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new MapMetaData(TType.MAP, - new StructMetaData(TType.STRUCT, GlobalStreamId.class), - new FieldValueMetaData(TType.I64))))); - tmpMap.put(_Fields.PROCESS_MS_AVG, new FieldMetaData("process_ms_avg", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new MapMetaData(TType.MAP, - new StructMetaData(TType.STRUCT, GlobalStreamId.class), - new FieldValueMetaData(TType.DOUBLE))))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ACKED, new org.apache.thrift.meta_data.FieldMetaData("acked", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))))); + tmpMap.put(_Fields.FAILED, new org.apache.thrift.meta_data.FieldMetaData("failed", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))))); + tmpMap.put(_Fields.PROCESS_MS_AVG, new org.apache.thrift.meta_data.FieldMetaData("process_ms_avg", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GlobalStreamId.class), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(BoltStats.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BoltStats.class, metaDataMap); } public BoltStats() { @@ -230,9 +225,11 @@ public BoltStats deepCopy() { return new BoltStats(this); } - @Deprecated - public BoltStats clone() { - return new BoltStats(this); + @Override + public void clear() { + this.acked = null; + this.failed = null; + this.process_ms_avg = null; } public int get_acked_size() { @@ -258,7 +255,7 @@ public void unset_acked() { this.acked = null; } - /** Returns true if field acked is set (has been asigned a value) and false otherwise */ + /** Returns true if field acked is set (has been assigned a value) and false otherwise */ public boolean is_set_acked() { return this.acked != null; } @@ -292,7 +289,7 @@ public void unset_failed() { this.failed = null; } - /** Returns true if field failed is set (has been asigned a value) and false otherwise */ + /** Returns true if field failed is set (has been assigned a value) and false otherwise */ public boolean is_set_failed() { return this.failed != null; } @@ -326,7 +323,7 @@ public void unset_process_ms_avg() { this.process_ms_avg = null; } - /** Returns true if field process_ms_avg is set (has been asigned a value) and false otherwise */ + /** Returns true if field process_ms_avg is set (has been assigned a value) and false otherwise */ public boolean is_set_process_ms_avg() { return this.process_ms_avg != null; } @@ -366,10 +363,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ACKED: @@ -385,12 +378,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ACKED: return is_set_acked(); @@ -402,10 +395,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -483,7 +472,8 @@ public int compareTo(BoltStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_acked()) { lastComparison = TBaseHelper.compareTo(this.acked, typedOther.acked); + if (is_set_acked()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acked, typedOther.acked); if (lastComparison != 0) { return lastComparison; } @@ -492,7 +482,8 @@ public int compareTo(BoltStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_failed()) { lastComparison = TBaseHelper.compareTo(this.failed, typedOther.failed); + if (is_set_failed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failed, typedOther.failed); if (lastComparison != 0) { return lastComparison; } @@ -501,7 +492,8 @@ public int compareTo(BoltStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_process_ms_avg()) { lastComparison = TBaseHelper.compareTo(this.process_ms_avg, typedOther.process_ms_avg); + if (is_set_process_ms_avg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.process_ms_avg, typedOther.process_ms_avg); if (lastComparison != 0) { return lastComparison; } @@ -509,33 +501,37 @@ public int compareTo(BoltStats other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ACKED - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map41 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map41 = iprot.readMapBegin(); this.acked = new HashMap>(2*_map41.size); for (int _i42 = 0; _i42 < _map41.size; ++_i42) { - String _key43; - Map _val44; + String _key43; // required + Map _val44; // required _key43 = iprot.readString(); { - TMap _map45 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map45 = iprot.readMapBegin(); _val44 = new HashMap(2*_map45.size); for (int _i46 = 0; _i46 < _map45.size; ++_i46) { - GlobalStreamId _key47; - long _val48; + GlobalStreamId _key47; // required + long _val48; // required _key47 = new GlobalStreamId(); _key47.read(iprot); _val48 = iprot.readI64(); @@ -548,26 +544,26 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // FAILED - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map49 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map49 = iprot.readMapBegin(); this.failed = new HashMap>(2*_map49.size); for (int _i50 = 0; _i50 < _map49.size; ++_i50) { - String _key51; - Map _val52; + String _key51; // required + Map _val52; // required _key51 = iprot.readString(); { - TMap _map53 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map53 = iprot.readMapBegin(); _val52 = new HashMap(2*_map53.size); for (int _i54 = 0; _i54 < _map53.size; ++_i54) { - GlobalStreamId _key55; - long _val56; + GlobalStreamId _key55; // required + long _val56; // required _key55 = new GlobalStreamId(); _key55.read(iprot); _val56 = iprot.readI64(); @@ -580,26 +576,26 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // PROCESS_MS_AVG - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map57 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map57 = iprot.readMapBegin(); this.process_ms_avg = new HashMap>(2*_map57.size); for (int _i58 = 0; _i58 < _map57.size; ++_i58) { - String _key59; - Map _val60; + String _key59; // required + Map _val60; // required _key59 = iprot.readString(); { - TMap _map61 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map61 = iprot.readMapBegin(); _val60 = new HashMap(2*_map61.size); for (int _i62 = 0; _i62 < _map61.size; ++_i62) { - GlobalStreamId _key63; - double _val64; + GlobalStreamId _key63; // required + double _val64; // required _key63 = new GlobalStreamId(); _key63.read(iprot); _val64 = iprot.readDouble(); @@ -612,11 +608,11 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -624,19 +620,19 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.acked != null) { oprot.writeFieldBegin(ACKED_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, this.acked.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.acked.size())); for (Map.Entry> _iter65 : this.acked.entrySet()) { oprot.writeString(_iter65.getKey()); { - oprot.writeMapBegin(new TMap(TType.STRUCT, TType.I64, _iter65.getValue().size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter65.getValue().size())); for (Map.Entry _iter66 : _iter65.getValue().entrySet()) { _iter66.getKey().write(oprot); @@ -652,12 +648,12 @@ public void write(TProtocol oprot) throws TException { if (this.failed != null) { oprot.writeFieldBegin(FAILED_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, this.failed.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.failed.size())); for (Map.Entry> _iter67 : this.failed.entrySet()) { oprot.writeString(_iter67.getKey()); { - oprot.writeMapBegin(new TMap(TType.STRUCT, TType.I64, _iter67.getValue().size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, _iter67.getValue().size())); for (Map.Entry _iter68 : _iter67.getValue().entrySet()) { _iter68.getKey().write(oprot); @@ -673,12 +669,12 @@ public void write(TProtocol oprot) throws TException { if (this.process_ms_avg != null) { oprot.writeFieldBegin(PROCESS_MS_AVG_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, this.process_ms_avg.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.process_ms_avg.size())); for (Map.Entry> _iter69 : this.process_ms_avg.entrySet()) { oprot.writeString(_iter69.getKey()); { - oprot.writeMapBegin(new TMap(TType.STRUCT, TType.DOUBLE, _iter69.getValue().size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.DOUBLE, _iter69.getValue().size())); for (Map.Entry _iter70 : _iter69.getValue().entrySet()) { _iter70.getKey().write(oprot); @@ -727,21 +723,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_acked()) { - throw new TProtocolException("Required field 'acked' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'acked' is unset! Struct:" + toString()); } if (!is_set_failed()) { - throw new TProtocolException("Required field 'failed' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'failed' is unset! Struct:" + toString()); } if (!is_set_process_ms_avg()) { - throw new TProtocolException("Required field 'process_ms_avg' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'process_ms_avg' is unset! Struct:" + toString()); } } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/ClusterSummary.java b/src/jvm/backtype/storm/generated/ClusterSummary.java index 666a9aad7..d07db34bd 100644 --- a/src/jvm/backtype/storm/generated/ClusterSummary.java +++ b/src/jvm/backtype/storm/generated/ClusterSummary.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,29 +16,24 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class ClusterSummary implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClusterSummary"); -public class ClusterSummary implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ClusterSummary"); + private static final org.apache.thrift.protocol.TField SUPERVISORS_FIELD_DESC = new org.apache.thrift.protocol.TField("supervisors", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField NIMBUS_UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("nimbus_uptime_secs", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new org.apache.thrift.protocol.TField("topologies", org.apache.thrift.protocol.TType.LIST, (short)3); - private static final TField SUPERVISORS_FIELD_DESC = new TField("supervisors", TType.LIST, (short)1); - private static final TField NIMBUS_UPTIME_SECS_FIELD_DESC = new TField("nimbus_uptime_secs", TType.I32, (short)2); - private static final TField TOPOLOGIES_FIELD_DESC = new TField("topologies", TType.LIST, (short)3); - - private List supervisors; - private int nimbus_uptime_secs; - private List topologies; + private List supervisors; // required + private int nimbus_uptime_secs; // required + private List topologies; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUPERVISORS((short)1, "supervisors"), NIMBUS_UPTIME_SECS((short)2, "nimbus_uptime_secs"), TOPOLOGIES((short)3, "topologies"); @@ -105,19 +100,19 @@ public String getFieldName() { private static final int __NIMBUS_UPTIME_SECS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUPERVISORS, new FieldMetaData("supervisors", TFieldRequirementType.REQUIRED, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, SupervisorSummary.class)))); - tmpMap.put(_Fields.NIMBUS_UPTIME_SECS, new FieldMetaData("nimbus_uptime_secs", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.TOPOLOGIES, new FieldMetaData("topologies", TFieldRequirementType.REQUIRED, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, TopologySummary.class)))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUPERVISORS, new org.apache.thrift.meta_data.FieldMetaData("supervisors", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SupervisorSummary.class)))); + tmpMap.put(_Fields.NIMBUS_UPTIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("nimbus_uptime_secs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TOPOLOGIES, new org.apache.thrift.meta_data.FieldMetaData("topologies", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TopologySummary.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(ClusterSummary.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClusterSummary.class, metaDataMap); } public ClusterSummary() { @@ -162,9 +157,12 @@ public ClusterSummary deepCopy() { return new ClusterSummary(this); } - @Deprecated - public ClusterSummary clone() { - return new ClusterSummary(this); + @Override + public void clear() { + this.supervisors = null; + set_nimbus_uptime_secs_isSet(false); + this.nimbus_uptime_secs = 0; + this.topologies = null; } public int get_supervisors_size() { @@ -194,7 +192,7 @@ public void unset_supervisors() { this.supervisors = null; } - /** Returns true if field supervisors is set (has been asigned a value) and false otherwise */ + /** Returns true if field supervisors is set (has been assigned a value) and false otherwise */ public boolean is_set_supervisors() { return this.supervisors != null; } @@ -218,7 +216,7 @@ public void unset_nimbus_uptime_secs() { __isset_bit_vector.clear(__NIMBUS_UPTIME_SECS_ISSET_ID); } - /** Returns true if field nimbus_uptime_secs is set (has been asigned a value) and false otherwise */ + /** Returns true if field nimbus_uptime_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_nimbus_uptime_secs() { return __isset_bit_vector.get(__NIMBUS_UPTIME_SECS_ISSET_ID); } @@ -254,7 +252,7 @@ public void unset_topologies() { this.topologies = null; } - /** Returns true if field topologies is set (has been asigned a value) and false otherwise */ + /** Returns true if field topologies is set (has been assigned a value) and false otherwise */ public boolean is_set_topologies() { return this.topologies != null; } @@ -294,17 +292,13 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUPERVISORS: return get_supervisors(); case NIMBUS_UPTIME_SECS: - return new Integer(get_nimbus_uptime_secs()); + return Integer.valueOf(get_nimbus_uptime_secs()); case TOPOLOGIES: return get_topologies(); @@ -313,12 +307,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUPERVISORS: return is_set_supervisors(); @@ -330,10 +324,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -411,7 +401,8 @@ public int compareTo(ClusterSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_supervisors()) { lastComparison = TBaseHelper.compareTo(this.supervisors, typedOther.supervisors); + if (is_set_supervisors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supervisors, typedOther.supervisors); if (lastComparison != 0) { return lastComparison; } @@ -420,7 +411,8 @@ public int compareTo(ClusterSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_nimbus_uptime_secs()) { lastComparison = TBaseHelper.compareTo(this.nimbus_uptime_secs, typedOther.nimbus_uptime_secs); + if (is_set_nimbus_uptime_secs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nimbus_uptime_secs, typedOther.nimbus_uptime_secs); if (lastComparison != 0) { return lastComparison; } @@ -429,7 +421,8 @@ public int compareTo(ClusterSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_topologies()) { lastComparison = TBaseHelper.compareTo(this.topologies, typedOther.topologies); + if (is_set_topologies()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.topologies, typedOther.topologies); if (lastComparison != 0) { return lastComparison; } @@ -437,24 +430,28 @@ public int compareTo(ClusterSummary other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // SUPERVISORS - if (field.type == TType.LIST) { + if (field.type == org.apache.thrift.protocol.TType.LIST) { { - TList _list33 = iprot.readListBegin(); + org.apache.thrift.protocol.TList _list33 = iprot.readListBegin(); this.supervisors = new ArrayList(_list33.size); for (int _i34 = 0; _i34 < _list33.size; ++_i34) { - SupervisorSummary _elem35; + SupervisorSummary _elem35; // required _elem35 = new SupervisorSummary(); _elem35.read(iprot); this.supervisors.add(_elem35); @@ -462,25 +459,25 @@ public void read(TProtocol iprot) throws TException { iprot.readListEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // NIMBUS_UPTIME_SECS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.nimbus_uptime_secs = iprot.readI32(); set_nimbus_uptime_secs_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // TOPOLOGIES - if (field.type == TType.LIST) { + if (field.type == org.apache.thrift.protocol.TType.LIST) { { - TList _list36 = iprot.readListBegin(); + org.apache.thrift.protocol.TList _list36 = iprot.readListBegin(); this.topologies = new ArrayList(_list36.size); for (int _i37 = 0; _i37 < _list36.size; ++_i37) { - TopologySummary _elem38; + TopologySummary _elem38; // required _elem38 = new TopologySummary(); _elem38.read(iprot); this.topologies.add(_elem38); @@ -488,11 +485,11 @@ public void read(TProtocol iprot) throws TException { iprot.readListEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -500,14 +497,14 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.supervisors != null) { oprot.writeFieldBegin(SUPERVISORS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRUCT, this.supervisors.size())); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.supervisors.size())); for (SupervisorSummary _iter39 : this.supervisors) { _iter39.write(oprot); @@ -522,7 +519,7 @@ public void write(TProtocol oprot) throws TException { if (this.topologies != null) { oprot.writeFieldBegin(TOPOLOGIES_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRUCT, this.topologies.size())); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.topologies.size())); for (TopologySummary _iter40 : this.topologies) { _iter40.write(oprot); @@ -563,20 +560,38 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_supervisors()) { - throw new TProtocolException("Required field 'supervisors' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'supervisors' is unset! Struct:" + toString()); } if (!is_set_nimbus_uptime_secs()) { - throw new TProtocolException("Required field 'nimbus_uptime_secs' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nimbus_uptime_secs' is unset! Struct:" + toString()); } if (!is_set_topologies()) { - throw new TProtocolException("Required field 'topologies' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'topologies' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/ComponentCommon.java b/src/jvm/backtype/storm/generated/ComponentCommon.java index 206c7c18c..07c79f021 100644 --- a/src/jvm/backtype/storm/generated/ComponentCommon.java +++ b/src/jvm/backtype/storm/generated/ComponentCommon.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,27 +16,22 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class ComponentCommon implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComponentCommon"); -public class ComponentCommon implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ComponentCommon"); + private static final org.apache.thrift.protocol.TField STREAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("streams", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField PARALLELISM_HINT_FIELD_DESC = new org.apache.thrift.protocol.TField("parallelism_hint", org.apache.thrift.protocol.TType.I32, (short)2); - private static final TField STREAMS_FIELD_DESC = new TField("streams", TType.MAP, (short)1); - private static final TField PARALLELISM_HINT_FIELD_DESC = new TField("parallelism_hint", TType.I32, (short)2); - - private Map streams; - private int parallelism_hint; + private Map streams; // required + private int parallelism_hint; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { STREAMS((short)1, "streams"), PARALLELISM_HINT((short)2, "parallelism_hint"); @@ -100,17 +95,17 @@ public String getFieldName() { private static final int __PARALLELISM_HINT_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.STREAMS, new FieldMetaData("streams", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new StructMetaData(TType.STRUCT, StreamInfo.class)))); - tmpMap.put(_Fields.PARALLELISM_HINT, new FieldMetaData("parallelism_hint", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.I32))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STREAMS, new org.apache.thrift.meta_data.FieldMetaData("streams", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StreamInfo.class)))); + tmpMap.put(_Fields.PARALLELISM_HINT, new org.apache.thrift.meta_data.FieldMetaData("parallelism_hint", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(ComponentCommon.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComponentCommon.class, metaDataMap); } public ComponentCommon() { @@ -151,9 +146,11 @@ public ComponentCommon deepCopy() { return new ComponentCommon(this); } - @Deprecated - public ComponentCommon clone() { - return new ComponentCommon(this); + @Override + public void clear() { + this.streams = null; + set_parallelism_hint_isSet(false); + this.parallelism_hint = 0; } public int get_streams_size() { @@ -179,7 +176,7 @@ public void unset_streams() { this.streams = null; } - /** Returns true if field streams is set (has been asigned a value) and false otherwise */ + /** Returns true if field streams is set (has been assigned a value) and false otherwise */ public boolean is_set_streams() { return this.streams != null; } @@ -203,7 +200,7 @@ public void unset_parallelism_hint() { __isset_bit_vector.clear(__PARALLELISM_HINT_ISSET_ID); } - /** Returns true if field parallelism_hint is set (has been asigned a value) and false otherwise */ + /** Returns true if field parallelism_hint is set (has been assigned a value) and false otherwise */ public boolean is_set_parallelism_hint() { return __isset_bit_vector.get(__PARALLELISM_HINT_ISSET_ID); } @@ -233,28 +230,24 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case STREAMS: return get_streams(); case PARALLELISM_HINT: - return new Integer(get_parallelism_hint()); + return Integer.valueOf(get_parallelism_hint()); } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case STREAMS: return is_set_streams(); @@ -264,10 +257,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -331,7 +320,8 @@ public int compareTo(ComponentCommon other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_streams()) { lastComparison = TBaseHelper.compareTo(this.streams, typedOther.streams); + if (is_set_streams()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streams, typedOther.streams); if (lastComparison != 0) { return lastComparison; } @@ -340,7 +330,8 @@ public int compareTo(ComponentCommon other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_parallelism_hint()) { lastComparison = TBaseHelper.compareTo(this.parallelism_hint, typedOther.parallelism_hint); + if (is_set_parallelism_hint()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parallelism_hint, typedOther.parallelism_hint); if (lastComparison != 0) { return lastComparison; } @@ -348,25 +339,29 @@ public int compareTo(ComponentCommon other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // STREAMS - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map8 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin(); this.streams = new HashMap(2*_map8.size); for (int _i9 = 0; _i9 < _map8.size; ++_i9) { - int _key10; - StreamInfo _val11; + int _key10; // required + StreamInfo _val11; // required _key10 = iprot.readI32(); _val11 = new StreamInfo(); _val11.read(iprot); @@ -375,19 +370,19 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // PARALLELISM_HINT - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.parallelism_hint = iprot.readI32(); set_parallelism_hint_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -395,14 +390,14 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.streams != null) { oprot.writeFieldBegin(STREAMS_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.I32, TType.STRUCT, this.streams.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, this.streams.size())); for (Map.Entry _iter12 : this.streams.entrySet()) { oprot.writeI32(_iter12.getKey()); @@ -443,12 +438,30 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_streams()) { - throw new TProtocolException("Required field 'streams' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'streams' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/ComponentObject.java b/src/jvm/backtype/storm/generated/ComponentObject.java index 0852f2020..c6f02a363 100644 --- a/src/jvm/backtype/storm/generated/ComponentObject.java +++ b/src/jvm/backtype/storm/generated/ComponentObject.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,23 +16,18 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; - -public class ComponentObject extends TUnion { - private static final TStruct STRUCT_DESC = new TStruct("ComponentObject"); - private static final TField SERIALIZED_JAVA_FIELD_DESC = new TField("serialized_java", TType.STRING, (short)1); - private static final TField SHELL_FIELD_DESC = new TField("shell", TType.STRUCT, (short)2); +public class ComponentObject extends org.apache.thrift.TUnion { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ComponentObject"); + private static final org.apache.thrift.protocol.TField SERIALIZED_JAVA_FIELD_DESC = new org.apache.thrift.protocol.TField("serialized_java", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField SHELL_FIELD_DESC = new org.apache.thrift.protocol.TField("shell", org.apache.thrift.protocol.TType.STRUCT, (short)2); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SERIALIZED_JAVA((short)1, "serialized_java"), SHELL((short)2, "shell"); @@ -92,15 +87,15 @@ public String getFieldName() { } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SERIALIZED_JAVA, new FieldMetaData("serialized_java", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.SHELL, new FieldMetaData("shell", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, ShellComponent.class))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SERIALIZED_JAVA, new org.apache.thrift.meta_data.FieldMetaData("serialized_java", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); + tmpMap.put(_Fields.SHELL, new org.apache.thrift.meta_data.FieldMetaData("shell", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ShellComponent.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(ComponentObject.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ComponentObject.class, metaDataMap); } public ComponentObject() { @@ -118,12 +113,18 @@ public ComponentObject deepCopy() { return new ComponentObject(this); } - public static ComponentObject serialized_java(byte[] value) { + public static ComponentObject serialized_java(ByteBuffer value) { ComponentObject x = new ComponentObject(); x.set_serialized_java(value); return x; } + public static ComponentObject serialized_java(byte[] value) { + ComponentObject x = new ComponentObject(); + x.set_serialized_java(ByteBuffer.wrap(value)); + return x; + } + public static ComponentObject shell(ShellComponent value) { ComponentObject x = new ComponentObject(); x.set_shell(value); @@ -135,10 +136,10 @@ public static ComponentObject shell(ShellComponent value) { protected void checkType(_Fields setField, Object value) throws ClassCastException { switch (setField) { case SERIALIZED_JAVA: - if (value instanceof byte[]) { + if (value instanceof ByteBuffer) { break; } - throw new ClassCastException("Was expecting value of type byte[] for field 'serialized_java', but got " + value.getClass().getSimpleName()); + throw new ClassCastException("Was expecting value of type ByteBuffer for field 'serialized_java', but got " + value.getClass().getSimpleName()); case SHELL: if (value instanceof ShellComponent) { break; @@ -150,17 +151,17 @@ protected void checkType(_Fields setField, Object value) throws ClassCastExcepti } @Override - protected Object readValue(TProtocol iprot, TField field) throws TException { + protected Object readValue(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) { case SERIALIZED_JAVA: if (field.type == SERIALIZED_JAVA_FIELD_DESC.type) { - byte[] serialized_java; + ByteBuffer serialized_java; serialized_java = iprot.readBinary(); return serialized_java; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case SHELL: @@ -170,23 +171,23 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { shell.read(iprot); return shell; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } default: throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @Override - protected void writeValue(TProtocol oprot) throws TException { + protected void writeValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case SERIALIZED_JAVA: - byte[] serialized_java = (byte[])value_; + ByteBuffer serialized_java = (ByteBuffer)value_; oprot.writeBinary(serialized_java); return; case SHELL: @@ -199,7 +200,7 @@ protected void writeValue(TProtocol oprot) throws TException { } @Override - protected TField getFieldDesc(_Fields setField) { + protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { switch (setField) { case SERIALIZED_JAVA: return SERIALIZED_JAVA_FIELD_DESC; @@ -211,7 +212,7 @@ protected TField getFieldDesc(_Fields setField) { } @Override - protected TStruct getStructDesc() { + protected org.apache.thrift.protocol.TStruct getStructDesc() { return STRUCT_DESC; } @@ -220,15 +221,30 @@ protected _Fields enumForId(short id) { return _Fields.findByThriftIdOrThrow(id); } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public byte[] get_serialized_java() { + set_serialized_java(org.apache.thrift.TBaseHelper.rightSize(buffer_for_serialized_java())); + ByteBuffer b = buffer_for_serialized_java(); + return b == null ? null : b.array(); + } + + public ByteBuffer buffer_for_serialized_java() { if (getSetField() == _Fields.SERIALIZED_JAVA) { - return (byte[])getFieldValue(); + return (ByteBuffer)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'serialized_java' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void set_serialized_java(byte[] value) { + set_serialized_java(ByteBuffer.wrap(value)); + } + + public void set_serialized_java(ByteBuffer value) { if (value == null) throw new NullPointerException(); setField_ = _Fields.SERIALIZED_JAVA; value_ = value; @@ -248,6 +264,16 @@ public void set_shell(ShellComponent value) { value_ = value; } + public boolean is_set_serialized_java() { + return setField_ == _Fields.SERIALIZED_JAVA; + } + + + public boolean is_set_shell() { + return setField_ == _Fields.SHELL; + } + + public boolean equals(Object other) { if (other instanceof ComponentObject) { return equals((ComponentObject)other); @@ -257,26 +283,14 @@ public boolean equals(Object other) { } public boolean equals(ComponentObject other) { - return other != null && getSetField() == other.getSetField() && ((value_ instanceof byte[]) ? - Arrays.equals((byte[])getFieldValue(), (byte[])other.getFieldValue()) : getFieldValue().equals(other.getFieldValue())); + return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); } @Override public int compareTo(ComponentObject other) { - int lastComparison = TBaseHelper.compareTo(getSetField(), other.getSetField()); + int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); if (lastComparison == 0) { - Object myValue = getFieldValue(); - if (myValue instanceof byte[]) { - return TBaseHelper.compareTo((byte[])myValue, (byte[])other.getFieldValue()); - } else if (myValue instanceof List) { - return TBaseHelper.compareTo((List)myValue, (List)other.getFieldValue()); - } else if (myValue instanceof Set) { - return TBaseHelper.compareTo((Set)myValue, (Set)other.getFieldValue()); - } else if (myValue instanceof Map){ - return TBaseHelper.compareTo((Map)myValue, (Map)other.getFieldValue()); - } else { - return TBaseHelper.compareTo((Comparable)myValue, (Comparable)other.getFieldValue()); - } + return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); } return lastComparison; } @@ -286,16 +300,34 @@ public int compareTo(ComponentObject other) { public int hashCode() { HashCodeBuilder hcb = new HashCodeBuilder(); hcb.append(this.getClass().getName()); - TFieldIdEnum setField = getSetField(); + org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { hcb.append(setField.getThriftFieldId()); Object value = getFieldValue(); - if (value instanceof TEnum) { - hcb.append(((TEnum)getFieldValue()).getValue()); + if (value instanceof org.apache.thrift.TEnum) { + hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { hcb.append(value); } } return hcb.toHashCode(); } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } diff --git a/src/jvm/backtype/storm/generated/DistributedRPC.java b/src/jvm/backtype/storm/generated/DistributedRPC.java index 60a3eeaff..4e56c7a19 100644 --- a/src/jvm/backtype/storm/generated/DistributedRPC.java +++ b/src/jvm/backtype/storm/generated/DistributedRPC.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,177 +16,130 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; - public class DistributedRPC { public interface Iface { - public String execute(String functionName, String funcArgs) throws TException; + public String execute(String functionName, String funcArgs) throws org.apache.thrift.TException; - public void result(String id, String result) throws TException; + public void result(String id, String result) throws org.apache.thrift.TException; } public interface AsyncIface { - public void execute(String functionName, String funcArgs, AsyncMethodCallback resultHandler) throws TException; + public void execute(String functionName, String funcArgs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void result(String id, String result, AsyncMethodCallback resultHandler) throws TException; + public void result(String id, String result, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } - public static class Client implements TServiceClient, Iface { - public static class Factory implements TServiceClientFactory { + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} - public Client getClient(TProtocol prot) { + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } - public Client getClient(TProtocol iprot, TProtocol oprot) { + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } - public Client(TProtocol prot) - { - this(prot, prot); - } - - public Client(TProtocol iprot, TProtocol oprot) - { - iprot_ = iprot; - oprot_ = oprot; - } - - protected TProtocol iprot_; - protected TProtocol oprot_; - - protected int seqid_; - - public TProtocol getInputProtocol() + public Client(org.apache.thrift.protocol.TProtocol prot) { - return this.iprot_; + super(prot, prot); } - public TProtocol getOutputProtocol() - { - return this.oprot_; + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); } - public String execute(String functionName, String funcArgs) throws TException + public String execute(String functionName, String funcArgs) throws org.apache.thrift.TException { send_execute(functionName, funcArgs); return recv_execute(); } - public void send_execute(String functionName, String funcArgs) throws TException + public void send_execute(String functionName, String funcArgs) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("execute", TMessageType.CALL, ++seqid_)); execute_args args = new execute_args(); args.set_functionName(functionName); args.set_funcArgs(funcArgs); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("execute", args); } - public String recv_execute() throws TException + public String recv_execute() throws org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "execute failed: out of sequence response"); - } execute_result result = new execute_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "execute"); if (result.is_set_success()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "execute failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "execute failed: unknown result"); } - public void result(String id, String result) throws TException + public void result(String id, String result) throws org.apache.thrift.TException { send_result(id, result); recv_result(); } - public void send_result(String id, String result) throws TException + public void send_result(String id, String result) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("result", TMessageType.CALL, ++seqid_)); result_args args = new result_args(); args.set_id(id); args.set_result(result); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("result", args); } - public void recv_result() throws TException + public void recv_result() throws org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "result failed: out of sequence response"); - } result_result result = new result_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "result"); return; } } - public static class AsyncClient extends TAsyncClient implements AsyncIface { - public static class Factory implements TAsyncClientFactory { - private TAsyncClientManager clientManager; - private TProtocolFactory protocolFactory; - public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } - public AsyncClient getAsyncClient(TNonblockingTransport transport) { + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } - public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } - public void execute(String functionName, String funcArgs, AsyncMethodCallback resultHandler) throws TException { + public void execute(String functionName, String funcArgs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - execute_call method_call = new execute_call(functionName, funcArgs, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + execute_call method_call = new execute_call(functionName, funcArgs, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class execute_call extends TAsyncMethodCall { + public static class execute_call extends org.apache.thrift.async.TAsyncMethodCall { private String functionName; private String funcArgs; - public execute_call(String functionName, String funcArgs, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public execute_call(String functionName, String funcArgs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.functionName = functionName; this.funcArgs = funcArgs; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("execute", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("execute", org.apache.thrift.protocol.TMessageType.CALL, 0)); execute_args args = new execute_args(); args.set_functionName(functionName); args.set_funcArgs(funcArgs); @@ -194,33 +147,34 @@ public void write_args(TProtocol prot) throws TException { prot.writeMessageEnd(); } - public String getResult() throws TException { - if (getState() != State.RESPONSE_READ) { + public String getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_execute(); } } - public void result(String id, String result, AsyncMethodCallback resultHandler) throws TException { + public void result(String id, String result, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - result_call method_call = new result_call(id, result, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + result_call method_call = new result_call(id, result, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class result_call extends TAsyncMethodCall { + public static class result_call extends org.apache.thrift.async.TAsyncMethodCall { private String id; private String result; - public result_call(String id, String result, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public result_call(String id, String result, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.id = id; this.result = result; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("result", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("result", org.apache.thrift.protocol.TMessageType.CALL, 0)); result_args args = new result_args(); args.set_id(id); args.set_result(result); @@ -228,117 +182,79 @@ public void write_args(TProtocol prot) throws TException { prot.writeMessageEnd(); } - public void getResult() throws TException { - if (getState() != State.RESPONSE_READ) { + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_result(); } } } - public static class Processor implements TProcessor { + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(Iface iface) - { - iface_ = iface; - processMap_.put("execute", new execute()); - processMap_.put("result", new result()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); } - protected static interface ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException; + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); } - private Iface iface_; - protected final HashMap processMap_ = new HashMap(); - - public boolean process(TProtocol iprot, TProtocol oprot) throws TException - { - TMessage msg = iprot.readMessageBegin(); - ProcessFunction fn = processMap_.get(msg.name); - if (fn == null) { - TProtocolUtil.skip(iprot, TType.STRUCT); - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); - oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return true; - } - fn.process(msg.seqid, iprot, oprot); - return true; + private static Map> getProcessMap(Map> processMap) { + processMap.put("execute", new execute()); + processMap.put("result", new result()); + return processMap; } - private class execute implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - execute_args args = new execute_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("execute", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - execute_result result = new execute_result(); - result.success = iface_.execute(args.functionName, args.funcArgs); - oprot.writeMessageBegin(new TMessage("execute", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + private static class execute extends org.apache.thrift.ProcessFunction { + public execute() { + super("execute"); + } + + protected execute_args getEmptyArgsInstance() { + return new execute_args(); } + protected execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException { + execute_result result = new execute_result(); + result.success = iface.execute(args.functionName, args.funcArgs); + return result; + } } - private class result implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - result_args args = new result_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("result", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - result_result result = new result_result(); - iface_.result(args.id, args.result); - oprot.writeMessageBegin(new TMessage("result", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + private static class result extends org.apache.thrift.ProcessFunction { + public result() { + super("result"); + } + + protected result_args getEmptyArgsInstance() { + return new result_args(); } + protected result_result getResult(I iface, result_args args) throws org.apache.thrift.TException { + result_result result = new result_result(); + iface.result(args.id, args.result); + return result; + } } } - public static class execute_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("execute_args"); + public static class execute_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("execute_args"); - private static final TField FUNCTION_NAME_FIELD_DESC = new TField("functionName", TType.STRING, (short)1); - private static final TField FUNC_ARGS_FIELD_DESC = new TField("funcArgs", TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField FUNC_ARGS_FIELD_DESC = new org.apache.thrift.protocol.TField("funcArgs", org.apache.thrift.protocol.TType.STRING, (short)2); - private String functionName; - private String funcArgs; + private String functionName; // required + private String funcArgs; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { FUNCTION_NAME((short)1, "functionName"), FUNC_ARGS((short)2, "funcArgs"); @@ -400,15 +316,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FUNCTION_NAME, new FieldMetaData("functionName", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.FUNC_ARGS, new FieldMetaData("funcArgs", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FUNC_ARGS, new org.apache.thrift.meta_data.FieldMetaData("funcArgs", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(execute_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(execute_args.class, metaDataMap); } public execute_args() { @@ -439,9 +355,10 @@ public execute_args deepCopy() { return new execute_args(this); } - @Deprecated - public execute_args clone() { - return new execute_args(this); + @Override + public void clear() { + this.functionName = null; + this.funcArgs = null; } public String get_functionName() { @@ -456,7 +373,7 @@ public void unset_functionName() { this.functionName = null; } - /** Returns true if field functionName is set (has been asigned a value) and false otherwise */ + /** Returns true if field functionName is set (has been assigned a value) and false otherwise */ public boolean is_set_functionName() { return this.functionName != null; } @@ -479,7 +396,7 @@ public void unset_funcArgs() { this.funcArgs = null; } - /** Returns true if field funcArgs is set (has been asigned a value) and false otherwise */ + /** Returns true if field funcArgs is set (has been assigned a value) and false otherwise */ public boolean is_set_funcArgs() { return this.funcArgs != null; } @@ -511,10 +428,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case FUNCTION_NAME: @@ -527,12 +440,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case FUNCTION_NAME: return is_set_functionName(); @@ -542,10 +455,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -609,7 +518,8 @@ public int compareTo(execute_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_functionName()) { lastComparison = TBaseHelper.compareTo(this.functionName, typedOther.functionName); + if (is_set_functionName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, typedOther.functionName); if (lastComparison != 0) { return lastComparison; } @@ -618,7 +528,8 @@ public int compareTo(execute_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_funcArgs()) { lastComparison = TBaseHelper.compareTo(this.funcArgs, typedOther.funcArgs); + if (is_set_funcArgs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.funcArgs, typedOther.funcArgs); if (lastComparison != 0) { return lastComparison; } @@ -626,32 +537,36 @@ public int compareTo(execute_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // FUNCTION_NAME - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.functionName = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // FUNC_ARGS - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.funcArgs = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -659,7 +574,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -701,21 +616,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class execute_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("execute_result"); + public static class execute_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("execute_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); - private String success; + private String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -774,13 +705,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(execute_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(execute_result.class, metaDataMap); } public execute_result() { @@ -806,9 +737,9 @@ public execute_result deepCopy() { return new execute_result(this); } - @Deprecated - public execute_result clone() { - return new execute_result(this); + @Override + public void clear() { + this.success = null; } public String get_success() { @@ -823,7 +754,7 @@ public void unset_success() { this.success = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ + /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } @@ -847,10 +778,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -860,12 +787,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUCCESS: return is_set_success(); @@ -873,10 +800,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -926,7 +849,8 @@ public int compareTo(execute_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_success()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (is_set_success()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -934,25 +858,29 @@ public int compareTo(execute_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -960,7 +888,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { @@ -988,23 +916,39 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class result_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("result_args"); + public static class result_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("result_args"); - private static final TField ID_FIELD_DESC = new TField("id", TType.STRING, (short)1); - private static final TField RESULT_FIELD_DESC = new TField("result", TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.STRING, (short)2); - private String id; - private String result; + private String id; // required + private String result; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"), RESULT((short)2, "result"); @@ -1066,15 +1010,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.RESULT, new FieldMetaData("result", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(result_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(result_args.class, metaDataMap); } public result_args() { @@ -1105,9 +1049,10 @@ public result_args deepCopy() { return new result_args(this); } - @Deprecated - public result_args clone() { - return new result_args(this); + @Override + public void clear() { + this.id = null; + this.result = null; } public String get_id() { @@ -1122,7 +1067,7 @@ public void unset_id() { this.id = null; } - /** Returns true if field id is set (has been asigned a value) and false otherwise */ + /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean is_set_id() { return this.id != null; } @@ -1145,7 +1090,7 @@ public void unset_result() { this.result = null; } - /** Returns true if field result is set (has been asigned a value) and false otherwise */ + /** Returns true if field result is set (has been assigned a value) and false otherwise */ public boolean is_set_result() { return this.result != null; } @@ -1177,10 +1122,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -1193,12 +1134,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ID: return is_set_id(); @@ -1208,10 +1149,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -1275,7 +1212,8 @@ public int compareTo(result_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_id()) { lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (is_set_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } @@ -1284,7 +1222,8 @@ public int compareTo(result_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_result()) { lastComparison = TBaseHelper.compareTo(this.result, typedOther.result); + if (is_set_result()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, typedOther.result); if (lastComparison != 0) { return lastComparison; } @@ -1292,32 +1231,36 @@ public int compareTo(result_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ID - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.id = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // RESULT - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.result = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -1325,7 +1268,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -1367,19 +1310,35 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class result_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("result_result"); + public static class result_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("result_result"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); @@ -1433,11 +1392,11 @@ public String getFieldName() { return _fieldName; } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(result_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(result_result.class, metaDataMap); } public result_result() { @@ -1453,9 +1412,8 @@ public result_result deepCopy() { return new result_result(this); } - @Deprecated - public result_result clone() { - return new result_result(this); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { @@ -1463,31 +1421,23 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { } throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -1522,18 +1472,22 @@ public int compareTo(result_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -1541,7 +1495,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); @@ -1557,10 +1511,26 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } } diff --git a/src/jvm/backtype/storm/generated/ErrorInfo.java b/src/jvm/backtype/storm/generated/ErrorInfo.java index e54440c20..713c23b5e 100644 --- a/src/jvm/backtype/storm/generated/ErrorInfo.java +++ b/src/jvm/backtype/storm/generated/ErrorInfo.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,27 +16,22 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class ErrorInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ErrorInfo"); -public class ErrorInfo implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ErrorInfo"); + private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ERROR_TIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("error_time_secs", org.apache.thrift.protocol.TType.I32, (short)2); - private static final TField ERROR_FIELD_DESC = new TField("error", TType.STRING, (short)1); - private static final TField ERROR_TIME_SECS_FIELD_DESC = new TField("error_time_secs", TType.I32, (short)2); - - private String error; - private int error_time_secs; + private String error; // required + private int error_time_secs; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ERROR((short)1, "error"), ERROR_TIME_SECS((short)2, "error_time_secs"); @@ -100,15 +95,15 @@ public String getFieldName() { private static final int __ERROR_TIME_SECS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ERROR, new FieldMetaData("error", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.ERROR_TIME_SECS, new FieldMetaData("error_time_secs", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(ErrorInfo.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ErrorInfo.class, metaDataMap); } public ErrorInfo() { @@ -140,9 +135,11 @@ public ErrorInfo deepCopy() { return new ErrorInfo(this); } - @Deprecated - public ErrorInfo clone() { - return new ErrorInfo(this); + @Override + public void clear() { + this.error = null; + set_error_time_secs_isSet(false); + this.error_time_secs = 0; } public String get_error() { @@ -157,7 +154,7 @@ public void unset_error() { this.error = null; } - /** Returns true if field error is set (has been asigned a value) and false otherwise */ + /** Returns true if field error is set (has been assigned a value) and false otherwise */ public boolean is_set_error() { return this.error != null; } @@ -181,7 +178,7 @@ public void unset_error_time_secs() { __isset_bit_vector.clear(__ERROR_TIME_SECS_ISSET_ID); } - /** Returns true if field error_time_secs is set (has been asigned a value) and false otherwise */ + /** 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 __isset_bit_vector.get(__ERROR_TIME_SECS_ISSET_ID); } @@ -211,28 +208,24 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ERROR: return get_error(); case ERROR_TIME_SECS: - return new Integer(get_error_time_secs()); + return Integer.valueOf(get_error_time_secs()); } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ERROR: return is_set_error(); @@ -242,10 +235,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -309,7 +298,8 @@ public int compareTo(ErrorInfo other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_error()) { lastComparison = TBaseHelper.compareTo(this.error, typedOther.error); + if (is_set_error()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, typedOther.error); if (lastComparison != 0) { return lastComparison; } @@ -318,7 +308,8 @@ public int compareTo(ErrorInfo other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_error_time_secs()) { lastComparison = TBaseHelper.compareTo(this.error_time_secs, typedOther.error_time_secs); + if (is_set_error_time_secs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error_time_secs, typedOther.error_time_secs); if (lastComparison != 0) { return lastComparison; } @@ -326,33 +317,37 @@ public int compareTo(ErrorInfo other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ERROR - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.error = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // ERROR_TIME_SECS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.error_time_secs = iprot.readI32(); set_error_time_secs_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -360,7 +355,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -396,16 +391,34 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_error()) { - throw new TProtocolException("Required field 'error' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'error' is unset! Struct:" + toString()); } if (!is_set_error_time_secs()) { - throw new TProtocolException("Required field 'error_time_secs' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'error_time_secs' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/GlobalStreamId.java b/src/jvm/backtype/storm/generated/GlobalStreamId.java index 4643e1c48..5065282f4 100644 --- a/src/jvm/backtype/storm/generated/GlobalStreamId.java +++ b/src/jvm/backtype/storm/generated/GlobalStreamId.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,27 +16,22 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class GlobalStreamId implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GlobalStreamId"); -public class GlobalStreamId implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("GlobalStreamId"); + private static final org.apache.thrift.protocol.TField COMPONENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("componentId", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField STREAM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("streamId", org.apache.thrift.protocol.TType.I32, (short)2); - private static final TField COMPONENT_ID_FIELD_DESC = new TField("componentId", TType.I32, (short)1); - private static final TField STREAM_ID_FIELD_DESC = new TField("streamId", TType.I32, (short)2); - - private int componentId; - private int streamId; + private int componentId; // required + private int streamId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { COMPONENT_ID((short)1, "componentId"), STREAM_ID((short)2, "streamId"); @@ -101,15 +96,15 @@ public String getFieldName() { private static final int __STREAMID_ISSET_ID = 1; private BitSet __isset_bit_vector = new BitSet(2); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.COMPONENT_ID, new FieldMetaData("componentId", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.STREAM_ID, new FieldMetaData("streamId", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.COMPONENT_ID, new org.apache.thrift.meta_data.FieldMetaData("componentId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.STREAM_ID, new org.apache.thrift.meta_data.FieldMetaData("streamId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(GlobalStreamId.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GlobalStreamId.class, metaDataMap); } public GlobalStreamId() { @@ -140,9 +135,12 @@ public GlobalStreamId deepCopy() { return new GlobalStreamId(this); } - @Deprecated - public GlobalStreamId clone() { - return new GlobalStreamId(this); + @Override + public void clear() { + set_componentId_isSet(false); + this.componentId = 0; + set_streamId_isSet(false); + this.streamId = 0; } public int get_componentId() { @@ -158,7 +156,7 @@ public void unset_componentId() { __isset_bit_vector.clear(__COMPONENTID_ISSET_ID); } - /** Returns true if field componentId is set (has been asigned a value) and false otherwise */ + /** Returns true if field componentId is set (has been assigned a value) and false otherwise */ public boolean is_set_componentId() { return __isset_bit_vector.get(__COMPONENTID_ISSET_ID); } @@ -180,7 +178,7 @@ public void unset_streamId() { __isset_bit_vector.clear(__STREAMID_ISSET_ID); } - /** Returns true if field streamId is set (has been asigned a value) and false otherwise */ + /** Returns true if field streamId is set (has been assigned a value) and false otherwise */ public boolean is_set_streamId() { return __isset_bit_vector.get(__STREAMID_ISSET_ID); } @@ -210,28 +208,24 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case COMPONENT_ID: - return new Integer(get_componentId()); + return Integer.valueOf(get_componentId()); case STREAM_ID: - return new Integer(get_streamId()); + return Integer.valueOf(get_streamId()); } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case COMPONENT_ID: return is_set_componentId(); @@ -241,10 +235,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -308,7 +298,8 @@ public int compareTo(GlobalStreamId other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_componentId()) { lastComparison = TBaseHelper.compareTo(this.componentId, typedOther.componentId); + if (is_set_componentId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.componentId, typedOther.componentId); if (lastComparison != 0) { return lastComparison; } @@ -317,7 +308,8 @@ public int compareTo(GlobalStreamId other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_streamId()) { lastComparison = TBaseHelper.compareTo(this.streamId, typedOther.streamId); + if (is_set_streamId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streamId, typedOther.streamId); if (lastComparison != 0) { return lastComparison; } @@ -325,34 +317,38 @@ public int compareTo(GlobalStreamId other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // COMPONENT_ID - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.componentId = iprot.readI32(); set_componentId_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // STREAM_ID - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.streamId = iprot.readI32(); set_streamId_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -360,7 +356,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -390,17 +386,35 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_componentId()) { - throw new TProtocolException("Required field 'componentId' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'componentId' is unset! Struct:" + toString()); } if (!is_set_streamId()) { - throw new TProtocolException("Required field 'streamId' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'streamId' is unset! Struct:" + toString()); } } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/Grouping.java b/src/jvm/backtype/storm/generated/Grouping.java index 1061413c6..e98ef9d0b 100644 --- a/src/jvm/backtype/storm/generated/Grouping.java +++ b/src/jvm/backtype/storm/generated/Grouping.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,26 +16,21 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; - -public class Grouping extends TUnion { - private static final TStruct STRUCT_DESC = new TStruct("Grouping"); - private static final TField FIELDS_FIELD_DESC = new TField("fields", TType.LIST, (short)1); - private static final TField SHUFFLE_FIELD_DESC = new TField("shuffle", TType.STRUCT, (short)2); - private static final TField ALL_FIELD_DESC = new TField("all", TType.STRUCT, (short)3); - private static final TField NONE_FIELD_DESC = new TField("none", TType.STRUCT, (short)4); - private static final TField DIRECT_FIELD_DESC = new TField("direct", TType.STRUCT, (short)5); +public class Grouping extends org.apache.thrift.TUnion { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Grouping"); + private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField SHUFFLE_FIELD_DESC = new org.apache.thrift.protocol.TField("shuffle", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField ALL_FIELD_DESC = new org.apache.thrift.protocol.TField("all", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField NONE_FIELD_DESC = new org.apache.thrift.protocol.TField("none", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final org.apache.thrift.protocol.TField DIRECT_FIELD_DESC = new org.apache.thrift.protocol.TField("direct", org.apache.thrift.protocol.TType.STRUCT, (short)5); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { FIELDS((short)1, "fields"), SHUFFLE((short)2, "shuffle"), ALL((short)3, "all"), @@ -104,22 +99,22 @@ public String getFieldName() { } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FIELDS, new FieldMetaData("fields", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.SHUFFLE, new FieldMetaData("shuffle", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, NullStruct.class))); - tmpMap.put(_Fields.ALL, new FieldMetaData("all", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, NullStruct.class))); - tmpMap.put(_Fields.NONE, new FieldMetaData("none", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, NullStruct.class))); - tmpMap.put(_Fields.DIRECT, new FieldMetaData("direct", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, NullStruct.class))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FIELDS, new org.apache.thrift.meta_data.FieldMetaData("fields", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.SHUFFLE, new org.apache.thrift.meta_data.FieldMetaData("shuffle", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); + tmpMap.put(_Fields.ALL, new org.apache.thrift.meta_data.FieldMetaData("all", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); + tmpMap.put(_Fields.NONE, new org.apache.thrift.meta_data.FieldMetaData("none", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); + tmpMap.put(_Fields.DIRECT, new org.apache.thrift.meta_data.FieldMetaData("direct", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NullStruct.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(Grouping.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Grouping.class, metaDataMap); } public Grouping() { @@ -202,7 +197,7 @@ protected void checkType(_Fields setField, Object value) throws ClassCastExcepti } @Override - protected Object readValue(TProtocol iprot, TField field) throws TException { + protected Object readValue(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) { @@ -210,11 +205,11 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { if (field.type == FIELDS_FIELD_DESC.type) { List fields; { - TList _list0 = iprot.readListBegin(); + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); fields = new ArrayList(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - String _elem2; + String _elem2; // required _elem2 = iprot.readString(); fields.add(_elem2); } @@ -222,7 +217,7 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { } return fields; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case SHUFFLE: @@ -232,7 +227,7 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { shuffle.read(iprot); return shuffle; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case ALL: @@ -242,7 +237,7 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { all.read(iprot); return all; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case NONE: @@ -252,7 +247,7 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { none.read(iprot); return none; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case DIRECT: @@ -262,25 +257,25 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { direct.read(iprot); return direct; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } default: throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @Override - protected void writeValue(TProtocol oprot) throws TException { + protected void writeValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case FIELDS: List fields = (List)value_; { - oprot.writeListBegin(new TList(TType.STRING, fields.size())); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, fields.size())); for (String _iter3 : fields) { oprot.writeString(_iter3); @@ -310,7 +305,7 @@ protected void writeValue(TProtocol oprot) throws TException { } @Override - protected TField getFieldDesc(_Fields setField) { + protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { switch (setField) { case FIELDS: return FIELDS_FIELD_DESC; @@ -328,7 +323,7 @@ protected TField getFieldDesc(_Fields setField) { } @Override - protected TStruct getStructDesc() { + protected org.apache.thrift.protocol.TStruct getStructDesc() { return STRUCT_DESC; } @@ -337,6 +332,11 @@ protected _Fields enumForId(short id) { return _Fields.findByThriftIdOrThrow(id); } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public List get_fields() { if (getSetField() == _Fields.FIELDS) { return (List)getFieldValue(); @@ -407,6 +407,31 @@ public void set_direct(NullStruct value) { value_ = value; } + public boolean is_set_fields() { + return setField_ == _Fields.FIELDS; + } + + + public boolean is_set_shuffle() { + return setField_ == _Fields.SHUFFLE; + } + + + public boolean is_set_all() { + return setField_ == _Fields.ALL; + } + + + public boolean is_set_none() { + return setField_ == _Fields.NONE; + } + + + public boolean is_set_direct() { + return setField_ == _Fields.DIRECT; + } + + public boolean equals(Object other) { if (other instanceof Grouping) { return equals((Grouping)other); @@ -416,26 +441,14 @@ public boolean equals(Object other) { } public boolean equals(Grouping other) { - return other != null && getSetField() == other.getSetField() && ((value_ instanceof byte[]) ? - Arrays.equals((byte[])getFieldValue(), (byte[])other.getFieldValue()) : getFieldValue().equals(other.getFieldValue())); + return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); } @Override public int compareTo(Grouping other) { - int lastComparison = TBaseHelper.compareTo(getSetField(), other.getSetField()); + int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); if (lastComparison == 0) { - Object myValue = getFieldValue(); - if (myValue instanceof byte[]) { - return TBaseHelper.compareTo((byte[])myValue, (byte[])other.getFieldValue()); - } else if (myValue instanceof List) { - return TBaseHelper.compareTo((List)myValue, (List)other.getFieldValue()); - } else if (myValue instanceof Set) { - return TBaseHelper.compareTo((Set)myValue, (Set)other.getFieldValue()); - } else if (myValue instanceof Map){ - return TBaseHelper.compareTo((Map)myValue, (Map)other.getFieldValue()); - } else { - return TBaseHelper.compareTo((Comparable)myValue, (Comparable)other.getFieldValue()); - } + return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); } return lastComparison; } @@ -445,16 +458,34 @@ public int compareTo(Grouping other) { public int hashCode() { HashCodeBuilder hcb = new HashCodeBuilder(); hcb.append(this.getClass().getName()); - TFieldIdEnum setField = getSetField(); + org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { hcb.append(setField.getThriftFieldId()); Object value = getFieldValue(); - if (value instanceof TEnum) { - hcb.append(((TEnum)getFieldValue()).getValue()); + if (value instanceof org.apache.thrift.TEnum) { + hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { hcb.append(value); } } return hcb.toHashCode(); } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } diff --git a/src/jvm/backtype/storm/generated/InvalidTopologyException.java b/src/jvm/backtype/storm/generated/InvalidTopologyException.java index 72a175c54..54a9ed72a 100644 --- a/src/jvm/backtype/storm/generated/InvalidTopologyException.java +++ b/src/jvm/backtype/storm/generated/InvalidTopologyException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,25 +16,20 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class InvalidTopologyException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidTopologyException"); -public class InvalidTopologyException extends Exception implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("InvalidTopologyException"); + 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 TField MSG_FIELD_DESC = new TField("msg", TType.STRING, (short)1); - - private String msg; + private String msg; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { MSG((short)1, "msg"); private static final Map byName = new HashMap(); @@ -93,13 +88,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.MSG, new FieldMetaData("msg", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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); - FieldMetaData.addStructMetaDataMap(InvalidTopologyException.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidTopologyException.class, metaDataMap); } public InvalidTopologyException() { @@ -125,9 +120,9 @@ public InvalidTopologyException deepCopy() { return new InvalidTopologyException(this); } - @Deprecated - public InvalidTopologyException clone() { - return new InvalidTopologyException(this); + @Override + public void clear() { + this.msg = null; } public String get_msg() { @@ -142,7 +137,7 @@ public void unset_msg() { this.msg = null; } - /** Returns true if field msg is set (has been asigned a value) and false otherwise */ + /** Returns true if field msg is set (has been assigned a value) and false otherwise */ public boolean is_set_msg() { return this.msg != null; } @@ -166,10 +161,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case MSG: @@ -179,12 +170,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case MSG: return is_set_msg(); @@ -192,10 +183,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -245,7 +232,8 @@ public int compareTo(InvalidTopologyException other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_msg()) { lastComparison = TBaseHelper.compareTo(this.msg, typedOther.msg); + if (is_set_msg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.msg, typedOther.msg); if (lastComparison != 0) { return lastComparison; } @@ -253,25 +241,29 @@ public int compareTo(InvalidTopologyException other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // MSG - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.msg = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -279,7 +271,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -308,12 +300,28 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_msg()) { - throw new TProtocolException("Required field 'msg' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'msg' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/Nimbus.java b/src/jvm/backtype/storm/generated/Nimbus.java index 6fd9e17ef..5420a3948 100644 --- a/src/jvm/backtype/storm/generated/Nimbus.java +++ b/src/jvm/backtype/storm/generated/Nimbus.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,140 +16,105 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; - public class Nimbus { public interface Iface { - public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, TException; + public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, org.apache.thrift.TException; - public void killTopology(String name) throws NotAliveException, TException; + public void killTopology(String name) throws NotAliveException, org.apache.thrift.TException; - public String beginFileUpload() throws TException; + public String beginFileUpload() throws org.apache.thrift.TException; - public void uploadChunk(String location, byte[] chunk) throws TException; + public void uploadChunk(String location, ByteBuffer chunk) throws org.apache.thrift.TException; - public void finishFileUpload(String location) throws TException; + public void finishFileUpload(String location) throws org.apache.thrift.TException; - public String beginFileDownload(String file) throws TException; + public String beginFileDownload(String file) throws org.apache.thrift.TException; - public byte[] downloadChunk(String id) throws TException; + public ByteBuffer downloadChunk(String id) throws org.apache.thrift.TException; - public ClusterSummary getClusterInfo() throws TException; + public ClusterSummary getClusterInfo() throws org.apache.thrift.TException; - public TopologyInfo getTopologyInfo(String id) throws NotAliveException, TException; + public TopologyInfo getTopologyInfo(String id) throws NotAliveException, org.apache.thrift.TException; - public String getTopologyConf(String id) throws NotAliveException, TException; + public String getTopologyConf(String id) throws NotAliveException, org.apache.thrift.TException; - public StormTopology getTopology(String id) throws NotAliveException, TException; + public StormTopology getTopology(String id) throws NotAliveException, org.apache.thrift.TException; } public interface AsyncIface { - public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, AsyncMethodCallback resultHandler) throws TException; + public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void killTopology(String name, AsyncMethodCallback resultHandler) throws TException; + public void killTopology(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void beginFileUpload(AsyncMethodCallback resultHandler) throws TException; + public void beginFileUpload(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void uploadChunk(String location, byte[] chunk, AsyncMethodCallback resultHandler) throws TException; + public void uploadChunk(String location, ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void finishFileUpload(String location, AsyncMethodCallback resultHandler) throws TException; + public void finishFileUpload(String location, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void beginFileDownload(String file, AsyncMethodCallback resultHandler) throws TException; + public void beginFileDownload(String file, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void downloadChunk(String id, AsyncMethodCallback resultHandler) throws TException; + public void downloadChunk(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getClusterInfo(AsyncMethodCallback resultHandler) throws TException; + public void getClusterInfo(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getTopologyInfo(String id, AsyncMethodCallback resultHandler) throws TException; + public void getTopologyInfo(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getTopologyConf(String id, AsyncMethodCallback resultHandler) throws TException; + public void getTopologyConf(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void getTopology(String id, AsyncMethodCallback resultHandler) throws TException; + public void getTopology(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } - public static class Client implements TServiceClient, Iface { - public static class Factory implements TServiceClientFactory { + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} - public Client getClient(TProtocol prot) { + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } - public Client getClient(TProtocol iprot, TProtocol oprot) { + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } - public Client(TProtocol prot) - { - this(prot, prot); - } - - public Client(TProtocol iprot, TProtocol oprot) - { - iprot_ = iprot; - oprot_ = oprot; - } - - protected TProtocol iprot_; - protected TProtocol oprot_; - - protected int seqid_; - - public TProtocol getInputProtocol() + public Client(org.apache.thrift.protocol.TProtocol prot) { - return this.iprot_; + super(prot, prot); } - public TProtocol getOutputProtocol() - { - return this.oprot_; + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); } - public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, TException + public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, org.apache.thrift.TException { send_submitTopology(name, uploadedJarLocation, jsonConf, topology); recv_submitTopology(); } - public void send_submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws TException + public void send_submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("submitTopology", TMessageType.CALL, ++seqid_)); submitTopology_args args = new submitTopology_args(); args.set_name(name); args.set_uploadedJarLocation(uploadedJarLocation); args.set_jsonConf(jsonConf); args.set_topology(topology); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("submitTopology", args); } - public void recv_submitTopology() throws AlreadyAliveException, InvalidTopologyException, TException + public void recv_submitTopology() throws AlreadyAliveException, InvalidTopologyException, org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "submitTopology failed: out of sequence response"); - } submitTopology_result result = new submitTopology_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "submitTopology"); if (result.e != null) { throw result.e; } @@ -159,398 +124,269 @@ public void recv_submitTopology() throws AlreadyAliveException, InvalidTopologyE return; } - public void killTopology(String name) throws NotAliveException, TException + public void killTopology(String name) throws NotAliveException, org.apache.thrift.TException { send_killTopology(name); recv_killTopology(); } - public void send_killTopology(String name) throws TException + public void send_killTopology(String name) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("killTopology", TMessageType.CALL, ++seqid_)); killTopology_args args = new killTopology_args(); args.set_name(name); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("killTopology", args); } - public void recv_killTopology() throws NotAliveException, TException + public void recv_killTopology() throws NotAliveException, org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "killTopology failed: out of sequence response"); - } killTopology_result result = new killTopology_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "killTopology"); if (result.e != null) { throw result.e; } return; } - public String beginFileUpload() throws TException + public String beginFileUpload() throws org.apache.thrift.TException { send_beginFileUpload(); return recv_beginFileUpload(); } - public void send_beginFileUpload() throws TException + public void send_beginFileUpload() throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("beginFileUpload", TMessageType.CALL, ++seqid_)); beginFileUpload_args args = new beginFileUpload_args(); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("beginFileUpload", args); } - public String recv_beginFileUpload() throws TException + public String recv_beginFileUpload() throws org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "beginFileUpload failed: out of sequence response"); - } beginFileUpload_result result = new beginFileUpload_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "beginFileUpload"); if (result.is_set_success()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "beginFileUpload failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginFileUpload failed: unknown result"); } - public void uploadChunk(String location, byte[] chunk) throws TException + public void uploadChunk(String location, ByteBuffer chunk) throws org.apache.thrift.TException { send_uploadChunk(location, chunk); recv_uploadChunk(); } - public void send_uploadChunk(String location, byte[] chunk) throws TException + public void send_uploadChunk(String location, ByteBuffer chunk) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("uploadChunk", TMessageType.CALL, ++seqid_)); uploadChunk_args args = new uploadChunk_args(); args.set_location(location); args.set_chunk(chunk); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("uploadChunk", args); } - public void recv_uploadChunk() throws TException + public void recv_uploadChunk() throws org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "uploadChunk failed: out of sequence response"); - } uploadChunk_result result = new uploadChunk_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "uploadChunk"); return; } - public void finishFileUpload(String location) throws TException + public void finishFileUpload(String location) throws org.apache.thrift.TException { send_finishFileUpload(location); recv_finishFileUpload(); } - public void send_finishFileUpload(String location) throws TException + public void send_finishFileUpload(String location) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("finishFileUpload", TMessageType.CALL, ++seqid_)); finishFileUpload_args args = new finishFileUpload_args(); args.set_location(location); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("finishFileUpload", args); } - public void recv_finishFileUpload() throws TException + public void recv_finishFileUpload() throws org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "finishFileUpload failed: out of sequence response"); - } finishFileUpload_result result = new finishFileUpload_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "finishFileUpload"); return; } - public String beginFileDownload(String file) throws TException + public String beginFileDownload(String file) throws org.apache.thrift.TException { send_beginFileDownload(file); return recv_beginFileDownload(); } - public void send_beginFileDownload(String file) throws TException + public void send_beginFileDownload(String file) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("beginFileDownload", TMessageType.CALL, ++seqid_)); beginFileDownload_args args = new beginFileDownload_args(); args.set_file(file); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("beginFileDownload", args); } - public String recv_beginFileDownload() throws TException + public String recv_beginFileDownload() throws org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "beginFileDownload failed: out of sequence response"); - } beginFileDownload_result result = new beginFileDownload_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "beginFileDownload"); if (result.is_set_success()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result"); } - public byte[] downloadChunk(String id) throws TException + public ByteBuffer downloadChunk(String id) throws org.apache.thrift.TException { send_downloadChunk(id); return recv_downloadChunk(); } - public void send_downloadChunk(String id) throws TException + public void send_downloadChunk(String id) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("downloadChunk", TMessageType.CALL, ++seqid_)); downloadChunk_args args = new downloadChunk_args(); args.set_id(id); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("downloadChunk", args); } - public byte[] recv_downloadChunk() throws TException + public ByteBuffer recv_downloadChunk() throws org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "downloadChunk failed: out of sequence response"); - } downloadChunk_result result = new downloadChunk_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "downloadChunk"); if (result.is_set_success()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "downloadChunk failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "downloadChunk failed: unknown result"); } - public ClusterSummary getClusterInfo() throws TException + public ClusterSummary getClusterInfo() throws org.apache.thrift.TException { send_getClusterInfo(); return recv_getClusterInfo(); } - public void send_getClusterInfo() throws TException + public void send_getClusterInfo() throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("getClusterInfo", TMessageType.CALL, ++seqid_)); getClusterInfo_args args = new getClusterInfo_args(); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("getClusterInfo", args); } - public ClusterSummary recv_getClusterInfo() throws TException + public ClusterSummary recv_getClusterInfo() throws org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getClusterInfo failed: out of sequence response"); - } getClusterInfo_result result = new getClusterInfo_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "getClusterInfo"); if (result.is_set_success()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getClusterInfo failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getClusterInfo failed: unknown result"); } - public TopologyInfo getTopologyInfo(String id) throws NotAliveException, TException + public TopologyInfo getTopologyInfo(String id) throws NotAliveException, org.apache.thrift.TException { send_getTopologyInfo(id); return recv_getTopologyInfo(); } - public void send_getTopologyInfo(String id) throws TException + public void send_getTopologyInfo(String id) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("getTopologyInfo", TMessageType.CALL, ++seqid_)); getTopologyInfo_args args = new getTopologyInfo_args(); args.set_id(id); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("getTopologyInfo", args); } - public TopologyInfo recv_getTopologyInfo() throws NotAliveException, TException + public TopologyInfo recv_getTopologyInfo() throws NotAliveException, org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getTopologyInfo failed: out of sequence response"); - } getTopologyInfo_result result = new getTopologyInfo_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "getTopologyInfo"); if (result.is_set_success()) { return result.success; } if (result.e != null) { throw result.e; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyInfo failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopologyInfo failed: unknown result"); } - public String getTopologyConf(String id) throws NotAliveException, TException + public String getTopologyConf(String id) throws NotAliveException, org.apache.thrift.TException { send_getTopologyConf(id); return recv_getTopologyConf(); } - public void send_getTopologyConf(String id) throws TException + public void send_getTopologyConf(String id) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("getTopologyConf", TMessageType.CALL, ++seqid_)); getTopologyConf_args args = new getTopologyConf_args(); args.set_id(id); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("getTopologyConf", args); } - public String recv_getTopologyConf() throws NotAliveException, TException + public String recv_getTopologyConf() throws NotAliveException, org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getTopologyConf failed: out of sequence response"); - } getTopologyConf_result result = new getTopologyConf_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "getTopologyConf"); if (result.is_set_success()) { return result.success; } if (result.e != null) { throw result.e; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyConf failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopologyConf failed: unknown result"); } - public StormTopology getTopology(String id) throws NotAliveException, TException + public StormTopology getTopology(String id) throws NotAliveException, org.apache.thrift.TException { send_getTopology(id); return recv_getTopology(); } - public void send_getTopology(String id) throws TException + public void send_getTopology(String id) throws org.apache.thrift.TException { - oprot_.writeMessageBegin(new TMessage("getTopology", TMessageType.CALL, ++seqid_)); getTopology_args args = new getTopology_args(); args.set_id(id); - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); + sendBase("getTopology", args); } - public StormTopology recv_getTopology() throws NotAliveException, TException + public StormTopology recv_getTopology() throws NotAliveException, org.apache.thrift.TException { - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - if (msg.seqid != seqid_) { - throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getTopology failed: out of sequence response"); - } getTopology_result result = new getTopology_result(); - result.read(iprot_); - iprot_.readMessageEnd(); + receiveBase(result, "getTopology"); if (result.is_set_success()) { return result.success; } if (result.e != null) { throw result.e; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTopology failed: unknown result"); + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTopology failed: unknown result"); } } - public static class AsyncClient extends TAsyncClient implements AsyncIface { - public static class Factory implements TAsyncClientFactory { - private TAsyncClientManager clientManager; - private TProtocolFactory protocolFactory; - public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } - public AsyncClient getAsyncClient(TNonblockingTransport transport) { + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } - public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } - public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, AsyncMethodCallback resultHandler) throws TException { + public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - submitTopology_call method_call = new submitTopology_call(name, uploadedJarLocation, jsonConf, topology, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + submitTopology_call method_call = new submitTopology_call(name, uploadedJarLocation, jsonConf, topology, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class submitTopology_call extends TAsyncMethodCall { + public static class submitTopology_call extends org.apache.thrift.async.TAsyncMethodCall { private String name; private String uploadedJarLocation; private String jsonConf; private StormTopology topology; - public submitTopology_call(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public submitTopology_call(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; this.uploadedJarLocation = uploadedJarLocation; @@ -558,8 +394,8 @@ public submitTopology_call(String name, String uploadedJarLocation, String jsonC this.topology = topology; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("submitTopology", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitTopology", org.apache.thrift.protocol.TMessageType.CALL, 0)); submitTopology_args args = new submitTopology_args(); args.set_name(name); args.set_uploadedJarLocation(uploadedJarLocation); @@ -569,92 +405,95 @@ public void write_args(TProtocol prot) throws TException { prot.writeMessageEnd(); } - public void getResult() throws AlreadyAliveException, InvalidTopologyException, TException { - if (getState() != State.RESPONSE_READ) { + public void getResult() throws AlreadyAliveException, InvalidTopologyException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_submitTopology(); } } - public void killTopology(String name, AsyncMethodCallback resultHandler) throws TException { + public void killTopology(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - killTopology_call method_call = new killTopology_call(name, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + killTopology_call method_call = new killTopology_call(name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class killTopology_call extends TAsyncMethodCall { + public static class killTopology_call extends org.apache.thrift.async.TAsyncMethodCall { private String name; - public killTopology_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public killTopology_call(String name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.name = name; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("killTopology", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("killTopology", org.apache.thrift.protocol.TMessageType.CALL, 0)); killTopology_args args = new killTopology_args(); args.set_name(name); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws NotAliveException, TException { - if (getState() != State.RESPONSE_READ) { + public void getResult() throws NotAliveException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_killTopology(); } } - public void beginFileUpload(AsyncMethodCallback resultHandler) throws TException { + public void beginFileUpload(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - beginFileUpload_call method_call = new beginFileUpload_call(resultHandler, this, protocolFactory, transport); - manager.call(method_call); + beginFileUpload_call method_call = new beginFileUpload_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class beginFileUpload_call extends TAsyncMethodCall { - public beginFileUpload_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class beginFileUpload_call extends org.apache.thrift.async.TAsyncMethodCall { + public beginFileUpload_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("beginFileUpload", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("beginFileUpload", org.apache.thrift.protocol.TMessageType.CALL, 0)); beginFileUpload_args args = new beginFileUpload_args(); args.write(prot); prot.writeMessageEnd(); } - public String getResult() throws TException { - if (getState() != State.RESPONSE_READ) { + public String getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_beginFileUpload(); } } - public void uploadChunk(String location, byte[] chunk, AsyncMethodCallback resultHandler) throws TException { + public void uploadChunk(String location, ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - uploadChunk_call method_call = new uploadChunk_call(location, chunk, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + uploadChunk_call method_call = new uploadChunk_call(location, chunk, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class uploadChunk_call extends TAsyncMethodCall { + public static class uploadChunk_call extends org.apache.thrift.async.TAsyncMethodCall { private String location; - private byte[] chunk; - public uploadChunk_call(String location, byte[] chunk, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + private ByteBuffer chunk; + public uploadChunk_call(String location, ByteBuffer chunk, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.location = location; this.chunk = chunk; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("uploadChunk", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("uploadChunk", org.apache.thrift.protocol.TMessageType.CALL, 0)); uploadChunk_args args = new uploadChunk_args(); args.set_location(location); args.set_chunk(chunk); @@ -662,640 +501,479 @@ public void write_args(TProtocol prot) throws TException { prot.writeMessageEnd(); } - public void getResult() throws TException { - if (getState() != State.RESPONSE_READ) { + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_uploadChunk(); } } - public void finishFileUpload(String location, AsyncMethodCallback resultHandler) throws TException { + public void finishFileUpload(String location, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - finishFileUpload_call method_call = new finishFileUpload_call(location, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + finishFileUpload_call method_call = new finishFileUpload_call(location, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class finishFileUpload_call extends TAsyncMethodCall { + public static class finishFileUpload_call extends org.apache.thrift.async.TAsyncMethodCall { private String location; - public finishFileUpload_call(String location, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public finishFileUpload_call(String location, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.location = location; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("finishFileUpload", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finishFileUpload", org.apache.thrift.protocol.TMessageType.CALL, 0)); finishFileUpload_args args = new finishFileUpload_args(); args.set_location(location); args.write(prot); prot.writeMessageEnd(); } - public void getResult() throws TException { - if (getState() != State.RESPONSE_READ) { + public void getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_finishFileUpload(); } } - public void beginFileDownload(String file, AsyncMethodCallback resultHandler) throws TException { + public void beginFileDownload(String file, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - beginFileDownload_call method_call = new beginFileDownload_call(file, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + beginFileDownload_call method_call = new beginFileDownload_call(file, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class beginFileDownload_call extends TAsyncMethodCall { + public static class beginFileDownload_call extends org.apache.thrift.async.TAsyncMethodCall { private String file; - public beginFileDownload_call(String file, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public beginFileDownload_call(String file, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.file = file; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("beginFileDownload", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("beginFileDownload", org.apache.thrift.protocol.TMessageType.CALL, 0)); beginFileDownload_args args = new beginFileDownload_args(); args.set_file(file); args.write(prot); prot.writeMessageEnd(); } - public String getResult() throws TException { - if (getState() != State.RESPONSE_READ) { + public String getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_beginFileDownload(); } } - public void downloadChunk(String id, AsyncMethodCallback resultHandler) throws TException { + public void downloadChunk(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - downloadChunk_call method_call = new downloadChunk_call(id, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + downloadChunk_call method_call = new downloadChunk_call(id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class downloadChunk_call extends TAsyncMethodCall { + public static class downloadChunk_call extends org.apache.thrift.async.TAsyncMethodCall { private String id; - public downloadChunk_call(String id, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public downloadChunk_call(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.id = id; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("downloadChunk", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("downloadChunk", org.apache.thrift.protocol.TMessageType.CALL, 0)); downloadChunk_args args = new downloadChunk_args(); args.set_id(id); args.write(prot); prot.writeMessageEnd(); } - public byte[] getResult() throws TException { - if (getState() != State.RESPONSE_READ) { + public ByteBuffer getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_downloadChunk(); } } - public void getClusterInfo(AsyncMethodCallback resultHandler) throws TException { + public void getClusterInfo(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getClusterInfo_call method_call = new getClusterInfo_call(resultHandler, this, protocolFactory, transport); - manager.call(method_call); + getClusterInfo_call method_call = new getClusterInfo_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class getClusterInfo_call extends TAsyncMethodCall { - public getClusterInfo_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public static class getClusterInfo_call extends org.apache.thrift.async.TAsyncMethodCall { + public getClusterInfo_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("getClusterInfo", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getClusterInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); getClusterInfo_args args = new getClusterInfo_args(); args.write(prot); prot.writeMessageEnd(); } - public ClusterSummary getResult() throws TException { - if (getState() != State.RESPONSE_READ) { + public ClusterSummary getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getClusterInfo(); } } - public void getTopologyInfo(String id, AsyncMethodCallback resultHandler) throws TException { + public void getTopologyInfo(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getTopologyInfo_call method_call = new getTopologyInfo_call(id, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + getTopologyInfo_call method_call = new getTopologyInfo_call(id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class getTopologyInfo_call extends TAsyncMethodCall { + public static class getTopologyInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private String id; - public getTopologyInfo_call(String id, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public getTopologyInfo_call(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.id = id; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("getTopologyInfo", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTopologyInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); getTopologyInfo_args args = new getTopologyInfo_args(); args.set_id(id); args.write(prot); prot.writeMessageEnd(); } - public TopologyInfo getResult() throws NotAliveException, TException { - if (getState() != State.RESPONSE_READ) { + public TopologyInfo getResult() throws NotAliveException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getTopologyInfo(); } } - public void getTopologyConf(String id, AsyncMethodCallback resultHandler) throws TException { + public void getTopologyConf(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getTopologyConf_call method_call = new getTopologyConf_call(id, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + getTopologyConf_call method_call = new getTopologyConf_call(id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class getTopologyConf_call extends TAsyncMethodCall { + public static class getTopologyConf_call extends org.apache.thrift.async.TAsyncMethodCall { private String id; - public getTopologyConf_call(String id, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public getTopologyConf_call(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.id = id; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("getTopologyConf", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTopologyConf", org.apache.thrift.protocol.TMessageType.CALL, 0)); getTopologyConf_args args = new getTopologyConf_args(); args.set_id(id); args.write(prot); prot.writeMessageEnd(); } - public String getResult() throws NotAliveException, TException { - if (getState() != State.RESPONSE_READ) { + public String getResult() throws NotAliveException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getTopologyConf(); } } - public void getTopology(String id, AsyncMethodCallback resultHandler) throws TException { + public void getTopology(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - getTopology_call method_call = new getTopology_call(id, resultHandler, this, protocolFactory, transport); - manager.call(method_call); + getTopology_call method_call = new getTopology_call(id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); } - public static class getTopology_call extends TAsyncMethodCall { + public static class getTopology_call extends org.apache.thrift.async.TAsyncMethodCall { private String id; - public getTopology_call(String id, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + public getTopology_call(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.id = id; } - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("getTopology", TMessageType.CALL, 0)); + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTopology", org.apache.thrift.protocol.TMessageType.CALL, 0)); getTopology_args args = new getTopology_args(); args.set_id(id); args.write(prot); prot.writeMessageEnd(); } - public StormTopology getResult() throws NotAliveException, TException { - if (getState() != State.RESPONSE_READ) { + public StormTopology getResult() throws NotAliveException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getTopology(); } } } - public static class Processor implements TProcessor { + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(Iface iface) - { - iface_ = iface; - processMap_.put("submitTopology", new submitTopology()); - processMap_.put("killTopology", new killTopology()); - processMap_.put("beginFileUpload", new beginFileUpload()); - processMap_.put("uploadChunk", new uploadChunk()); - processMap_.put("finishFileUpload", new finishFileUpload()); - processMap_.put("beginFileDownload", new beginFileDownload()); - processMap_.put("downloadChunk", new downloadChunk()); - processMap_.put("getClusterInfo", new getClusterInfo()); - processMap_.put("getTopologyInfo", new getTopologyInfo()); - processMap_.put("getTopologyConf", new getTopologyConf()); - processMap_.put("getTopology", new getTopology()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); } - protected static interface ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException; + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); } - private Iface iface_; - protected final HashMap processMap_ = new HashMap(); - - public boolean process(TProtocol iprot, TProtocol oprot) throws TException - { - TMessage msg = iprot.readMessageBegin(); - ProcessFunction fn = processMap_.get(msg.name); - if (fn == null) { - TProtocolUtil.skip(iprot, TType.STRUCT); - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); - oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return true; - } - fn.process(msg.seqid, iprot, oprot); - return true; + private static Map> getProcessMap(Map> processMap) { + processMap.put("submitTopology", new submitTopology()); + processMap.put("killTopology", new killTopology()); + processMap.put("beginFileUpload", new beginFileUpload()); + processMap.put("uploadChunk", new uploadChunk()); + processMap.put("finishFileUpload", new finishFileUpload()); + processMap.put("beginFileDownload", new beginFileDownload()); + processMap.put("downloadChunk", new downloadChunk()); + processMap.put("getClusterInfo", new getClusterInfo()); + processMap.put("getTopologyInfo", new getTopologyInfo()); + processMap.put("getTopologyConf", new getTopologyConf()); + processMap.put("getTopology", new getTopology()); + return processMap; } - private class submitTopology implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - submitTopology_args args = new submitTopology_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("submitTopology", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); + private static class submitTopology extends org.apache.thrift.ProcessFunction { + public submitTopology() { + super("submitTopology"); + } + + protected submitTopology_args getEmptyArgsInstance() { + return new submitTopology_args(); + } + + protected submitTopology_result getResult(I iface, submitTopology_args args) throws org.apache.thrift.TException { submitTopology_result result = new submitTopology_result(); try { - iface_.submitTopology(args.name, args.uploadedJarLocation, args.jsonConf, args.topology); + iface.submitTopology(args.name, args.uploadedJarLocation, args.jsonConf, args.topology); } catch (AlreadyAliveException e) { result.e = e; } catch (InvalidTopologyException ite) { result.ite = ite; - } catch (Throwable th) { - LOGGER.error("Internal error processing submitTopology", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing submitTopology"); - oprot.writeMessageBegin(new TMessage("submitTopology", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; } - oprot.writeMessageBegin(new TMessage("submitTopology", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + return result; } - } - private class killTopology implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - killTopology_args args = new killTopology_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("killTopology", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); + private static class killTopology extends org.apache.thrift.ProcessFunction { + public killTopology() { + super("killTopology"); + } + + protected killTopology_args getEmptyArgsInstance() { + return new killTopology_args(); + } + + protected killTopology_result getResult(I iface, killTopology_args args) throws org.apache.thrift.TException { killTopology_result result = new killTopology_result(); try { - iface_.killTopology(args.name); + iface.killTopology(args.name); } catch (NotAliveException e) { result.e = e; - } catch (Throwable th) { - LOGGER.error("Internal error processing killTopology", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing killTopology"); - oprot.writeMessageBegin(new TMessage("killTopology", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; } - oprot.writeMessageBegin(new TMessage("killTopology", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + return result; } - } - private class beginFileUpload implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - beginFileUpload_args args = new beginFileUpload_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("beginFileUpload", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - beginFileUpload_result result = new beginFileUpload_result(); - result.success = iface_.beginFileUpload(); - oprot.writeMessageBegin(new TMessage("beginFileUpload", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + private static class beginFileUpload extends org.apache.thrift.ProcessFunction { + public beginFileUpload() { + super("beginFileUpload"); + } + + protected beginFileUpload_args getEmptyArgsInstance() { + return new beginFileUpload_args(); } + protected beginFileUpload_result getResult(I iface, beginFileUpload_args args) throws org.apache.thrift.TException { + beginFileUpload_result result = new beginFileUpload_result(); + result.success = iface.beginFileUpload(); + return result; + } } - private class uploadChunk implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - uploadChunk_args args = new uploadChunk_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("uploadChunk", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - uploadChunk_result result = new uploadChunk_result(); - iface_.uploadChunk(args.location, args.chunk); - oprot.writeMessageBegin(new TMessage("uploadChunk", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + private static class uploadChunk extends org.apache.thrift.ProcessFunction { + public uploadChunk() { + super("uploadChunk"); } + protected uploadChunk_args getEmptyArgsInstance() { + return new uploadChunk_args(); + } + + protected uploadChunk_result getResult(I iface, uploadChunk_args args) throws org.apache.thrift.TException { + uploadChunk_result result = new uploadChunk_result(); + iface.uploadChunk(args.location, args.chunk); + return result; + } } - private class finishFileUpload implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - finishFileUpload_args args = new finishFileUpload_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("finishFileUpload", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - finishFileUpload_result result = new finishFileUpload_result(); - iface_.finishFileUpload(args.location); - oprot.writeMessageBegin(new TMessage("finishFileUpload", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + private static class finishFileUpload extends org.apache.thrift.ProcessFunction { + public finishFileUpload() { + super("finishFileUpload"); } + protected finishFileUpload_args getEmptyArgsInstance() { + return new finishFileUpload_args(); + } + + protected finishFileUpload_result getResult(I iface, finishFileUpload_args args) throws org.apache.thrift.TException { + finishFileUpload_result result = new finishFileUpload_result(); + iface.finishFileUpload(args.location); + return result; + } } - private class beginFileDownload implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - beginFileDownload_args args = new beginFileDownload_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("beginFileDownload", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - beginFileDownload_result result = new beginFileDownload_result(); - result.success = iface_.beginFileDownload(args.file); - oprot.writeMessageBegin(new TMessage("beginFileDownload", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + private static class beginFileDownload extends org.apache.thrift.ProcessFunction { + public beginFileDownload() { + super("beginFileDownload"); + } + + protected beginFileDownload_args getEmptyArgsInstance() { + return new beginFileDownload_args(); } + protected beginFileDownload_result getResult(I iface, beginFileDownload_args args) throws org.apache.thrift.TException { + beginFileDownload_result result = new beginFileDownload_result(); + result.success = iface.beginFileDownload(args.file); + return result; + } } - private class downloadChunk implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - downloadChunk_args args = new downloadChunk_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("downloadChunk", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - downloadChunk_result result = new downloadChunk_result(); - result.success = iface_.downloadChunk(args.id); - oprot.writeMessageBegin(new TMessage("downloadChunk", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + private static class downloadChunk extends org.apache.thrift.ProcessFunction { + public downloadChunk() { + super("downloadChunk"); } + protected downloadChunk_args getEmptyArgsInstance() { + return new downloadChunk_args(); + } + + protected downloadChunk_result getResult(I iface, downloadChunk_args args) throws org.apache.thrift.TException { + downloadChunk_result result = new downloadChunk_result(); + result.success = iface.downloadChunk(args.id); + return result; + } } - private class getClusterInfo implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - getClusterInfo_args args = new getClusterInfo_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("getClusterInfo", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); - getClusterInfo_result result = new getClusterInfo_result(); - result.success = iface_.getClusterInfo(); - oprot.writeMessageBegin(new TMessage("getClusterInfo", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + private static class getClusterInfo extends org.apache.thrift.ProcessFunction { + public getClusterInfo() { + super("getClusterInfo"); + } + + protected getClusterInfo_args getEmptyArgsInstance() { + return new getClusterInfo_args(); } + protected getClusterInfo_result getResult(I iface, getClusterInfo_args args) throws org.apache.thrift.TException { + getClusterInfo_result result = new getClusterInfo_result(); + result.success = iface.getClusterInfo(); + return result; + } } - private class getTopologyInfo implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - getTopologyInfo_args args = new getTopologyInfo_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("getTopologyInfo", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); + private static class getTopologyInfo extends org.apache.thrift.ProcessFunction { + public getTopologyInfo() { + super("getTopologyInfo"); + } + + protected getTopologyInfo_args getEmptyArgsInstance() { + return new getTopologyInfo_args(); + } + + protected getTopologyInfo_result getResult(I iface, getTopologyInfo_args args) throws org.apache.thrift.TException { getTopologyInfo_result result = new getTopologyInfo_result(); try { - result.success = iface_.getTopologyInfo(args.id); + result.success = iface.getTopologyInfo(args.id); } catch (NotAliveException e) { result.e = e; - } catch (Throwable th) { - LOGGER.error("Internal error processing getTopologyInfo", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTopologyInfo"); - oprot.writeMessageBegin(new TMessage("getTopologyInfo", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; } - oprot.writeMessageBegin(new TMessage("getTopologyInfo", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + return result; } - } - private class getTopologyConf implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - getTopologyConf_args args = new getTopologyConf_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("getTopologyConf", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); + private static class getTopologyConf extends org.apache.thrift.ProcessFunction { + public getTopologyConf() { + super("getTopologyConf"); + } + + protected getTopologyConf_args getEmptyArgsInstance() { + return new getTopologyConf_args(); + } + + protected getTopologyConf_result getResult(I iface, getTopologyConf_args args) throws org.apache.thrift.TException { getTopologyConf_result result = new getTopologyConf_result(); try { - result.success = iface_.getTopologyConf(args.id); + result.success = iface.getTopologyConf(args.id); } catch (NotAliveException e) { result.e = e; - } catch (Throwable th) { - LOGGER.error("Internal error processing getTopologyConf", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTopologyConf"); - oprot.writeMessageBegin(new TMessage("getTopologyConf", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; } - oprot.writeMessageBegin(new TMessage("getTopologyConf", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + return result; } - } - private class getTopology implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - getTopology_args args = new getTopology_args(); - try { - args.read(iprot); - } catch (TProtocolException e) { - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); - oprot.writeMessageBegin(new TMessage("getTopology", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - iprot.readMessageEnd(); + private static class getTopology extends org.apache.thrift.ProcessFunction { + public getTopology() { + super("getTopology"); + } + + protected getTopology_args getEmptyArgsInstance() { + return new getTopology_args(); + } + + protected getTopology_result getResult(I iface, getTopology_args args) throws org.apache.thrift.TException { getTopology_result result = new getTopology_result(); try { - result.success = iface_.getTopology(args.id); + result.success = iface.getTopology(args.id); } catch (NotAliveException e) { result.e = e; - } catch (Throwable th) { - LOGGER.error("Internal error processing getTopology", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTopology"); - oprot.writeMessageBegin(new TMessage("getTopology", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; } - oprot.writeMessageBegin(new TMessage("getTopology", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + return result; } - } } - public static class submitTopology_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("submitTopology_args"); + public static class submitTopology_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitTopology_args"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); - private static final TField UPLOADED_JAR_LOCATION_FIELD_DESC = new TField("uploadedJarLocation", TType.STRING, (short)2); - private static final TField JSON_CONF_FIELD_DESC = new TField("jsonConf", TType.STRING, (short)3); - private static final TField TOPOLOGY_FIELD_DESC = new TField("topology", TType.STRUCT, (short)4); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField UPLOADED_JAR_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadedJarLocation", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField JSON_CONF_FIELD_DESC = new org.apache.thrift.protocol.TField("jsonConf", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TOPOLOGY_FIELD_DESC = new org.apache.thrift.protocol.TField("topology", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private String name; - private String uploadedJarLocation; - private String jsonConf; - private StormTopology topology; + private String name; // required + private String uploadedJarLocation; // required + private String jsonConf; // required + private StormTopology topology; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { NAME((short)1, "name"), UPLOADED_JAR_LOCATION((short)2, "uploadedJarLocation"), JSON_CONF((short)3, "jsonConf"), @@ -1363,19 +1041,19 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.UPLOADED_JAR_LOCATION, new FieldMetaData("uploadedJarLocation", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.JSON_CONF, new FieldMetaData("jsonConf", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TOPOLOGY, new FieldMetaData("topology", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, StormTopology.class))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.UPLOADED_JAR_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("uploadedJarLocation", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.JSON_CONF, new org.apache.thrift.meta_data.FieldMetaData("jsonConf", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TOPOLOGY, new org.apache.thrift.meta_data.FieldMetaData("topology", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StormTopology.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(submitTopology_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitTopology_args.class, metaDataMap); } public submitTopology_args() { @@ -1416,9 +1094,12 @@ public submitTopology_args deepCopy() { return new submitTopology_args(this); } - @Deprecated - public submitTopology_args clone() { - return new submitTopology_args(this); + @Override + public void clear() { + this.name = null; + this.uploadedJarLocation = null; + this.jsonConf = null; + this.topology = null; } public String get_name() { @@ -1433,7 +1114,7 @@ public void unset_name() { this.name = null; } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ + /** Returns true if field name is set (has been assigned a value) and false otherwise */ public boolean is_set_name() { return this.name != null; } @@ -1456,7 +1137,7 @@ public void unset_uploadedJarLocation() { this.uploadedJarLocation = null; } - /** Returns true if field uploadedJarLocation is set (has been asigned a value) and false otherwise */ + /** Returns true if field uploadedJarLocation is set (has been assigned a value) and false otherwise */ public boolean is_set_uploadedJarLocation() { return this.uploadedJarLocation != null; } @@ -1479,7 +1160,7 @@ public void unset_jsonConf() { this.jsonConf = null; } - /** Returns true if field jsonConf is set (has been asigned a value) and false otherwise */ + /** Returns true if field jsonConf is set (has been assigned a value) and false otherwise */ public boolean is_set_jsonConf() { return this.jsonConf != null; } @@ -1502,7 +1183,7 @@ public void unset_topology() { this.topology = null; } - /** Returns true if field topology is set (has been asigned a value) and false otherwise */ + /** Returns true if field topology is set (has been assigned a value) and false otherwise */ public boolean is_set_topology() { return this.topology != null; } @@ -1550,10 +1231,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case NAME: @@ -1572,12 +1249,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case NAME: return is_set_name(); @@ -1591,10 +1268,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -1686,7 +1359,8 @@ public int compareTo(submitTopology_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_name()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (is_set_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } @@ -1695,7 +1369,8 @@ public int compareTo(submitTopology_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_uploadedJarLocation()) { lastComparison = TBaseHelper.compareTo(this.uploadedJarLocation, typedOther.uploadedJarLocation); + if (is_set_uploadedJarLocation()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploadedJarLocation, typedOther.uploadedJarLocation); if (lastComparison != 0) { return lastComparison; } @@ -1704,7 +1379,8 @@ public int compareTo(submitTopology_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_jsonConf()) { lastComparison = TBaseHelper.compareTo(this.jsonConf, typedOther.jsonConf); + if (is_set_jsonConf()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jsonConf, typedOther.jsonConf); if (lastComparison != 0) { return lastComparison; } @@ -1713,7 +1389,8 @@ public int compareTo(submitTopology_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_topology()) { lastComparison = TBaseHelper.compareTo(this.topology, typedOther.topology); + if (is_set_topology()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.topology, typedOther.topology); if (lastComparison != 0) { return lastComparison; } @@ -1721,47 +1398,51 @@ public int compareTo(submitTopology_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NAME - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UPLOADED_JAR_LOCATION - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.uploadedJarLocation = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // JSON_CONF - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.jsonConf = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // TOPOLOGY - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.topology = new StormTopology(); this.topology.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -1769,7 +1450,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -1837,23 +1518,39 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class submitTopology_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("submitTopology_result"); + public static class submitTopology_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitTopology_result"); - private static final TField E_FIELD_DESC = new TField("e", TType.STRUCT, (short)1); - private static final TField ITE_FIELD_DESC = new TField("ite", TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField ITE_FIELD_DESC = new org.apache.thrift.protocol.TField("ite", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private AlreadyAliveException e; - private InvalidTopologyException ite; + private AlreadyAliveException e; // required + private InvalidTopologyException ite; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"), ITE((short)2, "ite"); @@ -1915,15 +1612,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.E, new FieldMetaData("e", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - tmpMap.put(_Fields.ITE, new FieldMetaData("ite", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.ITE, new org.apache.thrift.meta_data.FieldMetaData("ite", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(submitTopology_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitTopology_result.class, metaDataMap); } public submitTopology_result() { @@ -1954,9 +1651,10 @@ public submitTopology_result deepCopy() { return new submitTopology_result(this); } - @Deprecated - public submitTopology_result clone() { - return new submitTopology_result(this); + @Override + public void clear() { + this.e = null; + this.ite = null; } public AlreadyAliveException get_e() { @@ -1971,7 +1669,7 @@ public void unset_e() { this.e = null; } - /** Returns true if field e is set (has been asigned a value) and false otherwise */ + /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean is_set_e() { return this.e != null; } @@ -1994,7 +1692,7 @@ public void unset_ite() { this.ite = null; } - /** Returns true if field ite is set (has been asigned a value) and false otherwise */ + /** Returns true if field ite is set (has been assigned a value) and false otherwise */ public boolean is_set_ite() { return this.ite != null; } @@ -2026,10 +1724,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case E: @@ -2042,12 +1736,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case E: return is_set_e(); @@ -2057,10 +1751,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -2124,7 +1814,8 @@ public int compareTo(submitTopology_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_e()) { lastComparison = TBaseHelper.compareTo(this.e, typedOther.e); + if (is_set_e()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } @@ -2133,7 +1824,8 @@ public int compareTo(submitTopology_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_ite()) { lastComparison = TBaseHelper.compareTo(this.ite, typedOther.ite); + if (is_set_ite()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ite, typedOther.ite); if (lastComparison != 0) { return lastComparison; } @@ -2141,34 +1833,38 @@ public int compareTo(submitTopology_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // E - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new AlreadyAliveException(); this.e.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // ITE - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.ite = new InvalidTopologyException(); this.ite.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -2176,7 +1872,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_e()) { @@ -2216,21 +1912,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class killTopology_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("killTopology_args"); + public static class killTopology_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("killTopology_args"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); - private String name; + private String name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { NAME((short)1, "name"); private static final Map byName = new HashMap(); @@ -2289,13 +2001,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(killTopology_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(killTopology_args.class, metaDataMap); } public killTopology_args() { @@ -2321,9 +2033,9 @@ public killTopology_args deepCopy() { return new killTopology_args(this); } - @Deprecated - public killTopology_args clone() { - return new killTopology_args(this); + @Override + public void clear() { + this.name = null; } public String get_name() { @@ -2338,7 +2050,7 @@ public void unset_name() { this.name = null; } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ + /** Returns true if field name is set (has been assigned a value) and false otherwise */ public boolean is_set_name() { return this.name != null; } @@ -2362,10 +2074,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case NAME: @@ -2375,12 +2083,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case NAME: return is_set_name(); @@ -2388,10 +2096,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -2441,7 +2145,8 @@ public int compareTo(killTopology_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_name()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (is_set_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } @@ -2449,25 +2154,29 @@ public int compareTo(killTopology_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // NAME - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -2475,7 +2184,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -2504,21 +2213,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class killTopology_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("killTopology_result"); + public static class killTopology_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("killTopology_result"); - private static final TField E_FIELD_DESC = new TField("e", TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private NotAliveException e; + private NotAliveException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); private static final Map byName = new HashMap(); @@ -2577,13 +2302,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.E, new FieldMetaData("e", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(killTopology_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(killTopology_result.class, metaDataMap); } public killTopology_result() { @@ -2609,9 +2334,9 @@ public killTopology_result deepCopy() { return new killTopology_result(this); } - @Deprecated - public killTopology_result clone() { - return new killTopology_result(this); + @Override + public void clear() { + this.e = null; } public NotAliveException get_e() { @@ -2626,7 +2351,7 @@ public void unset_e() { this.e = null; } - /** Returns true if field e is set (has been asigned a value) and false otherwise */ + /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean is_set_e() { return this.e != null; } @@ -2650,10 +2375,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case E: @@ -2663,12 +2384,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case E: return is_set_e(); @@ -2676,10 +2397,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -2729,7 +2446,8 @@ public int compareTo(killTopology_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_e()) { lastComparison = TBaseHelper.compareTo(this.e, typedOther.e); + if (is_set_e()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } @@ -2737,26 +2455,30 @@ public int compareTo(killTopology_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // E - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new NotAliveException(); this.e.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -2764,7 +2486,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_e()) { @@ -2792,19 +2514,35 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class beginFileUpload_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("beginFileUpload_args"); + public static class beginFileUpload_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginFileUpload_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); @@ -2858,11 +2596,11 @@ public String getFieldName() { return _fieldName; } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(beginFileUpload_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFileUpload_args.class, metaDataMap); } public beginFileUpload_args() { @@ -2878,9 +2616,8 @@ public beginFileUpload_args deepCopy() { return new beginFileUpload_args(this); } - @Deprecated - public beginFileUpload_args clone() { - return new beginFileUpload_args(this); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { @@ -2888,31 +2625,23 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { } throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -2947,18 +2676,22 @@ public int compareTo(beginFileUpload_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -2966,7 +2699,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -2983,21 +2716,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class beginFileUpload_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("beginFileUpload_result"); + public static class beginFileUpload_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginFileUpload_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); - private String success; + private String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -3056,13 +2805,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(beginFileUpload_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFileUpload_result.class, metaDataMap); } public beginFileUpload_result() { @@ -3088,9 +2837,9 @@ public beginFileUpload_result deepCopy() { return new beginFileUpload_result(this); } - @Deprecated - public beginFileUpload_result clone() { - return new beginFileUpload_result(this); + @Override + public void clear() { + this.success = null; } public String get_success() { @@ -3105,7 +2854,7 @@ public void unset_success() { this.success = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ + /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } @@ -3129,10 +2878,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -3142,12 +2887,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUCCESS: return is_set_success(); @@ -3155,10 +2900,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3208,7 +2949,8 @@ public int compareTo(beginFileUpload_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_success()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (is_set_success()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -3216,25 +2958,29 @@ public int compareTo(beginFileUpload_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -3242,7 +2988,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { @@ -3270,23 +3016,39 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class uploadChunk_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("uploadChunk_args"); + public static class uploadChunk_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("uploadChunk_args"); - private static final TField LOCATION_FIELD_DESC = new TField("location", TType.STRING, (short)1); - private static final TField CHUNK_FIELD_DESC = new TField("chunk", TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField CHUNK_FIELD_DESC = new org.apache.thrift.protocol.TField("chunk", org.apache.thrift.protocol.TType.STRING, (short)2); - private String location; - private byte[] chunk; + private String location; // required + private ByteBuffer chunk; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { LOCATION((short)1, "location"), CHUNK((short)2, "chunk"); @@ -3348,15 +3110,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.LOCATION, new FieldMetaData("location", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.CHUNK, new FieldMetaData("chunk", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CHUNK, new org.apache.thrift.meta_data.FieldMetaData("chunk", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(uploadChunk_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_args.class, metaDataMap); } public uploadChunk_args() { @@ -3364,7 +3126,7 @@ public uploadChunk_args() { public uploadChunk_args( String location, - byte[] chunk) + ByteBuffer chunk) { this(); this.location = location; @@ -3379,8 +3141,8 @@ public uploadChunk_args(uploadChunk_args other) { this.location = other.location; } if (other.is_set_chunk()) { - this.chunk = new byte[other.chunk.length]; - System.arraycopy(other.chunk, 0, chunk, 0, other.chunk.length); + this.chunk = org.apache.thrift.TBaseHelper.copyBinary(other.chunk); +; } } @@ -3388,9 +3150,10 @@ public uploadChunk_args deepCopy() { return new uploadChunk_args(this); } - @Deprecated - public uploadChunk_args clone() { - return new uploadChunk_args(this); + @Override + public void clear() { + this.location = null; + this.chunk = null; } public String get_location() { @@ -3405,7 +3168,7 @@ public void unset_location() { this.location = null; } - /** Returns true if field location is set (has been asigned a value) and false otherwise */ + /** Returns true if field location is set (has been assigned a value) and false otherwise */ public boolean is_set_location() { return this.location != null; } @@ -3417,10 +3180,19 @@ public void set_location_isSet(boolean value) { } public byte[] get_chunk() { - return this.chunk; + set_chunk(org.apache.thrift.TBaseHelper.rightSize(chunk)); + return chunk == null ? null : chunk.array(); + } + + public ByteBuffer buffer_for_chunk() { + return chunk; } public void set_chunk(byte[] chunk) { + set_chunk(chunk == null ? (ByteBuffer)null : ByteBuffer.wrap(chunk)); + } + + public void set_chunk(ByteBuffer chunk) { this.chunk = chunk; } @@ -3428,7 +3200,7 @@ public void unset_chunk() { this.chunk = null; } - /** Returns true if field chunk is set (has been asigned a value) and false otherwise */ + /** Returns true if field chunk is set (has been assigned a value) and false otherwise */ public boolean is_set_chunk() { return this.chunk != null; } @@ -3453,17 +3225,13 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unset_chunk(); } else { - set_chunk((byte[])value); + set_chunk((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case LOCATION: @@ -3476,12 +3244,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case LOCATION: return is_set_location(); @@ -3491,10 +3259,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3522,7 +3286,7 @@ public boolean equals(uploadChunk_args that) { if (this_present_chunk || that_present_chunk) { if (!(this_present_chunk && that_present_chunk)) return false; - if (!java.util.Arrays.equals(this.chunk, that.chunk)) + if (!this.chunk.equals(that.chunk)) return false; } @@ -3558,7 +3322,8 @@ public int compareTo(uploadChunk_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_location()) { lastComparison = TBaseHelper.compareTo(this.location, typedOther.location); + if (is_set_location()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, typedOther.location); if (lastComparison != 0) { return lastComparison; } @@ -3567,7 +3332,8 @@ public int compareTo(uploadChunk_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_chunk()) { lastComparison = TBaseHelper.compareTo(this.chunk, typedOther.chunk); + if (is_set_chunk()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.chunk, typedOther.chunk); if (lastComparison != 0) { return lastComparison; } @@ -3575,32 +3341,36 @@ public int compareTo(uploadChunk_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // LOCATION - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.location = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // CHUNK - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.chunk = iprot.readBinary(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -3608,7 +3378,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -3643,31 +3413,42 @@ public String toString() { if (this.chunk == null) { sb.append("null"); } else { - int __chunk_size = Math.min(this.chunk.length, 128); - for (int i = 0; i < __chunk_size; i++) { - if (i != 0) sb.append(" "); - sb.append(Integer.toHexString(this.chunk[i]).length() > 1 ? Integer.toHexString(this.chunk[i]).substring(Integer.toHexString(this.chunk[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.chunk[i]).toUpperCase()); - } - if (this.chunk.length > 128) sb.append(" ..."); + org.apache.thrift.TBaseHelper.toString(this.chunk, sb); } first = false; sb.append(")"); return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class uploadChunk_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("uploadChunk_result"); + public static class uploadChunk_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("uploadChunk_result"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); @@ -3721,11 +3502,11 @@ public String getFieldName() { return _fieldName; } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(uploadChunk_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_result.class, metaDataMap); } public uploadChunk_result() { @@ -3741,9 +3522,8 @@ public uploadChunk_result deepCopy() { return new uploadChunk_result(this); } - @Deprecated - public uploadChunk_result clone() { - return new uploadChunk_result(this); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { @@ -3751,31 +3531,23 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { } throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -3810,18 +3582,22 @@ public int compareTo(uploadChunk_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -3829,7 +3605,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); @@ -3845,21 +3621,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class finishFileUpload_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("finishFileUpload_args"); + public static class finishFileUpload_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("finishFileUpload_args"); - private static final TField LOCATION_FIELD_DESC = new TField("location", TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)1); - private String location; + private String location; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { LOCATION((short)1, "location"); private static final Map byName = new HashMap(); @@ -3918,13 +3710,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.LOCATION, new FieldMetaData("location", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(finishFileUpload_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_args.class, metaDataMap); } public finishFileUpload_args() { @@ -3950,9 +3742,9 @@ public finishFileUpload_args deepCopy() { return new finishFileUpload_args(this); } - @Deprecated - public finishFileUpload_args clone() { - return new finishFileUpload_args(this); + @Override + public void clear() { + this.location = null; } public String get_location() { @@ -3967,7 +3759,7 @@ public void unset_location() { this.location = null; } - /** Returns true if field location is set (has been asigned a value) and false otherwise */ + /** Returns true if field location is set (has been assigned a value) and false otherwise */ public boolean is_set_location() { return this.location != null; } @@ -3991,10 +3783,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case LOCATION: @@ -4004,12 +3792,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case LOCATION: return is_set_location(); @@ -4017,10 +3805,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4070,7 +3854,8 @@ public int compareTo(finishFileUpload_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_location()) { lastComparison = TBaseHelper.compareTo(this.location, typedOther.location); + if (is_set_location()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, typedOther.location); if (lastComparison != 0) { return lastComparison; } @@ -4078,25 +3863,29 @@ public int compareTo(finishFileUpload_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // LOCATION - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.location = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -4104,7 +3893,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -4133,19 +3922,35 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class finishFileUpload_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("finishFileUpload_result"); + public static class finishFileUpload_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("finishFileUpload_result"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); @@ -4199,11 +4004,11 @@ public String getFieldName() { return _fieldName; } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(finishFileUpload_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_result.class, metaDataMap); } public finishFileUpload_result() { @@ -4219,9 +4024,8 @@ public finishFileUpload_result deepCopy() { return new finishFileUpload_result(this); } - @Deprecated - public finishFileUpload_result clone() { - return new finishFileUpload_result(this); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { @@ -4229,31 +4033,23 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { } throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4288,18 +4084,22 @@ public int compareTo(finishFileUpload_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -4307,7 +4107,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); @@ -4323,21 +4123,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class beginFileDownload_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("beginFileDownload_args"); + public static class beginFileDownload_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginFileDownload_args"); - private static final TField FILE_FIELD_DESC = new TField("file", TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField FILE_FIELD_DESC = new org.apache.thrift.protocol.TField("file", org.apache.thrift.protocol.TType.STRING, (short)1); - private String file; + private String file; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { FILE((short)1, "file"); private static final Map byName = new HashMap(); @@ -4396,13 +4212,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FILE, new FieldMetaData("file", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FILE, new org.apache.thrift.meta_data.FieldMetaData("file", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(beginFileDownload_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_args.class, metaDataMap); } public beginFileDownload_args() { @@ -4428,9 +4244,9 @@ public beginFileDownload_args deepCopy() { return new beginFileDownload_args(this); } - @Deprecated - public beginFileDownload_args clone() { - return new beginFileDownload_args(this); + @Override + public void clear() { + this.file = null; } public String get_file() { @@ -4445,7 +4261,7 @@ public void unset_file() { this.file = null; } - /** Returns true if field file is set (has been asigned a value) and false otherwise */ + /** Returns true if field file is set (has been assigned a value) and false otherwise */ public boolean is_set_file() { return this.file != null; } @@ -4469,10 +4285,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case FILE: @@ -4482,12 +4294,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case FILE: return is_set_file(); @@ -4495,10 +4307,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4548,7 +4356,8 @@ public int compareTo(beginFileDownload_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_file()) { lastComparison = TBaseHelper.compareTo(this.file, typedOther.file); + if (is_set_file()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file, typedOther.file); if (lastComparison != 0) { return lastComparison; } @@ -4556,25 +4365,29 @@ public int compareTo(beginFileDownload_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // FILE - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.file = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -4582,7 +4395,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -4611,21 +4424,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class beginFileDownload_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("beginFileDownload_result"); + public static class beginFileDownload_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("beginFileDownload_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); - private String success; + private String success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -4684,13 +4513,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(beginFileDownload_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_result.class, metaDataMap); } public beginFileDownload_result() { @@ -4716,9 +4545,9 @@ public beginFileDownload_result deepCopy() { return new beginFileDownload_result(this); } - @Deprecated - public beginFileDownload_result clone() { - return new beginFileDownload_result(this); + @Override + public void clear() { + this.success = null; } public String get_success() { @@ -4733,7 +4562,7 @@ public void unset_success() { this.success = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ + /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } @@ -4757,10 +4586,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -4770,12 +4595,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUCCESS: return is_set_success(); @@ -4783,10 +4608,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -4836,7 +4657,8 @@ public int compareTo(beginFileDownload_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_success()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (is_set_success()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -4844,25 +4666,29 @@ public int compareTo(beginFileDownload_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -4870,7 +4696,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { @@ -4898,21 +4724,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class downloadChunk_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("downloadChunk_args"); + public static class downloadChunk_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("downloadChunk_args"); - private static final TField ID_FIELD_DESC = new TField("id", TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - private String id; + private String id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"); private static final Map byName = new HashMap(); @@ -4971,13 +4813,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(downloadChunk_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(downloadChunk_args.class, metaDataMap); } public downloadChunk_args() { @@ -5003,9 +4845,9 @@ public downloadChunk_args deepCopy() { return new downloadChunk_args(this); } - @Deprecated - public downloadChunk_args clone() { - return new downloadChunk_args(this); + @Override + public void clear() { + this.id = null; } public String get_id() { @@ -5020,7 +4862,7 @@ public void unset_id() { this.id = null; } - /** Returns true if field id is set (has been asigned a value) and false otherwise */ + /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean is_set_id() { return this.id != null; } @@ -5044,10 +4886,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -5057,12 +4895,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ID: return is_set_id(); @@ -5070,10 +4908,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5123,7 +4957,8 @@ public int compareTo(downloadChunk_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_id()) { lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (is_set_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } @@ -5131,25 +4966,29 @@ public int compareTo(downloadChunk_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ID - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.id = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -5157,7 +4996,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -5186,21 +5025,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class downloadChunk_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("downloadChunk_result"); + public static class downloadChunk_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("downloadChunk_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); - private byte[] success; + private ByteBuffer success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -5259,20 +5114,20 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(downloadChunk_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(downloadChunk_result.class, metaDataMap); } public downloadChunk_result() { } public downloadChunk_result( - byte[] success) + ByteBuffer success) { this(); this.success = success; @@ -5283,8 +5138,8 @@ public downloadChunk_result( */ public downloadChunk_result(downloadChunk_result other) { if (other.is_set_success()) { - this.success = new byte[other.success.length]; - System.arraycopy(other.success, 0, success, 0, other.success.length); + this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success); +; } } @@ -5292,16 +5147,25 @@ public downloadChunk_result deepCopy() { return new downloadChunk_result(this); } - @Deprecated - public downloadChunk_result clone() { - return new downloadChunk_result(this); + @Override + public void clear() { + this.success = null; } public byte[] get_success() { - return this.success; + set_success(org.apache.thrift.TBaseHelper.rightSize(success)); + return success == null ? null : success.array(); + } + + public ByteBuffer buffer_for_success() { + return success; } public void set_success(byte[] success) { + set_success(success == null ? (ByteBuffer)null : ByteBuffer.wrap(success)); + } + + public void set_success(ByteBuffer success) { this.success = success; } @@ -5309,7 +5173,7 @@ public void unset_success() { this.success = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ + /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } @@ -5326,17 +5190,13 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unset_success(); } else { - set_success((byte[])value); + set_success((ByteBuffer)value); } break; } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -5346,12 +5206,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUCCESS: return is_set_success(); @@ -5359,10 +5219,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5381,7 +5237,7 @@ public boolean equals(downloadChunk_result that) { if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!java.util.Arrays.equals(this.success, that.success)) + if (!this.success.equals(that.success)) return false; } @@ -5412,7 +5268,8 @@ public int compareTo(downloadChunk_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_success()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (is_set_success()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -5420,25 +5277,29 @@ public int compareTo(downloadChunk_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readBinary(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -5446,7 +5307,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { @@ -5467,31 +5328,42 @@ public String toString() { if (this.success == null) { sb.append("null"); } else { - int __success_size = Math.min(this.success.length, 128); - for (int i = 0; i < __success_size; i++) { - if (i != 0) sb.append(" "); - sb.append(Integer.toHexString(this.success[i]).length() > 1 ? Integer.toHexString(this.success[i]).substring(Integer.toHexString(this.success[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.success[i]).toUpperCase()); - } - if (this.success.length > 128) sb.append(" ..."); + org.apache.thrift.TBaseHelper.toString(this.success, sb); } first = false; sb.append(")"); return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class getClusterInfo_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("getClusterInfo_args"); + public static class getClusterInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getClusterInfo_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); @@ -5545,11 +5417,11 @@ public String getFieldName() { return _fieldName; } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(getClusterInfo_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getClusterInfo_args.class, metaDataMap); } public getClusterInfo_args() { @@ -5565,9 +5437,8 @@ public getClusterInfo_args deepCopy() { return new getClusterInfo_args(this); } - @Deprecated - public getClusterInfo_args clone() { - return new getClusterInfo_args(this); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { @@ -5575,31 +5446,23 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { } throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5634,18 +5497,22 @@ public int compareTo(getClusterInfo_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -5653,7 +5520,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -5670,21 +5537,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class getClusterInfo_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("getClusterInfo_result"); + public static class getClusterInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getClusterInfo_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private ClusterSummary success; + private ClusterSummary success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -5743,13 +5626,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, ClusterSummary.class))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClusterSummary.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(getClusterInfo_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getClusterInfo_result.class, metaDataMap); } public getClusterInfo_result() { @@ -5775,9 +5658,9 @@ public getClusterInfo_result deepCopy() { return new getClusterInfo_result(this); } - @Deprecated - public getClusterInfo_result clone() { - return new getClusterInfo_result(this); + @Override + public void clear() { + this.success = null; } public ClusterSummary get_success() { @@ -5792,7 +5675,7 @@ public void unset_success() { this.success = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ + /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } @@ -5816,10 +5699,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -5829,12 +5708,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUCCESS: return is_set_success(); @@ -5842,10 +5721,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -5895,7 +5770,8 @@ public int compareTo(getClusterInfo_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_success()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (is_set_success()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -5903,26 +5779,30 @@ public int compareTo(getClusterInfo_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new ClusterSummary(); this.success.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -5930,7 +5810,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { @@ -5958,21 +5838,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class getTopologyInfo_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("getTopologyInfo_args"); + public static class getTopologyInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTopologyInfo_args"); - private static final TField ID_FIELD_DESC = new TField("id", TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - private String id; + private String id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"); private static final Map byName = new HashMap(); @@ -6031,13 +5927,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(getTopologyInfo_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyInfo_args.class, metaDataMap); } public getTopologyInfo_args() { @@ -6063,9 +5959,9 @@ public getTopologyInfo_args deepCopy() { return new getTopologyInfo_args(this); } - @Deprecated - public getTopologyInfo_args clone() { - return new getTopologyInfo_args(this); + @Override + public void clear() { + this.id = null; } public String get_id() { @@ -6080,7 +5976,7 @@ public void unset_id() { this.id = null; } - /** Returns true if field id is set (has been asigned a value) and false otherwise */ + /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean is_set_id() { return this.id != null; } @@ -6104,10 +6000,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -6117,12 +6009,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ID: return is_set_id(); @@ -6130,10 +6022,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6183,7 +6071,8 @@ public int compareTo(getTopologyInfo_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_id()) { lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (is_set_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } @@ -6191,25 +6080,29 @@ public int compareTo(getTopologyInfo_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ID - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.id = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -6217,7 +6110,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -6246,23 +6139,39 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class getTopologyInfo_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("getTopologyInfo_result"); + public static class getTopologyInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTopologyInfo_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField E_FIELD_DESC = new TField("e", TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private TopologyInfo success; - private NotAliveException e; + private TopologyInfo success; // required + private NotAliveException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); @@ -6324,15 +6233,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, TopologyInfo.class))); - tmpMap.put(_Fields.E, new FieldMetaData("e", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TopologyInfo.class))); + tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(getTopologyInfo_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyInfo_result.class, metaDataMap); } public getTopologyInfo_result() { @@ -6363,9 +6272,10 @@ public getTopologyInfo_result deepCopy() { return new getTopologyInfo_result(this); } - @Deprecated - public getTopologyInfo_result clone() { - return new getTopologyInfo_result(this); + @Override + public void clear() { + this.success = null; + this.e = null; } public TopologyInfo get_success() { @@ -6380,7 +6290,7 @@ public void unset_success() { this.success = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ + /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } @@ -6403,7 +6313,7 @@ public void unset_e() { this.e = null; } - /** Returns true if field e is set (has been asigned a value) and false otherwise */ + /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean is_set_e() { return this.e != null; } @@ -6435,10 +6345,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -6451,12 +6357,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUCCESS: return is_set_success(); @@ -6466,10 +6372,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6533,7 +6435,8 @@ public int compareTo(getTopologyInfo_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_success()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (is_set_success()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -6542,7 +6445,8 @@ public int compareTo(getTopologyInfo_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_e()) { lastComparison = TBaseHelper.compareTo(this.e, typedOther.e); + if (is_set_e()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } @@ -6550,34 +6454,38 @@ public int compareTo(getTopologyInfo_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new TopologyInfo(); this.success.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new NotAliveException(); this.e.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -6585,7 +6493,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { @@ -6625,21 +6533,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class getTopologyConf_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("getTopologyConf_args"); + public static class getTopologyConf_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTopologyConf_args"); - private static final TField ID_FIELD_DESC = new TField("id", TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - private String id; + private String id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"); private static final Map byName = new HashMap(); @@ -6698,13 +6622,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(getTopologyConf_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyConf_args.class, metaDataMap); } public getTopologyConf_args() { @@ -6730,9 +6654,9 @@ public getTopologyConf_args deepCopy() { return new getTopologyConf_args(this); } - @Deprecated - public getTopologyConf_args clone() { - return new getTopologyConf_args(this); + @Override + public void clear() { + this.id = null; } public String get_id() { @@ -6747,7 +6671,7 @@ public void unset_id() { this.id = null; } - /** Returns true if field id is set (has been asigned a value) and false otherwise */ + /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean is_set_id() { return this.id != null; } @@ -6771,10 +6695,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -6784,12 +6704,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ID: return is_set_id(); @@ -6797,10 +6717,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -6850,7 +6766,8 @@ public int compareTo(getTopologyConf_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_id()) { lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (is_set_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } @@ -6858,25 +6775,29 @@ public int compareTo(getTopologyConf_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ID - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.id = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -6884,7 +6805,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -6913,23 +6834,39 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class getTopologyConf_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("getTopologyConf_result"); + public static class getTopologyConf_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTopologyConf_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); - private static final TField E_FIELD_DESC = new TField("e", TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private String success; - private NotAliveException e; + private String success; // required + private NotAliveException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); @@ -6991,15 +6928,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.E, new FieldMetaData("e", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(getTopologyConf_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTopologyConf_result.class, metaDataMap); } public getTopologyConf_result() { @@ -7030,9 +6967,10 @@ public getTopologyConf_result deepCopy() { return new getTopologyConf_result(this); } - @Deprecated - public getTopologyConf_result clone() { - return new getTopologyConf_result(this); + @Override + public void clear() { + this.success = null; + this.e = null; } public String get_success() { @@ -7047,7 +6985,7 @@ public void unset_success() { this.success = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ + /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } @@ -7070,7 +7008,7 @@ public void unset_e() { this.e = null; } - /** Returns true if field e is set (has been asigned a value) and false otherwise */ + /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean is_set_e() { return this.e != null; } @@ -7102,10 +7040,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -7118,12 +7052,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUCCESS: return is_set_success(); @@ -7133,10 +7067,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -7200,7 +7130,8 @@ public int compareTo(getTopologyConf_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_success()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (is_set_success()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -7209,7 +7140,8 @@ public int compareTo(getTopologyConf_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_e()) { lastComparison = TBaseHelper.compareTo(this.e, typedOther.e); + if (is_set_e()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } @@ -7217,33 +7149,37 @@ public int compareTo(getTopologyConf_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.success = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new NotAliveException(); this.e.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -7251,7 +7187,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { @@ -7291,21 +7227,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class getTopology_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("getTopology_args"); + public static class getTopology_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTopology_args"); - private static final TField ID_FIELD_DESC = new TField("id", TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - private String id; + private String id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"); private static final Map byName = new HashMap(); @@ -7364,13 +7316,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(getTopology_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTopology_args.class, metaDataMap); } public getTopology_args() { @@ -7396,9 +7348,9 @@ public getTopology_args deepCopy() { return new getTopology_args(this); } - @Deprecated - public getTopology_args clone() { - return new getTopology_args(this); + @Override + public void clear() { + this.id = null; } public String get_id() { @@ -7413,7 +7365,7 @@ public void unset_id() { this.id = null; } - /** Returns true if field id is set (has been asigned a value) and false otherwise */ + /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean is_set_id() { return this.id != null; } @@ -7437,10 +7389,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -7450,12 +7398,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ID: return is_set_id(); @@ -7463,10 +7411,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -7516,7 +7460,8 @@ public int compareTo(getTopology_args other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_id()) { lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (is_set_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } @@ -7524,25 +7469,29 @@ public int compareTo(getTopology_args other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ID - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.id = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -7550,7 +7499,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -7579,23 +7528,39 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } - public static class getTopology_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("getTopology_result"); + public static class getTopology_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTopology_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField E_FIELD_DESC = new TField("e", TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private StormTopology success; - private NotAliveException e; + private StormTopology success; // required + private NotAliveException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); @@ -7657,15 +7622,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, StormTopology.class))); - tmpMap.put(_Fields.E, new FieldMetaData("e", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StormTopology.class))); + tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(getTopology_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTopology_result.class, metaDataMap); } public getTopology_result() { @@ -7696,9 +7661,10 @@ public getTopology_result deepCopy() { return new getTopology_result(this); } - @Deprecated - public getTopology_result clone() { - return new getTopology_result(this); + @Override + public void clear() { + this.success = null; + this.e = null; } public StormTopology get_success() { @@ -7713,7 +7679,7 @@ public void unset_success() { this.success = null; } - /** Returns true if field success is set (has been asigned a value) and false otherwise */ + /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } @@ -7736,7 +7702,7 @@ public void unset_e() { this.e = null; } - /** Returns true if field e is set (has been asigned a value) and false otherwise */ + /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean is_set_e() { return this.e != null; } @@ -7768,10 +7734,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: @@ -7784,12 +7746,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SUCCESS: return is_set_success(); @@ -7799,10 +7761,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -7866,7 +7824,8 @@ public int compareTo(getTopology_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_success()) { lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (is_set_success()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -7875,7 +7834,8 @@ public int compareTo(getTopology_result other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_e()) { lastComparison = TBaseHelper.compareTo(this.e, typedOther.e); + if (is_set_e()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } @@ -7883,34 +7843,38 @@ public int compareTo(getTopology_result other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.success = new StormTopology(); this.success.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 1: // E - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.e = new NotAliveException(); this.e.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -7918,7 +7882,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { @@ -7958,10 +7922,26 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } } diff --git a/src/jvm/backtype/storm/generated/NotAliveException.java b/src/jvm/backtype/storm/generated/NotAliveException.java index 3252b9445..bc7be8a1e 100644 --- a/src/jvm/backtype/storm/generated/NotAliveException.java +++ b/src/jvm/backtype/storm/generated/NotAliveException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,25 +16,20 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class NotAliveException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotAliveException"); -public class NotAliveException extends Exception implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new 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 TField MSG_FIELD_DESC = new TField("msg", TType.STRING, (short)1); - - private String msg; + private String msg; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { MSG((short)1, "msg"); private static final Map byName = new HashMap(); @@ -93,13 +88,13 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.MSG, new FieldMetaData("msg", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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); - FieldMetaData.addStructMetaDataMap(NotAliveException.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotAliveException.class, metaDataMap); } public NotAliveException() { @@ -125,9 +120,9 @@ public NotAliveException deepCopy() { return new NotAliveException(this); } - @Deprecated - public NotAliveException clone() { - return new NotAliveException(this); + @Override + public void clear() { + this.msg = null; } public String get_msg() { @@ -142,7 +137,7 @@ public void unset_msg() { this.msg = null; } - /** Returns true if field msg is set (has been asigned a value) and false otherwise */ + /** Returns true if field msg is set (has been assigned a value) and false otherwise */ public boolean is_set_msg() { return this.msg != null; } @@ -166,10 +161,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case MSG: @@ -179,12 +170,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case MSG: return is_set_msg(); @@ -192,10 +183,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -245,7 +232,8 @@ public int compareTo(NotAliveException other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_msg()) { lastComparison = TBaseHelper.compareTo(this.msg, typedOther.msg); + if (is_set_msg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.msg, typedOther.msg); if (lastComparison != 0) { return lastComparison; } @@ -253,25 +241,29 @@ public int compareTo(NotAliveException other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // MSG - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.msg = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -279,7 +271,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -308,12 +300,28 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_msg()) { - throw new TProtocolException("Required field 'msg' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'msg' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/NullStruct.java b/src/jvm/backtype/storm/generated/NullStruct.java index c54530558..fa1a6e3ec 100644 --- a/src/jvm/backtype/storm/generated/NullStruct.java +++ b/src/jvm/backtype/storm/generated/NullStruct.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,23 +16,18 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; - -public class NullStruct implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("NullStruct"); +public class NullStruct implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NullStruct"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map byName = new HashMap(); @@ -86,11 +81,11 @@ public String getFieldName() { return _fieldName; } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(NullStruct.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NullStruct.class, metaDataMap); } public NullStruct() { @@ -106,9 +101,8 @@ public NullStruct deepCopy() { return new NullStruct(this); } - @Deprecated - public NullStruct clone() { - return new NullStruct(this); + @Override + public void clear() { } public void setFieldValue(_Fields field, Object value) { @@ -116,31 +110,23 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { } throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -175,18 +161,22 @@ public int compareTo(NullStruct other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -194,7 +184,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -211,9 +201,25 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/ShellComponent.java b/src/jvm/backtype/storm/generated/ShellComponent.java index aa688932b..21f73e0e9 100644 --- a/src/jvm/backtype/storm/generated/ShellComponent.java +++ b/src/jvm/backtype/storm/generated/ShellComponent.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,27 +16,22 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class ShellComponent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShellComponent"); -public class ShellComponent implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ShellComponent"); + private static final org.apache.thrift.protocol.TField EXECUTION_COMMAND_FIELD_DESC = new org.apache.thrift.protocol.TField("execution_command", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField SCRIPT_FIELD_DESC = new org.apache.thrift.protocol.TField("script", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final TField EXECUTION_COMMAND_FIELD_DESC = new TField("execution_command", TType.STRING, (short)1); - private static final TField SCRIPT_FIELD_DESC = new TField("script", TType.STRING, (short)2); - - private String execution_command; - private String script; + private String execution_command; // required + private String script; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { EXECUTION_COMMAND((short)1, "execution_command"), SCRIPT((short)2, "script"); @@ -98,15 +93,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.EXECUTION_COMMAND, new FieldMetaData("execution_command", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.SCRIPT, new FieldMetaData("script", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.EXECUTION_COMMAND, new org.apache.thrift.meta_data.FieldMetaData("execution_command", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SCRIPT, new org.apache.thrift.meta_data.FieldMetaData("script", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(ShellComponent.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShellComponent.class, metaDataMap); } public ShellComponent() { @@ -137,9 +132,10 @@ public ShellComponent deepCopy() { return new ShellComponent(this); } - @Deprecated - public ShellComponent clone() { - return new ShellComponent(this); + @Override + public void clear() { + this.execution_command = null; + this.script = null; } public String get_execution_command() { @@ -154,7 +150,7 @@ public void unset_execution_command() { this.execution_command = null; } - /** Returns true if field execution_command is set (has been asigned a value) and false otherwise */ + /** Returns true if field execution_command is set (has been assigned a value) and false otherwise */ public boolean is_set_execution_command() { return this.execution_command != null; } @@ -177,7 +173,7 @@ public void unset_script() { this.script = null; } - /** Returns true if field script is set (has been asigned a value) and false otherwise */ + /** Returns true if field script is set (has been assigned a value) and false otherwise */ public boolean is_set_script() { return this.script != null; } @@ -209,10 +205,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case EXECUTION_COMMAND: @@ -225,12 +217,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case EXECUTION_COMMAND: return is_set_execution_command(); @@ -240,10 +232,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -307,7 +295,8 @@ public int compareTo(ShellComponent other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_execution_command()) { lastComparison = TBaseHelper.compareTo(this.execution_command, typedOther.execution_command); + if (is_set_execution_command()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.execution_command, typedOther.execution_command); if (lastComparison != 0) { return lastComparison; } @@ -316,7 +305,8 @@ public int compareTo(ShellComponent other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_script()) { lastComparison = TBaseHelper.compareTo(this.script, typedOther.script); + if (is_set_script()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.script, typedOther.script); if (lastComparison != 0) { return lastComparison; } @@ -324,32 +314,36 @@ public int compareTo(ShellComponent other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // EXECUTION_COMMAND - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.execution_command = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // SCRIPT - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.script = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -357,7 +351,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -399,9 +393,25 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/SpoutSpec.java b/src/jvm/backtype/storm/generated/SpoutSpec.java index b88fb1c25..29be5c82b 100644 --- a/src/jvm/backtype/storm/generated/SpoutSpec.java +++ b/src/jvm/backtype/storm/generated/SpoutSpec.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,29 +16,24 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class SpoutSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpoutSpec"); -public class SpoutSpec implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("SpoutSpec"); + private static final org.apache.thrift.protocol.TField SPOUT_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("spout_object", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField COMMON_FIELD_DESC = new org.apache.thrift.protocol.TField("common", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField DISTRIBUTED_FIELD_DESC = new org.apache.thrift.protocol.TField("distributed", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final TField SPOUT_OBJECT_FIELD_DESC = new TField("spout_object", TType.STRUCT, (short)1); - private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)2); - private static final TField DISTRIBUTED_FIELD_DESC = new TField("distributed", TType.BOOL, (short)3); - - private ComponentObject spout_object; - private ComponentCommon common; - private boolean distributed; + private ComponentObject spout_object; // required + private ComponentCommon common; // required + private boolean distributed; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SPOUT_OBJECT((short)1, "spout_object"), COMMON((short)2, "common"), DISTRIBUTED((short)3, "distributed"); @@ -105,17 +100,17 @@ public String getFieldName() { private static final int __DISTRIBUTED_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SPOUT_OBJECT, new FieldMetaData("spout_object", TFieldRequirementType.REQUIRED, - new StructMetaData(TType.STRUCT, ComponentObject.class))); - tmpMap.put(_Fields.COMMON, new FieldMetaData("common", TFieldRequirementType.REQUIRED, - new StructMetaData(TType.STRUCT, ComponentCommon.class))); - tmpMap.put(_Fields.DISTRIBUTED, new FieldMetaData("distributed", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.BOOL))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SPOUT_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("spout_object", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentObject.class))); + tmpMap.put(_Fields.COMMON, new org.apache.thrift.meta_data.FieldMetaData("common", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentCommon.class))); + tmpMap.put(_Fields.DISTRIBUTED, new org.apache.thrift.meta_data.FieldMetaData("distributed", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(SpoutSpec.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpoutSpec.class, metaDataMap); } public SpoutSpec() { @@ -152,9 +147,12 @@ public SpoutSpec deepCopy() { return new SpoutSpec(this); } - @Deprecated - public SpoutSpec clone() { - return new SpoutSpec(this); + @Override + public void clear() { + this.spout_object = null; + this.common = null; + set_distributed_isSet(false); + this.distributed = false; } public ComponentObject get_spout_object() { @@ -169,7 +167,7 @@ public void unset_spout_object() { this.spout_object = null; } - /** Returns true if field spout_object is set (has been asigned a value) and false otherwise */ + /** Returns true if field spout_object is set (has been assigned a value) and false otherwise */ public boolean is_set_spout_object() { return this.spout_object != null; } @@ -192,7 +190,7 @@ public void unset_common() { this.common = null; } - /** Returns true if field common is set (has been asigned a value) and false otherwise */ + /** Returns true if field common is set (has been assigned a value) and false otherwise */ public boolean is_set_common() { return this.common != null; } @@ -216,7 +214,7 @@ public void unset_distributed() { __isset_bit_vector.clear(__DISTRIBUTED_ISSET_ID); } - /** Returns true if field distributed is set (has been asigned a value) and false otherwise */ + /** Returns true if field distributed is set (has been assigned a value) and false otherwise */ public boolean is_set_distributed() { return __isset_bit_vector.get(__DISTRIBUTED_ISSET_ID); } @@ -254,10 +252,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SPOUT_OBJECT: @@ -267,18 +261,18 @@ public Object getFieldValue(_Fields field) { return get_common(); case DISTRIBUTED: - return new Boolean(is_distributed()); + return Boolean.valueOf(is_distributed()); } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SPOUT_OBJECT: return is_set_spout_object(); @@ -290,10 +284,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -371,7 +361,8 @@ public int compareTo(SpoutSpec other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_spout_object()) { lastComparison = TBaseHelper.compareTo(this.spout_object, typedOther.spout_object); + if (is_set_spout_object()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spout_object, typedOther.spout_object); if (lastComparison != 0) { return lastComparison; } @@ -380,7 +371,8 @@ public int compareTo(SpoutSpec other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_common()) { lastComparison = TBaseHelper.compareTo(this.common, typedOther.common); + if (is_set_common()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.common, typedOther.common); if (lastComparison != 0) { return lastComparison; } @@ -389,7 +381,8 @@ public int compareTo(SpoutSpec other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_distributed()) { lastComparison = TBaseHelper.compareTo(this.distributed, typedOther.distributed); + if (is_set_distributed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.distributed, typedOther.distributed); if (lastComparison != 0) { return lastComparison; } @@ -397,42 +390,46 @@ public int compareTo(SpoutSpec other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // SPOUT_OBJECT - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.spout_object = new ComponentObject(); this.spout_object.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // COMMON - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.common = new ComponentCommon(); this.common.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // DISTRIBUTED - if (field.type == TType.BOOL) { + if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.distributed = iprot.readBool(); set_distributed_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -440,7 +437,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -489,20 +486,38 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_spout_object()) { - throw new TProtocolException("Required field 'spout_object' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'spout_object' is unset! Struct:" + toString()); } if (!is_set_common()) { - throw new TProtocolException("Required field 'common' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'common' is unset! Struct:" + toString()); } if (!is_set_distributed()) { - throw new TProtocolException("Required field 'distributed' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'distributed' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/SpoutStats.java b/src/jvm/backtype/storm/generated/SpoutStats.java index c2b56b8af..491af664e 100644 --- a/src/jvm/backtype/storm/generated/SpoutStats.java +++ b/src/jvm/backtype/storm/generated/SpoutStats.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,29 +16,24 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class SpoutStats implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SpoutStats"); -public class SpoutStats implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("SpoutStats"); + private static final org.apache.thrift.protocol.TField ACKED_FIELD_DESC = new org.apache.thrift.protocol.TField("acked", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField FAILED_FIELD_DESC = new org.apache.thrift.protocol.TField("failed", org.apache.thrift.protocol.TType.MAP, (short)2); + private static final org.apache.thrift.protocol.TField COMPLETE_MS_AVG_FIELD_DESC = new org.apache.thrift.protocol.TField("complete_ms_avg", org.apache.thrift.protocol.TType.MAP, (short)3); - private static final TField ACKED_FIELD_DESC = new TField("acked", TType.MAP, (short)1); - private static final TField FAILED_FIELD_DESC = new TField("failed", TType.MAP, (short)2); - private static final TField COMPLETE_MS_AVG_FIELD_DESC = new TField("complete_ms_avg", TType.MAP, (short)3); - - private Map> acked; - private Map> failed; - private Map> complete_ms_avg; + private Map> acked; // required + private Map> failed; // required + private Map> complete_ms_avg; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ACKED((short)1, "acked"), FAILED((short)2, "failed"), COMPLETE_MS_AVG((short)3, "complete_ms_avg"); @@ -103,29 +98,29 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ACKED, new FieldMetaData("acked", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new FieldValueMetaData(TType.I64))))); - tmpMap.put(_Fields.FAILED, new FieldMetaData("failed", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new FieldValueMetaData(TType.I64))))); - tmpMap.put(_Fields.COMPLETE_MS_AVG, new FieldMetaData("complete_ms_avg", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new FieldValueMetaData(TType.DOUBLE))))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ACKED, new org.apache.thrift.meta_data.FieldMetaData("acked", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))))); + tmpMap.put(_Fields.FAILED, new org.apache.thrift.meta_data.FieldMetaData("failed", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))))); + tmpMap.put(_Fields.COMPLETE_MS_AVG, new org.apache.thrift.meta_data.FieldMetaData("complete_ms_avg", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(SpoutStats.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SpoutStats.class, metaDataMap); } public SpoutStats() { @@ -230,9 +225,11 @@ public SpoutStats deepCopy() { return new SpoutStats(this); } - @Deprecated - public SpoutStats clone() { - return new SpoutStats(this); + @Override + public void clear() { + this.acked = null; + this.failed = null; + this.complete_ms_avg = null; } public int get_acked_size() { @@ -258,7 +255,7 @@ public void unset_acked() { this.acked = null; } - /** Returns true if field acked is set (has been asigned a value) and false otherwise */ + /** Returns true if field acked is set (has been assigned a value) and false otherwise */ public boolean is_set_acked() { return this.acked != null; } @@ -292,7 +289,7 @@ public void unset_failed() { this.failed = null; } - /** Returns true if field failed is set (has been asigned a value) and false otherwise */ + /** Returns true if field failed is set (has been assigned a value) and false otherwise */ public boolean is_set_failed() { return this.failed != null; } @@ -326,7 +323,7 @@ public void unset_complete_ms_avg() { this.complete_ms_avg = null; } - /** Returns true if field complete_ms_avg is set (has been asigned a value) and false otherwise */ + /** Returns true if field complete_ms_avg is set (has been assigned a value) and false otherwise */ public boolean is_set_complete_ms_avg() { return this.complete_ms_avg != null; } @@ -366,10 +363,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ACKED: @@ -385,12 +378,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ACKED: return is_set_acked(); @@ -402,10 +395,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -483,7 +472,8 @@ public int compareTo(SpoutStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_acked()) { lastComparison = TBaseHelper.compareTo(this.acked, typedOther.acked); + if (is_set_acked()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acked, typedOther.acked); if (lastComparison != 0) { return lastComparison; } @@ -492,7 +482,8 @@ public int compareTo(SpoutStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_failed()) { lastComparison = TBaseHelper.compareTo(this.failed, typedOther.failed); + if (is_set_failed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failed, typedOther.failed); if (lastComparison != 0) { return lastComparison; } @@ -501,7 +492,8 @@ public int compareTo(SpoutStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_complete_ms_avg()) { lastComparison = TBaseHelper.compareTo(this.complete_ms_avg, typedOther.complete_ms_avg); + if (is_set_complete_ms_avg()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.complete_ms_avg, typedOther.complete_ms_avg); if (lastComparison != 0) { return lastComparison; } @@ -509,33 +501,37 @@ public int compareTo(SpoutStats other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ACKED - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map71 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map71 = iprot.readMapBegin(); this.acked = new HashMap>(2*_map71.size); for (int _i72 = 0; _i72 < _map71.size; ++_i72) { - String _key73; - Map _val74; + String _key73; // required + Map _val74; // required _key73 = iprot.readString(); { - TMap _map75 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map75 = iprot.readMapBegin(); _val74 = new HashMap(2*_map75.size); for (int _i76 = 0; _i76 < _map75.size; ++_i76) { - int _key77; - long _val78; + int _key77; // required + long _val78; // required _key77 = iprot.readI32(); _val78 = iprot.readI64(); _val74.put(_key77, _val78); @@ -547,26 +543,26 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // FAILED - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map79 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map79 = iprot.readMapBegin(); this.failed = new HashMap>(2*_map79.size); for (int _i80 = 0; _i80 < _map79.size; ++_i80) { - String _key81; - Map _val82; + String _key81; // required + Map _val82; // required _key81 = iprot.readString(); { - TMap _map83 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map83 = iprot.readMapBegin(); _val82 = new HashMap(2*_map83.size); for (int _i84 = 0; _i84 < _map83.size; ++_i84) { - int _key85; - long _val86; + int _key85; // required + long _val86; // required _key85 = iprot.readI32(); _val86 = iprot.readI64(); _val82.put(_key85, _val86); @@ -578,26 +574,26 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // COMPLETE_MS_AVG - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map87 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map87 = iprot.readMapBegin(); this.complete_ms_avg = new HashMap>(2*_map87.size); for (int _i88 = 0; _i88 < _map87.size; ++_i88) { - String _key89; - Map _val90; + String _key89; // required + Map _val90; // required _key89 = iprot.readString(); { - TMap _map91 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map91 = iprot.readMapBegin(); _val90 = new HashMap(2*_map91.size); for (int _i92 = 0; _i92 < _map91.size; ++_i92) { - int _key93; - double _val94; + int _key93; // required + double _val94; // required _key93 = iprot.readI32(); _val94 = iprot.readDouble(); _val90.put(_key93, _val94); @@ -609,11 +605,11 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -621,19 +617,19 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.acked != null) { oprot.writeFieldBegin(ACKED_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, this.acked.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.acked.size())); for (Map.Entry> _iter95 : this.acked.entrySet()) { oprot.writeString(_iter95.getKey()); { - oprot.writeMapBegin(new TMap(TType.I32, TType.I64, _iter95.getValue().size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I64, _iter95.getValue().size())); for (Map.Entry _iter96 : _iter95.getValue().entrySet()) { oprot.writeI32(_iter96.getKey()); @@ -649,12 +645,12 @@ public void write(TProtocol oprot) throws TException { if (this.failed != null) { oprot.writeFieldBegin(FAILED_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, this.failed.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.failed.size())); for (Map.Entry> _iter97 : this.failed.entrySet()) { oprot.writeString(_iter97.getKey()); { - oprot.writeMapBegin(new TMap(TType.I32, TType.I64, _iter97.getValue().size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I64, _iter97.getValue().size())); for (Map.Entry _iter98 : _iter97.getValue().entrySet()) { oprot.writeI32(_iter98.getKey()); @@ -670,12 +666,12 @@ public void write(TProtocol oprot) throws TException { if (this.complete_ms_avg != null) { oprot.writeFieldBegin(COMPLETE_MS_AVG_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, this.complete_ms_avg.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.complete_ms_avg.size())); for (Map.Entry> _iter99 : this.complete_ms_avg.entrySet()) { oprot.writeString(_iter99.getKey()); { - oprot.writeMapBegin(new TMap(TType.I32, TType.DOUBLE, _iter99.getValue().size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.DOUBLE, _iter99.getValue().size())); for (Map.Entry _iter100 : _iter99.getValue().entrySet()) { oprot.writeI32(_iter100.getKey()); @@ -724,21 +720,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_acked()) { - throw new TProtocolException("Required field 'acked' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'acked' is unset! Struct:" + toString()); } if (!is_set_failed()) { - throw new TProtocolException("Required field 'failed' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'failed' is unset! Struct:" + toString()); } if (!is_set_complete_ms_avg()) { - throw new TProtocolException("Required field 'complete_ms_avg' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'complete_ms_avg' is unset! Struct:" + toString()); } } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/StateSpoutSpec.java b/src/jvm/backtype/storm/generated/StateSpoutSpec.java index 41d295b0a..5aa159d3e 100644 --- a/src/jvm/backtype/storm/generated/StateSpoutSpec.java +++ b/src/jvm/backtype/storm/generated/StateSpoutSpec.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,27 +16,22 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class StateSpoutSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StateSpoutSpec"); -public class StateSpoutSpec implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("StateSpoutSpec"); + private static final org.apache.thrift.protocol.TField STATE_SPOUT_OBJECT_FIELD_DESC = new org.apache.thrift.protocol.TField("state_spout_object", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField COMMON_FIELD_DESC = new org.apache.thrift.protocol.TField("common", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final TField STATE_SPOUT_OBJECT_FIELD_DESC = new TField("state_spout_object", TType.STRUCT, (short)1); - private static final TField COMMON_FIELD_DESC = new TField("common", TType.STRUCT, (short)2); - - private ComponentObject state_spout_object; - private ComponentCommon common; + private ComponentObject state_spout_object; // required + private ComponentCommon common; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { STATE_SPOUT_OBJECT((short)1, "state_spout_object"), COMMON((short)2, "common"); @@ -98,15 +93,15 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.STATE_SPOUT_OBJECT, new FieldMetaData("state_spout_object", TFieldRequirementType.REQUIRED, - new StructMetaData(TType.STRUCT, ComponentObject.class))); - tmpMap.put(_Fields.COMMON, new FieldMetaData("common", TFieldRequirementType.REQUIRED, - new StructMetaData(TType.STRUCT, ComponentCommon.class))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STATE_SPOUT_OBJECT, new org.apache.thrift.meta_data.FieldMetaData("state_spout_object", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentObject.class))); + tmpMap.put(_Fields.COMMON, new org.apache.thrift.meta_data.FieldMetaData("common", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComponentCommon.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(StateSpoutSpec.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StateSpoutSpec.class, metaDataMap); } public StateSpoutSpec() { @@ -137,9 +132,10 @@ public StateSpoutSpec deepCopy() { return new StateSpoutSpec(this); } - @Deprecated - public StateSpoutSpec clone() { - return new StateSpoutSpec(this); + @Override + public void clear() { + this.state_spout_object = null; + this.common = null; } public ComponentObject get_state_spout_object() { @@ -154,7 +150,7 @@ public void unset_state_spout_object() { this.state_spout_object = null; } - /** Returns true if field state_spout_object is set (has been asigned a value) and false otherwise */ + /** Returns true if field state_spout_object is set (has been assigned a value) and false otherwise */ public boolean is_set_state_spout_object() { return this.state_spout_object != null; } @@ -177,7 +173,7 @@ public void unset_common() { this.common = null; } - /** Returns true if field common is set (has been asigned a value) and false otherwise */ + /** Returns true if field common is set (has been assigned a value) and false otherwise */ public boolean is_set_common() { return this.common != null; } @@ -209,10 +205,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case STATE_SPOUT_OBJECT: @@ -225,12 +217,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case STATE_SPOUT_OBJECT: return is_set_state_spout_object(); @@ -240,10 +232,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -307,7 +295,8 @@ public int compareTo(StateSpoutSpec other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_state_spout_object()) { lastComparison = TBaseHelper.compareTo(this.state_spout_object, typedOther.state_spout_object); + if (is_set_state_spout_object()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_spout_object, typedOther.state_spout_object); if (lastComparison != 0) { return lastComparison; } @@ -316,7 +305,8 @@ public int compareTo(StateSpoutSpec other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_common()) { lastComparison = TBaseHelper.compareTo(this.common, typedOther.common); + if (is_set_common()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.common, typedOther.common); if (lastComparison != 0) { return lastComparison; } @@ -324,34 +314,38 @@ public int compareTo(StateSpoutSpec other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // STATE_SPOUT_OBJECT - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.state_spout_object = new ComponentObject(); this.state_spout_object.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // COMMON - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.common = new ComponentCommon(); this.common.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -359,7 +353,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -401,16 +395,32 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_state_spout_object()) { - throw new TProtocolException("Required field 'state_spout_object' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'state_spout_object' is unset! Struct:" + toString()); } if (!is_set_common()) { - throw new TProtocolException("Required field 'common' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'common' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/StormTopology.java b/src/jvm/backtype/storm/generated/StormTopology.java index 087ebb477..2db4336dd 100644 --- a/src/jvm/backtype/storm/generated/StormTopology.java +++ b/src/jvm/backtype/storm/generated/StormTopology.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,29 +16,24 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class StormTopology implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StormTopology"); -public class StormTopology implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("StormTopology"); + private static final org.apache.thrift.protocol.TField SPOUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("spouts", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField BOLTS_FIELD_DESC = new org.apache.thrift.protocol.TField("bolts", org.apache.thrift.protocol.TType.MAP, (short)2); + private static final org.apache.thrift.protocol.TField STATE_SPOUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("state_spouts", org.apache.thrift.protocol.TType.MAP, (short)3); - private static final TField SPOUTS_FIELD_DESC = new TField("spouts", TType.MAP, (short)1); - private static final TField BOLTS_FIELD_DESC = new TField("bolts", TType.MAP, (short)2); - private static final TField STATE_SPOUTS_FIELD_DESC = new TField("state_spouts", TType.MAP, (short)3); - - private Map spouts; - private Map bolts; - private Map state_spouts; + private Map spouts; // required + private Map bolts; // required + private Map state_spouts; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { SPOUTS((short)1, "spouts"), BOLTS((short)2, "bolts"), STATE_SPOUTS((short)3, "state_spouts"); @@ -103,23 +98,23 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SPOUTS, new FieldMetaData("spouts", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new StructMetaData(TType.STRUCT, SpoutSpec.class)))); - tmpMap.put(_Fields.BOLTS, new FieldMetaData("bolts", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new StructMetaData(TType.STRUCT, Bolt.class)))); - tmpMap.put(_Fields.STATE_SPOUTS, new FieldMetaData("state_spouts", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new StructMetaData(TType.STRUCT, StateSpoutSpec.class)))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SPOUTS, new org.apache.thrift.meta_data.FieldMetaData("spouts", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SpoutSpec.class)))); + tmpMap.put(_Fields.BOLTS, new org.apache.thrift.meta_data.FieldMetaData("bolts", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Bolt.class)))); + tmpMap.put(_Fields.STATE_SPOUTS, new org.apache.thrift.meta_data.FieldMetaData("state_spouts", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StateSpoutSpec.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(StormTopology.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StormTopology.class, metaDataMap); } public StormTopology() { @@ -191,9 +186,11 @@ public StormTopology deepCopy() { return new StormTopology(this); } - @Deprecated - public StormTopology clone() { - return new StormTopology(this); + @Override + public void clear() { + this.spouts = null; + this.bolts = null; + this.state_spouts = null; } public int get_spouts_size() { @@ -219,7 +216,7 @@ public void unset_spouts() { this.spouts = null; } - /** Returns true if field spouts is set (has been asigned a value) and false otherwise */ + /** Returns true if field spouts is set (has been assigned a value) and false otherwise */ public boolean is_set_spouts() { return this.spouts != null; } @@ -253,7 +250,7 @@ public void unset_bolts() { this.bolts = null; } - /** Returns true if field bolts is set (has been asigned a value) and false otherwise */ + /** Returns true if field bolts is set (has been assigned a value) and false otherwise */ public boolean is_set_bolts() { return this.bolts != null; } @@ -287,7 +284,7 @@ public void unset_state_spouts() { this.state_spouts = null; } - /** Returns true if field state_spouts is set (has been asigned a value) and false otherwise */ + /** Returns true if field state_spouts is set (has been assigned a value) and false otherwise */ public boolean is_set_state_spouts() { return this.state_spouts != null; } @@ -327,10 +324,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case SPOUTS: @@ -346,12 +339,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case SPOUTS: return is_set_spouts(); @@ -363,10 +356,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -444,7 +433,8 @@ public int compareTo(StormTopology other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_spouts()) { lastComparison = TBaseHelper.compareTo(this.spouts, typedOther.spouts); + if (is_set_spouts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spouts, typedOther.spouts); if (lastComparison != 0) { return lastComparison; } @@ -453,7 +443,8 @@ public int compareTo(StormTopology other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_bolts()) { lastComparison = TBaseHelper.compareTo(this.bolts, typedOther.bolts); + if (is_set_bolts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bolts, typedOther.bolts); if (lastComparison != 0) { return lastComparison; } @@ -462,7 +453,8 @@ public int compareTo(StormTopology other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_state_spouts()) { lastComparison = TBaseHelper.compareTo(this.state_spouts, typedOther.state_spouts); + if (is_set_state_spouts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_spouts, typedOther.state_spouts); if (lastComparison != 0) { return lastComparison; } @@ -470,25 +462,29 @@ public int compareTo(StormTopology other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // SPOUTS - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map18 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map18 = iprot.readMapBegin(); this.spouts = new HashMap(2*_map18.size); for (int _i19 = 0; _i19 < _map18.size; ++_i19) { - int _key20; - SpoutSpec _val21; + int _key20; // required + SpoutSpec _val21; // required _key20 = iprot.readI32(); _val21 = new SpoutSpec(); _val21.read(iprot); @@ -497,18 +493,18 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // BOLTS - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map22 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map22 = iprot.readMapBegin(); this.bolts = new HashMap(2*_map22.size); for (int _i23 = 0; _i23 < _map22.size; ++_i23) { - int _key24; - Bolt _val25; + int _key24; // required + Bolt _val25; // required _key24 = iprot.readI32(); _val25 = new Bolt(); _val25.read(iprot); @@ -517,18 +513,18 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // STATE_SPOUTS - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map26 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin(); this.state_spouts = new HashMap(2*_map26.size); for (int _i27 = 0; _i27 < _map26.size; ++_i27) { - int _key28; - StateSpoutSpec _val29; + int _key28; // required + StateSpoutSpec _val29; // required _key28 = iprot.readI32(); _val29 = new StateSpoutSpec(); _val29.read(iprot); @@ -537,11 +533,11 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -549,14 +545,14 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.spouts != null) { oprot.writeFieldBegin(SPOUTS_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.I32, TType.STRUCT, this.spouts.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, this.spouts.size())); for (Map.Entry _iter30 : this.spouts.entrySet()) { oprot.writeI32(_iter30.getKey()); @@ -569,7 +565,7 @@ public void write(TProtocol oprot) throws TException { if (this.bolts != null) { oprot.writeFieldBegin(BOLTS_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.I32, TType.STRUCT, this.bolts.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, this.bolts.size())); for (Map.Entry _iter31 : this.bolts.entrySet()) { oprot.writeI32(_iter31.getKey()); @@ -582,7 +578,7 @@ public void write(TProtocol oprot) throws TException { if (this.state_spouts != null) { oprot.writeFieldBegin(STATE_SPOUTS_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.I32, TType.STRUCT, this.state_spouts.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, this.state_spouts.size())); for (Map.Entry _iter32 : this.state_spouts.entrySet()) { oprot.writeI32(_iter32.getKey()); @@ -628,21 +624,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_spouts()) { - throw new TProtocolException("Required field 'spouts' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'spouts' is unset! Struct:" + toString()); } if (!is_set_bolts()) { - throw new TProtocolException("Required field 'bolts' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'bolts' is unset! Struct:" + toString()); } if (!is_set_state_spouts()) { - throw new TProtocolException("Required field 'state_spouts' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'state_spouts' is unset! Struct:" + toString()); } } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/StreamInfo.java b/src/jvm/backtype/storm/generated/StreamInfo.java index ce04ce626..7703c1b87 100644 --- a/src/jvm/backtype/storm/generated/StreamInfo.java +++ b/src/jvm/backtype/storm/generated/StreamInfo.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,27 +16,22 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class StreamInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StreamInfo"); -public class StreamInfo implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("StreamInfo"); + private static final org.apache.thrift.protocol.TField OUTPUT_FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("output_fields", org.apache.thrift.protocol.TType.LIST, (short)1); + private static final org.apache.thrift.protocol.TField DIRECT_FIELD_DESC = new org.apache.thrift.protocol.TField("direct", org.apache.thrift.protocol.TType.BOOL, (short)2); - private static final TField OUTPUT_FIELDS_FIELD_DESC = new TField("output_fields", TType.LIST, (short)1); - private static final TField DIRECT_FIELD_DESC = new TField("direct", TType.BOOL, (short)2); - - private List output_fields; - private boolean direct; + private List output_fields; // required + private boolean direct; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { OUTPUT_FIELDS((short)1, "output_fields"), DIRECT((short)2, "direct"); @@ -100,16 +95,16 @@ public String getFieldName() { private static final int __DIRECT_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.OUTPUT_FIELDS, new FieldMetaData("output_fields", TFieldRequirementType.REQUIRED, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.DIRECT, new FieldMetaData("direct", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.BOOL))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.OUTPUT_FIELDS, new org.apache.thrift.meta_data.FieldMetaData("output_fields", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.DIRECT, new org.apache.thrift.meta_data.FieldMetaData("direct", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(StreamInfo.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StreamInfo.class, metaDataMap); } public StreamInfo() { @@ -145,9 +140,11 @@ public StreamInfo deepCopy() { return new StreamInfo(this); } - @Deprecated - public StreamInfo clone() { - return new StreamInfo(this); + @Override + public void clear() { + this.output_fields = null; + set_direct_isSet(false); + this.direct = false; } public int get_output_fields_size() { @@ -177,7 +174,7 @@ public void unset_output_fields() { this.output_fields = null; } - /** Returns true if field output_fields is set (has been asigned a value) and false otherwise */ + /** Returns true if field output_fields is set (has been assigned a value) and false otherwise */ public boolean is_set_output_fields() { return this.output_fields != null; } @@ -201,7 +198,7 @@ public void unset_direct() { __isset_bit_vector.clear(__DIRECT_ISSET_ID); } - /** Returns true if field direct is set (has been asigned a value) and false otherwise */ + /** Returns true if field direct is set (has been assigned a value) and false otherwise */ public boolean is_set_direct() { return __isset_bit_vector.get(__DIRECT_ISSET_ID); } @@ -231,28 +228,24 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case OUTPUT_FIELDS: return get_output_fields(); case DIRECT: - return new Boolean(is_direct()); + return Boolean.valueOf(is_direct()); } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case OUTPUT_FIELDS: return is_set_output_fields(); @@ -262,10 +255,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -329,7 +318,8 @@ public int compareTo(StreamInfo other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_output_fields()) { lastComparison = TBaseHelper.compareTo(this.output_fields, typedOther.output_fields); + if (is_set_output_fields()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.output_fields, typedOther.output_fields); if (lastComparison != 0) { return lastComparison; } @@ -338,7 +328,8 @@ public int compareTo(StreamInfo other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_direct()) { lastComparison = TBaseHelper.compareTo(this.direct, typedOther.direct); + if (is_set_direct()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.direct, typedOther.direct); if (lastComparison != 0) { return lastComparison; } @@ -346,43 +337,47 @@ public int compareTo(StreamInfo other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // OUTPUT_FIELDS - if (field.type == TType.LIST) { + if (field.type == org.apache.thrift.protocol.TType.LIST) { { - TList _list4 = iprot.readListBegin(); + org.apache.thrift.protocol.TList _list4 = iprot.readListBegin(); this.output_fields = new ArrayList(_list4.size); for (int _i5 = 0; _i5 < _list4.size; ++_i5) { - String _elem6; + String _elem6; // required _elem6 = iprot.readString(); this.output_fields.add(_elem6); } iprot.readListEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // DIRECT - if (field.type == TType.BOOL) { + if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.direct = iprot.readBool(); set_direct_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -390,14 +385,14 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.output_fields != null) { oprot.writeFieldBegin(OUTPUT_FIELDS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.output_fields.size())); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.output_fields.size())); for (String _iter7 : this.output_fields) { oprot.writeString(_iter7); @@ -433,16 +428,34 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_output_fields()) { - throw new TProtocolException("Required field 'output_fields' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'output_fields' is unset! Struct:" + toString()); } if (!is_set_direct()) { - throw new TProtocolException("Required field 'direct' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'direct' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/SupervisorSummary.java b/src/jvm/backtype/storm/generated/SupervisorSummary.java index b027434c0..7f7666325 100644 --- a/src/jvm/backtype/storm/generated/SupervisorSummary.java +++ b/src/jvm/backtype/storm/generated/SupervisorSummary.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,31 +16,26 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class SupervisorSummary implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SupervisorSummary"); -public class SupervisorSummary implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("SupervisorSummary"); + 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)1); + private static final org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField NUM_WORKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_workers", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField NUM_USED_WORKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_used_workers", org.apache.thrift.protocol.TType.I32, (short)4); - private static final TField HOST_FIELD_DESC = new TField("host", TType.STRING, (short)1); - private static final TField UPTIME_SECS_FIELD_DESC = new TField("uptime_secs", TType.I32, (short)2); - private static final TField NUM_WORKERS_FIELD_DESC = new TField("num_workers", TType.I32, (short)3); - private static final TField NUM_USED_WORKERS_FIELD_DESC = new TField("num_used_workers", TType.I32, (short)4); - - private String host; - private int uptime_secs; - private int num_workers; - private int num_used_workers; + private String host; // required + private int uptime_secs; // required + private int num_workers; // required + private int num_used_workers; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { HOST((short)1, "host"), UPTIME_SECS((short)2, "uptime_secs"), NUM_WORKERS((short)3, "num_workers"), @@ -112,19 +107,19 @@ public String getFieldName() { private static final int __NUM_USED_WORKERS_ISSET_ID = 2; private BitSet __isset_bit_vector = new BitSet(3); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.HOST, new FieldMetaData("host", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.UPTIME_SECS, new FieldMetaData("uptime_secs", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.NUM_WORKERS, new FieldMetaData("num_workers", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.NUM_USED_WORKERS, new FieldMetaData("num_used_workers", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 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.UPTIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("uptime_secs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.NUM_WORKERS, new org.apache.thrift.meta_data.FieldMetaData("num_workers", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.NUM_USED_WORKERS, new org.apache.thrift.meta_data.FieldMetaData("num_used_workers", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(SupervisorSummary.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SupervisorSummary.class, metaDataMap); } public SupervisorSummary() { @@ -164,9 +159,15 @@ public SupervisorSummary deepCopy() { return new SupervisorSummary(this); } - @Deprecated - public SupervisorSummary clone() { - return new SupervisorSummary(this); + @Override + public void clear() { + this.host = null; + set_uptime_secs_isSet(false); + this.uptime_secs = 0; + set_num_workers_isSet(false); + this.num_workers = 0; + set_num_used_workers_isSet(false); + this.num_used_workers = 0; } public String get_host() { @@ -181,7 +182,7 @@ public void unset_host() { this.host = null; } - /** Returns true if field host is set (has been asigned a value) and false otherwise */ + /** Returns true if field host is set (has been assigned a value) and false otherwise */ public boolean is_set_host() { return this.host != null; } @@ -205,7 +206,7 @@ public void unset_uptime_secs() { __isset_bit_vector.clear(__UPTIME_SECS_ISSET_ID); } - /** Returns true if field uptime_secs is set (has been asigned a value) and false otherwise */ + /** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_uptime_secs() { return __isset_bit_vector.get(__UPTIME_SECS_ISSET_ID); } @@ -227,7 +228,7 @@ public void unset_num_workers() { __isset_bit_vector.clear(__NUM_WORKERS_ISSET_ID); } - /** Returns true if field num_workers is set (has been asigned a value) and false otherwise */ + /** Returns true if field num_workers is set (has been assigned a value) and false otherwise */ public boolean is_set_num_workers() { return __isset_bit_vector.get(__NUM_WORKERS_ISSET_ID); } @@ -249,7 +250,7 @@ public void unset_num_used_workers() { __isset_bit_vector.clear(__NUM_USED_WORKERS_ISSET_ID); } - /** Returns true if field num_used_workers is set (has been asigned a value) and false otherwise */ + /** Returns true if field num_used_workers is set (has been assigned a value) and false otherwise */ public boolean is_set_num_used_workers() { return __isset_bit_vector.get(__NUM_USED_WORKERS_ISSET_ID); } @@ -295,34 +296,30 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case HOST: return get_host(); case UPTIME_SECS: - return new Integer(get_uptime_secs()); + return Integer.valueOf(get_uptime_secs()); case NUM_WORKERS: - return new Integer(get_num_workers()); + return Integer.valueOf(get_num_workers()); case NUM_USED_WORKERS: - return new Integer(get_num_used_workers()); + return Integer.valueOf(get_num_used_workers()); } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case HOST: return is_set_host(); @@ -336,10 +333,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -431,7 +424,8 @@ public int compareTo(SupervisorSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_host()) { lastComparison = TBaseHelper.compareTo(this.host, typedOther.host); + if (is_set_host()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host); if (lastComparison != 0) { return lastComparison; } @@ -440,7 +434,8 @@ public int compareTo(SupervisorSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_uptime_secs()) { lastComparison = TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs); + if (is_set_uptime_secs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs); if (lastComparison != 0) { return lastComparison; } @@ -449,7 +444,8 @@ public int compareTo(SupervisorSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_num_workers()) { lastComparison = TBaseHelper.compareTo(this.num_workers, typedOther.num_workers); + if (is_set_num_workers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_workers, typedOther.num_workers); if (lastComparison != 0) { return lastComparison; } @@ -458,7 +454,8 @@ public int compareTo(SupervisorSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_num_used_workers()) { lastComparison = TBaseHelper.compareTo(this.num_used_workers, typedOther.num_used_workers); + if (is_set_num_used_workers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_used_workers, typedOther.num_used_workers); if (lastComparison != 0) { return lastComparison; } @@ -466,49 +463,53 @@ public int compareTo(SupervisorSummary other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // HOST - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.host = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // UPTIME_SECS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.uptime_secs = iprot.readI32(); set_uptime_secs_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // NUM_WORKERS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.num_workers = iprot.readI32(); set_num_workers_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // NUM_USED_WORKERS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.num_used_workers = iprot.readI32(); set_num_used_workers_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -516,7 +517,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -566,24 +567,42 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_host()) { - throw new TProtocolException("Required field 'host' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'host' is unset! Struct:" + toString()); } if (!is_set_uptime_secs()) { - throw new TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); } if (!is_set_num_workers()) { - throw new TProtocolException("Required field 'num_workers' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_workers' is unset! Struct:" + toString()); } if (!is_set_num_used_workers()) { - throw new TProtocolException("Required field 'num_used_workers' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_used_workers' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/generated/TaskSpecificStats.java b/src/jvm/backtype/storm/generated/TaskSpecificStats.java index 2506f310e..be8b70b70 100644 --- a/src/jvm/backtype/storm/generated/TaskSpecificStats.java +++ b/src/jvm/backtype/storm/generated/TaskSpecificStats.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,23 +16,18 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; - -public class TaskSpecificStats extends TUnion { - private static final TStruct STRUCT_DESC = new TStruct("TaskSpecificStats"); - private static final TField BOLT_FIELD_DESC = new TField("bolt", TType.STRUCT, (short)1); - private static final TField SPOUT_FIELD_DESC = new TField("spout", TType.STRUCT, (short)2); +public class TaskSpecificStats extends org.apache.thrift.TUnion { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskSpecificStats"); + 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); + private static final org.apache.thrift.protocol.TField SPOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("spout", org.apache.thrift.protocol.TType.STRUCT, (short)2); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { BOLT((short)1, "bolt"), SPOUT((short)2, "spout"); @@ -92,15 +87,15 @@ public String getFieldName() { } } - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.BOLT, new FieldMetaData("bolt", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, BoltStats.class))); - tmpMap.put(_Fields.SPOUT, new FieldMetaData("spout", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, SpoutStats.class))); + 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, + 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, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SpoutStats.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(TaskSpecificStats.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TaskSpecificStats.class, metaDataMap); } public TaskSpecificStats() { @@ -150,7 +145,7 @@ protected void checkType(_Fields setField, Object value) throws ClassCastExcepti } @Override - protected Object readValue(TProtocol iprot, TField field) throws TException { + protected Object readValue(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) { @@ -161,7 +156,7 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { bolt.read(iprot); return bolt; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } case SPOUT: @@ -171,20 +166,20 @@ protected Object readValue(TProtocol iprot, TField field) throws TException { spout.read(iprot); return spout; } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } default: throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @Override - protected void writeValue(TProtocol oprot) throws TException { + protected void writeValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case BOLT: BoltStats bolt = (BoltStats)value_; @@ -200,7 +195,7 @@ protected void writeValue(TProtocol oprot) throws TException { } @Override - protected TField getFieldDesc(_Fields setField) { + protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { switch (setField) { case BOLT: return BOLT_FIELD_DESC; @@ -212,7 +207,7 @@ protected TField getFieldDesc(_Fields setField) { } @Override - protected TStruct getStructDesc() { + protected org.apache.thrift.protocol.TStruct getStructDesc() { return STRUCT_DESC; } @@ -221,6 +216,11 @@ protected _Fields enumForId(short id) { return _Fields.findByThriftIdOrThrow(id); } + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public BoltStats get_bolt() { if (getSetField() == _Fields.BOLT) { return (BoltStats)getFieldValue(); @@ -249,6 +249,16 @@ public void set_spout(SpoutStats value) { value_ = value; } + public boolean is_set_bolt() { + return setField_ == _Fields.BOLT; + } + + + public boolean is_set_spout() { + return setField_ == _Fields.SPOUT; + } + + public boolean equals(Object other) { if (other instanceof TaskSpecificStats) { return equals((TaskSpecificStats)other); @@ -258,26 +268,14 @@ public boolean equals(Object other) { } public boolean equals(TaskSpecificStats other) { - return other != null && getSetField() == other.getSetField() && ((value_ instanceof byte[]) ? - Arrays.equals((byte[])getFieldValue(), (byte[])other.getFieldValue()) : getFieldValue().equals(other.getFieldValue())); + return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); } @Override public int compareTo(TaskSpecificStats other) { - int lastComparison = TBaseHelper.compareTo(getSetField(), other.getSetField()); + int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); if (lastComparison == 0) { - Object myValue = getFieldValue(); - if (myValue instanceof byte[]) { - return TBaseHelper.compareTo((byte[])myValue, (byte[])other.getFieldValue()); - } else if (myValue instanceof List) { - return TBaseHelper.compareTo((List)myValue, (List)other.getFieldValue()); - } else if (myValue instanceof Set) { - return TBaseHelper.compareTo((Set)myValue, (Set)other.getFieldValue()); - } else if (myValue instanceof Map){ - return TBaseHelper.compareTo((Map)myValue, (Map)other.getFieldValue()); - } else { - return TBaseHelper.compareTo((Comparable)myValue, (Comparable)other.getFieldValue()); - } + return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); } return lastComparison; } @@ -287,16 +285,34 @@ public int compareTo(TaskSpecificStats other) { public int hashCode() { HashCodeBuilder hcb = new HashCodeBuilder(); hcb.append(this.getClass().getName()); - TFieldIdEnum setField = getSetField(); + org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { hcb.append(setField.getThriftFieldId()); Object value = getFieldValue(); - if (value instanceof TEnum) { - hcb.append(((TEnum)getFieldValue()).getValue()); + if (value instanceof org.apache.thrift.TEnum) { + hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { hcb.append(value); } } return hcb.toHashCode(); } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } diff --git a/src/jvm/backtype/storm/generated/TaskStats.java b/src/jvm/backtype/storm/generated/TaskStats.java index b73b467d8..4e899e07d 100644 --- a/src/jvm/backtype/storm/generated/TaskStats.java +++ b/src/jvm/backtype/storm/generated/TaskStats.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,29 +16,24 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class TaskStats implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskStats"); -public class TaskStats implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("TaskStats"); + private static final org.apache.thrift.protocol.TField EMITTED_FIELD_DESC = new org.apache.thrift.protocol.TField("emitted", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField TRANSFERRED_FIELD_DESC = new org.apache.thrift.protocol.TField("transferred", org.apache.thrift.protocol.TType.MAP, (short)2); + private static final org.apache.thrift.protocol.TField SPECIFIC_FIELD_DESC = new org.apache.thrift.protocol.TField("specific", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final TField EMITTED_FIELD_DESC = new TField("emitted", TType.MAP, (short)1); - private static final TField TRANSFERRED_FIELD_DESC = new TField("transferred", TType.MAP, (short)2); - private static final TField SPECIFIC_FIELD_DESC = new TField("specific", TType.STRUCT, (short)3); - - private Map> emitted; - private Map> transferred; - private TaskSpecificStats specific; + private Map> emitted; // required + private Map> transferred; // required + private TaskSpecificStats specific; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { EMITTED((short)1, "emitted"), TRANSFERRED((short)2, "transferred"), SPECIFIC((short)3, "specific"); @@ -103,25 +98,25 @@ public String getFieldName() { // isset id assignments - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.EMITTED, new FieldMetaData("emitted", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new FieldValueMetaData(TType.I64))))); - tmpMap.put(_Fields.TRANSFERRED, new FieldMetaData("transferred", TFieldRequirementType.REQUIRED, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new FieldValueMetaData(TType.I64))))); - tmpMap.put(_Fields.SPECIFIC, new FieldMetaData("specific", TFieldRequirementType.REQUIRED, - new StructMetaData(TType.STRUCT, TaskSpecificStats.class))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.EMITTED, new org.apache.thrift.meta_data.FieldMetaData("emitted", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))))); + tmpMap.put(_Fields.TRANSFERRED, new org.apache.thrift.meta_data.FieldMetaData("transferred", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))))); + tmpMap.put(_Fields.SPECIFIC, new org.apache.thrift.meta_data.FieldMetaData("specific", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TaskSpecificStats.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(TaskStats.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TaskStats.class, metaDataMap); } public TaskStats() { @@ -203,9 +198,11 @@ public TaskStats deepCopy() { return new TaskStats(this); } - @Deprecated - public TaskStats clone() { - return new TaskStats(this); + @Override + public void clear() { + this.emitted = null; + this.transferred = null; + this.specific = null; } public int get_emitted_size() { @@ -231,7 +228,7 @@ public void unset_emitted() { this.emitted = null; } - /** Returns true if field emitted is set (has been asigned a value) and false otherwise */ + /** Returns true if field emitted is set (has been assigned a value) and false otherwise */ public boolean is_set_emitted() { return this.emitted != null; } @@ -265,7 +262,7 @@ public void unset_transferred() { this.transferred = null; } - /** Returns true if field transferred is set (has been asigned a value) and false otherwise */ + /** Returns true if field transferred is set (has been assigned a value) and false otherwise */ public boolean is_set_transferred() { return this.transferred != null; } @@ -288,7 +285,7 @@ public void unset_specific() { this.specific = null; } - /** Returns true if field specific is set (has been asigned a value) and false otherwise */ + /** Returns true if field specific is set (has been assigned a value) and false otherwise */ public boolean is_set_specific() { return this.specific != null; } @@ -328,10 +325,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case EMITTED: @@ -347,12 +340,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case EMITTED: return is_set_emitted(); @@ -364,10 +357,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -445,7 +434,8 @@ public int compareTo(TaskStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_emitted()) { lastComparison = TBaseHelper.compareTo(this.emitted, typedOther.emitted); + if (is_set_emitted()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emitted, typedOther.emitted); if (lastComparison != 0) { return lastComparison; } @@ -454,7 +444,8 @@ public int compareTo(TaskStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_transferred()) { lastComparison = TBaseHelper.compareTo(this.transferred, typedOther.transferred); + if (is_set_transferred()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferred, typedOther.transferred); if (lastComparison != 0) { return lastComparison; } @@ -463,7 +454,8 @@ public int compareTo(TaskStats other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_specific()) { lastComparison = TBaseHelper.compareTo(this.specific, typedOther.specific); + if (is_set_specific()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.specific, typedOther.specific); if (lastComparison != 0) { return lastComparison; } @@ -471,33 +463,37 @@ public int compareTo(TaskStats other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // EMITTED - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map101 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map101 = iprot.readMapBegin(); this.emitted = new HashMap>(2*_map101.size); for (int _i102 = 0; _i102 < _map101.size; ++_i102) { - String _key103; - Map _val104; + String _key103; // required + Map _val104; // required _key103 = iprot.readString(); { - TMap _map105 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map105 = iprot.readMapBegin(); _val104 = new HashMap(2*_map105.size); for (int _i106 = 0; _i106 < _map105.size; ++_i106) { - int _key107; - long _val108; + int _key107; // required + long _val108; // required _key107 = iprot.readI32(); _val108 = iprot.readI64(); _val104.put(_key107, _val108); @@ -509,26 +505,26 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // TRANSFERRED - if (field.type == TType.MAP) { + if (field.type == org.apache.thrift.protocol.TType.MAP) { { - TMap _map109 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map109 = iprot.readMapBegin(); this.transferred = new HashMap>(2*_map109.size); for (int _i110 = 0; _i110 < _map109.size; ++_i110) { - String _key111; - Map _val112; + String _key111; // required + Map _val112; // required _key111 = iprot.readString(); { - TMap _map113 = iprot.readMapBegin(); + org.apache.thrift.protocol.TMap _map113 = iprot.readMapBegin(); _val112 = new HashMap(2*_map113.size); for (int _i114 = 0; _i114 < _map113.size; ++_i114) { - int _key115; - long _val116; + int _key115; // required + long _val116; // required _key115 = iprot.readI32(); _val116 = iprot.readI64(); _val112.put(_key115, _val116); @@ -540,19 +536,19 @@ public void read(TProtocol iprot) throws TException { iprot.readMapEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // SPECIFIC - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.specific = new TaskSpecificStats(); this.specific.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -560,19 +556,19 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.emitted != null) { oprot.writeFieldBegin(EMITTED_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, this.emitted.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.emitted.size())); for (Map.Entry> _iter117 : this.emitted.entrySet()) { oprot.writeString(_iter117.getKey()); { - oprot.writeMapBegin(new TMap(TType.I32, TType.I64, _iter117.getValue().size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I64, _iter117.getValue().size())); for (Map.Entry _iter118 : _iter117.getValue().entrySet()) { oprot.writeI32(_iter118.getKey()); @@ -588,12 +584,12 @@ public void write(TProtocol oprot) throws TException { if (this.transferred != null) { oprot.writeFieldBegin(TRANSFERRED_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.MAP, this.transferred.size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.transferred.size())); for (Map.Entry> _iter119 : this.transferred.entrySet()) { oprot.writeString(_iter119.getKey()); { - oprot.writeMapBegin(new TMap(TType.I32, TType.I64, _iter119.getValue().size())); + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I64, _iter119.getValue().size())); for (Map.Entry _iter120 : _iter119.getValue().entrySet()) { oprot.writeI32(_iter120.getKey()); @@ -647,21 +643,37 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_emitted()) { - throw new TProtocolException("Required field 'emitted' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'emitted' is unset! Struct:" + toString()); } if (!is_set_transferred()) { - throw new TProtocolException("Required field 'transferred' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'transferred' is unset! Struct:" + toString()); } if (!is_set_specific()) { - throw new TProtocolException("Required field 'specific' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'specific' is unset! Struct:" + toString()); } } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/TaskSummary.java b/src/jvm/backtype/storm/generated/TaskSummary.java index ff66b120f..feac1ddfe 100644 --- a/src/jvm/backtype/storm/generated/TaskSummary.java +++ b/src/jvm/backtype/storm/generated/TaskSummary.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,37 +16,32 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; - -public class TaskSummary implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("TaskSummary"); - - private static final TField TASK_ID_FIELD_DESC = new TField("task_id", TType.I32, (short)1); - private static final TField COMPONENT_ID_FIELD_DESC = new TField("component_id", TType.I32, (short)2); - private static final TField HOST_FIELD_DESC = new TField("host", TType.STRING, (short)3); - private static final TField PORT_FIELD_DESC = new TField("port", TType.I32, (short)4); - private static final TField UPTIME_SECS_FIELD_DESC = new TField("uptime_secs", TType.I32, (short)5); - private static final TField ERRORS_FIELD_DESC = new TField("errors", TType.LIST, (short)6); - private static final TField STATS_FIELD_DESC = new TField("stats", TType.STRUCT, (short)7); - - private int task_id; - private int component_id; - private String host; - private int port; - private int uptime_secs; - private List errors; - private TaskStats stats; +public class TaskSummary implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TaskSummary"); + + private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("task_id", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField COMPONENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("component_id", org.apache.thrift.protocol.TType.I32, (short)2); + 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 org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stats", org.apache.thrift.protocol.TType.STRUCT, (short)7); + + private int task_id; // required + private int component_id; // required + private String host; // required + private int port; // required + private int uptime_secs; // required + private List errors; // required + private TaskStats stats; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { TASK_ID((short)1, "task_id"), COMPONENT_ID((short)2, "component_id"), HOST((short)3, "host"), @@ -128,26 +123,26 @@ public String getFieldName() { private static final int __UPTIME_SECS_ISSET_ID = 3; private BitSet __isset_bit_vector = new BitSet(4); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TASK_ID, new FieldMetaData("task_id", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.COMPONENT_ID, new FieldMetaData("component_id", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.HOST, new FieldMetaData("host", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.PORT, new FieldMetaData("port", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.UPTIME_SECS, new FieldMetaData("uptime_secs", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.ERRORS, new FieldMetaData("errors", TFieldRequirementType.REQUIRED, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, ErrorInfo.class)))); - tmpMap.put(_Fields.STATS, new FieldMetaData("stats", TFieldRequirementType.OPTIONAL, - new StructMetaData(TType.STRUCT, TaskStats.class))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("task_id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.COMPONENT_ID, new org.apache.thrift.meta_data.FieldMetaData("component_id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + 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, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.UPTIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("uptime_secs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ErrorInfo.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, TaskStats.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(TaskSummary.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TaskSummary.class, metaDataMap); } public TaskSummary() { @@ -203,9 +198,19 @@ public TaskSummary deepCopy() { return new TaskSummary(this); } - @Deprecated - public TaskSummary clone() { - return new TaskSummary(this); + @Override + public void clear() { + set_task_id_isSet(false); + this.task_id = 0; + set_component_id_isSet(false); + this.component_id = 0; + this.host = null; + set_port_isSet(false); + this.port = 0; + set_uptime_secs_isSet(false); + this.uptime_secs = 0; + this.errors = null; + this.stats = null; } public int get_task_id() { @@ -221,7 +226,7 @@ public void unset_task_id() { __isset_bit_vector.clear(__TASK_ID_ISSET_ID); } - /** Returns true if field task_id is set (has been asigned a value) and false otherwise */ + /** Returns true if field task_id is set (has been assigned a value) and false otherwise */ public boolean is_set_task_id() { return __isset_bit_vector.get(__TASK_ID_ISSET_ID); } @@ -243,7 +248,7 @@ public void unset_component_id() { __isset_bit_vector.clear(__COMPONENT_ID_ISSET_ID); } - /** Returns true if field component_id is set (has been asigned a value) and false otherwise */ + /** Returns true if field component_id is set (has been assigned a value) and false otherwise */ public boolean is_set_component_id() { return __isset_bit_vector.get(__COMPONENT_ID_ISSET_ID); } @@ -264,7 +269,7 @@ public void unset_host() { this.host = null; } - /** Returns true if field host is set (has been asigned a value) and false otherwise */ + /** Returns true if field host is set (has been assigned a value) and false otherwise */ public boolean is_set_host() { return this.host != null; } @@ -288,7 +293,7 @@ public void unset_port() { __isset_bit_vector.clear(__PORT_ISSET_ID); } - /** Returns true if field port is set (has been asigned a value) and false otherwise */ + /** Returns true if field port is set (has been assigned a value) and false otherwise */ public boolean is_set_port() { return __isset_bit_vector.get(__PORT_ISSET_ID); } @@ -310,7 +315,7 @@ public void unset_uptime_secs() { __isset_bit_vector.clear(__UPTIME_SECS_ISSET_ID); } - /** Returns true if field uptime_secs is set (has been asigned a value) and false otherwise */ + /** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_uptime_secs() { return __isset_bit_vector.get(__UPTIME_SECS_ISSET_ID); } @@ -346,7 +351,7 @@ public void unset_errors() { this.errors = null; } - /** Returns true if field errors is set (has been asigned a value) and false otherwise */ + /** Returns true if field errors is set (has been assigned a value) and false otherwise */ public boolean is_set_errors() { return this.errors != null; } @@ -369,7 +374,7 @@ public void unset_stats() { this.stats = null; } - /** Returns true if field stats is set (has been asigned a value) and false otherwise */ + /** Returns true if field stats is set (has been assigned a value) and false otherwise */ public boolean is_set_stats() { return this.stats != null; } @@ -441,26 +446,22 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: - return new Integer(get_task_id()); + return Integer.valueOf(get_task_id()); case COMPONENT_ID: - return new Integer(get_component_id()); + return Integer.valueOf(get_component_id()); case HOST: return get_host(); case PORT: - return new Integer(get_port()); + return Integer.valueOf(get_port()); case UPTIME_SECS: - return new Integer(get_uptime_secs()); + return Integer.valueOf(get_uptime_secs()); case ERRORS: return get_errors(); @@ -472,12 +473,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case TASK_ID: return is_set_task_id(); @@ -497,10 +498,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -634,7 +631,8 @@ public int compareTo(TaskSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_task_id()) { lastComparison = TBaseHelper.compareTo(this.task_id, typedOther.task_id); + if (is_set_task_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.task_id, typedOther.task_id); if (lastComparison != 0) { return lastComparison; } @@ -643,7 +641,8 @@ public int compareTo(TaskSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_component_id()) { lastComparison = TBaseHelper.compareTo(this.component_id, typedOther.component_id); + if (is_set_component_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.component_id, typedOther.component_id); if (lastComparison != 0) { return lastComparison; } @@ -652,7 +651,8 @@ public int compareTo(TaskSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_host()) { lastComparison = TBaseHelper.compareTo(this.host, typedOther.host); + if (is_set_host()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host); if (lastComparison != 0) { return lastComparison; } @@ -661,7 +661,8 @@ public int compareTo(TaskSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_port()) { lastComparison = TBaseHelper.compareTo(this.port, typedOther.port); + if (is_set_port()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port); if (lastComparison != 0) { return lastComparison; } @@ -670,7 +671,8 @@ public int compareTo(TaskSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_uptime_secs()) { lastComparison = TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs); + if (is_set_uptime_secs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs); if (lastComparison != 0) { return lastComparison; } @@ -679,7 +681,8 @@ public int compareTo(TaskSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_errors()) { lastComparison = TBaseHelper.compareTo(this.errors, typedOther.errors); + if (is_set_errors()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, typedOther.errors); if (lastComparison != 0) { return lastComparison; } @@ -688,7 +691,8 @@ public int compareTo(TaskSummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_stats()) { lastComparison = TBaseHelper.compareTo(this.stats, typedOther.stats); + if (is_set_stats()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats, typedOther.stats); if (lastComparison != 0) { return lastComparison; } @@ -696,63 +700,67 @@ public int compareTo(TaskSummary other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // TASK_ID - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.task_id = iprot.readI32(); set_task_id_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // COMPONENT_ID - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.component_id = iprot.readI32(); set_component_id_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // HOST - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.host = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // PORT - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.port = iprot.readI32(); set_port_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // UPTIME_SECS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.uptime_secs = iprot.readI32(); set_uptime_secs_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // ERRORS - if (field.type == TType.LIST) { + if (field.type == org.apache.thrift.protocol.TType.LIST) { { - TList _list121 = iprot.readListBegin(); + org.apache.thrift.protocol.TList _list121 = iprot.readListBegin(); this.errors = new ArrayList(_list121.size); for (int _i122 = 0; _i122 < _list121.size; ++_i122) { - ErrorInfo _elem123; + ErrorInfo _elem123; // required _elem123 = new ErrorInfo(); _elem123.read(iprot); this.errors.add(_elem123); @@ -760,19 +768,19 @@ public void read(TProtocol iprot) throws TException { iprot.readListEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 7: // STATS - if (field.type == TType.STRUCT) { + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.stats = new TaskStats(); this.stats.read(iprot); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -780,7 +788,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -804,7 +812,7 @@ public void write(TProtocol oprot) throws TException { if (this.errors != null) { oprot.writeFieldBegin(ERRORS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRUCT, this.errors.size())); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.errors.size())); for (ErrorInfo _iter124 : this.errors) { _iter124.write(oprot); @@ -874,33 +882,51 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_task_id()) { - throw new TProtocolException("Required field 'task_id' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'task_id' is unset! Struct:" + toString()); } if (!is_set_component_id()) { - throw new TProtocolException("Required field 'component_id' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'component_id' is unset! Struct:" + toString()); } if (!is_set_host()) { - throw new TProtocolException("Required field 'host' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'host' is unset! Struct:" + toString()); } if (!is_set_port()) { - throw new TProtocolException("Required field 'port' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'port' is unset! Struct:" + toString()); } if (!is_set_uptime_secs()) { - throw new TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); } if (!is_set_errors()) { - throw new TProtocolException("Required field 'errors' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'errors' is unset! Struct:" + toString()); } } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/TopologyInfo.java b/src/jvm/backtype/storm/generated/TopologyInfo.java index b1ea8810f..7d3d742b8 100644 --- a/src/jvm/backtype/storm/generated/TopologyInfo.java +++ b/src/jvm/backtype/storm/generated/TopologyInfo.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,31 +16,26 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class TopologyInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopologyInfo"); -public class TopologyInfo implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("TopologyInfo"); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("tasks", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final TField ID_FIELD_DESC = new TField("id", TType.STRING, (short)1); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2); - private static final TField UPTIME_SECS_FIELD_DESC = new TField("uptime_secs", TType.I32, (short)3); - private static final TField TASKS_FIELD_DESC = new TField("tasks", TType.LIST, (short)4); - - private String id; - private String name; - private int uptime_secs; - private List tasks; + private String id; // required + private String name; // required + private int uptime_secs; // required + private List tasks; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"), NAME((short)2, "name"), UPTIME_SECS((short)3, "uptime_secs"), @@ -110,20 +105,20 @@ public String getFieldName() { private static final int __UPTIME_SECS_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.UPTIME_SECS, new FieldMetaData("uptime_secs", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.TASKS, new FieldMetaData("tasks", TFieldRequirementType.REQUIRED, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, TaskSummary.class)))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.UPTIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("uptime_secs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.TASKS, new org.apache.thrift.meta_data.FieldMetaData("tasks", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TaskSummary.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(TopologyInfo.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TopologyInfo.class, metaDataMap); } public TopologyInfo() { @@ -169,9 +164,13 @@ public TopologyInfo deepCopy() { return new TopologyInfo(this); } - @Deprecated - public TopologyInfo clone() { - return new TopologyInfo(this); + @Override + public void clear() { + this.id = null; + this.name = null; + set_uptime_secs_isSet(false); + this.uptime_secs = 0; + this.tasks = null; } public String get_id() { @@ -186,7 +185,7 @@ public void unset_id() { this.id = null; } - /** Returns true if field id is set (has been asigned a value) and false otherwise */ + /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean is_set_id() { return this.id != null; } @@ -209,7 +208,7 @@ public void unset_name() { this.name = null; } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ + /** Returns true if field name is set (has been assigned a value) and false otherwise */ public boolean is_set_name() { return this.name != null; } @@ -233,7 +232,7 @@ public void unset_uptime_secs() { __isset_bit_vector.clear(__UPTIME_SECS_ISSET_ID); } - /** Returns true if field uptime_secs is set (has been asigned a value) and false otherwise */ + /** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_uptime_secs() { return __isset_bit_vector.get(__UPTIME_SECS_ISSET_ID); } @@ -269,7 +268,7 @@ public void unset_tasks() { this.tasks = null; } - /** Returns true if field tasks is set (has been asigned a value) and false otherwise */ + /** Returns true if field tasks is set (has been assigned a value) and false otherwise */ public boolean is_set_tasks() { return this.tasks != null; } @@ -317,10 +316,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -330,7 +325,7 @@ public Object getFieldValue(_Fields field) { return get_name(); case UPTIME_SECS: - return new Integer(get_uptime_secs()); + return Integer.valueOf(get_uptime_secs()); case TASKS: return get_tasks(); @@ -339,12 +334,12 @@ public Object getFieldValue(_Fields field) { throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ID: return is_set_id(); @@ -358,10 +353,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -453,7 +444,8 @@ public int compareTo(TopologyInfo other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_id()) { lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (is_set_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } @@ -462,7 +454,8 @@ public int compareTo(TopologyInfo other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_name()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (is_set_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } @@ -471,7 +464,8 @@ public int compareTo(TopologyInfo other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_uptime_secs()) { lastComparison = TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs); + if (is_set_uptime_secs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs); if (lastComparison != 0) { return lastComparison; } @@ -480,7 +474,8 @@ public int compareTo(TopologyInfo other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_tasks()) { lastComparison = TBaseHelper.compareTo(this.tasks, typedOther.tasks); + if (is_set_tasks()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tasks, typedOther.tasks); if (lastComparison != 0) { return lastComparison; } @@ -488,46 +483,50 @@ public int compareTo(TopologyInfo other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ID - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.id = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // NAME - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // UPTIME_SECS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.uptime_secs = iprot.readI32(); set_uptime_secs_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // TASKS - if (field.type == TType.LIST) { + if (field.type == org.apache.thrift.protocol.TType.LIST) { { - TList _list125 = iprot.readListBegin(); + org.apache.thrift.protocol.TList _list125 = iprot.readListBegin(); this.tasks = new ArrayList(_list125.size); for (int _i126 = 0; _i126 < _list125.size; ++_i126) { - TaskSummary _elem127; + TaskSummary _elem127; // required _elem127 = new TaskSummary(); _elem127.read(iprot); this.tasks.add(_elem127); @@ -535,11 +534,11 @@ public void read(TProtocol iprot) throws TException { iprot.readListEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -547,7 +546,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -567,7 +566,7 @@ public void write(TProtocol oprot) throws TException { if (this.tasks != null) { oprot.writeFieldBegin(TASKS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRUCT, this.tasks.size())); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.tasks.size())); for (TaskSummary _iter128 : this.tasks) { _iter128.write(oprot); @@ -616,25 +615,43 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_id()) { - throw new TProtocolException("Required field 'id' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); } if (!is_set_name()) { - throw new TProtocolException("Required field 'name' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString()); } if (!is_set_uptime_secs()) { - throw new TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); } if (!is_set_tasks()) { - throw new TProtocolException("Required field 'tasks' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tasks' is unset! Struct:" + toString()); } } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + } diff --git a/src/jvm/backtype/storm/generated/TopologySummary.java b/src/jvm/backtype/storm/generated/TopologySummary.java index 0c00f1666..e7094cb68 100644 --- a/src/jvm/backtype/storm/generated/TopologySummary.java +++ b/src/jvm/backtype/storm/generated/TopologySummary.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -16,33 +16,28 @@ import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; +import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.thrift.*; -import org.apache.thrift.async.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.transport.*; -import org.apache.thrift.protocol.*; +public class TopologySummary implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TopologySummary"); -public class TopologySummary implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("TopologySummary"); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField NUM_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_tasks", org.apache.thrift.protocol.TType.I32, (short)3); + private static final org.apache.thrift.protocol.TField NUM_WORKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_workers", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField UPTIME_SECS_FIELD_DESC = new org.apache.thrift.protocol.TField("uptime_secs", org.apache.thrift.protocol.TType.I32, (short)5); - private static final TField ID_FIELD_DESC = new TField("id", TType.STRING, (short)1); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2); - private static final TField NUM_TASKS_FIELD_DESC = new TField("num_tasks", TType.I32, (short)3); - private static final TField NUM_WORKERS_FIELD_DESC = new TField("num_workers", TType.I32, (short)4); - private static final TField UPTIME_SECS_FIELD_DESC = new TField("uptime_secs", TType.I32, (short)5); - - private String id; - private String name; - private int num_tasks; - private int num_workers; - private int uptime_secs; + private String id; // required + private String name; // required + private int num_tasks; // required + private int num_workers; // required + private int uptime_secs; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements TFieldIdEnum { + public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"), NAME((short)2, "name"), NUM_TASKS((short)3, "num_tasks"), @@ -117,21 +112,21 @@ public String getFieldName() { private static final int __UPTIME_SECS_ISSET_ID = 2; private BitSet __isset_bit_vector = new BitSet(3); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.NUM_TASKS, new FieldMetaData("num_tasks", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.NUM_WORKERS, new FieldMetaData("num_workers", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.UPTIME_SECS, new FieldMetaData("uptime_secs", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NUM_TASKS, new org.apache.thrift.meta_data.FieldMetaData("num_tasks", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.NUM_WORKERS, new org.apache.thrift.meta_data.FieldMetaData("num_workers", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.UPTIME_SECS, new org.apache.thrift.meta_data.FieldMetaData("uptime_secs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(TopologySummary.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TopologySummary.class, metaDataMap); } public TopologySummary() { @@ -176,9 +171,16 @@ public TopologySummary deepCopy() { return new TopologySummary(this); } - @Deprecated - public TopologySummary clone() { - return new TopologySummary(this); + @Override + public void clear() { + this.id = null; + this.name = null; + set_num_tasks_isSet(false); + this.num_tasks = 0; + set_num_workers_isSet(false); + this.num_workers = 0; + set_uptime_secs_isSet(false); + this.uptime_secs = 0; } public String get_id() { @@ -193,7 +195,7 @@ public void unset_id() { this.id = null; } - /** Returns true if field id is set (has been asigned a value) and false otherwise */ + /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean is_set_id() { return this.id != null; } @@ -216,7 +218,7 @@ public void unset_name() { this.name = null; } - /** Returns true if field name is set (has been asigned a value) and false otherwise */ + /** Returns true if field name is set (has been assigned a value) and false otherwise */ public boolean is_set_name() { return this.name != null; } @@ -240,7 +242,7 @@ public void unset_num_tasks() { __isset_bit_vector.clear(__NUM_TASKS_ISSET_ID); } - /** Returns true if field num_tasks is set (has been asigned a value) and false otherwise */ + /** Returns true if field num_tasks is set (has been assigned a value) and false otherwise */ public boolean is_set_num_tasks() { return __isset_bit_vector.get(__NUM_TASKS_ISSET_ID); } @@ -262,7 +264,7 @@ public void unset_num_workers() { __isset_bit_vector.clear(__NUM_WORKERS_ISSET_ID); } - /** Returns true if field num_workers is set (has been asigned a value) and false otherwise */ + /** Returns true if field num_workers is set (has been assigned a value) and false otherwise */ public boolean is_set_num_workers() { return __isset_bit_vector.get(__NUM_WORKERS_ISSET_ID); } @@ -284,7 +286,7 @@ public void unset_uptime_secs() { __isset_bit_vector.clear(__UPTIME_SECS_ISSET_ID); } - /** Returns true if field uptime_secs is set (has been asigned a value) and false otherwise */ + /** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */ public boolean is_set_uptime_secs() { return __isset_bit_vector.get(__UPTIME_SECS_ISSET_ID); } @@ -338,10 +340,6 @@ public void setFieldValue(_Fields field, Object value) { } } - public void setFieldValue(int fieldID, Object value) { - setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); - } - public Object getFieldValue(_Fields field) { switch (field) { case ID: @@ -351,24 +349,24 @@ public Object getFieldValue(_Fields field) { return get_name(); case NUM_TASKS: - return new Integer(get_num_tasks()); + return Integer.valueOf(get_num_tasks()); case NUM_WORKERS: - return new Integer(get_num_workers()); + return Integer.valueOf(get_num_workers()); case UPTIME_SECS: - return new Integer(get_uptime_secs()); + return Integer.valueOf(get_uptime_secs()); } throw new IllegalStateException(); } - public Object getFieldValue(int fieldId) { - return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); - } - - /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + /** 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(); + } + switch (field) { case ID: return is_set_id(); @@ -384,10 +382,6 @@ public boolean isSet(_Fields field) { throw new IllegalStateException(); } - public boolean isSet(int fieldID) { - return isSet(_Fields.findByThriftIdOrThrow(fieldID)); - } - @Override public boolean equals(Object that) { if (that == null) @@ -493,7 +487,8 @@ public int compareTo(TopologySummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_id()) { lastComparison = TBaseHelper.compareTo(this.id, typedOther.id); + if (is_set_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); if (lastComparison != 0) { return lastComparison; } @@ -502,7 +497,8 @@ public int compareTo(TopologySummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_name()) { lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (is_set_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); if (lastComparison != 0) { return lastComparison; } @@ -511,7 +507,8 @@ public int compareTo(TopologySummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_num_tasks()) { lastComparison = TBaseHelper.compareTo(this.num_tasks, typedOther.num_tasks); + if (is_set_num_tasks()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_tasks, typedOther.num_tasks); if (lastComparison != 0) { return lastComparison; } @@ -520,7 +517,8 @@ public int compareTo(TopologySummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_num_workers()) { lastComparison = TBaseHelper.compareTo(this.num_workers, typedOther.num_workers); + if (is_set_num_workers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_workers, typedOther.num_workers); if (lastComparison != 0) { return lastComparison; } @@ -529,7 +527,8 @@ public int compareTo(TopologySummary other) { if (lastComparison != 0) { return lastComparison; } - if (is_set_uptime_secs()) { lastComparison = TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs); + if (is_set_uptime_secs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs); if (lastComparison != 0) { return lastComparison; } @@ -537,56 +536,60 @@ public int compareTo(TopologySummary other) { return 0; } - public void read(TProtocol iprot) throws TException { - TField field; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { + if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // ID - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.id = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // NAME - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.name = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // NUM_TASKS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.num_tasks = iprot.readI32(); set_num_tasks_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // NUM_WORKERS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.num_workers = iprot.readI32(); set_num_workers_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // UPTIME_SECS - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.uptime_secs = iprot.readI32(); set_uptime_secs_isSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -594,7 +597,7 @@ public void read(TProtocol iprot) throws TException { validate(); } - public void write(TProtocol oprot) throws TException { + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -657,28 +660,46 @@ public String toString() { return sb.toString(); } - public void validate() throws TException { + public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_id()) { - throw new TProtocolException("Required field 'id' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString()); } if (!is_set_name()) { - throw new TProtocolException("Required field 'name' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString()); } if (!is_set_num_tasks()) { - throw new TProtocolException("Required field 'num_tasks' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_tasks' is unset! Struct:" + toString()); } if (!is_set_num_workers()) { - throw new TProtocolException("Required field 'num_workers' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_workers' is unset! Struct:" + toString()); } if (!is_set_uptime_secs()) { - throw new TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); + throw new org.apache.thrift.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); } + } + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } } } diff --git a/src/jvm/backtype/storm/utils/Utils.java b/src/jvm/backtype/storm/utils/Utils.java index fe970fbce..4adcba05e 100644 --- a/src/jvm/backtype/storm/utils/Utils.java +++ b/src/jvm/backtype/storm/utils/Utils.java @@ -13,6 +13,9 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.nio.ByteBuffer; +import java.nio.channels.Channels; +import java.nio.channels.WritableByteChannel; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -135,13 +138,11 @@ public static List tuple(Object... values) { public static void downloadFromMaster(Map conf, String file, String localFile) throws IOException, TException { NimbusClient client = NimbusClient.getConfiguredClient(conf); String id = client.getClient().beginFileDownload(file); - FileOutputStream out = new FileOutputStream(localFile); + WritableByteChannel out = Channels.newChannel(new FileOutputStream(localFile)); while(true) { - byte[] chunk = client.getClient().downloadChunk(id); - if(chunk.length==0) { - break; - } - out.write(chunk); + ByteBuffer chunk = client.getClient().downloadChunk(id); + int written = out.write(chunk); + if(written==0) break; } out.close(); } diff --git a/src/py/storm/DistributedRPC-remote b/src/py/storm/DistributedRPC-remote index 74518ba70..b1b85f9c5 100755 --- a/src/py/storm/DistributedRPC-remote +++ b/src/py/storm/DistributedRPC-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift +# Autogenerated by Thrift Compiler (0.7.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -35,20 +35,22 @@ http = False argi = 1 if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') + parts = sys.argv[argi+1].split(':') host = parts[0] port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': url = urlparse(sys.argv[argi+1]) - parts = url[1].split(':') + parts = url[1].split(':') host = parts[0] if len(parts) > 1: port = int(parts[1]) else: port = 80 uri = url[2] + if url[4]: + uri += '?%s' % url[4] http = True argi += 2 @@ -83,4 +85,8 @@ elif cmd == 'result': sys.exit(1) pp.pprint(client.result(args[0],args[1],)) +else: + print 'Unrecognized method %s' % cmd + sys.exit(1) + transport.close() diff --git a/src/py/storm/DistributedRPC.py b/src/py/storm/DistributedRPC.py index e6eea6d80..59ad47f69 100644 --- a/src/py/storm/DistributedRPC.py +++ b/src/py/storm/DistributedRPC.py @@ -1,15 +1,14 @@ # -# Autogenerated by Thrift +# Autogenerated by Thrift Compiler (0.7.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * -import sys from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: @@ -37,7 +36,7 @@ def result(self, id, result): class Client(Iface): def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot - if oprot != None: + if oprot is not None: self._oprot = oprot self._seqid = 0 @@ -69,7 +68,7 @@ def recv_execute(self, ): result = execute_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success != None: + if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "execute failed: unknown result"); @@ -179,12 +178,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.functionName = iprot.readString().decode('utf-8'); + self.functionName = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.funcArgs = iprot.readString().decode('utf-8'); + self.funcArgs = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -197,17 +196,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('execute_args') - if self.functionName != None: + if self.functionName is not None: oprot.writeFieldBegin('functionName', TType.STRING, 1) - oprot.writeString(self.functionName.encode('utf-8')); + oprot.writeString(self.functionName.encode('utf-8')) oprot.writeFieldEnd() - if self.funcArgs != None: + if self.funcArgs is not None: oprot.writeFieldBegin('funcArgs', TType.STRING, 2) - oprot.writeString(self.funcArgs.encode('utf-8')); + oprot.writeString(self.funcArgs.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -219,25 +222,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class execute_result: """ Attributes: @@ -262,7 +246,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8'); + self.success = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -275,13 +259,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('execute_result') - if self.success != None: + if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8')); + oprot.writeString(self.success.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -293,25 +281,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class result_args: """ Attributes: @@ -340,12 +309,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8'); + self.id = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.result = iprot.readString().decode('utf-8'); + self.result = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -358,17 +327,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('result_args') - if self.id != None: + if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8')); + oprot.writeString(self.id.encode('utf-8')) oprot.writeFieldEnd() - if self.result != None: + if self.result is not None: oprot.writeFieldBegin('result', TType.STRING, 2) - oprot.writeString(self.result.encode('utf-8')); + oprot.writeString(self.result.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -380,25 +353,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class result_result: thrift_spec = ( @@ -426,6 +380,10 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -436,24 +394,3 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - - diff --git a/src/py/storm/Nimbus-remote b/src/py/storm/Nimbus-remote index 95712ea94..2ffbcc820 100755 --- a/src/py/storm/Nimbus-remote +++ b/src/py/storm/Nimbus-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift +# Autogenerated by Thrift Compiler (0.7.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -44,20 +44,22 @@ http = False argi = 1 if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') + parts = sys.argv[argi+1].split(':') host = parts[0] port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': url = urlparse(sys.argv[argi+1]) - parts = url[1].split(':') + parts = url[1].split(':') host = parts[0] if len(parts) > 1: port = int(parts[1]) else: port = 80 uri = url[2] + if url[4]: + uri += '?%s' % url[4] http = True argi += 2 @@ -146,4 +148,8 @@ elif cmd == 'getTopology': sys.exit(1) pp.pprint(client.getTopology(args[0],)) +else: + print 'Unrecognized method %s' % cmd + sys.exit(1) + transport.close() diff --git a/src/py/storm/Nimbus.py b/src/py/storm/Nimbus.py index 3629f9dfd..2207370de 100644 --- a/src/py/storm/Nimbus.py +++ b/src/py/storm/Nimbus.py @@ -1,15 +1,14 @@ # -# Autogenerated by Thrift +# Autogenerated by Thrift Compiler (0.7.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * -import sys from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: @@ -94,7 +93,7 @@ def getTopology(self, id): class Client(Iface): def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot - if oprot != None: + if oprot is not None: self._oprot = oprot self._seqid = 0 @@ -130,9 +129,9 @@ def recv_submitTopology(self, ): result = submitTopology_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.e != None: + if result.e is not None: raise result.e - if result.ite != None: + if result.ite is not None: raise result.ite return @@ -162,7 +161,7 @@ def recv_killTopology(self, ): result = killTopology_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.e != None: + if result.e is not None: raise result.e return @@ -187,7 +186,7 @@ def recv_beginFileUpload(self, ): result = beginFileUpload_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success != None: + if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "beginFileUpload failed: unknown result"); @@ -275,7 +274,7 @@ def recv_beginFileDownload(self, ): result = beginFileDownload_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success != None: + if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result"); @@ -305,7 +304,7 @@ def recv_downloadChunk(self, ): result = downloadChunk_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success != None: + if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "downloadChunk failed: unknown result"); @@ -330,7 +329,7 @@ def recv_getClusterInfo(self, ): result = getClusterInfo_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success != None: + if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getClusterInfo failed: unknown result"); @@ -360,9 +359,9 @@ def recv_getTopologyInfo(self, ): result = getTopologyInfo_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success != None: + if result.success is not None: return result.success - if result.e != None: + if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyInfo failed: unknown result"); @@ -392,9 +391,9 @@ def recv_getTopologyConf(self, ): result = getTopologyConf_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success != None: + if result.success is not None: return result.success - if result.e != None: + if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopologyConf failed: unknown result"); @@ -424,9 +423,9 @@ def recv_getTopology(self, ): result = getTopology_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success != None: + if result.success is not None: return result.success - if result.e != None: + if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getTopology failed: unknown result"); @@ -637,17 +636,17 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8'); + self.name = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.uploadedJarLocation = iprot.readString().decode('utf-8'); + self.uploadedJarLocation = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.jsonConf = iprot.readString().decode('utf-8'); + self.jsonConf = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 4: @@ -666,25 +665,29 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('submitTopology_args') - if self.name != None: + if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name.encode('utf-8')); + oprot.writeString(self.name.encode('utf-8')) oprot.writeFieldEnd() - if self.uploadedJarLocation != None: + if self.uploadedJarLocation is not None: oprot.writeFieldBegin('uploadedJarLocation', TType.STRING, 2) - oprot.writeString(self.uploadedJarLocation.encode('utf-8')); + oprot.writeString(self.uploadedJarLocation.encode('utf-8')) oprot.writeFieldEnd() - if self.jsonConf != None: + if self.jsonConf is not None: oprot.writeFieldBegin('jsonConf', TType.STRING, 3) - oprot.writeString(self.jsonConf.encode('utf-8')); + oprot.writeString(self.jsonConf.encode('utf-8')) oprot.writeFieldEnd() - if self.topology != None: + if self.topology is not None: oprot.writeFieldBegin('topology', TType.STRUCT, 4) self.topology.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -696,25 +699,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class submitTopology_result: """ Attributes: @@ -763,17 +747,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('submitTopology_result') - if self.e != None: + if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() - if self.ite != None: + if self.ite is not None: oprot.writeFieldBegin('ite', TType.STRUCT, 2) self.ite.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -785,25 +773,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class killTopology_args: """ Attributes: @@ -829,7 +798,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8'); + self.name = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -842,13 +811,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('killTopology_args') - if self.name != None: + if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name.encode('utf-8')); + oprot.writeString(self.name.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -860,25 +833,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class killTopology_result: """ Attributes: @@ -918,13 +872,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('killTopology_result') - if self.e != None: + if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -936,25 +894,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class beginFileUpload_args: thrift_spec = ( @@ -982,6 +921,10 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -993,25 +936,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class beginFileUpload_result: """ Attributes: @@ -1036,7 +960,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8'); + self.success = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1049,13 +973,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('beginFileUpload_result') - if self.success != None: + if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8')); + oprot.writeString(self.success.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1067,25 +995,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class uploadChunk_args: """ Attributes: @@ -1114,7 +1023,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.location = iprot.readString().decode('utf-8'); + self.location = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: @@ -1132,17 +1041,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('uploadChunk_args') - if self.location != None: + if self.location is not None: oprot.writeFieldBegin('location', TType.STRING, 1) - oprot.writeString(self.location.encode('utf-8')); + oprot.writeString(self.location.encode('utf-8')) oprot.writeFieldEnd() - if self.chunk != None: + if self.chunk is not None: oprot.writeFieldBegin('chunk', TType.STRING, 2) - oprot.writeString(self.chunk); + oprot.writeString(self.chunk) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1154,25 +1067,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class uploadChunk_result: thrift_spec = ( @@ -1200,6 +1094,10 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1211,25 +1109,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class finishFileUpload_args: """ Attributes: @@ -1255,7 +1134,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.location = iprot.readString().decode('utf-8'); + self.location = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1268,13 +1147,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('finishFileUpload_args') - if self.location != None: + if self.location is not None: oprot.writeFieldBegin('location', TType.STRING, 1) - oprot.writeString(self.location.encode('utf-8')); + oprot.writeString(self.location.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1286,25 +1169,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class finishFileUpload_result: thrift_spec = ( @@ -1332,6 +1196,10 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1343,25 +1211,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class beginFileDownload_args: """ Attributes: @@ -1387,7 +1236,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.file = iprot.readString().decode('utf-8'); + self.file = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1400,13 +1249,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('beginFileDownload_args') - if self.file != None: + if self.file is not None: oprot.writeFieldBegin('file', TType.STRING, 1) - oprot.writeString(self.file.encode('utf-8')); + oprot.writeString(self.file.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1418,25 +1271,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class beginFileDownload_result: """ Attributes: @@ -1461,7 +1295,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8'); + self.success = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1474,13 +1308,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('beginFileDownload_result') - if self.success != None: + if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8')); + oprot.writeString(self.success.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1492,25 +1330,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class downloadChunk_args: """ Attributes: @@ -1536,7 +1355,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8'); + self.id = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1549,13 +1368,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('downloadChunk_args') - if self.id != None: + if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8')); + oprot.writeString(self.id.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1567,25 +1390,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class downloadChunk_result: """ Attributes: @@ -1623,13 +1427,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('downloadChunk_result') - if self.success != None: + if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success); + oprot.writeString(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1641,25 +1449,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class getClusterInfo_args: thrift_spec = ( @@ -1687,6 +1476,10 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1698,25 +1491,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class getClusterInfo_result: """ Attributes: @@ -1755,13 +1529,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getClusterInfo_result') - if self.success != None: + if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1773,25 +1551,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class getTopologyInfo_args: """ Attributes: @@ -1817,7 +1576,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8'); + self.id = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1830,13 +1589,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getTopologyInfo_args') - if self.id != None: + if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8')); + oprot.writeString(self.id.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1848,25 +1611,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class getTopologyInfo_result: """ Attributes: @@ -1914,17 +1658,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getTopologyInfo_result') - if self.success != None: + if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() - if self.e != None: + if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1936,25 +1684,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class getTopologyConf_args: """ Attributes: @@ -1980,7 +1709,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8'); + self.id = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1993,13 +1722,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getTopologyConf_args') - if self.id != None: + if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8')); + oprot.writeString(self.id.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2011,25 +1744,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class getTopologyConf_result: """ Attributes: @@ -2057,7 +1771,7 @@ def read(self, iprot): break if fid == 0: if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8'); + self.success = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 1: @@ -2076,17 +1790,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getTopologyConf_result') - if self.success != None: + if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8')); + oprot.writeString(self.success.encode('utf-8')) oprot.writeFieldEnd() - if self.e != None: + if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2098,25 +1816,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class getTopology_args: """ Attributes: @@ -2142,7 +1841,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8'); + self.id = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -2155,13 +1854,17 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getTopology_args') - if self.id != None: + if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8')); + oprot.writeString(self.id.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2173,25 +1876,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class getTopology_result: """ Attributes: @@ -2239,17 +1923,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('getTopology_result') - if self.success != None: + if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() - if self.e != None: + if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2260,24 +1948,3 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - - diff --git a/src/py/storm/constants.py b/src/py/storm/constants.py index 4f6fe5c7f..732b3680d 100644 --- a/src/py/storm/constants.py +++ b/src/py/storm/constants.py @@ -1,10 +1,9 @@ # -# Autogenerated by Thrift +# Autogenerated by Thrift Compiler (0.7.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * -import sys from ttypes import * diff --git a/src/py/storm/ttypes.py b/src/py/storm/ttypes.py index 4db93f09d..34877a349 100644 --- a/src/py/storm/ttypes.py +++ b/src/py/storm/ttypes.py @@ -1,21 +1,20 @@ # -# Autogenerated by Thrift +# Autogenerated by Thrift Compiler (0.7.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * -import sys -sys.path = ["/".join(__file__.split("/")[:-1]) + "/.."] + sys.path from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: fastbinary = None + class NullStruct: thrift_spec = ( @@ -43,6 +42,10 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -54,25 +57,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class Grouping: """ Attributes: @@ -113,7 +97,7 @@ def read(self, iprot): self.fields = [] (_etype3, _size0) = iprot.readListBegin() for _i4 in xrange(_size0): - _elem5 = iprot.readString().decode('utf-8'); + _elem5 = iprot.readString().decode('utf-8') self.fields.append(_elem5) iprot.readListEnd() else: @@ -152,32 +136,36 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('Grouping') - if self.fields != None: + if self.fields is not None: oprot.writeFieldBegin('fields', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.fields)) for iter6 in self.fields: - oprot.writeString(iter6.encode('utf-8')); + oprot.writeString(iter6.encode('utf-8')) oprot.writeListEnd() oprot.writeFieldEnd() - if self.shuffle != None: + if self.shuffle is not None: oprot.writeFieldBegin('shuffle', TType.STRUCT, 2) self.shuffle.write(oprot) oprot.writeFieldEnd() - if self.all != None: + if self.all is not None: oprot.writeFieldBegin('all', TType.STRUCT, 3) self.all.write(oprot) oprot.writeFieldEnd() - if self.none != None: + if self.none is not None: oprot.writeFieldBegin('none', TType.STRUCT, 4) self.none.write(oprot) oprot.writeFieldEnd() - if self.direct != None: + if self.direct is not None: oprot.writeFieldBegin('direct', TType.STRUCT, 5) self.direct.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -189,25 +177,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class StreamInfo: """ Attributes: @@ -239,7 +208,7 @@ def read(self, iprot): self.output_fields = [] (_etype10, _size7) = iprot.readListBegin() for _i11 in xrange(_size7): - _elem12 = iprot.readString().decode('utf-8'); + _elem12 = iprot.readString().decode('utf-8') self.output_fields.append(_elem12) iprot.readListEnd() else: @@ -259,20 +228,28 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('StreamInfo') - if self.output_fields != None: + if self.output_fields is not None: oprot.writeFieldBegin('output_fields', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.output_fields)) for iter13 in self.output_fields: - oprot.writeString(iter13.encode('utf-8')); + oprot.writeString(iter13.encode('utf-8')) oprot.writeListEnd() oprot.writeFieldEnd() - if self.direct != None: + if self.direct is not None: oprot.writeFieldBegin('direct', TType.BOOL, 2) oprot.writeBool(self.direct) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.output_fields is None: + raise TProtocol.TProtocolException(message='Required field output_fields is unset!') + if self.direct is None: + raise TProtocol.TProtocolException(message='Required field direct is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -284,25 +261,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class ShellComponent: """ Attributes: @@ -331,12 +289,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.execution_command = iprot.readString().decode('utf-8'); + self.execution_command = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.script = iprot.readString().decode('utf-8'); + self.script = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -349,17 +307,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('ShellComponent') - if self.execution_command != None: + if self.execution_command is not None: oprot.writeFieldBegin('execution_command', TType.STRING, 1) - oprot.writeString(self.execution_command.encode('utf-8')); + oprot.writeString(self.execution_command.encode('utf-8')) oprot.writeFieldEnd() - if self.script != None: + if self.script is not None: oprot.writeFieldBegin('script', TType.STRING, 2) - oprot.writeString(self.script.encode('utf-8')); + oprot.writeString(self.script.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -371,25 +333,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class ComponentObject: """ Attributes: @@ -437,17 +380,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('ComponentObject') - if self.serialized_java != None: + if self.serialized_java is not None: oprot.writeFieldBegin('serialized_java', TType.STRING, 1) - oprot.writeString(self.serialized_java); + oprot.writeString(self.serialized_java) oprot.writeFieldEnd() - if self.shell != None: + if self.shell is not None: oprot.writeFieldBegin('shell', TType.STRUCT, 2) self.shell.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -459,25 +406,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class ComponentCommon: """ Attributes: @@ -531,7 +459,7 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('ComponentCommon') - if self.streams != None: + if self.streams is not None: oprot.writeFieldBegin('streams', TType.MAP, 1) oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.streams)) for kiter21,viter22 in self.streams.items(): @@ -539,13 +467,19 @@ def write(self, oprot): viter22.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() - if self.parallelism_hint != None: + if self.parallelism_hint is not None: oprot.writeFieldBegin('parallelism_hint', TType.I32, 2) oprot.writeI32(self.parallelism_hint) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.streams is None: + raise TProtocol.TProtocolException(message='Required field streams is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -557,25 +491,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class SpoutSpec: """ Attributes: @@ -632,21 +547,31 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('SpoutSpec') - if self.spout_object != None: + if self.spout_object is not None: oprot.writeFieldBegin('spout_object', TType.STRUCT, 1) self.spout_object.write(oprot) oprot.writeFieldEnd() - if self.common != None: + if self.common is not None: oprot.writeFieldBegin('common', TType.STRUCT, 2) self.common.write(oprot) oprot.writeFieldEnd() - if self.distributed != None: + if self.distributed is not None: oprot.writeFieldBegin('distributed', TType.BOOL, 3) oprot.writeBool(self.distributed) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.spout_object is None: + raise TProtocol.TProtocolException(message='Required field spout_object is unset!') + if self.common is None: + raise TProtocol.TProtocolException(message='Required field common is unset!') + if self.distributed is None: + raise TProtocol.TProtocolException(message='Required field distributed is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -658,25 +583,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class GlobalStreamId: """ Attributes: @@ -723,17 +629,25 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('GlobalStreamId') - if self.componentId != None: + if self.componentId is not None: oprot.writeFieldBegin('componentId', TType.I32, 1) oprot.writeI32(self.componentId) oprot.writeFieldEnd() - if self.streamId != None: + if self.streamId is not None: oprot.writeFieldBegin('streamId', TType.I32, 2) oprot.writeI32(self.streamId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.componentId is None: + raise TProtocol.TProtocolException(message='Required field componentId is unset!') + if self.streamId is None: + raise TProtocol.TProtocolException(message='Required field streamId is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -745,25 +659,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class Bolt: """ Attributes: @@ -828,7 +723,7 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('Bolt') - if self.inputs != None: + if self.inputs is not None: oprot.writeFieldBegin('inputs', TType.MAP, 1) oprot.writeMapBegin(TType.STRUCT, TType.STRUCT, len(self.inputs)) for kiter30,viter31 in self.inputs.items(): @@ -836,17 +731,27 @@ def write(self, oprot): viter31.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() - if self.bolt_object != None: + if self.bolt_object is not None: oprot.writeFieldBegin('bolt_object', TType.STRUCT, 2) self.bolt_object.write(oprot) oprot.writeFieldEnd() - if self.common != None: + if self.common is not None: oprot.writeFieldBegin('common', TType.STRUCT, 3) self.common.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.inputs is None: + raise TProtocol.TProtocolException(message='Required field inputs is unset!') + if self.bolt_object is None: + raise TProtocol.TProtocolException(message='Required field bolt_object is unset!') + if self.common is None: + raise TProtocol.TProtocolException(message='Required field common is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -858,25 +763,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class StateSpoutSpec: """ Attributes: @@ -925,17 +811,25 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('StateSpoutSpec') - if self.state_spout_object != None: + if self.state_spout_object is not None: oprot.writeFieldBegin('state_spout_object', TType.STRUCT, 1) self.state_spout_object.write(oprot) oprot.writeFieldEnd() - if self.common != None: + if self.common is not None: oprot.writeFieldBegin('common', TType.STRUCT, 2) self.common.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.state_spout_object is None: + raise TProtocol.TProtocolException(message='Required field state_spout_object is unset!') + if self.common is None: + raise TProtocol.TProtocolException(message='Required field common is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -947,25 +841,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class StormTopology: """ Attributes: @@ -1041,7 +916,7 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('StormTopology') - if self.spouts != None: + if self.spouts is not None: oprot.writeFieldBegin('spouts', TType.MAP, 1) oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.spouts)) for kiter53,viter54 in self.spouts.items(): @@ -1049,7 +924,7 @@ def write(self, oprot): viter54.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() - if self.bolts != None: + if self.bolts is not None: oprot.writeFieldBegin('bolts', TType.MAP, 2) oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.bolts)) for kiter55,viter56 in self.bolts.items(): @@ -1057,7 +932,7 @@ def write(self, oprot): viter56.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() - if self.state_spouts != None: + if self.state_spouts is not None: oprot.writeFieldBegin('state_spouts', TType.MAP, 3) oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.state_spouts)) for kiter57,viter58 in self.state_spouts.items(): @@ -1068,6 +943,16 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.spouts is None: + raise TProtocol.TProtocolException(message='Required field spouts is unset!') + if self.bolts is None: + raise TProtocol.TProtocolException(message='Required field bolts is unset!') + if self.state_spouts is None: + raise TProtocol.TProtocolException(message='Required field state_spouts is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1079,25 +964,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class AlreadyAliveException(Exception): """ Attributes: @@ -1123,7 +989,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.msg = iprot.readString().decode('utf-8'); + self.msg = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1136,13 +1002,19 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('AlreadyAliveException') - if self.msg != None: + if self.msg is not None: oprot.writeFieldBegin('msg', TType.STRING, 1) - oprot.writeString(self.msg.encode('utf-8')); + oprot.writeString(self.msg.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.msg is None: + raise TProtocol.TProtocolException(message='Required field msg is unset!') + return + + def __str__(self): return repr(self) @@ -1157,25 +1029,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class NotAliveException(Exception): """ Attributes: @@ -1201,7 +1054,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.msg = iprot.readString().decode('utf-8'); + self.msg = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1214,13 +1067,19 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('NotAliveException') - if self.msg != None: + if self.msg is not None: oprot.writeFieldBegin('msg', TType.STRING, 1) - oprot.writeString(self.msg.encode('utf-8')); + oprot.writeString(self.msg.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.msg is None: + raise TProtocol.TProtocolException(message='Required field msg is unset!') + return + + def __str__(self): return repr(self) @@ -1235,25 +1094,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class InvalidTopologyException(Exception): """ Attributes: @@ -1279,7 +1119,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.msg = iprot.readString().decode('utf-8'); + self.msg = iprot.readString().decode('utf-8') else: iprot.skip(ftype) else: @@ -1292,13 +1132,19 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('InvalidTopologyException') - if self.msg != None: + if self.msg is not None: oprot.writeFieldBegin('msg', TType.STRING, 1) - oprot.writeString(self.msg.encode('utf-8')); + oprot.writeString(self.msg.encode('utf-8')) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.msg is None: + raise TProtocol.TProtocolException(message='Required field msg is unset!') + return + + def __str__(self): return repr(self) @@ -1313,25 +1159,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class TopologySummary: """ Attributes: @@ -1369,12 +1196,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8'); + self.id = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8'); + self.name = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 3: @@ -1402,29 +1229,43 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('TopologySummary') - if self.id != None: + if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8')); + oprot.writeString(self.id.encode('utf-8')) oprot.writeFieldEnd() - if self.name != None: + if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8')); + oprot.writeString(self.name.encode('utf-8')) oprot.writeFieldEnd() - if self.num_tasks != None: + if self.num_tasks is not None: oprot.writeFieldBegin('num_tasks', TType.I32, 3) oprot.writeI32(self.num_tasks) oprot.writeFieldEnd() - if self.num_workers != None: + if self.num_workers is not None: oprot.writeFieldBegin('num_workers', TType.I32, 4) oprot.writeI32(self.num_workers) oprot.writeFieldEnd() - if self.uptime_secs != None: + if self.uptime_secs is not None: oprot.writeFieldBegin('uptime_secs', TType.I32, 5) oprot.writeI32(self.uptime_secs) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.id is None: + raise TProtocol.TProtocolException(message='Required field id is unset!') + if self.name is None: + raise TProtocol.TProtocolException(message='Required field name is unset!') + if self.num_tasks is None: + raise TProtocol.TProtocolException(message='Required field num_tasks is unset!') + if self.num_workers is None: + raise TProtocol.TProtocolException(message='Required field num_workers is unset!') + if self.uptime_secs is None: + raise TProtocol.TProtocolException(message='Required field uptime_secs is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1436,25 +1277,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class SupervisorSummary: """ Attributes: @@ -1489,7 +1311,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.host = iprot.readString().decode('utf-8'); + self.host = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: @@ -1517,25 +1339,37 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('SupervisorSummary') - if self.host != None: + if self.host is not None: oprot.writeFieldBegin('host', TType.STRING, 1) - oprot.writeString(self.host.encode('utf-8')); + oprot.writeString(self.host.encode('utf-8')) oprot.writeFieldEnd() - if self.uptime_secs != None: + if self.uptime_secs is not None: oprot.writeFieldBegin('uptime_secs', TType.I32, 2) oprot.writeI32(self.uptime_secs) oprot.writeFieldEnd() - if self.num_workers != None: + if self.num_workers is not None: oprot.writeFieldBegin('num_workers', TType.I32, 3) oprot.writeI32(self.num_workers) oprot.writeFieldEnd() - if self.num_used_workers != None: + if self.num_used_workers is not None: oprot.writeFieldBegin('num_used_workers', TType.I32, 4) oprot.writeI32(self.num_used_workers) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.host is None: + raise TProtocol.TProtocolException(message='Required field host is unset!') + if self.uptime_secs is None: + raise TProtocol.TProtocolException(message='Required field uptime_secs is unset!') + if self.num_workers is None: + raise TProtocol.TProtocolException(message='Required field num_workers is unset!') + if self.num_used_workers is None: + raise TProtocol.TProtocolException(message='Required field num_used_workers is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1547,25 +1381,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class ClusterSummary: """ Attributes: @@ -1632,18 +1447,18 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('ClusterSummary') - if self.supervisors != None: + if self.supervisors is not None: oprot.writeFieldBegin('supervisors', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.supervisors)) for iter71 in self.supervisors: iter71.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() - if self.nimbus_uptime_secs != None: + if self.nimbus_uptime_secs is not None: oprot.writeFieldBegin('nimbus_uptime_secs', TType.I32, 2) oprot.writeI32(self.nimbus_uptime_secs) oprot.writeFieldEnd() - if self.topologies != None: + if self.topologies is not None: oprot.writeFieldBegin('topologies', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.topologies)) for iter72 in self.topologies: @@ -1653,6 +1468,16 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.supervisors is None: + raise TProtocol.TProtocolException(message='Required field supervisors is unset!') + if self.nimbus_uptime_secs is None: + raise TProtocol.TProtocolException(message='Required field nimbus_uptime_secs is unset!') + if self.topologies is None: + raise TProtocol.TProtocolException(message='Required field topologies is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1664,25 +1489,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class ErrorInfo: """ Attributes: @@ -1711,7 +1517,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.error = iprot.readString().decode('utf-8'); + self.error = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: @@ -1729,17 +1535,25 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('ErrorInfo') - if self.error != None: + if self.error is not None: oprot.writeFieldBegin('error', TType.STRING, 1) - oprot.writeString(self.error.encode('utf-8')); + oprot.writeString(self.error.encode('utf-8')) oprot.writeFieldEnd() - if self.error_time_secs != None: + if self.error_time_secs is not None: oprot.writeFieldBegin('error_time_secs', TType.I32, 2) oprot.writeI32(self.error_time_secs) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.error is None: + raise TProtocol.TProtocolException(message='Required field error is unset!') + if self.error_time_secs is None: + raise TProtocol.TProtocolException(message='Required field error_time_secs is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1751,25 +1565,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class BoltStats: """ Attributes: @@ -1804,7 +1599,7 @@ def read(self, iprot): self.acked = {} (_ktype74, _vtype75, _size73 ) = iprot.readMapBegin() for _i77 in xrange(_size73): - _key78 = iprot.readString().decode('utf-8'); + _key78 = iprot.readString().decode('utf-8') _val79 = {} (_ktype81, _vtype82, _size80 ) = iprot.readMapBegin() for _i84 in xrange(_size80): @@ -1822,7 +1617,7 @@ def read(self, iprot): self.failed = {} (_ktype88, _vtype89, _size87 ) = iprot.readMapBegin() for _i91 in xrange(_size87): - _key92 = iprot.readString().decode('utf-8'); + _key92 = iprot.readString().decode('utf-8') _val93 = {} (_ktype95, _vtype96, _size94 ) = iprot.readMapBegin() for _i98 in xrange(_size94): @@ -1840,7 +1635,7 @@ def read(self, iprot): self.process_ms_avg = {} (_ktype102, _vtype103, _size101 ) = iprot.readMapBegin() for _i105 in xrange(_size101): - _key106 = iprot.readString().decode('utf-8'); + _key106 = iprot.readString().decode('utf-8') _val107 = {} (_ktype109, _vtype110, _size108 ) = iprot.readMapBegin() for _i112 in xrange(_size108): @@ -1863,11 +1658,11 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('BoltStats') - if self.acked != None: + if self.acked is not None: oprot.writeFieldBegin('acked', TType.MAP, 1) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.acked)) for kiter115,viter116 in self.acked.items(): - oprot.writeString(kiter115.encode('utf-8')); + oprot.writeString(kiter115.encode('utf-8')) oprot.writeMapBegin(TType.STRUCT, TType.I64, len(viter116)) for kiter117,viter118 in viter116.items(): kiter117.write(oprot) @@ -1875,11 +1670,11 @@ def write(self, oprot): oprot.writeMapEnd() oprot.writeMapEnd() oprot.writeFieldEnd() - if self.failed != None: + if self.failed is not None: oprot.writeFieldBegin('failed', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.failed)) for kiter119,viter120 in self.failed.items(): - oprot.writeString(kiter119.encode('utf-8')); + oprot.writeString(kiter119.encode('utf-8')) oprot.writeMapBegin(TType.STRUCT, TType.I64, len(viter120)) for kiter121,viter122 in viter120.items(): kiter121.write(oprot) @@ -1887,11 +1682,11 @@ def write(self, oprot): oprot.writeMapEnd() oprot.writeMapEnd() oprot.writeFieldEnd() - if self.process_ms_avg != None: + if self.process_ms_avg is not None: oprot.writeFieldBegin('process_ms_avg', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.process_ms_avg)) for kiter123,viter124 in self.process_ms_avg.items(): - oprot.writeString(kiter123.encode('utf-8')); + oprot.writeString(kiter123.encode('utf-8')) oprot.writeMapBegin(TType.STRUCT, TType.DOUBLE, len(viter124)) for kiter125,viter126 in viter124.items(): kiter125.write(oprot) @@ -1902,6 +1697,16 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.acked is None: + raise TProtocol.TProtocolException(message='Required field acked is unset!') + if self.failed is None: + raise TProtocol.TProtocolException(message='Required field failed is unset!') + if self.process_ms_avg is None: + raise TProtocol.TProtocolException(message='Required field process_ms_avg is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1913,25 +1718,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class SpoutStats: """ Attributes: @@ -1966,7 +1752,7 @@ def read(self, iprot): self.acked = {} (_ktype128, _vtype129, _size127 ) = iprot.readMapBegin() for _i131 in xrange(_size127): - _key132 = iprot.readString().decode('utf-8'); + _key132 = iprot.readString().decode('utf-8') _val133 = {} (_ktype135, _vtype136, _size134 ) = iprot.readMapBegin() for _i138 in xrange(_size134): @@ -1983,7 +1769,7 @@ def read(self, iprot): self.failed = {} (_ktype142, _vtype143, _size141 ) = iprot.readMapBegin() for _i145 in xrange(_size141): - _key146 = iprot.readString().decode('utf-8'); + _key146 = iprot.readString().decode('utf-8') _val147 = {} (_ktype149, _vtype150, _size148 ) = iprot.readMapBegin() for _i152 in xrange(_size148): @@ -2000,7 +1786,7 @@ def read(self, iprot): self.complete_ms_avg = {} (_ktype156, _vtype157, _size155 ) = iprot.readMapBegin() for _i159 in xrange(_size155): - _key160 = iprot.readString().decode('utf-8'); + _key160 = iprot.readString().decode('utf-8') _val161 = {} (_ktype163, _vtype164, _size162 ) = iprot.readMapBegin() for _i166 in xrange(_size162): @@ -2022,11 +1808,11 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('SpoutStats') - if self.acked != None: + if self.acked is not None: oprot.writeFieldBegin('acked', TType.MAP, 1) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.acked)) for kiter169,viter170 in self.acked.items(): - oprot.writeString(kiter169.encode('utf-8')); + oprot.writeString(kiter169.encode('utf-8')) oprot.writeMapBegin(TType.I32, TType.I64, len(viter170)) for kiter171,viter172 in viter170.items(): oprot.writeI32(kiter171) @@ -2034,11 +1820,11 @@ def write(self, oprot): oprot.writeMapEnd() oprot.writeMapEnd() oprot.writeFieldEnd() - if self.failed != None: + if self.failed is not None: oprot.writeFieldBegin('failed', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.failed)) for kiter173,viter174 in self.failed.items(): - oprot.writeString(kiter173.encode('utf-8')); + oprot.writeString(kiter173.encode('utf-8')) oprot.writeMapBegin(TType.I32, TType.I64, len(viter174)) for kiter175,viter176 in viter174.items(): oprot.writeI32(kiter175) @@ -2046,11 +1832,11 @@ def write(self, oprot): oprot.writeMapEnd() oprot.writeMapEnd() oprot.writeFieldEnd() - if self.complete_ms_avg != None: + if self.complete_ms_avg is not None: oprot.writeFieldBegin('complete_ms_avg', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.complete_ms_avg)) for kiter177,viter178 in self.complete_ms_avg.items(): - oprot.writeString(kiter177.encode('utf-8')); + oprot.writeString(kiter177.encode('utf-8')) oprot.writeMapBegin(TType.I32, TType.DOUBLE, len(viter178)) for kiter179,viter180 in viter178.items(): oprot.writeI32(kiter179) @@ -2061,6 +1847,16 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.acked is None: + raise TProtocol.TProtocolException(message='Required field acked is unset!') + if self.failed is None: + raise TProtocol.TProtocolException(message='Required field failed is unset!') + if self.complete_ms_avg is None: + raise TProtocol.TProtocolException(message='Required field complete_ms_avg is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2072,25 +1868,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class TaskSpecificStats: """ Attributes: @@ -2139,17 +1916,21 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('TaskSpecificStats') - if self.bolt != None: + if self.bolt is not None: oprot.writeFieldBegin('bolt', TType.STRUCT, 1) self.bolt.write(oprot) oprot.writeFieldEnd() - if self.spout != None: + if self.spout is not None: oprot.writeFieldBegin('spout', TType.STRUCT, 2) self.spout.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2161,25 +1942,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class TaskStats: """ Attributes: @@ -2214,7 +1976,7 @@ def read(self, iprot): self.emitted = {} (_ktype182, _vtype183, _size181 ) = iprot.readMapBegin() for _i185 in xrange(_size181): - _key186 = iprot.readString().decode('utf-8'); + _key186 = iprot.readString().decode('utf-8') _val187 = {} (_ktype189, _vtype190, _size188 ) = iprot.readMapBegin() for _i192 in xrange(_size188): @@ -2231,7 +1993,7 @@ def read(self, iprot): self.transferred = {} (_ktype196, _vtype197, _size195 ) = iprot.readMapBegin() for _i199 in xrange(_size195): - _key200 = iprot.readString().decode('utf-8'); + _key200 = iprot.readString().decode('utf-8') _val201 = {} (_ktype203, _vtype204, _size202 ) = iprot.readMapBegin() for _i206 in xrange(_size202): @@ -2259,11 +2021,11 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('TaskStats') - if self.emitted != None: + if self.emitted is not None: oprot.writeFieldBegin('emitted', TType.MAP, 1) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.emitted)) for kiter209,viter210 in self.emitted.items(): - oprot.writeString(kiter209.encode('utf-8')); + oprot.writeString(kiter209.encode('utf-8')) oprot.writeMapBegin(TType.I32, TType.I64, len(viter210)) for kiter211,viter212 in viter210.items(): oprot.writeI32(kiter211) @@ -2271,11 +2033,11 @@ def write(self, oprot): oprot.writeMapEnd() oprot.writeMapEnd() oprot.writeFieldEnd() - if self.transferred != None: + if self.transferred is not None: oprot.writeFieldBegin('transferred', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.transferred)) for kiter213,viter214 in self.transferred.items(): - oprot.writeString(kiter213.encode('utf-8')); + oprot.writeString(kiter213.encode('utf-8')) oprot.writeMapBegin(TType.I32, TType.I64, len(viter214)) for kiter215,viter216 in viter214.items(): oprot.writeI32(kiter215) @@ -2283,13 +2045,23 @@ def write(self, oprot): oprot.writeMapEnd() oprot.writeMapEnd() oprot.writeFieldEnd() - if self.specific != None: + if self.specific is not None: oprot.writeFieldBegin('specific', TType.STRUCT, 3) self.specific.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.emitted is None: + raise TProtocol.TProtocolException(message='Required field emitted is unset!') + if self.transferred is None: + raise TProtocol.TProtocolException(message='Required field transferred is unset!') + if self.specific is None: + raise TProtocol.TProtocolException(message='Required field specific is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2301,25 +2073,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class TaskSummary: """ Attributes: @@ -2373,7 +2126,7 @@ def read(self, iprot): iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.host = iprot.readString().decode('utf-8'); + self.host = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 4: @@ -2413,40 +2166,56 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('TaskSummary') - if self.task_id != None: + if self.task_id is not None: oprot.writeFieldBegin('task_id', TType.I32, 1) oprot.writeI32(self.task_id) oprot.writeFieldEnd() - if self.component_id != None: + if self.component_id is not None: oprot.writeFieldBegin('component_id', TType.I32, 2) oprot.writeI32(self.component_id) oprot.writeFieldEnd() - if self.host != None: + if self.host is not None: oprot.writeFieldBegin('host', TType.STRING, 3) - oprot.writeString(self.host.encode('utf-8')); + oprot.writeString(self.host.encode('utf-8')) oprot.writeFieldEnd() - if self.port != None: + if self.port is not None: oprot.writeFieldBegin('port', TType.I32, 4) oprot.writeI32(self.port) oprot.writeFieldEnd() - if self.uptime_secs != None: + if self.uptime_secs is not None: oprot.writeFieldBegin('uptime_secs', TType.I32, 5) oprot.writeI32(self.uptime_secs) oprot.writeFieldEnd() - if self.errors != None: + if self.errors is not None: oprot.writeFieldBegin('errors', TType.LIST, 6) oprot.writeListBegin(TType.STRUCT, len(self.errors)) for iter223 in self.errors: iter223.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() - if self.stats != None: + if self.stats is not None: oprot.writeFieldBegin('stats', TType.STRUCT, 7) self.stats.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.task_id is None: + raise TProtocol.TProtocolException(message='Required field task_id is unset!') + if self.component_id is None: + raise TProtocol.TProtocolException(message='Required field component_id is unset!') + if self.host is None: + raise TProtocol.TProtocolException(message='Required field host is unset!') + if self.port is None: + raise TProtocol.TProtocolException(message='Required field port is unset!') + if self.uptime_secs is None: + raise TProtocol.TProtocolException(message='Required field uptime_secs is unset!') + if self.errors is None: + raise TProtocol.TProtocolException(message='Required field errors is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2458,25 +2227,6 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx - class TopologyInfo: """ Attributes: @@ -2511,12 +2261,12 @@ def read(self, iprot): break if fid == 1: if ftype == TType.STRING: - self.id = iprot.readString().decode('utf-8'); + self.id = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString().decode('utf-8'); + self.name = iprot.readString().decode('utf-8') else: iprot.skip(ftype) elif fid == 3: @@ -2545,19 +2295,19 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('TopologyInfo') - if self.id != None: + if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id.encode('utf-8')); + oprot.writeString(self.id.encode('utf-8')) oprot.writeFieldEnd() - if self.name != None: + if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name.encode('utf-8')); + oprot.writeString(self.name.encode('utf-8')) oprot.writeFieldEnd() - if self.uptime_secs != None: + if self.uptime_secs is not None: oprot.writeFieldBegin('uptime_secs', TType.I32, 3) oprot.writeI32(self.uptime_secs) oprot.writeFieldEnd() - if self.tasks != None: + if self.tasks is not None: oprot.writeFieldBegin('tasks', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.tasks)) for iter230 in self.tasks: @@ -2567,6 +2317,18 @@ def write(self, oprot): oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + if self.id is None: + raise TProtocol.TProtocolException(message='Required field id is unset!') + if self.name is None: + raise TProtocol.TProtocolException(message='Required field name is unset!') + if self.uptime_secs is None: + raise TProtocol.TProtocolException(message='Required field uptime_secs is unset!') + if self.tasks is None: + raise TProtocol.TProtocolException(message='Required field tasks is unset!') + return + + def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -2577,23 +2339,3 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) - - def union_value(self): - d = self.__dict__ - for key in d: - val = d[key] - if not val is None: - return val - - def get_set_field(self): - for attr in self.__dict__: - if not self.__dict__[attr] is None: - return attr - - def get_set_field_id(self): - for idx, tup in enumerate(self.__class__.thrift_spec): - if tup: - key = tup[2] - if not self.__dict__[key] is None: - return idx -