http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java b/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java index b100da1..e23a145 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java +++ b/storm-client/src/jvm/org/apache/storm/generated/HBMessageData.java @@ -16,41 +16,14 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.storm.generated; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMessageData._Fields> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBMessageData"); private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -69,10 +42,10 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes NODES((short)5, "nodes"), MESSAGE_BLOB((short)7, "message_blob"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -105,21 +78,21 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -128,27 +101,27 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PULSE, new org.apache.thrift.meta_data.FieldMetaData("pulse", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PULSE, new org.apache.thrift.meta_data.FieldMetaData("pulse", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HBPulse.class))); - tmpMap.put(_Fields.BOOLVAL, new org.apache.thrift.meta_data.FieldMetaData("boolval", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BOOLVAL, new org.apache.thrift.meta_data.FieldMetaData("boolval", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.RECORDS, new org.apache.thrift.meta_data.FieldMetaData("records", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.RECORDS, new org.apache.thrift.meta_data.FieldMetaData("records", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HBRecords.class))); - tmpMap.put(_Fields.NODES, new org.apache.thrift.meta_data.FieldMetaData("nodes", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NODES, new org.apache.thrift.meta_data.FieldMetaData("nodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HBNodes.class))); tmpMap.put(_Fields.MESSAGE_BLOB, new org.apache.thrift.meta_data.FieldMetaData("message_blob", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBMessageData.class, metaDataMap); } @@ -156,7 +129,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes super(); } - public HBMessageData(_Fields setField, Object value) { + public HBMessageData(_Fields setField, java.lang.Object value) { super(setField, value); } @@ -167,7 +140,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes return new HBMessageData(this); } - public static HBMessageData path(String value) { + public static HBMessageData path(java.lang.String value) { HBMessageData x = new HBMessageData(); x.set_path(value); return x; @@ -197,7 +170,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes return x; } - public static HBMessageData message_blob(ByteBuffer value) { + public static HBMessageData message_blob(java.nio.ByteBuffer value) { HBMessageData x = new HBMessageData(); x.set_message_blob(value); return x; @@ -205,57 +178,57 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes public static HBMessageData message_blob(byte[] value) { HBMessageData x = new HBMessageData(); - x.set_message_blob(ByteBuffer.wrap(Arrays.copyOf(value, value.length))); + x.set_message_blob(java.nio.ByteBuffer.wrap(value.clone())); return x; } @Override - protected void checkType(_Fields setField, Object value) throws ClassCastException { + protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException { switch (setField) { case PATH: - if (value instanceof String) { + if (value instanceof java.lang.String) { break; } - throw new ClassCastException("Was expecting value of type String for field 'path', but got " + value.getClass().getSimpleName()); + throw new java.lang.ClassCastException("Was expecting value of type java.lang.String for field 'path', but got " + value.getClass().getSimpleName()); case PULSE: if (value instanceof HBPulse) { break; } - throw new ClassCastException("Was expecting value of type HBPulse for field 'pulse', but got " + value.getClass().getSimpleName()); + throw new java.lang.ClassCastException("Was expecting value of type HBPulse for field 'pulse', but got " + value.getClass().getSimpleName()); case BOOLVAL: - if (value instanceof Boolean) { + if (value instanceof java.lang.Boolean) { break; } - throw new ClassCastException("Was expecting value of type Boolean for field 'boolval', but got " + value.getClass().getSimpleName()); + throw new java.lang.ClassCastException("Was expecting value of type java.lang.Boolean for field 'boolval', but got " + value.getClass().getSimpleName()); case RECORDS: if (value instanceof HBRecords) { break; } - throw new ClassCastException("Was expecting value of type HBRecords for field 'records', but got " + value.getClass().getSimpleName()); + throw new java.lang.ClassCastException("Was expecting value of type HBRecords for field 'records', but got " + value.getClass().getSimpleName()); case NODES: if (value instanceof HBNodes) { break; } - throw new ClassCastException("Was expecting value of type HBNodes for field 'nodes', but got " + value.getClass().getSimpleName()); + throw new java.lang.ClassCastException("Was expecting value of type HBNodes for field 'nodes', but got " + value.getClass().getSimpleName()); case MESSAGE_BLOB: - if (value instanceof ByteBuffer) { + if (value instanceof java.nio.ByteBuffer) { break; } - throw new ClassCastException("Was expecting value of type ByteBuffer for field 'message_blob', but got " + value.getClass().getSimpleName()); + throw new java.lang.ClassCastException("Was expecting value of type java.nio.ByteBuffer for field 'message_blob', but got " + value.getClass().getSimpleName()); default: - throw new IllegalArgumentException("Unknown field id " + setField); + throw new java.lang.IllegalArgumentException("Unknown field id " + setField); } } @Override - protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { + protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(field.id); if (setField != null) { switch (setField) { case PATH: if (field.type == PATH_FIELD_DESC.type) { - String path; + java.lang.String path; path = iprot.readString(); return path; } else { @@ -274,7 +247,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes } case BOOLVAL: if (field.type == BOOLVAL_FIELD_DESC.type) { - Boolean boolval; + java.lang.Boolean boolval; boolval = iprot.readBool(); return boolval; } else { @@ -303,7 +276,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes } case MESSAGE_BLOB: if (field.type == MESSAGE_BLOB_FIELD_DESC.type) { - ByteBuffer message_blob; + java.nio.ByteBuffer message_blob; message_blob = iprot.readBinary(); return message_blob; } else { @@ -311,7 +284,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes return null; } default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); @@ -323,7 +296,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case PATH: - String path = (String)value_; + java.lang.String path = (java.lang.String)value_; oprot.writeString(path); return; case PULSE: @@ -331,7 +304,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes pulse.write(oprot); return; case BOOLVAL: - Boolean boolval = (Boolean)value_; + java.lang.Boolean boolval = (java.lang.Boolean)value_; oprot.writeBool(boolval); return; case RECORDS: @@ -343,21 +316,21 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes nodes.write(oprot); return; case MESSAGE_BLOB: - ByteBuffer message_blob = (ByteBuffer)value_; + java.nio.ByteBuffer message_blob = (java.nio.ByteBuffer)value_; oprot.writeBinary(message_blob); return; default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); + throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_); } } @Override - protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { + protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(fieldID); if (setField != null) { switch (setField) { case PATH: - String path; + java.lang.String path; path = iprot.readString(); return path; case PULSE: @@ -366,7 +339,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes pulse.read(iprot); return pulse; case BOOLVAL: - Boolean boolval; + java.lang.Boolean boolval; boolval = iprot.readBool(); return boolval; case RECORDS: @@ -380,14 +353,14 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes nodes.read(iprot); return nodes; case MESSAGE_BLOB: - ByteBuffer message_blob; + java.nio.ByteBuffer message_blob; message_blob = iprot.readBinary(); return message_blob; default: - throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - throw new TProtocolException("Couldn't find a field with field id " + fieldID); + throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID); } } @@ -395,7 +368,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { switch (setField_) { case PATH: - String path = (String)value_; + java.lang.String path = (java.lang.String)value_; oprot.writeString(path); return; case PULSE: @@ -403,7 +376,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes pulse.write(oprot); return; case BOOLVAL: - Boolean boolval = (Boolean)value_; + java.lang.Boolean boolval = (java.lang.Boolean)value_; oprot.writeBool(boolval); return; case RECORDS: @@ -415,11 +388,11 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes nodes.write(oprot); return; case MESSAGE_BLOB: - ByteBuffer message_blob = (ByteBuffer)value_; + java.nio.ByteBuffer message_blob = (java.nio.ByteBuffer)value_; oprot.writeBinary(message_blob); return; default: - throw new IllegalStateException("Cannot write union with unknown field " + setField_); + throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_); } } @@ -439,7 +412,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes case MESSAGE_BLOB: return MESSAGE_BLOB_FIELD_DESC; default: - throw new IllegalArgumentException("Unknown field id " + setField); + throw new java.lang.IllegalArgumentException("Unknown field id " + setField); } } @@ -458,16 +431,16 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes } - public String get_path() { + public java.lang.String get_path() { if (getSetField() == _Fields.PATH) { - return (String)getFieldValue(); + return (java.lang.String)getFieldValue(); } else { - throw new RuntimeException("Cannot get field 'path' because union is currently set to " + getFieldDesc(getSetField()).name); + throw new java.lang.RuntimeException("Cannot get field 'path' because union is currently set to " + getFieldDesc(getSetField()).name); } } - public void set_path(String value) { - if (value == null) throw new NullPointerException(); + public void set_path(java.lang.String value) { + if (value == null) throw new java.lang.NullPointerException(); setField_ = _Fields.PATH; value_ = value; } @@ -476,21 +449,21 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes if (getSetField() == _Fields.PULSE) { return (HBPulse)getFieldValue(); } else { - throw new RuntimeException("Cannot get field 'pulse' because union is currently set to " + getFieldDesc(getSetField()).name); + throw new java.lang.RuntimeException("Cannot get field 'pulse' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void set_pulse(HBPulse value) { - if (value == null) throw new NullPointerException(); + if (value == null) throw new java.lang.NullPointerException(); setField_ = _Fields.PULSE; value_ = value; } public boolean get_boolval() { if (getSetField() == _Fields.BOOLVAL) { - return (Boolean)getFieldValue(); + return (java.lang.Boolean)getFieldValue(); } else { - throw new RuntimeException("Cannot get field 'boolval' because union is currently set to " + getFieldDesc(getSetField()).name); + throw new java.lang.RuntimeException("Cannot get field 'boolval' because union is currently set to " + getFieldDesc(getSetField()).name); } } @@ -503,12 +476,12 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes if (getSetField() == _Fields.RECORDS) { return (HBRecords)getFieldValue(); } else { - throw new RuntimeException("Cannot get field 'records' because union is currently set to " + getFieldDesc(getSetField()).name); + throw new java.lang.RuntimeException("Cannot get field 'records' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void set_records(HBRecords value) { - if (value == null) throw new NullPointerException(); + if (value == null) throw new java.lang.NullPointerException(); setField_ = _Fields.RECORDS; value_ = value; } @@ -517,36 +490,36 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes if (getSetField() == _Fields.NODES) { return (HBNodes)getFieldValue(); } else { - throw new RuntimeException("Cannot get field 'nodes' because union is currently set to " + getFieldDesc(getSetField()).name); + throw new java.lang.RuntimeException("Cannot get field 'nodes' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void set_nodes(HBNodes value) { - if (value == null) throw new NullPointerException(); + if (value == null) throw new java.lang.NullPointerException(); setField_ = _Fields.NODES; value_ = value; } public byte[] get_message_blob() { set_message_blob(org.apache.thrift.TBaseHelper.rightSize(buffer_for_message_blob())); - ByteBuffer b = buffer_for_message_blob(); + java.nio.ByteBuffer b = buffer_for_message_blob(); return b == null ? null : b.array(); } - public ByteBuffer buffer_for_message_blob() { + public java.nio.ByteBuffer buffer_for_message_blob() { if (getSetField() == _Fields.MESSAGE_BLOB) { - return org.apache.thrift.TBaseHelper.copyBinary((ByteBuffer)getFieldValue()); + return org.apache.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue()); } else { - throw new RuntimeException("Cannot get field 'message_blob' because union is currently set to " + getFieldDesc(getSetField()).name); + throw new java.lang.RuntimeException("Cannot get field 'message_blob' because union is currently set to " + getFieldDesc(getSetField()).name); } } public void set_message_blob(byte[] value) { - set_message_blob(ByteBuffer.wrap(Arrays.copyOf(value, value.length))); + set_message_blob(java.nio.ByteBuffer.wrap(value.clone())); } - public void set_message_blob(ByteBuffer value) { - if (value == null) throw new NullPointerException(); + public void set_message_blob(java.nio.ByteBuffer value) { + if (value == null) throw new java.lang.NullPointerException(); setField_ = _Fields.MESSAGE_BLOB; value_ = value; } @@ -581,7 +554,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes } - public boolean equals(Object other) { + public boolean equals(java.lang.Object other) { if (other instanceof HBMessageData) { return equals((HBMessageData)other); } else { @@ -605,12 +578,12 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>(); list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); + java.lang.Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { @@ -628,7 +601,7 @@ public class HBMessageData extends org.apache.thrift.TUnion<HBMessageData, HBMes } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) {
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java b/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java index 4bbd4f4..7f1c005 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java +++ b/storm-client/src/jvm/org/apache/storm/generated/HBNodes.java @@ -16,63 +16,33 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.storm.generated; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields>, java.io.Serializable, Cloneable, Comparable<HBNodes> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBNodes"); private static final org.apache.thrift.protocol.TField PULSE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("pulseIds", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new HBNodesStandardSchemeFactory()); - schemes.put(TupleScheme.class, new HBNodesTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBNodesStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBNodesTupleSchemeFactory(); - private List<String> pulseIds; // required + private java.util.List<java.lang.String> pulseIds; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PULSE_IDS((short)1, "pulseIds"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -95,21 +65,21 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -118,19 +88,19 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PULSE_IDS, new org.apache.thrift.meta_data.FieldMetaData("pulseIds", 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)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBNodes.class, metaDataMap); } @@ -138,7 +108,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields } public HBNodes( - List<String> pulseIds) + java.util.List<java.lang.String> pulseIds) { this(); this.pulseIds = pulseIds; @@ -149,7 +119,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields */ public HBNodes(HBNodes other) { if (other.is_set_pulseIds()) { - List<String> __this__pulseIds = new ArrayList<String>(other.pulseIds); + java.util.List<java.lang.String> __this__pulseIds = new java.util.ArrayList<java.lang.String>(other.pulseIds); this.pulseIds = __this__pulseIds; } } @@ -167,22 +137,22 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields return (this.pulseIds == null) ? 0 : this.pulseIds.size(); } - public java.util.Iterator<String> get_pulseIds_iterator() { + public java.util.Iterator<java.lang.String> get_pulseIds_iterator() { return (this.pulseIds == null) ? null : this.pulseIds.iterator(); } - public void add_to_pulseIds(String elem) { + public void add_to_pulseIds(java.lang.String elem) { if (this.pulseIds == null) { - this.pulseIds = new ArrayList<String>(); + this.pulseIds = new java.util.ArrayList<java.lang.String>(); } this.pulseIds.add(elem); } - public List<String> get_pulseIds() { + public java.util.List<java.lang.String> get_pulseIds() { return this.pulseIds; } - public void set_pulseIds(List<String> pulseIds) { + public void set_pulseIds(java.util.List<java.lang.String> pulseIds) { this.pulseIds = pulseIds; } @@ -201,43 +171,43 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case PULSE_IDS: if (value == null) { unset_pulseIds(); } else { - set_pulseIds((List<String>)value); + set_pulseIds((java.util.List<java.lang.String>)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PULSE_IDS: return get_pulseIds(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case PULSE_IDS: return is_set_pulseIds(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof HBNodes) @@ -248,6 +218,8 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields public boolean equals(HBNodes that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_pulseIds = true && this.is_set_pulseIds(); boolean that_present_pulseIds = true && that.is_set_pulseIds(); @@ -263,14 +235,13 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_pulseIds = true && (is_set_pulseIds()); - list.add(present_pulseIds); - if (present_pulseIds) - list.add(pulseIds); + hashCode = hashCode * 8191 + ((is_set_pulseIds()) ? 131071 : 524287); + if (is_set_pulseIds()) + hashCode = hashCode * 8191 + pulseIds.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -281,7 +252,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_pulseIds()).compareTo(other.is_set_pulseIds()); + lastComparison = java.lang.Boolean.valueOf(is_set_pulseIds()).compareTo(other.is_set_pulseIds()); if (lastComparison != 0) { return lastComparison; } @@ -299,16 +270,16 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("HBNodes("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("HBNodes("); boolean first = true; sb.append("pulseIds:"); @@ -335,7 +306,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -343,13 +314,13 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields } } - private static class HBNodesStandardSchemeFactory implements SchemeFactory { + private static class HBNodesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public HBNodesStandardScheme getScheme() { return new HBNodesStandardScheme(); } } - private static class HBNodesStandardScheme extends StandardScheme<HBNodes> { + private static class HBNodesStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBNodes> { public void read(org.apache.thrift.protocol.TProtocol iprot, HBNodes struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -365,8 +336,8 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list912 = iprot.readListBegin(); - struct.pulseIds = new ArrayList<String>(_list912.size); - String _elem913; + struct.pulseIds = new java.util.ArrayList<java.lang.String>(_list912.size); + java.lang.String _elem913; for (int _i914 = 0; _i914 < _list912.size; ++_i914) { _elem913 = iprot.readString(); @@ -396,7 +367,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields oprot.writeFieldBegin(PULSE_IDS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.pulseIds.size())); - for (String _iter915 : struct.pulseIds) + for (java.lang.String _iter915 : struct.pulseIds) { oprot.writeString(_iter915); } @@ -410,18 +381,18 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields } - private static class HBNodesTupleSchemeFactory implements SchemeFactory { + private static class HBNodesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public HBNodesTupleScheme getScheme() { return new HBNodesTupleScheme(); } } - private static class HBNodesTupleScheme extends TupleScheme<HBNodes> { + private static class HBNodesTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBNodes> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, HBNodes struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_pulseIds()) { optionals.set(0); } @@ -429,7 +400,7 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields if (struct.is_set_pulseIds()) { { oprot.writeI32(struct.pulseIds.size()); - for (String _iter916 : struct.pulseIds) + for (java.lang.String _iter916 : struct.pulseIds) { oprot.writeString(_iter916); } @@ -439,13 +410,13 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields @Override public void read(org.apache.thrift.protocol.TProtocol prot, HBNodes struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list917 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.pulseIds = new ArrayList<String>(_list917.size); - String _elem918; + struct.pulseIds = new java.util.ArrayList<java.lang.String>(_list917.size); + java.lang.String _elem918; for (int _i919 = 0; _i919 < _list917.size; ++_i919) { _elem918 = iprot.readString(); @@ -457,5 +428,8 @@ public class HBNodes implements org.apache.thrift.TBase<HBNodes, HBNodes._Fields } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java b/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java index 574857d..82e2bbb 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java +++ b/storm-client/src/jvm/org/apache/storm/generated/HBPulse.java @@ -16,66 +16,36 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.storm.generated; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields>, java.io.Serializable, Cloneable, Comparable<HBPulse> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBPulse"); 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 DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("details", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new HBPulseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new HBPulseTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBPulseStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBPulseTupleSchemeFactory(); - private String id; // required - private ByteBuffer details; // required + private java.lang.String id; // required + private java.nio.ByteBuffer details; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"), DETAILS((short)2, "details"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -100,21 +70,21 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -123,20 +93,20 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.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.DETAILS, new org.apache.thrift.meta_data.FieldMetaData("details", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBPulse.class, metaDataMap); } @@ -144,8 +114,8 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields } public HBPulse( - String id, - ByteBuffer details) + java.lang.String id, + java.nio.ByteBuffer details) { this(); this.id = id; @@ -174,11 +144,11 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields this.details = null; } - public String get_id() { + public java.lang.String get_id() { return this.id; } - public void set_id(String id) { + public void set_id(java.lang.String id) { this.id = id; } @@ -202,15 +172,15 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields return details == null ? null : details.array(); } - public ByteBuffer buffer_for_details() { + public java.nio.ByteBuffer buffer_for_details() { return org.apache.thrift.TBaseHelper.copyBinary(details); } public void set_details(byte[] details) { - this.details = details == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(details, details.length)); + this.details = details == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(details.clone()); } - public void set_details(ByteBuffer details) { + public void set_details(java.nio.ByteBuffer details) { this.details = org.apache.thrift.TBaseHelper.copyBinary(details); } @@ -229,13 +199,13 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case ID: if (value == null) { unset_id(); } else { - set_id((String)value); + set_id((java.lang.String)value); } break; @@ -243,14 +213,18 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields if (value == null) { unset_details(); } else { - set_details((ByteBuffer)value); + if (value instanceof byte[]) { + set_details((byte[])value); + } else { + set_details((java.nio.ByteBuffer)value); + } } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ID: return get_id(); @@ -259,13 +233,13 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields return get_details(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -274,11 +248,11 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields case DETAILS: return is_set_details(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof HBPulse) @@ -289,6 +263,8 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields public boolean equals(HBPulse that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_id = true && this.is_set_id(); boolean that_present_id = true && that.is_set_id(); @@ -313,19 +289,17 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_id = true && (is_set_id()); - list.add(present_id); - if (present_id) - list.add(id); + hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287); + if (is_set_id()) + hashCode = hashCode * 8191 + id.hashCode(); - boolean present_details = true && (is_set_details()); - list.add(present_details); - if (present_details) - list.add(details); + hashCode = hashCode * 8191 + ((is_set_details()) ? 131071 : 524287); + if (is_set_details()) + hashCode = hashCode * 8191 + details.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -336,7 +310,7 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id()); + lastComparison = java.lang.Boolean.valueOf(is_set_id()).compareTo(other.is_set_id()); if (lastComparison != 0) { return lastComparison; } @@ -346,7 +320,7 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_details()).compareTo(other.is_set_details()); + lastComparison = java.lang.Boolean.valueOf(is_set_details()).compareTo(other.is_set_details()); if (lastComparison != 0) { return lastComparison; } @@ -364,16 +338,16 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("HBPulse("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("HBPulse("); boolean first = true; sb.append("id:"); @@ -412,7 +386,7 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -420,13 +394,13 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields } } - private static class HBPulseStandardSchemeFactory implements SchemeFactory { + private static class HBPulseStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public HBPulseStandardScheme getScheme() { return new HBPulseStandardScheme(); } } - private static class HBPulseStandardScheme extends StandardScheme<HBPulse> { + private static class HBPulseStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBPulse> { public void read(org.apache.thrift.protocol.TProtocol iprot, HBPulse struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -483,19 +457,19 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields } - private static class HBPulseTupleSchemeFactory implements SchemeFactory { + private static class HBPulseTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public HBPulseTupleScheme getScheme() { return new HBPulseTupleScheme(); } } - private static class HBPulseTupleScheme extends TupleScheme<HBPulse> { + private static class HBPulseTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBPulse> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, HBPulse struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.id); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_details()) { optionals.set(0); } @@ -507,10 +481,10 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields @Override public void read(org.apache.thrift.protocol.TProtocol prot, HBPulse struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.id = iprot.readString(); struct.set_id_isSet(true); - BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.details = iprot.readBinary(); struct.set_details_isSet(true); @@ -518,5 +492,8 @@ public class HBPulse implements org.apache.thrift.TBase<HBPulse, HBPulse._Fields } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java b/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java index fae00cf..08043fa 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java +++ b/storm-client/src/jvm/org/apache/storm/generated/HBRecords.java @@ -16,63 +16,33 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.storm.generated; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._Fields>, java.io.Serializable, Cloneable, Comparable<HBRecords> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HBRecords"); private static final org.apache.thrift.protocol.TField PULSES_FIELD_DESC = new org.apache.thrift.protocol.TField("pulses", org.apache.thrift.protocol.TType.LIST, (short)1); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new HBRecordsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new HBRecordsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HBRecordsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HBRecordsTupleSchemeFactory(); - private List<HBPulse> pulses; // required + private java.util.List<HBPulse> pulses; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PULSES((short)1, "pulses"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -95,21 +65,21 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -118,19 +88,19 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PULSES, new org.apache.thrift.meta_data.FieldMetaData("pulses", org.apache.thrift.TFieldRequirementType.DEFAULT, 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, HBPulse.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HBRecords.class, metaDataMap); } @@ -138,7 +108,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ } public HBRecords( - List<HBPulse> pulses) + java.util.List<HBPulse> pulses) { this(); this.pulses = pulses; @@ -149,7 +119,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ */ public HBRecords(HBRecords other) { if (other.is_set_pulses()) { - List<HBPulse> __this__pulses = new ArrayList<HBPulse>(other.pulses.size()); + java.util.List<HBPulse> __this__pulses = new java.util.ArrayList<HBPulse>(other.pulses.size()); for (HBPulse other_element : other.pulses) { __this__pulses.add(new HBPulse(other_element)); } @@ -176,16 +146,16 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ public void add_to_pulses(HBPulse elem) { if (this.pulses == null) { - this.pulses = new ArrayList<HBPulse>(); + this.pulses = new java.util.ArrayList<HBPulse>(); } this.pulses.add(elem); } - public List<HBPulse> get_pulses() { + public java.util.List<HBPulse> get_pulses() { return this.pulses; } - public void set_pulses(List<HBPulse> pulses) { + public void set_pulses(java.util.List<HBPulse> pulses) { this.pulses = pulses; } @@ -204,43 +174,43 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case PULSES: if (value == null) { unset_pulses(); } else { - set_pulses((List<HBPulse>)value); + set_pulses((java.util.List<HBPulse>)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PULSES: return get_pulses(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case PULSES: return is_set_pulses(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof HBRecords) @@ -251,6 +221,8 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ public boolean equals(HBRecords that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_pulses = true && this.is_set_pulses(); boolean that_present_pulses = true && that.is_set_pulses(); @@ -266,14 +238,13 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_pulses = true && (is_set_pulses()); - list.add(present_pulses); - if (present_pulses) - list.add(pulses); + hashCode = hashCode * 8191 + ((is_set_pulses()) ? 131071 : 524287); + if (is_set_pulses()) + hashCode = hashCode * 8191 + pulses.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -284,7 +255,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_pulses()).compareTo(other.is_set_pulses()); + lastComparison = java.lang.Boolean.valueOf(is_set_pulses()).compareTo(other.is_set_pulses()); if (lastComparison != 0) { return lastComparison; } @@ -302,16 +273,16 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("HBRecords("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("HBRecords("); boolean first = true; sb.append("pulses:"); @@ -338,7 +309,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -346,13 +317,13 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ } } - private static class HBRecordsStandardSchemeFactory implements SchemeFactory { + private static class HBRecordsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public HBRecordsStandardScheme getScheme() { return new HBRecordsStandardScheme(); } } - private static class HBRecordsStandardScheme extends StandardScheme<HBRecords> { + private static class HBRecordsStandardScheme extends org.apache.thrift.scheme.StandardScheme<HBRecords> { public void read(org.apache.thrift.protocol.TProtocol iprot, HBRecords struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -368,7 +339,7 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list904 = iprot.readListBegin(); - struct.pulses = new ArrayList<HBPulse>(_list904.size); + struct.pulses = new java.util.ArrayList<HBPulse>(_list904.size); HBPulse _elem905; for (int _i906 = 0; _i906 < _list904.size; ++_i906) { @@ -414,18 +385,18 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ } - private static class HBRecordsTupleSchemeFactory implements SchemeFactory { + private static class HBRecordsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public HBRecordsTupleScheme getScheme() { return new HBRecordsTupleScheme(); } } - private static class HBRecordsTupleScheme extends TupleScheme<HBRecords> { + private static class HBRecordsTupleScheme extends org.apache.thrift.scheme.TupleScheme<HBRecords> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, HBRecords struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_pulses()) { optionals.set(0); } @@ -443,12 +414,12 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ @Override public void read(org.apache.thrift.protocol.TProtocol prot, HBRecords struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list909 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.pulses = new ArrayList<HBPulse>(_list909.size); + struct.pulses = new java.util.ArrayList<HBPulse>(_list909.size); HBPulse _elem910; for (int _i911 = 0; _i911 < _list909.size; ++_i911) { @@ -462,5 +433,8 @@ public class HBRecords implements org.apache.thrift.TBase<HBRecords, HBRecords._ } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java b/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java index 81e0826..8656a23 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java +++ b/storm-client/src/jvm/org/apache/storm/generated/HBServerMessageType.java @@ -16,7 +16,7 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -24,10 +24,6 @@ package org.apache.storm.generated; -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - public enum HBServerMessageType implements org.apache.thrift.TEnum { CREATE_PATH(0), CREATE_PATH_RESPONSE(1), http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java b/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java index 9591412..d4b9442 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java +++ b/storm-client/src/jvm/org/apache/storm/generated/InvalidTopologyException.java @@ -16,63 +16,33 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.storm.generated; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") -public class InvalidTopologyException extends TException implements org.apache.thrift.TBase<InvalidTopologyException, InvalidTopologyException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidTopologyException> { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") +public class InvalidTopologyException extends org.apache.thrift.TException implements org.apache.thrift.TBase<InvalidTopologyException, InvalidTopologyException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidTopologyException> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new InvalidTopologyExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new InvalidTopologyExceptionTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new InvalidTopologyExceptionStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new InvalidTopologyExceptionTupleSchemeFactory(); - private String msg; // required + private java.lang.String msg; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MSG((short)1, "msg"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -95,21 +65,21 @@ public class InvalidTopologyException extends TException implements org.apache.t */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -118,18 +88,18 @@ public class InvalidTopologyException extends TException implements org.apache.t return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidTopologyException.class, metaDataMap); } @@ -137,7 +107,7 @@ public class InvalidTopologyException extends TException implements org.apache.t } public InvalidTopologyException( - String msg) + java.lang.String msg) { this(); this.msg = msg; @@ -161,11 +131,11 @@ public class InvalidTopologyException extends TException implements org.apache.t this.msg = null; } - public String get_msg() { + public java.lang.String get_msg() { return this.msg; } - public void set_msg(String msg) { + public void set_msg(java.lang.String msg) { this.msg = msg; } @@ -184,43 +154,43 @@ public class InvalidTopologyException extends TException implements org.apache.t } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case MSG: if (value == null) { unset_msg(); } else { - set_msg((String)value); + set_msg((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case MSG: return get_msg(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case MSG: return is_set_msg(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof InvalidTopologyException) @@ -231,6 +201,8 @@ public class InvalidTopologyException extends TException implements org.apache.t public boolean equals(InvalidTopologyException that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_msg = true && this.is_set_msg(); boolean that_present_msg = true && that.is_set_msg(); @@ -246,14 +218,13 @@ public class InvalidTopologyException extends TException implements org.apache.t @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_msg = true && (is_set_msg()); - list.add(present_msg); - if (present_msg) - list.add(msg); + hashCode = hashCode * 8191 + ((is_set_msg()) ? 131071 : 524287); + if (is_set_msg()) + hashCode = hashCode * 8191 + msg.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -264,7 +235,7 @@ public class InvalidTopologyException extends TException implements org.apache.t int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg()); + lastComparison = java.lang.Boolean.valueOf(is_set_msg()).compareTo(other.is_set_msg()); if (lastComparison != 0) { return lastComparison; } @@ -282,16 +253,16 @@ public class InvalidTopologyException extends TException implements org.apache.t } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("InvalidTopologyException("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("InvalidTopologyException("); boolean first = true; sb.append("msg:"); @@ -322,7 +293,7 @@ public class InvalidTopologyException extends TException implements org.apache.t } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -330,13 +301,13 @@ public class InvalidTopologyException extends TException implements org.apache.t } } - private static class InvalidTopologyExceptionStandardSchemeFactory implements SchemeFactory { + private static class InvalidTopologyExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public InvalidTopologyExceptionStandardScheme getScheme() { return new InvalidTopologyExceptionStandardScheme(); } } - private static class InvalidTopologyExceptionStandardScheme extends StandardScheme<InvalidTopologyException> { + private static class InvalidTopologyExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<InvalidTopologyException> { public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidTopologyException struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -380,27 +351,30 @@ public class InvalidTopologyException extends TException implements org.apache.t } - private static class InvalidTopologyExceptionTupleSchemeFactory implements SchemeFactory { + private static class InvalidTopologyExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public InvalidTopologyExceptionTupleScheme getScheme() { return new InvalidTopologyExceptionTupleScheme(); } } - private static class InvalidTopologyExceptionTupleScheme extends TupleScheme<InvalidTopologyException> { + private static class InvalidTopologyExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<InvalidTopologyException> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, InvalidTopologyException struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.msg); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, InvalidTopologyException struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.msg = iprot.readString(); struct.set_msg_isSet(true); } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } }
