You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2017/02/09 19:29:30 UTC
[02/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/ruby/accumulo_proxy.rb
----------------------------------------------------------------------
diff --git a/proxy/src/main/ruby/accumulo_proxy.rb b/proxy/src/main/ruby/accumulo_proxy.rb
index e02ba16..3c02507 100644
--- a/proxy/src/main/ruby/accumulo_proxy.rb
+++ b/proxy/src/main/ruby/accumulo_proxy.rb
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/ruby/proxy_constants.rb
----------------------------------------------------------------------
diff --git a/proxy/src/main/ruby/proxy_constants.rb b/proxy/src/main/ruby/proxy_constants.rb
index baaf9af..47eb2cf 100644
--- a/proxy/src/main/ruby/proxy_constants.rb
+++ b/proxy/src/main/ruby/proxy_constants.rb
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/ruby/proxy_types.rb
----------------------------------------------------------------------
diff --git a/proxy/src/main/ruby/proxy_types.rb b/proxy/src/main/ruby/proxy_types.rb
index e542df6..163e2df 100644
--- a/proxy/src/main/ruby/proxy_types.rb
+++ b/proxy/src/main/ruby/proxy_types.rb
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java
index 3997c21..ee36b66 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.tracer.thrift;
-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", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class Annotation implements org.apache.thrift.TBase<Annotation, Annotation._Fields>, java.io.Serializable, Cloneable, Comparable<Annotation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Annotation");
private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.I64, (short)1);
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)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AnnotationStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AnnotationTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AnnotationStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AnnotationTupleSchemeFactory();
public long time; // required
- public String msg; // required
+ public 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 {
TIME((short)1, "time"),
MSG((short)2, "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);
}
}
@@ -99,21 +69,21 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
*/
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;
}
@@ -122,7 +92,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,14 +100,14 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
// isset id assignments
private static final int __TIME_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.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
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(Annotation.class, metaDataMap);
}
@@ -146,7 +116,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
public Annotation(
long time,
- String msg)
+ java.lang.String msg)
{
this();
this.time = time;
@@ -187,23 +157,23 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
public void unsetTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_ISSET_ID);
}
/** Returns true if field time is set (has been assigned a value) and false otherwise */
public boolean isSetTime() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID);
}
public void setTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_ISSET_ID, value);
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public Annotation setMsg(String msg) {
+ public Annotation setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -223,13 +193,13 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TIME:
if (value == null) {
unsetTime();
} else {
- setTime((Long)value);
+ setTime((java.lang.Long)value);
}
break;
@@ -237,14 +207,14 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TIME:
return getTime();
@@ -253,13 +223,13 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
return getMsg();
}
- 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) {
@@ -268,11 +238,11 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
case MSG:
return isSetMsg();
}
- 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 Annotation)
@@ -283,6 +253,8 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
public boolean equals(Annotation that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_time = true;
boolean that_present_time = true;
@@ -307,19 +279,15 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_time = true;
- list.add(present_time);
- if (present_time)
- list.add(time);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(time);
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -330,7 +298,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTime()).compareTo(other.isSetTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetTime()).compareTo(other.isSetTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -340,7 +308,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,16 +326,16 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
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("Annotation(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Annotation(");
boolean first = true;
sb.append("time:");
@@ -398,7 +366,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
}
- 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;
@@ -408,13 +376,13 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
}
- private static class AnnotationStandardSchemeFactory implements SchemeFactory {
+ private static class AnnotationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AnnotationStandardScheme getScheme() {
return new AnnotationStandardScheme();
}
}
- private static class AnnotationStandardScheme extends StandardScheme<Annotation> {
+ private static class AnnotationStandardScheme extends org.apache.thrift.scheme.StandardScheme<Annotation> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Annotation struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -471,18 +439,18 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
- private static class AnnotationTupleSchemeFactory implements SchemeFactory {
+ private static class AnnotationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AnnotationTupleScheme getScheme() {
return new AnnotationTupleScheme();
}
}
- private static class AnnotationTupleScheme extends TupleScheme<Annotation> {
+ private static class AnnotationTupleScheme extends org.apache.thrift.scheme.TupleScheme<Annotation> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Annotation 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.isSetTime()) {
optionals.set(0);
}
@@ -500,8 +468,8 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.time = iprot.readI64();
struct.setTimeIsSet(true);
@@ -513,5 +481,9 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
}
+ 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();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
index 34025ef..8b24aa9 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.tracer.thrift;
-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", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpan._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteSpan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteSpan");
@@ -65,22 +38,19 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.MAP, (short)9);
private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)10);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new RemoteSpanStandardSchemeFactory());
- schemes.put(TupleScheme.class, new RemoteSpanTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RemoteSpanStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RemoteSpanTupleSchemeFactory();
- public String sender; // required
- public String svc; // required
+ public java.lang.String sender; // required
+ public java.lang.String svc; // required
public long traceId; // required
public long spanId; // required
public long parentId; // required
public long start; // required
public long stop; // required
- public String description; // required
- public Map<String,String> data; // required
- public List<Annotation> annotations; // required
+ public java.lang.String description; // required
+ public java.util.Map<java.lang.String,java.lang.String> data; // required
+ public java.util.List<Annotation> annotations; // 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 {
@@ -95,10 +65,10 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
DATA((short)9, "data"),
ANNOTATIONS((short)10, "annotations");
- 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);
}
}
@@ -139,21 +109,21 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
*/
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;
}
@@ -162,7 +132,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -174,9 +144,9 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
private static final int __START_ISSET_ID = 3;
private static final int __STOP_ISSET_ID = 4;
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.SENDER, new org.apache.thrift.meta_data.FieldMetaData("sender", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SVC, new org.apache.thrift.meta_data.FieldMetaData("svc", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -200,7 +170,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Annotation.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteSpan.class, metaDataMap);
}
@@ -208,16 +178,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public RemoteSpan(
- String sender,
- String svc,
+ java.lang.String sender,
+ java.lang.String svc,
long traceId,
long spanId,
long parentId,
long start,
long stop,
- String description,
- Map<String,String> data,
- List<Annotation> annotations)
+ java.lang.String description,
+ java.util.Map<java.lang.String,java.lang.String> data,
+ java.util.List<Annotation> annotations)
{
this();
this.sender = sender;
@@ -257,11 +227,11 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
this.description = other.description;
}
if (other.isSetData()) {
- Map<String,String> __this__data = new HashMap<String,String>(other.data);
+ java.util.Map<java.lang.String,java.lang.String> __this__data = new java.util.HashMap<java.lang.String,java.lang.String>(other.data);
this.data = __this__data;
}
if (other.isSetAnnotations()) {
- List<Annotation> __this__annotations = new ArrayList<Annotation>(other.annotations.size());
+ java.util.List<Annotation> __this__annotations = new java.util.ArrayList<Annotation>(other.annotations.size());
for (Annotation other_element : other.annotations) {
__this__annotations.add(new Annotation(other_element));
}
@@ -292,11 +262,11 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
this.annotations = null;
}
- public String getSender() {
+ public java.lang.String getSender() {
return this.sender;
}
- public RemoteSpan setSender(String sender) {
+ public RemoteSpan setSender(java.lang.String sender) {
this.sender = sender;
return this;
}
@@ -316,11 +286,11 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
- public String getSvc() {
+ public java.lang.String getSvc() {
return this.svc;
}
- public RemoteSpan setSvc(String svc) {
+ public RemoteSpan setSvc(java.lang.String svc) {
this.svc = svc;
return this;
}
@@ -351,16 +321,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetTraceId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
}
/** Returns true if field traceId is set (has been assigned a value) and false otherwise */
public boolean isSetTraceId() {
- return EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
}
public void setTraceIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
}
public long getSpanId() {
@@ -374,16 +344,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetSpanId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID);
}
/** Returns true if field spanId is set (has been assigned a value) and false otherwise */
public boolean isSetSpanId() {
- return EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID);
}
public void setSpanIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value);
}
public long getParentId() {
@@ -397,16 +367,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetParentId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
}
/** Returns true if field parentId is set (has been assigned a value) and false otherwise */
public boolean isSetParentId() {
- return EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
}
public void setParentIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
}
public long getStart() {
@@ -420,16 +390,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetStart() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID);
}
/** Returns true if field start is set (has been assigned a value) and false otherwise */
public boolean isSetStart() {
- return EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID);
}
public void setStartIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value);
}
public long getStop() {
@@ -443,23 +413,23 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetStop() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STOP_ISSET_ID);
}
/** Returns true if field stop is set (has been assigned a value) and false otherwise */
public boolean isSetStop() {
- return EncodingUtils.testBit(__isset_bitfield, __STOP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STOP_ISSET_ID);
}
public void setStopIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STOP_ISSET_ID, value);
}
- public String getDescription() {
+ public java.lang.String getDescription() {
return this.description;
}
- public RemoteSpan setDescription(String description) {
+ public RemoteSpan setDescription(java.lang.String description) {
this.description = description;
return this;
}
@@ -483,18 +453,18 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return (this.data == null) ? 0 : this.data.size();
}
- public void putToData(String key, String val) {
+ public void putToData(java.lang.String key, java.lang.String val) {
if (this.data == null) {
- this.data = new HashMap<String,String>();
+ this.data = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.data.put(key, val);
}
- public Map<String,String> getData() {
+ public java.util.Map<java.lang.String,java.lang.String> getData() {
return this.data;
}
- public RemoteSpan setData(Map<String,String> data) {
+ public RemoteSpan setData(java.util.Map<java.lang.String,java.lang.String> data) {
this.data = data;
return this;
}
@@ -524,16 +494,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
public void addToAnnotations(Annotation elem) {
if (this.annotations == null) {
- this.annotations = new ArrayList<Annotation>();
+ this.annotations = new java.util.ArrayList<Annotation>();
}
this.annotations.add(elem);
}
- public List<Annotation> getAnnotations() {
+ public java.util.List<Annotation> getAnnotations() {
return this.annotations;
}
- public RemoteSpan setAnnotations(List<Annotation> annotations) {
+ public RemoteSpan setAnnotations(java.util.List<Annotation> annotations) {
this.annotations = annotations;
return this;
}
@@ -553,13 +523,13 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SENDER:
if (value == null) {
unsetSender();
} else {
- setSender((String)value);
+ setSender((java.lang.String)value);
}
break;
@@ -567,7 +537,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetSvc();
} else {
- setSvc((String)value);
+ setSvc((java.lang.String)value);
}
break;
@@ -575,7 +545,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetTraceId();
} else {
- setTraceId((Long)value);
+ setTraceId((java.lang.Long)value);
}
break;
@@ -583,7 +553,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetSpanId();
} else {
- setSpanId((Long)value);
+ setSpanId((java.lang.Long)value);
}
break;
@@ -591,7 +561,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetParentId();
} else {
- setParentId((Long)value);
+ setParentId((java.lang.Long)value);
}
break;
@@ -599,7 +569,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetStart();
} else {
- setStart((Long)value);
+ setStart((java.lang.Long)value);
}
break;
@@ -607,7 +577,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetStop();
} else {
- setStop((Long)value);
+ setStop((java.lang.Long)value);
}
break;
@@ -615,7 +585,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
@@ -623,7 +593,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetData();
} else {
- setData((Map<String,String>)value);
+ setData((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
@@ -631,14 +601,14 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetAnnotations();
} else {
- setAnnotations((List<Annotation>)value);
+ setAnnotations((java.util.List<Annotation>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SENDER:
return getSender();
@@ -671,13 +641,13 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return getAnnotations();
}
- 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) {
@@ -702,11 +672,11 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
case ANNOTATIONS:
return isSetAnnotations();
}
- 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 RemoteSpan)
@@ -717,6 +687,8 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
public boolean equals(RemoteSpan that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sender = true && this.isSetSender();
boolean that_present_sender = true && that.isSetSender();
@@ -813,59 +785,39 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sender = true && (isSetSender());
- list.add(present_sender);
- if (present_sender)
- list.add(sender);
+ hashCode = hashCode * 8191 + ((isSetSender()) ? 131071 : 524287);
+ if (isSetSender())
+ hashCode = hashCode * 8191 + sender.hashCode();
- boolean present_svc = true && (isSetSvc());
- list.add(present_svc);
- if (present_svc)
- list.add(svc);
+ hashCode = hashCode * 8191 + ((isSetSvc()) ? 131071 : 524287);
+ if (isSetSvc())
+ hashCode = hashCode * 8191 + svc.hashCode();
- boolean present_traceId = true;
- list.add(present_traceId);
- if (present_traceId)
- list.add(traceId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(traceId);
- boolean present_spanId = true;
- list.add(present_spanId);
- if (present_spanId)
- list.add(spanId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(spanId);
- boolean present_parentId = true;
- list.add(present_parentId);
- if (present_parentId)
- list.add(parentId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(parentId);
- boolean present_start = true;
- list.add(present_start);
- if (present_start)
- list.add(start);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(start);
- boolean present_stop = true;
- list.add(present_stop);
- if (present_stop)
- list.add(stop);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(stop);
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
+ hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
+ if (isSetDescription())
+ hashCode = hashCode * 8191 + description.hashCode();
- boolean present_data = true && (isSetData());
- list.add(present_data);
- if (present_data)
- list.add(data);
+ hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
+ if (isSetData())
+ hashCode = hashCode * 8191 + data.hashCode();
- boolean present_annotations = true && (isSetAnnotations());
- list.add(present_annotations);
- if (present_annotations)
- list.add(annotations);
+ hashCode = hashCode * 8191 + ((isSetAnnotations()) ? 131071 : 524287);
+ if (isSetAnnotations())
+ hashCode = hashCode * 8191 + annotations.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -876,7 +828,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSender()).compareTo(other.isSetSender());
+ lastComparison = java.lang.Boolean.valueOf(isSetSender()).compareTo(other.isSetSender());
if (lastComparison != 0) {
return lastComparison;
}
@@ -886,7 +838,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSvc()).compareTo(other.isSetSvc());
+ lastComparison = java.lang.Boolean.valueOf(isSetSvc()).compareTo(other.isSetSvc());
if (lastComparison != 0) {
return lastComparison;
}
@@ -896,7 +848,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTraceId()).compareTo(other.isSetTraceId());
+ lastComparison = java.lang.Boolean.valueOf(isSetTraceId()).compareTo(other.isSetTraceId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -906,7 +858,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(other.isSetSpanId());
+ lastComparison = java.lang.Boolean.valueOf(isSetSpanId()).compareTo(other.isSetSpanId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -916,7 +868,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
+ lastComparison = java.lang.Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -926,7 +878,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
+ lastComparison = java.lang.Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
if (lastComparison != 0) {
return lastComparison;
}
@@ -936,7 +888,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStop()).compareTo(other.isSetStop());
+ lastComparison = java.lang.Boolean.valueOf(isSetStop()).compareTo(other.isSetStop());
if (lastComparison != 0) {
return lastComparison;
}
@@ -946,7 +898,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -956,7 +908,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData());
+ lastComparison = java.lang.Boolean.valueOf(isSetData()).compareTo(other.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
@@ -966,7 +918,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(other.isSetAnnotations());
+ lastComparison = java.lang.Boolean.valueOf(isSetAnnotations()).compareTo(other.isSetAnnotations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -984,16 +936,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
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("RemoteSpan(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("RemoteSpan(");
boolean first = true;
sb.append("sender:");
@@ -1072,7 +1024,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
- 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;
@@ -1082,13 +1034,13 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
- private static class RemoteSpanStandardSchemeFactory implements SchemeFactory {
+ private static class RemoteSpanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RemoteSpanStandardScheme getScheme() {
return new RemoteSpanStandardScheme();
}
}
- private static class RemoteSpanStandardScheme extends StandardScheme<RemoteSpan> {
+ private static class RemoteSpanStandardScheme extends org.apache.thrift.scheme.StandardScheme<RemoteSpan> {
public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteSpan struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1168,9 +1120,9 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
- struct.data = new HashMap<String,String>(2*_map0.size);
- String _key1;
- String _val2;
+ struct.data = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map0.size);
+ java.lang.String _key1;
+ java.lang.String _val2;
for (int _i3 = 0; _i3 < _map0.size; ++_i3)
{
_key1 = iprot.readString();
@@ -1188,7 +1140,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
- struct.annotations = new ArrayList<Annotation>(_list4.size);
+ struct.annotations = new java.util.ArrayList<Annotation>(_list4.size);
Annotation _elem5;
for (int _i6 = 0; _i6 < _list4.size; ++_i6)
{
@@ -1252,7 +1204,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
oprot.writeFieldBegin(DATA_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.data.size()));
- for (Map.Entry<String, String> _iter7 : struct.data.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter7 : struct.data.entrySet())
{
oprot.writeString(_iter7.getKey());
oprot.writeString(_iter7.getValue());
@@ -1279,18 +1231,18 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
- private static class RemoteSpanTupleSchemeFactory implements SchemeFactory {
+ private static class RemoteSpanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RemoteSpanTupleScheme getScheme() {
return new RemoteSpanTupleScheme();
}
}
- private static class RemoteSpanTupleScheme extends TupleScheme<RemoteSpan> {
+ private static class RemoteSpanTupleScheme extends org.apache.thrift.scheme.TupleScheme<RemoteSpan> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RemoteSpan 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.isSetSender()) {
optionals.set(0);
}
@@ -1349,7 +1301,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (struct.isSetData()) {
{
oprot.writeI32(struct.data.size());
- for (Map.Entry<String, String> _iter9 : struct.data.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter9 : struct.data.entrySet())
{
oprot.writeString(_iter9.getKey());
oprot.writeString(_iter9.getValue());
@@ -1369,8 +1321,8 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RemoteSpan struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(10);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(10);
if (incoming.get(0)) {
struct.sender = iprot.readString();
struct.setSenderIsSet(true);
@@ -1406,9 +1358,9 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TMap _map11 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.data = new HashMap<String,String>(2*_map11.size);
- String _key12;
- String _val13;
+ struct.data = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map11.size);
+ java.lang.String _key12;
+ java.lang.String _val13;
for (int _i14 = 0; _i14 < _map11.size; ++_i14)
{
_key12 = iprot.readString();
@@ -1421,7 +1373,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (incoming.get(9)) {
{
org.apache.thrift.protocol.TList _list15 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.annotations = new ArrayList<Annotation>(_list15.size);
+ struct.annotations = new java.util.ArrayList<Annotation>(_list15.size);
Annotation _elem16;
for (int _i17 = 0; _i17 < _list15.size; ++_i17)
{
@@ -1435,5 +1387,9 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
+ 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();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java
index b1e913a..0f5cf5c 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.tracer.thrift;
-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", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class SpanReceiver {
public interface Iface {
@@ -61,11 +34,11 @@ public class SpanReceiver {
public interface AsyncIface {
- public void span(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void span(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -115,16 +88,16 @@ public class SpanReceiver {
super(protocolFactory, clientManager, transport);
}
- public void span(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void span(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
span_call method_call = new span_call(span, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class span_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class span_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private RemoteSpan span;
- public span_call(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public span_call(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
this.span = span;
}
@@ -137,28 +110,29 @@ public class SpanReceiver {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.thrift.TException {
+ public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return null;
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("span", new span());
return processMap;
}
@@ -185,16 +159,16 @@ public class SpanReceiver {
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("span", new span());
return processMap;
}
@@ -208,12 +182,18 @@ public class SpanReceiver {
return new span_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ } else {
+ _LOGGER.error("Exception inside oneway handler", e);
+ }
}
};
}
@@ -222,7 +202,7 @@ public class SpanReceiver {
return true;
}
- public void start(I iface, span_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, span_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.span(args.span,resultHandler);
}
}
@@ -234,11 +214,8 @@ public class SpanReceiver {
private static final org.apache.thrift.protocol.TField SPAN_FIELD_DESC = new org.apache.thrift.protocol.TField("span", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new span_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new span_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new span_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new span_argsTupleSchemeFactory();
public RemoteSpan span; // required
@@ -246,10 +223,10 @@ public class SpanReceiver {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SPAN((short)1, "span");
- 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);
}
}
@@ -272,21 +249,21 @@ public class SpanReceiver {
*/
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;
}
@@ -295,18 +272,18 @@ public class SpanReceiver {
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.SPAN, new org.apache.thrift.meta_data.FieldMetaData("span", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RemoteSpan.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(span_args.class, metaDataMap);
}
@@ -362,7 +339,7 @@ public class SpanReceiver {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SPAN:
if (value == null) {
@@ -375,30 +352,30 @@ public class SpanReceiver {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SPAN:
return getSpan();
}
- 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 SPAN:
return isSetSpan();
}
- 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 span_args)
@@ -409,6 +386,8 @@ public class SpanReceiver {
public boolean equals(span_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_span = true && this.isSetSpan();
boolean that_present_span = true && that.isSetSpan();
@@ -424,14 +403,13 @@ public class SpanReceiver {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_span = true && (isSetSpan());
- list.add(present_span);
- if (present_span)
- list.add(span);
+ hashCode = hashCode * 8191 + ((isSetSpan()) ? 131071 : 524287);
+ if (isSetSpan())
+ hashCode = hashCode * 8191 + span.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -442,7 +420,7 @@ public class SpanReceiver {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSpan()).compareTo(other.isSetSpan());
+ lastComparison = java.lang.Boolean.valueOf(isSetSpan()).compareTo(other.isSetSpan());
if (lastComparison != 0) {
return lastComparison;
}
@@ -460,16 +438,16 @@ public class SpanReceiver {
}
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("span_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("span_args(");
boolean first = true;
sb.append("span:");
@@ -499,7 +477,7 @@ public class SpanReceiver {
}
}
- 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) {
@@ -507,13 +485,13 @@ public class SpanReceiver {
}
}
- private static class span_argsStandardSchemeFactory implements SchemeFactory {
+ private static class span_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public span_argsStandardScheme getScheme() {
return new span_argsStandardScheme();
}
}
- private static class span_argsStandardScheme extends StandardScheme<span_args> {
+ private static class span_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<span_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, span_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -560,18 +538,18 @@ public class SpanReceiver {
}
- private static class span_argsTupleSchemeFactory implements SchemeFactory {
+ private static class span_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public span_argsTupleScheme getScheme() {
return new span_argsTupleScheme();
}
}
- private static class span_argsTupleScheme extends TupleScheme<span_args> {
+ private static class span_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<span_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, span_args 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.isSetSpan()) {
optionals.set(0);
}
@@ -583,8 +561,8 @@ public class SpanReceiver {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, span_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.span = new RemoteSpan();
struct.span.read(iprot);
@@ -593,6 +571,10 @@ public class SpanReceiver {
}
}
+ 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();
+ }
}
+ private static void unusedMethod() {}
}