http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/Assignment.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/Assignment.java b/storm-client/src/jvm/org/apache/storm/generated/Assignment.java index e8741df..8240934 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/Assignment.java +++ b/storm-client/src/jvm/org/apache/storm/generated/Assignment.java @@ -16,42 +16,15 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.storm.generated; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class Assignment implements org.apache.thrift.TBase<Assignment, Assignment._Fields>, java.io.Serializable, Cloneable, Comparable<Assignment> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Assignment"); @@ -63,19 +36,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen private static final org.apache.thrift.protocol.TField TOTAL_SHARED_OFF_HEAP_FIELD_DESC = new org.apache.thrift.protocol.TField("total_shared_off_heap", org.apache.thrift.protocol.TType.MAP, (short)6); 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)7); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AssignmentStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AssignmentTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AssignmentStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AssignmentTupleSchemeFactory(); - private String master_code_dir; // required - private Map<String,String> node_host; // optional - private Map<List<Long>,NodeInfo> executor_node_port; // optional - private Map<List<Long>,Long> executor_start_time_secs; // optional - private Map<NodeInfo,WorkerResources> worker_resources; // optional - private Map<String,Double> total_shared_off_heap; // optional - private String owner; // optional + private java.lang.String master_code_dir; // required + private java.util.Map<java.lang.String,java.lang.String> node_host; // optional + private java.util.Map<java.util.List<java.lang.Long>,NodeInfo> executor_node_port; // optional + private java.util.Map<java.util.List<java.lang.Long>,java.lang.Long> executor_start_time_secs; // optional + private java.util.Map<NodeInfo,WorkerResources> worker_resources; // optional + private java.util.Map<java.lang.String,java.lang.Double> total_shared_off_heap; // optional + private java.lang.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 { @@ -87,10 +57,10 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen TOTAL_SHARED_OFF_HEAP((short)6, "total_shared_off_heap"), OWNER((short)7, "owner"); - 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); } } @@ -125,21 +95,21 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen */ 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; } @@ -148,16 +118,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.NODE_HOST,_Fields.EXECUTOR_NODE_PORT,_Fields.EXECUTOR_START_TIME_SECS,_Fields.WORKER_RESOURCES,_Fields.TOTAL_SHARED_OFF_HEAP,_Fields.OWNER}; - 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.MASTER_CODE_DIR, new org.apache.thrift.meta_data.FieldMetaData("master_code_dir", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.NODE_HOST, new org.apache.thrift.meta_data.FieldMetaData("node_host", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -184,25 +154,25 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))); tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.OPTIONAL, 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(Assignment.class, metaDataMap); } public Assignment() { - this.node_host = new HashMap<String,String>(); + this.node_host = new java.util.HashMap<java.lang.String,java.lang.String>(); - this.executor_node_port = new HashMap<List<Long>,NodeInfo>(); + this.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(); - this.executor_start_time_secs = new HashMap<List<Long>,Long>(); + this.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(); - this.worker_resources = new HashMap<NodeInfo,WorkerResources>(); + this.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(); - this.total_shared_off_heap = new HashMap<String,Double>(); + this.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(); } public Assignment( - String master_code_dir) + java.lang.String master_code_dir) { this(); this.master_code_dir = master_code_dir; @@ -216,17 +186,17 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen this.master_code_dir = other.master_code_dir; } if (other.is_set_node_host()) { - Map<String,String> __this__node_host = new HashMap<String,String>(other.node_host); + java.util.Map<java.lang.String,java.lang.String> __this__node_host = new java.util.HashMap<java.lang.String,java.lang.String>(other.node_host); this.node_host = __this__node_host; } if (other.is_set_executor_node_port()) { - Map<List<Long>,NodeInfo> __this__executor_node_port = new HashMap<List<Long>,NodeInfo>(other.executor_node_port.size()); - for (Map.Entry<List<Long>, NodeInfo> other_element : other.executor_node_port.entrySet()) { + java.util.Map<java.util.List<java.lang.Long>,NodeInfo> __this__executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(other.executor_node_port.size()); + for (java.util.Map.Entry<java.util.List<java.lang.Long>, NodeInfo> other_element : other.executor_node_port.entrySet()) { - List<Long> other_element_key = other_element.getKey(); + java.util.List<java.lang.Long> other_element_key = other_element.getKey(); NodeInfo other_element_value = other_element.getValue(); - List<Long> __this__executor_node_port_copy_key = new ArrayList<Long>(other_element_key); + java.util.List<java.lang.Long> __this__executor_node_port_copy_key = new java.util.ArrayList<java.lang.Long>(other_element_key); NodeInfo __this__executor_node_port_copy_value = new NodeInfo(other_element_value); @@ -235,23 +205,23 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen this.executor_node_port = __this__executor_node_port; } if (other.is_set_executor_start_time_secs()) { - Map<List<Long>,Long> __this__executor_start_time_secs = new HashMap<List<Long>,Long>(other.executor_start_time_secs.size()); - for (Map.Entry<List<Long>, Long> other_element : other.executor_start_time_secs.entrySet()) { + java.util.Map<java.util.List<java.lang.Long>,java.lang.Long> __this__executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(other.executor_start_time_secs.size()); + for (java.util.Map.Entry<java.util.List<java.lang.Long>, java.lang.Long> other_element : other.executor_start_time_secs.entrySet()) { - List<Long> other_element_key = other_element.getKey(); - Long other_element_value = other_element.getValue(); + java.util.List<java.lang.Long> other_element_key = other_element.getKey(); + java.lang.Long other_element_value = other_element.getValue(); - List<Long> __this__executor_start_time_secs_copy_key = new ArrayList<Long>(other_element_key); + java.util.List<java.lang.Long> __this__executor_start_time_secs_copy_key = new java.util.ArrayList<java.lang.Long>(other_element_key); - Long __this__executor_start_time_secs_copy_value = other_element_value; + java.lang.Long __this__executor_start_time_secs_copy_value = other_element_value; __this__executor_start_time_secs.put(__this__executor_start_time_secs_copy_key, __this__executor_start_time_secs_copy_value); } this.executor_start_time_secs = __this__executor_start_time_secs; } if (other.is_set_worker_resources()) { - Map<NodeInfo,WorkerResources> __this__worker_resources = new HashMap<NodeInfo,WorkerResources>(other.worker_resources.size()); - for (Map.Entry<NodeInfo, WorkerResources> other_element : other.worker_resources.entrySet()) { + java.util.Map<NodeInfo,WorkerResources> __this__worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(other.worker_resources.size()); + for (java.util.Map.Entry<NodeInfo, WorkerResources> other_element : other.worker_resources.entrySet()) { NodeInfo other_element_key = other_element.getKey(); WorkerResources other_element_value = other_element.getValue(); @@ -265,7 +235,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen this.worker_resources = __this__worker_resources; } if (other.is_set_total_shared_off_heap()) { - Map<String,Double> __this__total_shared_off_heap = new HashMap<String,Double>(other.total_shared_off_heap); + java.util.Map<java.lang.String,java.lang.Double> __this__total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(other.total_shared_off_heap); this.total_shared_off_heap = __this__total_shared_off_heap; } if (other.is_set_owner()) { @@ -280,24 +250,24 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen @Override public void clear() { this.master_code_dir = null; - this.node_host = new HashMap<String,String>(); + this.node_host = new java.util.HashMap<java.lang.String,java.lang.String>(); - this.executor_node_port = new HashMap<List<Long>,NodeInfo>(); + this.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(); - this.executor_start_time_secs = new HashMap<List<Long>,Long>(); + this.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(); - this.worker_resources = new HashMap<NodeInfo,WorkerResources>(); + this.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(); - this.total_shared_off_heap = new HashMap<String,Double>(); + this.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(); this.owner = null; } - public String get_master_code_dir() { + public java.lang.String get_master_code_dir() { return this.master_code_dir; } - public void set_master_code_dir(String master_code_dir) { + public void set_master_code_dir(java.lang.String master_code_dir) { this.master_code_dir = master_code_dir; } @@ -320,18 +290,18 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return (this.node_host == null) ? 0 : this.node_host.size(); } - public void put_to_node_host(String key, String val) { + public void put_to_node_host(java.lang.String key, java.lang.String val) { if (this.node_host == null) { - this.node_host = new HashMap<String,String>(); + this.node_host = new java.util.HashMap<java.lang.String,java.lang.String>(); } this.node_host.put(key, val); } - public Map<String,String> get_node_host() { + public java.util.Map<java.lang.String,java.lang.String> get_node_host() { return this.node_host; } - public void set_node_host(Map<String,String> node_host) { + public void set_node_host(java.util.Map<java.lang.String,java.lang.String> node_host) { this.node_host = node_host; } @@ -354,18 +324,18 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return (this.executor_node_port == null) ? 0 : this.executor_node_port.size(); } - public void put_to_executor_node_port(List<Long> key, NodeInfo val) { + public void put_to_executor_node_port(java.util.List<java.lang.Long> key, NodeInfo val) { if (this.executor_node_port == null) { - this.executor_node_port = new HashMap<List<Long>,NodeInfo>(); + this.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(); } this.executor_node_port.put(key, val); } - public Map<List<Long>,NodeInfo> get_executor_node_port() { + public java.util.Map<java.util.List<java.lang.Long>,NodeInfo> get_executor_node_port() { return this.executor_node_port; } - public void set_executor_node_port(Map<List<Long>,NodeInfo> executor_node_port) { + public void set_executor_node_port(java.util.Map<java.util.List<java.lang.Long>,NodeInfo> executor_node_port) { this.executor_node_port = executor_node_port; } @@ -388,18 +358,18 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return (this.executor_start_time_secs == null) ? 0 : this.executor_start_time_secs.size(); } - public void put_to_executor_start_time_secs(List<Long> key, long val) { + public void put_to_executor_start_time_secs(java.util.List<java.lang.Long> key, long val) { if (this.executor_start_time_secs == null) { - this.executor_start_time_secs = new HashMap<List<Long>,Long>(); + this.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(); } this.executor_start_time_secs.put(key, val); } - public Map<List<Long>,Long> get_executor_start_time_secs() { + public java.util.Map<java.util.List<java.lang.Long>,java.lang.Long> get_executor_start_time_secs() { return this.executor_start_time_secs; } - public void set_executor_start_time_secs(Map<List<Long>,Long> executor_start_time_secs) { + public void set_executor_start_time_secs(java.util.Map<java.util.List<java.lang.Long>,java.lang.Long> executor_start_time_secs) { this.executor_start_time_secs = executor_start_time_secs; } @@ -424,16 +394,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen public void put_to_worker_resources(NodeInfo key, WorkerResources val) { if (this.worker_resources == null) { - this.worker_resources = new HashMap<NodeInfo,WorkerResources>(); + this.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(); } this.worker_resources.put(key, val); } - public Map<NodeInfo,WorkerResources> get_worker_resources() { + public java.util.Map<NodeInfo,WorkerResources> get_worker_resources() { return this.worker_resources; } - public void set_worker_resources(Map<NodeInfo,WorkerResources> worker_resources) { + public void set_worker_resources(java.util.Map<NodeInfo,WorkerResources> worker_resources) { this.worker_resources = worker_resources; } @@ -456,18 +426,18 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return (this.total_shared_off_heap == null) ? 0 : this.total_shared_off_heap.size(); } - public void put_to_total_shared_off_heap(String key, double val) { + public void put_to_total_shared_off_heap(java.lang.String key, double val) { if (this.total_shared_off_heap == null) { - this.total_shared_off_heap = new HashMap<String,Double>(); + this.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(); } this.total_shared_off_heap.put(key, val); } - public Map<String,Double> get_total_shared_off_heap() { + public java.util.Map<java.lang.String,java.lang.Double> get_total_shared_off_heap() { return this.total_shared_off_heap; } - public void set_total_shared_off_heap(Map<String,Double> total_shared_off_heap) { + public void set_total_shared_off_heap(java.util.Map<java.lang.String,java.lang.Double> total_shared_off_heap) { this.total_shared_off_heap = total_shared_off_heap; } @@ -486,11 +456,11 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen } } - public String get_owner() { + public java.lang.String get_owner() { return this.owner; } - public void set_owner(String owner) { + public void set_owner(java.lang.String owner) { this.owner = owner; } @@ -509,13 +479,13 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case MASTER_CODE_DIR: if (value == null) { unset_master_code_dir(); } else { - set_master_code_dir((String)value); + set_master_code_dir((java.lang.String)value); } break; @@ -523,7 +493,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (value == null) { unset_node_host(); } else { - set_node_host((Map<String,String>)value); + set_node_host((java.util.Map<java.lang.String,java.lang.String>)value); } break; @@ -531,7 +501,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (value == null) { unset_executor_node_port(); } else { - set_executor_node_port((Map<List<Long>,NodeInfo>)value); + set_executor_node_port((java.util.Map<java.util.List<java.lang.Long>,NodeInfo>)value); } break; @@ -539,7 +509,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (value == null) { unset_executor_start_time_secs(); } else { - set_executor_start_time_secs((Map<List<Long>,Long>)value); + set_executor_start_time_secs((java.util.Map<java.util.List<java.lang.Long>,java.lang.Long>)value); } break; @@ -547,7 +517,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (value == null) { unset_worker_resources(); } else { - set_worker_resources((Map<NodeInfo,WorkerResources>)value); + set_worker_resources((java.util.Map<NodeInfo,WorkerResources>)value); } break; @@ -555,7 +525,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (value == null) { unset_total_shared_off_heap(); } else { - set_total_shared_off_heap((Map<String,Double>)value); + set_total_shared_off_heap((java.util.Map<java.lang.String,java.lang.Double>)value); } break; @@ -563,14 +533,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (value == null) { unset_owner(); } else { - set_owner((String)value); + set_owner((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case MASTER_CODE_DIR: return get_master_code_dir(); @@ -594,13 +564,13 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return get_owner(); } - 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) { @@ -619,11 +589,11 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen case OWNER: return is_set_owner(); } - 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 Assignment) @@ -634,6 +604,8 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen public boolean equals(Assignment that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_master_code_dir = true && this.is_set_master_code_dir(); boolean that_present_master_code_dir = true && that.is_set_master_code_dir(); @@ -703,44 +675,37 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_master_code_dir = true && (is_set_master_code_dir()); - list.add(present_master_code_dir); - if (present_master_code_dir) - list.add(master_code_dir); + hashCode = hashCode * 8191 + ((is_set_master_code_dir()) ? 131071 : 524287); + if (is_set_master_code_dir()) + hashCode = hashCode * 8191 + master_code_dir.hashCode(); - boolean present_node_host = true && (is_set_node_host()); - list.add(present_node_host); - if (present_node_host) - list.add(node_host); + hashCode = hashCode * 8191 + ((is_set_node_host()) ? 131071 : 524287); + if (is_set_node_host()) + hashCode = hashCode * 8191 + node_host.hashCode(); - boolean present_executor_node_port = true && (is_set_executor_node_port()); - list.add(present_executor_node_port); - if (present_executor_node_port) - list.add(executor_node_port); + hashCode = hashCode * 8191 + ((is_set_executor_node_port()) ? 131071 : 524287); + if (is_set_executor_node_port()) + hashCode = hashCode * 8191 + executor_node_port.hashCode(); - boolean present_executor_start_time_secs = true && (is_set_executor_start_time_secs()); - list.add(present_executor_start_time_secs); - if (present_executor_start_time_secs) - list.add(executor_start_time_secs); + hashCode = hashCode * 8191 + ((is_set_executor_start_time_secs()) ? 131071 : 524287); + if (is_set_executor_start_time_secs()) + hashCode = hashCode * 8191 + executor_start_time_secs.hashCode(); - boolean present_worker_resources = true && (is_set_worker_resources()); - list.add(present_worker_resources); - if (present_worker_resources) - list.add(worker_resources); + hashCode = hashCode * 8191 + ((is_set_worker_resources()) ? 131071 : 524287); + if (is_set_worker_resources()) + hashCode = hashCode * 8191 + worker_resources.hashCode(); - boolean present_total_shared_off_heap = true && (is_set_total_shared_off_heap()); - list.add(present_total_shared_off_heap); - if (present_total_shared_off_heap) - list.add(total_shared_off_heap); + hashCode = hashCode * 8191 + ((is_set_total_shared_off_heap()) ? 131071 : 524287); + if (is_set_total_shared_off_heap()) + hashCode = hashCode * 8191 + total_shared_off_heap.hashCode(); - boolean present_owner = true && (is_set_owner()); - list.add(present_owner); - if (present_owner) - list.add(owner); + hashCode = hashCode * 8191 + ((is_set_owner()) ? 131071 : 524287); + if (is_set_owner()) + hashCode = hashCode * 8191 + owner.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -751,7 +716,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_master_code_dir()).compareTo(other.is_set_master_code_dir()); + lastComparison = java.lang.Boolean.valueOf(is_set_master_code_dir()).compareTo(other.is_set_master_code_dir()); if (lastComparison != 0) { return lastComparison; } @@ -761,7 +726,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_node_host()).compareTo(other.is_set_node_host()); + lastComparison = java.lang.Boolean.valueOf(is_set_node_host()).compareTo(other.is_set_node_host()); if (lastComparison != 0) { return lastComparison; } @@ -771,7 +736,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_executor_node_port()).compareTo(other.is_set_executor_node_port()); + lastComparison = java.lang.Boolean.valueOf(is_set_executor_node_port()).compareTo(other.is_set_executor_node_port()); if (lastComparison != 0) { return lastComparison; } @@ -781,7 +746,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_executor_start_time_secs()).compareTo(other.is_set_executor_start_time_secs()); + lastComparison = java.lang.Boolean.valueOf(is_set_executor_start_time_secs()).compareTo(other.is_set_executor_start_time_secs()); if (lastComparison != 0) { return lastComparison; } @@ -791,7 +756,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_worker_resources()).compareTo(other.is_set_worker_resources()); + lastComparison = java.lang.Boolean.valueOf(is_set_worker_resources()).compareTo(other.is_set_worker_resources()); if (lastComparison != 0) { return lastComparison; } @@ -801,7 +766,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_total_shared_off_heap()).compareTo(other.is_set_total_shared_off_heap()); + lastComparison = java.lang.Boolean.valueOf(is_set_total_shared_off_heap()).compareTo(other.is_set_total_shared_off_heap()); if (lastComparison != 0) { return lastComparison; } @@ -811,7 +776,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner()); + lastComparison = java.lang.Boolean.valueOf(is_set_owner()).compareTo(other.is_set_owner()); if (lastComparison != 0) { return lastComparison; } @@ -829,16 +794,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen } 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("Assignment("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("Assignment("); boolean first = true; sb.append("master_code_dir:"); @@ -929,7 +894,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen } } - 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) { @@ -937,13 +902,13 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen } } - private static class AssignmentStandardSchemeFactory implements SchemeFactory { + private static class AssignmentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public AssignmentStandardScheme getScheme() { return new AssignmentStandardScheme(); } } - private static class AssignmentStandardScheme extends StandardScheme<Assignment> { + private static class AssignmentStandardScheme extends org.apache.thrift.scheme.StandardScheme<Assignment> { public void read(org.apache.thrift.protocol.TProtocol iprot, Assignment struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -967,9 +932,9 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map686 = iprot.readMapBegin(); - struct.node_host = new HashMap<String,String>(2*_map686.size); - String _key687; - String _val688; + struct.node_host = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map686.size); + java.lang.String _key687; + java.lang.String _val688; for (int _i689 = 0; _i689 < _map686.size; ++_i689) { _key687 = iprot.readString(); @@ -987,14 +952,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map690 = iprot.readMapBegin(); - struct.executor_node_port = new HashMap<List<Long>,NodeInfo>(2*_map690.size); - List<Long> _key691; + struct.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(2*_map690.size); + java.util.List<java.lang.Long> _key691; NodeInfo _val692; for (int _i693 = 0; _i693 < _map690.size; ++_i693) { { org.apache.thrift.protocol.TList _list694 = iprot.readListBegin(); - _key691 = new ArrayList<Long>(_list694.size); + _key691 = new java.util.ArrayList<java.lang.Long>(_list694.size); long _elem695; for (int _i696 = 0; _i696 < _list694.size; ++_i696) { @@ -1018,14 +983,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map697 = iprot.readMapBegin(); - struct.executor_start_time_secs = new HashMap<List<Long>,Long>(2*_map697.size); - List<Long> _key698; + struct.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(2*_map697.size); + java.util.List<java.lang.Long> _key698; long _val699; for (int _i700 = 0; _i700 < _map697.size; ++_i700) { { org.apache.thrift.protocol.TList _list701 = iprot.readListBegin(); - _key698 = new ArrayList<Long>(_list701.size); + _key698 = new java.util.ArrayList<java.lang.Long>(_list701.size); long _elem702; for (int _i703 = 0; _i703 < _list701.size; ++_i703) { @@ -1048,7 +1013,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map704 = iprot.readMapBegin(); - struct.worker_resources = new HashMap<NodeInfo,WorkerResources>(2*_map704.size); + struct.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(2*_map704.size); NodeInfo _key705; WorkerResources _val706; for (int _i707 = 0; _i707 < _map704.size; ++_i707) @@ -1070,8 +1035,8 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map708 = iprot.readMapBegin(); - struct.total_shared_off_heap = new HashMap<String,Double>(2*_map708.size); - String _key709; + struct.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map708.size); + java.lang.String _key709; double _val710; for (int _i711 = 0; _i711 < _map708.size; ++_i711) { @@ -1117,7 +1082,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen oprot.writeFieldBegin(NODE_HOST_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.node_host.size())); - for (Map.Entry<String, String> _iter712 : struct.node_host.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter712 : struct.node_host.entrySet()) { oprot.writeString(_iter712.getKey()); oprot.writeString(_iter712.getValue()); @@ -1132,7 +1097,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen oprot.writeFieldBegin(EXECUTOR_NODE_PORT_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRUCT, struct.executor_node_port.size())); - for (Map.Entry<List<Long>, NodeInfo> _iter713 : struct.executor_node_port.entrySet()) + for (java.util.Map.Entry<java.util.List<java.lang.Long>, NodeInfo> _iter713 : struct.executor_node_port.entrySet()) { { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter713.getKey().size())); @@ -1154,7 +1119,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen oprot.writeFieldBegin(EXECUTOR_START_TIME_SECS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.I64, struct.executor_start_time_secs.size())); - for (Map.Entry<List<Long>, Long> _iter715 : struct.executor_start_time_secs.entrySet()) + for (java.util.Map.Entry<java.util.List<java.lang.Long>, java.lang.Long> _iter715 : struct.executor_start_time_secs.entrySet()) { { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, _iter715.getKey().size())); @@ -1176,7 +1141,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen oprot.writeFieldBegin(WORKER_RESOURCES_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, struct.worker_resources.size())); - for (Map.Entry<NodeInfo, WorkerResources> _iter717 : struct.worker_resources.entrySet()) + for (java.util.Map.Entry<NodeInfo, WorkerResources> _iter717 : struct.worker_resources.entrySet()) { _iter717.getKey().write(oprot); _iter717.getValue().write(oprot); @@ -1191,7 +1156,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen oprot.writeFieldBegin(TOTAL_SHARED_OFF_HEAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.total_shared_off_heap.size())); - for (Map.Entry<String, Double> _iter718 : struct.total_shared_off_heap.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter718 : struct.total_shared_off_heap.entrySet()) { oprot.writeString(_iter718.getKey()); oprot.writeDouble(_iter718.getValue()); @@ -1214,19 +1179,19 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen } - private static class AssignmentTupleSchemeFactory implements SchemeFactory { + private static class AssignmentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public AssignmentTupleScheme getScheme() { return new AssignmentTupleScheme(); } } - private static class AssignmentTupleScheme extends TupleScheme<Assignment> { + private static class AssignmentTupleScheme extends org.apache.thrift.scheme.TupleScheme<Assignment> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, Assignment 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.master_code_dir); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_node_host()) { optionals.set(0); } @@ -1249,7 +1214,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (struct.is_set_node_host()) { { oprot.writeI32(struct.node_host.size()); - for (Map.Entry<String, String> _iter719 : struct.node_host.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter719 : struct.node_host.entrySet()) { oprot.writeString(_iter719.getKey()); oprot.writeString(_iter719.getValue()); @@ -1259,7 +1224,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (struct.is_set_executor_node_port()) { { oprot.writeI32(struct.executor_node_port.size()); - for (Map.Entry<List<Long>, NodeInfo> _iter720 : struct.executor_node_port.entrySet()) + for (java.util.Map.Entry<java.util.List<java.lang.Long>, NodeInfo> _iter720 : struct.executor_node_port.entrySet()) { { oprot.writeI32(_iter720.getKey().size()); @@ -1275,7 +1240,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (struct.is_set_executor_start_time_secs()) { { oprot.writeI32(struct.executor_start_time_secs.size()); - for (Map.Entry<List<Long>, Long> _iter722 : struct.executor_start_time_secs.entrySet()) + for (java.util.Map.Entry<java.util.List<java.lang.Long>, java.lang.Long> _iter722 : struct.executor_start_time_secs.entrySet()) { { oprot.writeI32(_iter722.getKey().size()); @@ -1291,7 +1256,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (struct.is_set_worker_resources()) { { oprot.writeI32(struct.worker_resources.size()); - for (Map.Entry<NodeInfo, WorkerResources> _iter724 : struct.worker_resources.entrySet()) + for (java.util.Map.Entry<NodeInfo, WorkerResources> _iter724 : struct.worker_resources.entrySet()) { _iter724.getKey().write(oprot); _iter724.getValue().write(oprot); @@ -1301,7 +1266,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (struct.is_set_total_shared_off_heap()) { { oprot.writeI32(struct.total_shared_off_heap.size()); - for (Map.Entry<String, Double> _iter725 : struct.total_shared_off_heap.entrySet()) + for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter725 : struct.total_shared_off_heap.entrySet()) { oprot.writeString(_iter725.getKey()); oprot.writeDouble(_iter725.getValue()); @@ -1315,16 +1280,16 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen @Override public void read(org.apache.thrift.protocol.TProtocol prot, Assignment struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.master_code_dir = iprot.readString(); struct.set_master_code_dir_isSet(true); - BitSet incoming = iprot.readBitSet(6); + java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map726 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.node_host = new HashMap<String,String>(2*_map726.size); - String _key727; - String _val728; + struct.node_host = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map726.size); + java.lang.String _key727; + java.lang.String _val728; for (int _i729 = 0; _i729 < _map726.size; ++_i729) { _key727 = iprot.readString(); @@ -1337,14 +1302,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (incoming.get(1)) { { org.apache.thrift.protocol.TMap _map730 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.executor_node_port = new HashMap<List<Long>,NodeInfo>(2*_map730.size); - List<Long> _key731; + struct.executor_node_port = new java.util.HashMap<java.util.List<java.lang.Long>,NodeInfo>(2*_map730.size); + java.util.List<java.lang.Long> _key731; NodeInfo _val732; for (int _i733 = 0; _i733 < _map730.size; ++_i733) { { org.apache.thrift.protocol.TList _list734 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - _key731 = new ArrayList<Long>(_list734.size); + _key731 = new java.util.ArrayList<java.lang.Long>(_list734.size); long _elem735; for (int _i736 = 0; _i736 < _list734.size; ++_i736) { @@ -1362,14 +1327,14 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (incoming.get(2)) { { org.apache.thrift.protocol.TMap _map737 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.LIST, org.apache.thrift.protocol.TType.I64, iprot.readI32()); - struct.executor_start_time_secs = new HashMap<List<Long>,Long>(2*_map737.size); - List<Long> _key738; + struct.executor_start_time_secs = new java.util.HashMap<java.util.List<java.lang.Long>,java.lang.Long>(2*_map737.size); + java.util.List<java.lang.Long> _key738; long _val739; for (int _i740 = 0; _i740 < _map737.size; ++_i740) { { org.apache.thrift.protocol.TList _list741 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); - _key738 = new ArrayList<Long>(_list741.size); + _key738 = new java.util.ArrayList<java.lang.Long>(_list741.size); long _elem742; for (int _i743 = 0; _i743 < _list741.size; ++_i743) { @@ -1386,7 +1351,7 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (incoming.get(3)) { { org.apache.thrift.protocol.TMap _map744 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.worker_resources = new HashMap<NodeInfo,WorkerResources>(2*_map744.size); + struct.worker_resources = new java.util.HashMap<NodeInfo,WorkerResources>(2*_map744.size); NodeInfo _key745; WorkerResources _val746; for (int _i747 = 0; _i747 < _map744.size; ++_i747) @@ -1403,8 +1368,8 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen if (incoming.get(4)) { { org.apache.thrift.protocol.TMap _map748 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); - struct.total_shared_off_heap = new HashMap<String,Double>(2*_map748.size); - String _key749; + struct.total_shared_off_heap = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map748.size); + java.lang.String _key749; double _val750; for (int _i751 = 0; _i751 < _map748.size; ++_i751) { @@ -1422,5 +1387,8 @@ public class Assignment implements org.apache.thrift.TBase<Assignment, Assignmen } } + 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/AuthorizationException.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java b/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java index 7358535..b025e86 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.java +++ b/storm-client/src/jvm/org/apache/storm/generated/AuthorizationException.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 AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") +public class AuthorizationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException"); 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 AuthorizationExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AuthorizationExceptionTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AuthorizationExceptionStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AuthorizationExceptionTupleSchemeFactory(); - 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 AuthorizationException extends TException implements org.apache.thr */ 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 AuthorizationException extends TException implements org.apache.thr 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(AuthorizationException.class, metaDataMap); } @@ -137,7 +107,7 @@ public class AuthorizationException extends TException implements org.apache.thr } public AuthorizationException( - String msg) + java.lang.String msg) { this(); this.msg = msg; @@ -161,11 +131,11 @@ public class AuthorizationException extends TException implements org.apache.thr 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 AuthorizationException extends TException implements org.apache.thr } } - 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 AuthorizationException) @@ -231,6 +201,8 @@ public class AuthorizationException extends TException implements org.apache.thr public boolean equals(AuthorizationException 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 AuthorizationException extends TException implements org.apache.thr @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 AuthorizationException extends TException implements org.apache.thr 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 AuthorizationException extends TException implements org.apache.thr } 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("AuthorizationException("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("AuthorizationException("); boolean first = true; sb.append("msg:"); @@ -322,7 +293,7 @@ public class AuthorizationException extends TException implements org.apache.thr } } - 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 AuthorizationException extends TException implements org.apache.thr } } - private static class AuthorizationExceptionStandardSchemeFactory implements SchemeFactory { + private static class AuthorizationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public AuthorizationExceptionStandardScheme getScheme() { return new AuthorizationExceptionStandardScheme(); } } - private static class AuthorizationExceptionStandardScheme extends StandardScheme<AuthorizationException> { + private static class AuthorizationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<AuthorizationException> { public void read(org.apache.thrift.protocol.TProtocol iprot, AuthorizationException struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -380,27 +351,30 @@ public class AuthorizationException extends TException implements org.apache.thr } - private static class AuthorizationExceptionTupleSchemeFactory implements SchemeFactory { + private static class AuthorizationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public AuthorizationExceptionTupleScheme getScheme() { return new AuthorizationExceptionTupleScheme(); } } - private static class AuthorizationExceptionTupleScheme extends TupleScheme<AuthorizationException> { + private static class AuthorizationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<AuthorizationException> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, AuthorizationException 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, AuthorizationException struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.msg = iprot.readString(); struct.set_msg_isSet(true); } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java b/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java index 925f00b..17436aa 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java +++ b/storm-client/src/jvm/org/apache/storm/generated/BeginDownloadResult.java @@ -16,42 +16,15 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.storm.generated; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloadResult, BeginDownloadResult._Fields>, java.io.Serializable, Cloneable, Comparable<BeginDownloadResult> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BeginDownloadResult"); @@ -59,14 +32,11 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DATA_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("data_size", org.apache.thrift.protocol.TType.I64, (short)3); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new BeginDownloadResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new BeginDownloadResultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BeginDownloadResultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BeginDownloadResultTupleSchemeFactory(); private long version; // required - private String session; // required + private java.lang.String session; // required private long data_size; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -75,10 +45,10 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa SESSION((short)2, "session"), DATA_SIZE((short)3, "data_size"); - 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 +75,21 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa */ 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,7 +98,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -138,16 +108,16 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa private static final int __DATA_SIZE_ISSET_ID = 1; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.DATA_SIZE}; - 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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DATA_SIZE, new org.apache.thrift.meta_data.FieldMetaData("data_size", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BeginDownloadResult.class, metaDataMap); } @@ -156,7 +126,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa public BeginDownloadResult( long version, - String session) + java.lang.String session) { this(); this.version = version; @@ -199,23 +169,23 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa } public void unset_version() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); } /** Returns true if field version is set (has been assigned a value) and false otherwise */ public boolean is_set_version() { - return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); } public void set_version_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); } - public String get_session() { + public java.lang.String get_session() { return this.session; } - public void set_session(String session) { + public void set_session(java.lang.String session) { this.session = session; } @@ -244,25 +214,25 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa } public void unset_data_size() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATA_SIZE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATA_SIZE_ISSET_ID); } /** Returns true if field data_size is set (has been assigned a value) and false otherwise */ public boolean is_set_data_size() { - return EncodingUtils.testBit(__isset_bitfield, __DATA_SIZE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATA_SIZE_ISSET_ID); } public void set_data_size_isSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATA_SIZE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATA_SIZE_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case VERSION: if (value == null) { unset_version(); } else { - set_version((Long)value); + set_version((java.lang.Long)value); } break; @@ -270,7 +240,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa if (value == null) { unset_session(); } else { - set_session((String)value); + set_session((java.lang.String)value); } break; @@ -278,14 +248,14 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa if (value == null) { unset_data_size(); } else { - set_data_size((Long)value); + set_data_size((java.lang.Long)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case VERSION: return get_version(); @@ -297,13 +267,13 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa return get_data_size(); } - 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) { @@ -314,11 +284,11 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa case DATA_SIZE: return is_set_data_size(); } - 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 BeginDownloadResult) @@ -329,6 +299,8 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa public boolean equals(BeginDownloadResult that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_version = true; boolean that_present_version = true; @@ -362,24 +334,19 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_version = true; - list.add(present_version); - if (present_version) - list.add(version); + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(version); - boolean present_session = true && (is_set_session()); - list.add(present_session); - if (present_session) - list.add(session); + hashCode = hashCode * 8191 + ((is_set_session()) ? 131071 : 524287); + if (is_set_session()) + hashCode = hashCode * 8191 + session.hashCode(); - boolean present_data_size = true && (is_set_data_size()); - list.add(present_data_size); - if (present_data_size) - list.add(data_size); + hashCode = hashCode * 8191 + ((is_set_data_size()) ? 131071 : 524287); + if (is_set_data_size()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(data_size); - return list.hashCode(); + return hashCode; } @Override @@ -390,7 +357,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_version()).compareTo(other.is_set_version()); + lastComparison = java.lang.Boolean.valueOf(is_set_version()).compareTo(other.is_set_version()); if (lastComparison != 0) { return lastComparison; } @@ -400,7 +367,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_session()).compareTo(other.is_set_session()); + lastComparison = java.lang.Boolean.valueOf(is_set_session()).compareTo(other.is_set_session()); if (lastComparison != 0) { return lastComparison; } @@ -410,7 +377,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_data_size()).compareTo(other.is_set_data_size()); + lastComparison = java.lang.Boolean.valueOf(is_set_data_size()).compareTo(other.is_set_data_size()); if (lastComparison != 0) { return lastComparison; } @@ -428,16 +395,16 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa } 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("BeginDownloadResult("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("BeginDownloadResult("); boolean first = true; sb.append("version:"); @@ -482,7 +449,7 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -492,13 +459,13 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa } } - private static class BeginDownloadResultStandardSchemeFactory implements SchemeFactory { + private static class BeginDownloadResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public BeginDownloadResultStandardScheme getScheme() { return new BeginDownloadResultStandardScheme(); } } - private static class BeginDownloadResultStandardScheme extends StandardScheme<BeginDownloadResult> { + private static class BeginDownloadResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<BeginDownloadResult> { public void read(org.apache.thrift.protocol.TProtocol iprot, BeginDownloadResult struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -566,20 +533,20 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa } - private static class BeginDownloadResultTupleSchemeFactory implements SchemeFactory { + private static class BeginDownloadResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public BeginDownloadResultTupleScheme getScheme() { return new BeginDownloadResultTupleScheme(); } } - private static class BeginDownloadResultTupleScheme extends TupleScheme<BeginDownloadResult> { + private static class BeginDownloadResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<BeginDownloadResult> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, BeginDownloadResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeI64(struct.version); oprot.writeString(struct.session); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_data_size()) { optionals.set(0); } @@ -591,12 +558,12 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa @Override public void read(org.apache.thrift.protocol.TProtocol prot, BeginDownloadResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.version = iprot.readI64(); struct.set_version_isSet(true); struct.session = iprot.readString(); struct.set_session_isSet(true); - BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.data_size = iprot.readI64(); struct.set_data_size_isSet(true); @@ -604,5 +571,8 @@ public class BeginDownloadResult implements org.apache.thrift.TBase<BeginDownloa } } + 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(); + } }
