You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/05/23 20:04:04 UTC
[34/43] storm git commit: STORM-3061: thrift 0.11
http://git-wip-us.apache.org/repos/asf/storm/blob/1fd1e17f/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java
----------------------------------------------------------------------
diff --git a/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java b/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java
index 6ef2559..d46741b 100644
--- a/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java
+++ b/storm-client/src/jvm/org/apache/storm/generated/DistributedRPC.java
@@ -16,53 +16,26 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.storm.generated;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
public class DistributedRPC {
public interface Iface {
- public String execute(String functionName, String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException;
+ public java.lang.String execute(java.lang.String functionName, java.lang.String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void execute(String functionName, String funcArgs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void execute(java.lang.String functionName, java.lang.String funcArgs, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
}
@@ -86,13 +59,13 @@ public class DistributedRPC {
super(iprot, oprot);
}
- public String execute(String functionName, String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException
+ public java.lang.String execute(java.lang.String functionName, java.lang.String funcArgs) throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException
{
send_execute(functionName, funcArgs);
return recv_execute();
}
- public void send_execute(String functionName, String funcArgs) throws org.apache.thrift.TException
+ public void send_execute(java.lang.String functionName, java.lang.String funcArgs) throws org.apache.thrift.TException
{
execute_args args = new execute_args();
args.set_functionName(functionName);
@@ -100,7 +73,7 @@ public class DistributedRPC {
sendBase("execute", args);
}
- public String recv_execute() throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException
+ public java.lang.String recv_execute() throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException
{
execute_result result = new execute_result();
receiveBase(result, "execute");
@@ -134,17 +107,17 @@ public class DistributedRPC {
super(protocolFactory, clientManager, transport);
}
- public void execute(String functionName, String funcArgs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void execute(java.lang.String functionName, java.lang.String funcArgs, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
execute_call method_call = new execute_call(functionName, funcArgs, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class execute_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String functionName;
- private String funcArgs;
- public execute_call(String functionName, String funcArgs, 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 execute_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ private java.lang.String functionName;
+ private java.lang.String funcArgs;
+ public execute_call(java.lang.String functionName, java.lang.String funcArgs, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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;
this.funcArgs = funcArgs;
@@ -159,9 +132,9 @@ public class DistributedRPC {
prot.writeMessageEnd();
}
- public String getResult() throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException {
+ public java.lang.String getResult() throws DRPCExecutionException, 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);
@@ -172,16 +145,16 @@ public class DistributedRPC {
}
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("execute", new execute());
return processMap;
}
@@ -199,6 +172,11 @@ public class DistributedRPC {
return false;
}
+ @Override
+ protected boolean handleRuntimeExceptions() {
+ return false;
+ }
+
public execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException {
execute_result result = new execute_result();
try {
@@ -215,21 +193,21 @@ public class DistributedRPC {
}
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("execute", new execute());
return processMap;
}
- public static class execute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, execute_args, String> {
+ public static class execute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, execute_args, java.lang.String> {
public execute() {
super("execute");
}
@@ -238,46 +216,53 @@ public class DistributedRPC {
return new execute_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ public void onComplete(java.lang.String o) {
execute_result result = new execute_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;
execute_result result = new execute_result();
if (e instanceof DRPCExecutionException) {
- result.e = (DRPCExecutionException) e;
- result.set_e_isSet(true);
- msg = result;
- }
- else if (e instanceof AuthorizationException) {
- result.aze = (AuthorizationException) e;
- result.set_aze_isSet(true);
- msg = result;
- }
- else
- {
+ result.e = (DRPCExecutionException) e;
+ result.set_e_isSet(true);
+ msg = result;
+ } else if (e instanceof AuthorizationException) {
+ 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();
}
};
}
@@ -286,7 +271,7 @@ public class DistributedRPC {
return false;
}
- public void start(I iface, execute_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ public void start(I iface, execute_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.execute(args.functionName, args.funcArgs,resultHandler);
}
}
@@ -299,24 +284,21 @@ public class DistributedRPC {
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 org.apache.thrift.protocol.TField FUNC_ARGS_FIELD_DESC = new org.apache.thrift.protocol.TField("funcArgs", 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 execute_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new execute_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new execute_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new execute_argsTupleSchemeFactory();
- private String functionName; // required
- private String funcArgs; // required
+ private java.lang.String functionName; // required
+ private java.lang.String funcArgs; // 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"),
FUNC_ARGS((short)2, "funcArgs");
- 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);
}
}
@@ -341,21 +323,21 @@ public class DistributedRPC {
*/
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;
}
@@ -364,20 +346,20 @@ public class DistributedRPC {
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)));
tmpMap.put(_Fields.FUNC_ARGS, new org.apache.thrift.meta_data.FieldMetaData("funcArgs", 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(execute_args.class, metaDataMap);
}
@@ -385,8 +367,8 @@ public class DistributedRPC {
}
public execute_args(
- String functionName,
- String funcArgs)
+ java.lang.String functionName,
+ java.lang.String funcArgs)
{
this();
this.functionName = functionName;
@@ -415,11 +397,11 @@ public class DistributedRPC {
this.funcArgs = 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;
}
@@ -438,11 +420,11 @@ public class DistributedRPC {
}
}
- public String get_funcArgs() {
+ public java.lang.String get_funcArgs() {
return this.funcArgs;
}
- public void set_funcArgs(String funcArgs) {
+ public void set_funcArgs(java.lang.String funcArgs) {
this.funcArgs = funcArgs;
}
@@ -461,13 +443,13 @@ public class DistributedRPC {
}
}
- 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;
@@ -475,14 +457,14 @@ public class DistributedRPC {
if (value == null) {
unset_funcArgs();
} else {
- set_funcArgs((String)value);
+ set_funcArgs((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();
@@ -491,13 +473,13 @@ public class DistributedRPC {
return get_funcArgs();
}
- 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) {
@@ -506,11 +488,11 @@ public class DistributedRPC {
case FUNC_ARGS:
return is_set_funcArgs();
}
- 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 execute_args)
@@ -521,6 +503,8 @@ public class DistributedRPC {
public boolean equals(execute_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();
@@ -545,19 +529,17 @@ public class DistributedRPC {
@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();
- boolean present_funcArgs = true && (is_set_funcArgs());
- list.add(present_funcArgs);
- if (present_funcArgs)
- list.add(funcArgs);
+ hashCode = hashCode * 8191 + ((is_set_funcArgs()) ? 131071 : 524287);
+ if (is_set_funcArgs())
+ hashCode = hashCode * 8191 + funcArgs.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -568,7 +550,7 @@ public class DistributedRPC {
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;
}
@@ -578,7 +560,7 @@ public class DistributedRPC {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_funcArgs()).compareTo(other.is_set_funcArgs());
+ lastComparison = java.lang.Boolean.valueOf(is_set_funcArgs()).compareTo(other.is_set_funcArgs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -596,16 +578,16 @@ public class DistributedRPC {
}
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("execute_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("execute_args(");
boolean first = true;
sb.append("functionName:");
@@ -640,7 +622,7 @@ public class DistributedRPC {
}
}
- 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) {
@@ -648,13 +630,13 @@ public class DistributedRPC {
}
}
- private static class execute_argsStandardSchemeFactory implements SchemeFactory {
+ private static class execute_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public execute_argsStandardScheme getScheme() {
return new execute_argsStandardScheme();
}
}
- private static class execute_argsStandardScheme extends StandardScheme<execute_args> {
+ private static class execute_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<execute_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, execute_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -711,18 +693,18 @@ public class DistributedRPC {
}
- private static class execute_argsTupleSchemeFactory implements SchemeFactory {
+ private static class execute_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public execute_argsTupleScheme getScheme() {
return new execute_argsTupleScheme();
}
}
- private static class execute_argsTupleScheme extends TupleScheme<execute_args> {
+ private static class execute_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<execute_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, execute_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);
}
@@ -740,8 +722,8 @@ public class DistributedRPC {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, execute_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.functionName = iprot.readString();
struct.set_functionName_isSet(true);
@@ -753,6 +735,9 @@ public class DistributedRPC {
}
}
+ 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 execute_result implements org.apache.thrift.TBase<execute_result, execute_result._Fields>, java.io.Serializable, Cloneable, Comparable<execute_result> {
@@ -762,13 +747,10 @@ public class DistributedRPC {
private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
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)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new execute_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new execute_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new execute_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new execute_resultTupleSchemeFactory();
- private String success; // required
+ private java.lang.String success; // required
private DRPCExecutionException e; // required
private AuthorizationException aze; // required
@@ -778,10 +760,10 @@ public class DistributedRPC {
E((short)1, "e"),
AZE((short)2, "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);
}
}
@@ -808,21 +790,21 @@ public class DistributedRPC {
*/
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;
}
@@ -831,22 +813,22 @@ public class DistributedRPC {
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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DRPCExecutionException.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(execute_result.class, metaDataMap);
}
@@ -854,7 +836,7 @@ public class DistributedRPC {
}
public execute_result(
- String success,
+ java.lang.String success,
DRPCExecutionException e,
AuthorizationException aze)
{
@@ -890,11 +872,11 @@ public class DistributedRPC {
this.aze = null;
}
- public String get_success() {
+ public java.lang.String get_success() {
return this.success;
}
- public void set_success(String success) {
+ public void set_success(java.lang.String success) {
this.success = success;
}
@@ -959,13 +941,13 @@ public class DistributedRPC {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unset_success();
} else {
- set_success((String)value);
+ set_success((java.lang.String)value);
}
break;
@@ -988,7 +970,7 @@ public class DistributedRPC {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return get_success();
@@ -1000,13 +982,13 @@ public class DistributedRPC {
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) {
@@ -1017,11 +999,11 @@ public class DistributedRPC {
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 execute_result)
@@ -1032,6 +1014,8 @@ public class DistributedRPC {
public boolean equals(execute_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();
@@ -1065,24 +1049,21 @@ public class DistributedRPC {
@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_e = true && (is_set_e());
- list.add(present_e);
- if (present_e)
- list.add(e);
+ hashCode = hashCode * 8191 + ((is_set_e()) ? 131071 : 524287);
+ if (is_set_e())
+ hashCode = hashCode * 8191 + e.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
@@ -1093,7 +1074,7 @@ public class DistributedRPC {
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;
}
@@ -1103,7 +1084,7 @@ public class DistributedRPC {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(is_set_e()).compareTo(other.is_set_e());
+ lastComparison = java.lang.Boolean.valueOf(is_set_e()).compareTo(other.is_set_e());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1113,7 +1094,7 @@ public class DistributedRPC {
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;
}
@@ -1131,16 +1112,16 @@ public class DistributedRPC {
}
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("execute_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("execute_result(");
boolean first = true;
sb.append("success:");
@@ -1183,7 +1164,7 @@ public class DistributedRPC {
}
}
- 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) {
@@ -1191,13 +1172,13 @@ public class DistributedRPC {
}
}
- private static class execute_resultStandardSchemeFactory implements SchemeFactory {
+ private static class execute_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public execute_resultStandardScheme getScheme() {
return new execute_resultStandardScheme();
}
}
- private static class execute_resultStandardScheme extends StandardScheme<execute_result> {
+ private static class execute_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<execute_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, execute_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1269,18 +1250,18 @@ public class DistributedRPC {
}
- private static class execute_resultTupleSchemeFactory implements SchemeFactory {
+ private static class execute_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public execute_resultTupleScheme getScheme() {
return new execute_resultTupleScheme();
}
}
- private static class execute_resultTupleScheme extends TupleScheme<execute_result> {
+ private static class execute_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<execute_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, execute_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);
}
@@ -1304,8 +1285,8 @@ public class DistributedRPC {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.set_success_isSet(true);
@@ -1323,6 +1304,9 @@ public class DistributedRPC {
}
}
+ 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();
+ }
}
}