accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [01/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes from 0.10.0
Date Thu, 09 Feb 2017 19:29:29 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 8be77dfd9 -> 62bbce43e


http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
index f99c2c8..60de00a 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
@@ -15,57 +15,30 @@
  * 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 TestService {
 
   public interface Iface {
 
-    public boolean checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message)
throws org.apache.thrift.TException;
+    public boolean checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String
message) throws org.apache.thrift.TException;
 
   }
 
   public interface AsyncIface {
 
-    public void checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message,
org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+    public void checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String
message, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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) {
@@ -85,13 +58,13 @@ public class TestService {
       super(iprot, oprot);
     }
 
-    public boolean checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message)
throws org.apache.thrift.TException
+    public boolean checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String
message) throws org.apache.thrift.TException
     {
       send_checkTrace(tinfo, message);
       return recv_checkTrace();
     }
 
-    public void send_checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String
message) throws org.apache.thrift.TException
+    public void send_checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String
message) throws org.apache.thrift.TException
     {
       checkTrace_args args = new checkTrace_args();
       args.setTinfo(tinfo);
@@ -127,17 +100,17 @@ public class TestService {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message,
org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException
{
+    public void checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String
message, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler)
throws org.apache.thrift.TException {
       checkReady();
       checkTrace_call method_call = new checkTrace_call(tinfo, message, resultHandler, this,
___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class checkTrace_call extends org.apache.thrift.async.TAsyncMethodCall
{
+    public static class checkTrace_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean>
{
       private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
-      private String message;
-      public checkTrace_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message,
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 {
+      private java.lang.String message;
+      public checkTrace_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String
message, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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, false);
         this.tinfo = tinfo;
         this.message = message;
@@ -152,9 +125,9 @@ public class TestService {
         prot.writeMessageEnd();
       }
 
-      public boolean getResult() throws org.apache.thrift.TException {
+      public java.lang.Boolean 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);
@@ -165,16 +138,16 @@ public class TestService {
   }
 
   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("checkTrace", new checkTrace());
       return processMap;
     }
@@ -203,21 +176,21 @@ public class TestService {
   }
 
   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("checkTrace", new checkTrace());
       return processMap;
     }
 
-    public static class checkTrace<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I,
checkTrace_args, Boolean> {
+    public static class checkTrace<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I,
checkTrace_args, java.lang.Boolean> {
       public checkTrace() {
         super("checkTrace");
       }
@@ -226,36 +199,46 @@ public class TestService {
         return new checkTrace_args();
       }
 
-      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb,
final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final
org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new AsyncMethodCallback<Boolean>() { 
-          public void onComplete(Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>()
{ 
+          public void onComplete(java.lang.Boolean o) {
             checkTrace_result result = new checkTrace_result();
             result.success = o;
             result.setSuccessIsSet(true);
             try {
-              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
-              return;
-            } catch (Exception e) {
-              LOGGER.error("Exception writing to internal frame buffer", e);
+              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+            } catch (org.apache.thrift.transport.TTransportException e) {
+              _LOGGER.error("TTransportException writing to internal frame buffer", e);
+              fb.close();
+            } catch (java.lang.Exception e) {
+              _LOGGER.error("Exception writing to internal frame buffer", e);
+              onError(e);
             }
-            fb.close();
           }
-          public void onError(Exception e) {
+          public void onError(java.lang.Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
-            org.apache.thrift.TBase msg;
+            org.apache.thrift.TSerializable msg;
             checkTrace_result result = new checkTrace_result();
-            {
+            if (e instanceof org.apache.thrift.transport.TTransportException) {
+              _LOGGER.error("TTransportException inside handler", e);
+              fb.close();
+              return;
+            } else if (e instanceof org.apache.thrift.TApplicationException) {
+              _LOGGER.error("TApplicationException inside handler", e);
               msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
-              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR,
e.getMessage());
+              msg = (org.apache.thrift.TApplicationException)e;
+            } else {
+              _LOGGER.error("Exception inside handler", e);
+              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR,
e.getMessage());
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-              return;
-            } catch (Exception ex) {
-              LOGGER.error("Exception writing to internal frame buffer", ex);
+            } catch (java.lang.Exception ex) {
+              _LOGGER.error("Exception writing to internal frame buffer", ex);
+              fb.close();
             }
-            fb.close();
           }
         };
       }
@@ -264,7 +247,7 @@ public class TestService {
         return false;
       }
 
-      public void start(I iface, checkTrace_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean>
resultHandler) throws TException {
+      public void start(I iface, checkTrace_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>
resultHandler) throws org.apache.thrift.TException {
         iface.checkTrace(args.tinfo, args.message,resultHandler);
       }
     }
@@ -277,24 +260,21 @@ public class TestService {
     private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo",
org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message",
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 checkTrace_argsStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new checkTrace_argsTupleSchemeFactory());
-    }
+    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
new checkTrace_argsStandardSchemeFactory();
+    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new
checkTrace_argsTupleSchemeFactory();
 
     public org.apache.accumulo.core.trace.thrift.TInfo tinfo; // required
-    public String message; // required
+    public java.lang.String message; // 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 {
       TINFO((short)1, "tinfo"),
       MESSAGE((short)2, "message");
 
-      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);
         }
       }
@@ -319,21 +299,21 @@ public class TestService {
        */
       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;
       }
@@ -342,20 +322,20 @@ public class TestService {
         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.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT,

           new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
org.apache.accumulo.core.trace.thrift.TInfo.class)));
       tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message",
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(checkTrace_args.class,
metaDataMap);
     }
 
@@ -364,7 +344,7 @@ public class TestService {
 
     public checkTrace_args(
       org.apache.accumulo.core.trace.thrift.TInfo tinfo,
-      String message)
+      java.lang.String message)
     {
       this();
       this.tinfo = tinfo;
@@ -417,11 +397,11 @@ public class TestService {
       }
     }
 
-    public String getMessage() {
+    public java.lang.String getMessage() {
       return this.message;
     }
 
-    public checkTrace_args setMessage(String message) {
+    public checkTrace_args setMessage(java.lang.String message) {
       this.message = message;
       return this;
     }
@@ -441,7 +421,7 @@ public class TestService {
       }
     }
 
-    public void setFieldValue(_Fields field, Object value) {
+    public void setFieldValue(_Fields field, java.lang.Object value) {
       switch (field) {
       case TINFO:
         if (value == null) {
@@ -455,14 +435,14 @@ public class TestService {
         if (value == null) {
           unsetMessage();
         } else {
-          setMessage((String)value);
+          setMessage((java.lang.String)value);
         }
         break;
 
       }
     }
 
-    public Object getFieldValue(_Fields field) {
+    public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case TINFO:
         return getTinfo();
@@ -471,13 +451,13 @@ public class TestService {
         return getMessage();
 
       }
-      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) {
@@ -486,11 +466,11 @@ public class TestService {
       case MESSAGE:
         return isSetMessage();
       }
-      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 checkTrace_args)
@@ -501,6 +481,8 @@ public class TestService {
     public boolean equals(checkTrace_args that) {
       if (that == null)
         return false;
+      if (this == that)
+        return true;
 
       boolean this_present_tinfo = true && this.isSetTinfo();
       boolean that_present_tinfo = true && that.isSetTinfo();
@@ -525,19 +507,17 @@ public class TestService {
 
     @Override
     public int hashCode() {
-      List<Object> list = new ArrayList<Object>();
+      int hashCode = 1;
 
-      boolean present_tinfo = true && (isSetTinfo());
-      list.add(present_tinfo);
-      if (present_tinfo)
-        list.add(tinfo);
+      hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+      if (isSetTinfo())
+        hashCode = hashCode * 8191 + tinfo.hashCode();
 
-      boolean present_message = true && (isSetMessage());
-      list.add(present_message);
-      if (present_message)
-        list.add(message);
+      hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
+      if (isSetMessage())
+        hashCode = hashCode * 8191 + message.hashCode();
 
-      return list.hashCode();
+      return hashCode;
     }
 
     @Override
@@ -548,7 +528,7 @@ public class TestService {
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetTinfo()).compareTo(other.isSetTinfo());
+      lastComparison = java.lang.Boolean.valueOf(isSetTinfo()).compareTo(other.isSetTinfo());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -558,7 +538,7 @@ public class TestService {
           return lastComparison;
         }
       }
-      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+      lastComparison = java.lang.Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -576,16 +556,16 @@ public class TestService {
     }
 
     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("checkTrace_args(");
+    public java.lang.String toString() {
+      java.lang.StringBuilder sb = new java.lang.StringBuilder("checkTrace_args(");
       boolean first = true;
 
       sb.append("tinfo:");
@@ -623,7 +603,7 @@ public class TestService {
       }
     }
 
-    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) {
@@ -631,13 +611,13 @@ public class TestService {
       }
     }
 
-    private static class checkTrace_argsStandardSchemeFactory implements SchemeFactory {
+    private static class checkTrace_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory
{
       public checkTrace_argsStandardScheme getScheme() {
         return new checkTrace_argsStandardScheme();
       }
     }
 
-    private static class checkTrace_argsStandardScheme extends StandardScheme<checkTrace_args>
{
+    private static class checkTrace_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<checkTrace_args>
{
 
       public void read(org.apache.thrift.protocol.TProtocol iprot, checkTrace_args struct)
throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
@@ -697,18 +677,18 @@ public class TestService {
 
     }
 
-    private static class checkTrace_argsTupleSchemeFactory implements SchemeFactory {
+    private static class checkTrace_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory
{
       public checkTrace_argsTupleScheme getScheme() {
         return new checkTrace_argsTupleScheme();
       }
     }
 
-    private static class checkTrace_argsTupleScheme extends TupleScheme<checkTrace_args>
{
+    private static class checkTrace_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<checkTrace_args>
{
 
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, checkTrace_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.isSetTinfo()) {
           optionals.set(0);
         }
@@ -726,8 +706,8 @@ public class TestService {
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, checkTrace_args 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.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo();
           struct.tinfo.read(iprot);
@@ -740,6 +720,9 @@ public class TestService {
       }
     }
 
+    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();
+    }
   }
 
   public static class checkTrace_result implements org.apache.thrift.TBase<checkTrace_result,
checkTrace_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkTrace_result>
  {
@@ -747,11 +730,8 @@ public class TestService {
 
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success",
org.apache.thrift.protocol.TType.BOOL, (short)0);
 
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes
= new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new checkTrace_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new checkTrace_resultTupleSchemeFactory());
-    }
+    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
new checkTrace_resultStandardSchemeFactory();
+    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new
checkTrace_resultTupleSchemeFactory();
 
     public boolean success; // required
 
@@ -759,10 +739,10 @@ public class TestService {
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       SUCCESS((short)0, "success");
 
-      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);
         }
       }
@@ -785,21 +765,21 @@ public class TestService {
        */
       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;
       }
@@ -808,7 +788,7 @@ public class TestService {
         return _thriftId;
       }
 
-      public String getFieldName() {
+      public java.lang.String getFieldName() {
         return _fieldName;
       }
     }
@@ -816,12 +796,12 @@ public class TestService {
     // isset id assignments
     private static final int __SUCCESS_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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success",
org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkTrace_result.class,
metaDataMap);
     }
 
@@ -865,55 +845,55 @@ public class TestService {
     }
 
     public void unsetSuccess() {
-      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
     }
 
     /** Returns true if field success is set (has been assigned a value) and false otherwise
*/
     public boolean isSetSuccess() {
-      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
     }
 
     public void setSuccessIsSet(boolean value) {
-      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID,
value);
     }
 
-    public void setFieldValue(_Fields field, Object value) {
+    public void setFieldValue(_Fields field, java.lang.Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((Boolean)value);
+          setSuccess((java.lang.Boolean)value);
         }
         break;
 
       }
     }
 
-    public Object getFieldValue(_Fields field) {
+    public java.lang.Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
         return isSuccess();
 
       }
-      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 SUCCESS:
         return isSetSuccess();
       }
-      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 checkTrace_result)
@@ -924,6 +904,8 @@ public class TestService {
     public boolean equals(checkTrace_result that) {
       if (that == null)
         return false;
+      if (this == that)
+        return true;
 
       boolean this_present_success = true;
       boolean that_present_success = true;
@@ -939,14 +921,11 @@ public class TestService {
 
     @Override
     public int hashCode() {
-      List<Object> list = new ArrayList<Object>();
+      int hashCode = 1;
 
-      boolean present_success = true;
-      list.add(present_success);
-      if (present_success)
-        list.add(success);
+      hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
 
-      return list.hashCode();
+      return hashCode;
     }
 
     @Override
@@ -957,7 +936,7 @@ public class TestService {
 
       int lastComparison = 0;
 
-      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -975,16 +954,16 @@ public class TestService {
     }
 
     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("checkTrace_result(");
+    public java.lang.String toString() {
+      java.lang.StringBuilder sb = new java.lang.StringBuilder("checkTrace_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -1007,7 +986,7 @@ public class TestService {
       }
     }
 
-    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;
@@ -1017,13 +996,13 @@ public class TestService {
       }
     }
 
-    private static class checkTrace_resultStandardSchemeFactory implements SchemeFactory
{
+    private static class checkTrace_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory
{
       public checkTrace_resultStandardScheme getScheme() {
         return new checkTrace_resultStandardScheme();
       }
     }
 
-    private static class checkTrace_resultStandardScheme extends StandardScheme<checkTrace_result>
{
+    private static class checkTrace_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<checkTrace_result>
{
 
       public void read(org.apache.thrift.protocol.TProtocol iprot, checkTrace_result struct)
throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TField schemeField;
@@ -1069,18 +1048,18 @@ public class TestService {
 
     }
 
-    private static class checkTrace_resultTupleSchemeFactory implements SchemeFactory {
+    private static class checkTrace_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory
{
       public checkTrace_resultTupleScheme getScheme() {
         return new checkTrace_resultTupleScheme();
       }
     }
 
-    private static class checkTrace_resultTupleScheme extends TupleScheme<checkTrace_result>
{
+    private static class checkTrace_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<checkTrace_result>
{
 
       @Override
       public void write(org.apache.thrift.protocol.TProtocol prot, checkTrace_result 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.isSetSuccess()) {
           optionals.set(0);
         }
@@ -1092,8 +1071,8 @@ public class TestService {
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, checkTrace_result 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.success = iprot.readBool();
           struct.setSuccessIsSet(true);
@@ -1101,6 +1080,10 @@ public class TestService {
       }
     }
 
+    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() {}
 }


Mime
View raw message