http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java ---------------------------------------------------------------------- diff --git a/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java b/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java index 7d1c1ab..ed1bf68 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java +++ b/storm-client/src/jvm/org/apache/storm/generated/DistributedRPCInvocations.java @@ -16,65 +16,38 @@ * limitations under the License. */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.11.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.storm.generated; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) [email protected](value = "Autogenerated by Thrift Compiler (0.11.0)") public class DistributedRPCInvocations { public interface Iface { - public void result(String id, String result) throws AuthorizationException, org.apache.thrift.TException; + public void result(java.lang.String id, java.lang.String result) throws AuthorizationException, org.apache.thrift.TException; - public DRPCRequest fetchRequest(String functionName) throws AuthorizationException, org.apache.thrift.TException; + public DRPCRequest fetchRequest(java.lang.String functionName) throws AuthorizationException, org.apache.thrift.TException; - public void failRequest(String id) throws AuthorizationException, org.apache.thrift.TException; + public void failRequest(java.lang.String id) throws AuthorizationException, org.apache.thrift.TException; - public void failRequestV2(String id, DRPCExecutionException e) throws AuthorizationException, org.apache.thrift.TException; + public void failRequestV2(java.lang.String id, DRPCExecutionException e) throws AuthorizationException, org.apache.thrift.TException; } public interface AsyncIface { - public void result(String id, String result, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void result(java.lang.String id, java.lang.String result, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; - public void fetchRequest(String functionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void fetchRequest(java.lang.String functionName, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler) throws org.apache.thrift.TException; - public void failRequest(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void failRequest(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; - public void failRequestV2(String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void failRequestV2(java.lang.String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException; } @@ -98,13 +71,13 @@ public class DistributedRPCInvocations { super(iprot, oprot); } - public void result(String id, String result) throws AuthorizationException, org.apache.thrift.TException + public void result(java.lang.String id, java.lang.String result) throws AuthorizationException, org.apache.thrift.TException { send_result(id, result); recv_result(); } - public void send_result(String id, String result) throws org.apache.thrift.TException + public void send_result(java.lang.String id, java.lang.String result) throws org.apache.thrift.TException { result_args args = new result_args(); args.set_id(id); @@ -122,13 +95,13 @@ public class DistributedRPCInvocations { return; } - public DRPCRequest fetchRequest(String functionName) throws AuthorizationException, org.apache.thrift.TException + public DRPCRequest fetchRequest(java.lang.String functionName) throws AuthorizationException, org.apache.thrift.TException { send_fetchRequest(functionName); return recv_fetchRequest(); } - public void send_fetchRequest(String functionName) throws org.apache.thrift.TException + public void send_fetchRequest(java.lang.String functionName) throws org.apache.thrift.TException { fetchRequest_args args = new fetchRequest_args(); args.set_functionName(functionName); @@ -148,13 +121,13 @@ public class DistributedRPCInvocations { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchRequest failed: unknown result"); } - public void failRequest(String id) throws AuthorizationException, org.apache.thrift.TException + public void failRequest(java.lang.String id) throws AuthorizationException, org.apache.thrift.TException { send_failRequest(id); recv_failRequest(); } - public void send_failRequest(String id) throws org.apache.thrift.TException + public void send_failRequest(java.lang.String id) throws org.apache.thrift.TException { failRequest_args args = new failRequest_args(); args.set_id(id); @@ -171,13 +144,13 @@ public class DistributedRPCInvocations { return; } - public void failRequestV2(String id, DRPCExecutionException e) throws AuthorizationException, org.apache.thrift.TException + public void failRequestV2(java.lang.String id, DRPCExecutionException e) throws AuthorizationException, org.apache.thrift.TException { send_failRequestV2(id, e); recv_failRequestV2(); } - public void send_failRequestV2(String id, DRPCExecutionException e) throws org.apache.thrift.TException + public void send_failRequestV2(java.lang.String id, DRPCExecutionException e) throws org.apache.thrift.TException { failRequestV2_args args = new failRequestV2_args(); args.set_id(id); @@ -213,17 +186,17 @@ public class DistributedRPCInvocations { super(protocolFactory, clientManager, transport); } - public void result(String id, String result, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void result(java.lang.String id, java.lang.String result, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); result_call method_call = new result_call(id, result, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class result_call extends org.apache.thrift.async.TAsyncMethodCall { - private String id; - private String result; - public result_call(String id, String result, 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 static class result_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { + private java.lang.String id; + private java.lang.String result; + public result_call(java.lang.String id, java.lang.String result, 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, false); this.id = id; this.result = result; @@ -238,26 +211,26 @@ public class DistributedRPCInvocations { prot.writeMessageEnd(); } - public void getResult() throws AuthorizationException, org.apache.thrift.TException { + public Void getResult() throws AuthorizationException, 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); - (new Client(prot)).recv_result(); + return null; } } - public void fetchRequest(String functionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void fetchRequest(java.lang.String functionName, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler) throws org.apache.thrift.TException { checkReady(); fetchRequest_call method_call = new fetchRequest_call(functionName, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class fetchRequest_call extends org.apache.thrift.async.TAsyncMethodCall { - private String functionName; - public fetchRequest_call(String functionName, 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 static class fetchRequest_call extends org.apache.thrift.async.TAsyncMethodCall<DRPCRequest> { + private java.lang.String functionName; + public fetchRequest_call(java.lang.String functionName, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> 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.functionName = functionName; } @@ -272,7 +245,7 @@ public class DistributedRPCInvocations { public DRPCRequest getResult() throws AuthorizationException, 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); @@ -280,16 +253,16 @@ public class DistributedRPCInvocations { } } - public void failRequest(String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void failRequest(java.lang.String id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); failRequest_call method_call = new failRequest_call(id, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class failRequest_call extends org.apache.thrift.async.TAsyncMethodCall { - private String id; - public failRequest_call(String id, 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 static class failRequest_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { + private java.lang.String id; + public failRequest_call(java.lang.String id, 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, false); this.id = id; } @@ -302,27 +275,27 @@ public class DistributedRPCInvocations { prot.writeMessageEnd(); } - public void getResult() throws AuthorizationException, org.apache.thrift.TException { + public Void getResult() throws AuthorizationException, 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); - (new Client(prot)).recv_failRequest(); + return null; } } - public void failRequestV2(String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void failRequestV2(java.lang.String id, DRPCExecutionException e, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { checkReady(); failRequestV2_call method_call = new failRequestV2_call(id, e, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class failRequestV2_call extends org.apache.thrift.async.TAsyncMethodCall { - private String id; + public static class failRequestV2_call extends org.apache.thrift.async.TAsyncMethodCall<Void> { + private java.lang.String id; private DRPCExecutionException e; - public failRequestV2_call(String id, DRPCExecutionException e, 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 failRequestV2_call(java.lang.String id, DRPCExecutionException e, 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, false); this.id = id; this.e = e; @@ -337,29 +310,29 @@ public class DistributedRPCInvocations { prot.writeMessageEnd(); } - public void getResult() throws AuthorizationException, org.apache.thrift.TException { + public Void getResult() throws AuthorizationException, 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); - (new Client(prot)).recv_failRequestV2(); + 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("result", new result()); processMap.put("fetchRequest", new fetchRequest()); processMap.put("failRequest", new failRequest()); @@ -380,6 +353,11 @@ public class DistributedRPCInvocations { return false; } + @Override + protected boolean handleRuntimeExceptions() { + return false; + } + public result_result getResult(I iface, result_args args) throws org.apache.thrift.TException { result_result result = new result_result(); try { @@ -404,6 +382,11 @@ public class DistributedRPCInvocations { return false; } + @Override + protected boolean handleRuntimeExceptions() { + return false; + } + public fetchRequest_result getResult(I iface, fetchRequest_args args) throws org.apache.thrift.TException { fetchRequest_result result = new fetchRequest_result(); try { @@ -428,6 +411,11 @@ public class DistributedRPCInvocations { return false; } + @Override + protected boolean handleRuntimeExceptions() { + return false; + } + public failRequest_result getResult(I iface, failRequest_args args) throws org.apache.thrift.TException { failRequest_result result = new failRequest_result(); try { @@ -452,6 +440,11 @@ public class DistributedRPCInvocations { return false; } + @Override + protected boolean handleRuntimeExceptions() { + return false; + } + public failRequestV2_result getResult(I iface, failRequestV2_args args) throws org.apache.thrift.TException { failRequestV2_result result = new failRequestV2_result(); try { @@ -466,16 +459,16 @@ public class DistributedRPCInvocations { } 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("result", new result()); processMap.put("fetchRequest", new fetchRequest()); processMap.put("failRequest", new failRequest()); @@ -492,40 +485,48 @@ public class DistributedRPCInvocations { return new result_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) { result_result result = new result_result(); 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; result_result result = new result_result(); if (e instanceof AuthorizationException) { - result.aze = (AuthorizationException) e; - result.set_aze_isSet(true); - msg = result; - } - else - { + result.aze = (AuthorizationException) e; + result.set_aze_isSet(true); + msg = result; + } else 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(); } }; } @@ -534,7 +535,7 @@ public class DistributedRPCInvocations { return false; } - public void start(I iface, result_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { + public void start(I iface, result_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.result(args.id, args.result,resultHandler); } } @@ -548,41 +549,49 @@ public class DistributedRPCInvocations { return new fetchRequest_args(); } - public AsyncMethodCallback<DRPCRequest> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + public org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<DRPCRequest>() { + return new org.apache.thrift.async.AsyncMethodCallback<DRPCRequest>() { public void onComplete(DRPCRequest o) { fetchRequest_result result = new fetchRequest_result(); result.success = o; 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; fetchRequest_result result = new fetchRequest_result(); if (e instanceof AuthorizationException) { - result.aze = (AuthorizationException) e; - result.set_aze_isSet(true); - msg = result; - } - else - { + result.aze = (AuthorizationException) e; + result.set_aze_isSet(true); + msg = result; + } else 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.TApplicationException)e; + } else { + _LOGGER.error("Exception 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 = 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(); } }; } @@ -591,7 +600,7 @@ public class DistributedRPCInvocations { return false; } - public void start(I iface, fetchRequest_args args, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler) throws TException { + public void start(I iface, fetchRequest_args args, org.apache.thrift.async.AsyncMethodCallback<DRPCRequest> resultHandler) throws org.apache.thrift.TException { iface.fetchRequest(args.functionName,resultHandler); } } @@ -605,40 +614,48 @@ public class DistributedRPCInvocations { return new failRequest_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) { failRequest_result result = new failRequest_result(); 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; failRequest_result result = new failRequest_result(); if (e instanceof AuthorizationException) { - result.aze = (AuthorizationException) e; - result.set_aze_isSet(true); - msg = result; - } - else - { + result.aze = (AuthorizationException) e; + result.set_aze_isSet(true); + msg = result; + } else 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.TApplicationException)e; + } else { + _LOGGER.error("Exception 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 = 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(); } }; } @@ -647,7 +664,7 @@ public class DistributedRPCInvocations { return false; } - public void start(I iface, failRequest_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { + public void start(I iface, failRequest_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.failRequest(args.id,resultHandler); } } @@ -661,40 +678,48 @@ public class DistributedRPCInvocations { return new failRequestV2_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) { failRequestV2_result result = new failRequestV2_result(); 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; failRequestV2_result result = new failRequestV2_result(); if (e instanceof AuthorizationException) { - result.aze = (AuthorizationException) e; - result.set_aze_isSet(true); - msg = result; - } - else - { + result.aze = (AuthorizationException) e; + result.set_aze_isSet(true); + msg = result; + } else 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(); } }; } @@ -703,7 +728,7 @@ public class DistributedRPCInvocations { return false; } - public void start(I iface, failRequestV2_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException { + public void start(I iface, failRequestV2_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException { iface.failRequestV2(args.id, args.e,resultHandler); } } @@ -716,24 +741,21 @@ public class DistributedRPCInvocations { private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", 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 result_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new result_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new result_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new result_argsTupleSchemeFactory(); - private String id; // required - private String result; // required + private java.lang.String id; // required + private java.lang.String result; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"), RESULT((short)2, "result"); - 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); } } @@ -758,21 +780,21 @@ public class DistributedRPCInvocations { */ 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; } @@ -781,20 +803,20 @@ public class DistributedRPCInvocations { return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", 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(result_args.class, metaDataMap); } @@ -802,8 +824,8 @@ public class DistributedRPCInvocations { } public result_args( - String id, - String result) + java.lang.String id, + java.lang.String result) { this(); this.id = id; @@ -832,11 +854,11 @@ public class DistributedRPCInvocations { this.result = null; } - public String get_id() { + public java.lang.String get_id() { return this.id; } - public void set_id(String id) { + public void set_id(java.lang.String id) { this.id = id; } @@ -855,11 +877,11 @@ public class DistributedRPCInvocations { } } - public String get_result() { + public java.lang.String get_result() { return this.result; } - public void set_result(String result) { + public void set_result(java.lang.String result) { this.result = result; } @@ -878,13 +900,13 @@ public class DistributedRPCInvocations { } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case ID: if (value == null) { unset_id(); } else { - set_id((String)value); + set_id((java.lang.String)value); } break; @@ -892,14 +914,14 @@ public class DistributedRPCInvocations { if (value == null) { unset_result(); } else { - set_result((String)value); + set_result((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ID: return get_id(); @@ -908,13 +930,13 @@ public class DistributedRPCInvocations { return get_result(); } - 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) { @@ -923,11 +945,11 @@ public class DistributedRPCInvocations { case RESULT: return is_set_result(); } - 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 result_args) @@ -938,6 +960,8 @@ public class DistributedRPCInvocations { public boolean equals(result_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_id = true && this.is_set_id(); boolean that_present_id = true && that.is_set_id(); @@ -962,19 +986,17 @@ public class DistributedRPCInvocations { @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_id = true && (is_set_id()); - list.add(present_id); - if (present_id) - list.add(id); + hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287); + if (is_set_id()) + hashCode = hashCode * 8191 + id.hashCode(); - boolean present_result = true && (is_set_result()); - list.add(present_result); - if (present_result) - list.add(result); + hashCode = hashCode * 8191 + ((is_set_result()) ? 131071 : 524287); + if (is_set_result()) + hashCode = hashCode * 8191 + result.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -985,7 +1007,7 @@ public class DistributedRPCInvocations { int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id()); + lastComparison = java.lang.Boolean.valueOf(is_set_id()).compareTo(other.is_set_id()); if (lastComparison != 0) { return lastComparison; } @@ -995,7 +1017,7 @@ public class DistributedRPCInvocations { return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_result()).compareTo(other.is_set_result()); + lastComparison = java.lang.Boolean.valueOf(is_set_result()).compareTo(other.is_set_result()); if (lastComparison != 0) { return lastComparison; } @@ -1013,16 +1035,16 @@ public class DistributedRPCInvocations { } 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("result_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("result_args("); boolean first = true; sb.append("id:"); @@ -1057,7 +1079,7 @@ public class DistributedRPCInvocations { } } - 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) { @@ -1065,13 +1087,13 @@ public class DistributedRPCInvocations { } } - private static class result_argsStandardSchemeFactory implements SchemeFactory { + private static class result_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public result_argsStandardScheme getScheme() { return new result_argsStandardScheme(); } } - private static class result_argsStandardScheme extends StandardScheme<result_args> { + private static class result_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<result_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, result_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1128,18 +1150,18 @@ public class DistributedRPCInvocations { } - private static class result_argsTupleSchemeFactory implements SchemeFactory { + private static class result_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public result_argsTupleScheme getScheme() { return new result_argsTupleScheme(); } } - private static class result_argsTupleScheme extends TupleScheme<result_args> { + private static class result_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<result_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, result_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.is_set_id()) { optionals.set(0); } @@ -1157,8 +1179,8 @@ public class DistributedRPCInvocations { @Override public void read(org.apache.thrift.protocol.TProtocol prot, result_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.id = iprot.readString(); struct.set_id_isSet(true); @@ -1170,6 +1192,9 @@ public class DistributedRPCInvocations { } } + 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 result_result implements org.apache.thrift.TBase<result_result, result_result._Fields>, java.io.Serializable, Cloneable, Comparable<result_result> { @@ -1177,11 +1202,8 @@ public class DistributedRPCInvocations { private static final org.apache.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.thrift.protocol.TField("aze", 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 result_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new result_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new result_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new result_resultTupleSchemeFactory(); private AuthorizationException aze; // required @@ -1189,10 +1211,10 @@ public class DistributedRPCInvocations { public enum _Fields implements org.apache.thrift.TFieldIdEnum { AZE((short)1, "aze"); - 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); } } @@ -1215,21 +1237,21 @@ public class DistributedRPCInvocations { */ 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; } @@ -1238,18 +1260,18 @@ public class DistributedRPCInvocations { 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.AZE, new org.apache.thrift.meta_data.FieldMetaData("aze", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AuthorizationException.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(result_result.class, metaDataMap); } @@ -1304,7 +1326,7 @@ public class DistributedRPCInvocations { } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case AZE: if (value == null) { @@ -1317,30 +1339,30 @@ public class DistributedRPCInvocations { } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AZE: return get_aze(); } - 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 AZE: return is_set_aze(); } - 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 result_result) @@ -1351,6 +1373,8 @@ public class DistributedRPCInvocations { public boolean equals(result_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_aze = true && this.is_set_aze(); boolean that_present_aze = true && that.is_set_aze(); @@ -1366,14 +1390,13 @@ public class DistributedRPCInvocations { @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_aze = true && (is_set_aze()); - list.add(present_aze); - if (present_aze) - list.add(aze); + hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287); + if (is_set_aze()) + hashCode = hashCode * 8191 + aze.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -1384,7 +1407,7 @@ public class DistributedRPCInvocations { int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); + lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); if (lastComparison != 0) { return lastComparison; } @@ -1402,16 +1425,16 @@ public class DistributedRPCInvocations { } 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("result_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("result_result("); boolean first = true; sb.append("aze:"); @@ -1438,7 +1461,7 @@ public class DistributedRPCInvocations { } } - 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) { @@ -1446,13 +1469,13 @@ public class DistributedRPCInvocations { } } - private static class result_resultStandardSchemeFactory implements SchemeFactory { + private static class result_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public result_resultStandardScheme getScheme() { return new result_resultStandardScheme(); } } - private static class result_resultStandardScheme extends StandardScheme<result_result> { + private static class result_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<result_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, result_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1497,18 +1520,18 @@ public class DistributedRPCInvocations { } - private static class result_resultTupleSchemeFactory implements SchemeFactory { + private static class result_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public result_resultTupleScheme getScheme() { return new result_resultTupleScheme(); } } - private static class result_resultTupleScheme extends TupleScheme<result_result> { + private static class result_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<result_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, result_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.is_set_aze()) { optionals.set(0); } @@ -1520,8 +1543,8 @@ public class DistributedRPCInvocations { @Override public void read(org.apache.thrift.protocol.TProtocol prot, result_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.aze = new AuthorizationException(); struct.aze.read(iprot); @@ -1530,6 +1553,9 @@ public class DistributedRPCInvocations { } } + 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 fetchRequest_args implements org.apache.thrift.TBase<fetchRequest_args, fetchRequest_args._Fields>, java.io.Serializable, Cloneable, Comparable<fetchRequest_args> { @@ -1537,22 +1563,19 @@ public class DistributedRPCInvocations { private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new fetchRequest_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new fetchRequest_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchRequest_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchRequest_argsTupleSchemeFactory(); - private String functionName; // required + private java.lang.String functionName; // 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 { FUNCTION_NAME((short)1, "functionName"); - 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); } } @@ -1575,21 +1598,21 @@ public class DistributedRPCInvocations { */ 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; } @@ -1598,18 +1621,18 @@ public class DistributedRPCInvocations { 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.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", 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(fetchRequest_args.class, metaDataMap); } @@ -1617,7 +1640,7 @@ public class DistributedRPCInvocations { } public fetchRequest_args( - String functionName) + java.lang.String functionName) { this(); this.functionName = functionName; @@ -1641,11 +1664,11 @@ public class DistributedRPCInvocations { this.functionName = null; } - public String get_functionName() { + public java.lang.String get_functionName() { return this.functionName; } - public void set_functionName(String functionName) { + public void set_functionName(java.lang.String functionName) { this.functionName = functionName; } @@ -1664,43 +1687,43 @@ public class DistributedRPCInvocations { } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case FUNCTION_NAME: if (value == null) { unset_functionName(); } else { - set_functionName((String)value); + set_functionName((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case FUNCTION_NAME: return get_functionName(); } - 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 FUNCTION_NAME: return is_set_functionName(); } - 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 fetchRequest_args) @@ -1711,6 +1734,8 @@ public class DistributedRPCInvocations { public boolean equals(fetchRequest_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_functionName = true && this.is_set_functionName(); boolean that_present_functionName = true && that.is_set_functionName(); @@ -1726,14 +1751,13 @@ public class DistributedRPCInvocations { @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_functionName = true && (is_set_functionName()); - list.add(present_functionName); - if (present_functionName) - list.add(functionName); + hashCode = hashCode * 8191 + ((is_set_functionName()) ? 131071 : 524287); + if (is_set_functionName()) + hashCode = hashCode * 8191 + functionName.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -1744,7 +1768,7 @@ public class DistributedRPCInvocations { int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_functionName()).compareTo(other.is_set_functionName()); + lastComparison = java.lang.Boolean.valueOf(is_set_functionName()).compareTo(other.is_set_functionName()); if (lastComparison != 0) { return lastComparison; } @@ -1762,16 +1786,16 @@ public class DistributedRPCInvocations { } 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("fetchRequest_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchRequest_args("); boolean first = true; sb.append("functionName:"); @@ -1798,7 +1822,7 @@ public class DistributedRPCInvocations { } } - 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) { @@ -1806,13 +1830,13 @@ public class DistributedRPCInvocations { } } - private static class fetchRequest_argsStandardSchemeFactory implements SchemeFactory { + private static class fetchRequest_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public fetchRequest_argsStandardScheme getScheme() { return new fetchRequest_argsStandardScheme(); } } - private static class fetchRequest_argsStandardScheme extends StandardScheme<fetchRequest_args> { + private static class fetchRequest_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<fetchRequest_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, fetchRequest_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1856,18 +1880,18 @@ public class DistributedRPCInvocations { } - private static class fetchRequest_argsTupleSchemeFactory implements SchemeFactory { + private static class fetchRequest_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public fetchRequest_argsTupleScheme getScheme() { return new fetchRequest_argsTupleScheme(); } } - private static class fetchRequest_argsTupleScheme extends TupleScheme<fetchRequest_args> { + private static class fetchRequest_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<fetchRequest_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, fetchRequest_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.is_set_functionName()) { optionals.set(0); } @@ -1879,8 +1903,8 @@ public class DistributedRPCInvocations { @Override public void read(org.apache.thrift.protocol.TProtocol prot, fetchRequest_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.functionName = iprot.readString(); struct.set_functionName_isSet(true); @@ -1888,6 +1912,9 @@ public class DistributedRPCInvocations { } } + 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 fetchRequest_result implements org.apache.thrift.TBase<fetchRequest_result, fetchRequest_result._Fields>, java.io.Serializable, Cloneable, Comparable<fetchRequest_result> { @@ -1896,11 +1923,8 @@ public class DistributedRPCInvocations { private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.thrift.protocol.TField("aze", 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 fetchRequest_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new fetchRequest_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchRequest_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchRequest_resultTupleSchemeFactory(); private DRPCRequest success; // required private AuthorizationException aze; // required @@ -1910,10 +1934,10 @@ public class DistributedRPCInvocations { SUCCESS((short)0, "success"), AZE((short)1, "aze"); - 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); } } @@ -1938,21 +1962,21 @@ public class DistributedRPCInvocations { */ 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; } @@ -1961,20 +1985,20 @@ public class DistributedRPCInvocations { 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DRPCRequest.class))); tmpMap.put(_Fields.AZE, new org.apache.thrift.meta_data.FieldMetaData("aze", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AuthorizationException.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchRequest_result.class, metaDataMap); } @@ -2058,7 +2082,7 @@ public class DistributedRPCInvocations { } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -2079,7 +2103,7 @@ public class DistributedRPCInvocations { } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); @@ -2088,13 +2112,13 @@ public class DistributedRPCInvocations { return get_aze(); } - 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) { @@ -2103,11 +2127,11 @@ public class DistributedRPCInvocations { case AZE: return is_set_aze(); } - 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 fetchRequest_result) @@ -2118,6 +2142,8 @@ public class DistributedRPCInvocations { public boolean equals(fetchRequest_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); @@ -2142,19 +2168,17 @@ public class DistributedRPCInvocations { @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_success = true && (is_set_success()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((is_set_success()) ? 131071 : 524287); + if (is_set_success()) + hashCode = hashCode * 8191 + success.hashCode(); - boolean present_aze = true && (is_set_aze()); - list.add(present_aze); - if (present_aze) - list.add(aze); + hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287); + if (is_set_aze()) + hashCode = hashCode * 8191 + aze.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -2165,7 +2189,7 @@ public class DistributedRPCInvocations { int lastComparison = 0; - lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); + lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; } @@ -2175,7 +2199,7 @@ public class DistributedRPCInvocations { return lastComparison; } } - lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); + lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); if (lastComparison != 0) { return lastComparison; } @@ -2193,16 +2217,16 @@ public class DistributedRPCInvocations { } 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("fetchRequest_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchRequest_result("); boolean first = true; sb.append("success:"); @@ -2240,7 +2264,7 @@ public class DistributedRPCInvocations { } } - 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) { @@ -2248,13 +2272,13 @@ public class DistributedRPCInvocations { } } - private static class fetchRequest_resultStandardSchemeFactory implements SchemeFactory { + private static class fetchRequest_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public fetchRequest_resultStandardScheme getScheme() { return new fetchRequest_resultStandardScheme(); } } - private static class fetchRequest_resultStandardScheme extends StandardScheme<fetchRequest_result> { + private static class fetchRequest_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<fetchRequest_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, fetchRequest_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -2313,18 +2337,18 @@ public class DistributedRPCInvocations { } - private static class fetchRequest_resultTupleSchemeFactory implements SchemeFactory { + private static class fetchRequest_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public fetchRequest_resultTupleScheme getScheme() { return new fetchRequest_resultTupleScheme(); } } - private static class fetchRequest_resultTupleScheme extends TupleScheme<fetchRequest_result> { + private static class fetchRequest_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<fetchRequest_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, fetchRequest_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.is_set_success()) { optionals.set(0); } @@ -2342,8 +2366,8 @@ public class DistributedRPCInvocations { @Override public void read(org.apache.thrift.protocol.TProtocol prot, fetchRequest_result 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.success = new DRPCRequest(); struct.success.read(iprot); @@ -2357,6 +2381,9 @@ public class DistributedRPCInvocations { } } + 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 failRequest_args implements org.apache.thrift.TBase<failRequest_args, failRequest_args._Fields>, java.io.Serializable, Cloneable, Comparable<failRequest_args> { @@ -2364,22 +2391,19 @@ public class DistributedRPCInvocations { private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new failRequest_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new failRequest_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new failRequest_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new failRequest_argsTupleSchemeFactory(); - private String id; // required + private java.lang.String id; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ID((short)1, "id"); - 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); } } @@ -2402,21 +2426,21 @@ public class DistributedRPCInvocations { */ 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!");
<TRUNCATED>
