You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/05/23 20:03:37 UTC
[07/43] storm git commit: STORM-3061: thrift 0.11
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java
index f7813fd..fca0694 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerMetrics.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, WorkerMetrics._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerMetrics> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerMetrics");
@@ -60,15 +33,12 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField METRIC_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("metricList", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerMetricsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerMetricsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerMetricsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerMetricsTupleSchemeFactory();
- private String topologyId; // required
+ private java.lang.String topologyId; // required
private int port; // required
- private String hostname; // required
+ private java.lang.String hostname; // required
private WorkerMetricList metricList; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -78,10 +48,10 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
HOSTNAME((short)3, "hostname"),
METRIC_LIST((short)4, "metricList");
- 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);
}
}
@@ -110,21 +80,21 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
*/
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;
}
@@ -133,7 +103,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,9 +111,9 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
// isset id assignments
private static final int __PORT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TOPOLOGY_ID, new org.apache.thrift.meta_data.FieldMetaData("topologyId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.REQUIRED,
@@ -152,7 +122,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.METRIC_LIST, new org.apache.thrift.meta_data.FieldMetaData("metricList", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkerMetricList.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerMetrics.class, metaDataMap);
}
@@ -160,9 +130,9 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
public WorkerMetrics(
- String topologyId,
+ java.lang.String topologyId,
int port,
- String hostname,
+ java.lang.String hostname,
WorkerMetricList metricList)
{
this();
@@ -203,11 +173,11 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
this.metricList = null;
}
- public String get_topologyId() {
+ public java.lang.String get_topologyId() {
return this.topologyId;
}
- public void set_topologyId(String topologyId) {
+ public void set_topologyId(java.lang.String topologyId) {
this.topologyId = topologyId;
}
@@ -236,23 +206,23 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
public void unset_port() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean is_set_port() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void set_port_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
- public String get_hostname() {
+ public java.lang.String get_hostname() {
return this.hostname;
}
- public void set_hostname(String hostname) {
+ public void set_hostname(java.lang.String hostname) {
this.hostname = hostname;
}
@@ -294,13 +264,13 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TOPOLOGY_ID:
if (value == null) {
unset_topologyId();
} else {
- set_topologyId((String)value);
+ set_topologyId((java.lang.String)value);
}
break;
@@ -308,7 +278,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
if (value == null) {
unset_port();
} else {
- set_port((Integer)value);
+ set_port((java.lang.Integer)value);
}
break;
@@ -316,7 +286,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
if (value == null) {
unset_hostname();
} else {
- set_hostname((String)value);
+ set_hostname((java.lang.String)value);
}
break;
@@ -331,7 +301,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOPOLOGY_ID:
return get_topologyId();
@@ -346,13 +316,13 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return get_metricList();
}
- 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) {
@@ -365,11 +335,11 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
case METRIC_LIST:
return is_set_metricList();
}
- 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 WorkerMetrics)
@@ -380,6 +350,8 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
public boolean equals(WorkerMetrics that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_topologyId = true && this.is_set_topologyId();
boolean that_present_topologyId = true && that.is_set_topologyId();
@@ -422,29 +394,23 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_topologyId = true && (is_set_topologyId());
- list.add(present_topologyId);
- if (present_topologyId)
- list.add(topologyId);
+ hashCode = hashCode * 8191 + ((is_set_topologyId()) ? 131071 : 524287);
+ if (is_set_topologyId())
+ hashCode = hashCode * 8191 + topologyId.hashCode();
- boolean present_port = true;
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + port;
- boolean present_hostname = true && (is_set_hostname());
- list.add(present_hostname);
- if (present_hostname)
- list.add(hostname);
+ hashCode = hashCode * 8191 + ((is_set_hostname()) ? 131071 : 524287);
+ if (is_set_hostname())
+ hashCode = hashCode * 8191 + hostname.hashCode();
- boolean present_metricList = true && (is_set_metricList());
- list.add(present_metricList);
- if (present_metricList)
- list.add(metricList);
+ hashCode = hashCode * 8191 + ((is_set_metricList()) ? 131071 : 524287);
+ if (is_set_metricList())
+ hashCode = hashCode * 8191 + metricList.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -455,7 +421,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_topologyId()).compareTo(other.is_set_topologyId());
+ lastComparison = java.lang.Boolean.valueOf(is_set_topologyId()).compareTo(other.is_set_topologyId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -465,7 +431,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
+ lastComparison = java.lang.Boolean.valueOf(is_set_port()).compareTo(other.is_set_port());
if (lastComparison != 0) {
return lastComparison;
}
@@ -475,7 +441,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_hostname()).compareTo(other.is_set_hostname());
+ lastComparison = java.lang.Boolean.valueOf(is_set_hostname()).compareTo(other.is_set_hostname());
if (lastComparison != 0) {
return lastComparison;
}
@@ -485,7 +451,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_metricList()).compareTo(other.is_set_metricList());
+ lastComparison = java.lang.Boolean.valueOf(is_set_metricList()).compareTo(other.is_set_metricList());
if (lastComparison != 0) {
return lastComparison;
}
@@ -503,16 +469,16 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
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("WorkerMetrics(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerMetrics(");
boolean first = true;
sb.append("topologyId:");
@@ -578,7 +544,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
- 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;
@@ -588,13 +554,13 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
- private static class WorkerMetricsStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerMetricsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerMetricsStandardScheme getScheme() {
return new WorkerMetricsStandardScheme();
}
}
- private static class WorkerMetricsStandardScheme extends StandardScheme<WorkerMetrics> {
+ private static class WorkerMetricsStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerMetrics> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerMetrics struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -676,17 +642,17 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
- private static class WorkerMetricsTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerMetricsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerMetricsTupleScheme getScheme() {
return new WorkerMetricsTupleScheme();
}
}
- private static class WorkerMetricsTupleScheme extends TupleScheme<WorkerMetrics> {
+ private static class WorkerMetricsTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerMetrics> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerMetrics 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.topologyId);
oprot.writeI32(struct.port);
oprot.writeString(struct.hostname);
@@ -695,7 +661,7 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerMetrics struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.topologyId = iprot.readString();
struct.set_topologyId_isSet(true);
struct.port = iprot.readI32();
@@ -708,5 +674,8 @@ public class WorkerMetrics implements org.apache.thrift.TBase<WorkerMetrics, Wor
}
}
+ 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/WorkerResources.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java b/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java
index d25b5b0..fcd7791 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/WorkerResources.java
@@ -16,42 +16,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class WorkerResources implements org.apache.thrift.TBase<WorkerResources, WorkerResources._Fields>, java.io.Serializable, Cloneable, Comparable<WorkerResources> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkerResources");
@@ -63,19 +36,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
private static final org.apache.thrift.protocol.TField RESOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("resources", org.apache.thrift.protocol.TType.MAP, (short)6);
private static final org.apache.thrift.protocol.TField SHARED_RESOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("shared_resources", org.apache.thrift.protocol.TType.MAP, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WorkerResourcesStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WorkerResourcesTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WorkerResourcesStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WorkerResourcesTupleSchemeFactory();
private double mem_on_heap; // optional
private double mem_off_heap; // optional
private double cpu; // optional
private double shared_mem_on_heap; // optional
private double shared_mem_off_heap; // optional
- private Map<String,Double> resources; // optional
- private Map<String,Double> shared_resources; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> resources; // optional
+ private java.util.Map<java.lang.String,java.lang.Double> shared_resources; // 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 WorkerResources implements org.apache.thrift.TBase<WorkerResources,
RESOURCES((short)6, "resources"),
SHARED_RESOURCES((short)7, "shared_resources");
- 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 WorkerResources implements org.apache.thrift.TBase<WorkerResources,
*/
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,7 +118,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -161,9 +131,9 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
private static final int __SHARED_MEM_OFF_HEAP_ISSET_ID = 4;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.MEM_ON_HEAP,_Fields.MEM_OFF_HEAP,_Fields.CPU,_Fields.SHARED_MEM_ON_HEAP,_Fields.SHARED_MEM_OFF_HEAP,_Fields.RESOURCES,_Fields.SHARED_RESOURCES};
- 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.MEM_ON_HEAP, new org.apache.thrift.meta_data.FieldMetaData("mem_on_heap", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.MEM_OFF_HEAP, new org.apache.thrift.meta_data.FieldMetaData("mem_off_heap", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -182,7 +152,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkerResources.class, metaDataMap);
}
@@ -200,11 +170,11 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
this.shared_mem_on_heap = other.shared_mem_on_heap;
this.shared_mem_off_heap = other.shared_mem_off_heap;
if (other.is_set_resources()) {
- Map<String,Double> __this__resources = new HashMap<String,Double>(other.resources);
+ java.util.Map<java.lang.String,java.lang.Double> __this__resources = new java.util.HashMap<java.lang.String,java.lang.Double>(other.resources);
this.resources = __this__resources;
}
if (other.is_set_shared_resources()) {
- Map<String,Double> __this__shared_resources = new HashMap<String,Double>(other.shared_resources);
+ java.util.Map<java.lang.String,java.lang.Double> __this__shared_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(other.shared_resources);
this.shared_resources = __this__shared_resources;
}
}
@@ -239,16 +209,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_mem_on_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID);
}
/** Returns true if field mem_on_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_mem_on_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID);
}
public void set_mem_on_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEM_ON_HEAP_ISSET_ID, value);
}
public double get_mem_off_heap() {
@@ -261,16 +231,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_mem_off_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID);
}
/** Returns true if field mem_off_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_mem_off_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID);
}
public void set_mem_off_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEM_OFF_HEAP_ISSET_ID, value);
}
public double get_cpu() {
@@ -283,16 +253,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_cpu() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CPU_ISSET_ID);
}
/** Returns true if field cpu is set (has been assigned a value) and false otherwise */
public boolean is_set_cpu() {
- return EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CPU_ISSET_ID);
}
public void set_cpu_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CPU_ISSET_ID, value);
}
public double get_shared_mem_on_heap() {
@@ -305,16 +275,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_shared_mem_on_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID);
}
/** Returns true if field shared_mem_on_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_shared_mem_on_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID);
}
public void set_shared_mem_on_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SHARED_MEM_ON_HEAP_ISSET_ID, value);
}
public double get_shared_mem_off_heap() {
@@ -327,34 +297,34 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
public void unset_shared_mem_off_heap() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID);
}
/** Returns true if field shared_mem_off_heap is set (has been assigned a value) and false otherwise */
public boolean is_set_shared_mem_off_heap() {
- return EncodingUtils.testBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID);
}
public void set_shared_mem_off_heap_isSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SHARED_MEM_OFF_HEAP_ISSET_ID, value);
}
public int get_resources_size() {
return (this.resources == null) ? 0 : this.resources.size();
}
- public void put_to_resources(String key, double val) {
+ public void put_to_resources(java.lang.String key, double val) {
if (this.resources == null) {
- this.resources = new HashMap<String,Double>();
+ this.resources = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.resources.put(key, val);
}
- public Map<String,Double> get_resources() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_resources() {
return this.resources;
}
- public void set_resources(Map<String,Double> resources) {
+ public void set_resources(java.util.Map<java.lang.String,java.lang.Double> resources) {
this.resources = resources;
}
@@ -377,18 +347,18 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return (this.shared_resources == null) ? 0 : this.shared_resources.size();
}
- public void put_to_shared_resources(String key, double val) {
+ public void put_to_shared_resources(java.lang.String key, double val) {
if (this.shared_resources == null) {
- this.shared_resources = new HashMap<String,Double>();
+ this.shared_resources = new java.util.HashMap<java.lang.String,java.lang.Double>();
}
this.shared_resources.put(key, val);
}
- public Map<String,Double> get_shared_resources() {
+ public java.util.Map<java.lang.String,java.lang.Double> get_shared_resources() {
return this.shared_resources;
}
- public void set_shared_resources(Map<String,Double> shared_resources) {
+ public void set_shared_resources(java.util.Map<java.lang.String,java.lang.Double> shared_resources) {
this.shared_resources = shared_resources;
}
@@ -407,13 +377,13 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MEM_ON_HEAP:
if (value == null) {
unset_mem_on_heap();
} else {
- set_mem_on_heap((Double)value);
+ set_mem_on_heap((java.lang.Double)value);
}
break;
@@ -421,7 +391,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_mem_off_heap();
} else {
- set_mem_off_heap((Double)value);
+ set_mem_off_heap((java.lang.Double)value);
}
break;
@@ -429,7 +399,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_cpu();
} else {
- set_cpu((Double)value);
+ set_cpu((java.lang.Double)value);
}
break;
@@ -437,7 +407,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_shared_mem_on_heap();
} else {
- set_shared_mem_on_heap((Double)value);
+ set_shared_mem_on_heap((java.lang.Double)value);
}
break;
@@ -445,7 +415,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_shared_mem_off_heap();
} else {
- set_shared_mem_off_heap((Double)value);
+ set_shared_mem_off_heap((java.lang.Double)value);
}
break;
@@ -453,7 +423,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_resources();
} else {
- set_resources((Map<String,Double>)value);
+ set_resources((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
@@ -461,14 +431,14 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (value == null) {
unset_shared_resources();
} else {
- set_shared_resources((Map<String,Double>)value);
+ set_shared_resources((java.util.Map<java.lang.String,java.lang.Double>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MEM_ON_HEAP:
return get_mem_on_heap();
@@ -492,13 +462,13 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return get_shared_resources();
}
- 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) {
@@ -517,11 +487,11 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
case SHARED_RESOURCES:
return is_set_shared_resources();
}
- 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 WorkerResources)
@@ -532,6 +502,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
public boolean equals(WorkerResources that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_mem_on_heap = true && this.is_set_mem_on_heap();
boolean that_present_mem_on_heap = true && that.is_set_mem_on_heap();
@@ -601,44 +573,37 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_mem_on_heap = true && (is_set_mem_on_heap());
- list.add(present_mem_on_heap);
- if (present_mem_on_heap)
- list.add(mem_on_heap);
+ hashCode = hashCode * 8191 + ((is_set_mem_on_heap()) ? 131071 : 524287);
+ if (is_set_mem_on_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mem_on_heap);
- boolean present_mem_off_heap = true && (is_set_mem_off_heap());
- list.add(present_mem_off_heap);
- if (present_mem_off_heap)
- list.add(mem_off_heap);
+ hashCode = hashCode * 8191 + ((is_set_mem_off_heap()) ? 131071 : 524287);
+ if (is_set_mem_off_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mem_off_heap);
- boolean present_cpu = true && (is_set_cpu());
- list.add(present_cpu);
- if (present_cpu)
- list.add(cpu);
+ hashCode = hashCode * 8191 + ((is_set_cpu()) ? 131071 : 524287);
+ if (is_set_cpu())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(cpu);
- boolean present_shared_mem_on_heap = true && (is_set_shared_mem_on_heap());
- list.add(present_shared_mem_on_heap);
- if (present_shared_mem_on_heap)
- list.add(shared_mem_on_heap);
+ hashCode = hashCode * 8191 + ((is_set_shared_mem_on_heap()) ? 131071 : 524287);
+ if (is_set_shared_mem_on_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(shared_mem_on_heap);
- boolean present_shared_mem_off_heap = true && (is_set_shared_mem_off_heap());
- list.add(present_shared_mem_off_heap);
- if (present_shared_mem_off_heap)
- list.add(shared_mem_off_heap);
+ hashCode = hashCode * 8191 + ((is_set_shared_mem_off_heap()) ? 131071 : 524287);
+ if (is_set_shared_mem_off_heap())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(shared_mem_off_heap);
- boolean present_resources = true && (is_set_resources());
- list.add(present_resources);
- if (present_resources)
- list.add(resources);
+ hashCode = hashCode * 8191 + ((is_set_resources()) ? 131071 : 524287);
+ if (is_set_resources())
+ hashCode = hashCode * 8191 + resources.hashCode();
- boolean present_shared_resources = true && (is_set_shared_resources());
- list.add(present_shared_resources);
- if (present_shared_resources)
- list.add(shared_resources);
+ hashCode = hashCode * 8191 + ((is_set_shared_resources()) ? 131071 : 524287);
+ if (is_set_shared_resources())
+ hashCode = hashCode * 8191 + shared_resources.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -649,7 +614,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(is_set_mem_on_heap()).compareTo(other.is_set_mem_on_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_mem_on_heap()).compareTo(other.is_set_mem_on_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -659,7 +624,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_mem_off_heap()).compareTo(other.is_set_mem_off_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_mem_off_heap()).compareTo(other.is_set_mem_off_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -669,7 +634,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_cpu()).compareTo(other.is_set_cpu());
+ lastComparison = java.lang.Boolean.valueOf(is_set_cpu()).compareTo(other.is_set_cpu());
if (lastComparison != 0) {
return lastComparison;
}
@@ -679,7 +644,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_shared_mem_on_heap()).compareTo(other.is_set_shared_mem_on_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_shared_mem_on_heap()).compareTo(other.is_set_shared_mem_on_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -689,7 +654,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_shared_mem_off_heap()).compareTo(other.is_set_shared_mem_off_heap());
+ lastComparison = java.lang.Boolean.valueOf(is_set_shared_mem_off_heap()).compareTo(other.is_set_shared_mem_off_heap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -699,7 +664,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_resources()).compareTo(other.is_set_resources());
+ lastComparison = java.lang.Boolean.valueOf(is_set_resources()).compareTo(other.is_set_resources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -709,7 +674,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_shared_resources()).compareTo(other.is_set_shared_resources());
+ lastComparison = java.lang.Boolean.valueOf(is_set_shared_resources()).compareTo(other.is_set_shared_resources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -727,16 +692,16 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
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("WorkerResources(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WorkerResources(");
boolean first = true;
if (is_set_mem_on_heap()) {
@@ -805,7 +770,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
}
- 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;
@@ -815,13 +780,13 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
}
- private static class WorkerResourcesStandardSchemeFactory implements SchemeFactory {
+ private static class WorkerResourcesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerResourcesStandardScheme getScheme() {
return new WorkerResourcesStandardScheme();
}
}
- private static class WorkerResourcesStandardScheme extends StandardScheme<WorkerResources> {
+ private static class WorkerResourcesStandardScheme extends org.apache.thrift.scheme.StandardScheme<WorkerResources> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WorkerResources struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -877,8 +842,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map666 = iprot.readMapBegin();
- struct.resources = new HashMap<String,Double>(2*_map666.size);
- String _key667;
+ struct.resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map666.size);
+ java.lang.String _key667;
double _val668;
for (int _i669 = 0; _i669 < _map666.size; ++_i669)
{
@@ -897,8 +862,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map670 = iprot.readMapBegin();
- struct.shared_resources = new HashMap<String,Double>(2*_map670.size);
- String _key671;
+ struct.shared_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map670.size);
+ java.lang.String _key671;
double _val672;
for (int _i673 = 0; _i673 < _map670.size; ++_i673)
{
@@ -956,7 +921,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
oprot.writeFieldBegin(RESOURCES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.resources.size()));
- for (Map.Entry<String, Double> _iter674 : struct.resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter674 : struct.resources.entrySet())
{
oprot.writeString(_iter674.getKey());
oprot.writeDouble(_iter674.getValue());
@@ -971,7 +936,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
oprot.writeFieldBegin(SHARED_RESOURCES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, struct.shared_resources.size()));
- for (Map.Entry<String, Double> _iter675 : struct.shared_resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter675 : struct.shared_resources.entrySet())
{
oprot.writeString(_iter675.getKey());
oprot.writeDouble(_iter675.getValue());
@@ -987,18 +952,18 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
- private static class WorkerResourcesTupleSchemeFactory implements SchemeFactory {
+ private static class WorkerResourcesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WorkerResourcesTupleScheme getScheme() {
return new WorkerResourcesTupleScheme();
}
}
- private static class WorkerResourcesTupleScheme extends TupleScheme<WorkerResources> {
+ private static class WorkerResourcesTupleScheme extends org.apache.thrift.scheme.TupleScheme<WorkerResources> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WorkerResources 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_mem_on_heap()) {
optionals.set(0);
}
@@ -1039,7 +1004,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (struct.is_set_resources()) {
{
oprot.writeI32(struct.resources.size());
- for (Map.Entry<String, Double> _iter676 : struct.resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter676 : struct.resources.entrySet())
{
oprot.writeString(_iter676.getKey());
oprot.writeDouble(_iter676.getValue());
@@ -1049,7 +1014,7 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (struct.is_set_shared_resources()) {
{
oprot.writeI32(struct.shared_resources.size());
- for (Map.Entry<String, Double> _iter677 : struct.shared_resources.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Double> _iter677 : struct.shared_resources.entrySet())
{
oprot.writeString(_iter677.getKey());
oprot.writeDouble(_iter677.getValue());
@@ -1060,8 +1025,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WorkerResources struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.mem_on_heap = iprot.readDouble();
struct.set_mem_on_heap_isSet(true);
@@ -1085,8 +1050,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TMap _map678 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.resources = new HashMap<String,Double>(2*_map678.size);
- String _key679;
+ struct.resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map678.size);
+ java.lang.String _key679;
double _val680;
for (int _i681 = 0; _i681 < _map678.size; ++_i681)
{
@@ -1100,8 +1065,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TMap _map682 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32());
- struct.shared_resources = new HashMap<String,Double>(2*_map682.size);
- String _key683;
+ struct.shared_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(2*_map682.size);
+ java.lang.String _key683;
double _val684;
for (int _i685 = 0; _i685 < _map682.size; ++_i685)
{
@@ -1115,5 +1080,8 @@ public class WorkerResources implements org.apache.thrift.TBase<WorkerResources,
}
}
+ 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();
+ }
}