You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by kn...@apache.org on 2015/02/17 18:11:12 UTC
[03/18] storm git commit: Upgrade to thrift-0.9.2
http://git-wip-us.apache.org/repos/asf/storm/blob/ef51dbee/storm-core/src/jvm/backtype/storm/generated/SubmitOptions.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/generated/SubmitOptions.java b/storm-core/src/jvm/backtype/storm/generated/SubmitOptions.java
index f885f69..4c2e310 100644
--- a/storm-core/src/jvm/backtype/storm/generated/SubmitOptions.java
+++ b/storm-core/src/jvm/backtype/storm/generated/SubmitOptions.java
@@ -16,13 +16,24 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package backtype.storm.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -35,17 +46,26 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, SubmitOptions._Fields>, java.io.Serializable, Cloneable {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-2-2")
+public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, SubmitOptions._Fields>, java.io.Serializable, Cloneable, Comparable<SubmitOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SubmitOptions");
private static final org.apache.thrift.protocol.TField INITIAL_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("initial_status", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField CREDS_FIELD_DESC = new org.apache.thrift.protocol.TField("creds", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SubmitOptionsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SubmitOptionsTupleSchemeFactory());
+ }
+
private TopologyInitialStatus initial_status; // required
- private Credentials creds; // required
+ private Credentials creds; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -113,7 +133,7 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
// isset id assignments
-
+ private static final _Fields optionals[] = {_Fields.CREDS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -295,45 +315,45 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_initial_status = true && (is_set_initial_status());
- builder.append(present_initial_status);
+ list.add(present_initial_status);
if (present_initial_status)
- builder.append(initial_status.getValue());
+ list.add(initial_status.getValue());
boolean present_creds = true && (is_set_creds());
- builder.append(present_creds);
+ list.add(present_creds);
if (present_creds)
- builder.append(creds);
+ list.add(creds);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(SubmitOptions other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- SubmitOptions typedOther = (SubmitOptions)other;
- lastComparison = Boolean.valueOf(is_set_initial_status()).compareTo(typedOther.is_set_initial_status());
+ lastComparison = Boolean.valueOf(is_set_initial_status()).compareTo(other.is_set_initial_status());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_initial_status()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.initial_status, typedOther.initial_status);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.initial_status, other.initial_status);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_creds()).compareTo(typedOther.is_set_creds());
+ lastComparison = Boolean.valueOf(is_set_creds()).compareTo(other.is_set_creds());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_creds()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, typedOther.creds);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creds, other.creds);
if (lastComparison != 0) {
return lastComparison;
}
@@ -346,57 +366,11 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
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 == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // INITIAL_STATUS
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.initial_status = TopologyInitialStatus.findByValue(iprot.readI32());
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // CREDS
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.creds = new Credentials();
- this.creds.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.initial_status != null) {
- oprot.writeFieldBegin(INITIAL_STATUS_FIELD_DESC);
- oprot.writeI32(this.initial_status.getValue());
- oprot.writeFieldEnd();
- }
- if (this.creds != null) {
- if (is_set_creds()) {
- oprot.writeFieldBegin(CREDS_FIELD_DESC);
- this.creds.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -431,6 +405,10 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
throw new org.apache.thrift.protocol.TProtocolException("Required field 'initial_status' is unset! Struct:" + toString());
}
+ // check for sub-struct validity
+ if (creds != null) {
+ creds.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -449,5 +427,107 @@ public class SubmitOptions implements org.apache.thrift.TBase<SubmitOptions, Sub
}
}
+ private static class SubmitOptionsStandardSchemeFactory implements SchemeFactory {
+ public SubmitOptionsStandardScheme getScheme() {
+ return new SubmitOptionsStandardScheme();
+ }
+ }
+
+ private static class SubmitOptionsStandardScheme extends StandardScheme<SubmitOptions> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, SubmitOptions struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // INITIAL_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.initial_status = backtype.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32());
+ struct.set_initial_status_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CREDS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.creds = new Credentials();
+ struct.creds.read(iprot);
+ struct.set_creds_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, SubmitOptions struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.initial_status != null) {
+ oprot.writeFieldBegin(INITIAL_STATUS_FIELD_DESC);
+ oprot.writeI32(struct.initial_status.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.creds != null) {
+ if (struct.is_set_creds()) {
+ oprot.writeFieldBegin(CREDS_FIELD_DESC);
+ struct.creds.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SubmitOptionsTupleSchemeFactory implements SchemeFactory {
+ public SubmitOptionsTupleScheme getScheme() {
+ return new SubmitOptionsTupleScheme();
+ }
+ }
+
+ private static class SubmitOptionsTupleScheme extends TupleScheme<SubmitOptions> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, SubmitOptions struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.initial_status.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.is_set_creds()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.is_set_creds()) {
+ struct.creds.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, SubmitOptions struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.initial_status = backtype.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32());
+ struct.set_initial_status_isSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.creds = new Credentials();
+ struct.creds.read(iprot);
+ struct.set_creds_isSet(true);
+ }
+ }
+ }
+
}
http://git-wip-us.apache.org/repos/asf/storm/blob/ef51dbee/storm-core/src/jvm/backtype/storm/generated/SupervisorSummary.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/generated/SupervisorSummary.java b/storm-core/src/jvm/backtype/storm/generated/SupervisorSummary.java
index 7072cdd..69fca27 100644
--- a/storm-core/src/jvm/backtype/storm/generated/SupervisorSummary.java
+++ b/storm-core/src/jvm/backtype/storm/generated/SupervisorSummary.java
@@ -16,13 +16,24 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package backtype.storm.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -35,10 +46,13 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSummary, SupervisorSummary._Fields>, java.io.Serializable, Cloneable {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-2-2")
+public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSummary, SupervisorSummary._Fields>, java.io.Serializable, Cloneable, Comparable<SupervisorSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.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);
@@ -47,6 +61,12 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
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 org.apache.thrift.protocol.TField SUPERVISOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("supervisor_id", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new SupervisorSummaryStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new SupervisorSummaryTupleSchemeFactory());
+ }
+
private String host; // required
private int uptime_secs; // required
private int num_workers; // required
@@ -127,8 +147,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
private static final int __UPTIME_SECS_ISSET_ID = 0;
private static final int __NUM_WORKERS_ISSET_ID = 1;
private static final int __NUM_USED_WORKERS_ISSET_ID = 2;
- private BitSet __isset_bit_vector = new BitSet(3);
-
+ private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -171,8 +190,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
* Performs a deep copy on <i>other</i>.
*/
public SupervisorSummary(SupervisorSummary other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.is_set_host()) {
this.host = other.host;
}
@@ -233,16 +251,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_uptime_secs() {
- __isset_bit_vector.clear(__UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return __isset_bit_vector.get(__UPTIME_SECS_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bit_vector.set(__UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
public int get_num_workers() {
@@ -255,16 +273,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_num_workers() {
- __isset_bit_vector.clear(__NUM_WORKERS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
/** 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);
+ return EncodingUtils.testBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID);
}
public void set_num_workers_isSet(boolean value) {
- __isset_bit_vector.set(__NUM_WORKERS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_WORKERS_ISSET_ID, value);
}
public int get_num_used_workers() {
@@ -277,16 +295,16 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
public void unset_num_used_workers() {
- __isset_bit_vector.clear(__NUM_USED_WORKERS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID);
}
/** 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);
+ return EncodingUtils.testBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID);
}
public void set_num_used_workers_isSet(boolean value) {
- __isset_bit_vector.set(__NUM_USED_WORKERS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_USED_WORKERS_ISSET_ID, value);
}
public String get_supervisor_id() {
@@ -462,90 +480,90 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_host = true && (is_set_host());
- builder.append(present_host);
+ list.add(present_host);
if (present_host)
- builder.append(host);
+ list.add(host);
boolean present_uptime_secs = true;
- builder.append(present_uptime_secs);
+ list.add(present_uptime_secs);
if (present_uptime_secs)
- builder.append(uptime_secs);
+ list.add(uptime_secs);
boolean present_num_workers = true;
- builder.append(present_num_workers);
+ list.add(present_num_workers);
if (present_num_workers)
- builder.append(num_workers);
+ list.add(num_workers);
boolean present_num_used_workers = true;
- builder.append(present_num_used_workers);
+ list.add(present_num_used_workers);
if (present_num_used_workers)
- builder.append(num_used_workers);
+ list.add(num_used_workers);
boolean present_supervisor_id = true && (is_set_supervisor_id());
- builder.append(present_supervisor_id);
+ list.add(present_supervisor_id);
if (present_supervisor_id)
- builder.append(supervisor_id);
+ list.add(supervisor_id);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(SupervisorSummary other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- SupervisorSummary typedOther = (SupervisorSummary)other;
- lastComparison = Boolean.valueOf(is_set_host()).compareTo(typedOther.is_set_host());
+ lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_host()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, typedOther.host);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(typedOther.is_set_uptime_secs());
+ lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_uptime_secs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, other.uptime_secs);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_workers()).compareTo(typedOther.is_set_num_workers());
+ lastComparison = Boolean.valueOf(is_set_num_workers()).compareTo(other.is_set_num_workers());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_num_workers()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_workers, typedOther.num_workers);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_workers, other.num_workers);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_num_used_workers()).compareTo(typedOther.is_set_num_used_workers());
+ lastComparison = Boolean.valueOf(is_set_num_used_workers()).compareTo(other.is_set_num_used_workers());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_num_used_workers()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_used_workers, typedOther.num_used_workers);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_used_workers, other.num_used_workers);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_supervisor_id()).compareTo(typedOther.is_set_supervisor_id());
+ lastComparison = Boolean.valueOf(is_set_supervisor_id()).compareTo(other.is_set_supervisor_id());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_supervisor_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supervisor_id, typedOther.supervisor_id);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supervisor_id, other.supervisor_id);
if (lastComparison != 0) {
return lastComparison;
}
@@ -558,87 +576,11 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
}
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 == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // HOST
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.host = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // UPTIME_SECS
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.uptime_secs = iprot.readI32();
- set_uptime_secs_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // NUM_WORKERS
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.num_workers = iprot.readI32();
- set_num_workers_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // NUM_USED_WORKERS
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.num_used_workers = iprot.readI32();
- set_num_used_workers_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5: // SUPERVISOR_ID
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.supervisor_id = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.host != null) {
- oprot.writeFieldBegin(HOST_FIELD_DESC);
- oprot.writeString(this.host);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC);
- oprot.writeI32(this.uptime_secs);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NUM_WORKERS_FIELD_DESC);
- oprot.writeI32(this.num_workers);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NUM_USED_WORKERS_FIELD_DESC);
- oprot.writeI32(this.num_used_workers);
- oprot.writeFieldEnd();
- if (this.supervisor_id != null) {
- oprot.writeFieldBegin(SUPERVISOR_ID_FIELD_DESC);
- oprot.writeString(this.supervisor_id);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -699,6 +641,7 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
throw new org.apache.thrift.protocol.TProtocolException("Required field 'supervisor_id' is unset! Struct:" + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -712,12 +655,142 @@ public class SupervisorSummary implements org.apache.thrift.TBase<SupervisorSumm
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);
+ __isset_bitfield = 0;
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);
}
}
+ private static class SupervisorSummaryStandardSchemeFactory implements SchemeFactory {
+ public SupervisorSummaryStandardScheme getScheme() {
+ return new SupervisorSummaryStandardScheme();
+ }
+ }
+
+ private static class SupervisorSummaryStandardScheme extends StandardScheme<SupervisorSummary> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, SupervisorSummary struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // HOST
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.host = iprot.readString();
+ struct.set_host_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // UPTIME_SECS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.uptime_secs = iprot.readI32();
+ struct.set_uptime_secs_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NUM_WORKERS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.num_workers = iprot.readI32();
+ struct.set_num_workers_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // NUM_USED_WORKERS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.num_used_workers = iprot.readI32();
+ struct.set_num_used_workers_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // SUPERVISOR_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.supervisor_id = iprot.readString();
+ struct.set_supervisor_id_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, SupervisorSummary struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.host != null) {
+ oprot.writeFieldBegin(HOST_FIELD_DESC);
+ oprot.writeString(struct.host);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC);
+ oprot.writeI32(struct.uptime_secs);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(NUM_WORKERS_FIELD_DESC);
+ oprot.writeI32(struct.num_workers);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(NUM_USED_WORKERS_FIELD_DESC);
+ oprot.writeI32(struct.num_used_workers);
+ oprot.writeFieldEnd();
+ if (struct.supervisor_id != null) {
+ oprot.writeFieldBegin(SUPERVISOR_ID_FIELD_DESC);
+ oprot.writeString(struct.supervisor_id);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class SupervisorSummaryTupleSchemeFactory implements SchemeFactory {
+ public SupervisorSummaryTupleScheme getScheme() {
+ return new SupervisorSummaryTupleScheme();
+ }
+ }
+
+ private static class SupervisorSummaryTupleScheme extends TupleScheme<SupervisorSummary> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, SupervisorSummary struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.host);
+ oprot.writeI32(struct.uptime_secs);
+ oprot.writeI32(struct.num_workers);
+ oprot.writeI32(struct.num_used_workers);
+ oprot.writeString(struct.supervisor_id);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, SupervisorSummary struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.host = iprot.readString();
+ struct.set_host_isSet(true);
+ struct.uptime_secs = iprot.readI32();
+ struct.set_uptime_secs_isSet(true);
+ struct.num_workers = iprot.readI32();
+ struct.set_num_workers_isSet(true);
+ struct.num_used_workers = iprot.readI32();
+ struct.set_num_used_workers_isSet(true);
+ struct.supervisor_id = iprot.readString();
+ struct.set_supervisor_id_isSet(true);
+ }
+ }
+
}
http://git-wip-us.apache.org/repos/asf/storm/blob/ef51dbee/storm-core/src/jvm/backtype/storm/generated/TopologyInfo.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/generated/TopologyInfo.java b/storm-core/src/jvm/backtype/storm/generated/TopologyInfo.java
index 2c36d4e..3a9b407 100644
--- a/storm-core/src/jvm/backtype/storm/generated/TopologyInfo.java
+++ b/storm-core/src/jvm/backtype/storm/generated/TopologyInfo.java
@@ -16,13 +16,24 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package backtype.storm.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -35,10 +46,13 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, TopologyInfo._Fields>, java.io.Serializable, Cloneable {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-2-2")
+public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, TopologyInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TopologyInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.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);
@@ -50,14 +64,20 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
private static final org.apache.thrift.protocol.TField SCHED_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("sched_status", org.apache.thrift.protocol.TType.STRING, (short)513);
private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)514);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TopologyInfoStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TopologyInfoTupleSchemeFactory());
+ }
+
private String id; // required
private String name; // required
private int uptime_secs; // required
private List<ExecutorSummary> executors; // required
private String status; // required
private Map<String,List<ErrorInfo>> errors; // required
- private String sched_status; // required
- private String owner; // required
+ private String sched_status; // optional
+ private String owner; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -140,8 +160,8 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
// isset id assignments
private static final int __UPTIME_SECS_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
-
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.SCHED_STATUS,_Fields.OWNER};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -194,8 +214,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
* Performs a deep copy on <i>other</i>.
*/
public TopologyInfo(TopologyInfo other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.is_set_id()) {
this.id = other.id;
}
@@ -204,7 +223,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
this.uptime_secs = other.uptime_secs;
if (other.is_set_executors()) {
- List<ExecutorSummary> __this__executors = new ArrayList<ExecutorSummary>();
+ List<ExecutorSummary> __this__executors = new ArrayList<ExecutorSummary>(other.executors.size());
for (ExecutorSummary other_element : other.executors) {
__this__executors.add(new ExecutorSummary(other_element));
}
@@ -214,7 +233,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
this.status = other.status;
}
if (other.is_set_errors()) {
- Map<String,List<ErrorInfo>> __this__errors = new HashMap<String,List<ErrorInfo>>();
+ Map<String,List<ErrorInfo>> __this__errors = new HashMap<String,List<ErrorInfo>>(other.errors.size());
for (Map.Entry<String, List<ErrorInfo>> other_element : other.errors.entrySet()) {
String other_element_key = other_element.getKey();
@@ -222,7 +241,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
String __this__errors_copy_key = other_element_key;
- List<ErrorInfo> __this__errors_copy_value = new ArrayList<ErrorInfo>();
+ List<ErrorInfo> __this__errors_copy_value = new ArrayList<ErrorInfo>(other_element_value.size());
for (ErrorInfo other_element_value_element : other_element_value) {
__this__errors_copy_value.add(new ErrorInfo(other_element_value_element));
}
@@ -312,16 +331,16 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
public void unset_uptime_secs() {
- __isset_bit_vector.clear(__UPTIME_SECS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
/** Returns true if field uptime_secs is set (has been assigned a value) and false otherwise */
public boolean is_set_uptime_secs() {
- return __isset_bit_vector.get(__UPTIME_SECS_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID);
}
public void set_uptime_secs_isSet(boolean value) {
- __isset_bit_vector.set(__UPTIME_SECS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPTIME_SECS_ISSET_ID, value);
}
public int get_executors_size() {
@@ -681,135 +700,135 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_id = true && (is_set_id());
- builder.append(present_id);
+ list.add(present_id);
if (present_id)
- builder.append(id);
+ list.add(id);
boolean present_name = true && (is_set_name());
- builder.append(present_name);
+ list.add(present_name);
if (present_name)
- builder.append(name);
+ list.add(name);
boolean present_uptime_secs = true;
- builder.append(present_uptime_secs);
+ list.add(present_uptime_secs);
if (present_uptime_secs)
- builder.append(uptime_secs);
+ list.add(uptime_secs);
boolean present_executors = true && (is_set_executors());
- builder.append(present_executors);
+ list.add(present_executors);
if (present_executors)
- builder.append(executors);
+ list.add(executors);
boolean present_status = true && (is_set_status());
- builder.append(present_status);
+ list.add(present_status);
if (present_status)
- builder.append(status);
+ list.add(status);
boolean present_errors = true && (is_set_errors());
- builder.append(present_errors);
+ list.add(present_errors);
if (present_errors)
- builder.append(errors);
+ list.add(errors);
boolean present_sched_status = true && (is_set_sched_status());
- builder.append(present_sched_status);
+ list.add(present_sched_status);
if (present_sched_status)
- builder.append(sched_status);
+ list.add(sched_status);
boolean present_owner = true && (is_set_owner());
- builder.append(present_owner);
+ list.add(present_owner);
if (present_owner)
- builder.append(owner);
+ list.add(owner);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(TopologyInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TopologyInfo typedOther = (TopologyInfo)other;
- lastComparison = Boolean.valueOf(is_set_id()).compareTo(typedOther.is_set_id());
+ lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_id()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_name()).compareTo(typedOther.is_set_name());
+ lastComparison = Boolean.valueOf(is_set_name()).compareTo(other.is_set_name());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_name()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(typedOther.is_set_uptime_secs());
+ lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_uptime_secs()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, typedOther.uptime_secs);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, other.uptime_secs);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_executors()).compareTo(typedOther.is_set_executors());
+ lastComparison = Boolean.valueOf(is_set_executors()).compareTo(other.is_set_executors());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_executors()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executors, typedOther.executors);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executors, other.executors);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_status()).compareTo(typedOther.is_set_status());
+ lastComparison = Boolean.valueOf(is_set_status()).compareTo(other.is_set_status());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_status()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_errors()).compareTo(typedOther.is_set_errors());
+ lastComparison = Boolean.valueOf(is_set_errors()).compareTo(other.is_set_errors());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_errors()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, typedOther.errors);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errors, other.errors);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_sched_status()).compareTo(typedOther.is_set_sched_status());
+ lastComparison = Boolean.valueOf(is_set_sched_status()).compareTo(other.is_set_sched_status());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_sched_status()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sched_status, typedOther.sched_status);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sched_status, other.sched_status);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_owner()).compareTo(typedOther.is_set_owner());
+ lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner());
if (lastComparison != 0) {
return lastComparison;
}
if (is_set_owner()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, typedOther.owner);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner);
if (lastComparison != 0) {
return lastComparison;
}
@@ -822,185 +841,11 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
}
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 == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // ID
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.id = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // NAME
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.name = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // UPTIME_SECS
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.uptime_secs = iprot.readI32();
- set_uptime_secs_isSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // EXECUTORS
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list145 = iprot.readListBegin();
- this.executors = new ArrayList<ExecutorSummary>(_list145.size);
- for (int _i146 = 0; _i146 < _list145.size; ++_i146)
- {
- ExecutorSummary _elem147; // required
- _elem147 = new ExecutorSummary();
- _elem147.read(iprot);
- this.executors.add(_elem147);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5: // STATUS
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.status = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 6: // ERRORS
- if (field.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map148 = iprot.readMapBegin();
- this.errors = new HashMap<String,List<ErrorInfo>>(2*_map148.size);
- for (int _i149 = 0; _i149 < _map148.size; ++_i149)
- {
- String _key150; // required
- List<ErrorInfo> _val151; // required
- _key150 = iprot.readString();
- {
- org.apache.thrift.protocol.TList _list152 = iprot.readListBegin();
- _val151 = new ArrayList<ErrorInfo>(_list152.size);
- for (int _i153 = 0; _i153 < _list152.size; ++_i153)
- {
- ErrorInfo _elem154; // required
- _elem154 = new ErrorInfo();
- _elem154.read(iprot);
- _val151.add(_elem154);
- }
- iprot.readListEnd();
- }
- this.errors.put(_key150, _val151);
- }
- iprot.readMapEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 513: // SCHED_STATUS
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.sched_status = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 514: // OWNER
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.owner = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.id != null) {
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeString(this.id);
- oprot.writeFieldEnd();
- }
- if (this.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(this.name);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC);
- oprot.writeI32(this.uptime_secs);
- oprot.writeFieldEnd();
- if (this.executors != null) {
- oprot.writeFieldBegin(EXECUTORS_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.executors.size()));
- for (ExecutorSummary _iter155 : this.executors)
- {
- _iter155.write(oprot);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.status != null) {
- oprot.writeFieldBegin(STATUS_FIELD_DESC);
- oprot.writeString(this.status);
- oprot.writeFieldEnd();
- }
- if (this.errors != null) {
- oprot.writeFieldBegin(ERRORS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, this.errors.size()));
- for (Map.Entry<String, List<ErrorInfo>> _iter156 : this.errors.entrySet())
- {
- oprot.writeString(_iter156.getKey());
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter156.getValue().size()));
- for (ErrorInfo _iter157 : _iter156.getValue())
- {
- _iter157.write(oprot);
- }
- oprot.writeListEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.sched_status != null) {
- if (is_set_sched_status()) {
- oprot.writeFieldBegin(SCHED_STATUS_FIELD_DESC);
- oprot.writeString(this.sched_status);
- oprot.writeFieldEnd();
- }
- }
- if (this.owner != null) {
- if (is_set_owner()) {
- oprot.writeFieldBegin(OWNER_FIELD_DESC);
- oprot.writeString(this.owner);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -1101,6 +946,7 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
throw new org.apache.thrift.protocol.TProtocolException("Required field 'errors' is unset! Struct:" + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -1114,12 +960,321 @@ public class TopologyInfo implements org.apache.thrift.TBase<TopologyInfo, Topol
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);
+ __isset_bitfield = 0;
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);
}
}
+ private static class TopologyInfoStandardSchemeFactory implements SchemeFactory {
+ public TopologyInfoStandardScheme getScheme() {
+ return new TopologyInfoStandardScheme();
+ }
+ }
+
+ private static class TopologyInfoStandardScheme extends StandardScheme<TopologyInfo> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TopologyInfo struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.id = iprot.readString();
+ struct.set_id_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.set_name_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // UPTIME_SECS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.uptime_secs = iprot.readI32();
+ struct.set_uptime_secs_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // EXECUTORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list290 = iprot.readListBegin();
+ struct.executors = new ArrayList<ExecutorSummary>(_list290.size);
+ ExecutorSummary _elem291;
+ for (int _i292 = 0; _i292 < _list290.size; ++_i292)
+ {
+ _elem291 = new ExecutorSummary();
+ _elem291.read(iprot);
+ struct.executors.add(_elem291);
+ }
+ iprot.readListEnd();
+ }
+ struct.set_executors_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.status = iprot.readString();
+ struct.set_status_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // ERRORS
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map293 = iprot.readMapBegin();
+ struct.errors = new HashMap<String,List<ErrorInfo>>(2*_map293.size);
+ String _key294;
+ List<ErrorInfo> _val295;
+ for (int _i296 = 0; _i296 < _map293.size; ++_i296)
+ {
+ _key294 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TList _list297 = iprot.readListBegin();
+ _val295 = new ArrayList<ErrorInfo>(_list297.size);
+ ErrorInfo _elem298;
+ for (int _i299 = 0; _i299 < _list297.size; ++_i299)
+ {
+ _elem298 = new ErrorInfo();
+ _elem298.read(iprot);
+ _val295.add(_elem298);
+ }
+ iprot.readListEnd();
+ }
+ struct.errors.put(_key294, _val295);
+ }
+ iprot.readMapEnd();
+ }
+ struct.set_errors_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 513: // SCHED_STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.sched_status = iprot.readString();
+ struct.set_sched_status_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 514: // OWNER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.owner = iprot.readString();
+ struct.set_owner_isSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TopologyInfo struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.id != null) {
+ oprot.writeFieldBegin(ID_FIELD_DESC);
+ oprot.writeString(struct.id);
+ oprot.writeFieldEnd();
+ }
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC);
+ oprot.writeI32(struct.uptime_secs);
+ oprot.writeFieldEnd();
+ if (struct.executors != null) {
+ oprot.writeFieldBegin(EXECUTORS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.executors.size()));
+ for (ExecutorSummary _iter300 : struct.executors)
+ {
+ _iter300.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.status != null) {
+ oprot.writeFieldBegin(STATUS_FIELD_DESC);
+ oprot.writeString(struct.status);
+ oprot.writeFieldEnd();
+ }
+ if (struct.errors != null) {
+ oprot.writeFieldBegin(ERRORS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.errors.size()));
+ for (Map.Entry<String, List<ErrorInfo>> _iter301 : struct.errors.entrySet())
+ {
+ oprot.writeString(_iter301.getKey());
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter301.getValue().size()));
+ for (ErrorInfo _iter302 : _iter301.getValue())
+ {
+ _iter302.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.sched_status != null) {
+ if (struct.is_set_sched_status()) {
+ oprot.writeFieldBegin(SCHED_STATUS_FIELD_DESC);
+ oprot.writeString(struct.sched_status);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.owner != null) {
+ if (struct.is_set_owner()) {
+ oprot.writeFieldBegin(OWNER_FIELD_DESC);
+ oprot.writeString(struct.owner);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TopologyInfoTupleSchemeFactory implements SchemeFactory {
+ public TopologyInfoTupleScheme getScheme() {
+ return new TopologyInfoTupleScheme();
+ }
+ }
+
+ private static class TopologyInfoTupleScheme extends TupleScheme<TopologyInfo> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TopologyInfo struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.id);
+ oprot.writeString(struct.name);
+ oprot.writeI32(struct.uptime_secs);
+ {
+ oprot.writeI32(struct.executors.size());
+ for (ExecutorSummary _iter303 : struct.executors)
+ {
+ _iter303.write(oprot);
+ }
+ }
+ oprot.writeString(struct.status);
+ {
+ oprot.writeI32(struct.errors.size());
+ for (Map.Entry<String, List<ErrorInfo>> _iter304 : struct.errors.entrySet())
+ {
+ oprot.writeString(_iter304.getKey());
+ {
+ oprot.writeI32(_iter304.getValue().size());
+ for (ErrorInfo _iter305 : _iter304.getValue())
+ {
+ _iter305.write(oprot);
+ }
+ }
+ }
+ }
+ BitSet optionals = new BitSet();
+ if (struct.is_set_sched_status()) {
+ optionals.set(0);
+ }
+ if (struct.is_set_owner()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.is_set_sched_status()) {
+ oprot.writeString(struct.sched_status);
+ }
+ if (struct.is_set_owner()) {
+ oprot.writeString(struct.owner);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TopologyInfo struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.id = iprot.readString();
+ struct.set_id_isSet(true);
+ struct.name = iprot.readString();
+ struct.set_name_isSet(true);
+ struct.uptime_secs = iprot.readI32();
+ struct.set_uptime_secs_isSet(true);
+ {
+ org.apache.thrift.protocol.TList _list306 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.executors = new ArrayList<ExecutorSummary>(_list306.size);
+ ExecutorSummary _elem307;
+ for (int _i308 = 0; _i308 < _list306.size; ++_i308)
+ {
+ _elem307 = new ExecutorSummary();
+ _elem307.read(iprot);
+ struct.executors.add(_elem307);
+ }
+ }
+ struct.set_executors_isSet(true);
+ struct.status = iprot.readString();
+ struct.set_status_isSet(true);
+ {
+ org.apache.thrift.protocol.TMap _map309 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
+ struct.errors = new HashMap<String,List<ErrorInfo>>(2*_map309.size);
+ String _key310;
+ List<ErrorInfo> _val311;
+ for (int _i312 = 0; _i312 < _map309.size; ++_i312)
+ {
+ _key310 = iprot.readString();
+ {
+ org.apache.thrift.protocol.TList _list313 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ _val311 = new ArrayList<ErrorInfo>(_list313.size);
+ ErrorInfo _elem314;
+ for (int _i315 = 0; _i315 < _list313.size; ++_i315)
+ {
+ _elem314 = new ErrorInfo();
+ _elem314.read(iprot);
+ _val311.add(_elem314);
+ }
+ }
+ struct.errors.put(_key310, _val311);
+ }
+ }
+ struct.set_errors_isSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.sched_status = iprot.readString();
+ struct.set_sched_status_isSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.owner = iprot.readString();
+ struct.set_owner_isSet(true);
+ }
+ }
+ }
+
}
http://git-wip-us.apache.org/repos/asf/storm/blob/ef51dbee/storm-core/src/jvm/backtype/storm/generated/TopologyInitialStatus.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/generated/TopologyInitialStatus.java b/storm-core/src/jvm/backtype/storm/generated/TopologyInitialStatus.java
index 3936b08..a8d6c9e 100644
--- a/storm-core/src/jvm/backtype/storm/generated/TopologyInitialStatus.java
+++ b/storm-core/src/jvm/backtype/storm/generated/TopologyInitialStatus.java
@@ -16,9 +16,10 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package backtype.storm.generated;