You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2017/02/09 19:29:29 UTC
[01/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Repository: accumulo
Updated Branches:
refs/heads/master 8be77dfd9 -> 62bbce43e
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
index f99c2c8..60de00a 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/TestService.java
@@ -15,57 +15,30 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.tracer.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TestService {
public interface Iface {
- public boolean checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message) throws org.apache.thrift.TException;
+ public boolean checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String message) throws org.apache.thrift.TException;
}
public interface AsyncIface {
- public void checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String message, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -85,13 +58,13 @@ public class TestService {
super(iprot, oprot);
}
- public boolean checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message) throws org.apache.thrift.TException
+ public boolean checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String message) throws org.apache.thrift.TException
{
send_checkTrace(tinfo, message);
return recv_checkTrace();
}
- public void send_checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message) throws org.apache.thrift.TException
+ public void send_checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String message) throws org.apache.thrift.TException
{
checkTrace_args args = new checkTrace_args();
args.setTinfo(tinfo);
@@ -127,17 +100,17 @@ public class TestService {
super(protocolFactory, clientManager, transport);
}
- public void checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void checkTrace(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String message, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
checkTrace_call method_call = new checkTrace_call(tinfo, message, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class checkTrace_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class checkTrace_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
- private String message;
- public checkTrace_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, String message, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String message;
+ public checkTrace_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, java.lang.String message, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.tinfo = tinfo;
this.message = message;
@@ -152,9 +125,9 @@ public class TestService {
prot.writeMessageEnd();
}
- public boolean getResult() throws org.apache.thrift.TException {
+ public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -165,16 +138,16 @@ public class TestService {
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("checkTrace", new checkTrace());
return processMap;
}
@@ -203,21 +176,21 @@ public class TestService {
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("checkTrace", new checkTrace());
return processMap;
}
- public static class checkTrace<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkTrace_args, Boolean> {
+ public static class checkTrace<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, checkTrace_args, java.lang.Boolean> {
public checkTrace() {
super("checkTrace");
}
@@ -226,36 +199,46 @@ public class TestService {
return new checkTrace_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ public void onComplete(java.lang.Boolean o) {
checkTrace_result result = new checkTrace_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
checkTrace_result result = new checkTrace_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
@@ -264,7 +247,7 @@ public class TestService {
return false;
}
- public void start(I iface, checkTrace_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ public void start(I iface, checkTrace_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.checkTrace(args.tinfo, args.message,resultHandler);
}
}
@@ -277,24 +260,21 @@ public class TestService {
private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new checkTrace_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new checkTrace_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new checkTrace_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new checkTrace_argsTupleSchemeFactory();
public org.apache.accumulo.core.trace.thrift.TInfo tinfo; // required
- public String message; // required
+ public java.lang.String message; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TINFO((short)1, "tinfo"),
MESSAGE((short)2, "message");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -319,21 +299,21 @@ public class TestService {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -342,20 +322,20 @@ public class TestService {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.trace.thrift.TInfo.class)));
tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkTrace_args.class, metaDataMap);
}
@@ -364,7 +344,7 @@ public class TestService {
public checkTrace_args(
org.apache.accumulo.core.trace.thrift.TInfo tinfo,
- String message)
+ java.lang.String message)
{
this();
this.tinfo = tinfo;
@@ -417,11 +397,11 @@ public class TestService {
}
}
- public String getMessage() {
+ public java.lang.String getMessage() {
return this.message;
}
- public checkTrace_args setMessage(String message) {
+ public checkTrace_args setMessage(java.lang.String message) {
this.message = message;
return this;
}
@@ -441,7 +421,7 @@ public class TestService {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TINFO:
if (value == null) {
@@ -455,14 +435,14 @@ public class TestService {
if (value == null) {
unsetMessage();
} else {
- setMessage((String)value);
+ setMessage((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TINFO:
return getTinfo();
@@ -471,13 +451,13 @@ public class TestService {
return getMessage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -486,11 +466,11 @@ public class TestService {
case MESSAGE:
return isSetMessage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof checkTrace_args)
@@ -501,6 +481,8 @@ public class TestService {
public boolean equals(checkTrace_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tinfo = true && this.isSetTinfo();
boolean that_present_tinfo = true && that.isSetTinfo();
@@ -525,19 +507,17 @@ public class TestService {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tinfo = true && (isSetTinfo());
- list.add(present_tinfo);
- if (present_tinfo)
- list.add(tinfo);
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
- boolean present_message = true && (isSetMessage());
- list.add(present_message);
- if (present_message)
- list.add(message);
+ hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
+ if (isSetMessage())
+ hashCode = hashCode * 8191 + message.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -548,7 +528,7 @@ public class TestService {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTinfo()).compareTo(other.isSetTinfo());
+ lastComparison = java.lang.Boolean.valueOf(isSetTinfo()).compareTo(other.isSetTinfo());
if (lastComparison != 0) {
return lastComparison;
}
@@ -558,7 +538,7 @@ public class TestService {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ lastComparison = java.lang.Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -576,16 +556,16 @@ public class TestService {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("checkTrace_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("checkTrace_args(");
boolean first = true;
sb.append("tinfo:");
@@ -623,7 +603,7 @@ public class TestService {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -631,13 +611,13 @@ public class TestService {
}
}
- private static class checkTrace_argsStandardSchemeFactory implements SchemeFactory {
+ private static class checkTrace_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public checkTrace_argsStandardScheme getScheme() {
return new checkTrace_argsStandardScheme();
}
}
- private static class checkTrace_argsStandardScheme extends StandardScheme<checkTrace_args> {
+ private static class checkTrace_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<checkTrace_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkTrace_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -697,18 +677,18 @@ public class TestService {
}
- private static class checkTrace_argsTupleSchemeFactory implements SchemeFactory {
+ private static class checkTrace_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public checkTrace_argsTupleScheme getScheme() {
return new checkTrace_argsTupleScheme();
}
}
- private static class checkTrace_argsTupleScheme extends TupleScheme<checkTrace_args> {
+ private static class checkTrace_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<checkTrace_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkTrace_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTinfo()) {
optionals.set(0);
}
@@ -726,8 +706,8 @@ public class TestService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkTrace_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo();
struct.tinfo.read(iprot);
@@ -740,6 +720,9 @@ public class TestService {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
public static class checkTrace_result implements org.apache.thrift.TBase<checkTrace_result, checkTrace_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkTrace_result> {
@@ -747,11 +730,8 @@ public class TestService {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new checkTrace_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new checkTrace_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new checkTrace_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new checkTrace_resultTupleSchemeFactory();
public boolean success; // required
@@ -759,10 +739,10 @@ public class TestService {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -785,21 +765,21 @@ public class TestService {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -808,7 +788,7 @@ public class TestService {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -816,12 +796,12 @@ public class TestService {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(checkTrace_result.class, metaDataMap);
}
@@ -865,55 +845,55 @@ public class TestService {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof checkTrace_result)
@@ -924,6 +904,8 @@ public class TestService {
public boolean equals(checkTrace_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -939,14 +921,11 @@ public class TestService {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -957,7 +936,7 @@ public class TestService {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -975,16 +954,16 @@ public class TestService {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("checkTrace_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("checkTrace_result(");
boolean first = true;
sb.append("success:");
@@ -1007,7 +986,7 @@ public class TestService {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1017,13 +996,13 @@ public class TestService {
}
}
- private static class checkTrace_resultStandardSchemeFactory implements SchemeFactory {
+ private static class checkTrace_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public checkTrace_resultStandardScheme getScheme() {
return new checkTrace_resultStandardScheme();
}
}
- private static class checkTrace_resultStandardScheme extends StandardScheme<checkTrace_result> {
+ private static class checkTrace_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<checkTrace_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, checkTrace_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1069,18 +1048,18 @@ public class TestService {
}
- private static class checkTrace_resultTupleSchemeFactory implements SchemeFactory {
+ private static class checkTrace_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public checkTrace_resultTupleScheme getScheme() {
return new checkTrace_resultTupleScheme();
}
}
- private static class checkTrace_resultTupleScheme extends TupleScheme<checkTrace_result> {
+ private static class checkTrace_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<checkTrace_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, checkTrace_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -1092,8 +1071,8 @@ public class TestService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, checkTrace_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
@@ -1101,6 +1080,10 @@ public class TestService {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
+ private static void unusedMethod() {}
}
[08/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanColumn.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanColumn.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanColumn.java
index 3cea424..1eb2b48 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanColumn.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanColumn.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColumn._Fields>, java.io.Serializable, Cloneable, Comparable<ScanColumn> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ScanColumn");
private static final org.apache.thrift.protocol.TField COL_FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("colFamily", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField COL_QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("colQualifier", 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 ScanColumnStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ScanColumnTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ScanColumnStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ScanColumnTupleSchemeFactory();
- public ByteBuffer colFamily; // required
- public ByteBuffer colQualifier; // optional
+ public java.nio.ByteBuffer colFamily; // required
+ public java.nio.ByteBuffer colQualifier; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
COL_FAMILY((short)1, "colFamily"),
COL_QUALIFIER((short)2, "colQualifier");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,21 +92,21 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.COL_QUALIFIER};
- 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.COL_FAMILY, new org.apache.thrift.meta_data.FieldMetaData("colFamily", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COL_QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("colQualifier", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ScanColumn.class, metaDataMap);
}
@@ -144,7 +114,7 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
}
public ScanColumn(
- ByteBuffer colFamily)
+ java.nio.ByteBuffer colFamily)
{
this();
this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(colFamily);
@@ -177,16 +147,16 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
return colFamily == null ? null : colFamily.array();
}
- public ByteBuffer bufferForColFamily() {
+ public java.nio.ByteBuffer bufferForColFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(colFamily);
}
public ScanColumn setColFamily(byte[] colFamily) {
- this.colFamily = colFamily == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colFamily, colFamily.length));
+ this.colFamily = colFamily == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colFamily.clone());
return this;
}
- public ScanColumn setColFamily(ByteBuffer colFamily) {
+ public ScanColumn setColFamily(java.nio.ByteBuffer colFamily) {
this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(colFamily);
return this;
}
@@ -211,16 +181,16 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
return colQualifier == null ? null : colQualifier.array();
}
- public ByteBuffer bufferForColQualifier() {
+ public java.nio.ByteBuffer bufferForColQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
}
public ScanColumn setColQualifier(byte[] colQualifier) {
- this.colQualifier = colQualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colQualifier, colQualifier.length));
+ this.colQualifier = colQualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colQualifier.clone());
return this;
}
- public ScanColumn setColQualifier(ByteBuffer colQualifier) {
+ public ScanColumn setColQualifier(java.nio.ByteBuffer colQualifier) {
this.colQualifier = org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
return this;
}
@@ -240,13 +210,17 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COL_FAMILY:
if (value == null) {
unsetColFamily();
} else {
- setColFamily((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColFamily((byte[])value);
+ } else {
+ setColFamily((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -254,14 +228,18 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
if (value == null) {
unsetColQualifier();
} else {
- setColQualifier((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColQualifier((byte[])value);
+ } else {
+ setColQualifier((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COL_FAMILY:
return getColFamily();
@@ -270,13 +248,13 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
return getColQualifier();
}
- 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) {
@@ -285,11 +263,11 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
case COL_QUALIFIER:
return isSetColQualifier();
}
- 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 ScanColumn)
@@ -300,6 +278,8 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
public boolean equals(ScanColumn that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_colFamily = true && this.isSetColFamily();
boolean that_present_colFamily = true && that.isSetColFamily();
@@ -324,19 +304,17 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_colFamily = true && (isSetColFamily());
- list.add(present_colFamily);
- if (present_colFamily)
- list.add(colFamily);
+ hashCode = hashCode * 8191 + ((isSetColFamily()) ? 131071 : 524287);
+ if (isSetColFamily())
+ hashCode = hashCode * 8191 + colFamily.hashCode();
- boolean present_colQualifier = true && (isSetColQualifier());
- list.add(present_colQualifier);
- if (present_colQualifier)
- list.add(colQualifier);
+ hashCode = hashCode * 8191 + ((isSetColQualifier()) ? 131071 : 524287);
+ if (isSetColQualifier())
+ hashCode = hashCode * 8191 + colQualifier.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -347,7 +325,7 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
+ lastComparison = java.lang.Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
if (lastComparison != 0) {
return lastComparison;
}
@@ -357,7 +335,7 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -375,16 +353,16 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
}
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("ScanColumn(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ScanColumn(");
boolean first = true;
sb.append("colFamily:");
@@ -421,7 +399,7 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
}
}
- 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) {
@@ -429,13 +407,13 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
}
}
- private static class ScanColumnStandardSchemeFactory implements SchemeFactory {
+ private static class ScanColumnStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanColumnStandardScheme getScheme() {
return new ScanColumnStandardScheme();
}
}
- private static class ScanColumnStandardScheme extends StandardScheme<ScanColumn> {
+ private static class ScanColumnStandardScheme extends org.apache.thrift.scheme.StandardScheme<ScanColumn> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ScanColumn struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -496,18 +474,18 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
}
- private static class ScanColumnTupleSchemeFactory implements SchemeFactory {
+ private static class ScanColumnTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanColumnTupleScheme getScheme() {
return new ScanColumnTupleScheme();
}
}
- private static class ScanColumnTupleScheme extends TupleScheme<ScanColumn> {
+ private static class ScanColumnTupleScheme extends org.apache.thrift.scheme.TupleScheme<ScanColumn> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ScanColumn 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.isSetColFamily()) {
optionals.set(0);
}
@@ -525,8 +503,8 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ScanColumn 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.colFamily = iprot.readBinary();
struct.setColFamilyIsSet(true);
@@ -538,5 +516,9 @@ public class ScanColumn implements org.apache.thrift.TBase<ScanColumn, ScanColum
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanOptions.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanOptions.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanOptions.java
index 6675c8e..08224f9 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanOptions.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanOptions.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOptions._Fields>, java.io.Serializable, Cloneable, Comparable<ScanOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ScanOptions");
@@ -60,16 +33,13 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField BUFFER_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("bufferSize", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ScanOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ScanOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ScanOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ScanOptionsTupleSchemeFactory();
- public Set<ByteBuffer> authorizations; // optional
+ public java.util.Set<java.nio.ByteBuffer> authorizations; // optional
public Range range; // optional
- public List<ScanColumn> columns; // optional
- public List<IteratorSetting> iterators; // optional
+ public java.util.List<ScanColumn> columns; // optional
+ public java.util.List<IteratorSetting> iterators; // optional
public int bufferSize; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -80,10 +50,10 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
ITERATORS((short)4, "iterators"),
BUFFER_SIZE((short)5, "bufferSize");
- 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);
}
}
@@ -114,21 +84,21 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
*/
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;
}
@@ -137,7 +107,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -146,9 +116,9 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
private static final int __BUFFERSIZE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.AUTHORIZATIONS,_Fields.RANGE,_Fields.COLUMNS,_Fields.ITERATORS,_Fields.BUFFER_SIZE};
- 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.AUTHORIZATIONS, new org.apache.thrift.meta_data.FieldMetaData("authorizations", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
@@ -162,7 +132,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IteratorSetting.class))));
tmpMap.put(_Fields.BUFFER_SIZE, new org.apache.thrift.meta_data.FieldMetaData("bufferSize", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ScanOptions.class, metaDataMap);
}
@@ -175,21 +145,21 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
public ScanOptions(ScanOptions other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetAuthorizations()) {
- Set<ByteBuffer> __this__authorizations = new HashSet<ByteBuffer>(other.authorizations);
+ java.util.Set<java.nio.ByteBuffer> __this__authorizations = new java.util.HashSet<java.nio.ByteBuffer>(other.authorizations);
this.authorizations = __this__authorizations;
}
if (other.isSetRange()) {
this.range = new Range(other.range);
}
if (other.isSetColumns()) {
- List<ScanColumn> __this__columns = new ArrayList<ScanColumn>(other.columns.size());
+ java.util.List<ScanColumn> __this__columns = new java.util.ArrayList<ScanColumn>(other.columns.size());
for (ScanColumn other_element : other.columns) {
__this__columns.add(new ScanColumn(other_element));
}
this.columns = __this__columns;
}
if (other.isSetIterators()) {
- List<IteratorSetting> __this__iterators = new ArrayList<IteratorSetting>(other.iterators.size());
+ java.util.List<IteratorSetting> __this__iterators = new java.util.ArrayList<IteratorSetting>(other.iterators.size());
for (IteratorSetting other_element : other.iterators) {
__this__iterators.add(new IteratorSetting(other_element));
}
@@ -216,22 +186,22 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
return (this.authorizations == null) ? 0 : this.authorizations.size();
}
- public java.util.Iterator<ByteBuffer> getAuthorizationsIterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> getAuthorizationsIterator() {
return (this.authorizations == null) ? null : this.authorizations.iterator();
}
- public void addToAuthorizations(ByteBuffer elem) {
+ public void addToAuthorizations(java.nio.ByteBuffer elem) {
if (this.authorizations == null) {
- this.authorizations = new HashSet<ByteBuffer>();
+ this.authorizations = new java.util.HashSet<java.nio.ByteBuffer>();
}
this.authorizations.add(elem);
}
- public Set<ByteBuffer> getAuthorizations() {
+ public java.util.Set<java.nio.ByteBuffer> getAuthorizations() {
return this.authorizations;
}
- public ScanOptions setAuthorizations(Set<ByteBuffer> authorizations) {
+ public ScanOptions setAuthorizations(java.util.Set<java.nio.ByteBuffer> authorizations) {
this.authorizations = authorizations;
return this;
}
@@ -285,16 +255,16 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
public void addToColumns(ScanColumn elem) {
if (this.columns == null) {
- this.columns = new ArrayList<ScanColumn>();
+ this.columns = new java.util.ArrayList<ScanColumn>();
}
this.columns.add(elem);
}
- public List<ScanColumn> getColumns() {
+ public java.util.List<ScanColumn> getColumns() {
return this.columns;
}
- public ScanOptions setColumns(List<ScanColumn> columns) {
+ public ScanOptions setColumns(java.util.List<ScanColumn> columns) {
this.columns = columns;
return this;
}
@@ -324,16 +294,16 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
public void addToIterators(IteratorSetting elem) {
if (this.iterators == null) {
- this.iterators = new ArrayList<IteratorSetting>();
+ this.iterators = new java.util.ArrayList<IteratorSetting>();
}
this.iterators.add(elem);
}
- public List<IteratorSetting> getIterators() {
+ public java.util.List<IteratorSetting> getIterators() {
return this.iterators;
}
- public ScanOptions setIterators(List<IteratorSetting> iterators) {
+ public ScanOptions setIterators(java.util.List<IteratorSetting> iterators) {
this.iterators = iterators;
return this;
}
@@ -364,25 +334,25 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
}
public void unsetBufferSize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BUFFERSIZE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BUFFERSIZE_ISSET_ID);
}
/** Returns true if field bufferSize is set (has been assigned a value) and false otherwise */
public boolean isSetBufferSize() {
- return EncodingUtils.testBit(__isset_bitfield, __BUFFERSIZE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BUFFERSIZE_ISSET_ID);
}
public void setBufferSizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BUFFERSIZE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BUFFERSIZE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHORIZATIONS:
if (value == null) {
unsetAuthorizations();
} else {
- setAuthorizations((Set<ByteBuffer>)value);
+ setAuthorizations((java.util.Set<java.nio.ByteBuffer>)value);
}
break;
@@ -398,7 +368,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (value == null) {
unsetColumns();
} else {
- setColumns((List<ScanColumn>)value);
+ setColumns((java.util.List<ScanColumn>)value);
}
break;
@@ -406,7 +376,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (value == null) {
unsetIterators();
} else {
- setIterators((List<IteratorSetting>)value);
+ setIterators((java.util.List<IteratorSetting>)value);
}
break;
@@ -414,14 +384,14 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (value == null) {
unsetBufferSize();
} else {
- setBufferSize((Integer)value);
+ setBufferSize((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHORIZATIONS:
return getAuthorizations();
@@ -439,13 +409,13 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
return getBufferSize();
}
- 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) {
@@ -460,11 +430,11 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
case BUFFER_SIZE:
return isSetBufferSize();
}
- 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 ScanOptions)
@@ -475,6 +445,8 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
public boolean equals(ScanOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authorizations = true && this.isSetAuthorizations();
boolean that_present_authorizations = true && that.isSetAuthorizations();
@@ -526,34 +498,29 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authorizations = true && (isSetAuthorizations());
- list.add(present_authorizations);
- if (present_authorizations)
- list.add(authorizations);
+ hashCode = hashCode * 8191 + ((isSetAuthorizations()) ? 131071 : 524287);
+ if (isSetAuthorizations())
+ hashCode = hashCode * 8191 + authorizations.hashCode();
- boolean present_range = true && (isSetRange());
- list.add(present_range);
- if (present_range)
- list.add(range);
+ hashCode = hashCode * 8191 + ((isSetRange()) ? 131071 : 524287);
+ if (isSetRange())
+ hashCode = hashCode * 8191 + range.hashCode();
- boolean present_columns = true && (isSetColumns());
- list.add(present_columns);
- if (present_columns)
- list.add(columns);
+ hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
+ if (isSetColumns())
+ hashCode = hashCode * 8191 + columns.hashCode();
- boolean present_iterators = true && (isSetIterators());
- list.add(present_iterators);
- if (present_iterators)
- list.add(iterators);
+ hashCode = hashCode * 8191 + ((isSetIterators()) ? 131071 : 524287);
+ if (isSetIterators())
+ hashCode = hashCode * 8191 + iterators.hashCode();
- boolean present_bufferSize = true && (isSetBufferSize());
- list.add(present_bufferSize);
- if (present_bufferSize)
- list.add(bufferSize);
+ hashCode = hashCode * 8191 + ((isSetBufferSize()) ? 131071 : 524287);
+ if (isSetBufferSize())
+ hashCode = hashCode * 8191 + bufferSize;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -564,7 +531,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
+ lastComparison = java.lang.Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -574,7 +541,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRange()).compareTo(other.isSetRange());
+ lastComparison = java.lang.Boolean.valueOf(isSetRange()).compareTo(other.isSetRange());
if (lastComparison != 0) {
return lastComparison;
}
@@ -584,7 +551,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@@ -594,7 +561,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
+ lastComparison = java.lang.Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
if (lastComparison != 0) {
return lastComparison;
}
@@ -604,7 +571,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBufferSize()).compareTo(other.isSetBufferSize());
+ lastComparison = java.lang.Boolean.valueOf(isSetBufferSize()).compareTo(other.isSetBufferSize());
if (lastComparison != 0) {
return lastComparison;
}
@@ -622,16 +589,16 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
}
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("ScanOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ScanOptions(");
boolean first = true;
if (isSetAuthorizations()) {
@@ -699,7 +666,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -709,13 +676,13 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
}
}
- private static class ScanOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class ScanOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanOptionsStandardScheme getScheme() {
return new ScanOptionsStandardScheme();
}
}
- private static class ScanOptionsStandardScheme extends StandardScheme<ScanOptions> {
+ private static class ScanOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ScanOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ScanOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -731,8 +698,8 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set26 = iprot.readSetBegin();
- struct.authorizations = new HashSet<ByteBuffer>(2*_set26.size);
- ByteBuffer _elem27;
+ struct.authorizations = new java.util.HashSet<java.nio.ByteBuffer>(2*_set26.size);
+ java.nio.ByteBuffer _elem27;
for (int _i28 = 0; _i28 < _set26.size; ++_i28)
{
_elem27 = iprot.readBinary();
@@ -758,7 +725,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
- struct.columns = new ArrayList<ScanColumn>(_list29.size);
+ struct.columns = new java.util.ArrayList<ScanColumn>(_list29.size);
ScanColumn _elem30;
for (int _i31 = 0; _i31 < _list29.size; ++_i31)
{
@@ -777,7 +744,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
- struct.iterators = new ArrayList<IteratorSetting>(_list32.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list32.size);
IteratorSetting _elem33;
for (int _i34 = 0; _i34 < _list32.size; ++_i34)
{
@@ -820,7 +787,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
oprot.writeFieldBegin(AUTHORIZATIONS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.authorizations.size()));
- for (ByteBuffer _iter35 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter35 : struct.authorizations)
{
oprot.writeBinary(_iter35);
}
@@ -875,18 +842,18 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
}
- private static class ScanOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class ScanOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanOptionsTupleScheme getScheme() {
return new ScanOptionsTupleScheme();
}
}
- private static class ScanOptionsTupleScheme extends TupleScheme<ScanOptions> {
+ private static class ScanOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ScanOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ScanOptions 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.isSetAuthorizations()) {
optionals.set(0);
}
@@ -906,7 +873,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (struct.isSetAuthorizations()) {
{
oprot.writeI32(struct.authorizations.size());
- for (ByteBuffer _iter38 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter38 : struct.authorizations)
{
oprot.writeBinary(_iter38);
}
@@ -940,13 +907,13 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ScanOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TSet _set41 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.authorizations = new HashSet<ByteBuffer>(2*_set41.size);
- ByteBuffer _elem42;
+ struct.authorizations = new java.util.HashSet<java.nio.ByteBuffer>(2*_set41.size);
+ java.nio.ByteBuffer _elem42;
for (int _i43 = 0; _i43 < _set41.size; ++_i43)
{
_elem42 = iprot.readBinary();
@@ -963,7 +930,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list44 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.columns = new ArrayList<ScanColumn>(_list44.size);
+ struct.columns = new java.util.ArrayList<ScanColumn>(_list44.size);
ScanColumn _elem45;
for (int _i46 = 0; _i46 < _list44.size; ++_i46)
{
@@ -977,7 +944,7 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.iterators = new ArrayList<IteratorSetting>(_list47.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list47.size);
IteratorSetting _elem48;
for (int _i49 = 0; _i49 < _list47.size; ++_i49)
{
@@ -995,5 +962,9 @@ public class ScanOptions implements org.apache.thrift.TBase<ScanOptions, ScanOpt
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanResult.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanResult.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanResult.java
index 861b0de..f5551cc 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanResult.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanResult.java
@@ -15,55 +15,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResult._Fields>, java.io.Serializable, Cloneable, Comparable<ScanResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ScanResult");
private static final org.apache.thrift.protocol.TField RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("results", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField MORE_FIELD_DESC = new org.apache.thrift.protocol.TField("more", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ScanResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ScanResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ScanResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ScanResultTupleSchemeFactory();
- public List<KeyValue> results; // required
+ public java.util.List<KeyValue> results; // required
public boolean more; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -71,10 +41,10 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
RESULTS((short)1, "results"),
MORE((short)2, "more");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,15 +100,15 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
// isset id assignments
private static final int __MORE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RESULTS, new org.apache.thrift.meta_data.FieldMetaData("results", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeyValue.class))));
tmpMap.put(_Fields.MORE, new org.apache.thrift.meta_data.FieldMetaData("more", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ScanResult.class, metaDataMap);
}
@@ -146,7 +116,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
public ScanResult(
- List<KeyValue> results,
+ java.util.List<KeyValue> results,
boolean more)
{
this();
@@ -161,7 +131,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public ScanResult(ScanResult other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetResults()) {
- List<KeyValue> __this__results = new ArrayList<KeyValue>(other.results.size());
+ java.util.List<KeyValue> __this__results = new java.util.ArrayList<KeyValue>(other.results.size());
for (KeyValue other_element : other.results) {
__this__results.add(new KeyValue(other_element));
}
@@ -191,16 +161,16 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public void addToResults(KeyValue elem) {
if (this.results == null) {
- this.results = new ArrayList<KeyValue>();
+ this.results = new java.util.ArrayList<KeyValue>();
}
this.results.add(elem);
}
- public List<KeyValue> getResults() {
+ public java.util.List<KeyValue> getResults() {
return this.results;
}
- public ScanResult setResults(List<KeyValue> results) {
+ public ScanResult setResults(java.util.List<KeyValue> results) {
this.results = results;
return this;
}
@@ -231,25 +201,25 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
public void unsetMore() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
}
/** Returns true if field more is set (has been assigned a value) and false otherwise */
public boolean isSetMore() {
- return EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
}
public void setMoreIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case RESULTS:
if (value == null) {
unsetResults();
} else {
- setResults((List<KeyValue>)value);
+ setResults((java.util.List<KeyValue>)value);
}
break;
@@ -257,14 +227,14 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
if (value == null) {
unsetMore();
} else {
- setMore((Boolean)value);
+ setMore((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RESULTS:
return getResults();
@@ -273,13 +243,13 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return isMore();
}
- 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) {
@@ -288,11 +258,11 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
case MORE:
return isSetMore();
}
- 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 ScanResult)
@@ -303,6 +273,8 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public boolean equals(ScanResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_results = true && this.isSetResults();
boolean that_present_results = true && that.isSetResults();
@@ -327,19 +299,15 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_results = true && (isSetResults());
- list.add(present_results);
- if (present_results)
- list.add(results);
+ hashCode = hashCode * 8191 + ((isSetResults()) ? 131071 : 524287);
+ if (isSetResults())
+ hashCode = hashCode * 8191 + results.hashCode();
- boolean present_more = true;
- list.add(present_more);
- if (present_more)
- list.add(more);
+ hashCode = hashCode * 8191 + ((more) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -350,7 +318,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
+ lastComparison = java.lang.Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
if (lastComparison != 0) {
return lastComparison;
}
@@ -360,7 +328,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
+ lastComparison = java.lang.Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
if (lastComparison != 0) {
return lastComparison;
}
@@ -378,16 +346,16 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
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("ScanResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ScanResult(");
boolean first = true;
sb.append("results:");
@@ -418,7 +386,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -428,13 +396,13 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
- private static class ScanResultStandardSchemeFactory implements SchemeFactory {
+ private static class ScanResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanResultStandardScheme getScheme() {
return new ScanResultStandardScheme();
}
}
- private static class ScanResultStandardScheme extends StandardScheme<ScanResult> {
+ private static class ScanResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<ScanResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ScanResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -450,7 +418,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.results = new ArrayList<KeyValue>(_list8.size);
+ struct.results = new java.util.ArrayList<KeyValue>(_list8.size);
KeyValue _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
@@ -509,18 +477,18 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
- private static class ScanResultTupleSchemeFactory implements SchemeFactory {
+ private static class ScanResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanResultTupleScheme getScheme() {
return new ScanResultTupleScheme();
}
}
- private static class ScanResultTupleScheme extends TupleScheme<ScanResult> {
+ private static class ScanResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<ScanResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ScanResult 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.isSetResults()) {
optionals.set(0);
}
@@ -544,12 +512,12 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ScanResult 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)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.results = new ArrayList<KeyValue>(_list13.size);
+ struct.results = new java.util.ArrayList<KeyValue>(_list13.size);
KeyValue _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
@@ -567,5 +535,9 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanState.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanState.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanState.java
index 8e79212..17d390d 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanState.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanState.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum ScanState implements org.apache.thrift.TEnum {
+public enum ScanState implements org.apache.thrift.TEnum {
IDLE(0),
RUNNING(1),
QUEUED(2);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanType.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanType.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanType.java
index 14ac9ce..0082b71 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanType.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum ScanType implements org.apache.thrift.TEnum {
+public enum ScanType implements org.apache.thrift.TEnum {
SINGLE(0),
BATCH(1);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/SystemPermission.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/SystemPermission.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/SystemPermission.java
index 6f4b549..2c077f0 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/SystemPermission.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/SystemPermission.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum SystemPermission implements org.apache.thrift.TEnum {
+public enum SystemPermission implements org.apache.thrift.TEnum {
GRANT(0),
CREATE_TABLE(1),
DROP_TABLE(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableExistsException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableExistsException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableExistsException.java
index 509f022..3162458 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableExistsException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableExistsException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class TableExistsException extends TException implements org.apache.thrift.TBase<TableExistsException, TableExistsException._Fields>, java.io.Serializable, Cloneable, Comparable<TableExistsException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class TableExistsException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TableExistsException, TableExistsException._Fields>, java.io.Serializable, Cloneable, Comparable<TableExistsException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableExistsException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TableExistsExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TableExistsExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TableExistsExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TableExistsExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class TableExistsException extends TException implements org.apache.thrif
*/
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;
}
@@ -117,18 +87,18 @@ public class TableExistsException extends TException implements org.apache.thrif
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableExistsException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class TableExistsException extends TException implements org.apache.thrif
}
public TableExistsException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class TableExistsException extends TException implements org.apache.thrif
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public TableExistsException setMsg(String msg) {
+ public TableExistsException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class TableExistsException extends TException implements org.apache.thrif
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TableExistsException)
@@ -231,6 +201,8 @@ public class TableExistsException extends TException implements org.apache.thrif
public boolean equals(TableExistsException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class TableExistsException extends TException implements org.apache.thrif
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class TableExistsException extends TException implements org.apache.thrif
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class TableExistsException extends TException implements org.apache.thrif
}
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("TableExistsException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TableExistsException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class TableExistsException extends TException implements org.apache.thrif
}
}
- 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) {
@@ -326,13 +297,13 @@ public class TableExistsException extends TException implements org.apache.thrif
}
}
- private static class TableExistsExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TableExistsExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TableExistsExceptionStandardScheme getScheme() {
return new TableExistsExceptionStandardScheme();
}
}
- private static class TableExistsExceptionStandardScheme extends StandardScheme<TableExistsException> {
+ private static class TableExistsExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TableExistsException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TableExistsException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class TableExistsException extends TException implements org.apache.thrif
}
- private static class TableExistsExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TableExistsExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TableExistsExceptionTupleScheme getScheme() {
return new TableExistsExceptionTupleScheme();
}
}
- private static class TableExistsExceptionTupleScheme extends TupleScheme<TableExistsException> {
+ private static class TableExistsExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TableExistsException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TableExistsException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class TableExistsException extends TException implements org.apache.thrif
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TableExistsException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class TableExistsException extends TException implements org.apache.thrif
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[16/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
index 95dd551..8051bf4 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletStats._Fields>, java.io.Serializable, Cloneable, Comparable<TabletStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletStats");
@@ -63,11 +36,8 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
private static final org.apache.thrift.protocol.TField QUERY_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryRate", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
private static final org.apache.thrift.protocol.TField SPLIT_CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("splitCreationTime", org.apache.thrift.protocol.TType.I64, (short)8);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TabletStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TabletStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TabletStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TabletStatsTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
public ActionStats majors; // required
@@ -89,10 +59,10 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
QUERY_RATE((short)7, "queryRate"),
SPLIT_CREATION_TIME((short)8, "splitCreationTime");
- 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);
}
}
@@ -129,21 +99,21 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
*/
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;
}
@@ -152,7 +122,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -163,9 +133,9 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
private static final int __QUERYRATE_ISSET_ID = 2;
private static final int __SPLITCREATIONTIME_ISSET_ID = 3;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
tmpMap.put(_Fields.MAJORS, new org.apache.thrift.meta_data.FieldMetaData("majors", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -182,7 +152,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.SPLIT_CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("splitCreationTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TabletStats.class, metaDataMap);
}
@@ -364,16 +334,16 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void unsetNumEntries() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
}
/** Returns true if field numEntries is set (has been assigned a value) and false otherwise */
public boolean isSetNumEntries() {
- return EncodingUtils.testBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
}
public void setNumEntriesIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMENTRIES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUMENTRIES_ISSET_ID, value);
}
public double getIngestRate() {
@@ -387,16 +357,16 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void unsetIngestRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
}
/** Returns true if field ingestRate is set (has been assigned a value) and false otherwise */
public boolean isSetIngestRate() {
- return EncodingUtils.testBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
}
public void setIngestRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INGESTRATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INGESTRATE_ISSET_ID, value);
}
public double getQueryRate() {
@@ -410,16 +380,16 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void unsetQueryRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
}
/** Returns true if field queryRate is set (has been assigned a value) and false otherwise */
public boolean isSetQueryRate() {
- return EncodingUtils.testBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
}
public void setQueryRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUERYRATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYRATE_ISSET_ID, value);
}
public long getSplitCreationTime() {
@@ -433,19 +403,19 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void unsetSplitCreationTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
}
/** Returns true if field splitCreationTime is set (has been assigned a value) and false otherwise */
public boolean isSetSplitCreationTime() {
- return EncodingUtils.testBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
}
public void setSplitCreationTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXTENT:
if (value == null) {
@@ -483,7 +453,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
if (value == null) {
unsetNumEntries();
} else {
- setNumEntries((Long)value);
+ setNumEntries((java.lang.Long)value);
}
break;
@@ -491,7 +461,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
if (value == null) {
unsetIngestRate();
} else {
- setIngestRate((Double)value);
+ setIngestRate((java.lang.Double)value);
}
break;
@@ -499,7 +469,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
if (value == null) {
unsetQueryRate();
} else {
- setQueryRate((Double)value);
+ setQueryRate((java.lang.Double)value);
}
break;
@@ -507,14 +477,14 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
if (value == null) {
unsetSplitCreationTime();
} else {
- setSplitCreationTime((Long)value);
+ setSplitCreationTime((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXTENT:
return getExtent();
@@ -541,13 +511,13 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return getSplitCreationTime();
}
- 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) {
@@ -568,11 +538,11 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
case SPLIT_CREATION_TIME:
return isSetSplitCreationTime();
}
- 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 TabletStats)
@@ -583,6 +553,8 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
public boolean equals(TabletStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_extent = true && this.isSetExtent();
boolean that_present_extent = true && that.isSetExtent();
@@ -661,49 +633,33 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
- boolean present_majors = true && (isSetMajors());
- list.add(present_majors);
- if (present_majors)
- list.add(majors);
+ hashCode = hashCode * 8191 + ((isSetMajors()) ? 131071 : 524287);
+ if (isSetMajors())
+ hashCode = hashCode * 8191 + majors.hashCode();
- boolean present_minors = true && (isSetMinors());
- list.add(present_minors);
- if (present_minors)
- list.add(minors);
+ hashCode = hashCode * 8191 + ((isSetMinors()) ? 131071 : 524287);
+ if (isSetMinors())
+ hashCode = hashCode * 8191 + minors.hashCode();
- boolean present_splits = true && (isSetSplits());
- list.add(present_splits);
- if (present_splits)
- list.add(splits);
+ hashCode = hashCode * 8191 + ((isSetSplits()) ? 131071 : 524287);
+ if (isSetSplits())
+ hashCode = hashCode * 8191 + splits.hashCode();
- boolean present_numEntries = true;
- list.add(present_numEntries);
- if (present_numEntries)
- list.add(numEntries);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(numEntries);
- boolean present_ingestRate = true;
- list.add(present_ingestRate);
- if (present_ingestRate)
- list.add(ingestRate);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(ingestRate);
- boolean present_queryRate = true;
- list.add(present_queryRate);
- if (present_queryRate)
- list.add(queryRate);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryRate);
- boolean present_splitCreationTime = true;
- list.add(present_splitCreationTime);
- if (present_splitCreationTime)
- list.add(splitCreationTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(splitCreationTime);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -714,7 +670,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -724,7 +680,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMajors()).compareTo(other.isSetMajors());
+ lastComparison = java.lang.Boolean.valueOf(isSetMajors()).compareTo(other.isSetMajors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -734,7 +690,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMinors()).compareTo(other.isSetMinors());
+ lastComparison = java.lang.Boolean.valueOf(isSetMinors()).compareTo(other.isSetMinors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -744,7 +700,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSplits()).compareTo(other.isSetSplits());
+ lastComparison = java.lang.Boolean.valueOf(isSetSplits()).compareTo(other.isSetSplits());
if (lastComparison != 0) {
return lastComparison;
}
@@ -754,7 +710,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNumEntries()).compareTo(other.isSetNumEntries());
+ lastComparison = java.lang.Boolean.valueOf(isSetNumEntries()).compareTo(other.isSetNumEntries());
if (lastComparison != 0) {
return lastComparison;
}
@@ -764,7 +720,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIngestRate()).compareTo(other.isSetIngestRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetIngestRate()).compareTo(other.isSetIngestRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -774,7 +730,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQueryRate()).compareTo(other.isSetQueryRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueryRate()).compareTo(other.isSetQueryRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -784,7 +740,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSplitCreationTime()).compareTo(other.isSetSplitCreationTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetSplitCreationTime()).compareTo(other.isSetSplitCreationTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -802,16 +758,16 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
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("TabletStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TabletStats(");
boolean first = true;
sb.append("extent:");
@@ -890,7 +846,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -900,13 +856,13 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
}
- private static class TabletStatsStandardSchemeFactory implements SchemeFactory {
+ private static class TabletStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletStatsStandardScheme getScheme() {
return new TabletStatsStandardScheme();
}
}
- private static class TabletStatsStandardScheme extends StandardScheme<TabletStats> {
+ private static class TabletStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TabletStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TabletStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1039,18 +995,18 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
- private static class TabletStatsTupleSchemeFactory implements SchemeFactory {
+ private static class TabletStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletStatsTupleScheme getScheme() {
return new TabletStatsTupleScheme();
}
}
- private static class TabletStatsTupleScheme extends TupleScheme<TabletStats> {
+ private static class TabletStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TabletStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TabletStats 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.isSetExtent()) {
optionals.set(0);
}
@@ -1104,8 +1060,8 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TabletStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(8);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.extent.read(iprot);
@@ -1145,5 +1101,9 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
index 09ef8f8..ce5f1c5 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
@@ -15,52 +15,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class TooManyFilesException extends TException implements org.apache.thrift.TBase<TooManyFilesException, TooManyFilesException._Fields>, java.io.Serializable, Cloneable, Comparable<TooManyFilesException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class TooManyFilesException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TooManyFilesException, TooManyFilesException._Fields>, java.io.Serializable, Cloneable, Comparable<TooManyFilesException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TooManyFilesException");
private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", 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 TooManyFilesExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TooManyFilesExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TooManyFilesExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TooManyFilesExceptionTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
@@ -68,10 +38,10 @@ public class TooManyFilesException extends TException implements org.apache.thri
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXTENT((short)1, "extent");
- 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);
}
}
@@ -94,21 +64,21 @@ public class TooManyFilesException extends TException implements org.apache.thri
*/
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;
}
@@ -117,18 +87,18 @@ public class TooManyFilesException extends TException implements org.apache.thri
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.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TooManyFilesException.class, metaDataMap);
}
@@ -184,7 +154,7 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXTENT:
if (value == null) {
@@ -197,30 +167,30 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXTENT:
return getExtent();
}
- 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 EXTENT:
return isSetExtent();
}
- 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 TooManyFilesException)
@@ -231,6 +201,8 @@ public class TooManyFilesException extends TException implements org.apache.thri
public boolean equals(TooManyFilesException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_extent = true && this.isSetExtent();
boolean that_present_extent = true && that.isSetExtent();
@@ -246,14 +218,13 @@ public class TooManyFilesException extends TException implements org.apache.thri
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class TooManyFilesException extends TException implements org.apache.thri
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
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("TooManyFilesException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TooManyFilesException(");
boolean first = true;
sb.append("extent:");
@@ -321,7 +292,7 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
- 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) {
@@ -329,13 +300,13 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
- private static class TooManyFilesExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TooManyFilesExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TooManyFilesExceptionStandardScheme getScheme() {
return new TooManyFilesExceptionStandardScheme();
}
}
- private static class TooManyFilesExceptionStandardScheme extends StandardScheme<TooManyFilesException> {
+ private static class TooManyFilesExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TooManyFilesException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TooManyFilesException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -382,18 +353,18 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
- private static class TooManyFilesExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TooManyFilesExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TooManyFilesExceptionTupleScheme getScheme() {
return new TooManyFilesExceptionTupleScheme();
}
}
- private static class TooManyFilesExceptionTupleScheme extends TupleScheme<TooManyFilesException> {
+ private static class TooManyFilesExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TooManyFilesException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TooManyFilesException 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.isSetExtent()) {
optionals.set(0);
}
@@ -405,8 +376,8 @@ public class TooManyFilesException extends TException implements org.apache.thri
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TooManyFilesException 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.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.extent.read(iprot);
@@ -415,5 +386,9 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java b/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
index f96b634..4e904c4 100644
--- a/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
@@ -15,53 +15,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.trace.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TInfo");
private static final org.apache.thrift.protocol.TField TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("traceId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField PARENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentId", org.apache.thrift.protocol.TType.I64, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TInfoTupleSchemeFactory();
public long traceId; // required
public long parentId; // required
@@ -71,10 +41,10 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
TRACE_ID((short)1, "traceId"),
PARENT_ID((short)2, "parentId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -131,14 +101,14 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
private static final int __TRACEID_ISSET_ID = 0;
private static final int __PARENTID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("traceId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PARENT_ID, new org.apache.thrift.meta_data.FieldMetaData("parentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TInfo.class, metaDataMap);
}
@@ -188,16 +158,16 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
public void unsetTraceId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
}
/** Returns true if field traceId is set (has been assigned a value) and false otherwise */
public boolean isSetTraceId() {
- return EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
}
public void setTraceIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
}
public long getParentId() {
@@ -211,25 +181,25 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
public void unsetParentId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
}
/** Returns true if field parentId is set (has been assigned a value) and false otherwise */
public boolean isSetParentId() {
- return EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
}
public void setParentIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TRACE_ID:
if (value == null) {
unsetTraceId();
} else {
- setTraceId((Long)value);
+ setTraceId((java.lang.Long)value);
}
break;
@@ -237,14 +207,14 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
if (value == null) {
unsetParentId();
} else {
- setParentId((Long)value);
+ setParentId((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRACE_ID:
return getTraceId();
@@ -253,13 +223,13 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
return getParentId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -268,11 +238,11 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
case PARENT_ID:
return isSetParentId();
}
- 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 TInfo)
@@ -283,6 +253,8 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
public boolean equals(TInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_traceId = true;
boolean that_present_traceId = true;
@@ -307,19 +279,13 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_traceId = true;
- list.add(present_traceId);
- if (present_traceId)
- list.add(traceId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(traceId);
- boolean present_parentId = true;
- list.add(present_parentId);
- if (present_parentId)
- list.add(parentId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(parentId);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -330,7 +296,7 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTraceId()).compareTo(other.isSetTraceId());
+ lastComparison = java.lang.Boolean.valueOf(isSetTraceId()).compareTo(other.isSetTraceId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -340,7 +306,7 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
+ lastComparison = java.lang.Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,16 +324,16 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
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("TInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TInfo(");
boolean first = true;
sb.append("traceId:");
@@ -394,7 +360,7 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -404,13 +370,13 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
}
- private static class TInfoStandardSchemeFactory implements SchemeFactory {
+ private static class TInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInfoStandardScheme getScheme() {
return new TInfoStandardScheme();
}
}
- private static class TInfoStandardScheme extends StandardScheme<TInfo> {
+ private static class TInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -465,18 +431,18 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
- private static class TInfoTupleSchemeFactory implements SchemeFactory {
+ private static class TInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInfoTupleScheme getScheme() {
return new TInfoTupleScheme();
}
}
- private static class TInfoTupleScheme extends TupleScheme<TInfo> {
+ private static class TInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TInfo 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.isSetTraceId()) {
optionals.set(0);
}
@@ -494,8 +460,8 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TInfo 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.traceId = iprot.readI64();
struct.setTraceIdIsSet(true);
@@ -507,5 +473,9 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/AccumuloProxy.cpp
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/AccumuloProxy.cpp b/proxy/src/main/cpp/AccumuloProxy.cpp
index d0add35..dbd45dd 100644
--- a/proxy/src/main/cpp/AccumuloProxy.cpp
+++ b/proxy/src/main/cpp/AccumuloProxy.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/AccumuloProxy.h
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/AccumuloProxy.h b/proxy/src/main/cpp/AccumuloProxy.h
index 429cf55..7dd477b 100644
--- a/proxy/src/main/cpp/AccumuloProxy.h
+++ b/proxy/src/main/cpp/AccumuloProxy.h
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/proxy_constants.cpp
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/proxy_constants.cpp b/proxy/src/main/cpp/proxy_constants.cpp
index d177867..07fb1b8 100644
--- a/proxy/src/main/cpp/proxy_constants.cpp
+++ b/proxy/src/main/cpp/proxy_constants.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/proxy_constants.h
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/proxy_constants.h b/proxy/src/main/cpp/proxy_constants.h
index c2d6fd6..436a732 100644
--- a/proxy/src/main/cpp/proxy_constants.h
+++ b/proxy/src/main/cpp/proxy_constants.h
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/proxy_types.cpp
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/proxy_types.cpp b/proxy/src/main/cpp/proxy_types.cpp
index 09c2d9c..7fb8417 100644
--- a/proxy/src/main/cpp/proxy_types.cpp
+++ b/proxy/src/main/cpp/proxy_types.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/proxy_types.h
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/proxy_types.h b/proxy/src/main/cpp/proxy_types.h
index e5daf2e..0464703 100644
--- a/proxy/src/main/cpp/proxy_types.h
+++ b/proxy/src/main/cpp/proxy_types.h
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -27,6 +27,7 @@
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
+#include <thrift/TBase.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>
@@ -248,7 +249,7 @@ typedef struct _Key__isset {
bool timestamp :1;
} _Key__isset;
-class Key {
+class Key : public virtual ::apache::thrift::TBase {
public:
Key(const Key&);
@@ -321,7 +322,7 @@ typedef struct _ColumnUpdate__isset {
bool deleteCell :1;
} _ColumnUpdate__isset;
-class ColumnUpdate {
+class ColumnUpdate : public virtual ::apache::thrift::TBase {
public:
ColumnUpdate(const ColumnUpdate&);
@@ -401,7 +402,7 @@ typedef struct _DiskUsage__isset {
bool usage :1;
} _DiskUsage__isset;
-class DiskUsage {
+class DiskUsage : public virtual ::apache::thrift::TBase {
public:
DiskUsage(const DiskUsage&);
@@ -453,7 +454,7 @@ typedef struct _KeyValue__isset {
bool value :1;
} _KeyValue__isset;
-class KeyValue {
+class KeyValue : public virtual ::apache::thrift::TBase {
public:
KeyValue(const KeyValue&);
@@ -505,7 +506,7 @@ typedef struct _ScanResult__isset {
bool more :1;
} _ScanResult__isset;
-class ScanResult {
+class ScanResult : public virtual ::apache::thrift::TBase {
public:
ScanResult(const ScanResult&);
@@ -559,7 +560,7 @@ typedef struct _Range__isset {
bool stopInclusive :1;
} _Range__isset;
-class Range {
+class Range : public virtual ::apache::thrift::TBase {
public:
Range(const Range&);
@@ -621,7 +622,7 @@ typedef struct _ScanColumn__isset {
bool colQualifier :1;
} _ScanColumn__isset;
-class ScanColumn {
+class ScanColumn : public virtual ::apache::thrift::TBase {
public:
ScanColumn(const ScanColumn&);
@@ -677,7 +678,7 @@ typedef struct _IteratorSetting__isset {
bool properties :1;
} _IteratorSetting__isset;
-class IteratorSetting {
+class IteratorSetting : public virtual ::apache::thrift::TBase {
public:
IteratorSetting(const IteratorSetting&);
@@ -742,7 +743,7 @@ typedef struct _ScanOptions__isset {
bool bufferSize :1;
} _ScanOptions__isset;
-class ScanOptions {
+class ScanOptions : public virtual ::apache::thrift::TBase {
public:
ScanOptions(const ScanOptions&);
@@ -822,7 +823,7 @@ typedef struct _BatchScanOptions__isset {
bool threads :1;
} _BatchScanOptions__isset;
-class BatchScanOptions {
+class BatchScanOptions : public virtual ::apache::thrift::TBase {
public:
BatchScanOptions(const BatchScanOptions&);
@@ -899,7 +900,7 @@ typedef struct _KeyValueAndPeek__isset {
bool hasNext :1;
} _KeyValueAndPeek__isset;
-class KeyValueAndPeek {
+class KeyValueAndPeek : public virtual ::apache::thrift::TBase {
public:
KeyValueAndPeek(const KeyValueAndPeek&);
@@ -952,7 +953,7 @@ typedef struct _KeyExtent__isset {
bool prevEndRow :1;
} _KeyExtent__isset;
-class KeyExtent {
+class KeyExtent : public virtual ::apache::thrift::TBase {
public:
KeyExtent(const KeyExtent&);
@@ -1010,7 +1011,7 @@ typedef struct _Column__isset {
bool colVisibility :1;
} _Column__isset;
-class Column {
+class Column : public virtual ::apache::thrift::TBase {
public:
Column(const Column&);
@@ -1069,7 +1070,7 @@ typedef struct _Condition__isset {
bool iterators :1;
} _Condition__isset;
-class Condition {
+class Condition : public virtual ::apache::thrift::TBase {
public:
Condition(const Condition&);
@@ -1137,7 +1138,7 @@ typedef struct _ConditionalUpdates__isset {
bool updates :1;
} _ConditionalUpdates__isset;
-class ConditionalUpdates {
+class ConditionalUpdates : public virtual ::apache::thrift::TBase {
public:
ConditionalUpdates(const ConditionalUpdates&);
@@ -1192,7 +1193,7 @@ typedef struct _ConditionalWriterOptions__isset {
bool durability :1;
} _ConditionalWriterOptions__isset;
-class ConditionalWriterOptions {
+class ConditionalWriterOptions : public virtual ::apache::thrift::TBase {
public:
ConditionalWriterOptions(const ConditionalWriterOptions&);
@@ -1278,7 +1279,7 @@ typedef struct _ActiveScan__isset {
bool authorizations :1;
} _ActiveScan__isset;
-class ActiveScan {
+class ActiveScan : public virtual ::apache::thrift::TBase {
public:
ActiveScan(const ActiveScan&);
@@ -1383,7 +1384,7 @@ typedef struct _ActiveCompaction__isset {
bool iterators :1;
} _ActiveCompaction__isset;
-class ActiveCompaction {
+class ActiveCompaction : public virtual ::apache::thrift::TBase {
public:
ActiveCompaction(const ActiveCompaction&);
@@ -1478,7 +1479,7 @@ typedef struct _WriterOptions__isset {
bool durability :1;
} _WriterOptions__isset;
-class WriterOptions {
+class WriterOptions : public virtual ::apache::thrift::TBase {
public:
WriterOptions(const WriterOptions&);
@@ -1547,7 +1548,7 @@ typedef struct _CompactionStrategyConfig__isset {
bool options :1;
} _CompactionStrategyConfig__isset;
-class CompactionStrategyConfig {
+class CompactionStrategyConfig : public virtual ::apache::thrift::TBase {
public:
CompactionStrategyConfig(const CompactionStrategyConfig&);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
index 76dd4bc..2292638 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class AccumuloException extends TException implements org.apache.thrift.TBase<AccumuloException, AccumuloException._Fields>, java.io.Serializable, Cloneable, Comparable<AccumuloException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class AccumuloException extends org.apache.thrift.TException implements org.apache.thrift.TBase<AccumuloException, AccumuloException._Fields>, java.io.Serializable, Cloneable, Comparable<AccumuloException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AccumuloException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AccumuloExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AccumuloExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AccumuloExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AccumuloExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class AccumuloException extends TException implements org.apache.thrift.T
*/
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;
}
@@ -117,18 +87,18 @@ public class AccumuloException extends TException implements org.apache.thrift.T
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AccumuloException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
public AccumuloException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class AccumuloException extends TException implements org.apache.thrift.T
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public AccumuloException setMsg(String msg) {
+ public AccumuloException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof AccumuloException)
@@ -231,6 +201,8 @@ public class AccumuloException extends TException implements org.apache.thrift.T
public boolean equals(AccumuloException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class AccumuloException extends TException implements org.apache.thrift.T
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class AccumuloException extends TException implements org.apache.thrift.T
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
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("AccumuloException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("AccumuloException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
}
- 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) {
@@ -326,13 +297,13 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
}
- private static class AccumuloExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class AccumuloExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AccumuloExceptionStandardScheme getScheme() {
return new AccumuloExceptionStandardScheme();
}
}
- private static class AccumuloExceptionStandardScheme extends StandardScheme<AccumuloException> {
+ private static class AccumuloExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<AccumuloException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, AccumuloException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
- private static class AccumuloExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class AccumuloExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AccumuloExceptionTupleScheme getScheme() {
return new AccumuloExceptionTupleScheme();
}
}
- private static class AccumuloExceptionTupleScheme extends TupleScheme<AccumuloException> {
+ private static class AccumuloExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<AccumuloException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AccumuloException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class AccumuloException extends TException implements org.apache.thrift.T
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, AccumuloException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[35/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
index eba7661..fe918ff 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult, MultiScanResult._Fields>, java.io.Serializable, Cloneable, Comparable<MultiScanResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MultiScanResult");
@@ -62,15 +35,12 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
private static final org.apache.thrift.protocol.TField PART_NEXT_KEY_INCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("partNextKeyInclusive", org.apache.thrift.protocol.TType.BOOL, (short)6);
private static final org.apache.thrift.protocol.TField MORE_FIELD_DESC = new org.apache.thrift.protocol.TField("more", org.apache.thrift.protocol.TType.BOOL, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new MultiScanResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new MultiScanResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MultiScanResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MultiScanResultTupleSchemeFactory();
- public List<TKeyValue> results; // required
- public Map<TKeyExtent,List<TRange>> failures; // required
- public List<TKeyExtent> fullScans; // required
+ public java.util.List<TKeyValue> results; // required
+ public java.util.Map<TKeyExtent,java.util.List<TRange>> failures; // required
+ public java.util.List<TKeyExtent> fullScans; // required
public TKeyExtent partScan; // required
public TKey partNextKey; // required
public boolean partNextKeyInclusive; // required
@@ -86,10 +56,10 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
PART_NEXT_KEY_INCLUSIVE((short)6, "partNextKeyInclusive"),
MORE((short)7, "more");
- 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);
}
}
@@ -124,21 +94,21 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
*/
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;
}
@@ -147,7 +117,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -156,9 +126,9 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
private static final int __PARTNEXTKEYINCLUSIVE_ISSET_ID = 0;
private static final int __MORE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RESULTS, new org.apache.thrift.meta_data.FieldMetaData("results", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyValue.class))));
@@ -175,7 +145,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.MORE, new org.apache.thrift.meta_data.FieldMetaData("more", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MultiScanResult.class, metaDataMap);
}
@@ -183,9 +153,9 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
public MultiScanResult(
- List<TKeyValue> results,
- Map<TKeyExtent,List<TRange>> failures,
- List<TKeyExtent> fullScans,
+ java.util.List<TKeyValue> results,
+ java.util.Map<TKeyExtent,java.util.List<TRange>> failures,
+ java.util.List<TKeyExtent> fullScans,
TKeyExtent partScan,
TKey partNextKey,
boolean partNextKeyInclusive,
@@ -209,17 +179,32 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
public MultiScanResult(MultiScanResult other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetResults()) {
- List<TKeyValue> __this__results = new ArrayList<TKeyValue>(other.results.size());
+ java.util.List<TKeyValue> __this__results = new java.util.ArrayList<TKeyValue>(other.results.size());
for (TKeyValue other_element : other.results) {
__this__results.add(new TKeyValue(other_element));
}
this.results = __this__results;
}
if (other.isSetFailures()) {
- this.failures = other.failures;
+ java.util.Map<TKeyExtent,java.util.List<TRange>> __this__failures = new java.util.HashMap<TKeyExtent,java.util.List<TRange>>(other.failures.size());
+ for (java.util.Map.Entry<TKeyExtent, java.util.List<TRange>> other_element : other.failures.entrySet()) {
+
+ TKeyExtent other_element_key = other_element.getKey();
+ java.util.List<TRange> other_element_value = other_element.getValue();
+
+ TKeyExtent __this__failures_copy_key = new TKeyExtent(other_element_key);
+
+ java.util.List<TRange> __this__failures_copy_value = new java.util.ArrayList<TRange>(other_element_value.size());
+ for (TRange other_element_value_element : other_element_value) {
+ __this__failures_copy_value.add(new TRange(other_element_value_element));
+ }
+
+ __this__failures.put(__this__failures_copy_key, __this__failures_copy_value);
+ }
+ this.failures = __this__failures;
}
if (other.isSetFullScans()) {
- List<TKeyExtent> __this__fullScans = new ArrayList<TKeyExtent>(other.fullScans.size());
+ java.util.List<TKeyExtent> __this__fullScans = new java.util.ArrayList<TKeyExtent>(other.fullScans.size());
for (TKeyExtent other_element : other.fullScans) {
__this__fullScans.add(new TKeyExtent(other_element));
}
@@ -262,16 +247,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
public void addToResults(TKeyValue elem) {
if (this.results == null) {
- this.results = new ArrayList<TKeyValue>();
+ this.results = new java.util.ArrayList<TKeyValue>();
}
this.results.add(elem);
}
- public List<TKeyValue> getResults() {
+ public java.util.List<TKeyValue> getResults() {
return this.results;
}
- public MultiScanResult setResults(List<TKeyValue> results) {
+ public MultiScanResult setResults(java.util.List<TKeyValue> results) {
this.results = results;
return this;
}
@@ -295,18 +280,18 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return (this.failures == null) ? 0 : this.failures.size();
}
- public void putToFailures(TKeyExtent key, List<TRange> val) {
+ public void putToFailures(TKeyExtent key, java.util.List<TRange> val) {
if (this.failures == null) {
- this.failures = new HashMap<TKeyExtent,List<TRange>>();
+ this.failures = new java.util.HashMap<TKeyExtent,java.util.List<TRange>>();
}
this.failures.put(key, val);
}
- public Map<TKeyExtent,List<TRange>> getFailures() {
+ public java.util.Map<TKeyExtent,java.util.List<TRange>> getFailures() {
return this.failures;
}
- public MultiScanResult setFailures(Map<TKeyExtent,List<TRange>> failures) {
+ public MultiScanResult setFailures(java.util.Map<TKeyExtent,java.util.List<TRange>> failures) {
this.failures = failures;
return this;
}
@@ -336,16 +321,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
public void addToFullScans(TKeyExtent elem) {
if (this.fullScans == null) {
- this.fullScans = new ArrayList<TKeyExtent>();
+ this.fullScans = new java.util.ArrayList<TKeyExtent>();
}
this.fullScans.add(elem);
}
- public List<TKeyExtent> getFullScans() {
+ public java.util.List<TKeyExtent> getFullScans() {
return this.fullScans;
}
- public MultiScanResult setFullScans(List<TKeyExtent> fullScans) {
+ public MultiScanResult setFullScans(java.util.List<TKeyExtent> fullScans) {
this.fullScans = fullScans;
return this;
}
@@ -424,16 +409,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
public void unsetPartNextKeyInclusive() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
}
/** Returns true if field partNextKeyInclusive is set (has been assigned a value) and false otherwise */
public boolean isSetPartNextKeyInclusive() {
- return EncodingUtils.testBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
}
public void setPartNextKeyInclusiveIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID, value);
}
public boolean isMore() {
@@ -447,25 +432,25 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
public void unsetMore() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
}
/** Returns true if field more is set (has been assigned a value) and false otherwise */
public boolean isSetMore() {
- return EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
}
public void setMoreIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case RESULTS:
if (value == null) {
unsetResults();
} else {
- setResults((List<TKeyValue>)value);
+ setResults((java.util.List<TKeyValue>)value);
}
break;
@@ -473,7 +458,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (value == null) {
unsetFailures();
} else {
- setFailures((Map<TKeyExtent,List<TRange>>)value);
+ setFailures((java.util.Map<TKeyExtent,java.util.List<TRange>>)value);
}
break;
@@ -481,7 +466,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (value == null) {
unsetFullScans();
} else {
- setFullScans((List<TKeyExtent>)value);
+ setFullScans((java.util.List<TKeyExtent>)value);
}
break;
@@ -505,7 +490,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (value == null) {
unsetPartNextKeyInclusive();
} else {
- setPartNextKeyInclusive((Boolean)value);
+ setPartNextKeyInclusive((java.lang.Boolean)value);
}
break;
@@ -513,14 +498,14 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (value == null) {
unsetMore();
} else {
- setMore((Boolean)value);
+ setMore((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RESULTS:
return getResults();
@@ -544,13 +529,13 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return isMore();
}
- 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) {
@@ -569,11 +554,11 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
case MORE:
return isSetMore();
}
- 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 MultiScanResult)
@@ -584,6 +569,8 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
public boolean equals(MultiScanResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_results = true && this.isSetResults();
boolean that_present_results = true && that.isSetResults();
@@ -653,44 +640,33 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_results = true && (isSetResults());
- list.add(present_results);
- if (present_results)
- list.add(results);
+ hashCode = hashCode * 8191 + ((isSetResults()) ? 131071 : 524287);
+ if (isSetResults())
+ hashCode = hashCode * 8191 + results.hashCode();
- boolean present_failures = true && (isSetFailures());
- list.add(present_failures);
- if (present_failures)
- list.add(failures);
+ hashCode = hashCode * 8191 + ((isSetFailures()) ? 131071 : 524287);
+ if (isSetFailures())
+ hashCode = hashCode * 8191 + failures.hashCode();
- boolean present_fullScans = true && (isSetFullScans());
- list.add(present_fullScans);
- if (present_fullScans)
- list.add(fullScans);
+ hashCode = hashCode * 8191 + ((isSetFullScans()) ? 131071 : 524287);
+ if (isSetFullScans())
+ hashCode = hashCode * 8191 + fullScans.hashCode();
- boolean present_partScan = true && (isSetPartScan());
- list.add(present_partScan);
- if (present_partScan)
- list.add(partScan);
+ hashCode = hashCode * 8191 + ((isSetPartScan()) ? 131071 : 524287);
+ if (isSetPartScan())
+ hashCode = hashCode * 8191 + partScan.hashCode();
- boolean present_partNextKey = true && (isSetPartNextKey());
- list.add(present_partNextKey);
- if (present_partNextKey)
- list.add(partNextKey);
+ hashCode = hashCode * 8191 + ((isSetPartNextKey()) ? 131071 : 524287);
+ if (isSetPartNextKey())
+ hashCode = hashCode * 8191 + partNextKey.hashCode();
- boolean present_partNextKeyInclusive = true;
- list.add(present_partNextKeyInclusive);
- if (present_partNextKeyInclusive)
- list.add(partNextKeyInclusive);
+ hashCode = hashCode * 8191 + ((partNextKeyInclusive) ? 131071 : 524287);
- boolean present_more = true;
- list.add(present_more);
- if (present_more)
- list.add(more);
+ hashCode = hashCode * 8191 + ((more) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -701,7 +677,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
+ lastComparison = java.lang.Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
if (lastComparison != 0) {
return lastComparison;
}
@@ -711,7 +687,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailures()).compareTo(other.isSetFailures());
+ lastComparison = java.lang.Boolean.valueOf(isSetFailures()).compareTo(other.isSetFailures());
if (lastComparison != 0) {
return lastComparison;
}
@@ -721,7 +697,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFullScans()).compareTo(other.isSetFullScans());
+ lastComparison = java.lang.Boolean.valueOf(isSetFullScans()).compareTo(other.isSetFullScans());
if (lastComparison != 0) {
return lastComparison;
}
@@ -731,7 +707,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPartScan()).compareTo(other.isSetPartScan());
+ lastComparison = java.lang.Boolean.valueOf(isSetPartScan()).compareTo(other.isSetPartScan());
if (lastComparison != 0) {
return lastComparison;
}
@@ -741,7 +717,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPartNextKey()).compareTo(other.isSetPartNextKey());
+ lastComparison = java.lang.Boolean.valueOf(isSetPartNextKey()).compareTo(other.isSetPartNextKey());
if (lastComparison != 0) {
return lastComparison;
}
@@ -751,7 +727,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPartNextKeyInclusive()).compareTo(other.isSetPartNextKeyInclusive());
+ lastComparison = java.lang.Boolean.valueOf(isSetPartNextKeyInclusive()).compareTo(other.isSetPartNextKeyInclusive());
if (lastComparison != 0) {
return lastComparison;
}
@@ -761,7 +737,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
+ lastComparison = java.lang.Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
if (lastComparison != 0) {
return lastComparison;
}
@@ -779,16 +755,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
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("MultiScanResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("MultiScanResult(");
boolean first = true;
sb.append("results:");
@@ -861,7 +837,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -871,13 +847,13 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
}
- private static class MultiScanResultStandardSchemeFactory implements SchemeFactory {
+ private static class MultiScanResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MultiScanResultStandardScheme getScheme() {
return new MultiScanResultStandardScheme();
}
}
- private static class MultiScanResultStandardScheme extends StandardScheme<MultiScanResult> {
+ private static class MultiScanResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<MultiScanResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, MultiScanResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -893,7 +869,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
- struct.results = new ArrayList<TKeyValue>(_list24.size);
+ struct.results = new java.util.ArrayList<TKeyValue>(_list24.size);
TKeyValue _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
@@ -912,16 +888,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map27 = iprot.readMapBegin();
- struct.failures = new HashMap<TKeyExtent,List<TRange>>(2*_map27.size);
+ struct.failures = new java.util.HashMap<TKeyExtent,java.util.List<TRange>>(2*_map27.size);
TKeyExtent _key28;
- List<TRange> _val29;
+ java.util.List<TRange> _val29;
for (int _i30 = 0; _i30 < _map27.size; ++_i30)
{
_key28 = new TKeyExtent();
_key28.read(iprot);
{
org.apache.thrift.protocol.TList _list31 = iprot.readListBegin();
- _val29 = new ArrayList<TRange>(_list31.size);
+ _val29 = new java.util.ArrayList<TRange>(_list31.size);
TRange _elem32;
for (int _i33 = 0; _i33 < _list31.size; ++_i33)
{
@@ -944,7 +920,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
- struct.fullScans = new ArrayList<TKeyExtent>(_list34.size);
+ struct.fullScans = new java.util.ArrayList<TKeyExtent>(_list34.size);
TKeyExtent _elem35;
for (int _i36 = 0; _i36 < _list34.size; ++_i36)
{
@@ -1024,7 +1000,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
oprot.writeFieldBegin(FAILURES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.LIST, struct.failures.size()));
- for (Map.Entry<TKeyExtent, List<TRange>> _iter38 : struct.failures.entrySet())
+ for (java.util.Map.Entry<TKeyExtent, java.util.List<TRange>> _iter38 : struct.failures.entrySet())
{
_iter38.getKey().write(oprot);
{
@@ -1074,18 +1050,18 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
- private static class MultiScanResultTupleSchemeFactory implements SchemeFactory {
+ private static class MultiScanResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MultiScanResultTupleScheme getScheme() {
return new MultiScanResultTupleScheme();
}
}
- private static class MultiScanResultTupleScheme extends TupleScheme<MultiScanResult> {
+ private static class MultiScanResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<MultiScanResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MultiScanResult 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.isSetResults()) {
optionals.set(0);
}
@@ -1120,7 +1096,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (struct.isSetFailures()) {
{
oprot.writeI32(struct.failures.size());
- for (Map.Entry<TKeyExtent, List<TRange>> _iter42 : struct.failures.entrySet())
+ for (java.util.Map.Entry<TKeyExtent, java.util.List<TRange>> _iter42 : struct.failures.entrySet())
{
_iter42.getKey().write(oprot);
{
@@ -1158,12 +1134,12 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MultiScanResult struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.results = new ArrayList<TKeyValue>(_list45.size);
+ struct.results = new java.util.ArrayList<TKeyValue>(_list45.size);
TKeyValue _elem46;
for (int _i47 = 0; _i47 < _list45.size; ++_i47)
{
@@ -1177,16 +1153,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map48 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
- struct.failures = new HashMap<TKeyExtent,List<TRange>>(2*_map48.size);
+ struct.failures = new java.util.HashMap<TKeyExtent,java.util.List<TRange>>(2*_map48.size);
TKeyExtent _key49;
- List<TRange> _val50;
+ java.util.List<TRange> _val50;
for (int _i51 = 0; _i51 < _map48.size; ++_i51)
{
_key49 = new TKeyExtent();
_key49.read(iprot);
{
org.apache.thrift.protocol.TList _list52 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- _val50 = new ArrayList<TRange>(_list52.size);
+ _val50 = new java.util.ArrayList<TRange>(_list52.size);
TRange _elem53;
for (int _i54 = 0; _i54 < _list52.size; ++_i54)
{
@@ -1203,7 +1179,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.fullScans = new ArrayList<TKeyExtent>(_list55.size);
+ struct.fullScans = new java.util.ArrayList<TKeyExtent>(_list55.size);
TKeyExtent _elem56;
for (int _i57 = 0; _i57 < _list55.size; ++_i57)
{
@@ -1235,5 +1211,9 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
index d147578..2241aec 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
@@ -15,55 +15,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResult._Fields>, java.io.Serializable, Cloneable, Comparable<ScanResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ScanResult");
private static final org.apache.thrift.protocol.TField RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("results", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField MORE_FIELD_DESC = new org.apache.thrift.protocol.TField("more", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ScanResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ScanResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ScanResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ScanResultTupleSchemeFactory();
- public List<TKeyValue> results; // required
+ public java.util.List<TKeyValue> results; // required
public boolean more; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -71,10 +41,10 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
RESULTS((short)1, "results"),
MORE((short)2, "more");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,15 +100,15 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
// isset id assignments
private static final int __MORE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RESULTS, new org.apache.thrift.meta_data.FieldMetaData("results", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyValue.class))));
tmpMap.put(_Fields.MORE, new org.apache.thrift.meta_data.FieldMetaData("more", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ScanResult.class, metaDataMap);
}
@@ -146,7 +116,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
public ScanResult(
- List<TKeyValue> results,
+ java.util.List<TKeyValue> results,
boolean more)
{
this();
@@ -161,7 +131,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public ScanResult(ScanResult other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetResults()) {
- List<TKeyValue> __this__results = new ArrayList<TKeyValue>(other.results.size());
+ java.util.List<TKeyValue> __this__results = new java.util.ArrayList<TKeyValue>(other.results.size());
for (TKeyValue other_element : other.results) {
__this__results.add(new TKeyValue(other_element));
}
@@ -191,16 +161,16 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public void addToResults(TKeyValue elem) {
if (this.results == null) {
- this.results = new ArrayList<TKeyValue>();
+ this.results = new java.util.ArrayList<TKeyValue>();
}
this.results.add(elem);
}
- public List<TKeyValue> getResults() {
+ public java.util.List<TKeyValue> getResults() {
return this.results;
}
- public ScanResult setResults(List<TKeyValue> results) {
+ public ScanResult setResults(java.util.List<TKeyValue> results) {
this.results = results;
return this;
}
@@ -231,25 +201,25 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
public void unsetMore() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
}
/** Returns true if field more is set (has been assigned a value) and false otherwise */
public boolean isSetMore() {
- return EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
}
public void setMoreIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case RESULTS:
if (value == null) {
unsetResults();
} else {
- setResults((List<TKeyValue>)value);
+ setResults((java.util.List<TKeyValue>)value);
}
break;
@@ -257,14 +227,14 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
if (value == null) {
unsetMore();
} else {
- setMore((Boolean)value);
+ setMore((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RESULTS:
return getResults();
@@ -273,13 +243,13 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return isMore();
}
- 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) {
@@ -288,11 +258,11 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
case MORE:
return isSetMore();
}
- 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 ScanResult)
@@ -303,6 +273,8 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public boolean equals(ScanResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_results = true && this.isSetResults();
boolean that_present_results = true && that.isSetResults();
@@ -327,19 +299,15 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_results = true && (isSetResults());
- list.add(present_results);
- if (present_results)
- list.add(results);
+ hashCode = hashCode * 8191 + ((isSetResults()) ? 131071 : 524287);
+ if (isSetResults())
+ hashCode = hashCode * 8191 + results.hashCode();
- boolean present_more = true;
- list.add(present_more);
- if (present_more)
- list.add(more);
+ hashCode = hashCode * 8191 + ((more) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -350,7 +318,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
+ lastComparison = java.lang.Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
if (lastComparison != 0) {
return lastComparison;
}
@@ -360,7 +328,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
+ lastComparison = java.lang.Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
if (lastComparison != 0) {
return lastComparison;
}
@@ -378,16 +346,16 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
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("ScanResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ScanResult(");
boolean first = true;
sb.append("results:");
@@ -418,7 +386,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -428,13 +396,13 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
- private static class ScanResultStandardSchemeFactory implements SchemeFactory {
+ private static class ScanResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanResultStandardScheme getScheme() {
return new ScanResultStandardScheme();
}
}
- private static class ScanResultStandardScheme extends StandardScheme<ScanResult> {
+ private static class ScanResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<ScanResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ScanResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -450,7 +418,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.results = new ArrayList<TKeyValue>(_list16.size);
+ struct.results = new java.util.ArrayList<TKeyValue>(_list16.size);
TKeyValue _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
@@ -509,18 +477,18 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
- private static class ScanResultTupleSchemeFactory implements SchemeFactory {
+ private static class ScanResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanResultTupleScheme getScheme() {
return new ScanResultTupleScheme();
}
}
- private static class ScanResultTupleScheme extends TupleScheme<ScanResult> {
+ private static class ScanResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<ScanResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ScanResult 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.isSetResults()) {
optionals.set(0);
}
@@ -544,12 +512,12 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ScanResult 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)) {
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.results = new ArrayList<TKeyValue>(_list21.size);
+ struct.results = new java.util.ArrayList<TKeyValue>(_list21.size);
TKeyValue _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
@@ -567,5 +535,9 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java
index 40ba6b1..086cb40 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java
@@ -15,53 +15,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._Fields>, java.io.Serializable, Cloneable, Comparable<TCMResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCMResult");
private static final org.apache.thrift.protocol.TField CMID_FIELD_DESC = new org.apache.thrift.protocol.TField("cmid", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TCMResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TCMResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCMResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCMResultTupleSchemeFactory();
public long cmid; // required
/**
@@ -79,10 +49,10 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
*/
STATUS((short)2, "status");
- 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);
}
}
@@ -107,21 +77,21 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
*/
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;
}
@@ -130,7 +100,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -138,14 +108,14 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
// isset id assignments
private static final int __CMID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CMID, new org.apache.thrift.meta_data.FieldMetaData("cmid", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCMStatus.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCMResult.class, metaDataMap);
}
@@ -195,16 +165,16 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
public void unsetCmid() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CMID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CMID_ISSET_ID);
}
/** Returns true if field cmid is set (has been assigned a value) and false otherwise */
public boolean isSetCmid() {
- return EncodingUtils.testBit(__isset_bitfield, __CMID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CMID_ISSET_ID);
}
public void setCmidIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CMID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CMID_ISSET_ID, value);
}
/**
@@ -239,13 +209,13 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CMID:
if (value == null) {
unsetCmid();
} else {
- setCmid((Long)value);
+ setCmid((java.lang.Long)value);
}
break;
@@ -260,7 +230,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CMID:
return getCmid();
@@ -269,13 +239,13 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
return getStatus();
}
- 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) {
@@ -284,11 +254,11 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
case STATUS:
return isSetStatus();
}
- 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 TCMResult)
@@ -299,6 +269,8 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
public boolean equals(TCMResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_cmid = true;
boolean that_present_cmid = true;
@@ -323,19 +295,15 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_cmid = true;
- list.add(present_cmid);
- if (present_cmid)
- list.add(cmid);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(cmid);
- boolean present_status = true && (isSetStatus());
- list.add(present_status);
- if (present_status)
- list.add(status.getValue());
+ hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
+ if (isSetStatus())
+ hashCode = hashCode * 8191 + status.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -346,7 +314,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetCmid()).compareTo(other.isSetCmid());
+ lastComparison = java.lang.Boolean.valueOf(isSetCmid()).compareTo(other.isSetCmid());
if (lastComparison != 0) {
return lastComparison;
}
@@ -356,7 +324,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
+ lastComparison = java.lang.Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
@@ -374,16 +342,16 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
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("TCMResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TCMResult(");
boolean first = true;
sb.append("cmid:");
@@ -414,7 +382,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -424,13 +392,13 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
- private static class TCMResultStandardSchemeFactory implements SchemeFactory {
+ private static class TCMResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCMResultStandardScheme getScheme() {
return new TCMResultStandardScheme();
}
}
- private static class TCMResultStandardScheme extends StandardScheme<TCMResult> {
+ private static class TCMResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCMResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCMResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -487,18 +455,18 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
- private static class TCMResultTupleSchemeFactory implements SchemeFactory {
+ private static class TCMResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCMResultTupleScheme getScheme() {
return new TCMResultTupleScheme();
}
}
- private static class TCMResultTupleScheme extends TupleScheme<TCMResult> {
+ private static class TCMResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCMResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCMResult 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.isSetCmid()) {
optionals.set(0);
}
@@ -516,8 +484,8 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCMResult 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.cmid = iprot.readI64();
struct.setCmidIsSet(true);
@@ -529,5 +497,9 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java
index 6cbe5af..70137af 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.data.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TCMStatus implements org.apache.thrift.TEnum {
+public enum TCMStatus implements org.apache.thrift.TEnum {
ACCEPTED(0),
REJECTED(1),
VIOLATED(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
index 839d801..a3027be 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields>, java.io.Serializable, Cloneable, Comparable<TColumn> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn");
@@ -58,15 +31,12 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
private static final org.apache.thrift.protocol.TField COLUMN_QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("columnQualifier", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField COLUMN_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("columnVisibility", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TColumnStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TColumnTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnTupleSchemeFactory();
- public ByteBuffer columnFamily; // required
- public ByteBuffer columnQualifier; // required
- public ByteBuffer columnVisibility; // required
+ public java.nio.ByteBuffer columnFamily; // required
+ public java.nio.ByteBuffer columnQualifier; // required
+ public java.nio.ByteBuffer columnVisibility; // 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 {
@@ -74,10 +44,10 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
COLUMN_QUALIFIER((short)2, "columnQualifier"),
COLUMN_VISIBILITY((short)3, "columnVisibility");
- 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);
}
}
@@ -104,21 +74,21 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
*/
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;
}
@@ -127,22 +97,22 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
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.COLUMN_FAMILY, new org.apache.thrift.meta_data.FieldMetaData("columnFamily", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMN_QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("columnQualifier", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMN_VISIBILITY, new org.apache.thrift.meta_data.FieldMetaData("columnVisibility", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumn.class, metaDataMap);
}
@@ -150,9 +120,9 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
public TColumn(
- ByteBuffer columnFamily,
- ByteBuffer columnQualifier,
- ByteBuffer columnVisibility)
+ java.nio.ByteBuffer columnFamily,
+ java.nio.ByteBuffer columnQualifier,
+ java.nio.ByteBuffer columnVisibility)
{
this();
this.columnFamily = org.apache.thrift.TBaseHelper.copyBinary(columnFamily);
@@ -191,16 +161,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return columnFamily == null ? null : columnFamily.array();
}
- public ByteBuffer bufferForColumnFamily() {
+ public java.nio.ByteBuffer bufferForColumnFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(columnFamily);
}
public TColumn setColumnFamily(byte[] columnFamily) {
- this.columnFamily = columnFamily == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(columnFamily, columnFamily.length));
+ this.columnFamily = columnFamily == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(columnFamily.clone());
return this;
}
- public TColumn setColumnFamily(ByteBuffer columnFamily) {
+ public TColumn setColumnFamily(java.nio.ByteBuffer columnFamily) {
this.columnFamily = org.apache.thrift.TBaseHelper.copyBinary(columnFamily);
return this;
}
@@ -225,16 +195,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return columnQualifier == null ? null : columnQualifier.array();
}
- public ByteBuffer bufferForColumnQualifier() {
+ public java.nio.ByteBuffer bufferForColumnQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(columnQualifier);
}
public TColumn setColumnQualifier(byte[] columnQualifier) {
- this.columnQualifier = columnQualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(columnQualifier, columnQualifier.length));
+ this.columnQualifier = columnQualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(columnQualifier.clone());
return this;
}
- public TColumn setColumnQualifier(ByteBuffer columnQualifier) {
+ public TColumn setColumnQualifier(java.nio.ByteBuffer columnQualifier) {
this.columnQualifier = org.apache.thrift.TBaseHelper.copyBinary(columnQualifier);
return this;
}
@@ -259,16 +229,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return columnVisibility == null ? null : columnVisibility.array();
}
- public ByteBuffer bufferForColumnVisibility() {
+ public java.nio.ByteBuffer bufferForColumnVisibility() {
return org.apache.thrift.TBaseHelper.copyBinary(columnVisibility);
}
public TColumn setColumnVisibility(byte[] columnVisibility) {
- this.columnVisibility = columnVisibility == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(columnVisibility, columnVisibility.length));
+ this.columnVisibility = columnVisibility == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(columnVisibility.clone());
return this;
}
- public TColumn setColumnVisibility(ByteBuffer columnVisibility) {
+ public TColumn setColumnVisibility(java.nio.ByteBuffer columnVisibility) {
this.columnVisibility = org.apache.thrift.TBaseHelper.copyBinary(columnVisibility);
return this;
}
@@ -288,13 +258,17 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COLUMN_FAMILY:
if (value == null) {
unsetColumnFamily();
} else {
- setColumnFamily((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColumnFamily((byte[])value);
+ } else {
+ setColumnFamily((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -302,7 +276,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
if (value == null) {
unsetColumnQualifier();
} else {
- setColumnQualifier((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColumnQualifier((byte[])value);
+ } else {
+ setColumnQualifier((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -310,14 +288,18 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
if (value == null) {
unsetColumnVisibility();
} else {
- setColumnVisibility((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColumnVisibility((byte[])value);
+ } else {
+ setColumnVisibility((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COLUMN_FAMILY:
return getColumnFamily();
@@ -329,13 +311,13 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return getColumnVisibility();
}
- 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) {
@@ -346,11 +328,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
case COLUMN_VISIBILITY:
return isSetColumnVisibility();
}
- 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 TColumn)
@@ -361,6 +343,8 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
public boolean equals(TColumn that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_columnFamily = true && this.isSetColumnFamily();
boolean that_present_columnFamily = true && that.isSetColumnFamily();
@@ -394,24 +378,21 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_columnFamily = true && (isSetColumnFamily());
- list.add(present_columnFamily);
- if (present_columnFamily)
- list.add(columnFamily);
+ hashCode = hashCode * 8191 + ((isSetColumnFamily()) ? 131071 : 524287);
+ if (isSetColumnFamily())
+ hashCode = hashCode * 8191 + columnFamily.hashCode();
- boolean present_columnQualifier = true && (isSetColumnQualifier());
- list.add(present_columnQualifier);
- if (present_columnQualifier)
- list.add(columnQualifier);
+ hashCode = hashCode * 8191 + ((isSetColumnQualifier()) ? 131071 : 524287);
+ if (isSetColumnQualifier())
+ hashCode = hashCode * 8191 + columnQualifier.hashCode();
- boolean present_columnVisibility = true && (isSetColumnVisibility());
- list.add(present_columnVisibility);
- if (present_columnVisibility)
- list.add(columnVisibility);
+ hashCode = hashCode * 8191 + ((isSetColumnVisibility()) ? 131071 : 524287);
+ if (isSetColumnVisibility())
+ hashCode = hashCode * 8191 + columnVisibility.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -422,7 +403,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetColumnFamily()).compareTo(other.isSetColumnFamily());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumnFamily()).compareTo(other.isSetColumnFamily());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,7 +413,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumnQualifier()).compareTo(other.isSetColumnQualifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumnQualifier()).compareTo(other.isSetColumnQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -442,7 +423,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumnVisibility()).compareTo(other.isSetColumnVisibility());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumnVisibility()).compareTo(other.isSetColumnVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@@ -460,16 +441,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
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("TColumn(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TColumn(");
boolean first = true;
sb.append("columnFamily:");
@@ -512,7 +493,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
- 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) {
@@ -520,13 +501,13 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
- private static class TColumnStandardSchemeFactory implements SchemeFactory {
+ private static class TColumnStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnStandardScheme getScheme() {
return new TColumnStandardScheme();
}
}
- private static class TColumnStandardScheme extends StandardScheme<TColumn> {
+ private static class TColumnStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumn> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TColumn struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -598,18 +579,18 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
- private static class TColumnTupleSchemeFactory implements SchemeFactory {
+ private static class TColumnTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnTupleScheme getScheme() {
return new TColumnTupleScheme();
}
}
- private static class TColumnTupleScheme extends TupleScheme<TColumn> {
+ private static class TColumnTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumn> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TColumn 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.isSetColumnFamily()) {
optionals.set(0);
}
@@ -633,8 +614,8 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumn 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.columnFamily = iprot.readBinary();
struct.setColumnFamilyIsSet(true);
@@ -650,5 +631,9 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[23/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java
index 8403b56..5fddb64 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationServicer.java
@@ -15,61 +15,34 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.replication.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ReplicationServicer {
public interface Iface {
- public long replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException;
+ public long replicateLog(java.lang.String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException;
- public long replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException;
+ public long replicateKeyValues(java.lang.String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void replicateLog(java.lang.String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
- public void replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void replicateKeyValues(java.lang.String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -89,13 +62,13 @@ public class ReplicationServicer {
super(iprot, oprot);
}
- public long replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException
+ public long replicateLog(java.lang.String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException
{
send_replicateLog(remoteTableId, data, credentials);
return recv_replicateLog();
}
- public void send_replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
+ public void send_replicateLog(java.lang.String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
{
replicateLog_args args = new replicateLog_args();
args.setRemoteTableId(remoteTableId);
@@ -117,13 +90,13 @@ public class ReplicationServicer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "replicateLog failed: unknown result");
}
- public long replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException
+ public long replicateKeyValues(java.lang.String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws RemoteReplicationException, org.apache.thrift.TException
{
send_replicateKeyValues(remoteTableId, data, credentials);
return recv_replicateKeyValues();
}
- public void send_replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
+ public void send_replicateKeyValues(java.lang.String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
{
replicateKeyValues_args args = new replicateKeyValues_args();
args.setRemoteTableId(remoteTableId);
@@ -163,18 +136,18 @@ public class ReplicationServicer {
super(protocolFactory, clientManager, transport);
}
- public void replicateLog(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void replicateLog(java.lang.String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
replicateLog_call method_call = new replicateLog_call(remoteTableId, data, credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class replicateLog_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String remoteTableId;
+ public static class replicateLog_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
+ private java.lang.String remoteTableId;
private WalEdits data;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public replicateLog_call(String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, 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 replicateLog_call(java.lang.String remoteTableId, WalEdits data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.remoteTableId = remoteTableId;
this.data = data;
@@ -191,9 +164,9 @@ public class ReplicationServicer {
prot.writeMessageEnd();
}
- public long getResult() throws RemoteReplicationException, org.apache.thrift.TException {
+ public java.lang.Long getResult() throws RemoteReplicationException, 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);
@@ -201,18 +174,18 @@ public class ReplicationServicer {
}
}
- public void replicateKeyValues(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void replicateKeyValues(java.lang.String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
replicateKeyValues_call method_call = new replicateKeyValues_call(remoteTableId, data, credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class replicateKeyValues_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String remoteTableId;
+ public static class replicateKeyValues_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
+ private java.lang.String remoteTableId;
private KeyValues data;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public replicateKeyValues_call(String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, 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 replicateKeyValues_call(java.lang.String remoteTableId, KeyValues data, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.remoteTableId = remoteTableId;
this.data = data;
@@ -229,9 +202,9 @@ public class ReplicationServicer {
prot.writeMessageEnd();
}
- public long getResult() throws RemoteReplicationException, org.apache.thrift.TException {
+ public java.lang.Long getResult() throws RemoteReplicationException, 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);
@@ -242,16 +215,16 @@ public class ReplicationServicer {
}
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("replicateLog", new replicateLog());
processMap.put("replicateKeyValues", new replicateKeyValues());
return processMap;
@@ -310,22 +283,22 @@ public class ReplicationServicer {
}
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("replicateLog", new replicateLog());
processMap.put("replicateKeyValues", new replicateKeyValues());
return processMap;
}
- public static class replicateLog<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, replicateLog_args, Long> {
+ public static class replicateLog<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, replicateLog_args, java.lang.Long> {
public replicateLog() {
super("replicateLog");
}
@@ -334,42 +307,50 @@ public class ReplicationServicer {
return new replicateLog_args();
}
- public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Long>() {
- public void onComplete(Long o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() {
+ public void onComplete(java.lang.Long o) {
replicateLog_result result = new replicateLog_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
replicateLog_result result = new replicateLog_result();
if (e instanceof RemoteReplicationException) {
- result.e = (RemoteReplicationException) e;
- result.setEIsSet(true);
- msg = result;
- }
- else
- {
+ result.e = (RemoteReplicationException) e;
+ result.setEIsSet(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();
}
};
}
@@ -378,12 +359,12 @@ public class ReplicationServicer {
return false;
}
- public void start(I iface, replicateLog_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
+ public void start(I iface, replicateLog_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
iface.replicateLog(args.remoteTableId, args.data, args.credentials,resultHandler);
}
}
- public static class replicateKeyValues<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, replicateKeyValues_args, Long> {
+ public static class replicateKeyValues<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, replicateKeyValues_args, java.lang.Long> {
public replicateKeyValues() {
super("replicateKeyValues");
}
@@ -392,42 +373,50 @@ public class ReplicationServicer {
return new replicateKeyValues_args();
}
- public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Long>() {
- public void onComplete(Long o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() {
+ public void onComplete(java.lang.Long o) {
replicateKeyValues_result result = new replicateKeyValues_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
replicateKeyValues_result result = new replicateKeyValues_result();
if (e instanceof RemoteReplicationException) {
- result.e = (RemoteReplicationException) e;
- result.setEIsSet(true);
- msg = result;
- }
- else
- {
+ result.e = (RemoteReplicationException) e;
+ result.setEIsSet(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();
}
};
}
@@ -436,7 +425,7 @@ public class ReplicationServicer {
return false;
}
- public void start(I iface, replicateKeyValues_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
+ public void start(I iface, replicateKeyValues_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
iface.replicateKeyValues(args.remoteTableId, args.data, args.credentials,resultHandler);
}
}
@@ -450,13 +439,10 @@ public class ReplicationServicer {
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new replicateLog_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new replicateLog_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new replicateLog_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new replicateLog_argsTupleSchemeFactory();
- public String remoteTableId; // required
+ public java.lang.String remoteTableId; // required
public WalEdits data; // required
public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required
@@ -466,10 +452,10 @@ public class ReplicationServicer {
DATA((short)2, "data"),
CREDENTIALS((short)3, "credentials");
- 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);
}
}
@@ -496,21 +482,21 @@ public class ReplicationServicer {
*/
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;
}
@@ -519,22 +505,22 @@ public class ReplicationServicer {
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.REMOTE_TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("remoteTableId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WalEdits.class)));
tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.security.thrift.TCredentials.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(replicateLog_args.class, metaDataMap);
}
@@ -542,7 +528,7 @@ public class ReplicationServicer {
}
public replicateLog_args(
- String remoteTableId,
+ java.lang.String remoteTableId,
WalEdits data,
org.apache.accumulo.core.security.thrift.TCredentials credentials)
{
@@ -578,11 +564,11 @@ public class ReplicationServicer {
this.credentials = null;
}
- public String getRemoteTableId() {
+ public java.lang.String getRemoteTableId() {
return this.remoteTableId;
}
- public replicateLog_args setRemoteTableId(String remoteTableId) {
+ public replicateLog_args setRemoteTableId(java.lang.String remoteTableId) {
this.remoteTableId = remoteTableId;
return this;
}
@@ -650,13 +636,13 @@ public class ReplicationServicer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case REMOTE_TABLE_ID:
if (value == null) {
unsetRemoteTableId();
} else {
- setRemoteTableId((String)value);
+ setRemoteTableId((java.lang.String)value);
}
break;
@@ -679,7 +665,7 @@ public class ReplicationServicer {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case REMOTE_TABLE_ID:
return getRemoteTableId();
@@ -691,13 +677,13 @@ public class ReplicationServicer {
return getCredentials();
}
- 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) {
@@ -708,11 +694,11 @@ public class ReplicationServicer {
case CREDENTIALS:
return isSetCredentials();
}
- 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 replicateLog_args)
@@ -723,6 +709,8 @@ public class ReplicationServicer {
public boolean equals(replicateLog_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_remoteTableId = true && this.isSetRemoteTableId();
boolean that_present_remoteTableId = true && that.isSetRemoteTableId();
@@ -756,24 +744,21 @@ public class ReplicationServicer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_remoteTableId = true && (isSetRemoteTableId());
- list.add(present_remoteTableId);
- if (present_remoteTableId)
- list.add(remoteTableId);
+ hashCode = hashCode * 8191 + ((isSetRemoteTableId()) ? 131071 : 524287);
+ if (isSetRemoteTableId())
+ hashCode = hashCode * 8191 + remoteTableId.hashCode();
- boolean present_data = true && (isSetData());
- list.add(present_data);
- if (present_data)
- list.add(data);
+ hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
+ if (isSetData())
+ hashCode = hashCode * 8191 + data.hashCode();
- boolean present_credentials = true && (isSetCredentials());
- list.add(present_credentials);
- if (present_credentials)
- list.add(credentials);
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -784,7 +769,7 @@ public class ReplicationServicer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRemoteTableId()).compareTo(other.isSetRemoteTableId());
+ lastComparison = java.lang.Boolean.valueOf(isSetRemoteTableId()).compareTo(other.isSetRemoteTableId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -794,7 +779,7 @@ public class ReplicationServicer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData());
+ lastComparison = java.lang.Boolean.valueOf(isSetData()).compareTo(other.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
@@ -804,7 +789,7 @@ public class ReplicationServicer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
+ lastComparison = java.lang.Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
if (lastComparison != 0) {
return lastComparison;
}
@@ -822,16 +807,16 @@ public class ReplicationServicer {
}
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("replicateLog_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("replicateLog_args(");
boolean first = true;
sb.append("remoteTableId:");
@@ -880,7 +865,7 @@ public class ReplicationServicer {
}
}
- 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) {
@@ -888,13 +873,13 @@ public class ReplicationServicer {
}
}
- private static class replicateLog_argsStandardSchemeFactory implements SchemeFactory {
+ private static class replicateLog_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public replicateLog_argsStandardScheme getScheme() {
return new replicateLog_argsStandardScheme();
}
}
- private static class replicateLog_argsStandardScheme extends StandardScheme<replicateLog_args> {
+ private static class replicateLog_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<replicateLog_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, replicateLog_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -968,18 +953,18 @@ public class ReplicationServicer {
}
- private static class replicateLog_argsTupleSchemeFactory implements SchemeFactory {
+ private static class replicateLog_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public replicateLog_argsTupleScheme getScheme() {
return new replicateLog_argsTupleScheme();
}
}
- private static class replicateLog_argsTupleScheme extends TupleScheme<replicateLog_args> {
+ private static class replicateLog_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<replicateLog_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, replicateLog_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.isSetRemoteTableId()) {
optionals.set(0);
}
@@ -1003,8 +988,8 @@ public class ReplicationServicer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, replicateLog_args 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.remoteTableId = iprot.readString();
struct.setRemoteTableIdIsSet(true);
@@ -1022,6 +1007,9 @@ public class ReplicationServicer {
}
}
+ 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 replicateLog_result implements org.apache.thrift.TBase<replicateLog_result, replicateLog_result._Fields>, java.io.Serializable, Cloneable, Comparable<replicateLog_result> {
@@ -1030,11 +1018,8 @@ public class ReplicationServicer {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new replicateLog_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new replicateLog_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new replicateLog_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new replicateLog_resultTupleSchemeFactory();
public long success; // required
public RemoteReplicationException e; // required
@@ -1044,10 +1029,10 @@ public class ReplicationServicer {
SUCCESS((short)0, "success"),
E((short)1, "e");
- 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);
}
}
@@ -1072,21 +1057,21 @@ public class ReplicationServicer {
*/
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;
}
@@ -1095,7 +1080,7 @@ public class ReplicationServicer {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -1103,14 +1088,14 @@ public class ReplicationServicer {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
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)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RemoteReplicationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(replicateLog_result.class, metaDataMap);
}
@@ -1160,16 +1145,16 @@ public class ReplicationServicer {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public RemoteReplicationException getE() {
@@ -1196,13 +1181,13 @@ public class ReplicationServicer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Long)value);
+ setSuccess((java.lang.Long)value);
}
break;
@@ -1217,7 +1202,7 @@ public class ReplicationServicer {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -1226,13 +1211,13 @@ public class ReplicationServicer {
return getE();
}
- 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) {
@@ -1241,11 +1226,11 @@ public class ReplicationServicer {
case E:
return isSetE();
}
- 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 replicateLog_result)
@@ -1256,6 +1241,8 @@ public class ReplicationServicer {
public boolean equals(replicateLog_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -1280,19 +1267,15 @@ public class ReplicationServicer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
- boolean present_e = true && (isSetE());
- list.add(present_e);
- if (present_e)
- list.add(e);
+ hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287);
+ if (isSetE())
+ hashCode = hashCode * 8191 + e.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1303,7 +1286,7 @@ public class ReplicationServicer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1313,7 +1296,7 @@ public class ReplicationServicer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
+ lastComparison = java.lang.Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1331,16 +1314,16 @@ public class ReplicationServicer {
}
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("replicateLog_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("replicateLog_result(");
boolean first = true;
sb.append("success:");
@@ -1371,7 +1354,7 @@ public class ReplicationServicer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1381,13 +1364,13 @@ public class ReplicationServicer {
}
}
- private static class replicateLog_resultStandardSchemeFactory implements SchemeFactory {
+ private static class replicateLog_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public replicateLog_resultStandardScheme getScheme() {
return new replicateLog_resultStandardScheme();
}
}
- private static class replicateLog_resultStandardScheme extends StandardScheme<replicateLog_result> {
+ private static class replicateLog_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<replicateLog_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, replicateLog_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1447,18 +1430,18 @@ public class ReplicationServicer {
}
- private static class replicateLog_resultTupleSchemeFactory implements SchemeFactory {
+ private static class replicateLog_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public replicateLog_resultTupleScheme getScheme() {
return new replicateLog_resultTupleScheme();
}
}
- private static class replicateLog_resultTupleScheme extends TupleScheme<replicateLog_result> {
+ private static class replicateLog_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<replicateLog_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, replicateLog_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -1476,8 +1459,8 @@ public class ReplicationServicer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, replicateLog_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 = iprot.readI64();
struct.setSuccessIsSet(true);
@@ -1490,6 +1473,9 @@ public class ReplicationServicer {
}
}
+ 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 replicateKeyValues_args implements org.apache.thrift.TBase<replicateKeyValues_args, replicateKeyValues_args._Fields>, java.io.Serializable, Cloneable, Comparable<replicateKeyValues_args> {
@@ -1499,13 +1485,10 @@ public class ReplicationServicer {
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new replicateKeyValues_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new replicateKeyValues_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new replicateKeyValues_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new replicateKeyValues_argsTupleSchemeFactory();
- public String remoteTableId; // required
+ public java.lang.String remoteTableId; // required
public KeyValues data; // required
public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required
@@ -1515,10 +1498,10 @@ public class ReplicationServicer {
DATA((short)2, "data"),
CREDENTIALS((short)3, "credentials");
- 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);
}
}
@@ -1545,21 +1528,21 @@ public class ReplicationServicer {
*/
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;
}
@@ -1568,22 +1551,22 @@ public class ReplicationServicer {
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.REMOTE_TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("remoteTableId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeyValues.class)));
tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.security.thrift.TCredentials.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(replicateKeyValues_args.class, metaDataMap);
}
@@ -1591,7 +1574,7 @@ public class ReplicationServicer {
}
public replicateKeyValues_args(
- String remoteTableId,
+ java.lang.String remoteTableId,
KeyValues data,
org.apache.accumulo.core.security.thrift.TCredentials credentials)
{
@@ -1627,11 +1610,11 @@ public class ReplicationServicer {
this.credentials = null;
}
- public String getRemoteTableId() {
+ public java.lang.String getRemoteTableId() {
return this.remoteTableId;
}
- public replicateKeyValues_args setRemoteTableId(String remoteTableId) {
+ public replicateKeyValues_args setRemoteTableId(java.lang.String remoteTableId) {
this.remoteTableId = remoteTableId;
return this;
}
@@ -1699,13 +1682,13 @@ public class ReplicationServicer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case REMOTE_TABLE_ID:
if (value == null) {
unsetRemoteTableId();
} else {
- setRemoteTableId((String)value);
+ setRemoteTableId((java.lang.String)value);
}
break;
@@ -1728,7 +1711,7 @@ public class ReplicationServicer {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case REMOTE_TABLE_ID:
return getRemoteTableId();
@@ -1740,13 +1723,13 @@ public class ReplicationServicer {
return getCredentials();
}
- 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) {
@@ -1757,11 +1740,11 @@ public class ReplicationServicer {
case CREDENTIALS:
return isSetCredentials();
}
- 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 replicateKeyValues_args)
@@ -1772,6 +1755,8 @@ public class ReplicationServicer {
public boolean equals(replicateKeyValues_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_remoteTableId = true && this.isSetRemoteTableId();
boolean that_present_remoteTableId = true && that.isSetRemoteTableId();
@@ -1805,24 +1790,21 @@ public class ReplicationServicer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_remoteTableId = true && (isSetRemoteTableId());
- list.add(present_remoteTableId);
- if (present_remoteTableId)
- list.add(remoteTableId);
+ hashCode = hashCode * 8191 + ((isSetRemoteTableId()) ? 131071 : 524287);
+ if (isSetRemoteTableId())
+ hashCode = hashCode * 8191 + remoteTableId.hashCode();
- boolean present_data = true && (isSetData());
- list.add(present_data);
- if (present_data)
- list.add(data);
+ hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
+ if (isSetData())
+ hashCode = hashCode * 8191 + data.hashCode();
- boolean present_credentials = true && (isSetCredentials());
- list.add(present_credentials);
- if (present_credentials)
- list.add(credentials);
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1833,7 +1815,7 @@ public class ReplicationServicer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRemoteTableId()).compareTo(other.isSetRemoteTableId());
+ lastComparison = java.lang.Boolean.valueOf(isSetRemoteTableId()).compareTo(other.isSetRemoteTableId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1843,7 +1825,7 @@ public class ReplicationServicer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData());
+ lastComparison = java.lang.Boolean.valueOf(isSetData()).compareTo(other.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1853,7 +1835,7 @@ public class ReplicationServicer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
+ lastComparison = java.lang.Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1871,16 +1853,16 @@ public class ReplicationServicer {
}
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("replicateKeyValues_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("replicateKeyValues_args(");
boolean first = true;
sb.append("remoteTableId:");
@@ -1929,7 +1911,7 @@ public class ReplicationServicer {
}
}
- 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) {
@@ -1937,13 +1919,13 @@ public class ReplicationServicer {
}
}
- private static class replicateKeyValues_argsStandardSchemeFactory implements SchemeFactory {
+ private static class replicateKeyValues_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public replicateKeyValues_argsStandardScheme getScheme() {
return new replicateKeyValues_argsStandardScheme();
}
}
- private static class replicateKeyValues_argsStandardScheme extends StandardScheme<replicateKeyValues_args> {
+ private static class replicateKeyValues_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<replicateKeyValues_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, replicateKeyValues_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -2017,18 +1999,18 @@ public class ReplicationServicer {
}
- private static class replicateKeyValues_argsTupleSchemeFactory implements SchemeFactory {
+ private static class replicateKeyValues_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public replicateKeyValues_argsTupleScheme getScheme() {
return new replicateKeyValues_argsTupleScheme();
}
}
- private static class replicateKeyValues_argsTupleScheme extends TupleScheme<replicateKeyValues_args> {
+ private static class replicateKeyValues_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<replicateKeyValues_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, replicateKeyValues_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.isSetRemoteTableId()) {
optionals.set(0);
}
@@ -2052,8 +2034,8 @@ public class ReplicationServicer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, replicateKeyValues_args 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.remoteTableId = iprot.readString();
struct.setRemoteTableIdIsSet(true);
@@ -2071,6 +2053,9 @@ public class ReplicationServicer {
}
}
+ 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 replicateKeyValues_result implements org.apache.thrift.TBase<replicateKeyValues_result, replicateKeyValues_result._Fields>, java.io.Serializable, Cloneable, Comparable<replicateKeyValues_result> {
@@ -2079,11 +2064,8 @@ public class ReplicationServicer {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new replicateKeyValues_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new replicateKeyValues_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new replicateKeyValues_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new replicateKeyValues_resultTupleSchemeFactory();
public long success; // required
public RemoteReplicationException e; // required
@@ -2093,10 +2075,10 @@ public class ReplicationServicer {
SUCCESS((short)0, "success"),
E((short)1, "e");
- 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);
}
}
@@ -2121,21 +2103,21 @@ public class ReplicationServicer {
*/
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;
}
@@ -2144,7 +2126,7 @@ public class ReplicationServicer {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -2152,14 +2134,14 @@ public class ReplicationServicer {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
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)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RemoteReplicationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(replicateKeyValues_result.class, metaDataMap);
}
@@ -2209,16 +2191,16 @@ public class ReplicationServicer {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public RemoteReplicationException getE() {
@@ -2245,13 +2227,13 @@ public class ReplicationServicer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Long)value);
+ setSuccess((java.lang.Long)value);
}
break;
@@ -2266,7 +2248,7 @@ public class ReplicationServicer {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -2275,13 +2257,13 @@ public class ReplicationServicer {
return getE();
}
- 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) {
@@ -2290,11 +2272,11 @@ public class ReplicationServicer {
case E:
return isSetE();
}
- 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 replicateKeyValues_result)
@@ -2305,6 +2287,8 @@ public class ReplicationServicer {
public boolean equals(replicateKeyValues_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -2329,19 +2313,15 @@ public class ReplicationServicer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
- boolean present_e = true && (isSetE());
- list.add(present_e);
- if (present_e)
- list.add(e);
+ hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287);
+ if (isSetE())
+ hashCode = hashCode * 8191 + e.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -2352,7 +2332,7 @@ public class ReplicationServicer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2362,7 +2342,7 @@ public class ReplicationServicer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
+ lastComparison = java.lang.Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2380,16 +2360,16 @@ public class ReplicationServicer {
}
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("replicateKeyValues_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("replicateKeyValues_result(");
boolean first = true;
sb.append("success:");
@@ -2420,7 +2400,7 @@ public class ReplicationServicer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -2430,13 +2410,13 @@ public class ReplicationServicer {
}
}
- private static class replicateKeyValues_resultStandardSchemeFactory implements SchemeFactory {
+ private static class replicateKeyValues_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public replicateKeyValues_resultStandardScheme getScheme() {
return new replicateKeyValues_resultStandardScheme();
}
}
- private static class replicateKeyValues_resultStandardScheme extends StandardScheme<replicateKeyValues_result> {
+ private static class replicateKeyValues_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<replicateKeyValues_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, replicateKeyValues_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -2496,18 +2476,18 @@ public class ReplicationServicer {
}
- private static class replicateKeyValues_resultTupleSchemeFactory implements SchemeFactory {
+ private static class replicateKeyValues_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public replicateKeyValues_resultTupleScheme getScheme() {
return new replicateKeyValues_resultTupleScheme();
}
}
- private static class replicateKeyValues_resultTupleScheme extends TupleScheme<replicateKeyValues_result> {
+ private static class replicateKeyValues_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<replicateKeyValues_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, replicateKeyValues_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -2525,8 +2505,8 @@ public class ReplicationServicer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, replicateKeyValues_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 = iprot.readI64();
struct.setSuccessIsSet(true);
@@ -2539,6 +2519,10 @@ public class ReplicationServicer {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
+ private static void unusedMethod() {}
}
[20/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveCompaction.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveCompaction.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveCompaction.java
index 4c0decc..fa9dbd4 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveCompaction.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveCompaction.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompaction, ActiveCompaction._Fields>, java.io.Serializable, Cloneable, Comparable<ActiveCompaction> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ActiveCompaction");
@@ -66,16 +39,13 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
private static final org.apache.thrift.protocol.TField SSI_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("ssiList", org.apache.thrift.protocol.TType.LIST, (short)10);
private static final org.apache.thrift.protocol.TField SSIO_FIELD_DESC = new org.apache.thrift.protocol.TField("ssio", org.apache.thrift.protocol.TType.MAP, (short)11);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ActiveCompactionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ActiveCompactionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ActiveCompactionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ActiveCompactionTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
public long age; // required
- public List<String> inputFiles; // required
- public String outputFile; // required
+ public java.util.List<java.lang.String> inputFiles; // required
+ public java.lang.String outputFile; // required
/**
*
* @see CompactionType
@@ -86,11 +56,11 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
* @see CompactionReason
*/
public CompactionReason reason; // required
- public String localityGroup; // required
+ public java.lang.String localityGroup; // required
public long entriesRead; // required
public long entriesWritten; // required
- public List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList; // required
- public Map<String,Map<String,String>> ssio; // required
+ public java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList; // required
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio; // 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 {
@@ -114,10 +84,10 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
SSI_LIST((short)10, "ssiList"),
SSIO((short)11, "ssio");
- 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);
}
}
@@ -160,21 +130,21 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
*/
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;
}
@@ -183,7 +153,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -193,9 +163,9 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
private static final int __ENTRIESREAD_ISSET_ID = 1;
private static final int __ENTRIESWRITTEN_ISSET_ID = 2;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
tmpMap.put(_Fields.AGE, new org.apache.thrift.meta_data.FieldMetaData("age", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -224,7 +194,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ActiveCompaction.class, metaDataMap);
}
@@ -234,15 +204,15 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
public ActiveCompaction(
org.apache.accumulo.core.data.thrift.TKeyExtent extent,
long age,
- List<String> inputFiles,
- String outputFile,
+ java.util.List<java.lang.String> inputFiles,
+ java.lang.String outputFile,
CompactionType type,
CompactionReason reason,
- String localityGroup,
+ java.lang.String localityGroup,
long entriesRead,
long entriesWritten,
- List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList,
- Map<String,Map<String,String>> ssio)
+ java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList,
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio)
{
this();
this.extent = extent;
@@ -271,7 +241,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
this.age = other.age;
if (other.isSetInputFiles()) {
- List<String> __this__inputFiles = new ArrayList<String>(other.inputFiles);
+ java.util.List<java.lang.String> __this__inputFiles = new java.util.ArrayList<java.lang.String>(other.inputFiles);
this.inputFiles = __this__inputFiles;
}
if (other.isSetOutputFile()) {
@@ -289,22 +259,22 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
this.entriesRead = other.entriesRead;
this.entriesWritten = other.entriesWritten;
if (other.isSetSsiList()) {
- List<org.apache.accumulo.core.data.thrift.IterInfo> __this__ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(other.ssiList.size());
+ java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> __this__ssiList = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(other.ssiList.size());
for (org.apache.accumulo.core.data.thrift.IterInfo other_element : other.ssiList) {
__this__ssiList.add(new org.apache.accumulo.core.data.thrift.IterInfo(other_element));
}
this.ssiList = __this__ssiList;
}
if (other.isSetSsio()) {
- Map<String,Map<String,String>> __this__ssio = new HashMap<String,Map<String,String>>(other.ssio.size());
- for (Map.Entry<String, Map<String,String>> other_element : other.ssio.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> __this__ssio = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>(other.ssio.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.String>> other_element : other.ssio.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<String,String> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<java.lang.String,java.lang.String> other_element_value = other_element.getValue();
- String __this__ssio_copy_key = other_element_key;
+ java.lang.String __this__ssio_copy_key = other_element_key;
- Map<String,String> __this__ssio_copy_value = new HashMap<String,String>(other_element_value);
+ java.util.Map<java.lang.String,java.lang.String> __this__ssio_copy_value = new java.util.HashMap<java.lang.String,java.lang.String>(other_element_value);
__this__ssio.put(__this__ssio_copy_key, __this__ssio_copy_value);
}
@@ -369,38 +339,38 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
public void unsetAge() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
}
/** Returns true if field age is set (has been assigned a value) and false otherwise */
public boolean isSetAge() {
- return EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
}
public void setAgeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
}
public int getInputFilesSize() {
return (this.inputFiles == null) ? 0 : this.inputFiles.size();
}
- public java.util.Iterator<String> getInputFilesIterator() {
+ public java.util.Iterator<java.lang.String> getInputFilesIterator() {
return (this.inputFiles == null) ? null : this.inputFiles.iterator();
}
- public void addToInputFiles(String elem) {
+ public void addToInputFiles(java.lang.String elem) {
if (this.inputFiles == null) {
- this.inputFiles = new ArrayList<String>();
+ this.inputFiles = new java.util.ArrayList<java.lang.String>();
}
this.inputFiles.add(elem);
}
- public List<String> getInputFiles() {
+ public java.util.List<java.lang.String> getInputFiles() {
return this.inputFiles;
}
- public ActiveCompaction setInputFiles(List<String> inputFiles) {
+ public ActiveCompaction setInputFiles(java.util.List<java.lang.String> inputFiles) {
this.inputFiles = inputFiles;
return this;
}
@@ -420,11 +390,11 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- public String getOutputFile() {
+ public java.lang.String getOutputFile() {
return this.outputFile;
}
- public ActiveCompaction setOutputFile(String outputFile) {
+ public ActiveCompaction setOutputFile(java.lang.String outputFile) {
this.outputFile = outputFile;
return this;
}
@@ -508,11 +478,11 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- public String getLocalityGroup() {
+ public java.lang.String getLocalityGroup() {
return this.localityGroup;
}
- public ActiveCompaction setLocalityGroup(String localityGroup) {
+ public ActiveCompaction setLocalityGroup(java.lang.String localityGroup) {
this.localityGroup = localityGroup;
return this;
}
@@ -543,16 +513,16 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
public void unsetEntriesRead() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID);
}
/** Returns true if field entriesRead is set (has been assigned a value) and false otherwise */
public boolean isSetEntriesRead() {
- return EncodingUtils.testBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID);
}
public void setEntriesReadIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID, value);
}
public long getEntriesWritten() {
@@ -566,16 +536,16 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
public void unsetEntriesWritten() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID);
}
/** Returns true if field entriesWritten is set (has been assigned a value) and false otherwise */
public boolean isSetEntriesWritten() {
- return EncodingUtils.testBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID);
}
public void setEntriesWrittenIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID, value);
}
public int getSsiListSize() {
@@ -588,16 +558,16 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
public void addToSsiList(org.apache.accumulo.core.data.thrift.IterInfo elem) {
if (this.ssiList == null) {
- this.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>();
+ this.ssiList = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>();
}
this.ssiList.add(elem);
}
- public List<org.apache.accumulo.core.data.thrift.IterInfo> getSsiList() {
+ public java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> getSsiList() {
return this.ssiList;
}
- public ActiveCompaction setSsiList(List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList) {
+ public ActiveCompaction setSsiList(java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList) {
this.ssiList = ssiList;
return this;
}
@@ -621,18 +591,18 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return (this.ssio == null) ? 0 : this.ssio.size();
}
- public void putToSsio(String key, Map<String,String> val) {
+ public void putToSsio(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> val) {
if (this.ssio == null) {
- this.ssio = new HashMap<String,Map<String,String>>();
+ this.ssio = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>();
}
this.ssio.put(key, val);
}
- public Map<String,Map<String,String>> getSsio() {
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getSsio() {
return this.ssio;
}
- public ActiveCompaction setSsio(Map<String,Map<String,String>> ssio) {
+ public ActiveCompaction setSsio(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio) {
this.ssio = ssio;
return this;
}
@@ -652,7 +622,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXTENT:
if (value == null) {
@@ -666,7 +636,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetAge();
} else {
- setAge((Long)value);
+ setAge((java.lang.Long)value);
}
break;
@@ -674,7 +644,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetInputFiles();
} else {
- setInputFiles((List<String>)value);
+ setInputFiles((java.util.List<java.lang.String>)value);
}
break;
@@ -682,7 +652,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetOutputFile();
} else {
- setOutputFile((String)value);
+ setOutputFile((java.lang.String)value);
}
break;
@@ -706,7 +676,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetLocalityGroup();
} else {
- setLocalityGroup((String)value);
+ setLocalityGroup((java.lang.String)value);
}
break;
@@ -714,7 +684,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetEntriesRead();
} else {
- setEntriesRead((Long)value);
+ setEntriesRead((java.lang.Long)value);
}
break;
@@ -722,7 +692,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetEntriesWritten();
} else {
- setEntriesWritten((Long)value);
+ setEntriesWritten((java.lang.Long)value);
}
break;
@@ -730,7 +700,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetSsiList();
} else {
- setSsiList((List<org.apache.accumulo.core.data.thrift.IterInfo>)value);
+ setSsiList((java.util.List<org.apache.accumulo.core.data.thrift.IterInfo>)value);
}
break;
@@ -738,14 +708,14 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetSsio();
} else {
- setSsio((Map<String,Map<String,String>>)value);
+ setSsio((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXTENT:
return getExtent();
@@ -781,13 +751,13 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return getSsio();
}
- 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) {
@@ -814,11 +784,11 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
case SSIO:
return isSetSsio();
}
- 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 ActiveCompaction)
@@ -829,6 +799,8 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
public boolean equals(ActiveCompaction that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_extent = true && this.isSetExtent();
boolean that_present_extent = true && that.isSetExtent();
@@ -934,64 +906,47 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
-
- boolean present_age = true;
- list.add(present_age);
- if (present_age)
- list.add(age);
-
- boolean present_inputFiles = true && (isSetInputFiles());
- list.add(present_inputFiles);
- if (present_inputFiles)
- list.add(inputFiles);
-
- boolean present_outputFile = true && (isSetOutputFile());
- list.add(present_outputFile);
- if (present_outputFile)
- list.add(outputFile);
-
- boolean present_type = true && (isSetType());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
-
- boolean present_reason = true && (isSetReason());
- list.add(present_reason);
- if (present_reason)
- list.add(reason.getValue());
-
- boolean present_localityGroup = true && (isSetLocalityGroup());
- list.add(present_localityGroup);
- if (present_localityGroup)
- list.add(localityGroup);
-
- boolean present_entriesRead = true;
- list.add(present_entriesRead);
- if (present_entriesRead)
- list.add(entriesRead);
-
- boolean present_entriesWritten = true;
- list.add(present_entriesWritten);
- if (present_entriesWritten)
- list.add(entriesWritten);
-
- boolean present_ssiList = true && (isSetSsiList());
- list.add(present_ssiList);
- if (present_ssiList)
- list.add(ssiList);
-
- boolean present_ssio = true && (isSetSsio());
- list.add(present_ssio);
- if (present_ssio)
- list.add(ssio);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(age);
+
+ hashCode = hashCode * 8191 + ((isSetInputFiles()) ? 131071 : 524287);
+ if (isSetInputFiles())
+ hashCode = hashCode * 8191 + inputFiles.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetOutputFile()) ? 131071 : 524287);
+ if (isSetOutputFile())
+ hashCode = hashCode * 8191 + outputFile.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
+ if (isSetType())
+ hashCode = hashCode * 8191 + type.getValue();
+
+ hashCode = hashCode * 8191 + ((isSetReason()) ? 131071 : 524287);
+ if (isSetReason())
+ hashCode = hashCode * 8191 + reason.getValue();
+
+ hashCode = hashCode * 8191 + ((isSetLocalityGroup()) ? 131071 : 524287);
+ if (isSetLocalityGroup())
+ hashCode = hashCode * 8191 + localityGroup.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(entriesRead);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(entriesWritten);
+
+ hashCode = hashCode * 8191 + ((isSetSsiList()) ? 131071 : 524287);
+ if (isSetSsiList())
+ hashCode = hashCode * 8191 + ssiList.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetSsio()) ? 131071 : 524287);
+ if (isSetSsio())
+ hashCode = hashCode * 8191 + ssio.hashCode();
+
+ return hashCode;
}
@Override
@@ -1002,7 +957,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1012,7 +967,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
+ lastComparison = java.lang.Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1022,7 +977,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetInputFiles()).compareTo(other.isSetInputFiles());
+ lastComparison = java.lang.Boolean.valueOf(isSetInputFiles()).compareTo(other.isSetInputFiles());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1032,7 +987,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOutputFile()).compareTo(other.isSetOutputFile());
+ lastComparison = java.lang.Boolean.valueOf(isSetOutputFile()).compareTo(other.isSetOutputFile());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1042,7 +997,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1052,7 +1007,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
+ lastComparison = java.lang.Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1062,7 +1017,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLocalityGroup()).compareTo(other.isSetLocalityGroup());
+ lastComparison = java.lang.Boolean.valueOf(isSetLocalityGroup()).compareTo(other.isSetLocalityGroup());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1072,7 +1027,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEntriesRead()).compareTo(other.isSetEntriesRead());
+ lastComparison = java.lang.Boolean.valueOf(isSetEntriesRead()).compareTo(other.isSetEntriesRead());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1082,7 +1037,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEntriesWritten()).compareTo(other.isSetEntriesWritten());
+ lastComparison = java.lang.Boolean.valueOf(isSetEntriesWritten()).compareTo(other.isSetEntriesWritten());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1092,7 +1047,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSsiList()).compareTo(other.isSetSsiList());
+ lastComparison = java.lang.Boolean.valueOf(isSetSsiList()).compareTo(other.isSetSsiList());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1102,7 +1057,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSsio()).compareTo(other.isSetSsio());
+ lastComparison = java.lang.Boolean.valueOf(isSetSsio()).compareTo(other.isSetSsio());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1120,16 +1075,16 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
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("ActiveCompaction(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ActiveCompaction(");
boolean first = true;
sb.append("extent:");
@@ -1227,7 +1182,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1237,13 +1192,13 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- private static class ActiveCompactionStandardSchemeFactory implements SchemeFactory {
+ private static class ActiveCompactionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActiveCompactionStandardScheme getScheme() {
return new ActiveCompactionStandardScheme();
}
}
- private static class ActiveCompactionStandardScheme extends StandardScheme<ActiveCompaction> {
+ private static class ActiveCompactionStandardScheme extends org.apache.thrift.scheme.StandardScheme<ActiveCompaction> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ActiveCompaction struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1276,8 +1231,8 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
- struct.inputFiles = new ArrayList<String>(_list52.size);
- String _elem53;
+ struct.inputFiles = new java.util.ArrayList<java.lang.String>(_list52.size);
+ java.lang.String _elem53;
for (int _i54 = 0; _i54 < _list52.size; ++_i54)
{
_elem53 = iprot.readString();
@@ -1342,7 +1297,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list55 = iprot.readListBegin();
- struct.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list55.size);
+ struct.ssiList = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list55.size);
org.apache.accumulo.core.data.thrift.IterInfo _elem56;
for (int _i57 = 0; _i57 < _list55.size; ++_i57)
{
@@ -1361,17 +1316,17 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map58 = iprot.readMapBegin();
- struct.ssio = new HashMap<String,Map<String,String>>(2*_map58.size);
- String _key59;
- Map<String,String> _val60;
+ struct.ssio = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>(2*_map58.size);
+ java.lang.String _key59;
+ java.util.Map<java.lang.String,java.lang.String> _val60;
for (int _i61 = 0; _i61 < _map58.size; ++_i61)
{
_key59 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map62 = iprot.readMapBegin();
- _val60 = new HashMap<String,String>(2*_map62.size);
- String _key63;
- String _val64;
+ _val60 = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map62.size);
+ java.lang.String _key63;
+ java.lang.String _val64;
for (int _i65 = 0; _i65 < _map62.size; ++_i65)
{
_key63 = iprot.readString();
@@ -1416,7 +1371,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
oprot.writeFieldBegin(INPUT_FILES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.inputFiles.size()));
- for (String _iter66 : struct.inputFiles)
+ for (java.lang.String _iter66 : struct.inputFiles)
{
oprot.writeString(_iter66);
}
@@ -1466,12 +1421,12 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
oprot.writeFieldBegin(SSIO_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.ssio.size()));
- for (Map.Entry<String, Map<String,String>> _iter68 : struct.ssio.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.String>> _iter68 : struct.ssio.entrySet())
{
oprot.writeString(_iter68.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter68.getValue().size()));
- for (Map.Entry<String, String> _iter69 : _iter68.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter69 : _iter68.getValue().entrySet())
{
oprot.writeString(_iter69.getKey());
oprot.writeString(_iter69.getValue());
@@ -1489,18 +1444,18 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
- private static class ActiveCompactionTupleSchemeFactory implements SchemeFactory {
+ private static class ActiveCompactionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActiveCompactionTupleScheme getScheme() {
return new ActiveCompactionTupleScheme();
}
}
- private static class ActiveCompactionTupleScheme extends TupleScheme<ActiveCompaction> {
+ private static class ActiveCompactionTupleScheme extends org.apache.thrift.scheme.TupleScheme<ActiveCompaction> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ActiveCompaction 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.isSetExtent()) {
optionals.set(0);
}
@@ -1544,7 +1499,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (struct.isSetInputFiles()) {
{
oprot.writeI32(struct.inputFiles.size());
- for (String _iter70 : struct.inputFiles)
+ for (java.lang.String _iter70 : struct.inputFiles)
{
oprot.writeString(_iter70);
}
@@ -1580,12 +1535,12 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (struct.isSetSsio()) {
{
oprot.writeI32(struct.ssio.size());
- for (Map.Entry<String, Map<String,String>> _iter72 : struct.ssio.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.String>> _iter72 : struct.ssio.entrySet())
{
oprot.writeString(_iter72.getKey());
{
oprot.writeI32(_iter72.getValue().size());
- for (Map.Entry<String, String> _iter73 : _iter72.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter73 : _iter72.getValue().entrySet())
{
oprot.writeString(_iter73.getKey());
oprot.writeString(_iter73.getValue());
@@ -1598,8 +1553,8 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ActiveCompaction struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(11);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(11);
if (incoming.get(0)) {
struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.extent.read(iprot);
@@ -1612,8 +1567,8 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list74 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.inputFiles = new ArrayList<String>(_list74.size);
- String _elem75;
+ struct.inputFiles = new java.util.ArrayList<java.lang.String>(_list74.size);
+ java.lang.String _elem75;
for (int _i76 = 0; _i76 < _list74.size; ++_i76)
{
_elem75 = iprot.readString();
@@ -1649,7 +1604,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (incoming.get(9)) {
{
org.apache.thrift.protocol.TList _list77 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list77.size);
+ struct.ssiList = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list77.size);
org.apache.accumulo.core.data.thrift.IterInfo _elem78;
for (int _i79 = 0; _i79 < _list77.size; ++_i79)
{
@@ -1663,17 +1618,17 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (incoming.get(10)) {
{
org.apache.thrift.protocol.TMap _map80 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.ssio = new HashMap<String,Map<String,String>>(2*_map80.size);
- String _key81;
- Map<String,String> _val82;
+ struct.ssio = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>(2*_map80.size);
+ java.lang.String _key81;
+ java.util.Map<java.lang.String,java.lang.String> _val82;
for (int _i83 = 0; _i83 < _map80.size; ++_i83)
{
_key81 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- _val82 = new HashMap<String,String>(2*_map84.size);
- String _key85;
- String _val86;
+ _val82 = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map84.size);
+ java.lang.String _key85;
+ java.lang.String _val86;
for (int _i87 = 0; _i87 < _map84.size; ++_i87)
{
_key85 = iprot.readString();
@@ -1689,5 +1644,9 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[03/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/python/ttypes.py
----------------------------------------------------------------------
diff --git a/proxy/src/main/python/ttypes.py b/proxy/src/main/python/ttypes.py
index 87a977d..69269bc 100644
--- a/proxy/src/main/python/ttypes.py
+++ b/proxy/src/main/python/ttypes.py
@@ -13,3355 +13,3143 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+import sys
from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
-
-
-class PartialKey:
- ROW = 0
- ROW_COLFAM = 1
- ROW_COLFAM_COLQUAL = 2
- ROW_COLFAM_COLQUAL_COLVIS = 3
- ROW_COLFAM_COLQUAL_COLVIS_TIME = 4
- ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL = 5
-
- _VALUES_TO_NAMES = {
- 0: "ROW",
- 1: "ROW_COLFAM",
- 2: "ROW_COLFAM_COLQUAL",
- 3: "ROW_COLFAM_COLQUAL_COLVIS",
- 4: "ROW_COLFAM_COLQUAL_COLVIS_TIME",
- 5: "ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL",
- }
-
- _NAMES_TO_VALUES = {
- "ROW": 0,
- "ROW_COLFAM": 1,
- "ROW_COLFAM_COLQUAL": 2,
- "ROW_COLFAM_COLQUAL_COLVIS": 3,
- "ROW_COLFAM_COLQUAL_COLVIS_TIME": 4,
- "ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL": 5,
- }
-
-class TablePermission:
- READ = 2
- WRITE = 3
- BULK_IMPORT = 4
- ALTER_TABLE = 5
- GRANT = 6
- DROP_TABLE = 7
-
- _VALUES_TO_NAMES = {
- 2: "READ",
- 3: "WRITE",
- 4: "BULK_IMPORT",
- 5: "ALTER_TABLE",
- 6: "GRANT",
- 7: "DROP_TABLE",
- }
-
- _NAMES_TO_VALUES = {
- "READ": 2,
- "WRITE": 3,
- "BULK_IMPORT": 4,
- "ALTER_TABLE": 5,
- "GRANT": 6,
- "DROP_TABLE": 7,
- }
-
-class SystemPermission:
- GRANT = 0
- CREATE_TABLE = 1
- DROP_TABLE = 2
- ALTER_TABLE = 3
- CREATE_USER = 4
- DROP_USER = 5
- ALTER_USER = 6
- SYSTEM = 7
-
- _VALUES_TO_NAMES = {
- 0: "GRANT",
- 1: "CREATE_TABLE",
- 2: "DROP_TABLE",
- 3: "ALTER_TABLE",
- 4: "CREATE_USER",
- 5: "DROP_USER",
- 6: "ALTER_USER",
- 7: "SYSTEM",
- }
-
- _NAMES_TO_VALUES = {
- "GRANT": 0,
- "CREATE_TABLE": 1,
- "DROP_TABLE": 2,
- "ALTER_TABLE": 3,
- "CREATE_USER": 4,
- "DROP_USER": 5,
- "ALTER_USER": 6,
- "SYSTEM": 7,
- }
-
-class NamespacePermission:
- READ = 0
- WRITE = 1
- ALTER_NAMESPACE = 2
- GRANT = 3
- ALTER_TABLE = 4
- CREATE_TABLE = 5
- DROP_TABLE = 6
- BULK_IMPORT = 7
- DROP_NAMESPACE = 8
-
- _VALUES_TO_NAMES = {
- 0: "READ",
- 1: "WRITE",
- 2: "ALTER_NAMESPACE",
- 3: "GRANT",
- 4: "ALTER_TABLE",
- 5: "CREATE_TABLE",
- 6: "DROP_TABLE",
- 7: "BULK_IMPORT",
- 8: "DROP_NAMESPACE",
- }
-
- _NAMES_TO_VALUES = {
- "READ": 0,
- "WRITE": 1,
- "ALTER_NAMESPACE": 2,
- "GRANT": 3,
- "ALTER_TABLE": 4,
- "CREATE_TABLE": 5,
- "DROP_TABLE": 6,
- "BULK_IMPORT": 7,
- "DROP_NAMESPACE": 8,
- }
-
-class ScanType:
- SINGLE = 0
- BATCH = 1
-
- _VALUES_TO_NAMES = {
- 0: "SINGLE",
- 1: "BATCH",
- }
-
- _NAMES_TO_VALUES = {
- "SINGLE": 0,
- "BATCH": 1,
- }
-
-class ScanState:
- IDLE = 0
- RUNNING = 1
- QUEUED = 2
-
- _VALUES_TO_NAMES = {
- 0: "IDLE",
- 1: "RUNNING",
- 2: "QUEUED",
- }
-
- _NAMES_TO_VALUES = {
- "IDLE": 0,
- "RUNNING": 1,
- "QUEUED": 2,
- }
-
-class ConditionalStatus:
- ACCEPTED = 0
- REJECTED = 1
- VIOLATED = 2
- UNKNOWN = 3
- INVISIBLE_VISIBILITY = 4
-
- _VALUES_TO_NAMES = {
- 0: "ACCEPTED",
- 1: "REJECTED",
- 2: "VIOLATED",
- 3: "UNKNOWN",
- 4: "INVISIBLE_VISIBILITY",
- }
-
- _NAMES_TO_VALUES = {
- "ACCEPTED": 0,
- "REJECTED": 1,
- "VIOLATED": 2,
- "UNKNOWN": 3,
- "INVISIBLE_VISIBILITY": 4,
- }
-
-class Durability:
- DEFAULT = 0
- NONE = 1
- LOG = 2
- FLUSH = 3
- SYNC = 4
-
- _VALUES_TO_NAMES = {
- 0: "DEFAULT",
- 1: "NONE",
- 2: "LOG",
- 3: "FLUSH",
- 4: "SYNC",
- }
-
- _NAMES_TO_VALUES = {
- "DEFAULT": 0,
- "NONE": 1,
- "LOG": 2,
- "FLUSH": 3,
- "SYNC": 4,
- }
-
-class CompactionType:
- MINOR = 0
- MERGE = 1
- MAJOR = 2
- FULL = 3
-
- _VALUES_TO_NAMES = {
- 0: "MINOR",
- 1: "MERGE",
- 2: "MAJOR",
- 3: "FULL",
- }
-
- _NAMES_TO_VALUES = {
- "MINOR": 0,
- "MERGE": 1,
- "MAJOR": 2,
- "FULL": 3,
- }
-
-class CompactionReason:
- USER = 0
- SYSTEM = 1
- CHOP = 2
- IDLE = 3
- CLOSE = 4
-
- _VALUES_TO_NAMES = {
- 0: "USER",
- 1: "SYSTEM",
- 2: "CHOP",
- 3: "IDLE",
- 4: "CLOSE",
- }
-
- _NAMES_TO_VALUES = {
- "USER": 0,
- "SYSTEM": 1,
- "CHOP": 2,
- "IDLE": 3,
- "CLOSE": 4,
- }
-
-class IteratorScope:
- MINC = 0
- MAJC = 1
- SCAN = 2
-
- _VALUES_TO_NAMES = {
- 0: "MINC",
- 1: "MAJC",
- 2: "SCAN",
- }
-
- _NAMES_TO_VALUES = {
- "MINC": 0,
- "MAJC": 1,
- "SCAN": 2,
- }
-
-class TimeType:
- LOGICAL = 0
- MILLIS = 1
-
- _VALUES_TO_NAMES = {
- 0: "LOGICAL",
- 1: "MILLIS",
- }
-
- _NAMES_TO_VALUES = {
- "LOGICAL": 0,
- "MILLIS": 1,
- }
-
-
-class Key:
- """
- Attributes:
- - row
- - colFamily
- - colQualifier
- - colVisibility
- - timestamp
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'row', None, None, ), # 1
- (2, TType.STRING, 'colFamily', None, None, ), # 2
- (3, TType.STRING, 'colQualifier', None, None, ), # 3
- (4, TType.STRING, 'colVisibility', None, None, ), # 4
- (5, TType.I64, 'timestamp', None, 9223372036854775807, ), # 5
- )
-
- def __init__(self, row=None, colFamily=None, colQualifier=None, colVisibility=None, timestamp=thrift_spec[5][4],):
- self.row = row
- self.colFamily = colFamily
- self.colQualifier = colQualifier
- self.colVisibility = colVisibility
- self.timestamp = timestamp
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.row = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.colFamily = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.colQualifier = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRING:
- self.colVisibility = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I64:
- self.timestamp = iprot.readI64()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('Key')
- if self.row is not None:
- oprot.writeFieldBegin('row', TType.STRING, 1)
- oprot.writeString(self.row)
- oprot.writeFieldEnd()
- if self.colFamily is not None:
- oprot.writeFieldBegin('colFamily', TType.STRING, 2)
- oprot.writeString(self.colFamily)
- oprot.writeFieldEnd()
- if self.colQualifier is not None:
- oprot.writeFieldBegin('colQualifier', TType.STRING, 3)
- oprot.writeString(self.colQualifier)
- oprot.writeFieldEnd()
- if self.colVisibility is not None:
- oprot.writeFieldBegin('colVisibility', TType.STRING, 4)
- oprot.writeString(self.colVisibility)
- oprot.writeFieldEnd()
- if self.timestamp is not None:
- oprot.writeFieldBegin('timestamp', TType.I64, 5)
- oprot.writeI64(self.timestamp)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.row)
- value = (value * 31) ^ hash(self.colFamily)
- value = (value * 31) ^ hash(self.colQualifier)
- value = (value * 31) ^ hash(self.colVisibility)
- value = (value * 31) ^ hash(self.timestamp)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ColumnUpdate:
- """
- Attributes:
- - colFamily
- - colQualifier
- - colVisibility
- - timestamp
- - value
- - deleteCell
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'colFamily', None, None, ), # 1
- (2, TType.STRING, 'colQualifier', None, None, ), # 2
- (3, TType.STRING, 'colVisibility', None, None, ), # 3
- (4, TType.I64, 'timestamp', None, None, ), # 4
- (5, TType.STRING, 'value', None, None, ), # 5
- (6, TType.BOOL, 'deleteCell', None, None, ), # 6
- )
-
- def __init__(self, colFamily=None, colQualifier=None, colVisibility=None, timestamp=None, value=None, deleteCell=None,):
- self.colFamily = colFamily
- self.colQualifier = colQualifier
- self.colVisibility = colVisibility
- self.timestamp = timestamp
- self.value = value
- self.deleteCell = deleteCell
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.colFamily = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.colQualifier = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.colVisibility = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.I64:
- self.timestamp = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.STRING:
- self.value = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.BOOL:
- self.deleteCell = iprot.readBool()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ColumnUpdate')
- if self.colFamily is not None:
- oprot.writeFieldBegin('colFamily', TType.STRING, 1)
- oprot.writeString(self.colFamily)
- oprot.writeFieldEnd()
- if self.colQualifier is not None:
- oprot.writeFieldBegin('colQualifier', TType.STRING, 2)
- oprot.writeString(self.colQualifier)
- oprot.writeFieldEnd()
- if self.colVisibility is not None:
- oprot.writeFieldBegin('colVisibility', TType.STRING, 3)
- oprot.writeString(self.colVisibility)
- oprot.writeFieldEnd()
- if self.timestamp is not None:
- oprot.writeFieldBegin('timestamp', TType.I64, 4)
- oprot.writeI64(self.timestamp)
- oprot.writeFieldEnd()
- if self.value is not None:
- oprot.writeFieldBegin('value', TType.STRING, 5)
- oprot.writeString(self.value)
- oprot.writeFieldEnd()
- if self.deleteCell is not None:
- oprot.writeFieldBegin('deleteCell', TType.BOOL, 6)
- oprot.writeBool(self.deleteCell)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.colFamily)
- value = (value * 31) ^ hash(self.colQualifier)
- value = (value * 31) ^ hash(self.colVisibility)
- value = (value * 31) ^ hash(self.timestamp)
- value = (value * 31) ^ hash(self.value)
- value = (value * 31) ^ hash(self.deleteCell)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class DiskUsage:
- """
- Attributes:
- - tables
- - usage
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'tables', (TType.STRING,None), None, ), # 1
- (2, TType.I64, 'usage', None, None, ), # 2
- )
-
- def __init__(self, tables=None, usage=None,):
- self.tables = tables
- self.usage = usage
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.LIST:
- self.tables = []
- (_etype3, _size0) = iprot.readListBegin()
- for _i4 in xrange(_size0):
- _elem5 = iprot.readString()
- self.tables.append(_elem5)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I64:
- self.usage = iprot.readI64()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('DiskUsage')
- if self.tables is not None:
- oprot.writeFieldBegin('tables', TType.LIST, 1)
- oprot.writeListBegin(TType.STRING, len(self.tables))
- for iter6 in self.tables:
- oprot.writeString(iter6)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.usage is not None:
- oprot.writeFieldBegin('usage', TType.I64, 2)
- oprot.writeI64(self.usage)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.tables)
- value = (value * 31) ^ hash(self.usage)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class KeyValue:
- """
- Attributes:
- - key
- - value
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'key', (Key, Key.thrift_spec), None, ), # 1
- (2, TType.STRING, 'value', None, None, ), # 2
- )
-
- def __init__(self, key=None, value=None,):
- self.key = key
- self.value = value
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.key = Key()
- self.key.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.value = iprot.readString()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('KeyValue')
- if self.key is not None:
- oprot.writeFieldBegin('key', TType.STRUCT, 1)
- self.key.write(oprot)
- oprot.writeFieldEnd()
- if self.value is not None:
- oprot.writeFieldBegin('value', TType.STRING, 2)
- oprot.writeString(self.value)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.key)
- value = (value * 31) ^ hash(self.value)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ScanResult:
- """
- Attributes:
- - results
- - more
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.LIST, 'results', (TType.STRUCT,(KeyValue, KeyValue.thrift_spec)), None, ), # 1
- (2, TType.BOOL, 'more', None, None, ), # 2
- )
-
- def __init__(self, results=None, more=None,):
- self.results = results
- self.more = more
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.LIST:
- self.results = []
- (_etype10, _size7) = iprot.readListBegin()
- for _i11 in xrange(_size7):
- _elem12 = KeyValue()
- _elem12.read(iprot)
- self.results.append(_elem12)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.BOOL:
- self.more = iprot.readBool()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ScanResult')
- if self.results is not None:
- oprot.writeFieldBegin('results', TType.LIST, 1)
- oprot.writeListBegin(TType.STRUCT, len(self.results))
- for iter13 in self.results:
- iter13.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.more is not None:
- oprot.writeFieldBegin('more', TType.BOOL, 2)
- oprot.writeBool(self.more)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.results)
- value = (value * 31) ^ hash(self.more)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class Range:
- """
- Attributes:
- - start
- - startInclusive
- - stop
- - stopInclusive
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'start', (Key, Key.thrift_spec), None, ), # 1
- (2, TType.BOOL, 'startInclusive', None, None, ), # 2
- (3, TType.STRUCT, 'stop', (Key, Key.thrift_spec), None, ), # 3
- (4, TType.BOOL, 'stopInclusive', None, None, ), # 4
- )
-
- def __init__(self, start=None, startInclusive=None, stop=None, stopInclusive=None,):
- self.start = start
- self.startInclusive = startInclusive
- self.stop = stop
- self.stopInclusive = stopInclusive
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.start = Key()
- self.start.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.BOOL:
- self.startInclusive = iprot.readBool()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRUCT:
- self.stop = Key()
- self.stop.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.BOOL:
- self.stopInclusive = iprot.readBool()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('Range')
- if self.start is not None:
- oprot.writeFieldBegin('start', TType.STRUCT, 1)
- self.start.write(oprot)
- oprot.writeFieldEnd()
- if self.startInclusive is not None:
- oprot.writeFieldBegin('startInclusive', TType.BOOL, 2)
- oprot.writeBool(self.startInclusive)
- oprot.writeFieldEnd()
- if self.stop is not None:
- oprot.writeFieldBegin('stop', TType.STRUCT, 3)
- self.stop.write(oprot)
- oprot.writeFieldEnd()
- if self.stopInclusive is not None:
- oprot.writeFieldBegin('stopInclusive', TType.BOOL, 4)
- oprot.writeBool(self.stopInclusive)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.start)
- value = (value * 31) ^ hash(self.startInclusive)
- value = (value * 31) ^ hash(self.stop)
- value = (value * 31) ^ hash(self.stopInclusive)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ScanColumn:
- """
- Attributes:
- - colFamily
- - colQualifier
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'colFamily', None, None, ), # 1
- (2, TType.STRING, 'colQualifier', None, None, ), # 2
- )
-
- def __init__(self, colFamily=None, colQualifier=None,):
- self.colFamily = colFamily
- self.colQualifier = colQualifier
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.colFamily = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.colQualifier = iprot.readString()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ScanColumn')
- if self.colFamily is not None:
- oprot.writeFieldBegin('colFamily', TType.STRING, 1)
- oprot.writeString(self.colFamily)
- oprot.writeFieldEnd()
- if self.colQualifier is not None:
- oprot.writeFieldBegin('colQualifier', TType.STRING, 2)
- oprot.writeString(self.colQualifier)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.colFamily)
- value = (value * 31) ^ hash(self.colQualifier)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class IteratorSetting:
- """
- Attributes:
- - priority
- - name
- - iteratorClass
- - properties
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'priority', None, None, ), # 1
- (2, TType.STRING, 'name', None, None, ), # 2
- (3, TType.STRING, 'iteratorClass', None, None, ), # 3
- (4, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 4
- )
-
- def __init__(self, priority=None, name=None, iteratorClass=None, properties=None,):
- self.priority = priority
- self.name = name
- self.iteratorClass = iteratorClass
- self.properties = properties
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.I32:
- self.priority = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.name = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.iteratorClass = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.MAP:
- self.properties = {}
- (_ktype15, _vtype16, _size14 ) = iprot.readMapBegin()
- for _i18 in xrange(_size14):
- _key19 = iprot.readString()
- _val20 = iprot.readString()
- self.properties[_key19] = _val20
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('IteratorSetting')
- if self.priority is not None:
- oprot.writeFieldBegin('priority', TType.I32, 1)
- oprot.writeI32(self.priority)
- oprot.writeFieldEnd()
- if self.name is not None:
- oprot.writeFieldBegin('name', TType.STRING, 2)
- oprot.writeString(self.name)
- oprot.writeFieldEnd()
- if self.iteratorClass is not None:
- oprot.writeFieldBegin('iteratorClass', TType.STRING, 3)
- oprot.writeString(self.iteratorClass)
- oprot.writeFieldEnd()
- if self.properties is not None:
- oprot.writeFieldBegin('properties', TType.MAP, 4)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
- for kiter21,viter22 in self.properties.items():
- oprot.writeString(kiter21)
- oprot.writeString(viter22)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.priority)
- value = (value * 31) ^ hash(self.name)
- value = (value * 31) ^ hash(self.iteratorClass)
- value = (value * 31) ^ hash(self.properties)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ScanOptions:
- """
- Attributes:
- - authorizations
- - range
- - columns
- - iterators
- - bufferSize
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.SET, 'authorizations', (TType.STRING,None), None, ), # 1
- (2, TType.STRUCT, 'range', (Range, Range.thrift_spec), None, ), # 2
- (3, TType.LIST, 'columns', (TType.STRUCT,(ScanColumn, ScanColumn.thrift_spec)), None, ), # 3
- (4, TType.LIST, 'iterators', (TType.STRUCT,(IteratorSetting, IteratorSetting.thrift_spec)), None, ), # 4
- (5, TType.I32, 'bufferSize', None, None, ), # 5
- )
-
- def __init__(self, authorizations=None, range=None, columns=None, iterators=None, bufferSize=None,):
- self.authorizations = authorizations
- self.range = range
- self.columns = columns
- self.iterators = iterators
- self.bufferSize = bufferSize
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.SET:
- self.authorizations = set()
- (_etype26, _size23) = iprot.readSetBegin()
- for _i27 in xrange(_size23):
- _elem28 = iprot.readString()
- self.authorizations.add(_elem28)
- iprot.readSetEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.range = Range()
- self.range.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.LIST:
- self.columns = []
- (_etype32, _size29) = iprot.readListBegin()
- for _i33 in xrange(_size29):
- _elem34 = ScanColumn()
- _elem34.read(iprot)
- self.columns.append(_elem34)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.LIST:
- self.iterators = []
- (_etype38, _size35) = iprot.readListBegin()
- for _i39 in xrange(_size35):
- _elem40 = IteratorSetting()
- _elem40.read(iprot)
- self.iterators.append(_elem40)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.bufferSize = iprot.readI32()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ScanOptions')
- if self.authorizations is not None:
- oprot.writeFieldBegin('authorizations', TType.SET, 1)
- oprot.writeSetBegin(TType.STRING, len(self.authorizations))
- for iter41 in self.authorizations:
- oprot.writeString(iter41)
- oprot.writeSetEnd()
- oprot.writeFieldEnd()
- if self.range is not None:
- oprot.writeFieldBegin('range', TType.STRUCT, 2)
- self.range.write(oprot)
- oprot.writeFieldEnd()
- if self.columns is not None:
- oprot.writeFieldBegin('columns', TType.LIST, 3)
- oprot.writeListBegin(TType.STRUCT, len(self.columns))
- for iter42 in self.columns:
- iter42.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.iterators is not None:
- oprot.writeFieldBegin('iterators', TType.LIST, 4)
- oprot.writeListBegin(TType.STRUCT, len(self.iterators))
- for iter43 in self.iterators:
- iter43.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.bufferSize is not None:
- oprot.writeFieldBegin('bufferSize', TType.I32, 5)
- oprot.writeI32(self.bufferSize)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.authorizations)
- value = (value * 31) ^ hash(self.range)
- value = (value * 31) ^ hash(self.columns)
- value = (value * 31) ^ hash(self.iterators)
- value = (value * 31) ^ hash(self.bufferSize)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class BatchScanOptions:
- """
- Attributes:
- - authorizations
- - ranges
- - columns
- - iterators
- - threads
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.SET, 'authorizations', (TType.STRING,None), None, ), # 1
- (2, TType.LIST, 'ranges', (TType.STRUCT,(Range, Range.thrift_spec)), None, ), # 2
- (3, TType.LIST, 'columns', (TType.STRUCT,(ScanColumn, ScanColumn.thrift_spec)), None, ), # 3
- (4, TType.LIST, 'iterators', (TType.STRUCT,(IteratorSetting, IteratorSetting.thrift_spec)), None, ), # 4
- (5, TType.I32, 'threads', None, None, ), # 5
- )
-
- def __init__(self, authorizations=None, ranges=None, columns=None, iterators=None, threads=None,):
- self.authorizations = authorizations
- self.ranges = ranges
- self.columns = columns
- self.iterators = iterators
- self.threads = threads
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.SET:
- self.authorizations = set()
- (_etype47, _size44) = iprot.readSetBegin()
- for _i48 in xrange(_size44):
- _elem49 = iprot.readString()
- self.authorizations.add(_elem49)
- iprot.readSetEnd()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.LIST:
- self.ranges = []
- (_etype53, _size50) = iprot.readListBegin()
- for _i54 in xrange(_size50):
- _elem55 = Range()
- _elem55.read(iprot)
- self.ranges.append(_elem55)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.LIST:
- self.columns = []
- (_etype59, _size56) = iprot.readListBegin()
- for _i60 in xrange(_size56):
- _elem61 = ScanColumn()
- _elem61.read(iprot)
- self.columns.append(_elem61)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.LIST:
- self.iterators = []
- (_etype65, _size62) = iprot.readListBegin()
- for _i66 in xrange(_size62):
- _elem67 = IteratorSetting()
- _elem67.read(iprot)
- self.iterators.append(_elem67)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.threads = iprot.readI32()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('BatchScanOptions')
- if self.authorizations is not None:
- oprot.writeFieldBegin('authorizations', TType.SET, 1)
- oprot.writeSetBegin(TType.STRING, len(self.authorizations))
- for iter68 in self.authorizations:
- oprot.writeString(iter68)
- oprot.writeSetEnd()
- oprot.writeFieldEnd()
- if self.ranges is not None:
- oprot.writeFieldBegin('ranges', TType.LIST, 2)
- oprot.writeListBegin(TType.STRUCT, len(self.ranges))
- for iter69 in self.ranges:
- iter69.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.columns is not None:
- oprot.writeFieldBegin('columns', TType.LIST, 3)
- oprot.writeListBegin(TType.STRUCT, len(self.columns))
- for iter70 in self.columns:
- iter70.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.iterators is not None:
- oprot.writeFieldBegin('iterators', TType.LIST, 4)
- oprot.writeListBegin(TType.STRUCT, len(self.iterators))
- for iter71 in self.iterators:
- iter71.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.threads is not None:
- oprot.writeFieldBegin('threads', TType.I32, 5)
- oprot.writeI32(self.threads)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.authorizations)
- value = (value * 31) ^ hash(self.ranges)
- value = (value * 31) ^ hash(self.columns)
- value = (value * 31) ^ hash(self.iterators)
- value = (value * 31) ^ hash(self.threads)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class KeyValueAndPeek:
- """
- Attributes:
- - keyValue
- - hasNext
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'keyValue', (KeyValue, KeyValue.thrift_spec), None, ), # 1
- (2, TType.BOOL, 'hasNext', None, None, ), # 2
- )
-
- def __init__(self, keyValue=None, hasNext=None,):
- self.keyValue = keyValue
- self.hasNext = hasNext
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.keyValue = KeyValue()
- self.keyValue.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.BOOL:
- self.hasNext = iprot.readBool()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('KeyValueAndPeek')
- if self.keyValue is not None:
- oprot.writeFieldBegin('keyValue', TType.STRUCT, 1)
- self.keyValue.write(oprot)
- oprot.writeFieldEnd()
- if self.hasNext is not None:
- oprot.writeFieldBegin('hasNext', TType.BOOL, 2)
- oprot.writeBool(self.hasNext)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.keyValue)
- value = (value * 31) ^ hash(self.hasNext)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class KeyExtent:
- """
- Attributes:
- - tableId
- - endRow
- - prevEndRow
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'tableId', None, None, ), # 1
- (2, TType.STRING, 'endRow', None, None, ), # 2
- (3, TType.STRING, 'prevEndRow', None, None, ), # 3
- )
-
- def __init__(self, tableId=None, endRow=None, prevEndRow=None,):
- self.tableId = tableId
- self.endRow = endRow
- self.prevEndRow = prevEndRow
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.tableId = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.endRow = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.prevEndRow = iprot.readString()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('KeyExtent')
- if self.tableId is not None:
- oprot.writeFieldBegin('tableId', TType.STRING, 1)
- oprot.writeString(self.tableId)
- oprot.writeFieldEnd()
- if self.endRow is not None:
- oprot.writeFieldBegin('endRow', TType.STRING, 2)
- oprot.writeString(self.endRow)
- oprot.writeFieldEnd()
- if self.prevEndRow is not None:
- oprot.writeFieldBegin('prevEndRow', TType.STRING, 3)
- oprot.writeString(self.prevEndRow)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.tableId)
- value = (value * 31) ^ hash(self.endRow)
- value = (value * 31) ^ hash(self.prevEndRow)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class Column:
- """
- Attributes:
- - colFamily
- - colQualifier
- - colVisibility
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'colFamily', None, None, ), # 1
- (2, TType.STRING, 'colQualifier', None, None, ), # 2
- (3, TType.STRING, 'colVisibility', None, None, ), # 3
- )
-
- def __init__(self, colFamily=None, colQualifier=None, colVisibility=None,):
- self.colFamily = colFamily
- self.colQualifier = colQualifier
- self.colVisibility = colVisibility
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.colFamily = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.colQualifier = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.colVisibility = iprot.readString()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('Column')
- if self.colFamily is not None:
- oprot.writeFieldBegin('colFamily', TType.STRING, 1)
- oprot.writeString(self.colFamily)
- oprot.writeFieldEnd()
- if self.colQualifier is not None:
- oprot.writeFieldBegin('colQualifier', TType.STRING, 2)
- oprot.writeString(self.colQualifier)
- oprot.writeFieldEnd()
- if self.colVisibility is not None:
- oprot.writeFieldBegin('colVisibility', TType.STRING, 3)
- oprot.writeString(self.colVisibility)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.colFamily)
- value = (value * 31) ^ hash(self.colQualifier)
- value = (value * 31) ^ hash(self.colVisibility)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class Condition:
- """
- Attributes:
- - column
- - timestamp
- - value
- - iterators
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'column', (Column, Column.thrift_spec), None, ), # 1
- (2, TType.I64, 'timestamp', None, None, ), # 2
- (3, TType.STRING, 'value', None, None, ), # 3
- (4, TType.LIST, 'iterators', (TType.STRUCT,(IteratorSetting, IteratorSetting.thrift_spec)), None, ), # 4
- )
-
- def __init__(self, column=None, timestamp=None, value=None, iterators=None,):
- self.column = column
- self.timestamp = timestamp
- self.value = value
- self.iterators = iterators
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.column = Column()
- self.column.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I64:
- self.timestamp = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.value = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.LIST:
- self.iterators = []
- (_etype75, _size72) = iprot.readListBegin()
- for _i76 in xrange(_size72):
- _elem77 = IteratorSetting()
- _elem77.read(iprot)
- self.iterators.append(_elem77)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('Condition')
- if self.column is not None:
- oprot.writeFieldBegin('column', TType.STRUCT, 1)
- self.column.write(oprot)
- oprot.writeFieldEnd()
- if self.timestamp is not None:
- oprot.writeFieldBegin('timestamp', TType.I64, 2)
- oprot.writeI64(self.timestamp)
- oprot.writeFieldEnd()
- if self.value is not None:
- oprot.writeFieldBegin('value', TType.STRING, 3)
- oprot.writeString(self.value)
- oprot.writeFieldEnd()
- if self.iterators is not None:
- oprot.writeFieldBegin('iterators', TType.LIST, 4)
- oprot.writeListBegin(TType.STRUCT, len(self.iterators))
- for iter78 in self.iterators:
- iter78.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.column)
- value = (value * 31) ^ hash(self.timestamp)
- value = (value * 31) ^ hash(self.value)
- value = (value * 31) ^ hash(self.iterators)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ConditionalUpdates:
- """
- Attributes:
- - conditions
- - updates
- """
-
- thrift_spec = (
- None, # 0
- None, # 1
- (2, TType.LIST, 'conditions', (TType.STRUCT,(Condition, Condition.thrift_spec)), None, ), # 2
- (3, TType.LIST, 'updates', (TType.STRUCT,(ColumnUpdate, ColumnUpdate.thrift_spec)), None, ), # 3
- )
-
- def __init__(self, conditions=None, updates=None,):
- self.conditions = conditions
- self.updates = updates
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 2:
- if ftype == TType.LIST:
- self.conditions = []
- (_etype82, _size79) = iprot.readListBegin()
- for _i83 in xrange(_size79):
- _elem84 = Condition()
- _elem84.read(iprot)
- self.conditions.append(_elem84)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.LIST:
- self.updates = []
- (_etype88, _size85) = iprot.readListBegin()
- for _i89 in xrange(_size85):
- _elem90 = ColumnUpdate()
- _elem90.read(iprot)
- self.updates.append(_elem90)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ConditionalUpdates')
- if self.conditions is not None:
- oprot.writeFieldBegin('conditions', TType.LIST, 2)
- oprot.writeListBegin(TType.STRUCT, len(self.conditions))
- for iter91 in self.conditions:
- iter91.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.updates is not None:
- oprot.writeFieldBegin('updates', TType.LIST, 3)
- oprot.writeListBegin(TType.STRUCT, len(self.updates))
- for iter92 in self.updates:
- iter92.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.conditions)
- value = (value * 31) ^ hash(self.updates)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ConditionalWriterOptions:
- """
- Attributes:
- - maxMemory
- - timeoutMs
- - threads
- - authorizations
- - durability
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I64, 'maxMemory', None, None, ), # 1
- (2, TType.I64, 'timeoutMs', None, None, ), # 2
- (3, TType.I32, 'threads', None, None, ), # 3
- (4, TType.SET, 'authorizations', (TType.STRING,None), None, ), # 4
- (5, TType.I32, 'durability', None, None, ), # 5
- )
-
- def __init__(self, maxMemory=None, timeoutMs=None, threads=None, authorizations=None, durability=None,):
- self.maxMemory = maxMemory
- self.timeoutMs = timeoutMs
- self.threads = threads
- self.authorizations = authorizations
- self.durability = durability
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.I64:
- self.maxMemory = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I64:
- self.timeoutMs = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.I32:
- self.threads = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.SET:
- self.authorizations = set()
- (_etype96, _size93) = iprot.readSetBegin()
- for _i97 in xrange(_size93):
- _elem98 = iprot.readString()
- self.authorizations.add(_elem98)
- iprot.readSetEnd()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.durability = iprot.readI32()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ConditionalWriterOptions')
- if self.maxMemory is not None:
- oprot.writeFieldBegin('maxMemory', TType.I64, 1)
- oprot.writeI64(self.maxMemory)
- oprot.writeFieldEnd()
- if self.timeoutMs is not None:
- oprot.writeFieldBegin('timeoutMs', TType.I64, 2)
- oprot.writeI64(self.timeoutMs)
- oprot.writeFieldEnd()
- if self.threads is not None:
- oprot.writeFieldBegin('threads', TType.I32, 3)
- oprot.writeI32(self.threads)
- oprot.writeFieldEnd()
- if self.authorizations is not None:
- oprot.writeFieldBegin('authorizations', TType.SET, 4)
- oprot.writeSetBegin(TType.STRING, len(self.authorizations))
- for iter99 in self.authorizations:
- oprot.writeString(iter99)
- oprot.writeSetEnd()
- oprot.writeFieldEnd()
- if self.durability is not None:
- oprot.writeFieldBegin('durability', TType.I32, 5)
- oprot.writeI32(self.durability)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.maxMemory)
- value = (value * 31) ^ hash(self.timeoutMs)
- value = (value * 31) ^ hash(self.threads)
- value = (value * 31) ^ hash(self.authorizations)
- value = (value * 31) ^ hash(self.durability)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ActiveScan:
- """
- Attributes:
- - client
- - user
- - table
- - age
- - idleTime
- - type
- - state
- - extent
- - columns
- - iterators
- - authorizations
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'client', None, None, ), # 1
- (2, TType.STRING, 'user', None, None, ), # 2
- (3, TType.STRING, 'table', None, None, ), # 3
- (4, TType.I64, 'age', None, None, ), # 4
- (5, TType.I64, 'idleTime', None, None, ), # 5
- (6, TType.I32, 'type', None, None, ), # 6
- (7, TType.I32, 'state', None, None, ), # 7
- (8, TType.STRUCT, 'extent', (KeyExtent, KeyExtent.thrift_spec), None, ), # 8
- (9, TType.LIST, 'columns', (TType.STRUCT,(Column, Column.thrift_spec)), None, ), # 9
- (10, TType.LIST, 'iterators', (TType.STRUCT,(IteratorSetting, IteratorSetting.thrift_spec)), None, ), # 10
- (11, TType.LIST, 'authorizations', (TType.STRING,None), None, ), # 11
- )
-
- def __init__(self, client=None, user=None, table=None, age=None, idleTime=None, type=None, state=None, extent=None, columns=None, iterators=None, authorizations=None,):
- self.client = client
- self.user = user
- self.table = table
- self.age = age
- self.idleTime = idleTime
- self.type = type
- self.state = state
- self.extent = extent
- self.columns = columns
- self.iterators = iterators
- self.authorizations = authorizations
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.client = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.user = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.table = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.I64:
- self.age = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I64:
- self.idleTime = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.I32:
- self.type = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.I32:
- self.state = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.STRUCT:
- self.extent = KeyExtent()
- self.extent.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.LIST:
- self.columns = []
- (_etype103, _size100) = iprot.readListBegin()
- for _i104 in xrange(_size100):
- _elem105 = Column()
- _elem105.read(iprot)
- self.columns.append(_elem105)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.LIST:
- self.iterators = []
- (_etype109, _size106) = iprot.readListBegin()
- for _i110 in xrange(_size106):
- _elem111 = IteratorSetting()
- _elem111.read(iprot)
- self.iterators.append(_elem111)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 11:
- if ftype == TType.LIST:
- self.authorizations = []
- (_etype115, _size112) = iprot.readListBegin()
- for _i116 in xrange(_size112):
- _elem117 = iprot.readString()
- self.authorizations.append(_elem117)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ActiveScan')
- if self.client is not None:
- oprot.writeFieldBegin('client', TType.STRING, 1)
- oprot.writeString(self.client)
- oprot.writeFieldEnd()
- if self.user is not None:
- oprot.writeFieldBegin('user', TType.STRING, 2)
- oprot.writeString(self.user)
- oprot.writeFieldEnd()
- if self.table is not None:
- oprot.writeFieldBegin('table', TType.STRING, 3)
- oprot.writeString(self.table)
- oprot.writeFieldEnd()
- if self.age is not None:
- oprot.writeFieldBegin('age', TType.I64, 4)
- oprot.writeI64(self.age)
- oprot.writeFieldEnd()
- if self.idleTime is not None:
- oprot.writeFieldBegin('idleTime', TType.I64, 5)
- oprot.writeI64(self.idleTime)
- oprot.writeFieldEnd()
- if self.type is not None:
- oprot.writeFieldBegin('type', TType.I32, 6)
- oprot.writeI32(self.type)
- oprot.writeFieldEnd()
- if self.state is not None:
- oprot.writeFieldBegin('state', TType.I32, 7)
- oprot.writeI32(self.state)
- oprot.writeFieldEnd()
- if self.extent is not None:
- oprot.writeFieldBegin('extent', TType.STRUCT, 8)
- self.extent.write(oprot)
- oprot.writeFieldEnd()
- if self.columns is not None:
- oprot.writeFieldBegin('columns', TType.LIST, 9)
- oprot.writeListBegin(TType.STRUCT, len(self.columns))
- for iter118 in self.columns:
- iter118.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.iterators is not None:
- oprot.writeFieldBegin('iterators', TType.LIST, 10)
- oprot.writeListBegin(TType.STRUCT, len(self.iterators))
- for iter119 in self.iterators:
- iter119.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.authorizations is not None:
- oprot.writeFieldBegin('authorizations', TType.LIST, 11)
- oprot.writeListBegin(TType.STRING, len(self.authorizations))
- for iter120 in self.authorizations:
- oprot.writeString(iter120)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.client)
- value = (value * 31) ^ hash(self.user)
- value = (value * 31) ^ hash(self.table)
- value = (value * 31) ^ hash(self.age)
- value = (value * 31) ^ hash(self.idleTime)
- value = (value * 31) ^ hash(self.type)
- value = (value * 31) ^ hash(self.state)
- value = (value * 31) ^ hash(self.extent)
- value = (value * 31) ^ hash(self.columns)
- value = (value * 31) ^ hash(self.iterators)
- value = (value * 31) ^ hash(self.authorizations)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class ActiveCompaction:
- """
- Attributes:
- - extent
- - age
- - inputFiles
- - outputFile
- - type
- - reason
- - localityGroup
- - entriesRead
- - entriesWritten
- - iterators
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'extent', (KeyExtent, KeyExtent.thrift_spec), None, ), # 1
- (2, TType.I64, 'age', None, None, ), # 2
- (3, TType.LIST, 'inputFiles', (TType.STRING,None), None, ), # 3
- (4, TType.STRING, 'outputFile', None, None, ), # 4
- (5, TType.I32, 'type', None, None, ), # 5
- (6, TType.I32, 'reason', None, None, ), # 6
- (7, TType.STRING, 'localityGroup', None, None, ), # 7
- (8, TType.I64, 'entriesRead', None, None, ), # 8
- (9, TType.I64, 'entriesWritten', None, None, ), # 9
- (10, TType.LIST, 'iterators', (TType.STRUCT,(IteratorSetting, IteratorSetting.thrift_spec)), None, ), # 10
- )
-
- def __init__(self, extent=None, age=None, inputFiles=None, outputFile=None, type=None, reason=None, localityGroup=None, entriesRead=None, entriesWritten=None, iterators=None,):
- self.extent = extent
- self.age = age
- self.inputFiles = inputFiles
- self.outputFile = outputFile
- self.type = type
- self.reason = reason
- self.localityGroup = localityGroup
- self.entriesRead = entriesRead
- self.entriesWritten = entriesWritten
- self.iterators = iterators
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.extent = KeyExtent()
- self.extent.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I64:
- self.age = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.LIST:
- self.inputFiles = []
- (_etype124, _size121) = iprot.readListBegin()
- for _i125 in xrange(_size121):
- _elem126 = iprot.readString()
- self.inputFiles.append(_elem126)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRING:
- self.outputFile = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.type = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.I32:
- self.reason = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.STRING:
- self.localityGroup = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.I64:
- self.entriesRead = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.I64:
- self.entriesWritten = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.LIST:
- self.iterators = []
- (_etype130, _size127) = iprot.readListBegin()
- for _i131 in xrange(_size127):
- _elem132 = IteratorSetting()
- _elem132.read(iprot)
- self.iterators.append(_elem132)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('ActiveCompaction')
- if self.extent is not None:
- oprot.writeFieldBegin('extent', TType.STRUCT, 1)
- self.extent.write(oprot)
- oprot.writeFieldEnd()
- if self.age is not None:
- oprot.writeFieldBegin('age', TType.I64, 2)
- oprot.writeI64(self.age)
- oprot.writeFieldEnd()
- if self.inputFiles is not None:
- oprot.writeFieldBegin('inputFiles', TType.LIST, 3)
- oprot.writeListBegin(TType.STRING, len(self.inputFiles))
- for iter133 in self.inputFiles:
- oprot.writeString(iter133)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.outputFile is not None:
- oprot.writeFieldBegin('outputFile', TType.STRING, 4)
- oprot.writeString(self.outputFile)
- oprot.writeFieldEnd()
- if self.type is not None:
- oprot.writeFieldBegin('type', TType.I32, 5)
- oprot.writeI32(self.type)
- oprot.writeFieldEnd()
- if self.reason is not None:
- oprot.writeFieldBegin('reason', TType.I32, 6)
- oprot.writeI32(self.reason)
- oprot.writeFieldEnd()
- if self.localityGroup is not None:
- oprot.writeFieldBegin('localityGroup', TType.STRING, 7)
- oprot.writeString(self.localityGroup)
- oprot.writeFieldEnd()
- if self.entriesRead is not None:
- oprot.writeFieldBegin('entriesRead', TType.I64, 8)
- oprot.writeI64(self.entriesRead)
- oprot.writeFieldEnd()
- if self.entriesWritten is not None:
- oprot.writeFieldBegin('entriesWritten', TType.I64, 9)
- oprot.writeI64(self.entriesWritten)
- oprot.writeFieldEnd()
- if self.iterators is not None:
- oprot.writeFieldBegin('iterators', TType.LIST, 10)
- oprot.writeListBegin(TType.STRUCT, len(self.iterators))
- for iter134 in self.iterators:
- iter134.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.extent)
- value = (value * 31) ^ hash(self.age)
- value = (value * 31) ^ hash(self.inputFiles)
- value = (value * 31) ^ hash(self.outputFile)
- value = (value * 31) ^ hash(self.type)
- value = (value * 31) ^ hash(self.reason)
- value = (value * 31) ^ hash(self.localityGroup)
- value = (value * 31) ^ hash(self.entriesRead)
- value = (value * 31) ^ hash(self.entriesWritten)
- value = (value * 31) ^ hash(self.iterators)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class WriterOptions:
- """
- Attributes:
- - maxMemory
- - latencyMs
- - timeoutMs
- - threads
- - durability
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I64, 'maxMemory', None, None, ), # 1
- (2, TType.I64, 'latencyMs', None, None, ), # 2
- (3, TType.I64, 'timeoutMs', None, None, ), # 3
- (4, TType.I32, 'threads', None, None, ), # 4
- (5, TType.I32, 'durability', None, None, ), # 5
- )
-
- def __init__(self, maxMemory=None, latencyMs=None, timeoutMs=None, threads=None, durability=None,):
- self.maxMemory = maxMemory
- self.latencyMs = latencyMs
- self.timeoutMs = timeoutMs
- self.threads = threads
- self.durability = durability
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.I64:
- self.maxMemory = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I64:
- self.latencyMs = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.I64:
- self.timeoutMs = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.I32:
- self.threads = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.durability = iprot.readI32()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('WriterOptions')
- if self.maxMemory is not None:
- oprot.writeFieldBegin('maxMemory', TType.I64, 1)
- oprot.writeI64(self.maxMemory)
- oprot.writeFieldEnd()
- if self.latencyMs is not None:
- oprot.writeFieldBegin('latencyMs', TType.I64, 2)
- oprot.writeI64(self.latencyMs)
- oprot.writeFieldEnd()
- if self.timeoutMs is not None:
- oprot.writeFieldBegin('timeoutMs', TType.I64, 3)
- oprot.writeI64(self.timeoutMs)
- oprot.writeFieldEnd()
- if self.threads is not None:
- oprot.writeFieldBegin('threads', TType.I32, 4)
- oprot.writeI32(self.threads)
- oprot.writeFieldEnd()
- if self.durability is not None:
- oprot.writeFieldBegin('durability', TType.I32, 5)
- oprot.writeI32(self.durability)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.maxMemory)
- value = (value * 31) ^ hash(self.latencyMs)
- value = (value * 31) ^ hash(self.timeoutMs)
- value = (value * 31) ^ hash(self.threads)
- value = (value * 31) ^ hash(self.durability)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-class CompactionStrategyConfig:
- """
- Attributes:
- - className
- - options
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'className', None, None, ), # 1
- (2, TType.MAP, 'options', (TType.STRING,None,TType.STRING,None), None, ), # 2
- )
-
- def __init__(self, className=None, options=None,):
- self.className = className
- self.options = options
-
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.className = iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.MAP:
- self.options = {}
- (_ktype136, _vtype137, _size135 ) = iprot.readMapBegin()
- for _i139 in xrange(_size135):
- _key140 = iprot.readString()
- _val141 = iprot.readString()
- self.options[_key140] = _val141
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('CompactionStrategyConfig')
- if self.className is not None:
- oprot.writeFieldBegin('className', TType.STRING, 1)
- oprot.writeString(self.className)
- oprot.writeFieldEnd()
- if self.options is not None:
- oprot.writeFieldBegin('options', TType.MAP, 2)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.options))
- for kiter142,viter143 in self.options.items():
- oprot.writeString(kiter142)
- oprot.writeString(viter143)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
-
- def __hash__(self):
- value = 17
- value = (value * 31) ^ hash(self.className)
- value = (value * 31) ^ hash(self.options)
- return value
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
+
+
+class PartialKey(object):
+ ROW = 0
+ ROW_COLFAM = 1
+ ROW_COLFAM_COLQUAL = 2
+ ROW_COLFAM_COLQUAL_COLVIS = 3
+ ROW_COLFAM_COLQUAL_COLVIS_TIME = 4
+ ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL = 5
+
+ _VALUES_TO_NAMES = {
+ 0: "ROW",
+ 1: "ROW_COLFAM",
+ 2: "ROW_COLFAM_COLQUAL",
+ 3: "ROW_COLFAM_COLQUAL_COLVIS",
+ 4: "ROW_COLFAM_COLQUAL_COLVIS_TIME",
+ 5: "ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL",
+ }
+
+ _NAMES_TO_VALUES = {
+ "ROW": 0,
+ "ROW_COLFAM": 1,
+ "ROW_COLFAM_COLQUAL": 2,
+ "ROW_COLFAM_COLQUAL_COLVIS": 3,
+ "ROW_COLFAM_COLQUAL_COLVIS_TIME": 4,
+ "ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL": 5,
+ }
+
+
+class TablePermission(object):
+ READ = 2
+ WRITE = 3
+ BULK_IMPORT = 4
+ ALTER_TABLE = 5
+ GRANT = 6
+ DROP_TABLE = 7
+
+ _VALUES_TO_NAMES = {
+ 2: "READ",
+ 3: "WRITE",
+ 4: "BULK_IMPORT",
+ 5: "ALTER_TABLE",
+ 6: "GRANT",
+ 7: "DROP_TABLE",
+ }
+
+ _NAMES_TO_VALUES = {
+ "READ": 2,
+ "WRITE": 3,
+ "BULK_IMPORT": 4,
+ "ALTER_TABLE": 5,
+ "GRANT": 6,
+ "DROP_TABLE": 7,
+ }
+
+
+class SystemPermission(object):
+ GRANT = 0
+ CREATE_TABLE = 1
+ DROP_TABLE = 2
+ ALTER_TABLE = 3
+ CREATE_USER = 4
+ DROP_USER = 5
+ ALTER_USER = 6
+ SYSTEM = 7
+
+ _VALUES_TO_NAMES = {
+ 0: "GRANT",
+ 1: "CREATE_TABLE",
+ 2: "DROP_TABLE",
+ 3: "ALTER_TABLE",
+ 4: "CREATE_USER",
+ 5: "DROP_USER",
+ 6: "ALTER_USER",
+ 7: "SYSTEM",
+ }
+
+ _NAMES_TO_VALUES = {
+ "GRANT": 0,
+ "CREATE_TABLE": 1,
+ "DROP_TABLE": 2,
+ "ALTER_TABLE": 3,
+ "CREATE_USER": 4,
+ "DROP_USER": 5,
+ "ALTER_USER": 6,
+ "SYSTEM": 7,
+ }
+
+
+class NamespacePermission(object):
+ READ = 0
+ WRITE = 1
+ ALTER_NAMESPACE = 2
+ GRANT = 3
+ ALTER_TABLE = 4
+ CREATE_TABLE = 5
+ DROP_TABLE = 6
+ BULK_IMPORT = 7
+ DROP_NAMESPACE = 8
+
+ _VALUES_TO_NAMES = {
+ 0: "READ",
+ 1: "WRITE",
+ 2: "ALTER_NAMESPACE",
+ 3: "GRANT",
+ 4: "ALTER_TABLE",
+ 5: "CREATE_TABLE",
+ 6: "DROP_TABLE",
+ 7: "BULK_IMPORT",
+ 8: "DROP_NAMESPACE",
+ }
+
+ _NAMES_TO_VALUES = {
+ "READ": 0,
+ "WRITE": 1,
+ "ALTER_NAMESPACE": 2,
+ "GRANT": 3,
+ "ALTER_TABLE": 4,
+ "CREATE_TABLE": 5,
+ "DROP_TABLE": 6,
+ "BULK_IMPORT": 7,
+ "DROP_NAMESPACE": 8,
+ }
+
+
+class ScanType(object):
+ SINGLE = 0
+ BATCH = 1
+
+ _VALUES_TO_NAMES = {
+ 0: "SINGLE",
+ 1: "BATCH",
+ }
+
+ _NAMES_TO_VALUES = {
+ "SINGLE": 0,
+ "BATCH": 1,
+ }
+
+
+class ScanState(object):
+ IDLE = 0
+ RUNNING = 1
+ QUEUED = 2
+
+ _VALUES_TO_NAMES = {
+ 0: "IDLE",
+ 1: "RUNNING",
+ 2: "QUEUED",
+ }
+
+ _NAMES_TO_VALUES = {
+ "IDLE": 0,
+ "RUNNING": 1,
+ "QUEUED": 2,
+ }
+
+
+class ConditionalStatus(object):
+ ACCEPTED = 0
+ REJECTED = 1
+ VIOLATED = 2
+ UNKNOWN = 3
+ INVISIBLE_VISIBILITY = 4
+
+ _VALUES_TO_NAMES = {
+ 0: "ACCEPTED",
+ 1: "REJECTED",
+ 2: "VIOLATED",
+ 3: "UNKNOWN",
+ 4: "INVISIBLE_VISIBILITY",
+ }
+
+ _NAMES_TO_VALUES = {
+ "ACCEPTED": 0,
+ "REJECTED": 1,
+ "VIOLATED": 2,
+ "UNKNOWN": 3,
+ "INVISIBLE_VISIBILITY": 4,
+ }
+
+
+class Durability(object):
+ DEFAULT = 0
+ NONE = 1
+ LOG = 2
+ FLUSH = 3
+ SYNC = 4
+
+ _VALUES_TO_NAMES = {
+ 0: "DEFAULT",
+ 1: "NONE",
+ 2: "LOG",
+ 3: "FLUSH",
+ 4: "SYNC",
+ }
+
+ _NAMES_TO_VALUES = {
+ "DEFAULT": 0,
+ "NONE": 1,
+ "LOG": 2,
+ "FLUSH": 3,
+ "SYNC": 4,
+ }
+
+
+class CompactionType(object):
+ MINOR = 0
+ MERGE = 1
+ MAJOR = 2
+ FULL = 3
+
+ _VALUES_TO_NAMES = {
+ 0: "MINOR",
+ 1: "MERGE",
+ 2: "MAJOR",
+ 3: "FULL",
+ }
+
+ _NAMES_TO_VALUES = {
+ "MINOR": 0,
+ "MERGE": 1,
+ "MAJOR": 2,
+ "FULL": 3,
+ }
+
+
+class CompactionReason(object):
+ USER = 0
+ SYSTEM = 1
+ CHOP = 2
+ IDLE = 3
+ CLOSE = 4
+
+ _VALUES_TO_NAMES = {
+ 0: "USER",
+ 1: "SYSTEM",
+ 2: "CHOP",
+ 3: "IDLE",
+ 4: "CLOSE",
+ }
+
+ _NAMES_TO_VALUES = {
+ "USER": 0,
+ "SYSTEM": 1,
+ "CHOP": 2,
+ "IDLE": 3,
+ "CLOSE": 4,
+ }
+
+
+class IteratorScope(object):
+ MINC = 0
+ MAJC = 1
+ SCAN = 2
+
+ _VALUES_TO_NAMES = {
+ 0: "MINC",
+ 1: "MAJC",
+ 2: "SCAN",
+ }
+
+ _NAMES_TO_VALUES = {
+ "MINC": 0,
+ "MAJC": 1,
+ "SCAN": 2,
+ }
+
+
+class TimeType(object):
+ LOGICAL = 0
+ MILLIS = 1
+
+ _VALUES_TO_NAMES = {
+ 0: "LOGICAL",
+ 1: "MILLIS",
+ }
+
+ _NAMES_TO_VALUES = {
+ "LOGICAL": 0,
+ "MILLIS": 1,
+ }
+
+
+class Key(object):
+ """
+ Attributes:
+ - row
+ - colFamily
+ - colQualifier
+ - colVisibility
+ - timestamp
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'row', 'BINARY', None, ), # 1
+ (2, TType.STRING, 'colFamily', 'BINARY', None, ), # 2
+ (3, TType.STRING, 'colQualifier', 'BINARY', None, ), # 3
+ (4, TType.STRING, 'colVisibility', 'BINARY', None, ), # 4
+ (5, TType.I64, 'timestamp', None, 9223372036854775807, ), # 5
+ )
+
+ def __init__(self, row=None, colFamily=None, colQualifier=None, colVisibility=None, timestamp=thrift_spec[5][4],):
+ self.row = row
+ self.colFamily = colFamily
+ self.colQualifier = colQualifier
+ self.colVisibility = colVisibility
+ self.timestamp = timestamp
+
+ def read(self, iprot):
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
+ iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.row = iprot.readBinary()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.colFamily = iprot.readBinary()
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRING:
+ self.colQualifier = iprot.readBinary()
+
<TRUNCATED>
[34/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TCondition.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCondition.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCondition.java
index 2a4e131..6fec05b 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCondition.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCondition.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TCondition implements org.apache.thrift.TBase<TCondition, TCondition._Fields>, java.io.Serializable, Cloneable, Comparable<TCondition> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCondition");
@@ -62,19 +35,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
private static final org.apache.thrift.protocol.TField VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("val", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators", org.apache.thrift.protocol.TType.STRING, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TConditionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TConditionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TConditionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TConditionTupleSchemeFactory();
- public ByteBuffer cf; // required
- public ByteBuffer cq; // required
- public ByteBuffer cv; // required
+ public java.nio.ByteBuffer cf; // required
+ public java.nio.ByteBuffer cq; // required
+ public java.nio.ByteBuffer cv; // required
public long ts; // required
public boolean hasTimestamp; // required
- public ByteBuffer val; // required
- public ByteBuffer iterators; // required
+ public java.nio.ByteBuffer val; // required
+ public java.nio.ByteBuffer iterators; // 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 {
@@ -86,10 +56,10 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
VAL((short)6, "val"),
ITERATORS((short)7, "iterators");
- 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);
}
}
@@ -124,21 +94,21 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
*/
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;
}
@@ -147,7 +117,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -156,9 +126,9 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
private static final int __TS_ISSET_ID = 0;
private static final int __HASTIMESTAMP_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CF, new org.apache.thrift.meta_data.FieldMetaData("cf", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.CQ, new org.apache.thrift.meta_data.FieldMetaData("cq", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -173,7 +143,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.ITERATORS, new org.apache.thrift.meta_data.FieldMetaData("iterators", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCondition.class, metaDataMap);
}
@@ -181,13 +151,13 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
public TCondition(
- ByteBuffer cf,
- ByteBuffer cq,
- ByteBuffer cv,
+ java.nio.ByteBuffer cf,
+ java.nio.ByteBuffer cq,
+ java.nio.ByteBuffer cv,
long ts,
boolean hasTimestamp,
- ByteBuffer val,
- ByteBuffer iterators)
+ java.nio.ByteBuffer val,
+ java.nio.ByteBuffer iterators)
{
this();
this.cf = org.apache.thrift.TBaseHelper.copyBinary(cf);
@@ -247,16 +217,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return cf == null ? null : cf.array();
}
- public ByteBuffer bufferForCf() {
+ public java.nio.ByteBuffer bufferForCf() {
return org.apache.thrift.TBaseHelper.copyBinary(cf);
}
public TCondition setCf(byte[] cf) {
- this.cf = cf == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(cf, cf.length));
+ this.cf = cf == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(cf.clone());
return this;
}
- public TCondition setCf(ByteBuffer cf) {
+ public TCondition setCf(java.nio.ByteBuffer cf) {
this.cf = org.apache.thrift.TBaseHelper.copyBinary(cf);
return this;
}
@@ -281,16 +251,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return cq == null ? null : cq.array();
}
- public ByteBuffer bufferForCq() {
+ public java.nio.ByteBuffer bufferForCq() {
return org.apache.thrift.TBaseHelper.copyBinary(cq);
}
public TCondition setCq(byte[] cq) {
- this.cq = cq == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(cq, cq.length));
+ this.cq = cq == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(cq.clone());
return this;
}
- public TCondition setCq(ByteBuffer cq) {
+ public TCondition setCq(java.nio.ByteBuffer cq) {
this.cq = org.apache.thrift.TBaseHelper.copyBinary(cq);
return this;
}
@@ -315,16 +285,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return cv == null ? null : cv.array();
}
- public ByteBuffer bufferForCv() {
+ public java.nio.ByteBuffer bufferForCv() {
return org.apache.thrift.TBaseHelper.copyBinary(cv);
}
public TCondition setCv(byte[] cv) {
- this.cv = cv == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(cv, cv.length));
+ this.cv = cv == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(cv.clone());
return this;
}
- public TCondition setCv(ByteBuffer cv) {
+ public TCondition setCv(java.nio.ByteBuffer cv) {
this.cv = org.apache.thrift.TBaseHelper.copyBinary(cv);
return this;
}
@@ -355,16 +325,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
public void unsetTs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TS_ISSET_ID);
}
/** Returns true if field ts is set (has been assigned a value) and false otherwise */
public boolean isSetTs() {
- return EncodingUtils.testBit(__isset_bitfield, __TS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TS_ISSET_ID);
}
public void setTsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TS_ISSET_ID, value);
}
public boolean isHasTimestamp() {
@@ -378,16 +348,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
public void unsetHasTimestamp() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASTIMESTAMP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASTIMESTAMP_ISSET_ID);
}
/** Returns true if field hasTimestamp is set (has been assigned a value) and false otherwise */
public boolean isSetHasTimestamp() {
- return EncodingUtils.testBit(__isset_bitfield, __HASTIMESTAMP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASTIMESTAMP_ISSET_ID);
}
public void setHasTimestampIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASTIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASTIMESTAMP_ISSET_ID, value);
}
public byte[] getVal() {
@@ -395,16 +365,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return val == null ? null : val.array();
}
- public ByteBuffer bufferForVal() {
+ public java.nio.ByteBuffer bufferForVal() {
return org.apache.thrift.TBaseHelper.copyBinary(val);
}
public TCondition setVal(byte[] val) {
- this.val = val == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(val, val.length));
+ this.val = val == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(val.clone());
return this;
}
- public TCondition setVal(ByteBuffer val) {
+ public TCondition setVal(java.nio.ByteBuffer val) {
this.val = org.apache.thrift.TBaseHelper.copyBinary(val);
return this;
}
@@ -429,16 +399,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return iterators == null ? null : iterators.array();
}
- public ByteBuffer bufferForIterators() {
+ public java.nio.ByteBuffer bufferForIterators() {
return org.apache.thrift.TBaseHelper.copyBinary(iterators);
}
public TCondition setIterators(byte[] iterators) {
- this.iterators = iterators == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(iterators, iterators.length));
+ this.iterators = iterators == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(iterators.clone());
return this;
}
- public TCondition setIterators(ByteBuffer iterators) {
+ public TCondition setIterators(java.nio.ByteBuffer iterators) {
this.iterators = org.apache.thrift.TBaseHelper.copyBinary(iterators);
return this;
}
@@ -458,13 +428,17 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CF:
if (value == null) {
unsetCf();
} else {
- setCf((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setCf((byte[])value);
+ } else {
+ setCf((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -472,7 +446,11 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
if (value == null) {
unsetCq();
} else {
- setCq((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setCq((byte[])value);
+ } else {
+ setCq((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -480,7 +458,11 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
if (value == null) {
unsetCv();
} else {
- setCv((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setCv((byte[])value);
+ } else {
+ setCv((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -488,7 +470,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
if (value == null) {
unsetTs();
} else {
- setTs((Long)value);
+ setTs((java.lang.Long)value);
}
break;
@@ -496,7 +478,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
if (value == null) {
unsetHasTimestamp();
} else {
- setHasTimestamp((Boolean)value);
+ setHasTimestamp((java.lang.Boolean)value);
}
break;
@@ -504,7 +486,11 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
if (value == null) {
unsetVal();
} else {
- setVal((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setVal((byte[])value);
+ } else {
+ setVal((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -512,14 +498,18 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
if (value == null) {
unsetIterators();
} else {
- setIterators((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setIterators((byte[])value);
+ } else {
+ setIterators((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CF:
return getCf();
@@ -543,13 +533,13 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return getIterators();
}
- 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) {
@@ -568,11 +558,11 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
case ITERATORS:
return isSetIterators();
}
- 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 TCondition)
@@ -583,6 +573,8 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
public boolean equals(TCondition that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_cf = true && this.isSetCf();
boolean that_present_cf = true && that.isSetCf();
@@ -652,44 +644,33 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_cf = true && (isSetCf());
- list.add(present_cf);
- if (present_cf)
- list.add(cf);
+ hashCode = hashCode * 8191 + ((isSetCf()) ? 131071 : 524287);
+ if (isSetCf())
+ hashCode = hashCode * 8191 + cf.hashCode();
- boolean present_cq = true && (isSetCq());
- list.add(present_cq);
- if (present_cq)
- list.add(cq);
+ hashCode = hashCode * 8191 + ((isSetCq()) ? 131071 : 524287);
+ if (isSetCq())
+ hashCode = hashCode * 8191 + cq.hashCode();
- boolean present_cv = true && (isSetCv());
- list.add(present_cv);
- if (present_cv)
- list.add(cv);
+ hashCode = hashCode * 8191 + ((isSetCv()) ? 131071 : 524287);
+ if (isSetCv())
+ hashCode = hashCode * 8191 + cv.hashCode();
- boolean present_ts = true;
- list.add(present_ts);
- if (present_ts)
- list.add(ts);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(ts);
- boolean present_hasTimestamp = true;
- list.add(present_hasTimestamp);
- if (present_hasTimestamp)
- list.add(hasTimestamp);
+ hashCode = hashCode * 8191 + ((hasTimestamp) ? 131071 : 524287);
- boolean present_val = true && (isSetVal());
- list.add(present_val);
- if (present_val)
- list.add(val);
+ hashCode = hashCode * 8191 + ((isSetVal()) ? 131071 : 524287);
+ if (isSetVal())
+ hashCode = hashCode * 8191 + val.hashCode();
- boolean present_iterators = true && (isSetIterators());
- list.add(present_iterators);
- if (present_iterators)
- list.add(iterators);
+ hashCode = hashCode * 8191 + ((isSetIterators()) ? 131071 : 524287);
+ if (isSetIterators())
+ hashCode = hashCode * 8191 + iterators.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -700,7 +681,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetCf()).compareTo(other.isSetCf());
+ lastComparison = java.lang.Boolean.valueOf(isSetCf()).compareTo(other.isSetCf());
if (lastComparison != 0) {
return lastComparison;
}
@@ -710,7 +691,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCq()).compareTo(other.isSetCq());
+ lastComparison = java.lang.Boolean.valueOf(isSetCq()).compareTo(other.isSetCq());
if (lastComparison != 0) {
return lastComparison;
}
@@ -720,7 +701,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCv()).compareTo(other.isSetCv());
+ lastComparison = java.lang.Boolean.valueOf(isSetCv()).compareTo(other.isSetCv());
if (lastComparison != 0) {
return lastComparison;
}
@@ -730,7 +711,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTs()).compareTo(other.isSetTs());
+ lastComparison = java.lang.Boolean.valueOf(isSetTs()).compareTo(other.isSetTs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -740,7 +721,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHasTimestamp()).compareTo(other.isSetHasTimestamp());
+ lastComparison = java.lang.Boolean.valueOf(isSetHasTimestamp()).compareTo(other.isSetHasTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -750,7 +731,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVal()).compareTo(other.isSetVal());
+ lastComparison = java.lang.Boolean.valueOf(isSetVal()).compareTo(other.isSetVal());
if (lastComparison != 0) {
return lastComparison;
}
@@ -760,7 +741,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
+ lastComparison = java.lang.Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
if (lastComparison != 0) {
return lastComparison;
}
@@ -778,16 +759,16 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
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("TCondition(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TCondition(");
boolean first = true;
sb.append("cf:");
@@ -854,7 +835,7 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -864,13 +845,13 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
}
- private static class TConditionStandardSchemeFactory implements SchemeFactory {
+ private static class TConditionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConditionStandardScheme getScheme() {
return new TConditionStandardScheme();
}
}
- private static class TConditionStandardScheme extends StandardScheme<TCondition> {
+ private static class TConditionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCondition> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCondition struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -990,18 +971,18 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
- private static class TConditionTupleSchemeFactory implements SchemeFactory {
+ private static class TConditionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConditionTupleScheme getScheme() {
return new TConditionTupleScheme();
}
}
- private static class TConditionTupleScheme extends TupleScheme<TCondition> {
+ private static class TConditionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCondition> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCondition 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.isSetCf()) {
optionals.set(0);
}
@@ -1049,8 +1030,8 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCondition struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.cf = iprot.readBinary();
struct.setCfIsSet(true);
@@ -1082,5 +1063,9 @@ public class TCondition implements org.apache.thrift.TBase<TCondition, TConditio
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalMutation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalMutation.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalMutation.java
index 98b9e97..86dbb9a 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalMutation.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalMutation.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TConditionalMutation implements org.apache.thrift.TBase<TConditionalMutation, TConditionalMutation._Fields>, java.io.Serializable, Cloneable, Comparable<TConditionalMutation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TConditionalMutation");
@@ -58,13 +31,10 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
private static final org.apache.thrift.protocol.TField MUTATION_FIELD_DESC = new org.apache.thrift.protocol.TField("mutation", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TConditionalMutationStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TConditionalMutationTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TConditionalMutationStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TConditionalMutationTupleSchemeFactory();
- public List<TCondition> conditions; // required
+ public java.util.List<TCondition> conditions; // required
public TMutation mutation; // required
public long id; // required
@@ -74,10 +44,10 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
MUTATION((short)2, "mutation"),
ID((short)3, "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);
}
}
@@ -104,21 +74,21 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
*/
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;
}
@@ -127,7 +97,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -135,9 +105,9 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
// isset id assignments
private static final int __ID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CONDITIONS, new org.apache.thrift.meta_data.FieldMetaData("conditions", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCondition.class))));
@@ -145,7 +115,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TMutation.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.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TConditionalMutation.class, metaDataMap);
}
@@ -153,7 +123,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
}
public TConditionalMutation(
- List<TCondition> conditions,
+ java.util.List<TCondition> conditions,
TMutation mutation,
long id)
{
@@ -170,7 +140,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
public TConditionalMutation(TConditionalMutation other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetConditions()) {
- List<TCondition> __this__conditions = new ArrayList<TCondition>(other.conditions.size());
+ java.util.List<TCondition> __this__conditions = new java.util.ArrayList<TCondition>(other.conditions.size());
for (TCondition other_element : other.conditions) {
__this__conditions.add(new TCondition(other_element));
}
@@ -204,16 +174,16 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
public void addToConditions(TCondition elem) {
if (this.conditions == null) {
- this.conditions = new ArrayList<TCondition>();
+ this.conditions = new java.util.ArrayList<TCondition>();
}
this.conditions.add(elem);
}
- public List<TCondition> getConditions() {
+ public java.util.List<TCondition> getConditions() {
return this.conditions;
}
- public TConditionalMutation setConditions(List<TCondition> conditions) {
+ public TConditionalMutation setConditions(java.util.List<TCondition> conditions) {
this.conditions = conditions;
return this;
}
@@ -268,25 +238,25 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
}
public void unsetId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
- return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CONDITIONS:
if (value == null) {
unsetConditions();
} else {
- setConditions((List<TCondition>)value);
+ setConditions((java.util.List<TCondition>)value);
}
break;
@@ -302,14 +272,14 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
if (value == null) {
unsetId();
} else {
- setId((Long)value);
+ setId((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CONDITIONS:
return getConditions();
@@ -321,13 +291,13 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
return getId();
}
- 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) {
@@ -338,11 +308,11 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
case ID:
return isSetId();
}
- 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 TConditionalMutation)
@@ -353,6 +323,8 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
public boolean equals(TConditionalMutation that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_conditions = true && this.isSetConditions();
boolean that_present_conditions = true && that.isSetConditions();
@@ -386,24 +358,19 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_conditions = true && (isSetConditions());
- list.add(present_conditions);
- if (present_conditions)
- list.add(conditions);
+ hashCode = hashCode * 8191 + ((isSetConditions()) ? 131071 : 524287);
+ if (isSetConditions())
+ hashCode = hashCode * 8191 + conditions.hashCode();
- boolean present_mutation = true && (isSetMutation());
- list.add(present_mutation);
- if (present_mutation)
- list.add(mutation);
+ hashCode = hashCode * 8191 + ((isSetMutation()) ? 131071 : 524287);
+ if (isSetMutation())
+ hashCode = hashCode * 8191 + mutation.hashCode();
- boolean present_id = true;
- list.add(present_id);
- if (present_id)
- list.add(id);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(id);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -414,7 +381,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetConditions()).compareTo(other.isSetConditions());
+ lastComparison = java.lang.Boolean.valueOf(isSetConditions()).compareTo(other.isSetConditions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -424,7 +391,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMutation()).compareTo(other.isSetMutation());
+ lastComparison = java.lang.Boolean.valueOf(isSetMutation()).compareTo(other.isSetMutation());
if (lastComparison != 0) {
return lastComparison;
}
@@ -434,7 +401,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
+ lastComparison = java.lang.Boolean.valueOf(isSetId()).compareTo(other.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -452,16 +419,16 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
}
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("TConditionalMutation(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TConditionalMutation(");
boolean first = true;
sb.append("conditions:");
@@ -503,7 +470,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -513,13 +480,13 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
}
}
- private static class TConditionalMutationStandardSchemeFactory implements SchemeFactory {
+ private static class TConditionalMutationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConditionalMutationStandardScheme getScheme() {
return new TConditionalMutationStandardScheme();
}
}
- private static class TConditionalMutationStandardScheme extends StandardScheme<TConditionalMutation> {
+ private static class TConditionalMutationStandardScheme extends org.apache.thrift.scheme.StandardScheme<TConditionalMutation> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TConditionalMutation struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -535,7 +502,7 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list86 = iprot.readListBegin();
- struct.conditions = new ArrayList<TCondition>(_list86.size);
+ struct.conditions = new java.util.ArrayList<TCondition>(_list86.size);
TCondition _elem87;
for (int _i88 = 0; _i88 < _list86.size; ++_i88)
{
@@ -608,18 +575,18 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
}
- private static class TConditionalMutationTupleSchemeFactory implements SchemeFactory {
+ private static class TConditionalMutationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConditionalMutationTupleScheme getScheme() {
return new TConditionalMutationTupleScheme();
}
}
- private static class TConditionalMutationTupleScheme extends TupleScheme<TConditionalMutation> {
+ private static class TConditionalMutationTupleScheme extends org.apache.thrift.scheme.TupleScheme<TConditionalMutation> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TConditionalMutation 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.isSetConditions()) {
optionals.set(0);
}
@@ -649,12 +616,12 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TConditionalMutation 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)) {
{
org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.conditions = new ArrayList<TCondition>(_list91.size);
+ struct.conditions = new java.util.ArrayList<TCondition>(_list91.size);
TCondition _elem92;
for (int _i93 = 0; _i93 < _list91.size; ++_i93)
{
@@ -677,5 +644,9 @@ public class TConditionalMutation implements org.apache.thrift.TBase<TConditiona
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalSession.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalSession.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalSession.java
index 8bab8cb..aea4732 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalSession.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TConditionalSession.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TConditionalSession implements org.apache.thrift.TBase<TConditionalSession, TConditionalSession._Fields>, java.io.Serializable, Cloneable, Comparable<TConditionalSession> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TConditionalSession");
@@ -58,14 +31,11 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
private static final org.apache.thrift.protocol.TField TSERVER_LOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("tserverLock", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField TTL_FIELD_DESC = new org.apache.thrift.protocol.TField("ttl", org.apache.thrift.protocol.TType.I64, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TConditionalSessionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TConditionalSessionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TConditionalSessionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TConditionalSessionTupleSchemeFactory();
public long sessionId; // required
- public String tserverLock; // required
+ public java.lang.String tserverLock; // required
public long ttl; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -74,10 +44,10 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
TSERVER_LOCK((short)2, "tserverLock"),
TTL((short)3, "ttl");
- 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);
}
}
@@ -104,21 +74,21 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
*/
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;
}
@@ -127,7 +97,7 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -136,16 +106,16 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
private static final int __SESSIONID_ISSET_ID = 0;
private static final int __TTL_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TSERVER_LOCK, new org.apache.thrift.meta_data.FieldMetaData("tserverLock", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TTL, new org.apache.thrift.meta_data.FieldMetaData("ttl", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TConditionalSession.class, metaDataMap);
}
@@ -154,7 +124,7 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
public TConditionalSession(
long sessionId,
- String tserverLock,
+ java.lang.String tserverLock,
long ttl)
{
this();
@@ -201,23 +171,23 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
}
public void unsetSessionId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID);
}
/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
- return EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID);
}
public void setSessionIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value);
}
- public String getTserverLock() {
+ public java.lang.String getTserverLock() {
return this.tserverLock;
}
- public TConditionalSession setTserverLock(String tserverLock) {
+ public TConditionalSession setTserverLock(java.lang.String tserverLock) {
this.tserverLock = tserverLock;
return this;
}
@@ -248,25 +218,25 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
}
public void unsetTtl() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID);
}
/** Returns true if field ttl is set (has been assigned a value) and false otherwise */
public boolean isSetTtl() {
- return EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID);
}
public void setTtlIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((Long)value);
+ setSessionId((java.lang.Long)value);
}
break;
@@ -274,7 +244,7 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
if (value == null) {
unsetTserverLock();
} else {
- setTserverLock((String)value);
+ setTserverLock((java.lang.String)value);
}
break;
@@ -282,14 +252,14 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
if (value == null) {
unsetTtl();
} else {
- setTtl((Long)value);
+ setTtl((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
@@ -301,13 +271,13 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
return getTtl();
}
- 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) {
@@ -318,11 +288,11 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
case TTL:
return isSetTtl();
}
- 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 TConditionalSession)
@@ -333,6 +303,8 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
public boolean equals(TConditionalSession that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true;
boolean that_present_sessionId = true;
@@ -366,24 +338,17 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true;
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId);
- boolean present_tserverLock = true && (isSetTserverLock());
- list.add(present_tserverLock);
- if (present_tserverLock)
- list.add(tserverLock);
+ hashCode = hashCode * 8191 + ((isSetTserverLock()) ? 131071 : 524287);
+ if (isSetTserverLock())
+ hashCode = hashCode * 8191 + tserverLock.hashCode();
- boolean present_ttl = true;
- list.add(present_ttl);
- if (present_ttl)
- list.add(ttl);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(ttl);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -394,7 +359,7 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -404,7 +369,7 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTserverLock()).compareTo(other.isSetTserverLock());
+ lastComparison = java.lang.Boolean.valueOf(isSetTserverLock()).compareTo(other.isSetTserverLock());
if (lastComparison != 0) {
return lastComparison;
}
@@ -414,7 +379,7 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTtl()).compareTo(other.isSetTtl());
+ lastComparison = java.lang.Boolean.valueOf(isSetTtl()).compareTo(other.isSetTtl());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,16 +397,16 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
}
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("TConditionalSession(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TConditionalSession(");
boolean first = true;
sb.append("sessionId:");
@@ -476,7 +441,7 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -486,13 +451,13 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
}
}
- private static class TConditionalSessionStandardSchemeFactory implements SchemeFactory {
+ private static class TConditionalSessionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConditionalSessionStandardScheme getScheme() {
return new TConditionalSessionStandardScheme();
}
}
- private static class TConditionalSessionStandardScheme extends StandardScheme<TConditionalSession> {
+ private static class TConditionalSessionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TConditionalSession> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TConditionalSession struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -560,18 +525,18 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
}
- private static class TConditionalSessionTupleSchemeFactory implements SchemeFactory {
+ private static class TConditionalSessionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConditionalSessionTupleScheme getScheme() {
return new TConditionalSessionTupleScheme();
}
}
- private static class TConditionalSessionTupleScheme extends TupleScheme<TConditionalSession> {
+ private static class TConditionalSessionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TConditionalSession> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TConditionalSession 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.isSetSessionId()) {
optionals.set(0);
}
@@ -595,8 +560,8 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TConditionalSession 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.sessionId = iprot.readI64();
struct.setSessionIdIsSet(true);
@@ -612,5 +577,9 @@ public class TConditionalSession implements org.apache.thrift.TBase<TConditional
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TConstraintViolationSummary.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TConstraintViolationSummary.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TConstraintViolationSummary.java
index 824fb5f..e351b19 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TConstraintViolationSummary.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TConstraintViolationSummary.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TConstraintViolationSummary implements org.apache.thrift.TBase<TConstraintViolationSummary, TConstraintViolationSummary._Fields>, java.io.Serializable, Cloneable, Comparable<TConstraintViolationSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TConstraintViolationSummary");
@@ -59,15 +32,12 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
private static final org.apache.thrift.protocol.TField VIOLATION_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("violationDescription", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField NUMBER_OF_VIOLATING_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfViolatingMutations", org.apache.thrift.protocol.TType.I64, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TConstraintViolationSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TConstraintViolationSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TConstraintViolationSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TConstraintViolationSummaryTupleSchemeFactory();
- public String constrainClass; // required
+ public java.lang.String constrainClass; // required
public short violationCode; // required
- public String violationDescription; // required
+ public java.lang.String violationDescription; // required
public long numberOfViolatingMutations; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -77,10 +47,10 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
VIOLATION_DESCRIPTION((short)3, "violationDescription"),
NUMBER_OF_VIOLATING_MUTATIONS((short)4, "numberOfViolatingMutations");
- 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);
}
}
@@ -109,21 +79,21 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
*/
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;
}
@@ -132,7 +102,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,9 +111,9 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
private static final int __VIOLATIONCODE_ISSET_ID = 0;
private static final int __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CONSTRAIN_CLASS, new org.apache.thrift.meta_data.FieldMetaData("constrainClass", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.VIOLATION_CODE, new org.apache.thrift.meta_data.FieldMetaData("violationCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -152,7 +122,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NUMBER_OF_VIOLATING_MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("numberOfViolatingMutations", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TConstraintViolationSummary.class, metaDataMap);
}
@@ -160,9 +130,9 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
}
public TConstraintViolationSummary(
- String constrainClass,
+ java.lang.String constrainClass,
short violationCode,
- String violationDescription,
+ java.lang.String violationDescription,
long numberOfViolatingMutations)
{
this();
@@ -203,11 +173,11 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
this.numberOfViolatingMutations = 0;
}
- public String getConstrainClass() {
+ public java.lang.String getConstrainClass() {
return this.constrainClass;
}
- public TConstraintViolationSummary setConstrainClass(String constrainClass) {
+ public TConstraintViolationSummary setConstrainClass(java.lang.String constrainClass) {
this.constrainClass = constrainClass;
return this;
}
@@ -238,23 +208,23 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
}
public void unsetViolationCode() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID);
}
/** Returns true if field violationCode is set (has been assigned a value) and false otherwise */
public boolean isSetViolationCode() {
- return EncodingUtils.testBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID);
}
public void setViolationCodeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VIOLATIONCODE_ISSET_ID, value);
}
- public String getViolationDescription() {
+ public java.lang.String getViolationDescription() {
return this.violationDescription;
}
- public TConstraintViolationSummary setViolationDescription(String violationDescription) {
+ public TConstraintViolationSummary setViolationDescription(java.lang.String violationDescription) {
this.violationDescription = violationDescription;
return this;
}
@@ -285,25 +255,25 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
}
public void unsetNumberOfViolatingMutations() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID);
}
/** Returns true if field numberOfViolatingMutations is set (has been assigned a value) and false otherwise */
public boolean isSetNumberOfViolatingMutations() {
- return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID);
}
public void setNumberOfViolatingMutationsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUMBEROFVIOLATINGMUTATIONS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CONSTRAIN_CLASS:
if (value == null) {
unsetConstrainClass();
} else {
- setConstrainClass((String)value);
+ setConstrainClass((java.lang.String)value);
}
break;
@@ -311,7 +281,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
if (value == null) {
unsetViolationCode();
} else {
- setViolationCode((Short)value);
+ setViolationCode((java.lang.Short)value);
}
break;
@@ -319,7 +289,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
if (value == null) {
unsetViolationDescription();
} else {
- setViolationDescription((String)value);
+ setViolationDescription((java.lang.String)value);
}
break;
@@ -327,14 +297,14 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
if (value == null) {
unsetNumberOfViolatingMutations();
} else {
- setNumberOfViolatingMutations((Long)value);
+ setNumberOfViolatingMutations((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CONSTRAIN_CLASS:
return getConstrainClass();
@@ -349,13 +319,13 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
return getNumberOfViolatingMutations();
}
- 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) {
@@ -368,11 +338,11 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
case NUMBER_OF_VIOLATING_MUTATIONS:
return isSetNumberOfViolatingMutations();
}
- 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 TConstraintViolationSummary)
@@ -383,6 +353,8 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
public boolean equals(TConstraintViolationSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_constrainClass = true && this.isSetConstrainClass();
boolean that_present_constrainClass = true && that.isSetConstrainClass();
@@ -425,29 +397,21 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_constrainClass = true && (isSetConstrainClass());
- list.add(present_constrainClass);
- if (present_constrainClass)
- list.add(constrainClass);
+ hashCode = hashCode * 8191 + ((isSetConstrainClass()) ? 131071 : 524287);
+ if (isSetConstrainClass())
+ hashCode = hashCode * 8191 + constrainClass.hashCode();
- boolean present_violationCode = true;
- list.add(present_violationCode);
- if (present_violationCode)
- list.add(violationCode);
+ hashCode = hashCode * 8191 + violationCode;
- boolean present_violationDescription = true && (isSetViolationDescription());
- list.add(present_violationDescription);
- if (present_violationDescription)
- list.add(violationDescription);
+ hashCode = hashCode * 8191 + ((isSetViolationDescription()) ? 131071 : 524287);
+ if (isSetViolationDescription())
+ hashCode = hashCode * 8191 + violationDescription.hashCode();
- boolean present_numberOfViolatingMutations = true;
- list.add(present_numberOfViolatingMutations);
- if (present_numberOfViolatingMutations)
- list.add(numberOfViolatingMutations);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(numberOfViolatingMutations);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -458,7 +422,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetConstrainClass()).compareTo(other.isSetConstrainClass());
+ lastComparison = java.lang.Boolean.valueOf(isSetConstrainClass()).compareTo(other.isSetConstrainClass());
if (lastComparison != 0) {
return lastComparison;
}
@@ -468,7 +432,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetViolationCode()).compareTo(other.isSetViolationCode());
+ lastComparison = java.lang.Boolean.valueOf(isSetViolationCode()).compareTo(other.isSetViolationCode());
if (lastComparison != 0) {
return lastComparison;
}
@@ -478,7 +442,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetViolationDescription()).compareTo(other.isSetViolationDescription());
+ lastComparison = java.lang.Boolean.valueOf(isSetViolationDescription()).compareTo(other.isSetViolationDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -488,7 +452,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNumberOfViolatingMutations()).compareTo(other.isSetNumberOfViolatingMutations());
+ lastComparison = java.lang.Boolean.valueOf(isSetNumberOfViolatingMutations()).compareTo(other.isSetNumberOfViolatingMutations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -506,16 +470,16 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
}
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("TConstraintViolationSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TConstraintViolationSummary(");
boolean first = true;
sb.append("constrainClass:");
@@ -558,7 +522,7 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -568,13 +532,13 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
}
}
- private static class TConstraintViolationSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class TConstraintViolationSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConstraintViolationSummaryStandardScheme getScheme() {
return new TConstraintViolationSummaryStandardScheme();
}
}
- private static class TConstraintViolationSummaryStandardScheme extends StandardScheme<TConstraintViolationSummary> {
+ private static class TConstraintViolationSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<TConstraintViolationSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TConstraintViolationSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -655,18 +619,18 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
}
- private static class TConstraintViolationSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class TConstraintViolationSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TConstraintViolationSummaryTupleScheme getScheme() {
return new TConstraintViolationSummaryTupleScheme();
}
}
- private static class TConstraintViolationSummaryTupleScheme extends TupleScheme<TConstraintViolationSummary> {
+ private static class TConstraintViolationSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<TConstraintViolationSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TConstraintViolationSummary 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.isSetConstrainClass()) {
optionals.set(0);
}
@@ -696,8 +660,8 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TConstraintViolationSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.constrainClass = iprot.readString();
struct.setConstrainClassIsSet(true);
@@ -717,5 +681,9 @@ public class TConstraintViolationSummary implements org.apache.thrift.TBase<TCon
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[11/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalWriterOptions.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalWriterOptions.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalWriterOptions.java
index 16c78a3..cd3ce5d 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalWriterOptions.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalWriterOptions.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ConditionalWriterOptions implements org.apache.thrift.TBase<ConditionalWriterOptions, ConditionalWriterOptions._Fields>, java.io.Serializable, Cloneable, Comparable<ConditionalWriterOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ConditionalWriterOptions");
@@ -60,16 +33,13 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
private static final org.apache.thrift.protocol.TField AUTHORIZATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("authorizations", org.apache.thrift.protocol.TType.SET, (short)4);
private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ConditionalWriterOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ConditionalWriterOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ConditionalWriterOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ConditionalWriterOptionsTupleSchemeFactory();
public long maxMemory; // optional
public long timeoutMs; // optional
public int threads; // optional
- public Set<ByteBuffer> authorizations; // optional
+ public java.util.Set<java.nio.ByteBuffer> authorizations; // optional
/**
*
* @see Durability
@@ -88,10 +58,10 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
*/
DURABILITY((short)5, "durability");
- 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);
}
}
@@ -122,21 +92,21 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
*/
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;
}
@@ -145,7 +115,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -156,9 +126,9 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
private static final int __THREADS_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.MAX_MEMORY,_Fields.TIMEOUT_MS,_Fields.THREADS,_Fields.AUTHORIZATIONS,_Fields.DURABILITY};
- 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.MAX_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("maxMemory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("timeoutMs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -170,7 +140,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.DURABILITY, new org.apache.thrift.meta_data.FieldMetaData("durability", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Durability.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ConditionalWriterOptions.class, metaDataMap);
}
@@ -186,7 +156,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
this.timeoutMs = other.timeoutMs;
this.threads = other.threads;
if (other.isSetAuthorizations()) {
- Set<ByteBuffer> __this__authorizations = new HashSet<ByteBuffer>(other.authorizations);
+ java.util.Set<java.nio.ByteBuffer> __this__authorizations = new java.util.HashSet<java.nio.ByteBuffer>(other.authorizations);
this.authorizations = __this__authorizations;
}
if (other.isSetDurability()) {
@@ -221,16 +191,16 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
public void unsetMaxMemory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXMEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXMEMORY_ISSET_ID);
}
/** Returns true if field maxMemory is set (has been assigned a value) and false otherwise */
public boolean isSetMaxMemory() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXMEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXMEMORY_ISSET_ID);
}
public void setMaxMemoryIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXMEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXMEMORY_ISSET_ID, value);
}
public long getTimeoutMs() {
@@ -244,16 +214,16 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
public void unsetTimeoutMs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
/** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */
public boolean isSetTimeoutMs() {
- return EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
public void setTimeoutMsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
}
public int getThreads() {
@@ -267,38 +237,38 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
public void unsetThreads() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THREADS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THREADS_ISSET_ID);
}
/** Returns true if field threads is set (has been assigned a value) and false otherwise */
public boolean isSetThreads() {
- return EncodingUtils.testBit(__isset_bitfield, __THREADS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THREADS_ISSET_ID);
}
public void setThreadsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THREADS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THREADS_ISSET_ID, value);
}
public int getAuthorizationsSize() {
return (this.authorizations == null) ? 0 : this.authorizations.size();
}
- public java.util.Iterator<ByteBuffer> getAuthorizationsIterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> getAuthorizationsIterator() {
return (this.authorizations == null) ? null : this.authorizations.iterator();
}
- public void addToAuthorizations(ByteBuffer elem) {
+ public void addToAuthorizations(java.nio.ByteBuffer elem) {
if (this.authorizations == null) {
- this.authorizations = new HashSet<ByteBuffer>();
+ this.authorizations = new java.util.HashSet<java.nio.ByteBuffer>();
}
this.authorizations.add(elem);
}
- public Set<ByteBuffer> getAuthorizations() {
+ public java.util.Set<java.nio.ByteBuffer> getAuthorizations() {
return this.authorizations;
}
- public ConditionalWriterOptions setAuthorizations(Set<ByteBuffer> authorizations) {
+ public ConditionalWriterOptions setAuthorizations(java.util.Set<java.nio.ByteBuffer> authorizations) {
this.authorizations = authorizations;
return this;
}
@@ -350,13 +320,13 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MAX_MEMORY:
if (value == null) {
unsetMaxMemory();
} else {
- setMaxMemory((Long)value);
+ setMaxMemory((java.lang.Long)value);
}
break;
@@ -364,7 +334,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
if (value == null) {
unsetTimeoutMs();
} else {
- setTimeoutMs((Long)value);
+ setTimeoutMs((java.lang.Long)value);
}
break;
@@ -372,7 +342,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
if (value == null) {
unsetThreads();
} else {
- setThreads((Integer)value);
+ setThreads((java.lang.Integer)value);
}
break;
@@ -380,7 +350,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
if (value == null) {
unsetAuthorizations();
} else {
- setAuthorizations((Set<ByteBuffer>)value);
+ setAuthorizations((java.util.Set<java.nio.ByteBuffer>)value);
}
break;
@@ -395,7 +365,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MAX_MEMORY:
return getMaxMemory();
@@ -413,13 +383,13 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
return getDurability();
}
- 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) {
@@ -434,11 +404,11 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
case DURABILITY:
return isSetDurability();
}
- 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 ConditionalWriterOptions)
@@ -449,6 +419,8 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
public boolean equals(ConditionalWriterOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_maxMemory = true && this.isSetMaxMemory();
boolean that_present_maxMemory = true && that.isSetMaxMemory();
@@ -500,34 +472,29 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_maxMemory = true && (isSetMaxMemory());
- list.add(present_maxMemory);
- if (present_maxMemory)
- list.add(maxMemory);
+ hashCode = hashCode * 8191 + ((isSetMaxMemory()) ? 131071 : 524287);
+ if (isSetMaxMemory())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(maxMemory);
- boolean present_timeoutMs = true && (isSetTimeoutMs());
- list.add(present_timeoutMs);
- if (present_timeoutMs)
- list.add(timeoutMs);
+ hashCode = hashCode * 8191 + ((isSetTimeoutMs()) ? 131071 : 524287);
+ if (isSetTimeoutMs())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs);
- boolean present_threads = true && (isSetThreads());
- list.add(present_threads);
- if (present_threads)
- list.add(threads);
+ hashCode = hashCode * 8191 + ((isSetThreads()) ? 131071 : 524287);
+ if (isSetThreads())
+ hashCode = hashCode * 8191 + threads;
- boolean present_authorizations = true && (isSetAuthorizations());
- list.add(present_authorizations);
- if (present_authorizations)
- list.add(authorizations);
+ hashCode = hashCode * 8191 + ((isSetAuthorizations()) ? 131071 : 524287);
+ if (isSetAuthorizations())
+ hashCode = hashCode * 8191 + authorizations.hashCode();
- boolean present_durability = true && (isSetDurability());
- list.add(present_durability);
- if (present_durability)
- list.add(durability.getValue());
+ hashCode = hashCode * 8191 + ((isSetDurability()) ? 131071 : 524287);
+ if (isSetDurability())
+ hashCode = hashCode * 8191 + durability.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -538,7 +505,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMaxMemory()).compareTo(other.isSetMaxMemory());
+ lastComparison = java.lang.Boolean.valueOf(isSetMaxMemory()).compareTo(other.isSetMaxMemory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -548,7 +515,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimeoutMs()).compareTo(other.isSetTimeoutMs());
+ lastComparison = java.lang.Boolean.valueOf(isSetTimeoutMs()).compareTo(other.isSetTimeoutMs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -558,7 +525,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetThreads()).compareTo(other.isSetThreads());
+ lastComparison = java.lang.Boolean.valueOf(isSetThreads()).compareTo(other.isSetThreads());
if (lastComparison != 0) {
return lastComparison;
}
@@ -568,7 +535,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
+ lastComparison = java.lang.Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -578,7 +545,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
+ lastComparison = java.lang.Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
@@ -596,16 +563,16 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
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("ConditionalWriterOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ConditionalWriterOptions(");
boolean first = true;
if (isSetMaxMemory()) {
@@ -662,7 +629,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -672,13 +639,13 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
}
- private static class ConditionalWriterOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class ConditionalWriterOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ConditionalWriterOptionsStandardScheme getScheme() {
return new ConditionalWriterOptionsStandardScheme();
}
}
- private static class ConditionalWriterOptionsStandardScheme extends StandardScheme<ConditionalWriterOptions> {
+ private static class ConditionalWriterOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ConditionalWriterOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ConditionalWriterOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -718,8 +685,8 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set106 = iprot.readSetBegin();
- struct.authorizations = new HashSet<ByteBuffer>(2*_set106.size);
- ByteBuffer _elem107;
+ struct.authorizations = new java.util.HashSet<java.nio.ByteBuffer>(2*_set106.size);
+ java.nio.ByteBuffer _elem107;
for (int _i108 = 0; _i108 < _set106.size; ++_i108)
{
_elem107 = iprot.readBinary();
@@ -775,7 +742,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
oprot.writeFieldBegin(AUTHORIZATIONS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.authorizations.size()));
- for (ByteBuffer _iter109 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter109 : struct.authorizations)
{
oprot.writeBinary(_iter109);
}
@@ -797,18 +764,18 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
- private static class ConditionalWriterOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class ConditionalWriterOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ConditionalWriterOptionsTupleScheme getScheme() {
return new ConditionalWriterOptionsTupleScheme();
}
}
- private static class ConditionalWriterOptionsTupleScheme extends TupleScheme<ConditionalWriterOptions> {
+ private static class ConditionalWriterOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ConditionalWriterOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ConditionalWriterOptions 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.isSetMaxMemory()) {
optionals.set(0);
}
@@ -837,7 +804,7 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
if (struct.isSetAuthorizations()) {
{
oprot.writeI32(struct.authorizations.size());
- for (ByteBuffer _iter110 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter110 : struct.authorizations)
{
oprot.writeBinary(_iter110);
}
@@ -850,8 +817,8 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ConditionalWriterOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.maxMemory = iprot.readI64();
struct.setMaxMemoryIsSet(true);
@@ -867,8 +834,8 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TSet _set111 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.authorizations = new HashSet<ByteBuffer>(2*_set111.size);
- ByteBuffer _elem112;
+ struct.authorizations = new java.util.HashSet<java.nio.ByteBuffer>(2*_set111.size);
+ java.nio.ByteBuffer _elem112;
for (int _i113 = 0; _i113 < _set111.size; ++_i113)
{
_elem112 = iprot.readBinary();
@@ -884,5 +851,9 @@ public class ConditionalWriterOptions implements org.apache.thrift.TBase<Conditi
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/DiskUsage.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/DiskUsage.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/DiskUsage.java
index c49910f..f66a93c 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/DiskUsage.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/DiskUsage.java
@@ -15,55 +15,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._Fields>, java.io.Serializable, Cloneable, Comparable<DiskUsage> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DiskUsage");
private static final org.apache.thrift.protocol.TField TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("tables", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("usage", org.apache.thrift.protocol.TType.I64, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DiskUsageStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DiskUsageTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DiskUsageStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DiskUsageTupleSchemeFactory();
- public List<String> tables; // required
+ public java.util.List<java.lang.String> tables; // required
public long usage; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -71,10 +41,10 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
TABLES((short)1, "tables"),
USAGE((short)2, "usage");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,15 +100,15 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
// isset id assignments
private static final int __USAGE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLES, new org.apache.thrift.meta_data.FieldMetaData("tables", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.USAGE, new org.apache.thrift.meta_data.FieldMetaData("usage", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DiskUsage.class, metaDataMap);
}
@@ -146,7 +116,7 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
}
public DiskUsage(
- List<String> tables,
+ java.util.List<java.lang.String> tables,
long usage)
{
this();
@@ -161,7 +131,7 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
public DiskUsage(DiskUsage other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTables()) {
- List<String> __this__tables = new ArrayList<String>(other.tables);
+ java.util.List<java.lang.String> __this__tables = new java.util.ArrayList<java.lang.String>(other.tables);
this.tables = __this__tables;
}
this.usage = other.usage;
@@ -182,22 +152,22 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
return (this.tables == null) ? 0 : this.tables.size();
}
- public java.util.Iterator<String> getTablesIterator() {
+ public java.util.Iterator<java.lang.String> getTablesIterator() {
return (this.tables == null) ? null : this.tables.iterator();
}
- public void addToTables(String elem) {
+ public void addToTables(java.lang.String elem) {
if (this.tables == null) {
- this.tables = new ArrayList<String>();
+ this.tables = new java.util.ArrayList<java.lang.String>();
}
this.tables.add(elem);
}
- public List<String> getTables() {
+ public java.util.List<java.lang.String> getTables() {
return this.tables;
}
- public DiskUsage setTables(List<String> tables) {
+ public DiskUsage setTables(java.util.List<java.lang.String> tables) {
this.tables = tables;
return this;
}
@@ -228,25 +198,25 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
}
public void unsetUsage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USAGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USAGE_ISSET_ID);
}
/** Returns true if field usage is set (has been assigned a value) and false otherwise */
public boolean isSetUsage() {
- return EncodingUtils.testBit(__isset_bitfield, __USAGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USAGE_ISSET_ID);
}
public void setUsageIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USAGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USAGE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TABLES:
if (value == null) {
unsetTables();
} else {
- setTables((List<String>)value);
+ setTables((java.util.List<java.lang.String>)value);
}
break;
@@ -254,14 +224,14 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
if (value == null) {
unsetUsage();
} else {
- setUsage((Long)value);
+ setUsage((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLES:
return getTables();
@@ -270,13 +240,13 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
return getUsage();
}
- 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) {
@@ -285,11 +255,11 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
case USAGE:
return isSetUsage();
}
- 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 DiskUsage)
@@ -300,6 +270,8 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
public boolean equals(DiskUsage that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tables = true && this.isSetTables();
boolean that_present_tables = true && that.isSetTables();
@@ -324,19 +296,15 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tables = true && (isSetTables());
- list.add(present_tables);
- if (present_tables)
- list.add(tables);
+ hashCode = hashCode * 8191 + ((isSetTables()) ? 131071 : 524287);
+ if (isSetTables())
+ hashCode = hashCode * 8191 + tables.hashCode();
- boolean present_usage = true;
- list.add(present_usage);
- if (present_usage)
- list.add(usage);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(usage);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -347,7 +315,7 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTables()).compareTo(other.isSetTables());
+ lastComparison = java.lang.Boolean.valueOf(isSetTables()).compareTo(other.isSetTables());
if (lastComparison != 0) {
return lastComparison;
}
@@ -357,7 +325,7 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUsage()).compareTo(other.isSetUsage());
+ lastComparison = java.lang.Boolean.valueOf(isSetUsage()).compareTo(other.isSetUsage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -375,16 +343,16 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
}
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("DiskUsage(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("DiskUsage(");
boolean first = true;
sb.append("tables:");
@@ -415,7 +383,7 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -425,13 +393,13 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
}
}
- private static class DiskUsageStandardSchemeFactory implements SchemeFactory {
+ private static class DiskUsageStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DiskUsageStandardScheme getScheme() {
return new DiskUsageStandardScheme();
}
}
- private static class DiskUsageStandardScheme extends StandardScheme<DiskUsage> {
+ private static class DiskUsageStandardScheme extends org.apache.thrift.scheme.StandardScheme<DiskUsage> {
public void read(org.apache.thrift.protocol.TProtocol iprot, DiskUsage struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -447,8 +415,8 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.tables = new ArrayList<String>(_list0.size);
- String _elem1;
+ struct.tables = new java.util.ArrayList<java.lang.String>(_list0.size);
+ java.lang.String _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readString();
@@ -488,7 +456,7 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
oprot.writeFieldBegin(TABLES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tables.size()));
- for (String _iter3 : struct.tables)
+ for (java.lang.String _iter3 : struct.tables)
{
oprot.writeString(_iter3);
}
@@ -505,18 +473,18 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
}
- private static class DiskUsageTupleSchemeFactory implements SchemeFactory {
+ private static class DiskUsageTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DiskUsageTupleScheme getScheme() {
return new DiskUsageTupleScheme();
}
}
- private static class DiskUsageTupleScheme extends TupleScheme<DiskUsage> {
+ private static class DiskUsageTupleScheme extends org.apache.thrift.scheme.TupleScheme<DiskUsage> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DiskUsage 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.isSetTables()) {
optionals.set(0);
}
@@ -527,7 +495,7 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
if (struct.isSetTables()) {
{
oprot.writeI32(struct.tables.size());
- for (String _iter4 : struct.tables)
+ for (java.lang.String _iter4 : struct.tables)
{
oprot.writeString(_iter4);
}
@@ -540,13 +508,13 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, DiskUsage 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)) {
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tables = new ArrayList<String>(_list5.size);
- String _elem6;
+ struct.tables = new java.util.ArrayList<java.lang.String>(_list5.size);
+ java.lang.String _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = iprot.readString();
@@ -562,5 +530,9 @@ public class DiskUsage implements org.apache.thrift.TBase<DiskUsage, DiskUsage._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Durability.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Durability.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Durability.java
index daa16c8..8f685df 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Durability.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Durability.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum Durability implements org.apache.thrift.TEnum {
+public enum Durability implements org.apache.thrift.TEnum {
DEFAULT(0),
NONE(1),
LOG(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorScope.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorScope.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorScope.java
index 65408bd..8ab316f 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorScope.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorScope.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum IteratorScope implements org.apache.thrift.TEnum {
+public enum IteratorScope implements org.apache.thrift.TEnum {
MINC(0),
MAJC(1),
SCAN(2);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorSetting.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorSetting.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorSetting.java
index 826c46f..dec8c0a 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorSetting.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorSetting.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting, IteratorSetting._Fields>, java.io.Serializable, Cloneable, Comparable<IteratorSetting> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IteratorSetting");
@@ -59,16 +32,13 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
private static final org.apache.thrift.protocol.TField ITERATOR_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("iteratorClass", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new IteratorSettingStandardSchemeFactory());
- schemes.put(TupleScheme.class, new IteratorSettingTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new IteratorSettingStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new IteratorSettingTupleSchemeFactory();
public int priority; // required
- public String name; // required
- public String iteratorClass; // required
- public Map<String,String> properties; // required
+ public java.lang.String name; // required
+ public java.lang.String iteratorClass; // required
+ public java.util.Map<java.lang.String,java.lang.String> properties; // 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 {
@@ -77,10 +47,10 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
ITERATOR_CLASS((short)3, "iteratorClass"),
PROPERTIES((short)4, "properties");
- 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);
}
}
@@ -109,21 +79,21 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
*/
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;
}
@@ -132,7 +102,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -140,9 +110,9 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
// isset id assignments
private static final int __PRIORITY_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -153,7 +123,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IteratorSetting.class, metaDataMap);
}
@@ -162,9 +132,9 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
public IteratorSetting(
int priority,
- String name,
- String iteratorClass,
- Map<String,String> properties)
+ java.lang.String name,
+ java.lang.String iteratorClass,
+ java.util.Map<java.lang.String,java.lang.String> properties)
{
this();
this.priority = priority;
@@ -187,7 +157,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
this.iteratorClass = other.iteratorClass;
}
if (other.isSetProperties()) {
- Map<String,String> __this__properties = new HashMap<String,String>(other.properties);
+ java.util.Map<java.lang.String,java.lang.String> __this__properties = new java.util.HashMap<java.lang.String,java.lang.String>(other.properties);
this.properties = __this__properties;
}
}
@@ -216,23 +186,23 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
}
public void unsetPriority() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID);
}
/** Returns true if field priority is set (has been assigned a value) and false otherwise */
public boolean isSetPriority() {
- return EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);
}
public void setPriorityIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value);
}
- public String getName() {
+ public java.lang.String getName() {
return this.name;
}
- public IteratorSetting setName(String name) {
+ public IteratorSetting setName(java.lang.String name) {
this.name = name;
return this;
}
@@ -252,11 +222,11 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
}
}
- public String getIteratorClass() {
+ public java.lang.String getIteratorClass() {
return this.iteratorClass;
}
- public IteratorSetting setIteratorClass(String iteratorClass) {
+ public IteratorSetting setIteratorClass(java.lang.String iteratorClass) {
this.iteratorClass = iteratorClass;
return this;
}
@@ -280,18 +250,18 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
return (this.properties == null) ? 0 : this.properties.size();
}
- public void putToProperties(String key, String val) {
+ public void putToProperties(java.lang.String key, java.lang.String val) {
if (this.properties == null) {
- this.properties = new HashMap<String,String>();
+ this.properties = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.properties.put(key, val);
}
- public Map<String,String> getProperties() {
+ public java.util.Map<java.lang.String,java.lang.String> getProperties() {
return this.properties;
}
- public IteratorSetting setProperties(Map<String,String> properties) {
+ public IteratorSetting setProperties(java.util.Map<java.lang.String,java.lang.String> properties) {
this.properties = properties;
return this;
}
@@ -311,13 +281,13 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PRIORITY:
if (value == null) {
unsetPriority();
} else {
- setPriority((Integer)value);
+ setPriority((java.lang.Integer)value);
}
break;
@@ -325,7 +295,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
if (value == null) {
unsetName();
} else {
- setName((String)value);
+ setName((java.lang.String)value);
}
break;
@@ -333,7 +303,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
if (value == null) {
unsetIteratorClass();
} else {
- setIteratorClass((String)value);
+ setIteratorClass((java.lang.String)value);
}
break;
@@ -341,14 +311,14 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
if (value == null) {
unsetProperties();
} else {
- setProperties((Map<String,String>)value);
+ setProperties((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PRIORITY:
return getPriority();
@@ -363,13 +333,13 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
return getProperties();
}
- 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) {
@@ -382,11 +352,11 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
case PROPERTIES:
return isSetProperties();
}
- 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 IteratorSetting)
@@ -397,6 +367,8 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
public boolean equals(IteratorSetting that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_priority = true;
boolean that_present_priority = true;
@@ -439,29 +411,23 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_priority = true;
- list.add(present_priority);
- if (present_priority)
- list.add(priority);
+ hashCode = hashCode * 8191 + priority;
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
+ hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
+ if (isSetName())
+ hashCode = hashCode * 8191 + name.hashCode();
- boolean present_iteratorClass = true && (isSetIteratorClass());
- list.add(present_iteratorClass);
- if (present_iteratorClass)
- list.add(iteratorClass);
+ hashCode = hashCode * 8191 + ((isSetIteratorClass()) ? 131071 : 524287);
+ if (isSetIteratorClass())
+ hashCode = hashCode * 8191 + iteratorClass.hashCode();
- boolean present_properties = true && (isSetProperties());
- list.add(present_properties);
- if (present_properties)
- list.add(properties);
+ hashCode = hashCode * 8191 + ((isSetProperties()) ? 131071 : 524287);
+ if (isSetProperties())
+ hashCode = hashCode * 8191 + properties.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -472,7 +438,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority());
+ lastComparison = java.lang.Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority());
if (lastComparison != 0) {
return lastComparison;
}
@@ -482,7 +448,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -492,7 +458,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIteratorClass()).compareTo(other.isSetIteratorClass());
+ lastComparison = java.lang.Boolean.valueOf(isSetIteratorClass()).compareTo(other.isSetIteratorClass());
if (lastComparison != 0) {
return lastComparison;
}
@@ -502,7 +468,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties());
+ lastComparison = java.lang.Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties());
if (lastComparison != 0) {
return lastComparison;
}
@@ -520,16 +486,16 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
}
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("IteratorSetting(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("IteratorSetting(");
boolean first = true;
sb.append("priority:");
@@ -576,7 +542,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -586,13 +552,13 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
}
}
- private static class IteratorSettingStandardSchemeFactory implements SchemeFactory {
+ private static class IteratorSettingStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IteratorSettingStandardScheme getScheme() {
return new IteratorSettingStandardScheme();
}
}
- private static class IteratorSettingStandardScheme extends StandardScheme<IteratorSetting> {
+ private static class IteratorSettingStandardScheme extends org.apache.thrift.scheme.StandardScheme<IteratorSetting> {
public void read(org.apache.thrift.protocol.TProtocol iprot, IteratorSetting struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -632,9 +598,9 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
- struct.properties = new HashMap<String,String>(2*_map16.size);
- String _key17;
- String _val18;
+ struct.properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map16.size);
+ java.lang.String _key17;
+ java.lang.String _val18;
for (int _i19 = 0; _i19 < _map16.size; ++_i19)
{
_key17 = iprot.readString();
@@ -680,7 +646,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
- for (Map.Entry<String, String> _iter20 : struct.properties.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter20 : struct.properties.entrySet())
{
oprot.writeString(_iter20.getKey());
oprot.writeString(_iter20.getValue());
@@ -695,18 +661,18 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
}
- private static class IteratorSettingTupleSchemeFactory implements SchemeFactory {
+ private static class IteratorSettingTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IteratorSettingTupleScheme getScheme() {
return new IteratorSettingTupleScheme();
}
}
- private static class IteratorSettingTupleScheme extends TupleScheme<IteratorSetting> {
+ private static class IteratorSettingTupleScheme extends org.apache.thrift.scheme.TupleScheme<IteratorSetting> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, IteratorSetting 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.isSetPriority()) {
optionals.set(0);
}
@@ -732,7 +698,7 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
if (struct.isSetProperties()) {
{
oprot.writeI32(struct.properties.size());
- for (Map.Entry<String, String> _iter21 : struct.properties.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter21 : struct.properties.entrySet())
{
oprot.writeString(_iter21.getKey());
oprot.writeString(_iter21.getValue());
@@ -743,8 +709,8 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, IteratorSetting struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.priority = iprot.readI32();
struct.setPriorityIsSet(true);
@@ -760,9 +726,9 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map22 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.properties = new HashMap<String,String>(2*_map22.size);
- String _key23;
- String _val24;
+ struct.properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map22.size);
+ java.lang.String _key23;
+ java.lang.String _val24;
for (int _i25 = 0; _i25 < _map22.size; ++_i25)
{
_key23 = iprot.readString();
@@ -775,5 +741,9 @@ public class IteratorSetting implements org.apache.thrift.TBase<IteratorSetting,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[30/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java
index 95a588e..c6da290 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportStatus.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatus, BulkImportStatus._Fields>, java.io.Serializable, Cloneable, Comparable<BulkImportStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BulkImportStatus");
@@ -58,14 +31,11 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
private static final org.apache.thrift.protocol.TField FILENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("filename", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new BulkImportStatusStandardSchemeFactory());
- schemes.put(TupleScheme.class, new BulkImportStatusTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BulkImportStatusStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BulkImportStatusTupleSchemeFactory();
public long startTime; // required
- public String filename; // required
+ public java.lang.String filename; // required
/**
*
* @see BulkImportState
@@ -82,10 +52,10 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
*/
STATE((short)3, "state");
- 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);
}
}
@@ -112,21 +82,21 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
*/
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;
}
@@ -135,7 +105,7 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -143,16 +113,16 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
// isset id assignments
private static final int __STARTTIME_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.FILENAME, new org.apache.thrift.meta_data.FieldMetaData("filename", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, BulkImportState.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BulkImportStatus.class, metaDataMap);
}
@@ -161,7 +131,7 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
public BulkImportStatus(
long startTime,
- String filename,
+ java.lang.String filename,
BulkImportState state)
{
this();
@@ -208,23 +178,23 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
}
public void unsetStartTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
/** Returns true if field startTime is set (has been assigned a value) and false otherwise */
public boolean isSetStartTime() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
public void setStartTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
}
- public String getFilename() {
+ public java.lang.String getFilename() {
return this.filename;
}
- public BulkImportStatus setFilename(String filename) {
+ public BulkImportStatus setFilename(java.lang.String filename) {
this.filename = filename;
return this;
}
@@ -276,13 +246,13 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case START_TIME:
if (value == null) {
unsetStartTime();
} else {
- setStartTime((Long)value);
+ setStartTime((java.lang.Long)value);
}
break;
@@ -290,7 +260,7 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
if (value == null) {
unsetFilename();
} else {
- setFilename((String)value);
+ setFilename((java.lang.String)value);
}
break;
@@ -305,7 +275,7 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case START_TIME:
return getStartTime();
@@ -317,13 +287,13 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
return getState();
}
- 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) {
@@ -334,11 +304,11 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
case STATE:
return isSetState();
}
- 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 BulkImportStatus)
@@ -349,6 +319,8 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
public boolean equals(BulkImportStatus that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_startTime = true;
boolean that_present_startTime = true;
@@ -382,24 +354,19 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_startTime = true;
- list.add(present_startTime);
- if (present_startTime)
- list.add(startTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime);
- boolean present_filename = true && (isSetFilename());
- list.add(present_filename);
- if (present_filename)
- list.add(filename);
+ hashCode = hashCode * 8191 + ((isSetFilename()) ? 131071 : 524287);
+ if (isSetFilename())
+ hashCode = hashCode * 8191 + filename.hashCode();
- boolean present_state = true && (isSetState());
- list.add(present_state);
- if (present_state)
- list.add(state.getValue());
+ hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
+ if (isSetState())
+ hashCode = hashCode * 8191 + state.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -410,7 +377,7 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -420,7 +387,7 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFilename()).compareTo(other.isSetFilename());
+ lastComparison = java.lang.Boolean.valueOf(isSetFilename()).compareTo(other.isSetFilename());
if (lastComparison != 0) {
return lastComparison;
}
@@ -430,7 +397,7 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ lastComparison = java.lang.Boolean.valueOf(isSetState()).compareTo(other.isSetState());
if (lastComparison != 0) {
return lastComparison;
}
@@ -448,16 +415,16 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
}
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("BulkImportStatus(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("BulkImportStatus(");
boolean first = true;
sb.append("startTime:");
@@ -496,7 +463,7 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -506,13 +473,13 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
}
}
- private static class BulkImportStatusStandardSchemeFactory implements SchemeFactory {
+ private static class BulkImportStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BulkImportStatusStandardScheme getScheme() {
return new BulkImportStatusStandardScheme();
}
}
- private static class BulkImportStatusStandardScheme extends StandardScheme<BulkImportStatus> {
+ private static class BulkImportStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<BulkImportStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, BulkImportStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -582,18 +549,18 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
}
- private static class BulkImportStatusTupleSchemeFactory implements SchemeFactory {
+ private static class BulkImportStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BulkImportStatusTupleScheme getScheme() {
return new BulkImportStatusTupleScheme();
}
}
- private static class BulkImportStatusTupleScheme extends TupleScheme<BulkImportStatus> {
+ private static class BulkImportStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<BulkImportStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, BulkImportStatus 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.isSetStartTime()) {
optionals.set(0);
}
@@ -617,8 +584,8 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BulkImportStatus 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.startTime = iprot.readI64();
struct.setStartTimeIsSet(true);
@@ -634,5 +601,9 @@ public class BulkImportStatus implements org.apache.thrift.TBase<BulkImportStatu
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java
index 242eae5..a25f332 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java
@@ -15,53 +15,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class Compacting implements org.apache.thrift.TBase<Compacting, Compacting._Fields>, java.io.Serializable, Cloneable, Comparable<Compacting> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Compacting");
private static final org.apache.thrift.protocol.TField RUNNING_FIELD_DESC = new org.apache.thrift.protocol.TField("running", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField QUEUED_FIELD_DESC = new org.apache.thrift.protocol.TField("queued", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CompactingStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CompactingTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CompactingStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CompactingTupleSchemeFactory();
public int running; // required
public int queued; // required
@@ -71,10 +41,10 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
RUNNING((short)1, "running"),
QUEUED((short)2, "queued");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -131,14 +101,14 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
private static final int __RUNNING_ISSET_ID = 0;
private static final int __QUEUED_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RUNNING, new org.apache.thrift.meta_data.FieldMetaData("running", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.QUEUED, new org.apache.thrift.meta_data.FieldMetaData("queued", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Compacting.class, metaDataMap);
}
@@ -188,16 +158,16 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
}
public void unsetRunning() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RUNNING_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RUNNING_ISSET_ID);
}
/** Returns true if field running is set (has been assigned a value) and false otherwise */
public boolean isSetRunning() {
- return EncodingUtils.testBit(__isset_bitfield, __RUNNING_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RUNNING_ISSET_ID);
}
public void setRunningIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RUNNING_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RUNNING_ISSET_ID, value);
}
public int getQueued() {
@@ -211,25 +181,25 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
}
public void unsetQueued() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUEUED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUEUED_ISSET_ID);
}
/** Returns true if field queued is set (has been assigned a value) and false otherwise */
public boolean isSetQueued() {
- return EncodingUtils.testBit(__isset_bitfield, __QUEUED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUEUED_ISSET_ID);
}
public void setQueuedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUEUED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUEUED_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case RUNNING:
if (value == null) {
unsetRunning();
} else {
- setRunning((Integer)value);
+ setRunning((java.lang.Integer)value);
}
break;
@@ -237,14 +207,14 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
if (value == null) {
unsetQueued();
} else {
- setQueued((Integer)value);
+ setQueued((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RUNNING:
return getRunning();
@@ -253,13 +223,13 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
return getQueued();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -268,11 +238,11 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
case QUEUED:
return isSetQueued();
}
- 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 Compacting)
@@ -283,6 +253,8 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
public boolean equals(Compacting that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_running = true;
boolean that_present_running = true;
@@ -307,19 +279,13 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_running = true;
- list.add(present_running);
- if (present_running)
- list.add(running);
+ hashCode = hashCode * 8191 + running;
- boolean present_queued = true;
- list.add(present_queued);
- if (present_queued)
- list.add(queued);
+ hashCode = hashCode * 8191 + queued;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -330,7 +296,7 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRunning()).compareTo(other.isSetRunning());
+ lastComparison = java.lang.Boolean.valueOf(isSetRunning()).compareTo(other.isSetRunning());
if (lastComparison != 0) {
return lastComparison;
}
@@ -340,7 +306,7 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQueued()).compareTo(other.isSetQueued());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueued()).compareTo(other.isSetQueued());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,16 +324,16 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
}
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("Compacting(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Compacting(");
boolean first = true;
sb.append("running:");
@@ -394,7 +360,7 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -404,13 +370,13 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
}
}
- private static class CompactingStandardSchemeFactory implements SchemeFactory {
+ private static class CompactingStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public CompactingStandardScheme getScheme() {
return new CompactingStandardScheme();
}
}
- private static class CompactingStandardScheme extends StandardScheme<Compacting> {
+ private static class CompactingStandardScheme extends org.apache.thrift.scheme.StandardScheme<Compacting> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Compacting struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -465,18 +431,18 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
}
- private static class CompactingTupleSchemeFactory implements SchemeFactory {
+ private static class CompactingTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public CompactingTupleScheme getScheme() {
return new CompactingTupleScheme();
}
}
- private static class CompactingTupleScheme extends TupleScheme<Compacting> {
+ private static class CompactingTupleScheme extends org.apache.thrift.scheme.TupleScheme<Compacting> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Compacting 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.isSetRunning()) {
optionals.set(0);
}
@@ -494,8 +460,8 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Compacting 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.running = iprot.readI32();
struct.setRunningIsSet(true);
@@ -507,5 +473,9 @@ public class Compacting implements org.apache.thrift.TBase<Compacting, Compactin
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java
index 3af0518..a567c7f 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServer._Fields>, java.io.Serializable, Cloneable, Comparable<DeadServer> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeadServer");
@@ -58,15 +31,12 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
private static final org.apache.thrift.protocol.TField LAST_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("lastStatus", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new DeadServerStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DeadServerTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DeadServerStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DeadServerTupleSchemeFactory();
- public String server; // required
+ public java.lang.String server; // required
public long lastStatus; // required
- public String status; // required
+ public java.lang.String status; // 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 {
@@ -74,10 +44,10 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
LAST_STATUS((short)2, "lastStatus"),
STATUS((short)3, "status");
- 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);
}
}
@@ -104,21 +74,21 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
*/
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;
}
@@ -127,7 +97,7 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -135,16 +105,16 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
// isset id assignments
private static final int __LASTSTATUS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SERVER, new org.apache.thrift.meta_data.FieldMetaData("server", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LAST_STATUS, new org.apache.thrift.meta_data.FieldMetaData("lastStatus", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", 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(DeadServer.class, metaDataMap);
}
@@ -152,9 +122,9 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
}
public DeadServer(
- String server,
+ java.lang.String server,
long lastStatus,
- String status)
+ java.lang.String status)
{
this();
this.server = server;
@@ -189,11 +159,11 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
this.status = null;
}
- public String getServer() {
+ public java.lang.String getServer() {
return this.server;
}
- public DeadServer setServer(String server) {
+ public DeadServer setServer(java.lang.String server) {
this.server = server;
return this;
}
@@ -224,23 +194,23 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
}
public void unsetLastStatus() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTSTATUS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LASTSTATUS_ISSET_ID);
}
/** Returns true if field lastStatus is set (has been assigned a value) and false otherwise */
public boolean isSetLastStatus() {
- return EncodingUtils.testBit(__isset_bitfield, __LASTSTATUS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LASTSTATUS_ISSET_ID);
}
public void setLastStatusIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTSTATUS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LASTSTATUS_ISSET_ID, value);
}
- public String getStatus() {
+ public java.lang.String getStatus() {
return this.status;
}
- public DeadServer setStatus(String status) {
+ public DeadServer setStatus(java.lang.String status) {
this.status = status;
return this;
}
@@ -260,13 +230,13 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SERVER:
if (value == null) {
unsetServer();
} else {
- setServer((String)value);
+ setServer((java.lang.String)value);
}
break;
@@ -274,7 +244,7 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
if (value == null) {
unsetLastStatus();
} else {
- setLastStatus((Long)value);
+ setLastStatus((java.lang.Long)value);
}
break;
@@ -282,14 +252,14 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
if (value == null) {
unsetStatus();
} else {
- setStatus((String)value);
+ setStatus((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERVER:
return getServer();
@@ -301,13 +271,13 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
return getStatus();
}
- 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) {
@@ -318,11 +288,11 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
case STATUS:
return isSetStatus();
}
- 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 DeadServer)
@@ -333,6 +303,8 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
public boolean equals(DeadServer that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_server = true && this.isSetServer();
boolean that_present_server = true && that.isSetServer();
@@ -366,24 +338,19 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_server = true && (isSetServer());
- list.add(present_server);
- if (present_server)
- list.add(server);
+ hashCode = hashCode * 8191 + ((isSetServer()) ? 131071 : 524287);
+ if (isSetServer())
+ hashCode = hashCode * 8191 + server.hashCode();
- boolean present_lastStatus = true;
- list.add(present_lastStatus);
- if (present_lastStatus)
- list.add(lastStatus);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lastStatus);
- boolean present_status = true && (isSetStatus());
- list.add(present_status);
- if (present_status)
- list.add(status);
+ hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
+ if (isSetStatus())
+ hashCode = hashCode * 8191 + status.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -394,7 +361,7 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetServer()).compareTo(other.isSetServer());
+ lastComparison = java.lang.Boolean.valueOf(isSetServer()).compareTo(other.isSetServer());
if (lastComparison != 0) {
return lastComparison;
}
@@ -404,7 +371,7 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLastStatus()).compareTo(other.isSetLastStatus());
+ lastComparison = java.lang.Boolean.valueOf(isSetLastStatus()).compareTo(other.isSetLastStatus());
if (lastComparison != 0) {
return lastComparison;
}
@@ -414,7 +381,7 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
+ lastComparison = java.lang.Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,16 +399,16 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
}
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("DeadServer(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("DeadServer(");
boolean first = true;
sb.append("server:");
@@ -480,7 +447,7 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -490,13 +457,13 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
}
}
- private static class DeadServerStandardSchemeFactory implements SchemeFactory {
+ private static class DeadServerStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DeadServerStandardScheme getScheme() {
return new DeadServerStandardScheme();
}
}
- private static class DeadServerStandardScheme extends StandardScheme<DeadServer> {
+ private static class DeadServerStandardScheme extends org.apache.thrift.scheme.StandardScheme<DeadServer> {
public void read(org.apache.thrift.protocol.TProtocol iprot, DeadServer struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -566,18 +533,18 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
}
- private static class DeadServerTupleSchemeFactory implements SchemeFactory {
+ private static class DeadServerTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DeadServerTupleScheme getScheme() {
return new DeadServerTupleScheme();
}
}
- private static class DeadServerTupleScheme extends TupleScheme<DeadServer> {
+ private static class DeadServerTupleScheme extends org.apache.thrift.scheme.TupleScheme<DeadServer> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DeadServer 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.isSetServer()) {
optionals.set(0);
}
@@ -601,8 +568,8 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, DeadServer 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.server = iprot.readString();
struct.setServerIsSet(true);
@@ -618,5 +585,9 @@ public class DeadServer implements org.apache.thrift.TBase<DeadServer, DeadServe
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/FateOperation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/FateOperation.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/FateOperation.java
index 866d6f6..0aa24d7 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/FateOperation.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/FateOperation.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.master.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum FateOperation implements org.apache.thrift.TEnum {
+public enum FateOperation implements org.apache.thrift.TEnum {
TABLE_CREATE(0),
TABLE_CLONE(1),
TABLE_DELETE(2),
[02/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/ruby/accumulo_proxy.rb
----------------------------------------------------------------------
diff --git a/proxy/src/main/ruby/accumulo_proxy.rb b/proxy/src/main/ruby/accumulo_proxy.rb
index e02ba16..3c02507 100644
--- a/proxy/src/main/ruby/accumulo_proxy.rb
+++ b/proxy/src/main/ruby/accumulo_proxy.rb
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/ruby/proxy_constants.rb
----------------------------------------------------------------------
diff --git a/proxy/src/main/ruby/proxy_constants.rb b/proxy/src/main/ruby/proxy_constants.rb
index baaf9af..47eb2cf 100644
--- a/proxy/src/main/ruby/proxy_constants.rb
+++ b/proxy/src/main/ruby/proxy_constants.rb
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/ruby/proxy_types.rb
----------------------------------------------------------------------
diff --git a/proxy/src/main/ruby/proxy_types.rb b/proxy/src/main/ruby/proxy_types.rb
index e542df6..163e2df 100644
--- a/proxy/src/main/ruby/proxy_types.rb
+++ b/proxy/src/main/ruby/proxy_types.rb
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java
index 3997c21..ee36b66 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/Annotation.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.tracer.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class Annotation implements org.apache.thrift.TBase<Annotation, Annotation._Fields>, java.io.Serializable, Cloneable, Comparable<Annotation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Annotation");
private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AnnotationStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AnnotationTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AnnotationStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AnnotationTupleSchemeFactory();
public long time; // required
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
TIME((short)1, "time"),
MSG((short)2, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,14 +100,14 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
// isset id assignments
private static final int __TIME_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Annotation.class, metaDataMap);
}
@@ -146,7 +116,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
public Annotation(
long time,
- String msg)
+ java.lang.String msg)
{
this();
this.time = time;
@@ -187,23 +157,23 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
public void unsetTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_ISSET_ID);
}
/** Returns true if field time is set (has been assigned a value) and false otherwise */
public boolean isSetTime() {
- return EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID);
}
public void setTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_ISSET_ID, value);
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public Annotation setMsg(String msg) {
+ public Annotation setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -223,13 +193,13 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TIME:
if (value == null) {
unsetTime();
} else {
- setTime((Long)value);
+ setTime((java.lang.Long)value);
}
break;
@@ -237,14 +207,14 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TIME:
return getTime();
@@ -253,13 +223,13 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -268,11 +238,11 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof Annotation)
@@ -283,6 +253,8 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
public boolean equals(Annotation that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_time = true;
boolean that_present_time = true;
@@ -307,19 +279,15 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_time = true;
- list.add(present_time);
- if (present_time)
- list.add(time);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(time);
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -330,7 +298,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTime()).compareTo(other.isSetTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetTime()).compareTo(other.isSetTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -340,7 +308,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,16 +326,16 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Annotation(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Annotation(");
boolean first = true;
sb.append("time:");
@@ -398,7 +366,7 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -408,13 +376,13 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
}
- private static class AnnotationStandardSchemeFactory implements SchemeFactory {
+ private static class AnnotationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AnnotationStandardScheme getScheme() {
return new AnnotationStandardScheme();
}
}
- private static class AnnotationStandardScheme extends StandardScheme<Annotation> {
+ private static class AnnotationStandardScheme extends org.apache.thrift.scheme.StandardScheme<Annotation> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Annotation struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -471,18 +439,18 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
- private static class AnnotationTupleSchemeFactory implements SchemeFactory {
+ private static class AnnotationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AnnotationTupleScheme getScheme() {
return new AnnotationTupleScheme();
}
}
- private static class AnnotationTupleScheme extends TupleScheme<Annotation> {
+ private static class AnnotationTupleScheme extends org.apache.thrift.scheme.TupleScheme<Annotation> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTime()) {
optionals.set(0);
}
@@ -500,8 +468,8 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Annotation struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.time = iprot.readI64();
struct.setTimeIsSet(true);
@@ -513,5 +481,9 @@ public class Annotation implements org.apache.thrift.TBase<Annotation, Annotatio
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
index 34025ef..8b24aa9 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.tracer.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpan._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteSpan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteSpan");
@@ -65,22 +38,19 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.MAP, (short)9);
private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)10);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new RemoteSpanStandardSchemeFactory());
- schemes.put(TupleScheme.class, new RemoteSpanTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RemoteSpanStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RemoteSpanTupleSchemeFactory();
- public String sender; // required
- public String svc; // required
+ public java.lang.String sender; // required
+ public java.lang.String svc; // required
public long traceId; // required
public long spanId; // required
public long parentId; // required
public long start; // required
public long stop; // required
- public String description; // required
- public Map<String,String> data; // required
- public List<Annotation> annotations; // required
+ public java.lang.String description; // required
+ public java.util.Map<java.lang.String,java.lang.String> data; // required
+ public java.util.List<Annotation> annotations; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -95,10 +65,10 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
DATA((short)9, "data"),
ANNOTATIONS((short)10, "annotations");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -139,21 +109,21 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -162,7 +132,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -174,9 +144,9 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
private static final int __START_ISSET_ID = 3;
private static final int __STOP_ISSET_ID = 4;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SENDER, new org.apache.thrift.meta_data.FieldMetaData("sender", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SVC, new org.apache.thrift.meta_data.FieldMetaData("svc", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -200,7 +170,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Annotation.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteSpan.class, metaDataMap);
}
@@ -208,16 +178,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public RemoteSpan(
- String sender,
- String svc,
+ java.lang.String sender,
+ java.lang.String svc,
long traceId,
long spanId,
long parentId,
long start,
long stop,
- String description,
- Map<String,String> data,
- List<Annotation> annotations)
+ java.lang.String description,
+ java.util.Map<java.lang.String,java.lang.String> data,
+ java.util.List<Annotation> annotations)
{
this();
this.sender = sender;
@@ -257,11 +227,11 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
this.description = other.description;
}
if (other.isSetData()) {
- Map<String,String> __this__data = new HashMap<String,String>(other.data);
+ java.util.Map<java.lang.String,java.lang.String> __this__data = new java.util.HashMap<java.lang.String,java.lang.String>(other.data);
this.data = __this__data;
}
if (other.isSetAnnotations()) {
- List<Annotation> __this__annotations = new ArrayList<Annotation>(other.annotations.size());
+ java.util.List<Annotation> __this__annotations = new java.util.ArrayList<Annotation>(other.annotations.size());
for (Annotation other_element : other.annotations) {
__this__annotations.add(new Annotation(other_element));
}
@@ -292,11 +262,11 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
this.annotations = null;
}
- public String getSender() {
+ public java.lang.String getSender() {
return this.sender;
}
- public RemoteSpan setSender(String sender) {
+ public RemoteSpan setSender(java.lang.String sender) {
this.sender = sender;
return this;
}
@@ -316,11 +286,11 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
- public String getSvc() {
+ public java.lang.String getSvc() {
return this.svc;
}
- public RemoteSpan setSvc(String svc) {
+ public RemoteSpan setSvc(java.lang.String svc) {
this.svc = svc;
return this;
}
@@ -351,16 +321,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetTraceId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
}
/** Returns true if field traceId is set (has been assigned a value) and false otherwise */
public boolean isSetTraceId() {
- return EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
}
public void setTraceIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
}
public long getSpanId() {
@@ -374,16 +344,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetSpanId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID);
}
/** Returns true if field spanId is set (has been assigned a value) and false otherwise */
public boolean isSetSpanId() {
- return EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID);
}
public void setSpanIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value);
}
public long getParentId() {
@@ -397,16 +367,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetParentId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
}
/** Returns true if field parentId is set (has been assigned a value) and false otherwise */
public boolean isSetParentId() {
- return EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
}
public void setParentIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
}
public long getStart() {
@@ -420,16 +390,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetStart() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID);
}
/** Returns true if field start is set (has been assigned a value) and false otherwise */
public boolean isSetStart() {
- return EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID);
}
public void setStartIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value);
}
public long getStop() {
@@ -443,23 +413,23 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void unsetStop() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STOP_ISSET_ID);
}
/** Returns true if field stop is set (has been assigned a value) and false otherwise */
public boolean isSetStop() {
- return EncodingUtils.testBit(__isset_bitfield, __STOP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STOP_ISSET_ID);
}
public void setStopIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STOP_ISSET_ID, value);
}
- public String getDescription() {
+ public java.lang.String getDescription() {
return this.description;
}
- public RemoteSpan setDescription(String description) {
+ public RemoteSpan setDescription(java.lang.String description) {
this.description = description;
return this;
}
@@ -483,18 +453,18 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return (this.data == null) ? 0 : this.data.size();
}
- public void putToData(String key, String val) {
+ public void putToData(java.lang.String key, java.lang.String val) {
if (this.data == null) {
- this.data = new HashMap<String,String>();
+ this.data = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.data.put(key, val);
}
- public Map<String,String> getData() {
+ public java.util.Map<java.lang.String,java.lang.String> getData() {
return this.data;
}
- public RemoteSpan setData(Map<String,String> data) {
+ public RemoteSpan setData(java.util.Map<java.lang.String,java.lang.String> data) {
this.data = data;
return this;
}
@@ -524,16 +494,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
public void addToAnnotations(Annotation elem) {
if (this.annotations == null) {
- this.annotations = new ArrayList<Annotation>();
+ this.annotations = new java.util.ArrayList<Annotation>();
}
this.annotations.add(elem);
}
- public List<Annotation> getAnnotations() {
+ public java.util.List<Annotation> getAnnotations() {
return this.annotations;
}
- public RemoteSpan setAnnotations(List<Annotation> annotations) {
+ public RemoteSpan setAnnotations(java.util.List<Annotation> annotations) {
this.annotations = annotations;
return this;
}
@@ -553,13 +523,13 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SENDER:
if (value == null) {
unsetSender();
} else {
- setSender((String)value);
+ setSender((java.lang.String)value);
}
break;
@@ -567,7 +537,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetSvc();
} else {
- setSvc((String)value);
+ setSvc((java.lang.String)value);
}
break;
@@ -575,7 +545,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetTraceId();
} else {
- setTraceId((Long)value);
+ setTraceId((java.lang.Long)value);
}
break;
@@ -583,7 +553,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetSpanId();
} else {
- setSpanId((Long)value);
+ setSpanId((java.lang.Long)value);
}
break;
@@ -591,7 +561,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetParentId();
} else {
- setParentId((Long)value);
+ setParentId((java.lang.Long)value);
}
break;
@@ -599,7 +569,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetStart();
} else {
- setStart((Long)value);
+ setStart((java.lang.Long)value);
}
break;
@@ -607,7 +577,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetStop();
} else {
- setStop((Long)value);
+ setStop((java.lang.Long)value);
}
break;
@@ -615,7 +585,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
@@ -623,7 +593,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetData();
} else {
- setData((Map<String,String>)value);
+ setData((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
@@ -631,14 +601,14 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (value == null) {
unsetAnnotations();
} else {
- setAnnotations((List<Annotation>)value);
+ setAnnotations((java.util.List<Annotation>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SENDER:
return getSender();
@@ -671,13 +641,13 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return getAnnotations();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -702,11 +672,11 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
case ANNOTATIONS:
return isSetAnnotations();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof RemoteSpan)
@@ -717,6 +687,8 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
public boolean equals(RemoteSpan that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sender = true && this.isSetSender();
boolean that_present_sender = true && that.isSetSender();
@@ -813,59 +785,39 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sender = true && (isSetSender());
- list.add(present_sender);
- if (present_sender)
- list.add(sender);
+ hashCode = hashCode * 8191 + ((isSetSender()) ? 131071 : 524287);
+ if (isSetSender())
+ hashCode = hashCode * 8191 + sender.hashCode();
- boolean present_svc = true && (isSetSvc());
- list.add(present_svc);
- if (present_svc)
- list.add(svc);
+ hashCode = hashCode * 8191 + ((isSetSvc()) ? 131071 : 524287);
+ if (isSetSvc())
+ hashCode = hashCode * 8191 + svc.hashCode();
- boolean present_traceId = true;
- list.add(present_traceId);
- if (present_traceId)
- list.add(traceId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(traceId);
- boolean present_spanId = true;
- list.add(present_spanId);
- if (present_spanId)
- list.add(spanId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(spanId);
- boolean present_parentId = true;
- list.add(present_parentId);
- if (present_parentId)
- list.add(parentId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(parentId);
- boolean present_start = true;
- list.add(present_start);
- if (present_start)
- list.add(start);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(start);
- boolean present_stop = true;
- list.add(present_stop);
- if (present_stop)
- list.add(stop);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(stop);
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
+ hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
+ if (isSetDescription())
+ hashCode = hashCode * 8191 + description.hashCode();
- boolean present_data = true && (isSetData());
- list.add(present_data);
- if (present_data)
- list.add(data);
+ hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
+ if (isSetData())
+ hashCode = hashCode * 8191 + data.hashCode();
- boolean present_annotations = true && (isSetAnnotations());
- list.add(present_annotations);
- if (present_annotations)
- list.add(annotations);
+ hashCode = hashCode * 8191 + ((isSetAnnotations()) ? 131071 : 524287);
+ if (isSetAnnotations())
+ hashCode = hashCode * 8191 + annotations.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -876,7 +828,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSender()).compareTo(other.isSetSender());
+ lastComparison = java.lang.Boolean.valueOf(isSetSender()).compareTo(other.isSetSender());
if (lastComparison != 0) {
return lastComparison;
}
@@ -886,7 +838,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSvc()).compareTo(other.isSetSvc());
+ lastComparison = java.lang.Boolean.valueOf(isSetSvc()).compareTo(other.isSetSvc());
if (lastComparison != 0) {
return lastComparison;
}
@@ -896,7 +848,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTraceId()).compareTo(other.isSetTraceId());
+ lastComparison = java.lang.Boolean.valueOf(isSetTraceId()).compareTo(other.isSetTraceId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -906,7 +858,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(other.isSetSpanId());
+ lastComparison = java.lang.Boolean.valueOf(isSetSpanId()).compareTo(other.isSetSpanId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -916,7 +868,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
+ lastComparison = java.lang.Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -926,7 +878,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
+ lastComparison = java.lang.Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
if (lastComparison != 0) {
return lastComparison;
}
@@ -936,7 +888,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStop()).compareTo(other.isSetStop());
+ lastComparison = java.lang.Boolean.valueOf(isSetStop()).compareTo(other.isSetStop());
if (lastComparison != 0) {
return lastComparison;
}
@@ -946,7 +898,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -956,7 +908,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData());
+ lastComparison = java.lang.Boolean.valueOf(isSetData()).compareTo(other.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
@@ -966,7 +918,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(other.isSetAnnotations());
+ lastComparison = java.lang.Boolean.valueOf(isSetAnnotations()).compareTo(other.isSetAnnotations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -984,16 +936,16 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("RemoteSpan(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("RemoteSpan(");
boolean first = true;
sb.append("sender:");
@@ -1072,7 +1024,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1082,13 +1034,13 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
- private static class RemoteSpanStandardSchemeFactory implements SchemeFactory {
+ private static class RemoteSpanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RemoteSpanStandardScheme getScheme() {
return new RemoteSpanStandardScheme();
}
}
- private static class RemoteSpanStandardScheme extends StandardScheme<RemoteSpan> {
+ private static class RemoteSpanStandardScheme extends org.apache.thrift.scheme.StandardScheme<RemoteSpan> {
public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteSpan struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1168,9 +1120,9 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
- struct.data = new HashMap<String,String>(2*_map0.size);
- String _key1;
- String _val2;
+ struct.data = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map0.size);
+ java.lang.String _key1;
+ java.lang.String _val2;
for (int _i3 = 0; _i3 < _map0.size; ++_i3)
{
_key1 = iprot.readString();
@@ -1188,7 +1140,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
- struct.annotations = new ArrayList<Annotation>(_list4.size);
+ struct.annotations = new java.util.ArrayList<Annotation>(_list4.size);
Annotation _elem5;
for (int _i6 = 0; _i6 < _list4.size; ++_i6)
{
@@ -1252,7 +1204,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
oprot.writeFieldBegin(DATA_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.data.size()));
- for (Map.Entry<String, String> _iter7 : struct.data.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter7 : struct.data.entrySet())
{
oprot.writeString(_iter7.getKey());
oprot.writeString(_iter7.getValue());
@@ -1279,18 +1231,18 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
- private static class RemoteSpanTupleSchemeFactory implements SchemeFactory {
+ private static class RemoteSpanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RemoteSpanTupleScheme getScheme() {
return new RemoteSpanTupleScheme();
}
}
- private static class RemoteSpanTupleScheme extends TupleScheme<RemoteSpan> {
+ private static class RemoteSpanTupleScheme extends org.apache.thrift.scheme.TupleScheme<RemoteSpan> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RemoteSpan struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSender()) {
optionals.set(0);
}
@@ -1349,7 +1301,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (struct.isSetData()) {
{
oprot.writeI32(struct.data.size());
- for (Map.Entry<String, String> _iter9 : struct.data.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter9 : struct.data.entrySet())
{
oprot.writeString(_iter9.getKey());
oprot.writeString(_iter9.getValue());
@@ -1369,8 +1321,8 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RemoteSpan struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(10);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(10);
if (incoming.get(0)) {
struct.sender = iprot.readString();
struct.setSenderIsSet(true);
@@ -1406,9 +1358,9 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TMap _map11 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.data = new HashMap<String,String>(2*_map11.size);
- String _key12;
- String _val13;
+ struct.data = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map11.size);
+ java.lang.String _key12;
+ java.lang.String _val13;
for (int _i14 = 0; _i14 < _map11.size; ++_i14)
{
_key12 = iprot.readString();
@@ -1421,7 +1373,7 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
if (incoming.get(9)) {
{
org.apache.thrift.protocol.TList _list15 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.annotations = new ArrayList<Annotation>(_list15.size);
+ struct.annotations = new java.util.ArrayList<Annotation>(_list15.size);
Annotation _elem16;
for (int _i17 = 0; _i17 < _list15.size; ++_i17)
{
@@ -1435,5 +1387,9 @@ public class RemoteSpan implements org.apache.thrift.TBase<RemoteSpan, RemoteSpa
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java
index b1e913a..0f5cf5c 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/SpanReceiver.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.tracer.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class SpanReceiver {
public interface Iface {
@@ -61,11 +34,11 @@ public class SpanReceiver {
public interface AsyncIface {
- public void span(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void span(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -115,16 +88,16 @@ public class SpanReceiver {
super(protocolFactory, clientManager, transport);
}
- public void span(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void span(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
span_call method_call = new span_call(span, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class span_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class span_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private RemoteSpan span;
- public span_call(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public span_call(RemoteSpan span, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
this.span = span;
}
@@ -137,28 +110,29 @@ public class SpanReceiver {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.thrift.TException {
+ public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return null;
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("span", new span());
return processMap;
}
@@ -185,16 +159,16 @@ public class SpanReceiver {
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("span", new span());
return processMap;
}
@@ -208,12 +182,18 @@ public class SpanReceiver {
return new span_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ } else {
+ _LOGGER.error("Exception inside oneway handler", e);
+ }
}
};
}
@@ -222,7 +202,7 @@ public class SpanReceiver {
return true;
}
- public void start(I iface, span_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, span_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.span(args.span,resultHandler);
}
}
@@ -234,11 +214,8 @@ public class SpanReceiver {
private static final org.apache.thrift.protocol.TField SPAN_FIELD_DESC = new org.apache.thrift.protocol.TField("span", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new span_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new span_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new span_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new span_argsTupleSchemeFactory();
public RemoteSpan span; // required
@@ -246,10 +223,10 @@ public class SpanReceiver {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SPAN((short)1, "span");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -272,21 +249,21 @@ public class SpanReceiver {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -295,18 +272,18 @@ public class SpanReceiver {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SPAN, new org.apache.thrift.meta_data.FieldMetaData("span", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RemoteSpan.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(span_args.class, metaDataMap);
}
@@ -362,7 +339,7 @@ public class SpanReceiver {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SPAN:
if (value == null) {
@@ -375,30 +352,30 @@ public class SpanReceiver {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SPAN:
return getSpan();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SPAN:
return isSetSpan();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof span_args)
@@ -409,6 +386,8 @@ public class SpanReceiver {
public boolean equals(span_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_span = true && this.isSetSpan();
boolean that_present_span = true && that.isSetSpan();
@@ -424,14 +403,13 @@ public class SpanReceiver {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_span = true && (isSetSpan());
- list.add(present_span);
- if (present_span)
- list.add(span);
+ hashCode = hashCode * 8191 + ((isSetSpan()) ? 131071 : 524287);
+ if (isSetSpan())
+ hashCode = hashCode * 8191 + span.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -442,7 +420,7 @@ public class SpanReceiver {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSpan()).compareTo(other.isSetSpan());
+ lastComparison = java.lang.Boolean.valueOf(isSetSpan()).compareTo(other.isSetSpan());
if (lastComparison != 0) {
return lastComparison;
}
@@ -460,16 +438,16 @@ public class SpanReceiver {
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("span_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("span_args(");
boolean first = true;
sb.append("span:");
@@ -499,7 +477,7 @@ public class SpanReceiver {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -507,13 +485,13 @@ public class SpanReceiver {
}
}
- private static class span_argsStandardSchemeFactory implements SchemeFactory {
+ private static class span_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public span_argsStandardScheme getScheme() {
return new span_argsStandardScheme();
}
}
- private static class span_argsStandardScheme extends StandardScheme<span_args> {
+ private static class span_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<span_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, span_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -560,18 +538,18 @@ public class SpanReceiver {
}
- private static class span_argsTupleSchemeFactory implements SchemeFactory {
+ private static class span_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public span_argsTupleScheme getScheme() {
return new span_argsTupleScheme();
}
}
- private static class span_argsTupleScheme extends TupleScheme<span_args> {
+ private static class span_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<span_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, span_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSpan()) {
optionals.set(0);
}
@@ -583,8 +561,8 @@ public class SpanReceiver {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, span_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.span = new RemoteSpan();
struct.span.read(iprot);
@@ -593,6 +571,10 @@ public class SpanReceiver {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
+ private static void unusedMethod() {}
}
[22/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/WalEdits.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/WalEdits.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/WalEdits.java
index 9b62fa1..5502d13 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/WalEdits.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/WalEdits.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.replication.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fields>, java.io.Serializable, Cloneable, Comparable<WalEdits> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WalEdits");
private static final org.apache.thrift.protocol.TField EDITS_FIELD_DESC = new org.apache.thrift.protocol.TField("edits", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WalEditsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WalEditsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WalEditsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WalEditsTupleSchemeFactory();
- public List<ByteBuffer> edits; // required
+ public java.util.List<java.nio.ByteBuffer> edits; // 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 {
EDITS((short)1, "edits");
- 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);
}
}
@@ -94,21 +64,21 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
*/
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;
}
@@ -117,19 +87,19 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
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.EDITS, new org.apache.thrift.meta_data.FieldMetaData("edits", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WalEdits.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
}
public WalEdits(
- List<ByteBuffer> edits)
+ java.util.List<java.nio.ByteBuffer> edits)
{
this();
this.edits = edits;
@@ -148,7 +118,7 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
*/
public WalEdits(WalEdits other) {
if (other.isSetEdits()) {
- List<ByteBuffer> __this__edits = new ArrayList<ByteBuffer>(other.edits);
+ java.util.List<java.nio.ByteBuffer> __this__edits = new java.util.ArrayList<java.nio.ByteBuffer>(other.edits);
this.edits = __this__edits;
}
}
@@ -166,22 +136,22 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
return (this.edits == null) ? 0 : this.edits.size();
}
- public java.util.Iterator<ByteBuffer> getEditsIterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> getEditsIterator() {
return (this.edits == null) ? null : this.edits.iterator();
}
- public void addToEdits(ByteBuffer elem) {
+ public void addToEdits(java.nio.ByteBuffer elem) {
if (this.edits == null) {
- this.edits = new ArrayList<ByteBuffer>();
+ this.edits = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.edits.add(elem);
}
- public List<ByteBuffer> getEdits() {
+ public java.util.List<java.nio.ByteBuffer> getEdits() {
return this.edits;
}
- public WalEdits setEdits(List<ByteBuffer> edits) {
+ public WalEdits setEdits(java.util.List<java.nio.ByteBuffer> edits) {
this.edits = edits;
return this;
}
@@ -201,43 +171,43 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EDITS:
if (value == null) {
unsetEdits();
} else {
- setEdits((List<ByteBuffer>)value);
+ setEdits((java.util.List<java.nio.ByteBuffer>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EDITS:
return getEdits();
}
- 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 EDITS:
return isSetEdits();
}
- 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 WalEdits)
@@ -248,6 +218,8 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
public boolean equals(WalEdits that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_edits = true && this.isSetEdits();
boolean that_present_edits = true && that.isSetEdits();
@@ -263,14 +235,13 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_edits = true && (isSetEdits());
- list.add(present_edits);
- if (present_edits)
- list.add(edits);
+ hashCode = hashCode * 8191 + ((isSetEdits()) ? 131071 : 524287);
+ if (isSetEdits())
+ hashCode = hashCode * 8191 + edits.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -281,7 +252,7 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEdits()).compareTo(other.isSetEdits());
+ lastComparison = java.lang.Boolean.valueOf(isSetEdits()).compareTo(other.isSetEdits());
if (lastComparison != 0) {
return lastComparison;
}
@@ -299,16 +270,16 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
}
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("WalEdits(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WalEdits(");
boolean first = true;
sb.append("edits:");
@@ -335,7 +306,7 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
}
}
- 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) {
@@ -343,13 +314,13 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
}
}
- private static class WalEditsStandardSchemeFactory implements SchemeFactory {
+ private static class WalEditsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WalEditsStandardScheme getScheme() {
return new WalEditsStandardScheme();
}
}
- private static class WalEditsStandardScheme extends StandardScheme<WalEdits> {
+ private static class WalEditsStandardScheme extends org.apache.thrift.scheme.StandardScheme<WalEdits> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WalEdits struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -365,8 +336,8 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.edits = new ArrayList<ByteBuffer>(_list0.size);
- ByteBuffer _elem1;
+ struct.edits = new java.util.ArrayList<java.nio.ByteBuffer>(_list0.size);
+ java.nio.ByteBuffer _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readBinary();
@@ -398,7 +369,7 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
oprot.writeFieldBegin(EDITS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.edits.size()));
- for (ByteBuffer _iter3 : struct.edits)
+ for (java.nio.ByteBuffer _iter3 : struct.edits)
{
oprot.writeBinary(_iter3);
}
@@ -412,18 +383,18 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
}
- private static class WalEditsTupleSchemeFactory implements SchemeFactory {
+ private static class WalEditsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WalEditsTupleScheme getScheme() {
return new WalEditsTupleScheme();
}
}
- private static class WalEditsTupleScheme extends TupleScheme<WalEdits> {
+ private static class WalEditsTupleScheme extends org.apache.thrift.scheme.TupleScheme<WalEdits> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WalEdits 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.isSetEdits()) {
optionals.set(0);
}
@@ -431,7 +402,7 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
if (struct.isSetEdits()) {
{
oprot.writeI32(struct.edits.size());
- for (ByteBuffer _iter4 : struct.edits)
+ for (java.nio.ByteBuffer _iter4 : struct.edits)
{
oprot.writeBinary(_iter4);
}
@@ -441,13 +412,13 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WalEdits 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)) {
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.edits = new ArrayList<ByteBuffer>(_list5.size);
- ByteBuffer _elem6;
+ struct.edits = new java.util.ArrayList<java.nio.ByteBuffer>(_list5.size);
+ java.nio.ByteBuffer _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = iprot.readBinary();
@@ -459,5 +430,9 @@ public class WalEdits implements org.apache.thrift.TBase<WalEdits, WalEdits._Fie
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationKey.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationKey.java b/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationKey.java
index 574a673..d4d2ef3 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationKey.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationKey.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.security.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticationKey, TAuthenticationKey._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthenticationKey> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthenticationKey");
@@ -59,13 +32,10 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
private static final org.apache.thrift.protocol.TField EXPIRATION_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("expirationDate", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField CREATION_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("creationDate", org.apache.thrift.protocol.TType.I64, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TAuthenticationKeyStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TAuthenticationKeyTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAuthenticationKeyStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAuthenticationKeyTupleSchemeFactory();
- public ByteBuffer secret; // required
+ public java.nio.ByteBuffer secret; // required
public int keyId; // optional
public long expirationDate; // optional
public long creationDate; // optional
@@ -77,10 +47,10 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
EXPIRATION_DATE((short)3, "expirationDate"),
CREATION_DATE((short)4, "creationDate");
- 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);
}
}
@@ -109,21 +79,21 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
*/
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;
}
@@ -132,7 +102,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -143,9 +113,9 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
private static final int __CREATIONDATE_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.KEY_ID,_Fields.EXPIRATION_DATE,_Fields.CREATION_DATE};
- 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.SECRET, new org.apache.thrift.meta_data.FieldMetaData("secret", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.KEY_ID, new org.apache.thrift.meta_data.FieldMetaData("keyId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -154,7 +124,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CREATION_DATE, new org.apache.thrift.meta_data.FieldMetaData("creationDate", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAuthenticationKey.class, metaDataMap);
}
@@ -162,7 +132,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
public TAuthenticationKey(
- ByteBuffer secret)
+ java.nio.ByteBuffer secret)
{
this();
this.secret = org.apache.thrift.TBaseHelper.copyBinary(secret);
@@ -201,16 +171,16 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
return secret == null ? null : secret.array();
}
- public ByteBuffer bufferForSecret() {
+ public java.nio.ByteBuffer bufferForSecret() {
return org.apache.thrift.TBaseHelper.copyBinary(secret);
}
public TAuthenticationKey setSecret(byte[] secret) {
- this.secret = secret == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(secret, secret.length));
+ this.secret = secret == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(secret.clone());
return this;
}
- public TAuthenticationKey setSecret(ByteBuffer secret) {
+ public TAuthenticationKey setSecret(java.nio.ByteBuffer secret) {
this.secret = org.apache.thrift.TBaseHelper.copyBinary(secret);
return this;
}
@@ -241,16 +211,16 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
public void unsetKeyId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEYID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __KEYID_ISSET_ID);
}
/** Returns true if field keyId is set (has been assigned a value) and false otherwise */
public boolean isSetKeyId() {
- return EncodingUtils.testBit(__isset_bitfield, __KEYID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __KEYID_ISSET_ID);
}
public void setKeyIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEYID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __KEYID_ISSET_ID, value);
}
public long getExpirationDate() {
@@ -264,16 +234,16 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
public void unsetExpirationDate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
}
/** Returns true if field expirationDate is set (has been assigned a value) and false otherwise */
public boolean isSetExpirationDate() {
- return EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
}
public void setExpirationDateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID, value);
}
public long getCreationDate() {
@@ -287,25 +257,29 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
public void unsetCreationDate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONDATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATIONDATE_ISSET_ID);
}
/** Returns true if field creationDate is set (has been assigned a value) and false otherwise */
public boolean isSetCreationDate() {
- return EncodingUtils.testBit(__isset_bitfield, __CREATIONDATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATIONDATE_ISSET_ID);
}
public void setCreationDateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONDATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATIONDATE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SECRET:
if (value == null) {
unsetSecret();
} else {
- setSecret((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setSecret((byte[])value);
+ } else {
+ setSecret((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -313,7 +287,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
if (value == null) {
unsetKeyId();
} else {
- setKeyId((Integer)value);
+ setKeyId((java.lang.Integer)value);
}
break;
@@ -321,7 +295,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
if (value == null) {
unsetExpirationDate();
} else {
- setExpirationDate((Long)value);
+ setExpirationDate((java.lang.Long)value);
}
break;
@@ -329,14 +303,14 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
if (value == null) {
unsetCreationDate();
} else {
- setCreationDate((Long)value);
+ setCreationDate((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SECRET:
return getSecret();
@@ -351,13 +325,13 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
return getCreationDate();
}
- 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) {
@@ -370,11 +344,11 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
case CREATION_DATE:
return isSetCreationDate();
}
- 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 TAuthenticationKey)
@@ -385,6 +359,8 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
public boolean equals(TAuthenticationKey that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_secret = true && this.isSetSecret();
boolean that_present_secret = true && that.isSetSecret();
@@ -427,29 +403,25 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_secret = true && (isSetSecret());
- list.add(present_secret);
- if (present_secret)
- list.add(secret);
+ hashCode = hashCode * 8191 + ((isSetSecret()) ? 131071 : 524287);
+ if (isSetSecret())
+ hashCode = hashCode * 8191 + secret.hashCode();
- boolean present_keyId = true && (isSetKeyId());
- list.add(present_keyId);
- if (present_keyId)
- list.add(keyId);
+ hashCode = hashCode * 8191 + ((isSetKeyId()) ? 131071 : 524287);
+ if (isSetKeyId())
+ hashCode = hashCode * 8191 + keyId;
- boolean present_expirationDate = true && (isSetExpirationDate());
- list.add(present_expirationDate);
- if (present_expirationDate)
- list.add(expirationDate);
+ hashCode = hashCode * 8191 + ((isSetExpirationDate()) ? 131071 : 524287);
+ if (isSetExpirationDate())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expirationDate);
- boolean present_creationDate = true && (isSetCreationDate());
- list.add(present_creationDate);
- if (present_creationDate)
- list.add(creationDate);
+ hashCode = hashCode * 8191 + ((isSetCreationDate()) ? 131071 : 524287);
+ if (isSetCreationDate())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationDate);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -460,7 +432,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSecret()).compareTo(other.isSetSecret());
+ lastComparison = java.lang.Boolean.valueOf(isSetSecret()).compareTo(other.isSetSecret());
if (lastComparison != 0) {
return lastComparison;
}
@@ -470,7 +442,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetKeyId()).compareTo(other.isSetKeyId());
+ lastComparison = java.lang.Boolean.valueOf(isSetKeyId()).compareTo(other.isSetKeyId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -480,7 +452,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExpirationDate()).compareTo(other.isSetExpirationDate());
+ lastComparison = java.lang.Boolean.valueOf(isSetExpirationDate()).compareTo(other.isSetExpirationDate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -490,7 +462,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreationDate()).compareTo(other.isSetCreationDate());
+ lastComparison = java.lang.Boolean.valueOf(isSetCreationDate()).compareTo(other.isSetCreationDate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -508,16 +480,16 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
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("TAuthenticationKey(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TAuthenticationKey(");
boolean first = true;
sb.append("secret:");
@@ -562,7 +534,7 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -572,13 +544,13 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
}
- private static class TAuthenticationKeyStandardSchemeFactory implements SchemeFactory {
+ private static class TAuthenticationKeyStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAuthenticationKeyStandardScheme getScheme() {
return new TAuthenticationKeyStandardScheme();
}
}
- private static class TAuthenticationKeyStandardScheme extends StandardScheme<TAuthenticationKey> {
+ private static class TAuthenticationKeyStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAuthenticationKey> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TAuthenticationKey struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -663,18 +635,18 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
- private static class TAuthenticationKeyTupleSchemeFactory implements SchemeFactory {
+ private static class TAuthenticationKeyTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAuthenticationKeyTupleScheme getScheme() {
return new TAuthenticationKeyTupleScheme();
}
}
- private static class TAuthenticationKeyTupleScheme extends TupleScheme<TAuthenticationKey> {
+ private static class TAuthenticationKeyTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAuthenticationKey> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAuthenticationKey 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.isSetSecret()) {
optionals.set(0);
}
@@ -704,8 +676,8 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TAuthenticationKey struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.secret = iprot.readBinary();
struct.setSecretIsSet(true);
@@ -725,5 +697,9 @@ public class TAuthenticationKey implements org.apache.thrift.TBase<TAuthenticati
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationTokenIdentifier.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationTokenIdentifier.java b/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationTokenIdentifier.java
index cf3f515..872f6b8 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationTokenIdentifier.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/thrift/TAuthenticationTokenIdentifier.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.security.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<TAuthenticationTokenIdentifier, TAuthenticationTokenIdentifier._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthenticationTokenIdentifier> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthenticationTokenIdentifier");
@@ -60,17 +33,14 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
private static final org.apache.thrift.protocol.TField EXPIRATION_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("expirationDate", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("instanceId", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TAuthenticationTokenIdentifierStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TAuthenticationTokenIdentifierTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAuthenticationTokenIdentifierStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAuthenticationTokenIdentifierTupleSchemeFactory();
- public String principal; // required
+ public java.lang.String principal; // required
public int keyId; // optional
public long issueDate; // optional
public long expirationDate; // optional
- public String instanceId; // optional
+ public java.lang.String instanceId; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -80,10 +50,10 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
EXPIRATION_DATE((short)4, "expirationDate"),
INSTANCE_ID((short)5, "instanceId");
- 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);
}
}
@@ -114,21 +84,21 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
*/
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;
}
@@ -137,7 +107,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -148,9 +118,9 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
private static final int __EXPIRATIONDATE_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.KEY_ID,_Fields.ISSUE_DATE,_Fields.EXPIRATION_DATE,_Fields.INSTANCE_ID};
- 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.PRINCIPAL, new org.apache.thrift.meta_data.FieldMetaData("principal", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.KEY_ID, new org.apache.thrift.meta_data.FieldMetaData("keyId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -161,7 +131,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("instanceId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TAuthenticationTokenIdentifier.class, metaDataMap);
}
@@ -169,7 +139,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
public TAuthenticationTokenIdentifier(
- String principal)
+ java.lang.String principal)
{
this();
this.principal = principal;
@@ -207,11 +177,11 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
this.instanceId = null;
}
- public String getPrincipal() {
+ public java.lang.String getPrincipal() {
return this.principal;
}
- public TAuthenticationTokenIdentifier setPrincipal(String principal) {
+ public TAuthenticationTokenIdentifier setPrincipal(java.lang.String principal) {
this.principal = principal;
return this;
}
@@ -242,16 +212,16 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
public void unsetKeyId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEYID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __KEYID_ISSET_ID);
}
/** Returns true if field keyId is set (has been assigned a value) and false otherwise */
public boolean isSetKeyId() {
- return EncodingUtils.testBit(__isset_bitfield, __KEYID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __KEYID_ISSET_ID);
}
public void setKeyIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEYID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __KEYID_ISSET_ID, value);
}
public long getIssueDate() {
@@ -265,16 +235,16 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
public void unsetIssueDate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUEDATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISSUEDATE_ISSET_ID);
}
/** Returns true if field issueDate is set (has been assigned a value) and false otherwise */
public boolean isSetIssueDate() {
- return EncodingUtils.testBit(__isset_bitfield, __ISSUEDATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISSUEDATE_ISSET_ID);
}
public void setIssueDateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUEDATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISSUEDATE_ISSET_ID, value);
}
public long getExpirationDate() {
@@ -288,23 +258,23 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
public void unsetExpirationDate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
}
/** Returns true if field expirationDate is set (has been assigned a value) and false otherwise */
public boolean isSetExpirationDate() {
- return EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID);
}
public void setExpirationDateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRATIONDATE_ISSET_ID, value);
}
- public String getInstanceId() {
+ public java.lang.String getInstanceId() {
return this.instanceId;
}
- public TAuthenticationTokenIdentifier setInstanceId(String instanceId) {
+ public TAuthenticationTokenIdentifier setInstanceId(java.lang.String instanceId) {
this.instanceId = instanceId;
return this;
}
@@ -324,13 +294,13 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PRINCIPAL:
if (value == null) {
unsetPrincipal();
} else {
- setPrincipal((String)value);
+ setPrincipal((java.lang.String)value);
}
break;
@@ -338,7 +308,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
if (value == null) {
unsetKeyId();
} else {
- setKeyId((Integer)value);
+ setKeyId((java.lang.Integer)value);
}
break;
@@ -346,7 +316,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
if (value == null) {
unsetIssueDate();
} else {
- setIssueDate((Long)value);
+ setIssueDate((java.lang.Long)value);
}
break;
@@ -354,7 +324,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
if (value == null) {
unsetExpirationDate();
} else {
- setExpirationDate((Long)value);
+ setExpirationDate((java.lang.Long)value);
}
break;
@@ -362,14 +332,14 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
if (value == null) {
unsetInstanceId();
} else {
- setInstanceId((String)value);
+ setInstanceId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PRINCIPAL:
return getPrincipal();
@@ -387,13 +357,13 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
return getInstanceId();
}
- 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) {
@@ -408,11 +378,11 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
case INSTANCE_ID:
return isSetInstanceId();
}
- 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 TAuthenticationTokenIdentifier)
@@ -423,6 +393,8 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
public boolean equals(TAuthenticationTokenIdentifier that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_principal = true && this.isSetPrincipal();
boolean that_present_principal = true && that.isSetPrincipal();
@@ -474,34 +446,29 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_principal = true && (isSetPrincipal());
- list.add(present_principal);
- if (present_principal)
- list.add(principal);
+ hashCode = hashCode * 8191 + ((isSetPrincipal()) ? 131071 : 524287);
+ if (isSetPrincipal())
+ hashCode = hashCode * 8191 + principal.hashCode();
- boolean present_keyId = true && (isSetKeyId());
- list.add(present_keyId);
- if (present_keyId)
- list.add(keyId);
+ hashCode = hashCode * 8191 + ((isSetKeyId()) ? 131071 : 524287);
+ if (isSetKeyId())
+ hashCode = hashCode * 8191 + keyId;
- boolean present_issueDate = true && (isSetIssueDate());
- list.add(present_issueDate);
- if (present_issueDate)
- list.add(issueDate);
+ hashCode = hashCode * 8191 + ((isSetIssueDate()) ? 131071 : 524287);
+ if (isSetIssueDate())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(issueDate);
- boolean present_expirationDate = true && (isSetExpirationDate());
- list.add(present_expirationDate);
- if (present_expirationDate)
- list.add(expirationDate);
+ hashCode = hashCode * 8191 + ((isSetExpirationDate()) ? 131071 : 524287);
+ if (isSetExpirationDate())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expirationDate);
- boolean present_instanceId = true && (isSetInstanceId());
- list.add(present_instanceId);
- if (present_instanceId)
- list.add(instanceId);
+ hashCode = hashCode * 8191 + ((isSetInstanceId()) ? 131071 : 524287);
+ if (isSetInstanceId())
+ hashCode = hashCode * 8191 + instanceId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -512,7 +479,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetPrincipal()).compareTo(other.isSetPrincipal());
+ lastComparison = java.lang.Boolean.valueOf(isSetPrincipal()).compareTo(other.isSetPrincipal());
if (lastComparison != 0) {
return lastComparison;
}
@@ -522,7 +489,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetKeyId()).compareTo(other.isSetKeyId());
+ lastComparison = java.lang.Boolean.valueOf(isSetKeyId()).compareTo(other.isSetKeyId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -532,7 +499,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIssueDate()).compareTo(other.isSetIssueDate());
+ lastComparison = java.lang.Boolean.valueOf(isSetIssueDate()).compareTo(other.isSetIssueDate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -542,7 +509,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExpirationDate()).compareTo(other.isSetExpirationDate());
+ lastComparison = java.lang.Boolean.valueOf(isSetExpirationDate()).compareTo(other.isSetExpirationDate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -552,7 +519,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetInstanceId()).compareTo(other.isSetInstanceId());
+ lastComparison = java.lang.Boolean.valueOf(isSetInstanceId()).compareTo(other.isSetInstanceId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -570,16 +537,16 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
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("TAuthenticationTokenIdentifier(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TAuthenticationTokenIdentifier(");
boolean first = true;
sb.append("principal:");
@@ -634,7 +601,7 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -644,13 +611,13 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
}
- private static class TAuthenticationTokenIdentifierStandardSchemeFactory implements SchemeFactory {
+ private static class TAuthenticationTokenIdentifierStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAuthenticationTokenIdentifierStandardScheme getScheme() {
return new TAuthenticationTokenIdentifierStandardScheme();
}
}
- private static class TAuthenticationTokenIdentifierStandardScheme extends StandardScheme<TAuthenticationTokenIdentifier> {
+ private static class TAuthenticationTokenIdentifierStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAuthenticationTokenIdentifier> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TAuthenticationTokenIdentifier struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -750,18 +717,18 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
- private static class TAuthenticationTokenIdentifierTupleSchemeFactory implements SchemeFactory {
+ private static class TAuthenticationTokenIdentifierTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAuthenticationTokenIdentifierTupleScheme getScheme() {
return new TAuthenticationTokenIdentifierTupleScheme();
}
}
- private static class TAuthenticationTokenIdentifierTupleScheme extends TupleScheme<TAuthenticationTokenIdentifier> {
+ private static class TAuthenticationTokenIdentifierTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAuthenticationTokenIdentifier> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAuthenticationTokenIdentifier 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.isSetPrincipal()) {
optionals.set(0);
}
@@ -797,8 +764,8 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TAuthenticationTokenIdentifier struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.principal = iprot.readString();
struct.setPrincipalIsSet(true);
@@ -822,5 +789,9 @@ public class TAuthenticationTokenIdentifier implements org.apache.thrift.TBase<T
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/security/thrift/TCredentials.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/thrift/TCredentials.java b/core/src/main/java/org/apache/accumulo/core/security/thrift/TCredentials.java
index f9beda9..fd7a5e1 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/thrift/TCredentials.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/thrift/TCredentials.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.security.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCredentials._Fields>, java.io.Serializable, Cloneable, Comparable<TCredentials> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCredentials");
@@ -59,16 +32,13 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("instanceId", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TCredentialsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TCredentialsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCredentialsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCredentialsTupleSchemeFactory();
- public String principal; // required
- public String tokenClassName; // required
- public ByteBuffer token; // required
- public String instanceId; // required
+ public java.lang.String principal; // required
+ public java.lang.String tokenClassName; // required
+ public java.nio.ByteBuffer token; // required
+ public java.lang.String instanceId; // 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 {
@@ -77,10 +47,10 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
TOKEN((short)3, "token"),
INSTANCE_ID((short)4, "instanceId");
- 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);
}
}
@@ -109,21 +79,21 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
*/
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;
}
@@ -132,15 +102,15 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
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.PRINCIPAL, new org.apache.thrift.meta_data.FieldMetaData("principal", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TOKEN_CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("tokenClassName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -149,7 +119,7 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("instanceId", 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(TCredentials.class, metaDataMap);
}
@@ -157,10 +127,10 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
public TCredentials(
- String principal,
- String tokenClassName,
- ByteBuffer token,
- String instanceId)
+ java.lang.String principal,
+ java.lang.String tokenClassName,
+ java.nio.ByteBuffer token,
+ java.lang.String instanceId)
{
this();
this.principal = principal;
@@ -199,11 +169,11 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
this.instanceId = null;
}
- public String getPrincipal() {
+ public java.lang.String getPrincipal() {
return this.principal;
}
- public TCredentials setPrincipal(String principal) {
+ public TCredentials setPrincipal(java.lang.String principal) {
this.principal = principal;
return this;
}
@@ -223,11 +193,11 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
}
- public String getTokenClassName() {
+ public java.lang.String getTokenClassName() {
return this.tokenClassName;
}
- public TCredentials setTokenClassName(String tokenClassName) {
+ public TCredentials setTokenClassName(java.lang.String tokenClassName) {
this.tokenClassName = tokenClassName;
return this;
}
@@ -252,16 +222,16 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
return token == null ? null : token.array();
}
- public ByteBuffer bufferForToken() {
+ public java.nio.ByteBuffer bufferForToken() {
return org.apache.thrift.TBaseHelper.copyBinary(token);
}
public TCredentials setToken(byte[] token) {
- this.token = token == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(token, token.length));
+ this.token = token == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(token.clone());
return this;
}
- public TCredentials setToken(ByteBuffer token) {
+ public TCredentials setToken(java.nio.ByteBuffer token) {
this.token = org.apache.thrift.TBaseHelper.copyBinary(token);
return this;
}
@@ -281,11 +251,11 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
}
- public String getInstanceId() {
+ public java.lang.String getInstanceId() {
return this.instanceId;
}
- public TCredentials setInstanceId(String instanceId) {
+ public TCredentials setInstanceId(java.lang.String instanceId) {
this.instanceId = instanceId;
return this;
}
@@ -305,13 +275,13 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PRINCIPAL:
if (value == null) {
unsetPrincipal();
} else {
- setPrincipal((String)value);
+ setPrincipal((java.lang.String)value);
}
break;
@@ -319,7 +289,7 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
if (value == null) {
unsetTokenClassName();
} else {
- setTokenClassName((String)value);
+ setTokenClassName((java.lang.String)value);
}
break;
@@ -327,7 +297,11 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
if (value == null) {
unsetToken();
} else {
- setToken((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setToken((byte[])value);
+ } else {
+ setToken((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -335,14 +309,14 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
if (value == null) {
unsetInstanceId();
} else {
- setInstanceId((String)value);
+ setInstanceId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PRINCIPAL:
return getPrincipal();
@@ -357,13 +331,13 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
return getInstanceId();
}
- 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) {
@@ -376,11 +350,11 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
case INSTANCE_ID:
return isSetInstanceId();
}
- 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 TCredentials)
@@ -391,6 +365,8 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
public boolean equals(TCredentials that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_principal = true && this.isSetPrincipal();
boolean that_present_principal = true && that.isSetPrincipal();
@@ -433,29 +409,25 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_principal = true && (isSetPrincipal());
- list.add(present_principal);
- if (present_principal)
- list.add(principal);
+ hashCode = hashCode * 8191 + ((isSetPrincipal()) ? 131071 : 524287);
+ if (isSetPrincipal())
+ hashCode = hashCode * 8191 + principal.hashCode();
- boolean present_tokenClassName = true && (isSetTokenClassName());
- list.add(present_tokenClassName);
- if (present_tokenClassName)
- list.add(tokenClassName);
+ hashCode = hashCode * 8191 + ((isSetTokenClassName()) ? 131071 : 524287);
+ if (isSetTokenClassName())
+ hashCode = hashCode * 8191 + tokenClassName.hashCode();
- boolean present_token = true && (isSetToken());
- list.add(present_token);
- if (present_token)
- list.add(token);
+ hashCode = hashCode * 8191 + ((isSetToken()) ? 131071 : 524287);
+ if (isSetToken())
+ hashCode = hashCode * 8191 + token.hashCode();
- boolean present_instanceId = true && (isSetInstanceId());
- list.add(present_instanceId);
- if (present_instanceId)
- list.add(instanceId);
+ hashCode = hashCode * 8191 + ((isSetInstanceId()) ? 131071 : 524287);
+ if (isSetInstanceId())
+ hashCode = hashCode * 8191 + instanceId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -466,7 +438,7 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetPrincipal()).compareTo(other.isSetPrincipal());
+ lastComparison = java.lang.Boolean.valueOf(isSetPrincipal()).compareTo(other.isSetPrincipal());
if (lastComparison != 0) {
return lastComparison;
}
@@ -476,7 +448,7 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTokenClassName()).compareTo(other.isSetTokenClassName());
+ lastComparison = java.lang.Boolean.valueOf(isSetTokenClassName()).compareTo(other.isSetTokenClassName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -486,7 +458,7 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
+ lastComparison = java.lang.Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -496,7 +468,7 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetInstanceId()).compareTo(other.isSetInstanceId());
+ lastComparison = java.lang.Boolean.valueOf(isSetInstanceId()).compareTo(other.isSetInstanceId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -514,16 +486,16 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
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("TCredentials(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TCredentials(");
boolean first = true;
sb.append("principal:");
@@ -574,7 +546,7 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
}
- 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) {
@@ -582,13 +554,13 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
}
- private static class TCredentialsStandardSchemeFactory implements SchemeFactory {
+ private static class TCredentialsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCredentialsStandardScheme getScheme() {
return new TCredentialsStandardScheme();
}
}
- private static class TCredentialsStandardScheme extends StandardScheme<TCredentials> {
+ private static class TCredentialsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCredentials> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCredentials struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -673,18 +645,18 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
- private static class TCredentialsTupleSchemeFactory implements SchemeFactory {
+ private static class TCredentialsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCredentialsTupleScheme getScheme() {
return new TCredentialsTupleScheme();
}
}
- private static class TCredentialsTupleScheme extends TupleScheme<TCredentials> {
+ private static class TCredentialsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCredentials> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCredentials 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.isSetPrincipal()) {
optionals.set(0);
}
@@ -714,8 +686,8 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCredentials struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.principal = iprot.readString();
struct.setPrincipalIsSet(true);
@@ -735,5 +707,9 @@ public class TCredentials implements org.apache.thrift.TBase<TCredentials, TCred
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[37/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTest.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTest.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTest.java
index aa828d4..a8ec8c9 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTest.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTest.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.client.impl.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ThriftTest {
public interface Iface {
@@ -65,15 +38,15 @@ public class ThriftTest {
public interface AsyncIface {
- public void success(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void success(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void fails(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void fails(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void throwsError(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void throwsError(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -180,15 +153,15 @@ public class ThriftTest {
super(protocolFactory, clientManager, transport);
}
- public void success(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void success(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
success_call method_call = new success_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class success_call extends org.apache.thrift.async.TAsyncMethodCall {
- public success_call(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 success_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
+ public success_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
@@ -199,9 +172,9 @@ public class ThriftTest {
prot.writeMessageEnd();
}
- public boolean getResult() throws org.apache.thrift.TException {
+ public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -209,15 +182,15 @@ public class ThriftTest {
}
}
- public void fails(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void fails(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
fails_call method_call = new fails_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class fails_call extends org.apache.thrift.async.TAsyncMethodCall {
- public fails_call(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 fails_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
+ public fails_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
@@ -228,9 +201,9 @@ public class ThriftTest {
prot.writeMessageEnd();
}
- public boolean getResult() throws org.apache.thrift.TException {
+ public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -238,15 +211,15 @@ public class ThriftTest {
}
}
- public void throwsError(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void throwsError(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
throwsError_call method_call = new throwsError_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class throwsError_call extends org.apache.thrift.async.TAsyncMethodCall {
- public throwsError_call(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 throwsError_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
+ public throwsError_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
@@ -257,9 +230,9 @@ public class ThriftTest {
prot.writeMessageEnd();
}
- public boolean getResult() throws ThriftSecurityException, org.apache.thrift.TException {
+ public java.lang.Boolean getResult() throws ThriftSecurityException, 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);
@@ -270,16 +243,16 @@ public class ThriftTest {
}
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("success", new success());
processMap.put("fails", new fails());
processMap.put("throwsError", new throwsError());
@@ -356,23 +329,23 @@ public class ThriftTest {
}
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("success", new success());
processMap.put("fails", new fails());
processMap.put("throwsError", new throwsError());
return processMap;
}
- public static class success<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, success_args, Boolean> {
+ public static class success<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, success_args, java.lang.Boolean> {
public success() {
super("success");
}
@@ -381,36 +354,46 @@ public class ThriftTest {
return new success_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ public void onComplete(java.lang.Boolean o) {
success_result result = new success_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
success_result result = new success_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.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();
}
};
}
@@ -419,12 +402,12 @@ public class ThriftTest {
return false;
}
- public void start(I iface, success_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ public void start(I iface, success_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.success(resultHandler);
}
}
- public static class fails<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, fails_args, Boolean> {
+ public static class fails<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, fails_args, java.lang.Boolean> {
public fails() {
super("fails");
}
@@ -433,36 +416,46 @@ public class ThriftTest {
return new fails_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ public void onComplete(java.lang.Boolean o) {
fails_result result = new fails_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
fails_result result = new fails_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.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();
}
};
}
@@ -471,12 +464,12 @@ public class ThriftTest {
return false;
}
- public void start(I iface, fails_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ public void start(I iface, fails_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.fails(resultHandler);
}
}
- public static class throwsError<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, throwsError_args, Boolean> {
+ public static class throwsError<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, throwsError_args, java.lang.Boolean> {
public throwsError() {
super("throwsError");
}
@@ -485,42 +478,50 @@ public class ThriftTest {
return new throwsError_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ public void onComplete(java.lang.Boolean o) {
throwsError_result result = new throwsError_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
throwsError_result result = new throwsError_result();
if (e instanceof ThriftSecurityException) {
- result.ex = (ThriftSecurityException) e;
- result.setExIsSet(true);
- msg = result;
- }
- else
- {
+ result.ex = (ThriftSecurityException) e;
+ result.setExIsSet(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();
}
};
}
@@ -529,7 +530,7 @@ public class ThriftTest {
return false;
}
- public void start(I iface, throwsError_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ public void start(I iface, throwsError_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.throwsError(resultHandler);
}
}
@@ -540,21 +541,18 @@ public class ThriftTest {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("success_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new success_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new success_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new success_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new success_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- 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);
}
}
@@ -575,21 +573,21 @@ public class ThriftTest {
*/
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;
}
@@ -598,14 +596,14 @@ public class ThriftTest {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(success_args.class, metaDataMap);
}
@@ -626,30 +624,30 @@ public class ThriftTest {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- 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) {
}
- 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 success_args)
@@ -660,15 +658,17 @@ public class ThriftTest {
public boolean equals(success_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -687,16 +687,16 @@ public class ThriftTest {
}
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("success_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("success_args(");
boolean first = true;
sb.append(")");
@@ -716,7 +716,7 @@ public class ThriftTest {
}
}
- 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) {
@@ -724,13 +724,13 @@ public class ThriftTest {
}
}
- private static class success_argsStandardSchemeFactory implements SchemeFactory {
+ private static class success_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public success_argsStandardScheme getScheme() {
return new success_argsStandardScheme();
}
}
- private static class success_argsStandardScheme extends StandardScheme<success_args> {
+ private static class success_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<success_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, success_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -763,25 +763,28 @@ public class ThriftTest {
}
- private static class success_argsTupleSchemeFactory implements SchemeFactory {
+ private static class success_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public success_argsTupleScheme getScheme() {
return new success_argsTupleScheme();
}
}
- private static class success_argsTupleScheme extends TupleScheme<success_args> {
+ private static class success_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<success_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, success_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, success_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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 success_result implements org.apache.thrift.TBase<success_result, success_result._Fields>, java.io.Serializable, Cloneable, Comparable<success_result> {
@@ -789,11 +792,8 @@ public class ThriftTest {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new success_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new success_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new success_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new success_resultTupleSchemeFactory();
public boolean success; // required
@@ -801,10 +801,10 @@ public class ThriftTest {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -827,21 +827,21 @@ public class ThriftTest {
*/
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;
}
@@ -850,7 +850,7 @@ public class ThriftTest {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -858,12 +858,12 @@ public class ThriftTest {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(success_result.class, metaDataMap);
}
@@ -907,55 +907,55 @@ public class ThriftTest {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof success_result)
@@ -966,6 +966,8 @@ public class ThriftTest {
public boolean equals(success_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -981,14 +983,11 @@ public class ThriftTest {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -999,7 +998,7 @@ public class ThriftTest {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1017,16 +1016,16 @@ public class ThriftTest {
}
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("success_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("success_result(");
boolean first = true;
sb.append("success:");
@@ -1049,7 +1048,7 @@ public class ThriftTest {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1059,13 +1058,13 @@ public class ThriftTest {
}
}
- private static class success_resultStandardSchemeFactory implements SchemeFactory {
+ private static class success_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public success_resultStandardScheme getScheme() {
return new success_resultStandardScheme();
}
}
- private static class success_resultStandardScheme extends StandardScheme<success_result> {
+ private static class success_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<success_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, success_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1111,18 +1110,18 @@ public class ThriftTest {
}
- private static class success_resultTupleSchemeFactory implements SchemeFactory {
+ private static class success_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public success_resultTupleScheme getScheme() {
return new success_resultTupleScheme();
}
}
- private static class success_resultTupleScheme extends TupleScheme<success_result> {
+ private static class success_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<success_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, success_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -1134,8 +1133,8 @@ public class ThriftTest {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, success_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
@@ -1143,27 +1142,27 @@ public class ThriftTest {
}
}
+ 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 fails_args implements org.apache.thrift.TBase<fails_args, fails_args._Fields>, java.io.Serializable, Cloneable, Comparable<fails_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fails_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new fails_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new fails_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fails_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fails_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- 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);
}
}
@@ -1184,21 +1183,21 @@ public class ThriftTest {
*/
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;
}
@@ -1207,14 +1206,14 @@ public class ThriftTest {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fails_args.class, metaDataMap);
}
@@ -1235,30 +1234,30 @@ public class ThriftTest {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- 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) {
}
- 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 fails_args)
@@ -1269,15 +1268,17 @@ public class ThriftTest {
public boolean equals(fails_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1296,16 +1297,16 @@ public class ThriftTest {
}
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("fails_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("fails_args(");
boolean first = true;
sb.append(")");
@@ -1325,7 +1326,7 @@ public class ThriftTest {
}
}
- 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) {
@@ -1333,13 +1334,13 @@ public class ThriftTest {
}
}
- private static class fails_argsStandardSchemeFactory implements SchemeFactory {
+ private static class fails_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public fails_argsStandardScheme getScheme() {
return new fails_argsStandardScheme();
}
}
- private static class fails_argsStandardScheme extends StandardScheme<fails_args> {
+ private static class fails_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<fails_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, fails_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1372,25 +1373,28 @@ public class ThriftTest {
}
- private static class fails_argsTupleSchemeFactory implements SchemeFactory {
+ private static class fails_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public fails_argsTupleScheme getScheme() {
return new fails_argsTupleScheme();
}
}
- private static class fails_argsTupleScheme extends TupleScheme<fails_args> {
+ private static class fails_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<fails_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, fails_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, fails_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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 fails_result implements org.apache.thrift.TBase<fails_result, fails_result._Fields>, java.io.Serializable, Cloneable, Comparable<fails_result> {
@@ -1398,11 +1402,8 @@ public class ThriftTest {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new fails_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new fails_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fails_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fails_resultTupleSchemeFactory();
public boolean success; // required
@@ -1410,10 +1411,10 @@ public class ThriftTest {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -1436,21 +1437,21 @@ public class ThriftTest {
*/
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;
}
@@ -1459,7 +1460,7 @@ public class ThriftTest {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -1467,12 +1468,12 @@ public class ThriftTest {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fails_result.class, metaDataMap);
}
@@ -1516,55 +1517,55 @@ public class ThriftTest {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof fails_result)
@@ -1575,6 +1576,8 @@ public class ThriftTest {
public boolean equals(fails_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -1590,14 +1593,11 @@ public class ThriftTest {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1608,7 +1608,7 @@ public class ThriftTest {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1626,16 +1626,16 @@ public class ThriftTest {
}
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("fails_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("fails_result(");
boolean first = true;
sb.append("success:");
@@ -1658,7 +1658,7 @@ public class ThriftTest {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1668,13 +1668,13 @@ public class ThriftTest {
}
}
- private static class fails_resultStandardSchemeFactory implements SchemeFactory {
+ private static class fails_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public fails_resultStandardScheme getScheme() {
return new fails_resultStandardScheme();
}
}
- private static class fails_resultStandardScheme extends StandardScheme<fails_result> {
+ private static class fails_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<fails_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, fails_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1720,18 +1720,18 @@ public class ThriftTest {
}
- private static class fails_resultTupleSchemeFactory implements SchemeFactory {
+ private static class fails_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public fails_resultTupleScheme getScheme() {
return new fails_resultTupleScheme();
}
}
- private static class fails_resultTupleScheme extends TupleScheme<fails_result> {
+ private static class fails_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<fails_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, fails_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -1743,8 +1743,8 @@ public class ThriftTest {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, fails_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
@@ -1752,27 +1752,27 @@ public class ThriftTest {
}
}
+ 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 throwsError_args implements org.apache.thrift.TBase<throwsError_args, throwsError_args._Fields>, java.io.Serializable, Cloneable, Comparable<throwsError_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("throwsError_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new throwsError_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new throwsError_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new throwsError_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new throwsError_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- 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);
}
}
@@ -1793,21 +1793,21 @@ public class ThriftTest {
*/
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;
}
@@ -1816,14 +1816,14 @@ public class ThriftTest {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(throwsError_args.class, metaDataMap);
}
@@ -1844,30 +1844,30 @@ public class ThriftTest {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- 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) {
}
- 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 throwsError_args)
@@ -1878,15 +1878,17 @@ public class ThriftTest {
public boolean equals(throwsError_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1905,16 +1907,16 @@ public class ThriftTest {
}
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("throwsError_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("throwsError_args(");
boolean first = true;
sb.append(")");
@@ -1934,7 +1936,7 @@ public class ThriftTest {
}
}
- 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) {
@@ -1942,13 +1944,13 @@ public class ThriftTest {
}
}
- private static class throwsError_argsStandardSchemeFactory implements SchemeFactory {
+ private static class throwsError_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public throwsError_argsStandardScheme getScheme() {
return new throwsError_argsStandardScheme();
}
}
- private static class throwsError_argsStandardScheme extends StandardScheme<throwsError_args> {
+ private static class throwsError_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<throwsError_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, throwsError_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1981,25 +1983,28 @@ public class ThriftTest {
}
- private static class throwsError_argsTupleSchemeFactory implements SchemeFactory {
+ private static class throwsError_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public throwsError_argsTupleScheme getScheme() {
return new throwsError_argsTupleScheme();
}
}
- private static class throwsError_argsTupleScheme extends TupleScheme<throwsError_args> {
+ private static class throwsError_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<throwsError_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, throwsError_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, throwsError_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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 throwsError_result implements org.apache.thrift.TBase<throwsError_result, throwsError_result._Fields>, java.io.Serializable, Cloneable, Comparable<throwsError_result> {
@@ -2008,11 +2013,8 @@ public class ThriftTest {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", 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 throwsError_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new throwsError_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new throwsError_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new throwsError_resultTupleSchemeFactory();
public boolean success; // required
public ThriftSecurityException ex; // required
@@ -2022,10 +2024,10 @@ public class ThriftTest {
SUCCESS((short)0, "success"),
EX((short)1, "ex");
- 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);
}
}
@@ -2050,21 +2052,21 @@ public class ThriftTest {
*/
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;
}
@@ -2073,7 +2075,7 @@ public class ThriftTest {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -2081,14 +2083,14 @@ public class ThriftTest {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", 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, ThriftSecurityException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(throwsError_result.class, metaDataMap);
}
@@ -2138,16 +2140,16 @@ public class ThriftTest {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public ThriftSecurityException getEx() {
@@ -2174,13 +2176,13 @@ public class ThriftTest {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((java.lang.Boolean)value);
}
break;
@@ -2195,7 +2197,7 @@ public class ThriftTest {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
@@ -2204,13 +2206,13 @@ public class ThriftTest {
return getEx();
}
- 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) {
@@ -2219,11 +2221,11 @@ public class ThriftTest {
case EX:
return isSetEx();
}
- 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 throwsError_result)
@@ -2234,6 +2236,8 @@ public class ThriftTest {
public boolean equals(throwsError_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -2258,19 +2262,15 @@ public class ThriftTest {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
- boolean present_ex = true && (isSetEx());
- list.add(present_ex);
- if (present_ex)
- list.add(ex);
+ hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
+ if (isSetEx())
+ hashCode = hashCode * 8191 + ex.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -2281,7 +2281,7 @@ public class ThriftTest {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2291,7 +2291,7 @@ public class ThriftTest {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
+ lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2309,16 +2309,16 @@ public class ThriftTest {
}
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("throwsError_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("throwsError_result(");
boolean first = true;
sb.append("success:");
@@ -2349,7 +2349,7 @@ public class ThriftTest {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -2359,13 +2359,13 @@ public class ThriftTest {
}
}
- private static class throwsError_resultStandardSchemeFactory implements SchemeFactory {
+ private static class throwsError_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public throwsError_resultStandardScheme getScheme() {
return new throwsError_resultStandardScheme();
}
}
- private static class throwsError_resultStandardScheme extends StandardScheme<throwsError_result> {
+ private static class throwsError_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<throwsError_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, throwsError_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -2425,18 +2425,18 @@ public class ThriftTest {
}
- private static class throwsError_resultTupleSchemeFactory implements SchemeFactory {
+ private static class throwsError_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public throwsError_resultTupleScheme getScheme() {
return new throwsError_resultTupleScheme();
}
}
- private static class throwsError_resultTupleScheme extends TupleScheme<throwsError_result> {
+ private static class throwsError_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<throwsError_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, throwsError_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -2454,8 +2454,8 @@ public class ThriftTest {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, throwsError_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 = iprot.readBool();
struct.setSuccessIsSet(true);
@@ -2468,6 +2468,10 @@ public class ThriftTest {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
+ private static void unusedMethod() {}
}
[41/41] accumulo git commit: ACCUMULO-4551 Update to thrift 0.10.0
Posted by ct...@apache.org.
ACCUMULO-4551 Update to thrift 0.10.0
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ead6674e
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ead6674e
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ead6674e
Branch: refs/heads/master
Commit: ead6674ee395bc645daffd456c7205ebc09bed1d
Parents: 8be77df
Author: Christopher Tubbs <ct...@apache.org>
Authored: Sat Feb 4 23:49:23 2017 -0500
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Feb 9 14:27:47 2017 -0500
----------------------------------------------------------------------
.../core/rpc/TServiceClientWrapper.java | 56 ++++++++++++++++++++
core/src/main/scripts/generate-thrift.sh | 17 +++---
core/src/main/thrift/client.thrift | 18 +++----
core/src/main/thrift/master.thrift | 2 +-
pom.xml | 2 +-
.../accumulo/server/rpc/RpcWrapperTest.java | 2 +-
6 files changed, 79 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ead6674e/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java b/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java
new file mode 100644
index 0000000..9636fe5
--- /dev/null
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.core.rpc;
+
+import org.apache.thrift.TApplicationException;
+import org.apache.thrift.TBase;
+import org.apache.thrift.TException;
+import org.apache.thrift.TServiceClient;
+import org.apache.thrift.protocol.TMessage;
+import org.apache.thrift.protocol.TMessageType;
+import org.apache.thrift.protocol.TProtocol;
+
+// Wrapper for THRIFT-4062 workaround; shouldn't be needed in newer versions
+// Also update generate-thrift.sh to stop using this
+public abstract class TServiceClientWrapper extends TServiceClient {
+
+ public TServiceClientWrapper(TProtocol iprot, TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public TServiceClientWrapper(TProtocol prot) {
+ super(prot);
+ }
+
+ @Override
+ protected void receiveBase(TBase<?,?> result, String methodName) throws TException {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = new TApplicationException();
+ x.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, String.format("%s failed: out of sequence response: expected %d but got %d",
+ methodName, seqid_, msg.seqid));
+ }
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ead6674e/core/src/main/scripts/generate-thrift.sh
----------------------------------------------------------------------
diff --git a/core/src/main/scripts/generate-thrift.sh b/core/src/main/scripts/generate-thrift.sh
index 691ea79..d189323 100755
--- a/core/src/main/scripts/generate-thrift.sh
+++ b/core/src/main/scripts/generate-thrift.sh
@@ -26,7 +26,7 @@
# INCLUDED_MODULES should be an array that includes other Maven modules with src/main/thrift directories
# Use INCLUDED_MODULES=(-) in calling scripts that require no other modules
# ========================================================================================================================
-[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.9.3'
+[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.10.0'
[[ -z $INCLUDED_MODULES ]] && INCLUDED_MODULES=(../server/tracer)
[[ -z $BASE_OUTPUT_PACKAGE ]] && BASE_OUTPUT_PACKAGE='org.apache.accumulo.core'
[[ -z $PACKAGES_TO_GENERATE ]] && PACKAGES_TO_GENERATE=(gc master tabletserver security client.impl data replication trace)
@@ -71,11 +71,16 @@ for f in src/main/thrift/*.thrift; do
thrift ${THRIFT_ARGS} --gen cpp "$f" || fail unable to generate cpp thrift classes
done
-# For all generated thrift code, suppress all warnings and add the LICENSE header
-cs='@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"})'
-es='@SuppressWarnings({"unused"})'
-find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/"unchecked"/"unchecked", "unused"/'
-find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/\(public enum [A-Z]\)/'"$es"' \1/'
+# For all generated thrift code, get rid of all warnings and add the LICENSE header
+
+# workaround for THRIFT-4062; should be fixed in newer thrift versions
+find $BUILD_DIR/gen-java -name '*.java' -exec sed -i -e 's/\(org[.]apache[.]\)thrift\([.]TServiceClient\) /\1accumulo.core.rpc\2Wrapper /' {} +
+# upstream stopped doing import statements for classes, but overlooked enums; delete unused imports
+find $BUILD_DIR/gen-java -name '*.java' -exec grep -Zl '^public enum ' {} + | xargs -0 sed -i -e '/^import .*$/d'
+# add dummy method to suppress "unnecessary suppress warnings" for classes which don't have any unused variables
+# this only affects classes, enums aren't affected
+find $BUILD_DIR/gen-java -name '*.java' -exec grep -Zl '^public class ' {} + | xargs -0 sed -i -e 's/^[}]$/ private static void unusedMethod() {}\
+}/'
for lang in "${LANGUAGES_TO_GENERATE[@]}"; do
case $lang in
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ead6674e/core/src/main/thrift/client.thrift
----------------------------------------------------------------------
diff --git a/core/src/main/thrift/client.thrift b/core/src/main/thrift/client.thrift
index 722faaf..4ab3e48 100644
--- a/core/src/main/thrift/client.thrift
+++ b/core/src/main/thrift/client.thrift
@@ -133,15 +133,15 @@ service ClientService {
list<binary> getUserAuthorizations(3:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string principal) throws (1:ThriftSecurityException sec)
// permissions-related methods
- bool hasSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte sysPerm) throws (1:ThriftSecurityException sec)
- bool hasTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte tblPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
- bool hasNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte tblNspcPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
- void grantSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec)
- void revokeSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec)
- void grantTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
- void revokeTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
- void grantNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
- void revokeNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+ bool hasSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 sysPerm) throws (1:ThriftSecurityException sec)
+ bool hasTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 tblPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+ bool hasNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 tblNspcPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+ void grantSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 permission) throws (1:ThriftSecurityException sec)
+ void revokeSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 permission) throws (1:ThriftSecurityException sec)
+ void grantTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+ void revokeTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+ void grantNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
+ void revokeNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope)
// configuration methods
map<string, string> getConfiguration(2:trace.TInfo tinfo, 3:security.TCredentials credentials, 1:ConfigurationType type);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ead6674e/core/src/main/thrift/master.thrift
----------------------------------------------------------------------
diff --git a/core/src/main/thrift/master.thrift b/core/src/main/thrift/master.thrift
index 58829ec..fbacc66 100644
--- a/core/src/main/thrift/master.thrift
+++ b/core/src/main/thrift/master.thrift
@@ -112,7 +112,7 @@ struct DeadServer {
struct MasterMonitorInfo {
1:map<string, TableInfo> tableMap
2:list<TabletServerStatus> tServerInfo
- 3:map<string, byte> badTServers
+ 3:map<string, i8> badTServers
6:MasterState state
8:MasterGoalState goalState
7:i32 unassignedTablets
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ead6674e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f813c51..8aacdb2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -152,7 +152,7 @@
<surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests>
<surefire.groups />
<!-- Thrift version -->
- <thrift.version>0.9.3</thrift.version>
+ <thrift.version>0.10.0</thrift.version>
<!-- ZooKeeper version -->
<zookeeper.version>3.4.6</zookeeper.version>
</properties>
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ead6674e/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java b/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java
index d32178e..894acce 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java
@@ -288,7 +288,7 @@ public class RpcWrapperTest {
}
@Override
- public TBase<foo_args,fake_fields> deepCopy() {
+ public foo_args deepCopy() {
throw new UnsupportedOperationException();
}
[14/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloSecurityException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloSecurityException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloSecurityException.java
index f77a908..7ac823d 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloSecurityException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloSecurityException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class AccumuloSecurityException extends TException implements org.apache.thrift.TBase<AccumuloSecurityException, AccumuloSecurityException._Fields>, java.io.Serializable, Cloneable, Comparable<AccumuloSecurityException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class AccumuloSecurityException extends org.apache.thrift.TException implements org.apache.thrift.TBase<AccumuloSecurityException, AccumuloSecurityException._Fields>, java.io.Serializable, Cloneable, Comparable<AccumuloSecurityException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AccumuloSecurityException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AccumuloSecurityExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AccumuloSecurityExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AccumuloSecurityExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AccumuloSecurityExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class AccumuloSecurityException extends TException implements org.apache.
*/
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;
}
@@ -117,18 +87,18 @@ public class AccumuloSecurityException extends TException implements org.apache.
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AccumuloSecurityException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class AccumuloSecurityException extends TException implements org.apache.
}
public AccumuloSecurityException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class AccumuloSecurityException extends TException implements org.apache.
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public AccumuloSecurityException setMsg(String msg) {
+ public AccumuloSecurityException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class AccumuloSecurityException extends TException implements org.apache.
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof AccumuloSecurityException)
@@ -231,6 +201,8 @@ public class AccumuloSecurityException extends TException implements org.apache.
public boolean equals(AccumuloSecurityException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class AccumuloSecurityException extends TException implements org.apache.
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class AccumuloSecurityException extends TException implements org.apache.
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class AccumuloSecurityException extends TException implements org.apache.
}
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("AccumuloSecurityException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("AccumuloSecurityException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class AccumuloSecurityException extends TException implements org.apache.
}
}
- 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) {
@@ -326,13 +297,13 @@ public class AccumuloSecurityException extends TException implements org.apache.
}
}
- private static class AccumuloSecurityExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class AccumuloSecurityExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AccumuloSecurityExceptionStandardScheme getScheme() {
return new AccumuloSecurityExceptionStandardScheme();
}
}
- private static class AccumuloSecurityExceptionStandardScheme extends StandardScheme<AccumuloSecurityException> {
+ private static class AccumuloSecurityExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<AccumuloSecurityException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, AccumuloSecurityException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class AccumuloSecurityException extends TException implements org.apache.
}
- private static class AccumuloSecurityExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class AccumuloSecurityExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AccumuloSecurityExceptionTupleScheme getScheme() {
return new AccumuloSecurityExceptionTupleScheme();
}
}
- private static class AccumuloSecurityExceptionTupleScheme extends TupleScheme<AccumuloSecurityException> {
+ private static class AccumuloSecurityExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<AccumuloSecurityException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AccumuloSecurityException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class AccumuloSecurityException extends TException implements org.apache.
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, AccumuloSecurityException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class AccumuloSecurityException extends TException implements org.apache.
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java
index 986b68c..8ef3a9d 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompaction, ActiveCompaction._Fields>, java.io.Serializable, Cloneable, Comparable<ActiveCompaction> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ActiveCompaction");
@@ -65,16 +38,13 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
private static final org.apache.thrift.protocol.TField ENTRIES_WRITTEN_FIELD_DESC = new org.apache.thrift.protocol.TField("entriesWritten", org.apache.thrift.protocol.TType.I64, (short)9);
private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators", org.apache.thrift.protocol.TType.LIST, (short)10);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ActiveCompactionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ActiveCompactionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ActiveCompactionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ActiveCompactionTupleSchemeFactory();
public KeyExtent extent; // required
public long age; // required
- public List<String> inputFiles; // required
- public String outputFile; // required
+ public java.util.List<java.lang.String> inputFiles; // required
+ public java.lang.String outputFile; // required
/**
*
* @see CompactionType
@@ -85,10 +55,10 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
* @see CompactionReason
*/
public CompactionReason reason; // required
- public String localityGroup; // required
+ public java.lang.String localityGroup; // required
public long entriesRead; // required
public long entriesWritten; // required
- public List<IteratorSetting> iterators; // required
+ public java.util.List<IteratorSetting> iterators; // 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 {
@@ -111,10 +81,10 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
ENTRIES_WRITTEN((short)9, "entriesWritten"),
ITERATORS((short)10, "iterators");
- 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);
}
}
@@ -155,21 +125,21 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
*/
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;
}
@@ -178,7 +148,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -188,9 +158,9 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
private static final int __ENTRIESREAD_ISSET_ID = 1;
private static final int __ENTRIESWRITTEN_ISSET_ID = 2;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeyExtent.class)));
tmpMap.put(_Fields.AGE, new org.apache.thrift.meta_data.FieldMetaData("age", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -213,7 +183,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
tmpMap.put(_Fields.ITERATORS, new org.apache.thrift.meta_data.FieldMetaData("iterators", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IteratorSetting.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ActiveCompaction.class, metaDataMap);
}
@@ -223,14 +193,14 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
public ActiveCompaction(
KeyExtent extent,
long age,
- List<String> inputFiles,
- String outputFile,
+ java.util.List<java.lang.String> inputFiles,
+ java.lang.String outputFile,
CompactionType type,
CompactionReason reason,
- String localityGroup,
+ java.lang.String localityGroup,
long entriesRead,
long entriesWritten,
- List<IteratorSetting> iterators)
+ java.util.List<IteratorSetting> iterators)
{
this();
this.extent = extent;
@@ -258,7 +228,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
this.age = other.age;
if (other.isSetInputFiles()) {
- List<String> __this__inputFiles = new ArrayList<String>(other.inputFiles);
+ java.util.List<java.lang.String> __this__inputFiles = new java.util.ArrayList<java.lang.String>(other.inputFiles);
this.inputFiles = __this__inputFiles;
}
if (other.isSetOutputFile()) {
@@ -276,7 +246,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
this.entriesRead = other.entriesRead;
this.entriesWritten = other.entriesWritten;
if (other.isSetIterators()) {
- List<IteratorSetting> __this__iterators = new ArrayList<IteratorSetting>(other.iterators.size());
+ java.util.List<IteratorSetting> __this__iterators = new java.util.ArrayList<IteratorSetting>(other.iterators.size());
for (IteratorSetting other_element : other.iterators) {
__this__iterators.add(new IteratorSetting(other_element));
}
@@ -340,38 +310,38 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
public void unsetAge() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
}
/** Returns true if field age is set (has been assigned a value) and false otherwise */
public boolean isSetAge() {
- return EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
}
public void setAgeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
}
public int getInputFilesSize() {
return (this.inputFiles == null) ? 0 : this.inputFiles.size();
}
- public java.util.Iterator<String> getInputFilesIterator() {
+ public java.util.Iterator<java.lang.String> getInputFilesIterator() {
return (this.inputFiles == null) ? null : this.inputFiles.iterator();
}
- public void addToInputFiles(String elem) {
+ public void addToInputFiles(java.lang.String elem) {
if (this.inputFiles == null) {
- this.inputFiles = new ArrayList<String>();
+ this.inputFiles = new java.util.ArrayList<java.lang.String>();
}
this.inputFiles.add(elem);
}
- public List<String> getInputFiles() {
+ public java.util.List<java.lang.String> getInputFiles() {
return this.inputFiles;
}
- public ActiveCompaction setInputFiles(List<String> inputFiles) {
+ public ActiveCompaction setInputFiles(java.util.List<java.lang.String> inputFiles) {
this.inputFiles = inputFiles;
return this;
}
@@ -391,11 +361,11 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- public String getOutputFile() {
+ public java.lang.String getOutputFile() {
return this.outputFile;
}
- public ActiveCompaction setOutputFile(String outputFile) {
+ public ActiveCompaction setOutputFile(java.lang.String outputFile) {
this.outputFile = outputFile;
return this;
}
@@ -479,11 +449,11 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- public String getLocalityGroup() {
+ public java.lang.String getLocalityGroup() {
return this.localityGroup;
}
- public ActiveCompaction setLocalityGroup(String localityGroup) {
+ public ActiveCompaction setLocalityGroup(java.lang.String localityGroup) {
this.localityGroup = localityGroup;
return this;
}
@@ -514,16 +484,16 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
public void unsetEntriesRead() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID);
}
/** Returns true if field entriesRead is set (has been assigned a value) and false otherwise */
public boolean isSetEntriesRead() {
- return EncodingUtils.testBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID);
}
public void setEntriesReadIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENTRIESREAD_ISSET_ID, value);
}
public long getEntriesWritten() {
@@ -537,16 +507,16 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
public void unsetEntriesWritten() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID);
}
/** Returns true if field entriesWritten is set (has been assigned a value) and false otherwise */
public boolean isSetEntriesWritten() {
- return EncodingUtils.testBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID);
}
public void setEntriesWrittenIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENTRIESWRITTEN_ISSET_ID, value);
}
public int getIteratorsSize() {
@@ -559,16 +529,16 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
public void addToIterators(IteratorSetting elem) {
if (this.iterators == null) {
- this.iterators = new ArrayList<IteratorSetting>();
+ this.iterators = new java.util.ArrayList<IteratorSetting>();
}
this.iterators.add(elem);
}
- public List<IteratorSetting> getIterators() {
+ public java.util.List<IteratorSetting> getIterators() {
return this.iterators;
}
- public ActiveCompaction setIterators(List<IteratorSetting> iterators) {
+ public ActiveCompaction setIterators(java.util.List<IteratorSetting> iterators) {
this.iterators = iterators;
return this;
}
@@ -588,7 +558,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXTENT:
if (value == null) {
@@ -602,7 +572,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetAge();
} else {
- setAge((Long)value);
+ setAge((java.lang.Long)value);
}
break;
@@ -610,7 +580,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetInputFiles();
} else {
- setInputFiles((List<String>)value);
+ setInputFiles((java.util.List<java.lang.String>)value);
}
break;
@@ -618,7 +588,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetOutputFile();
} else {
- setOutputFile((String)value);
+ setOutputFile((java.lang.String)value);
}
break;
@@ -642,7 +612,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetLocalityGroup();
} else {
- setLocalityGroup((String)value);
+ setLocalityGroup((java.lang.String)value);
}
break;
@@ -650,7 +620,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetEntriesRead();
} else {
- setEntriesRead((Long)value);
+ setEntriesRead((java.lang.Long)value);
}
break;
@@ -658,7 +628,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetEntriesWritten();
} else {
- setEntriesWritten((Long)value);
+ setEntriesWritten((java.lang.Long)value);
}
break;
@@ -666,14 +636,14 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (value == null) {
unsetIterators();
} else {
- setIterators((List<IteratorSetting>)value);
+ setIterators((java.util.List<IteratorSetting>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXTENT:
return getExtent();
@@ -706,13 +676,13 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return getIterators();
}
- 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) {
@@ -737,11 +707,11 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
case ITERATORS:
return isSetIterators();
}
- 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 ActiveCompaction)
@@ -752,6 +722,8 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
public boolean equals(ActiveCompaction that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_extent = true && this.isSetExtent();
boolean that_present_extent = true && that.isSetExtent();
@@ -848,59 +820,43 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
- boolean present_age = true;
- list.add(present_age);
- if (present_age)
- list.add(age);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(age);
- boolean present_inputFiles = true && (isSetInputFiles());
- list.add(present_inputFiles);
- if (present_inputFiles)
- list.add(inputFiles);
+ hashCode = hashCode * 8191 + ((isSetInputFiles()) ? 131071 : 524287);
+ if (isSetInputFiles())
+ hashCode = hashCode * 8191 + inputFiles.hashCode();
- boolean present_outputFile = true && (isSetOutputFile());
- list.add(present_outputFile);
- if (present_outputFile)
- list.add(outputFile);
+ hashCode = hashCode * 8191 + ((isSetOutputFile()) ? 131071 : 524287);
+ if (isSetOutputFile())
+ hashCode = hashCode * 8191 + outputFile.hashCode();
- boolean present_type = true && (isSetType());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
+ hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
+ if (isSetType())
+ hashCode = hashCode * 8191 + type.getValue();
- boolean present_reason = true && (isSetReason());
- list.add(present_reason);
- if (present_reason)
- list.add(reason.getValue());
+ hashCode = hashCode * 8191 + ((isSetReason()) ? 131071 : 524287);
+ if (isSetReason())
+ hashCode = hashCode * 8191 + reason.getValue();
- boolean present_localityGroup = true && (isSetLocalityGroup());
- list.add(present_localityGroup);
- if (present_localityGroup)
- list.add(localityGroup);
+ hashCode = hashCode * 8191 + ((isSetLocalityGroup()) ? 131071 : 524287);
+ if (isSetLocalityGroup())
+ hashCode = hashCode * 8191 + localityGroup.hashCode();
- boolean present_entriesRead = true;
- list.add(present_entriesRead);
- if (present_entriesRead)
- list.add(entriesRead);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(entriesRead);
- boolean present_entriesWritten = true;
- list.add(present_entriesWritten);
- if (present_entriesWritten)
- list.add(entriesWritten);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(entriesWritten);
- boolean present_iterators = true && (isSetIterators());
- list.add(present_iterators);
- if (present_iterators)
- list.add(iterators);
+ hashCode = hashCode * 8191 + ((isSetIterators()) ? 131071 : 524287);
+ if (isSetIterators())
+ hashCode = hashCode * 8191 + iterators.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -911,7 +867,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -921,7 +877,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
+ lastComparison = java.lang.Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
if (lastComparison != 0) {
return lastComparison;
}
@@ -931,7 +887,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetInputFiles()).compareTo(other.isSetInputFiles());
+ lastComparison = java.lang.Boolean.valueOf(isSetInputFiles()).compareTo(other.isSetInputFiles());
if (lastComparison != 0) {
return lastComparison;
}
@@ -941,7 +897,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOutputFile()).compareTo(other.isSetOutputFile());
+ lastComparison = java.lang.Boolean.valueOf(isSetOutputFile()).compareTo(other.isSetOutputFile());
if (lastComparison != 0) {
return lastComparison;
}
@@ -951,7 +907,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -961,7 +917,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
+ lastComparison = java.lang.Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
if (lastComparison != 0) {
return lastComparison;
}
@@ -971,7 +927,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLocalityGroup()).compareTo(other.isSetLocalityGroup());
+ lastComparison = java.lang.Boolean.valueOf(isSetLocalityGroup()).compareTo(other.isSetLocalityGroup());
if (lastComparison != 0) {
return lastComparison;
}
@@ -981,7 +937,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEntriesRead()).compareTo(other.isSetEntriesRead());
+ lastComparison = java.lang.Boolean.valueOf(isSetEntriesRead()).compareTo(other.isSetEntriesRead());
if (lastComparison != 0) {
return lastComparison;
}
@@ -991,7 +947,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEntriesWritten()).compareTo(other.isSetEntriesWritten());
+ lastComparison = java.lang.Boolean.valueOf(isSetEntriesWritten()).compareTo(other.isSetEntriesWritten());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1001,7 +957,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
+ lastComparison = java.lang.Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1019,16 +975,16 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
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("ActiveCompaction(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ActiveCompaction(");
boolean first = true;
sb.append("extent:");
@@ -1118,7 +1074,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1128,13 +1084,13 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
- private static class ActiveCompactionStandardSchemeFactory implements SchemeFactory {
+ private static class ActiveCompactionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActiveCompactionStandardScheme getScheme() {
return new ActiveCompactionStandardScheme();
}
}
- private static class ActiveCompactionStandardScheme extends StandardScheme<ActiveCompaction> {
+ private static class ActiveCompactionStandardScheme extends org.apache.thrift.scheme.StandardScheme<ActiveCompaction> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ActiveCompaction struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1167,8 +1123,8 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list138 = iprot.readListBegin();
- struct.inputFiles = new ArrayList<String>(_list138.size);
- String _elem139;
+ struct.inputFiles = new java.util.ArrayList<java.lang.String>(_list138.size);
+ java.lang.String _elem139;
for (int _i140 = 0; _i140 < _list138.size; ++_i140)
{
_elem139 = iprot.readString();
@@ -1233,7 +1189,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list141 = iprot.readListBegin();
- struct.iterators = new ArrayList<IteratorSetting>(_list141.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list141.size);
IteratorSetting _elem142;
for (int _i143 = 0; _i143 < _list141.size; ++_i143)
{
@@ -1275,7 +1231,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
oprot.writeFieldBegin(INPUT_FILES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.inputFiles.size()));
- for (String _iter144 : struct.inputFiles)
+ for (java.lang.String _iter144 : struct.inputFiles)
{
oprot.writeString(_iter144);
}
@@ -1327,18 +1283,18 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
- private static class ActiveCompactionTupleSchemeFactory implements SchemeFactory {
+ private static class ActiveCompactionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActiveCompactionTupleScheme getScheme() {
return new ActiveCompactionTupleScheme();
}
}
- private static class ActiveCompactionTupleScheme extends TupleScheme<ActiveCompaction> {
+ private static class ActiveCompactionTupleScheme extends org.apache.thrift.scheme.TupleScheme<ActiveCompaction> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ActiveCompaction 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.isSetExtent()) {
optionals.set(0);
}
@@ -1379,7 +1335,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (struct.isSetInputFiles()) {
{
oprot.writeI32(struct.inputFiles.size());
- for (String _iter146 : struct.inputFiles)
+ for (java.lang.String _iter146 : struct.inputFiles)
{
oprot.writeString(_iter146);
}
@@ -1416,8 +1372,8 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ActiveCompaction struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(10);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(10);
if (incoming.get(0)) {
struct.extent = new KeyExtent();
struct.extent.read(iprot);
@@ -1430,8 +1386,8 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list148 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.inputFiles = new ArrayList<String>(_list148.size);
- String _elem149;
+ struct.inputFiles = new java.util.ArrayList<java.lang.String>(_list148.size);
+ java.lang.String _elem149;
for (int _i150 = 0; _i150 < _list148.size; ++_i150)
{
_elem149 = iprot.readString();
@@ -1467,7 +1423,7 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
if (incoming.get(9)) {
{
org.apache.thrift.protocol.TList _list151 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.iterators = new ArrayList<IteratorSetting>(_list151.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list151.size);
IteratorSetting _elem152;
for (int _i153 = 0; _i153 < _list151.size; ++_i153)
{
@@ -1481,5 +1437,9 @@ public class ActiveCompaction implements org.apache.thrift.TBase<ActiveCompactio
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java
index 9f4d892..66c8cc8 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveScan._Fields>, java.io.Serializable, Cloneable, Comparable<ActiveScan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ActiveScan");
@@ -66,15 +39,12 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators", org.apache.thrift.protocol.TType.LIST, (short)10);
private static final org.apache.thrift.protocol.TField AUTHORIZATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("authorizations", org.apache.thrift.protocol.TType.LIST, (short)11);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ActiveScanStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ActiveScanTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ActiveScanStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ActiveScanTupleSchemeFactory();
- public String client; // required
- public String user; // required
- public String table; // required
+ public java.lang.String client; // required
+ public java.lang.String user; // required
+ public java.lang.String table; // required
public long age; // required
public long idleTime; // required
/**
@@ -88,9 +58,9 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
*/
public ScanState state; // required
public KeyExtent extent; // required
- public List<Column> columns; // required
- public List<IteratorSetting> iterators; // required
- public List<ByteBuffer> authorizations; // required
+ public java.util.List<Column> columns; // required
+ public java.util.List<IteratorSetting> iterators; // required
+ public java.util.List<java.nio.ByteBuffer> authorizations; // 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 {
@@ -114,10 +84,10 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
ITERATORS((short)10, "iterators"),
AUTHORIZATIONS((short)11, "authorizations");
- 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);
}
}
@@ -160,21 +130,21 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
*/
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;
}
@@ -183,7 +153,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -192,9 +162,9 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
private static final int __AGE_ISSET_ID = 0;
private static final int __IDLETIME_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CLIENT, new org.apache.thrift.meta_data.FieldMetaData("client", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -220,7 +190,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
tmpMap.put(_Fields.AUTHORIZATIONS, new org.apache.thrift.meta_data.FieldMetaData("authorizations", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ActiveScan.class, metaDataMap);
}
@@ -228,17 +198,17 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
public ActiveScan(
- String client,
- String user,
- String table,
+ java.lang.String client,
+ java.lang.String user,
+ java.lang.String table,
long age,
long idleTime,
ScanType type,
ScanState state,
KeyExtent extent,
- List<Column> columns,
- List<IteratorSetting> iterators,
- List<ByteBuffer> authorizations)
+ java.util.List<Column> columns,
+ java.util.List<IteratorSetting> iterators,
+ java.util.List<java.nio.ByteBuffer> authorizations)
{
this();
this.client = client;
@@ -282,21 +252,21 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
this.extent = new KeyExtent(other.extent);
}
if (other.isSetColumns()) {
- List<Column> __this__columns = new ArrayList<Column>(other.columns.size());
+ java.util.List<Column> __this__columns = new java.util.ArrayList<Column>(other.columns.size());
for (Column other_element : other.columns) {
__this__columns.add(new Column(other_element));
}
this.columns = __this__columns;
}
if (other.isSetIterators()) {
- List<IteratorSetting> __this__iterators = new ArrayList<IteratorSetting>(other.iterators.size());
+ java.util.List<IteratorSetting> __this__iterators = new java.util.ArrayList<IteratorSetting>(other.iterators.size());
for (IteratorSetting other_element : other.iterators) {
__this__iterators.add(new IteratorSetting(other_element));
}
this.iterators = __this__iterators;
}
if (other.isSetAuthorizations()) {
- List<ByteBuffer> __this__authorizations = new ArrayList<ByteBuffer>(other.authorizations);
+ java.util.List<java.nio.ByteBuffer> __this__authorizations = new java.util.ArrayList<java.nio.ByteBuffer>(other.authorizations);
this.authorizations = __this__authorizations;
}
}
@@ -322,11 +292,11 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
this.authorizations = null;
}
- public String getClient() {
+ public java.lang.String getClient() {
return this.client;
}
- public ActiveScan setClient(String client) {
+ public ActiveScan setClient(java.lang.String client) {
this.client = client;
return this;
}
@@ -346,11 +316,11 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- public String getUser() {
+ public java.lang.String getUser() {
return this.user;
}
- public ActiveScan setUser(String user) {
+ public ActiveScan setUser(java.lang.String user) {
this.user = user;
return this;
}
@@ -370,11 +340,11 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- public String getTable() {
+ public java.lang.String getTable() {
return this.table;
}
- public ActiveScan setTable(String table) {
+ public ActiveScan setTable(java.lang.String table) {
this.table = table;
return this;
}
@@ -405,16 +375,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
public void unsetAge() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
}
/** Returns true if field age is set (has been assigned a value) and false otherwise */
public boolean isSetAge() {
- return EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
}
public void setAgeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
}
public long getIdleTime() {
@@ -428,16 +398,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
public void unsetIdleTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IDLETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IDLETIME_ISSET_ID);
}
/** Returns true if field idleTime is set (has been assigned a value) and false otherwise */
public boolean isSetIdleTime() {
- return EncodingUtils.testBit(__isset_bitfield, __IDLETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IDLETIME_ISSET_ID);
}
public void setIdleTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IDLETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IDLETIME_ISSET_ID, value);
}
/**
@@ -538,16 +508,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
public void addToColumns(Column elem) {
if (this.columns == null) {
- this.columns = new ArrayList<Column>();
+ this.columns = new java.util.ArrayList<Column>();
}
this.columns.add(elem);
}
- public List<Column> getColumns() {
+ public java.util.List<Column> getColumns() {
return this.columns;
}
- public ActiveScan setColumns(List<Column> columns) {
+ public ActiveScan setColumns(java.util.List<Column> columns) {
this.columns = columns;
return this;
}
@@ -577,16 +547,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
public void addToIterators(IteratorSetting elem) {
if (this.iterators == null) {
- this.iterators = new ArrayList<IteratorSetting>();
+ this.iterators = new java.util.ArrayList<IteratorSetting>();
}
this.iterators.add(elem);
}
- public List<IteratorSetting> getIterators() {
+ public java.util.List<IteratorSetting> getIterators() {
return this.iterators;
}
- public ActiveScan setIterators(List<IteratorSetting> iterators) {
+ public ActiveScan setIterators(java.util.List<IteratorSetting> iterators) {
this.iterators = iterators;
return this;
}
@@ -610,22 +580,22 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return (this.authorizations == null) ? 0 : this.authorizations.size();
}
- public java.util.Iterator<ByteBuffer> getAuthorizationsIterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> getAuthorizationsIterator() {
return (this.authorizations == null) ? null : this.authorizations.iterator();
}
- public void addToAuthorizations(ByteBuffer elem) {
+ public void addToAuthorizations(java.nio.ByteBuffer elem) {
if (this.authorizations == null) {
- this.authorizations = new ArrayList<ByteBuffer>();
+ this.authorizations = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.authorizations.add(elem);
}
- public List<ByteBuffer> getAuthorizations() {
+ public java.util.List<java.nio.ByteBuffer> getAuthorizations() {
return this.authorizations;
}
- public ActiveScan setAuthorizations(List<ByteBuffer> authorizations) {
+ public ActiveScan setAuthorizations(java.util.List<java.nio.ByteBuffer> authorizations) {
this.authorizations = authorizations;
return this;
}
@@ -645,13 +615,13 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CLIENT:
if (value == null) {
unsetClient();
} else {
- setClient((String)value);
+ setClient((java.lang.String)value);
}
break;
@@ -659,7 +629,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetUser();
} else {
- setUser((String)value);
+ setUser((java.lang.String)value);
}
break;
@@ -667,7 +637,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetTable();
} else {
- setTable((String)value);
+ setTable((java.lang.String)value);
}
break;
@@ -675,7 +645,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetAge();
} else {
- setAge((Long)value);
+ setAge((java.lang.Long)value);
}
break;
@@ -683,7 +653,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetIdleTime();
} else {
- setIdleTime((Long)value);
+ setIdleTime((java.lang.Long)value);
}
break;
@@ -715,7 +685,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetColumns();
} else {
- setColumns((List<Column>)value);
+ setColumns((java.util.List<Column>)value);
}
break;
@@ -723,7 +693,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetIterators();
} else {
- setIterators((List<IteratorSetting>)value);
+ setIterators((java.util.List<IteratorSetting>)value);
}
break;
@@ -731,14 +701,14 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetAuthorizations();
} else {
- setAuthorizations((List<ByteBuffer>)value);
+ setAuthorizations((java.util.List<java.nio.ByteBuffer>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CLIENT:
return getClient();
@@ -774,13 +744,13 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return getAuthorizations();
}
- 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) {
@@ -807,11 +777,11 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
case AUTHORIZATIONS:
return isSetAuthorizations();
}
- 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 ActiveScan)
@@ -822,6 +792,8 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
public boolean equals(ActiveScan that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_client = true && this.isSetClient();
boolean that_present_client = true && that.isSetClient();
@@ -927,64 +899,49 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_client = true && (isSetClient());
- list.add(present_client);
- if (present_client)
- list.add(client);
-
- boolean present_user = true && (isSetUser());
- list.add(present_user);
- if (present_user)
- list.add(user);
-
- boolean present_table = true && (isSetTable());
- list.add(present_table);
- if (present_table)
- list.add(table);
-
- boolean present_age = true;
- list.add(present_age);
- if (present_age)
- list.add(age);
-
- boolean present_idleTime = true;
- list.add(present_idleTime);
- if (present_idleTime)
- list.add(idleTime);
-
- boolean present_type = true && (isSetType());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
-
- boolean present_state = true && (isSetState());
- list.add(present_state);
- if (present_state)
- list.add(state.getValue());
-
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
-
- boolean present_columns = true && (isSetColumns());
- list.add(present_columns);
- if (present_columns)
- list.add(columns);
-
- boolean present_iterators = true && (isSetIterators());
- list.add(present_iterators);
- if (present_iterators)
- list.add(iterators);
-
- boolean present_authorizations = true && (isSetAuthorizations());
- list.add(present_authorizations);
- if (present_authorizations)
- list.add(authorizations);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetClient()) ? 131071 : 524287);
+ if (isSetClient())
+ hashCode = hashCode * 8191 + client.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
+ if (isSetUser())
+ hashCode = hashCode * 8191 + user.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
+ if (isSetTable())
+ hashCode = hashCode * 8191 + table.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(age);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(idleTime);
+
+ hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
+ if (isSetType())
+ hashCode = hashCode * 8191 + type.getValue();
+
+ hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
+ if (isSetState())
+ hashCode = hashCode * 8191 + state.getValue();
+
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
+ if (isSetColumns())
+ hashCode = hashCode * 8191 + columns.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetIterators()) ? 131071 : 524287);
+ if (isSetIterators())
+ hashCode = hashCode * 8191 + iterators.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetAuthorizations()) ? 131071 : 524287);
+ if (isSetAuthorizations())
+ hashCode = hashCode * 8191 + authorizations.hashCode();
+
+ return hashCode;
}
@Override
@@ -995,7 +952,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetClient()).compareTo(other.isSetClient());
+ lastComparison = java.lang.Boolean.valueOf(isSetClient()).compareTo(other.isSetClient());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1005,7 +962,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
+ lastComparison = java.lang.Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1015,7 +972,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
+ lastComparison = java.lang.Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1025,7 +982,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
+ lastComparison = java.lang.Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1035,7 +992,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIdleTime()).compareTo(other.isSetIdleTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetIdleTime()).compareTo(other.isSetIdleTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1045,7 +1002,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1055,7 +1012,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ lastComparison = java.lang.Boolean.valueOf(isSetState()).compareTo(other.isSetState());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1065,7 +1022,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1075,7 +1032,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1085,7 +1042,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
+ lastComparison = java.lang.Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1095,7 +1052,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
+ lastComparison = java.lang.Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1113,16 +1070,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
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("ActiveScan(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ActiveScan(");
boolean first = true;
sb.append("client:");
@@ -1224,7 +1181,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1234,13 +1191,13 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- private static class ActiveScanStandardSchemeFactory implements SchemeFactory {
+ private static class ActiveScanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActiveScanStandardScheme getScheme() {
return new ActiveScanStandardScheme();
}
}
- private static class ActiveScanStandardScheme extends StandardScheme<ActiveScan> {
+ private static class ActiveScanStandardScheme extends org.apache.thrift.scheme.StandardScheme<ActiveScan> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ActiveScan struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1321,7 +1278,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list114 = iprot.readListBegin();
- struct.columns = new ArrayList<Column>(_list114.size);
+ struct.columns = new java.util.ArrayList<Column>(_list114.size);
Column _elem115;
for (int _i116 = 0; _i116 < _list114.size; ++_i116)
{
@@ -1340,7 +1297,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list117 = iprot.readListBegin();
- struct.iterators = new ArrayList<IteratorSetting>(_list117.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list117.size);
IteratorSetting _elem118;
for (int _i119 = 0; _i119 < _list117.size; ++_i119)
{
@@ -1359,8 +1316,8 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list120 = iprot.readListBegin();
- struct.authorizations = new ArrayList<ByteBuffer>(_list120.size);
- ByteBuffer _elem121;
+ struct.authorizations = new java.util.ArrayList<java.nio.ByteBuffer>(_list120.size);
+ java.nio.ByteBuffer _elem121;
for (int _i122 = 0; _i122 < _list120.size; ++_i122)
{
_elem121 = iprot.readBinary();
@@ -1452,7 +1409,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
oprot.writeFieldBegin(AUTHORIZATIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.authorizations.size()));
- for (ByteBuffer _iter125 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter125 : struct.authorizations)
{
oprot.writeBinary(_iter125);
}
@@ -1466,18 +1423,18 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
- private static class ActiveScanTupleSchemeFactory implements SchemeFactory {
+ private static class ActiveScanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActiveScanTupleScheme getScheme() {
return new ActiveScanTupleScheme();
}
}
- private static class ActiveScanTupleScheme extends TupleScheme<ActiveScan> {
+ private static class ActiveScanTupleScheme extends org.apache.thrift.scheme.TupleScheme<ActiveScan> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ActiveScan 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.isSetClient()) {
optionals.set(0);
}
@@ -1557,7 +1514,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (struct.isSetAuthorizations()) {
{
oprot.writeI32(struct.authorizations.size());
- for (ByteBuffer _iter128 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter128 : struct.authorizations)
{
oprot.writeBinary(_iter128);
}
@@ -1567,8 +1524,8 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ActiveScan struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(11);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(11);
if (incoming.get(0)) {
struct.client = iprot.readString();
struct.setClientIsSet(true);
@@ -1605,7 +1562,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.columns = new ArrayList<Column>(_list129.size);
+ struct.columns = new java.util.ArrayList<Column>(_list129.size);
Column _elem130;
for (int _i131 = 0; _i131 < _list129.size; ++_i131)
{
@@ -1619,7 +1576,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (incoming.get(9)) {
{
org.apache.thrift.protocol.TList _list132 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.iterators = new ArrayList<IteratorSetting>(_list132.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list132.size);
IteratorSetting _elem133;
for (int _i134 = 0; _i134 < _list132.size; ++_i134)
{
@@ -1633,8 +1590,8 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (incoming.get(10)) {
{
org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.authorizations = new ArrayList<ByteBuffer>(_list135.size);
- ByteBuffer _elem136;
+ struct.authorizations = new java.util.ArrayList<java.nio.ByteBuffer>(_list135.size);
+ java.nio.ByteBuffer _elem136;
for (int _i137 = 0; _i137 < _list135.size; ++_i137)
{
_elem136 = iprot.readBinary();
@@ -1646,5 +1603,9 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[19/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java
index 3ee05a2..8575f30 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveScan._Fields>, java.io.Serializable, Cloneable, Comparable<ActiveScan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ActiveScan");
@@ -69,15 +42,12 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
private static final org.apache.thrift.protocol.TField SCAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scanId", org.apache.thrift.protocol.TType.I64, (short)14);
private static final org.apache.thrift.protocol.TField CLASS_LOADER_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("classLoaderContext", org.apache.thrift.protocol.TType.STRING, (short)15);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ActiveScanStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ActiveScanTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ActiveScanStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ActiveScanTupleSchemeFactory();
- public String client; // required
- public String user; // required
- public String tableId; // required
+ public java.lang.String client; // required
+ public java.lang.String user; // required
+ public java.lang.String tableId; // required
public long age; // required
public long idleTime; // required
/**
@@ -91,12 +61,12 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
*/
public ScanState state; // required
public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
- public List<org.apache.accumulo.core.data.thrift.TColumn> columns; // required
- public List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList; // required
- public Map<String,Map<String,String>> ssio; // required
- public List<ByteBuffer> authorizations; // required
+ public java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns; // required
+ public java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList; // required
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio; // required
+ public java.util.List<java.nio.ByteBuffer> authorizations; // required
public long scanId; // optional
- public String classLoaderContext; // required
+ public java.lang.String classLoaderContext; // 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 {
@@ -123,10 +93,10 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
SCAN_ID((short)14, "scanId"),
CLASS_LOADER_CONTEXT((short)15, "classLoaderContext");
- 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);
}
}
@@ -175,21 +145,21 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
*/
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;
}
@@ -198,7 +168,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -209,9 +179,9 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
private static final int __SCANID_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.SCAN_ID};
- 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.CLIENT, new org.apache.thrift.meta_data.FieldMetaData("client", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -247,7 +217,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CLASS_LOADER_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("classLoaderContext", 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(ActiveScan.class, metaDataMap);
}
@@ -255,19 +225,19 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
public ActiveScan(
- String client,
- String user,
- String tableId,
+ java.lang.String client,
+ java.lang.String user,
+ java.lang.String tableId,
long age,
long idleTime,
ScanType type,
ScanState state,
org.apache.accumulo.core.data.thrift.TKeyExtent extent,
- List<org.apache.accumulo.core.data.thrift.TColumn> columns,
- List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList,
- Map<String,Map<String,String>> ssio,
- List<ByteBuffer> authorizations,
- String classLoaderContext)
+ java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns,
+ java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList,
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio,
+ java.util.List<java.nio.ByteBuffer> authorizations,
+ java.lang.String classLoaderContext)
{
this();
this.client = client;
@@ -313,36 +283,36 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
this.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent(other.extent);
}
if (other.isSetColumns()) {
- List<org.apache.accumulo.core.data.thrift.TColumn> __this__columns = new ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(other.columns.size());
+ java.util.List<org.apache.accumulo.core.data.thrift.TColumn> __this__columns = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(other.columns.size());
for (org.apache.accumulo.core.data.thrift.TColumn other_element : other.columns) {
__this__columns.add(new org.apache.accumulo.core.data.thrift.TColumn(other_element));
}
this.columns = __this__columns;
}
if (other.isSetSsiList()) {
- List<org.apache.accumulo.core.data.thrift.IterInfo> __this__ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(other.ssiList.size());
+ java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> __this__ssiList = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(other.ssiList.size());
for (org.apache.accumulo.core.data.thrift.IterInfo other_element : other.ssiList) {
__this__ssiList.add(new org.apache.accumulo.core.data.thrift.IterInfo(other_element));
}
this.ssiList = __this__ssiList;
}
if (other.isSetSsio()) {
- Map<String,Map<String,String>> __this__ssio = new HashMap<String,Map<String,String>>(other.ssio.size());
- for (Map.Entry<String, Map<String,String>> other_element : other.ssio.entrySet()) {
+ java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> __this__ssio = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>(other.ssio.size());
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.String>> other_element : other.ssio.entrySet()) {
- String other_element_key = other_element.getKey();
- Map<String,String> other_element_value = other_element.getValue();
+ java.lang.String other_element_key = other_element.getKey();
+ java.util.Map<java.lang.String,java.lang.String> other_element_value = other_element.getValue();
- String __this__ssio_copy_key = other_element_key;
+ java.lang.String __this__ssio_copy_key = other_element_key;
- Map<String,String> __this__ssio_copy_value = new HashMap<String,String>(other_element_value);
+ java.util.Map<java.lang.String,java.lang.String> __this__ssio_copy_value = new java.util.HashMap<java.lang.String,java.lang.String>(other_element_value);
__this__ssio.put(__this__ssio_copy_key, __this__ssio_copy_value);
}
this.ssio = __this__ssio;
}
if (other.isSetAuthorizations()) {
- List<ByteBuffer> __this__authorizations = new ArrayList<ByteBuffer>(other.authorizations);
+ java.util.List<java.nio.ByteBuffer> __this__authorizations = new java.util.ArrayList<java.nio.ByteBuffer>(other.authorizations);
this.authorizations = __this__authorizations;
}
this.scanId = other.scanId;
@@ -376,11 +346,11 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
this.classLoaderContext = null;
}
- public String getClient() {
+ public java.lang.String getClient() {
return this.client;
}
- public ActiveScan setClient(String client) {
+ public ActiveScan setClient(java.lang.String client) {
this.client = client;
return this;
}
@@ -400,11 +370,11 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- public String getUser() {
+ public java.lang.String getUser() {
return this.user;
}
- public ActiveScan setUser(String user) {
+ public ActiveScan setUser(java.lang.String user) {
this.user = user;
return this;
}
@@ -424,11 +394,11 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- public String getTableId() {
+ public java.lang.String getTableId() {
return this.tableId;
}
- public ActiveScan setTableId(String tableId) {
+ public ActiveScan setTableId(java.lang.String tableId) {
this.tableId = tableId;
return this;
}
@@ -459,16 +429,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
public void unsetAge() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
}
/** Returns true if field age is set (has been assigned a value) and false otherwise */
public boolean isSetAge() {
- return EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
}
public void setAgeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
}
public long getIdleTime() {
@@ -482,16 +452,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
public void unsetIdleTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IDLETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IDLETIME_ISSET_ID);
}
/** Returns true if field idleTime is set (has been assigned a value) and false otherwise */
public boolean isSetIdleTime() {
- return EncodingUtils.testBit(__isset_bitfield, __IDLETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IDLETIME_ISSET_ID);
}
public void setIdleTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IDLETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IDLETIME_ISSET_ID, value);
}
/**
@@ -592,16 +562,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
public void addToColumns(org.apache.accumulo.core.data.thrift.TColumn elem) {
if (this.columns == null) {
- this.columns = new ArrayList<org.apache.accumulo.core.data.thrift.TColumn>();
+ this.columns = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TColumn>();
}
this.columns.add(elem);
}
- public List<org.apache.accumulo.core.data.thrift.TColumn> getColumns() {
+ public java.util.List<org.apache.accumulo.core.data.thrift.TColumn> getColumns() {
return this.columns;
}
- public ActiveScan setColumns(List<org.apache.accumulo.core.data.thrift.TColumn> columns) {
+ public ActiveScan setColumns(java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns) {
this.columns = columns;
return this;
}
@@ -631,16 +601,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
public void addToSsiList(org.apache.accumulo.core.data.thrift.IterInfo elem) {
if (this.ssiList == null) {
- this.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>();
+ this.ssiList = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>();
}
this.ssiList.add(elem);
}
- public List<org.apache.accumulo.core.data.thrift.IterInfo> getSsiList() {
+ public java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> getSsiList() {
return this.ssiList;
}
- public ActiveScan setSsiList(List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList) {
+ public ActiveScan setSsiList(java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList) {
this.ssiList = ssiList;
return this;
}
@@ -664,18 +634,18 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return (this.ssio == null) ? 0 : this.ssio.size();
}
- public void putToSsio(String key, Map<String,String> val) {
+ public void putToSsio(java.lang.String key, java.util.Map<java.lang.String,java.lang.String> val) {
if (this.ssio == null) {
- this.ssio = new HashMap<String,Map<String,String>>();
+ this.ssio = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>();
}
this.ssio.put(key, val);
}
- public Map<String,Map<String,String>> getSsio() {
+ public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getSsio() {
return this.ssio;
}
- public ActiveScan setSsio(Map<String,Map<String,String>> ssio) {
+ public ActiveScan setSsio(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio) {
this.ssio = ssio;
return this;
}
@@ -699,22 +669,22 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return (this.authorizations == null) ? 0 : this.authorizations.size();
}
- public java.util.Iterator<ByteBuffer> getAuthorizationsIterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> getAuthorizationsIterator() {
return (this.authorizations == null) ? null : this.authorizations.iterator();
}
- public void addToAuthorizations(ByteBuffer elem) {
+ public void addToAuthorizations(java.nio.ByteBuffer elem) {
if (this.authorizations == null) {
- this.authorizations = new ArrayList<ByteBuffer>();
+ this.authorizations = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.authorizations.add(elem);
}
- public List<ByteBuffer> getAuthorizations() {
+ public java.util.List<java.nio.ByteBuffer> getAuthorizations() {
return this.authorizations;
}
- public ActiveScan setAuthorizations(List<ByteBuffer> authorizations) {
+ public ActiveScan setAuthorizations(java.util.List<java.nio.ByteBuffer> authorizations) {
this.authorizations = authorizations;
return this;
}
@@ -745,23 +715,23 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
public void unsetScanId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SCANID_ISSET_ID);
}
/** Returns true if field scanId is set (has been assigned a value) and false otherwise */
public boolean isSetScanId() {
- return EncodingUtils.testBit(__isset_bitfield, __SCANID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SCANID_ISSET_ID);
}
public void setScanIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SCANID_ISSET_ID, value);
}
- public String getClassLoaderContext() {
+ public java.lang.String getClassLoaderContext() {
return this.classLoaderContext;
}
- public ActiveScan setClassLoaderContext(String classLoaderContext) {
+ public ActiveScan setClassLoaderContext(java.lang.String classLoaderContext) {
this.classLoaderContext = classLoaderContext;
return this;
}
@@ -781,13 +751,13 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CLIENT:
if (value == null) {
unsetClient();
} else {
- setClient((String)value);
+ setClient((java.lang.String)value);
}
break;
@@ -795,7 +765,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetUser();
} else {
- setUser((String)value);
+ setUser((java.lang.String)value);
}
break;
@@ -803,7 +773,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetTableId();
} else {
- setTableId((String)value);
+ setTableId((java.lang.String)value);
}
break;
@@ -811,7 +781,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetAge();
} else {
- setAge((Long)value);
+ setAge((java.lang.Long)value);
}
break;
@@ -819,7 +789,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetIdleTime();
} else {
- setIdleTime((Long)value);
+ setIdleTime((java.lang.Long)value);
}
break;
@@ -851,7 +821,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetColumns();
} else {
- setColumns((List<org.apache.accumulo.core.data.thrift.TColumn>)value);
+ setColumns((java.util.List<org.apache.accumulo.core.data.thrift.TColumn>)value);
}
break;
@@ -859,7 +829,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetSsiList();
} else {
- setSsiList((List<org.apache.accumulo.core.data.thrift.IterInfo>)value);
+ setSsiList((java.util.List<org.apache.accumulo.core.data.thrift.IterInfo>)value);
}
break;
@@ -867,7 +837,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetSsio();
} else {
- setSsio((Map<String,Map<String,String>>)value);
+ setSsio((java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>)value);
}
break;
@@ -875,7 +845,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetAuthorizations();
} else {
- setAuthorizations((List<ByteBuffer>)value);
+ setAuthorizations((java.util.List<java.nio.ByteBuffer>)value);
}
break;
@@ -883,7 +853,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetScanId();
} else {
- setScanId((Long)value);
+ setScanId((java.lang.Long)value);
}
break;
@@ -891,14 +861,14 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (value == null) {
unsetClassLoaderContext();
} else {
- setClassLoaderContext((String)value);
+ setClassLoaderContext((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CLIENT:
return getClient();
@@ -943,13 +913,13 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return getClassLoaderContext();
}
- 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) {
@@ -982,11 +952,11 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
case CLASS_LOADER_CONTEXT:
return isSetClassLoaderContext();
}
- 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 ActiveScan)
@@ -997,6 +967,8 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
public boolean equals(ActiveScan that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_client = true && this.isSetClient();
boolean that_present_client = true && that.isSetClient();
@@ -1129,79 +1101,61 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_client = true && (isSetClient());
- list.add(present_client);
- if (present_client)
- list.add(client);
-
- boolean present_user = true && (isSetUser());
- list.add(present_user);
- if (present_user)
- list.add(user);
-
- boolean present_tableId = true && (isSetTableId());
- list.add(present_tableId);
- if (present_tableId)
- list.add(tableId);
-
- boolean present_age = true;
- list.add(present_age);
- if (present_age)
- list.add(age);
-
- boolean present_idleTime = true;
- list.add(present_idleTime);
- if (present_idleTime)
- list.add(idleTime);
-
- boolean present_type = true && (isSetType());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
-
- boolean present_state = true && (isSetState());
- list.add(present_state);
- if (present_state)
- list.add(state.getValue());
-
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
-
- boolean present_columns = true && (isSetColumns());
- list.add(present_columns);
- if (present_columns)
- list.add(columns);
-
- boolean present_ssiList = true && (isSetSsiList());
- list.add(present_ssiList);
- if (present_ssiList)
- list.add(ssiList);
-
- boolean present_ssio = true && (isSetSsio());
- list.add(present_ssio);
- if (present_ssio)
- list.add(ssio);
-
- boolean present_authorizations = true && (isSetAuthorizations());
- list.add(present_authorizations);
- if (present_authorizations)
- list.add(authorizations);
-
- boolean present_scanId = true && (isSetScanId());
- list.add(present_scanId);
- if (present_scanId)
- list.add(scanId);
-
- boolean present_classLoaderContext = true && (isSetClassLoaderContext());
- list.add(present_classLoaderContext);
- if (present_classLoaderContext)
- list.add(classLoaderContext);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetClient()) ? 131071 : 524287);
+ if (isSetClient())
+ hashCode = hashCode * 8191 + client.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
+ if (isSetUser())
+ hashCode = hashCode * 8191 + user.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetTableId()) ? 131071 : 524287);
+ if (isSetTableId())
+ hashCode = hashCode * 8191 + tableId.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(age);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(idleTime);
+
+ hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
+ if (isSetType())
+ hashCode = hashCode * 8191 + type.getValue();
+
+ hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
+ if (isSetState())
+ hashCode = hashCode * 8191 + state.getValue();
+
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
+ if (isSetColumns())
+ hashCode = hashCode * 8191 + columns.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetSsiList()) ? 131071 : 524287);
+ if (isSetSsiList())
+ hashCode = hashCode * 8191 + ssiList.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetSsio()) ? 131071 : 524287);
+ if (isSetSsio())
+ hashCode = hashCode * 8191 + ssio.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetAuthorizations()) ? 131071 : 524287);
+ if (isSetAuthorizations())
+ hashCode = hashCode * 8191 + authorizations.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetScanId()) ? 131071 : 524287);
+ if (isSetScanId())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(scanId);
+
+ hashCode = hashCode * 8191 + ((isSetClassLoaderContext()) ? 131071 : 524287);
+ if (isSetClassLoaderContext())
+ hashCode = hashCode * 8191 + classLoaderContext.hashCode();
+
+ return hashCode;
}
@Override
@@ -1212,7 +1166,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetClient()).compareTo(other.isSetClient());
+ lastComparison = java.lang.Boolean.valueOf(isSetClient()).compareTo(other.isSetClient());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1222,7 +1176,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
+ lastComparison = java.lang.Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1232,7 +1186,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTableId()).compareTo(other.isSetTableId());
+ lastComparison = java.lang.Boolean.valueOf(isSetTableId()).compareTo(other.isSetTableId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1242,7 +1196,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
+ lastComparison = java.lang.Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1252,7 +1206,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIdleTime()).compareTo(other.isSetIdleTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetIdleTime()).compareTo(other.isSetIdleTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1262,7 +1216,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1272,7 +1226,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ lastComparison = java.lang.Boolean.valueOf(isSetState()).compareTo(other.isSetState());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1282,7 +1236,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1292,7 +1246,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1302,7 +1256,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSsiList()).compareTo(other.isSetSsiList());
+ lastComparison = java.lang.Boolean.valueOf(isSetSsiList()).compareTo(other.isSetSsiList());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1312,7 +1266,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSsio()).compareTo(other.isSetSsio());
+ lastComparison = java.lang.Boolean.valueOf(isSetSsio()).compareTo(other.isSetSsio());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1322,7 +1276,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
+ lastComparison = java.lang.Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1332,7 +1286,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetScanId()).compareTo(other.isSetScanId());
+ lastComparison = java.lang.Boolean.valueOf(isSetScanId()).compareTo(other.isSetScanId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1342,7 +1296,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetClassLoaderContext()).compareTo(other.isSetClassLoaderContext());
+ lastComparison = java.lang.Boolean.valueOf(isSetClassLoaderContext()).compareTo(other.isSetClassLoaderContext());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1360,16 +1314,16 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
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("ActiveScan(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ActiveScan(");
boolean first = true;
sb.append("client:");
@@ -1493,7 +1447,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1503,13 +1457,13 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
- private static class ActiveScanStandardSchemeFactory implements SchemeFactory {
+ private static class ActiveScanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActiveScanStandardScheme getScheme() {
return new ActiveScanStandardScheme();
}
}
- private static class ActiveScanStandardScheme extends StandardScheme<ActiveScan> {
+ private static class ActiveScanStandardScheme extends org.apache.thrift.scheme.StandardScheme<ActiveScan> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ActiveScan struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1590,7 +1544,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.columns = new ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(_list8.size);
+ struct.columns = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(_list8.size);
org.apache.accumulo.core.data.thrift.TColumn _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
@@ -1609,7 +1563,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list11 = iprot.readListBegin();
- struct.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list11.size);
+ struct.ssiList = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list11.size);
org.apache.accumulo.core.data.thrift.IterInfo _elem12;
for (int _i13 = 0; _i13 < _list11.size; ++_i13)
{
@@ -1628,17 +1582,17 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map14 = iprot.readMapBegin();
- struct.ssio = new HashMap<String,Map<String,String>>(2*_map14.size);
- String _key15;
- Map<String,String> _val16;
+ struct.ssio = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>(2*_map14.size);
+ java.lang.String _key15;
+ java.util.Map<java.lang.String,java.lang.String> _val16;
for (int _i17 = 0; _i17 < _map14.size; ++_i17)
{
_key15 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map18 = iprot.readMapBegin();
- _val16 = new HashMap<String,String>(2*_map18.size);
- String _key19;
- String _val20;
+ _val16 = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map18.size);
+ java.lang.String _key19;
+ java.lang.String _val20;
for (int _i21 = 0; _i21 < _map18.size; ++_i21)
{
_key19 = iprot.readString();
@@ -1660,8 +1614,8 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list22 = iprot.readListBegin();
- struct.authorizations = new ArrayList<ByteBuffer>(_list22.size);
- ByteBuffer _elem23;
+ struct.authorizations = new java.util.ArrayList<java.nio.ByteBuffer>(_list22.size);
+ java.nio.ByteBuffer _elem23;
for (int _i24 = 0; _i24 < _list22.size; ++_i24)
{
_elem23 = iprot.readBinary();
@@ -1769,12 +1723,12 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
oprot.writeFieldBegin(SSIO_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.ssio.size()));
- for (Map.Entry<String, Map<String,String>> _iter27 : struct.ssio.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.String>> _iter27 : struct.ssio.entrySet())
{
oprot.writeString(_iter27.getKey());
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, _iter27.getValue().size()));
- for (Map.Entry<String, String> _iter28 : _iter27.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter28 : _iter27.getValue().entrySet())
{
oprot.writeString(_iter28.getKey());
oprot.writeString(_iter28.getValue());
@@ -1790,7 +1744,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
oprot.writeFieldBegin(AUTHORIZATIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.authorizations.size()));
- for (ByteBuffer _iter29 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter29 : struct.authorizations)
{
oprot.writeBinary(_iter29);
}
@@ -1814,18 +1768,18 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
- private static class ActiveScanTupleSchemeFactory implements SchemeFactory {
+ private static class ActiveScanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActiveScanTupleScheme getScheme() {
return new ActiveScanTupleScheme();
}
}
- private static class ActiveScanTupleScheme extends TupleScheme<ActiveScan> {
+ private static class ActiveScanTupleScheme extends org.apache.thrift.scheme.TupleScheme<ActiveScan> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ActiveScan 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.isSetClient()) {
optionals.set(0);
}
@@ -1914,12 +1868,12 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (struct.isSetSsio()) {
{
oprot.writeI32(struct.ssio.size());
- for (Map.Entry<String, Map<String,String>> _iter32 : struct.ssio.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.util.Map<java.lang.String,java.lang.String>> _iter32 : struct.ssio.entrySet())
{
oprot.writeString(_iter32.getKey());
{
oprot.writeI32(_iter32.getValue().size());
- for (Map.Entry<String, String> _iter33 : _iter32.getValue().entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter33 : _iter32.getValue().entrySet())
{
oprot.writeString(_iter33.getKey());
oprot.writeString(_iter33.getValue());
@@ -1931,7 +1885,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (struct.isSetAuthorizations()) {
{
oprot.writeI32(struct.authorizations.size());
- for (ByteBuffer _iter34 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter34 : struct.authorizations)
{
oprot.writeBinary(_iter34);
}
@@ -1947,8 +1901,8 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ActiveScan struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(14);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(14);
if (incoming.get(0)) {
struct.client = iprot.readString();
struct.setClientIsSet(true);
@@ -1985,7 +1939,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TList _list35 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.columns = new ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(_list35.size);
+ struct.columns = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TColumn>(_list35.size);
org.apache.accumulo.core.data.thrift.TColumn _elem36;
for (int _i37 = 0; _i37 < _list35.size; ++_i37)
{
@@ -1999,7 +1953,7 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (incoming.get(9)) {
{
org.apache.thrift.protocol.TList _list38 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.ssiList = new ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list38.size);
+ struct.ssiList = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.IterInfo>(_list38.size);
org.apache.accumulo.core.data.thrift.IterInfo _elem39;
for (int _i40 = 0; _i40 < _list38.size; ++_i40)
{
@@ -2013,17 +1967,17 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (incoming.get(10)) {
{
org.apache.thrift.protocol.TMap _map41 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32());
- struct.ssio = new HashMap<String,Map<String,String>>(2*_map41.size);
- String _key42;
- Map<String,String> _val43;
+ struct.ssio = new java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>(2*_map41.size);
+ java.lang.String _key42;
+ java.util.Map<java.lang.String,java.lang.String> _val43;
for (int _i44 = 0; _i44 < _map41.size; ++_i44)
{
_key42 = iprot.readString();
{
org.apache.thrift.protocol.TMap _map45 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- _val43 = new HashMap<String,String>(2*_map45.size);
- String _key46;
- String _val47;
+ _val43 = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map45.size);
+ java.lang.String _key46;
+ java.lang.String _val47;
for (int _i48 = 0; _i48 < _map45.size; ++_i48)
{
_key46 = iprot.readString();
@@ -2039,8 +1993,8 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
if (incoming.get(11)) {
{
org.apache.thrift.protocol.TList _list49 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.authorizations = new ArrayList<ByteBuffer>(_list49.size);
- ByteBuffer _elem50;
+ struct.authorizations = new java.util.ArrayList<java.nio.ByteBuffer>(_list49.size);
+ java.nio.ByteBuffer _elem50;
for (int _i51 = 0; _i51 < _list49.size; ++_i51)
{
_elem50 = iprot.readBinary();
@@ -2060,5 +2014,9 @@ public class ActiveScan implements org.apache.thrift.TBase<ActiveScan, ActiveSca
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionReason.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionReason.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionReason.java
index 387908b..5346674 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionReason.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionReason.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.tabletserver.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum CompactionReason implements org.apache.thrift.TEnum {
+public enum CompactionReason implements org.apache.thrift.TEnum {
USER(0),
SYSTEM(1),
CHOP(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionType.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionType.java
index 9252e3d..6d420b3 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionType.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.tabletserver.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum CompactionType implements org.apache.thrift.TEnum {
+public enum CompactionType implements org.apache.thrift.TEnum {
MINOR(0),
MERGE(1),
MAJOR(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java
index f35e187..f9081c2 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class ConstraintViolationException extends TException implements org.apache.thrift.TBase<ConstraintViolationException, ConstraintViolationException._Fields>, java.io.Serializable, Cloneable, Comparable<ConstraintViolationException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class ConstraintViolationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<ConstraintViolationException, ConstraintViolationException._Fields>, java.io.Serializable, Cloneable, Comparable<ConstraintViolationException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ConstraintViolationException");
private static final org.apache.thrift.protocol.TField VIOLATION_SUMMARIES_FIELD_DESC = new org.apache.thrift.protocol.TField("violationSummaries", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ConstraintViolationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ConstraintViolationExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ConstraintViolationExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ConstraintViolationExceptionTupleSchemeFactory();
- public List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> violationSummaries; // required
+ public java.util.List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> violationSummaries; // 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 {
VIOLATION_SUMMARIES((short)1, "violationSummaries");
- 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);
}
}
@@ -94,21 +64,21 @@ public class ConstraintViolationException extends TException implements org.apac
*/
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;
}
@@ -117,19 +87,19 @@ public class ConstraintViolationException extends TException implements org.apac
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.VIOLATION_SUMMARIES, new org.apache.thrift.meta_data.FieldMetaData("violationSummaries", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TConstraintViolationSummary.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ConstraintViolationException.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class ConstraintViolationException extends TException implements org.apac
}
public ConstraintViolationException(
- List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> violationSummaries)
+ java.util.List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> violationSummaries)
{
this();
this.violationSummaries = violationSummaries;
@@ -148,7 +118,7 @@ public class ConstraintViolationException extends TException implements org.apac
*/
public ConstraintViolationException(ConstraintViolationException other) {
if (other.isSetViolationSummaries()) {
- List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> __this__violationSummaries = new ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(other.violationSummaries.size());
+ java.util.List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> __this__violationSummaries = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(other.violationSummaries.size());
for (org.apache.accumulo.core.data.thrift.TConstraintViolationSummary other_element : other.violationSummaries) {
__this__violationSummaries.add(new org.apache.accumulo.core.data.thrift.TConstraintViolationSummary(other_element));
}
@@ -175,16 +145,16 @@ public class ConstraintViolationException extends TException implements org.apac
public void addToViolationSummaries(org.apache.accumulo.core.data.thrift.TConstraintViolationSummary elem) {
if (this.violationSummaries == null) {
- this.violationSummaries = new ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>();
+ this.violationSummaries = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>();
}
this.violationSummaries.add(elem);
}
- public List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> getViolationSummaries() {
+ public java.util.List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> getViolationSummaries() {
return this.violationSummaries;
}
- public ConstraintViolationException setViolationSummaries(List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> violationSummaries) {
+ public ConstraintViolationException setViolationSummaries(java.util.List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary> violationSummaries) {
this.violationSummaries = violationSummaries;
return this;
}
@@ -204,43 +174,43 @@ public class ConstraintViolationException extends TException implements org.apac
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case VIOLATION_SUMMARIES:
if (value == null) {
unsetViolationSummaries();
} else {
- setViolationSummaries((List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>)value);
+ setViolationSummaries((java.util.List<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case VIOLATION_SUMMARIES:
return getViolationSummaries();
}
- 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 VIOLATION_SUMMARIES:
return isSetViolationSummaries();
}
- 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 ConstraintViolationException)
@@ -251,6 +221,8 @@ public class ConstraintViolationException extends TException implements org.apac
public boolean equals(ConstraintViolationException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_violationSummaries = true && this.isSetViolationSummaries();
boolean that_present_violationSummaries = true && that.isSetViolationSummaries();
@@ -266,14 +238,13 @@ public class ConstraintViolationException extends TException implements org.apac
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_violationSummaries = true && (isSetViolationSummaries());
- list.add(present_violationSummaries);
- if (present_violationSummaries)
- list.add(violationSummaries);
+ hashCode = hashCode * 8191 + ((isSetViolationSummaries()) ? 131071 : 524287);
+ if (isSetViolationSummaries())
+ hashCode = hashCode * 8191 + violationSummaries.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -284,7 +255,7 @@ public class ConstraintViolationException extends TException implements org.apac
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetViolationSummaries()).compareTo(other.isSetViolationSummaries());
+ lastComparison = java.lang.Boolean.valueOf(isSetViolationSummaries()).compareTo(other.isSetViolationSummaries());
if (lastComparison != 0) {
return lastComparison;
}
@@ -302,16 +273,16 @@ public class ConstraintViolationException extends TException implements org.apac
}
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("ConstraintViolationException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ConstraintViolationException(");
boolean first = true;
sb.append("violationSummaries:");
@@ -338,7 +309,7 @@ public class ConstraintViolationException extends TException implements org.apac
}
}
- 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) {
@@ -346,13 +317,13 @@ public class ConstraintViolationException extends TException implements org.apac
}
}
- private static class ConstraintViolationExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class ConstraintViolationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ConstraintViolationExceptionStandardScheme getScheme() {
return new ConstraintViolationExceptionStandardScheme();
}
}
- private static class ConstraintViolationExceptionStandardScheme extends StandardScheme<ConstraintViolationException> {
+ private static class ConstraintViolationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<ConstraintViolationException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ConstraintViolationException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -368,7 +339,7 @@ public class ConstraintViolationException extends TException implements org.apac
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.violationSummaries = new ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(_list0.size);
+ struct.violationSummaries = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(_list0.size);
org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
@@ -416,18 +387,18 @@ public class ConstraintViolationException extends TException implements org.apac
}
- private static class ConstraintViolationExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class ConstraintViolationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ConstraintViolationExceptionTupleScheme getScheme() {
return new ConstraintViolationExceptionTupleScheme();
}
}
- private static class ConstraintViolationExceptionTupleScheme extends TupleScheme<ConstraintViolationException> {
+ private static class ConstraintViolationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<ConstraintViolationException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ConstraintViolationException 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.isSetViolationSummaries()) {
optionals.set(0);
}
@@ -445,12 +416,12 @@ public class ConstraintViolationException extends TException implements org.apac
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ConstraintViolationException 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)) {
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.violationSummaries = new ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(_list5.size);
+ struct.violationSummaries = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TConstraintViolationSummary>(_list5.size);
org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
@@ -464,5 +435,9 @@ public class ConstraintViolationException extends TException implements org.apac
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java
index 21fd63c..5eca0e9 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, IteratorConfig._Fields>, java.io.Serializable, Cloneable, Comparable<IteratorConfig> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IteratorConfig");
private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new IteratorConfigStandardSchemeFactory());
- schemes.put(TupleScheme.class, new IteratorConfigTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new IteratorConfigStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new IteratorConfigTupleSchemeFactory();
- public List<TIteratorSetting> iterators; // required
+ public java.util.List<TIteratorSetting> iterators; // 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 {
ITERATORS((short)1, "iterators");
- 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);
}
}
@@ -94,21 +64,21 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
*/
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;
}
@@ -117,19 +87,19 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
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.ITERATORS, new org.apache.thrift.meta_data.FieldMetaData("iterators", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIteratorSetting.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IteratorConfig.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
}
public IteratorConfig(
- List<TIteratorSetting> iterators)
+ java.util.List<TIteratorSetting> iterators)
{
this();
this.iterators = iterators;
@@ -148,7 +118,7 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
*/
public IteratorConfig(IteratorConfig other) {
if (other.isSetIterators()) {
- List<TIteratorSetting> __this__iterators = new ArrayList<TIteratorSetting>(other.iterators.size());
+ java.util.List<TIteratorSetting> __this__iterators = new java.util.ArrayList<TIteratorSetting>(other.iterators.size());
for (TIteratorSetting other_element : other.iterators) {
__this__iterators.add(new TIteratorSetting(other_element));
}
@@ -175,16 +145,16 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
public void addToIterators(TIteratorSetting elem) {
if (this.iterators == null) {
- this.iterators = new ArrayList<TIteratorSetting>();
+ this.iterators = new java.util.ArrayList<TIteratorSetting>();
}
this.iterators.add(elem);
}
- public List<TIteratorSetting> getIterators() {
+ public java.util.List<TIteratorSetting> getIterators() {
return this.iterators;
}
- public IteratorConfig setIterators(List<TIteratorSetting> iterators) {
+ public IteratorConfig setIterators(java.util.List<TIteratorSetting> iterators) {
this.iterators = iterators;
return this;
}
@@ -204,43 +174,43 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ITERATORS:
if (value == null) {
unsetIterators();
} else {
- setIterators((List<TIteratorSetting>)value);
+ setIterators((java.util.List<TIteratorSetting>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ITERATORS:
return getIterators();
}
- 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 ITERATORS:
return isSetIterators();
}
- 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 IteratorConfig)
@@ -251,6 +221,8 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
public boolean equals(IteratorConfig that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_iterators = true && this.isSetIterators();
boolean that_present_iterators = true && that.isSetIterators();
@@ -266,14 +238,13 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_iterators = true && (isSetIterators());
- list.add(present_iterators);
- if (present_iterators)
- list.add(iterators);
+ hashCode = hashCode * 8191 + ((isSetIterators()) ? 131071 : 524287);
+ if (isSetIterators())
+ hashCode = hashCode * 8191 + iterators.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -284,7 +255,7 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
+ lastComparison = java.lang.Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
if (lastComparison != 0) {
return lastComparison;
}
@@ -302,16 +273,16 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
}
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("IteratorConfig(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("IteratorConfig(");
boolean first = true;
sb.append("iterators:");
@@ -338,7 +309,7 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
}
}
- 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) {
@@ -346,13 +317,13 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
}
}
- private static class IteratorConfigStandardSchemeFactory implements SchemeFactory {
+ private static class IteratorConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IteratorConfigStandardScheme getScheme() {
return new IteratorConfigStandardScheme();
}
}
- private static class IteratorConfigStandardScheme extends StandardScheme<IteratorConfig> {
+ private static class IteratorConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<IteratorConfig> {
public void read(org.apache.thrift.protocol.TProtocol iprot, IteratorConfig struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -368,7 +339,7 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list98 = iprot.readListBegin();
- struct.iterators = new ArrayList<TIteratorSetting>(_list98.size);
+ struct.iterators = new java.util.ArrayList<TIteratorSetting>(_list98.size);
TIteratorSetting _elem99;
for (int _i100 = 0; _i100 < _list98.size; ++_i100)
{
@@ -416,18 +387,18 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
}
- private static class IteratorConfigTupleSchemeFactory implements SchemeFactory {
+ private static class IteratorConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IteratorConfigTupleScheme getScheme() {
return new IteratorConfigTupleScheme();
}
}
- private static class IteratorConfigTupleScheme extends TupleScheme<IteratorConfig> {
+ private static class IteratorConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<IteratorConfig> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, IteratorConfig 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.isSetIterators()) {
optionals.set(0);
}
@@ -445,12 +416,12 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, IteratorConfig 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)) {
{
org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.iterators = new ArrayList<TIteratorSetting>(_list103.size);
+ struct.iterators = new java.util.ArrayList<TIteratorSetting>(_list103.size);
TIteratorSetting _elem104;
for (int _i105 = 0; _i105 < _list103.size; ++_i105)
{
@@ -464,5 +435,9 @@ public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, I
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[38/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java
index 143393e..2f4735b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.client.impl.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum ConfigurationType implements org.apache.thrift.TEnum {
+public enum ConfigurationType implements org.apache.thrift.TEnum {
CURRENT(0),
SITE(1),
DEFAULT(2);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
index 8bc1964..28e83c7 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.client.impl.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum SecurityErrorCode implements org.apache.thrift.TEnum {
+public enum SecurityErrorCode implements org.apache.thrift.TEnum {
DEFAULT_SECURITY_ERROR(0),
BAD_CREDENTIALS(1),
PERMISSION_DENIED(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TDiskUsage.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TDiskUsage.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TDiskUsage.java
index 30dc624..7058f3b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TDiskUsage.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TDiskUsage.java
@@ -15,55 +15,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.client.impl.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsage._Fields>, java.io.Serializable, Cloneable, Comparable<TDiskUsage> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDiskUsage");
private static final org.apache.thrift.protocol.TField TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("tables", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField USAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("usage", org.apache.thrift.protocol.TType.I64, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TDiskUsageStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TDiskUsageTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TDiskUsageStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TDiskUsageTupleSchemeFactory();
- public List<String> tables; // required
+ public java.util.List<java.lang.String> tables; // required
public long usage; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -71,10 +41,10 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
TABLES((short)1, "tables"),
USAGE((short)2, "usage");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,15 +100,15 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
// isset id assignments
private static final int __USAGE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLES, new org.apache.thrift.meta_data.FieldMetaData("tables", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.USAGE, new org.apache.thrift.meta_data.FieldMetaData("usage", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDiskUsage.class, metaDataMap);
}
@@ -146,7 +116,7 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
}
public TDiskUsage(
- List<String> tables,
+ java.util.List<java.lang.String> tables,
long usage)
{
this();
@@ -161,7 +131,7 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
public TDiskUsage(TDiskUsage other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTables()) {
- List<String> __this__tables = new ArrayList<String>(other.tables);
+ java.util.List<java.lang.String> __this__tables = new java.util.ArrayList<java.lang.String>(other.tables);
this.tables = __this__tables;
}
this.usage = other.usage;
@@ -182,22 +152,22 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
return (this.tables == null) ? 0 : this.tables.size();
}
- public java.util.Iterator<String> getTablesIterator() {
+ public java.util.Iterator<java.lang.String> getTablesIterator() {
return (this.tables == null) ? null : this.tables.iterator();
}
- public void addToTables(String elem) {
+ public void addToTables(java.lang.String elem) {
if (this.tables == null) {
- this.tables = new ArrayList<String>();
+ this.tables = new java.util.ArrayList<java.lang.String>();
}
this.tables.add(elem);
}
- public List<String> getTables() {
+ public java.util.List<java.lang.String> getTables() {
return this.tables;
}
- public TDiskUsage setTables(List<String> tables) {
+ public TDiskUsage setTables(java.util.List<java.lang.String> tables) {
this.tables = tables;
return this;
}
@@ -228,25 +198,25 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
}
public void unsetUsage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USAGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USAGE_ISSET_ID);
}
/** Returns true if field usage is set (has been assigned a value) and false otherwise */
public boolean isSetUsage() {
- return EncodingUtils.testBit(__isset_bitfield, __USAGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USAGE_ISSET_ID);
}
public void setUsageIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USAGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USAGE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TABLES:
if (value == null) {
unsetTables();
} else {
- setTables((List<String>)value);
+ setTables((java.util.List<java.lang.String>)value);
}
break;
@@ -254,14 +224,14 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
if (value == null) {
unsetUsage();
} else {
- setUsage((Long)value);
+ setUsage((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLES:
return getTables();
@@ -270,13 +240,13 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
return getUsage();
}
- 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) {
@@ -285,11 +255,11 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
case USAGE:
return isSetUsage();
}
- 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 TDiskUsage)
@@ -300,6 +270,8 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
public boolean equals(TDiskUsage that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tables = true && this.isSetTables();
boolean that_present_tables = true && that.isSetTables();
@@ -324,19 +296,15 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tables = true && (isSetTables());
- list.add(present_tables);
- if (present_tables)
- list.add(tables);
+ hashCode = hashCode * 8191 + ((isSetTables()) ? 131071 : 524287);
+ if (isSetTables())
+ hashCode = hashCode * 8191 + tables.hashCode();
- boolean present_usage = true;
- list.add(present_usage);
- if (present_usage)
- list.add(usage);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(usage);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -347,7 +315,7 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTables()).compareTo(other.isSetTables());
+ lastComparison = java.lang.Boolean.valueOf(isSetTables()).compareTo(other.isSetTables());
if (lastComparison != 0) {
return lastComparison;
}
@@ -357,7 +325,7 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUsage()).compareTo(other.isSetUsage());
+ lastComparison = java.lang.Boolean.valueOf(isSetUsage()).compareTo(other.isSetUsage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -375,16 +343,16 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
}
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("TDiskUsage(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TDiskUsage(");
boolean first = true;
sb.append("tables:");
@@ -415,7 +383,7 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -425,13 +393,13 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
}
}
- private static class TDiskUsageStandardSchemeFactory implements SchemeFactory {
+ private static class TDiskUsageStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDiskUsageStandardScheme getScheme() {
return new TDiskUsageStandardScheme();
}
}
- private static class TDiskUsageStandardScheme extends StandardScheme<TDiskUsage> {
+ private static class TDiskUsageStandardScheme extends org.apache.thrift.scheme.StandardScheme<TDiskUsage> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TDiskUsage struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -447,8 +415,8 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.tables = new ArrayList<String>(_list0.size);
- String _elem1;
+ struct.tables = new java.util.ArrayList<java.lang.String>(_list0.size);
+ java.lang.String _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readString();
@@ -488,7 +456,7 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
oprot.writeFieldBegin(TABLES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tables.size()));
- for (String _iter3 : struct.tables)
+ for (java.lang.String _iter3 : struct.tables)
{
oprot.writeString(_iter3);
}
@@ -505,18 +473,18 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
}
- private static class TDiskUsageTupleSchemeFactory implements SchemeFactory {
+ private static class TDiskUsageTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDiskUsageTupleScheme getScheme() {
return new TDiskUsageTupleScheme();
}
}
- private static class TDiskUsageTupleScheme extends TupleScheme<TDiskUsage> {
+ private static class TDiskUsageTupleScheme extends org.apache.thrift.scheme.TupleScheme<TDiskUsage> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDiskUsage 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.isSetTables()) {
optionals.set(0);
}
@@ -527,7 +495,7 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
if (struct.isSetTables()) {
{
oprot.writeI32(struct.tables.size());
- for (String _iter4 : struct.tables)
+ for (java.lang.String _iter4 : struct.tables)
{
oprot.writeString(_iter4);
}
@@ -540,13 +508,13 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TDiskUsage 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)) {
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tables = new ArrayList<String>(_list5.size);
- String _elem6;
+ struct.tables = new java.util.ArrayList<java.lang.String>(_list5.size);
+ java.lang.String _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = iprot.readString();
@@ -562,5 +530,9 @@ public class TDiskUsage implements org.apache.thrift.TBase<TDiskUsage, TDiskUsag
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java
index 5b49952..1cbcb8e 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.client.impl.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TableOperation implements org.apache.thrift.TEnum {
+public enum TableOperation implements org.apache.thrift.TEnum {
CREATE(0),
DELETE(1),
RENAME(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java
index 52ec63f..5f68327 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.client.impl.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TableOperationExceptionType implements org.apache.thrift.TEnum {
+public enum TableOperationExceptionType implements org.apache.thrift.TEnum {
EXISTS(0),
NOTFOUND(1),
OFFLINE(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftNotActiveServiceException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftNotActiveServiceException.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftNotActiveServiceException.java
index 0702486..ec9f32e 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftNotActiveServiceException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftNotActiveServiceException.java
@@ -15,61 +15,31 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.client.impl.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class ThriftNotActiveServiceException extends TException implements org.apache.thrift.TBase<ThriftNotActiveServiceException, ThriftNotActiveServiceException._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftNotActiveServiceException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class ThriftNotActiveServiceException extends org.apache.thrift.TException implements org.apache.thrift.TBase<ThriftNotActiveServiceException, ThriftNotActiveServiceException._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftNotActiveServiceException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftNotActiveServiceException");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ThriftNotActiveServiceExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ThriftNotActiveServiceExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ThriftNotActiveServiceExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ThriftNotActiveServiceExceptionTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- 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);
}
}
@@ -90,21 +60,21 @@ public class ThriftNotActiveServiceException extends TException implements org.a
*/
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;
}
@@ -113,14 +83,14 @@ public class ThriftNotActiveServiceException extends TException implements org.a
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftNotActiveServiceException.class, metaDataMap);
}
@@ -141,30 +111,30 @@ public class ThriftNotActiveServiceException extends TException implements org.a
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- 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) {
}
- 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 ThriftNotActiveServiceException)
@@ -175,15 +145,17 @@ public class ThriftNotActiveServiceException extends TException implements org.a
public boolean equals(ThriftNotActiveServiceException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -202,16 +174,16 @@ public class ThriftNotActiveServiceException extends TException implements org.a
}
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("ThriftNotActiveServiceException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ThriftNotActiveServiceException(");
boolean first = true;
sb.append(")");
@@ -231,7 +203,7 @@ public class ThriftNotActiveServiceException extends TException implements org.a
}
}
- 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) {
@@ -239,13 +211,13 @@ public class ThriftNotActiveServiceException extends TException implements org.a
}
}
- private static class ThriftNotActiveServiceExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class ThriftNotActiveServiceExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ThriftNotActiveServiceExceptionStandardScheme getScheme() {
return new ThriftNotActiveServiceExceptionStandardScheme();
}
}
- private static class ThriftNotActiveServiceExceptionStandardScheme extends StandardScheme<ThriftNotActiveServiceException> {
+ private static class ThriftNotActiveServiceExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<ThriftNotActiveServiceException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftNotActiveServiceException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -278,24 +250,28 @@ public class ThriftNotActiveServiceException extends TException implements org.a
}
- private static class ThriftNotActiveServiceExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class ThriftNotActiveServiceExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ThriftNotActiveServiceExceptionTupleScheme getScheme() {
return new ThriftNotActiveServiceExceptionTupleScheme();
}
}
- private static class ThriftNotActiveServiceExceptionTupleScheme extends TupleScheme<ThriftNotActiveServiceException> {
+ private static class ThriftNotActiveServiceExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<ThriftNotActiveServiceException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ThriftNotActiveServiceException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ThriftNotActiveServiceException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftSecurityException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftSecurityException.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftSecurityException.java
index 52bd98f..e1678d6 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftSecurityException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftSecurityException.java
@@ -15,55 +15,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.client.impl.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class ThriftSecurityException extends TException implements org.apache.thrift.TBase<ThriftSecurityException, ThriftSecurityException._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftSecurityException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class ThriftSecurityException extends org.apache.thrift.TException implements org.apache.thrift.TBase<ThriftSecurityException, ThriftSecurityException._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftSecurityException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftSecurityException");
private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ThriftSecurityExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ThriftSecurityExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ThriftSecurityExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ThriftSecurityExceptionTupleSchemeFactory();
- public String user; // required
+ public java.lang.String user; // required
/**
*
* @see SecurityErrorCode
@@ -79,10 +49,10 @@ public class ThriftSecurityException extends TException implements org.apache.th
*/
CODE((short)2, "code");
- 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);
}
}
@@ -107,21 +77,21 @@ public class ThriftSecurityException extends TException implements org.apache.th
*/
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;
}
@@ -130,20 +100,20 @@ public class ThriftSecurityException extends TException implements org.apache.th
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.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SecurityErrorCode.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftSecurityException.class, metaDataMap);
}
@@ -151,7 +121,7 @@ public class ThriftSecurityException extends TException implements org.apache.th
}
public ThriftSecurityException(
- String user,
+ java.lang.String user,
SecurityErrorCode code)
{
this();
@@ -181,11 +151,11 @@ public class ThriftSecurityException extends TException implements org.apache.th
this.code = null;
}
- public String getUser() {
+ public java.lang.String getUser() {
return this.user;
}
- public ThriftSecurityException setUser(String user) {
+ public ThriftSecurityException setUser(java.lang.String user) {
this.user = user;
return this;
}
@@ -237,13 +207,13 @@ public class ThriftSecurityException extends TException implements org.apache.th
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case USER:
if (value == null) {
unsetUser();
} else {
- setUser((String)value);
+ setUser((java.lang.String)value);
}
break;
@@ -258,7 +228,7 @@ public class ThriftSecurityException extends TException implements org.apache.th
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER:
return getUser();
@@ -267,13 +237,13 @@ public class ThriftSecurityException extends TException implements org.apache.th
return getCode();
}
- 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) {
@@ -282,11 +252,11 @@ public class ThriftSecurityException extends TException implements org.apache.th
case CODE:
return isSetCode();
}
- 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 ThriftSecurityException)
@@ -297,6 +267,8 @@ public class ThriftSecurityException extends TException implements org.apache.th
public boolean equals(ThriftSecurityException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_user = true && this.isSetUser();
boolean that_present_user = true && that.isSetUser();
@@ -321,19 +293,17 @@ public class ThriftSecurityException extends TException implements org.apache.th
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_user = true && (isSetUser());
- list.add(present_user);
- if (present_user)
- list.add(user);
+ hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
+ if (isSetUser())
+ hashCode = hashCode * 8191 + user.hashCode();
- boolean present_code = true && (isSetCode());
- list.add(present_code);
- if (present_code)
- list.add(code.getValue());
+ hashCode = hashCode * 8191 + ((isSetCode()) ? 131071 : 524287);
+ if (isSetCode())
+ hashCode = hashCode * 8191 + code.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -344,7 +314,7 @@ public class ThriftSecurityException extends TException implements org.apache.th
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
+ lastComparison = java.lang.Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
if (lastComparison != 0) {
return lastComparison;
}
@@ -354,7 +324,7 @@ public class ThriftSecurityException extends TException implements org.apache.th
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
+ lastComparison = java.lang.Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
if (lastComparison != 0) {
return lastComparison;
}
@@ -372,16 +342,16 @@ public class ThriftSecurityException extends TException implements org.apache.th
}
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("ThriftSecurityException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ThriftSecurityException(");
boolean first = true;
sb.append("user:");
@@ -416,7 +386,7 @@ public class ThriftSecurityException extends TException implements org.apache.th
}
}
- 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) {
@@ -424,13 +394,13 @@ public class ThriftSecurityException extends TException implements org.apache.th
}
}
- private static class ThriftSecurityExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class ThriftSecurityExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ThriftSecurityExceptionStandardScheme getScheme() {
return new ThriftSecurityExceptionStandardScheme();
}
}
- private static class ThriftSecurityExceptionStandardScheme extends StandardScheme<ThriftSecurityException> {
+ private static class ThriftSecurityExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<ThriftSecurityException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftSecurityException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -489,18 +459,18 @@ public class ThriftSecurityException extends TException implements org.apache.th
}
- private static class ThriftSecurityExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class ThriftSecurityExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ThriftSecurityExceptionTupleScheme getScheme() {
return new ThriftSecurityExceptionTupleScheme();
}
}
- private static class ThriftSecurityExceptionTupleScheme extends TupleScheme<ThriftSecurityException> {
+ private static class ThriftSecurityExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<ThriftSecurityException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ThriftSecurityException 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.isSetUser()) {
optionals.set(0);
}
@@ -518,8 +488,8 @@ public class ThriftSecurityException extends TException implements org.apache.th
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ThriftSecurityException 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.user = iprot.readString();
struct.setUserIsSet(true);
@@ -531,5 +501,9 @@ public class ThriftSecurityException extends TException implements org.apache.th
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java
index 55a5d5a..5912b8b 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java
@@ -15,43 +15,16 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.client.impl.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class ThriftTableOperationException extends TException implements org.apache.thrift.TBase<ThriftTableOperationException, ThriftTableOperationException._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftTableOperationException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class ThriftTableOperationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<ThriftTableOperationException, ThriftTableOperationException._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftTableOperationException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftTableOperationException");
private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tableId", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -60,14 +33,11 @@ public class ThriftTableOperationException extends TException implements org.apa
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ThriftTableOperationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ThriftTableOperationExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ThriftTableOperationExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ThriftTableOperationExceptionTupleSchemeFactory();
- public String tableId; // required
- public String tableName; // required
+ public java.lang.String tableId; // required
+ public java.lang.String tableName; // required
/**
*
* @see TableOperation
@@ -78,7 +48,7 @@ public class ThriftTableOperationException extends TException implements org.apa
* @see TableOperationExceptionType
*/
public TableOperationExceptionType type; // required
- public String description; // required
+ public java.lang.String description; // 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 {
@@ -96,10 +66,10 @@ public class ThriftTableOperationException extends TException implements org.apa
TYPE((short)4, "type"),
DESCRIPTION((short)5, "description");
- 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);
}
}
@@ -130,21 +100,21 @@ public class ThriftTableOperationException extends TException implements org.apa
*/
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;
}
@@ -153,15 +123,15 @@ public class ThriftTableOperationException extends TException implements org.apa
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.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tableId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -172,7 +142,7 @@ public class ThriftTableOperationException extends TException implements org.apa
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TableOperationExceptionType.class)));
tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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(ThriftTableOperationException.class, metaDataMap);
}
@@ -180,11 +150,11 @@ public class ThriftTableOperationException extends TException implements org.apa
}
public ThriftTableOperationException(
- String tableId,
- String tableName,
+ java.lang.String tableId,
+ java.lang.String tableName,
TableOperation op,
TableOperationExceptionType type,
- String description)
+ java.lang.String description)
{
this();
this.tableId = tableId;
@@ -228,11 +198,11 @@ public class ThriftTableOperationException extends TException implements org.apa
this.description = null;
}
- public String getTableId() {
+ public java.lang.String getTableId() {
return this.tableId;
}
- public ThriftTableOperationException setTableId(String tableId) {
+ public ThriftTableOperationException setTableId(java.lang.String tableId) {
this.tableId = tableId;
return this;
}
@@ -252,11 +222,11 @@ public class ThriftTableOperationException extends TException implements org.apa
}
}
- public String getTableName() {
+ public java.lang.String getTableName() {
return this.tableName;
}
- public ThriftTableOperationException setTableName(String tableName) {
+ public ThriftTableOperationException setTableName(java.lang.String tableName) {
this.tableName = tableName;
return this;
}
@@ -340,11 +310,11 @@ public class ThriftTableOperationException extends TException implements org.apa
}
}
- public String getDescription() {
+ public java.lang.String getDescription() {
return this.description;
}
- public ThriftTableOperationException setDescription(String description) {
+ public ThriftTableOperationException setDescription(java.lang.String description) {
this.description = description;
return this;
}
@@ -364,13 +334,13 @@ public class ThriftTableOperationException extends TException implements org.apa
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TABLE_ID:
if (value == null) {
unsetTableId();
} else {
- setTableId((String)value);
+ setTableId((java.lang.String)value);
}
break;
@@ -378,7 +348,7 @@ public class ThriftTableOperationException extends TException implements org.apa
if (value == null) {
unsetTableName();
} else {
- setTableName((String)value);
+ setTableName((java.lang.String)value);
}
break;
@@ -402,14 +372,14 @@ public class ThriftTableOperationException extends TException implements org.apa
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_ID:
return getTableId();
@@ -427,13 +397,13 @@ public class ThriftTableOperationException extends TException implements org.apa
return getDescription();
}
- 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) {
@@ -448,11 +418,11 @@ public class ThriftTableOperationException extends TException implements org.apa
case DESCRIPTION:
return isSetDescription();
}
- 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 ThriftTableOperationException)
@@ -463,6 +433,8 @@ public class ThriftTableOperationException extends TException implements org.apa
public boolean equals(ThriftTableOperationException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tableId = true && this.isSetTableId();
boolean that_present_tableId = true && that.isSetTableId();
@@ -514,34 +486,29 @@ public class ThriftTableOperationException extends TException implements org.apa
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tableId = true && (isSetTableId());
- list.add(present_tableId);
- if (present_tableId)
- list.add(tableId);
+ hashCode = hashCode * 8191 + ((isSetTableId()) ? 131071 : 524287);
+ if (isSetTableId())
+ hashCode = hashCode * 8191 + tableId.hashCode();
- boolean present_tableName = true && (isSetTableName());
- list.add(present_tableName);
- if (present_tableName)
- list.add(tableName);
+ hashCode = hashCode * 8191 + ((isSetTableName()) ? 131071 : 524287);
+ if (isSetTableName())
+ hashCode = hashCode * 8191 + tableName.hashCode();
- boolean present_op = true && (isSetOp());
- list.add(present_op);
- if (present_op)
- list.add(op.getValue());
+ hashCode = hashCode * 8191 + ((isSetOp()) ? 131071 : 524287);
+ if (isSetOp())
+ hashCode = hashCode * 8191 + op.getValue();
- boolean present_type = true && (isSetType());
- list.add(present_type);
- if (present_type)
- list.add(type.getValue());
+ hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
+ if (isSetType())
+ hashCode = hashCode * 8191 + type.getValue();
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
+ hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
+ if (isSetDescription())
+ hashCode = hashCode * 8191 + description.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -552,7 +519,7 @@ public class ThriftTableOperationException extends TException implements org.apa
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTableId()).compareTo(other.isSetTableId());
+ lastComparison = java.lang.Boolean.valueOf(isSetTableId()).compareTo(other.isSetTableId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -562,7 +529,7 @@ public class ThriftTableOperationException extends TException implements org.apa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
+ lastComparison = java.lang.Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -572,7 +539,7 @@ public class ThriftTableOperationException extends TException implements org.apa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOp()).compareTo(other.isSetOp());
+ lastComparison = java.lang.Boolean.valueOf(isSetOp()).compareTo(other.isSetOp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -582,7 +549,7 @@ public class ThriftTableOperationException extends TException implements org.apa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -592,7 +559,7 @@ public class ThriftTableOperationException extends TException implements org.apa
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -610,16 +577,16 @@ public class ThriftTableOperationException extends TException implements org.apa
}
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("ThriftTableOperationException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ThriftTableOperationException(");
boolean first = true;
sb.append("tableId:");
@@ -678,7 +645,7 @@ public class ThriftTableOperationException extends TException implements org.apa
}
}
- 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) {
@@ -686,13 +653,13 @@ public class ThriftTableOperationException extends TException implements org.apa
}
}
- private static class ThriftTableOperationExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class ThriftTableOperationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ThriftTableOperationExceptionStandardScheme getScheme() {
return new ThriftTableOperationExceptionStandardScheme();
}
}
- private static class ThriftTableOperationExceptionStandardScheme extends StandardScheme<ThriftTableOperationException> {
+ private static class ThriftTableOperationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<ThriftTableOperationException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftTableOperationException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -790,18 +757,18 @@ public class ThriftTableOperationException extends TException implements org.apa
}
- private static class ThriftTableOperationExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class ThriftTableOperationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ThriftTableOperationExceptionTupleScheme getScheme() {
return new ThriftTableOperationExceptionTupleScheme();
}
}
- private static class ThriftTableOperationExceptionTupleScheme extends TupleScheme<ThriftTableOperationException> {
+ private static class ThriftTableOperationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<ThriftTableOperationException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ThriftTableOperationException 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.isSetTableId()) {
optionals.set(0);
}
@@ -837,8 +804,8 @@ public class ThriftTableOperationException extends TException implements org.apa
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ThriftTableOperationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.tableId = iprot.readString();
struct.setTableIdIsSet(true);
@@ -862,5 +829,9 @@ public class ThriftTableOperationException extends TException implements org.apa
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[18/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java
index bdbdd18..e2a1d50 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java
@@ -15,61 +15,31 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class NoSuchScanIDException extends TException implements org.apache.thrift.TBase<NoSuchScanIDException, NoSuchScanIDException._Fields>, java.io.Serializable, Cloneable, Comparable<NoSuchScanIDException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class NoSuchScanIDException extends org.apache.thrift.TException implements org.apache.thrift.TBase<NoSuchScanIDException, NoSuchScanIDException._Fields>, java.io.Serializable, Cloneable, Comparable<NoSuchScanIDException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchScanIDException");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NoSuchScanIDExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NoSuchScanIDExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NoSuchScanIDExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NoSuchScanIDExceptionTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- 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);
}
}
@@ -90,21 +60,21 @@ public class NoSuchScanIDException extends TException implements org.apache.thri
*/
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;
}
@@ -113,14 +83,14 @@ public class NoSuchScanIDException extends TException implements org.apache.thri
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NoSuchScanIDException.class, metaDataMap);
}
@@ -141,30 +111,30 @@ public class NoSuchScanIDException extends TException implements org.apache.thri
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- 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) {
}
- 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 NoSuchScanIDException)
@@ -175,15 +145,17 @@ public class NoSuchScanIDException extends TException implements org.apache.thri
public boolean equals(NoSuchScanIDException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -202,16 +174,16 @@ public class NoSuchScanIDException extends TException implements org.apache.thri
}
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("NoSuchScanIDException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NoSuchScanIDException(");
boolean first = true;
sb.append(")");
@@ -231,7 +203,7 @@ public class NoSuchScanIDException extends TException implements org.apache.thri
}
}
- 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) {
@@ -239,13 +211,13 @@ public class NoSuchScanIDException extends TException implements org.apache.thri
}
}
- private static class NoSuchScanIDExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class NoSuchScanIDExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NoSuchScanIDExceptionStandardScheme getScheme() {
return new NoSuchScanIDExceptionStandardScheme();
}
}
- private static class NoSuchScanIDExceptionStandardScheme extends StandardScheme<NoSuchScanIDException> {
+ private static class NoSuchScanIDExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<NoSuchScanIDException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchScanIDException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -278,24 +250,28 @@ public class NoSuchScanIDException extends TException implements org.apache.thri
}
- private static class NoSuchScanIDExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class NoSuchScanIDExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NoSuchScanIDExceptionTupleScheme getScheme() {
return new NoSuchScanIDExceptionTupleScheme();
}
}
- private static class NoSuchScanIDExceptionTupleScheme extends TupleScheme<NoSuchScanIDException> {
+ private static class NoSuchScanIDExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<NoSuchScanIDException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchScanIDException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NoSuchScanIDException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java
index 20903b3..ed7bd04 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java
@@ -15,52 +15,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class NotServingTabletException extends TException implements org.apache.thrift.TBase<NotServingTabletException, NotServingTabletException._Fields>, java.io.Serializable, Cloneable, Comparable<NotServingTabletException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class NotServingTabletException extends org.apache.thrift.TException implements org.apache.thrift.TBase<NotServingTabletException, NotServingTabletException._Fields>, java.io.Serializable, Cloneable, Comparable<NotServingTabletException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotServingTabletException");
private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", 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 NotServingTabletExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NotServingTabletExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NotServingTabletExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NotServingTabletExceptionTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
@@ -68,10 +38,10 @@ public class NotServingTabletException extends TException implements org.apache.
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXTENT((short)1, "extent");
- 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);
}
}
@@ -94,21 +64,21 @@ public class NotServingTabletException extends TException implements org.apache.
*/
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;
}
@@ -117,18 +87,18 @@ public class NotServingTabletException extends TException implements org.apache.
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.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotServingTabletException.class, metaDataMap);
}
@@ -184,7 +154,7 @@ public class NotServingTabletException extends TException implements org.apache.
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXTENT:
if (value == null) {
@@ -197,30 +167,30 @@ public class NotServingTabletException extends TException implements org.apache.
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXTENT:
return getExtent();
}
- 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 EXTENT:
return isSetExtent();
}
- 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 NotServingTabletException)
@@ -231,6 +201,8 @@ public class NotServingTabletException extends TException implements org.apache.
public boolean equals(NotServingTabletException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_extent = true && this.isSetExtent();
boolean that_present_extent = true && that.isSetExtent();
@@ -246,14 +218,13 @@ public class NotServingTabletException extends TException implements org.apache.
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class NotServingTabletException extends TException implements org.apache.
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class NotServingTabletException extends TException implements org.apache.
}
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("NotServingTabletException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NotServingTabletException(");
boolean first = true;
sb.append("extent:");
@@ -321,7 +292,7 @@ public class NotServingTabletException extends TException implements org.apache.
}
}
- 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) {
@@ -329,13 +300,13 @@ public class NotServingTabletException extends TException implements org.apache.
}
}
- private static class NotServingTabletExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class NotServingTabletExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NotServingTabletExceptionStandardScheme getScheme() {
return new NotServingTabletExceptionStandardScheme();
}
}
- private static class NotServingTabletExceptionStandardScheme extends StandardScheme<NotServingTabletException> {
+ private static class NotServingTabletExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<NotServingTabletException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NotServingTabletException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -382,18 +353,18 @@ public class NotServingTabletException extends TException implements org.apache.
}
- private static class NotServingTabletExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class NotServingTabletExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NotServingTabletExceptionTupleScheme getScheme() {
return new NotServingTabletExceptionTupleScheme();
}
}
- private static class NotServingTabletExceptionTupleScheme extends TupleScheme<NotServingTabletException> {
+ private static class NotServingTabletExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<NotServingTabletException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NotServingTabletException 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.isSetExtent()) {
optionals.set(0);
}
@@ -405,8 +376,8 @@ public class NotServingTabletException extends TException implements org.apache.
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NotServingTabletException 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.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.extent.read(iprot);
@@ -415,5 +386,9 @@ public class NotServingTabletException extends TException implements org.apache.
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java
index b117890..7600e88 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.tabletserver.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum ScanState implements org.apache.thrift.TEnum {
+public enum ScanState implements org.apache.thrift.TEnum {
IDLE(0),
RUNNING(1),
QUEUED(2);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java
index 25d741d..b33ea4a 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.tabletserver.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum ScanType implements org.apache.thrift.TEnum {
+public enum ScanType implements org.apache.thrift.TEnum {
SINGLE(0),
BATCH(1);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TDurability.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TDurability.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TDurability.java
index b8c7cff..b00546d 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TDurability.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TDurability.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.tabletserver.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TDurability implements org.apache.thrift.TEnum {
+public enum TDurability implements org.apache.thrift.TEnum {
DEFAULT(0),
SYNC(1),
FLUSH(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java
index a541206..a4f5d7c 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSetting, TIteratorSetting._Fields>, java.io.Serializable, Cloneable, Comparable<TIteratorSetting> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIteratorSetting");
@@ -59,16 +32,13 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
private static final org.apache.thrift.protocol.TField ITERATOR_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("iteratorClass", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TIteratorSettingStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TIteratorSettingTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TIteratorSettingStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TIteratorSettingTupleSchemeFactory();
public int priority; // required
- public String name; // required
- public String iteratorClass; // required
- public Map<String,String> properties; // required
+ public java.lang.String name; // required
+ public java.lang.String iteratorClass; // required
+ public java.util.Map<java.lang.String,java.lang.String> properties; // 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 {
@@ -77,10 +47,10 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
ITERATOR_CLASS((short)3, "iteratorClass"),
PROPERTIES((short)4, "properties");
- 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);
}
}
@@ -109,21 +79,21 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
*/
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;
}
@@ -132,7 +102,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -140,9 +110,9 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
// isset id assignments
private static final int __PRIORITY_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -153,7 +123,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TIteratorSetting.class, metaDataMap);
}
@@ -162,9 +132,9 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
public TIteratorSetting(
int priority,
- String name,
- String iteratorClass,
- Map<String,String> properties)
+ java.lang.String name,
+ java.lang.String iteratorClass,
+ java.util.Map<java.lang.String,java.lang.String> properties)
{
this();
this.priority = priority;
@@ -187,7 +157,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
this.iteratorClass = other.iteratorClass;
}
if (other.isSetProperties()) {
- Map<String,String> __this__properties = new HashMap<String,String>(other.properties);
+ java.util.Map<java.lang.String,java.lang.String> __this__properties = new java.util.HashMap<java.lang.String,java.lang.String>(other.properties);
this.properties = __this__properties;
}
}
@@ -216,23 +186,23 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
}
public void unsetPriority() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID);
}
/** Returns true if field priority is set (has been assigned a value) and false otherwise */
public boolean isSetPriority() {
- return EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);
}
public void setPriorityIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value);
}
- public String getName() {
+ public java.lang.String getName() {
return this.name;
}
- public TIteratorSetting setName(String name) {
+ public TIteratorSetting setName(java.lang.String name) {
this.name = name;
return this;
}
@@ -252,11 +222,11 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
}
}
- public String getIteratorClass() {
+ public java.lang.String getIteratorClass() {
return this.iteratorClass;
}
- public TIteratorSetting setIteratorClass(String iteratorClass) {
+ public TIteratorSetting setIteratorClass(java.lang.String iteratorClass) {
this.iteratorClass = iteratorClass;
return this;
}
@@ -280,18 +250,18 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
return (this.properties == null) ? 0 : this.properties.size();
}
- public void putToProperties(String key, String val) {
+ public void putToProperties(java.lang.String key, java.lang.String val) {
if (this.properties == null) {
- this.properties = new HashMap<String,String>();
+ this.properties = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.properties.put(key, val);
}
- public Map<String,String> getProperties() {
+ public java.util.Map<java.lang.String,java.lang.String> getProperties() {
return this.properties;
}
- public TIteratorSetting setProperties(Map<String,String> properties) {
+ public TIteratorSetting setProperties(java.util.Map<java.lang.String,java.lang.String> properties) {
this.properties = properties;
return this;
}
@@ -311,13 +281,13 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PRIORITY:
if (value == null) {
unsetPriority();
} else {
- setPriority((Integer)value);
+ setPriority((java.lang.Integer)value);
}
break;
@@ -325,7 +295,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
if (value == null) {
unsetName();
} else {
- setName((String)value);
+ setName((java.lang.String)value);
}
break;
@@ -333,7 +303,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
if (value == null) {
unsetIteratorClass();
} else {
- setIteratorClass((String)value);
+ setIteratorClass((java.lang.String)value);
}
break;
@@ -341,14 +311,14 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
if (value == null) {
unsetProperties();
} else {
- setProperties((Map<String,String>)value);
+ setProperties((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PRIORITY:
return getPriority();
@@ -363,13 +333,13 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
return getProperties();
}
- 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) {
@@ -382,11 +352,11 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
case PROPERTIES:
return isSetProperties();
}
- 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 TIteratorSetting)
@@ -397,6 +367,8 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
public boolean equals(TIteratorSetting that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_priority = true;
boolean that_present_priority = true;
@@ -439,29 +411,23 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_priority = true;
- list.add(present_priority);
- if (present_priority)
- list.add(priority);
+ hashCode = hashCode * 8191 + priority;
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
+ hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
+ if (isSetName())
+ hashCode = hashCode * 8191 + name.hashCode();
- boolean present_iteratorClass = true && (isSetIteratorClass());
- list.add(present_iteratorClass);
- if (present_iteratorClass)
- list.add(iteratorClass);
+ hashCode = hashCode * 8191 + ((isSetIteratorClass()) ? 131071 : 524287);
+ if (isSetIteratorClass())
+ hashCode = hashCode * 8191 + iteratorClass.hashCode();
- boolean present_properties = true && (isSetProperties());
- list.add(present_properties);
- if (present_properties)
- list.add(properties);
+ hashCode = hashCode * 8191 + ((isSetProperties()) ? 131071 : 524287);
+ if (isSetProperties())
+ hashCode = hashCode * 8191 + properties.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -472,7 +438,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority());
+ lastComparison = java.lang.Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority());
if (lastComparison != 0) {
return lastComparison;
}
@@ -482,7 +448,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -492,7 +458,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIteratorClass()).compareTo(other.isSetIteratorClass());
+ lastComparison = java.lang.Boolean.valueOf(isSetIteratorClass()).compareTo(other.isSetIteratorClass());
if (lastComparison != 0) {
return lastComparison;
}
@@ -502,7 +468,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties());
+ lastComparison = java.lang.Boolean.valueOf(isSetProperties()).compareTo(other.isSetProperties());
if (lastComparison != 0) {
return lastComparison;
}
@@ -520,16 +486,16 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
}
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("TIteratorSetting(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TIteratorSetting(");
boolean first = true;
sb.append("priority:");
@@ -576,7 +542,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -586,13 +552,13 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
}
}
- private static class TIteratorSettingStandardSchemeFactory implements SchemeFactory {
+ private static class TIteratorSettingStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIteratorSettingStandardScheme getScheme() {
return new TIteratorSettingStandardScheme();
}
}
- private static class TIteratorSettingStandardScheme extends StandardScheme<TIteratorSetting> {
+ private static class TIteratorSettingStandardScheme extends org.apache.thrift.scheme.StandardScheme<TIteratorSetting> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TIteratorSetting struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -632,9 +598,9 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map88 = iprot.readMapBegin();
- struct.properties = new HashMap<String,String>(2*_map88.size);
- String _key89;
- String _val90;
+ struct.properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map88.size);
+ java.lang.String _key89;
+ java.lang.String _val90;
for (int _i91 = 0; _i91 < _map88.size; ++_i91)
{
_key89 = iprot.readString();
@@ -680,7 +646,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
- for (Map.Entry<String, String> _iter92 : struct.properties.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter92 : struct.properties.entrySet())
{
oprot.writeString(_iter92.getKey());
oprot.writeString(_iter92.getValue());
@@ -695,18 +661,18 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
}
- private static class TIteratorSettingTupleSchemeFactory implements SchemeFactory {
+ private static class TIteratorSettingTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIteratorSettingTupleScheme getScheme() {
return new TIteratorSettingTupleScheme();
}
}
- private static class TIteratorSettingTupleScheme extends TupleScheme<TIteratorSetting> {
+ private static class TIteratorSettingTupleScheme extends org.apache.thrift.scheme.TupleScheme<TIteratorSetting> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TIteratorSetting 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.isSetPriority()) {
optionals.set(0);
}
@@ -732,7 +698,7 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
if (struct.isSetProperties()) {
{
oprot.writeI32(struct.properties.size());
- for (Map.Entry<String, String> _iter93 : struct.properties.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter93 : struct.properties.entrySet())
{
oprot.writeString(_iter93.getKey());
oprot.writeString(_iter93.getValue());
@@ -743,8 +709,8 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TIteratorSetting struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.priority = iprot.readI32();
struct.setPriorityIsSet(true);
@@ -760,9 +726,9 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map94 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.properties = new HashMap<String,String>(2*_map94.size);
- String _key95;
- String _val96;
+ struct.properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map94.size);
+ java.lang.String _key95;
+ java.lang.String _val96;
for (int _i97 = 0; _i97 < _map94.size; ++_i97)
{
_key95 = iprot.readString();
@@ -775,5 +741,9 @@ public class TIteratorSetting implements org.apache.thrift.TBase<TIteratorSettin
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSampleNotPresentException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSampleNotPresentException.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSampleNotPresentException.java
index dadea82..92393f1 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSampleNotPresentException.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSampleNotPresentException.java
@@ -15,52 +15,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class TSampleNotPresentException extends TException implements org.apache.thrift.TBase<TSampleNotPresentException, TSampleNotPresentException._Fields>, java.io.Serializable, Cloneable, Comparable<TSampleNotPresentException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class TSampleNotPresentException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TSampleNotPresentException, TSampleNotPresentException._Fields>, java.io.Serializable, Cloneable, Comparable<TSampleNotPresentException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSampleNotPresentException");
private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", 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 TSampleNotPresentExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TSampleNotPresentExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSampleNotPresentExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSampleNotPresentExceptionTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
@@ -68,10 +38,10 @@ public class TSampleNotPresentException extends TException implements org.apache
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXTENT((short)1, "extent");
- 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);
}
}
@@ -94,21 +64,21 @@ public class TSampleNotPresentException extends TException implements org.apache
*/
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;
}
@@ -117,18 +87,18 @@ public class TSampleNotPresentException extends TException implements org.apache
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.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSampleNotPresentException.class, metaDataMap);
}
@@ -184,7 +154,7 @@ public class TSampleNotPresentException extends TException implements org.apache
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXTENT:
if (value == null) {
@@ -197,30 +167,30 @@ public class TSampleNotPresentException extends TException implements org.apache
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXTENT:
return getExtent();
}
- 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 EXTENT:
return isSetExtent();
}
- 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 TSampleNotPresentException)
@@ -231,6 +201,8 @@ public class TSampleNotPresentException extends TException implements org.apache
public boolean equals(TSampleNotPresentException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_extent = true && this.isSetExtent();
boolean that_present_extent = true && that.isSetExtent();
@@ -246,14 +218,13 @@ public class TSampleNotPresentException extends TException implements org.apache
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class TSampleNotPresentException extends TException implements org.apache
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class TSampleNotPresentException extends TException implements org.apache
}
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("TSampleNotPresentException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TSampleNotPresentException(");
boolean first = true;
sb.append("extent:");
@@ -321,7 +292,7 @@ public class TSampleNotPresentException extends TException implements org.apache
}
}
- 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) {
@@ -329,13 +300,13 @@ public class TSampleNotPresentException extends TException implements org.apache
}
}
- private static class TSampleNotPresentExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TSampleNotPresentExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSampleNotPresentExceptionStandardScheme getScheme() {
return new TSampleNotPresentExceptionStandardScheme();
}
}
- private static class TSampleNotPresentExceptionStandardScheme extends StandardScheme<TSampleNotPresentException> {
+ private static class TSampleNotPresentExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TSampleNotPresentException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TSampleNotPresentException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -382,18 +353,18 @@ public class TSampleNotPresentException extends TException implements org.apache
}
- private static class TSampleNotPresentExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TSampleNotPresentExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSampleNotPresentExceptionTupleScheme getScheme() {
return new TSampleNotPresentExceptionTupleScheme();
}
}
- private static class TSampleNotPresentExceptionTupleScheme extends TupleScheme<TSampleNotPresentException> {
+ private static class TSampleNotPresentExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TSampleNotPresentException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSampleNotPresentException 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.isSetExtent()) {
optionals.set(0);
}
@@ -405,8 +376,8 @@ public class TSampleNotPresentException extends TException implements org.apache
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSampleNotPresentException 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.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.extent.read(iprot);
@@ -415,5 +386,9 @@ public class TSampleNotPresentException extends TException implements org.apache
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSamplerConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSamplerConfiguration.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSamplerConfiguration.java
index ee49a77..61ae185 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSamplerConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TSamplerConfiguration.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerConfiguration, TSamplerConfiguration._Fields>, java.io.Serializable, Cloneable, Comparable<TSamplerConfiguration> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSamplerConfiguration");
private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.MAP, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TSamplerConfigurationStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TSamplerConfigurationTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSamplerConfigurationStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSamplerConfigurationTupleSchemeFactory();
- public String className; // required
- public Map<String,String> options; // required
+ public java.lang.String className; // required
+ public java.util.Map<java.lang.String,java.lang.String> options; // 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 {
CLASS_NAME((short)1, "className"),
OPTIONS((short)2, "options");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,22 +92,22 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
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.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSamplerConfiguration.class, metaDataMap);
}
@@ -145,8 +115,8 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
}
public TSamplerConfiguration(
- String className,
- Map<String,String> options)
+ java.lang.String className,
+ java.util.Map<java.lang.String,java.lang.String> options)
{
this();
this.className = className;
@@ -161,7 +131,7 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
this.className = other.className;
}
if (other.isSetOptions()) {
- Map<String,String> __this__options = new HashMap<String,String>(other.options);
+ java.util.Map<java.lang.String,java.lang.String> __this__options = new java.util.HashMap<java.lang.String,java.lang.String>(other.options);
this.options = __this__options;
}
}
@@ -176,11 +146,11 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
this.options = null;
}
- public String getClassName() {
+ public java.lang.String getClassName() {
return this.className;
}
- public TSamplerConfiguration setClassName(String className) {
+ public TSamplerConfiguration setClassName(java.lang.String className) {
this.className = className;
return this;
}
@@ -204,18 +174,18 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
return (this.options == null) ? 0 : this.options.size();
}
- public void putToOptions(String key, String val) {
+ public void putToOptions(java.lang.String key, java.lang.String val) {
if (this.options == null) {
- this.options = new HashMap<String,String>();
+ this.options = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.options.put(key, val);
}
- public Map<String,String> getOptions() {
+ public java.util.Map<java.lang.String,java.lang.String> getOptions() {
return this.options;
}
- public TSamplerConfiguration setOptions(Map<String,String> options) {
+ public TSamplerConfiguration setOptions(java.util.Map<java.lang.String,java.lang.String> options) {
this.options = options;
return this;
}
@@ -235,13 +205,13 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CLASS_NAME:
if (value == null) {
unsetClassName();
} else {
- setClassName((String)value);
+ setClassName((java.lang.String)value);
}
break;
@@ -249,14 +219,14 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
if (value == null) {
unsetOptions();
} else {
- setOptions((Map<String,String>)value);
+ setOptions((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CLASS_NAME:
return getClassName();
@@ -265,13 +235,13 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
return getOptions();
}
- 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) {
@@ -280,11 +250,11 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
case OPTIONS:
return isSetOptions();
}
- 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 TSamplerConfiguration)
@@ -295,6 +265,8 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
public boolean equals(TSamplerConfiguration that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_className = true && this.isSetClassName();
boolean that_present_className = true && that.isSetClassName();
@@ -319,19 +291,17 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_className = true && (isSetClassName());
- list.add(present_className);
- if (present_className)
- list.add(className);
+ hashCode = hashCode * 8191 + ((isSetClassName()) ? 131071 : 524287);
+ if (isSetClassName())
+ hashCode = hashCode * 8191 + className.hashCode();
- boolean present_options = true && (isSetOptions());
- list.add(present_options);
- if (present_options)
- list.add(options);
+ hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
+ if (isSetOptions())
+ hashCode = hashCode * 8191 + options.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -342,7 +312,7 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName());
+ lastComparison = java.lang.Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -352,7 +322,7 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
+ lastComparison = java.lang.Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -370,16 +340,16 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
}
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("TSamplerConfiguration(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TSamplerConfiguration(");
boolean first = true;
sb.append("className:");
@@ -414,7 +384,7 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
}
}
- 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) {
@@ -422,13 +392,13 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
}
}
- private static class TSamplerConfigurationStandardSchemeFactory implements SchemeFactory {
+ private static class TSamplerConfigurationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSamplerConfigurationStandardScheme getScheme() {
return new TSamplerConfigurationStandardScheme();
}
}
- private static class TSamplerConfigurationStandardScheme extends StandardScheme<TSamplerConfiguration> {
+ private static class TSamplerConfigurationStandardScheme extends org.apache.thrift.scheme.StandardScheme<TSamplerConfiguration> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TSamplerConfiguration struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -452,9 +422,9 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin();
- struct.options = new HashMap<String,String>(2*_map106.size);
- String _key107;
- String _val108;
+ struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map106.size);
+ java.lang.String _key107;
+ java.lang.String _val108;
for (int _i109 = 0; _i109 < _map106.size; ++_i109)
{
_key107 = iprot.readString();
@@ -492,7 +462,7 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.options.size()));
- for (Map.Entry<String, String> _iter110 : struct.options.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter110 : struct.options.entrySet())
{
oprot.writeString(_iter110.getKey());
oprot.writeString(_iter110.getValue());
@@ -507,18 +477,18 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
}
- private static class TSamplerConfigurationTupleSchemeFactory implements SchemeFactory {
+ private static class TSamplerConfigurationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSamplerConfigurationTupleScheme getScheme() {
return new TSamplerConfigurationTupleScheme();
}
}
- private static class TSamplerConfigurationTupleScheme extends TupleScheme<TSamplerConfiguration> {
+ private static class TSamplerConfigurationTupleScheme extends org.apache.thrift.scheme.TupleScheme<TSamplerConfiguration> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSamplerConfiguration 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.isSetClassName()) {
optionals.set(0);
}
@@ -532,7 +502,7 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
if (struct.isSetOptions()) {
{
oprot.writeI32(struct.options.size());
- for (Map.Entry<String, String> _iter111 : struct.options.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter111 : struct.options.entrySet())
{
oprot.writeString(_iter111.getKey());
oprot.writeString(_iter111.getValue());
@@ -543,8 +513,8 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSamplerConfiguration 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.className = iprot.readString();
struct.setClassNameIsSet(true);
@@ -552,9 +522,9 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map112 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.options = new HashMap<String,String>(2*_map112.size);
- String _key113;
- String _val114;
+ struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map112.size);
+ java.lang.String _key113;
+ java.lang.String _val114;
for (int _i115 = 0; _i115 < _map112.size; ++_i115)
{
_key113 = iprot.readString();
@@ -567,5 +537,9 @@ public class TSamplerConfiguration implements org.apache.thrift.TBase<TSamplerCo
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TUnloadTabletGoal.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TUnloadTabletGoal.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TUnloadTabletGoal.java
index 3ce0b31..ecabca4 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TUnloadTabletGoal.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TUnloadTabletGoal.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.tabletserver.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TUnloadTabletGoal implements org.apache.thrift.TEnum {
+public enum TUnloadTabletGoal implements org.apache.thrift.TEnum {
UNKNOWN(0),
UNASSIGNED(1),
SUSPENDED(2),
[07/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableNotFoundException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableNotFoundException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableNotFoundException.java
index d889faf..1bc9529 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableNotFoundException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableNotFoundException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class TableNotFoundException extends TException implements org.apache.thrift.TBase<TableNotFoundException, TableNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<TableNotFoundException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class TableNotFoundException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TableNotFoundException, TableNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<TableNotFoundException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableNotFoundException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TableNotFoundExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TableNotFoundExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TableNotFoundExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TableNotFoundExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class TableNotFoundException extends TException implements org.apache.thr
*/
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;
}
@@ -117,18 +87,18 @@ public class TableNotFoundException extends TException implements org.apache.thr
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableNotFoundException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class TableNotFoundException extends TException implements org.apache.thr
}
public TableNotFoundException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class TableNotFoundException extends TException implements org.apache.thr
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public TableNotFoundException setMsg(String msg) {
+ public TableNotFoundException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class TableNotFoundException extends TException implements org.apache.thr
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TableNotFoundException)
@@ -231,6 +201,8 @@ public class TableNotFoundException extends TException implements org.apache.thr
public boolean equals(TableNotFoundException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class TableNotFoundException extends TException implements org.apache.thr
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class TableNotFoundException extends TException implements org.apache.thr
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class TableNotFoundException extends TException implements org.apache.thr
}
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("TableNotFoundException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TableNotFoundException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class TableNotFoundException extends TException implements org.apache.thr
}
}
- 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) {
@@ -326,13 +297,13 @@ public class TableNotFoundException extends TException implements org.apache.thr
}
}
- private static class TableNotFoundExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TableNotFoundExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TableNotFoundExceptionStandardScheme getScheme() {
return new TableNotFoundExceptionStandardScheme();
}
}
- private static class TableNotFoundExceptionStandardScheme extends StandardScheme<TableNotFoundException> {
+ private static class TableNotFoundExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TableNotFoundException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TableNotFoundException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class TableNotFoundException extends TException implements org.apache.thr
}
- private static class TableNotFoundExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TableNotFoundExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TableNotFoundExceptionTupleScheme getScheme() {
return new TableNotFoundExceptionTupleScheme();
}
}
- private static class TableNotFoundExceptionTupleScheme extends TupleScheme<TableNotFoundException> {
+ private static class TableNotFoundExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TableNotFoundException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TableNotFoundException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class TableNotFoundException extends TException implements org.apache.thr
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TableNotFoundException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class TableNotFoundException extends TException implements org.apache.thr
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TablePermission.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TablePermission.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TablePermission.java
index 1beac63..c969452 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TablePermission.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TablePermission.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TablePermission implements org.apache.thrift.TEnum {
+public enum TablePermission implements org.apache.thrift.TEnum {
READ(2),
WRITE(3),
BULK_IMPORT(4),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TimeType.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TimeType.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TimeType.java
index 26565a2..26ebb62 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TimeType.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TimeType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TimeType implements org.apache.thrift.TEnum {
+public enum TimeType implements org.apache.thrift.TEnum {
LOGICAL(0),
MILLIS(1);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownScanner.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownScanner.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownScanner.java
index 3630f94..82ea224 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownScanner.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownScanner.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class UnknownScanner extends TException implements org.apache.thrift.TBase<UnknownScanner, UnknownScanner._Fields>, java.io.Serializable, Cloneable, Comparable<UnknownScanner> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class UnknownScanner extends org.apache.thrift.TException implements org.apache.thrift.TBase<UnknownScanner, UnknownScanner._Fields>, java.io.Serializable, Cloneable, Comparable<UnknownScanner> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnknownScanner");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UnknownScannerStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UnknownScannerTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UnknownScannerStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UnknownScannerTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
*/
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;
}
@@ -117,18 +87,18 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnknownScanner.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
}
public UnknownScanner(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public UnknownScanner setMsg(String msg) {
+ public UnknownScanner setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof UnknownScanner)
@@ -231,6 +201,8 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
public boolean equals(UnknownScanner that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
}
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("UnknownScanner(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("UnknownScanner(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
}
}
- 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) {
@@ -326,13 +297,13 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
}
}
- private static class UnknownScannerStandardSchemeFactory implements SchemeFactory {
+ private static class UnknownScannerStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UnknownScannerStandardScheme getScheme() {
return new UnknownScannerStandardScheme();
}
}
- private static class UnknownScannerStandardScheme extends StandardScheme<UnknownScanner> {
+ private static class UnknownScannerStandardScheme extends org.apache.thrift.scheme.StandardScheme<UnknownScanner> {
public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownScanner struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
}
- private static class UnknownScannerTupleSchemeFactory implements SchemeFactory {
+ private static class UnknownScannerTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UnknownScannerTupleScheme getScheme() {
return new UnknownScannerTupleScheme();
}
}
- private static class UnknownScannerTupleScheme extends TupleScheme<UnknownScanner> {
+ private static class UnknownScannerTupleScheme extends org.apache.thrift.scheme.TupleScheme<UnknownScanner> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, UnknownScanner 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, UnknownScanner 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class UnknownScanner extends TException implements org.apache.thrift.TBas
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownWriter.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownWriter.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownWriter.java
index cd82742..8a7969c 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownWriter.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownWriter.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class UnknownWriter extends TException implements org.apache.thrift.TBase<UnknownWriter, UnknownWriter._Fields>, java.io.Serializable, Cloneable, Comparable<UnknownWriter> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class UnknownWriter extends org.apache.thrift.TException implements org.apache.thrift.TBase<UnknownWriter, UnknownWriter._Fields>, java.io.Serializable, Cloneable, Comparable<UnknownWriter> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UnknownWriter");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UnknownWriterStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UnknownWriterTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UnknownWriterStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UnknownWriterTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
*/
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;
}
@@ -117,18 +87,18 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UnknownWriter.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
}
public UnknownWriter(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public UnknownWriter setMsg(String msg) {
+ public UnknownWriter setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof UnknownWriter)
@@ -231,6 +201,8 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
public boolean equals(UnknownWriter that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
}
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("UnknownWriter(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("UnknownWriter(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
}
}
- 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) {
@@ -326,13 +297,13 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
}
}
- private static class UnknownWriterStandardSchemeFactory implements SchemeFactory {
+ private static class UnknownWriterStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UnknownWriterStandardScheme getScheme() {
return new UnknownWriterStandardScheme();
}
}
- private static class UnknownWriterStandardScheme extends StandardScheme<UnknownWriter> {
+ private static class UnknownWriterStandardScheme extends org.apache.thrift.scheme.StandardScheme<UnknownWriter> {
public void read(org.apache.thrift.protocol.TProtocol iprot, UnknownWriter struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
}
- private static class UnknownWriterTupleSchemeFactory implements SchemeFactory {
+ private static class UnknownWriterTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UnknownWriterTupleScheme getScheme() {
return new UnknownWriterTupleScheme();
}
}
- private static class UnknownWriterTupleScheme extends TupleScheme<UnknownWriter> {
+ private static class UnknownWriterTupleScheme extends org.apache.thrift.scheme.TupleScheme<UnknownWriter> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, UnknownWriter 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, UnknownWriter 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class UnknownWriter extends TException implements org.apache.thrift.TBase
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/WriterOptions.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/WriterOptions.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/WriterOptions.java
index 02d4548..25b48a8 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/WriterOptions.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/WriterOptions.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, WriterOptions._Fields>, java.io.Serializable, Cloneable, Comparable<WriterOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WriterOptions");
@@ -60,11 +33,8 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
private static final org.apache.thrift.protocol.TField THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("threads", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WriterOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WriterOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WriterOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WriterOptionsTupleSchemeFactory();
public long maxMemory; // required
public long latencyMs; // required
@@ -88,10 +58,10 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
*/
DURABILITY((short)5, "durability");
- 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);
}
}
@@ -122,21 +92,21 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
*/
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;
}
@@ -145,7 +115,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -157,9 +127,9 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
private static final int __THREADS_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DURABILITY};
- 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.MAX_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("maxMemory", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.LATENCY_MS, new org.apache.thrift.meta_data.FieldMetaData("latencyMs", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -170,7 +140,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DURABILITY, new org.apache.thrift.meta_data.FieldMetaData("durability", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Durability.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WriterOptions.class, metaDataMap);
}
@@ -236,16 +206,16 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
public void unsetMaxMemory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXMEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXMEMORY_ISSET_ID);
}
/** Returns true if field maxMemory is set (has been assigned a value) and false otherwise */
public boolean isSetMaxMemory() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXMEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXMEMORY_ISSET_ID);
}
public void setMaxMemoryIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXMEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXMEMORY_ISSET_ID, value);
}
public long getLatencyMs() {
@@ -259,16 +229,16 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
public void unsetLatencyMs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LATENCYMS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LATENCYMS_ISSET_ID);
}
/** Returns true if field latencyMs is set (has been assigned a value) and false otherwise */
public boolean isSetLatencyMs() {
- return EncodingUtils.testBit(__isset_bitfield, __LATENCYMS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LATENCYMS_ISSET_ID);
}
public void setLatencyMsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LATENCYMS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LATENCYMS_ISSET_ID, value);
}
public long getTimeoutMs() {
@@ -282,16 +252,16 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
public void unsetTimeoutMs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
/** Returns true if field timeoutMs is set (has been assigned a value) and false otherwise */
public boolean isSetTimeoutMs() {
- return EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID);
}
public void setTimeoutMsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUTMS_ISSET_ID, value);
}
public int getThreads() {
@@ -305,16 +275,16 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
public void unsetThreads() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THREADS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THREADS_ISSET_ID);
}
/** Returns true if field threads is set (has been assigned a value) and false otherwise */
public boolean isSetThreads() {
- return EncodingUtils.testBit(__isset_bitfield, __THREADS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THREADS_ISSET_ID);
}
public void setThreadsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THREADS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THREADS_ISSET_ID, value);
}
/**
@@ -349,13 +319,13 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MAX_MEMORY:
if (value == null) {
unsetMaxMemory();
} else {
- setMaxMemory((Long)value);
+ setMaxMemory((java.lang.Long)value);
}
break;
@@ -363,7 +333,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
if (value == null) {
unsetLatencyMs();
} else {
- setLatencyMs((Long)value);
+ setLatencyMs((java.lang.Long)value);
}
break;
@@ -371,7 +341,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
if (value == null) {
unsetTimeoutMs();
} else {
- setTimeoutMs((Long)value);
+ setTimeoutMs((java.lang.Long)value);
}
break;
@@ -379,7 +349,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
if (value == null) {
unsetThreads();
} else {
- setThreads((Integer)value);
+ setThreads((java.lang.Integer)value);
}
break;
@@ -394,7 +364,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MAX_MEMORY:
return getMaxMemory();
@@ -412,13 +382,13 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
return getDurability();
}
- 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) {
@@ -433,11 +403,11 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
case DURABILITY:
return isSetDurability();
}
- 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 WriterOptions)
@@ -448,6 +418,8 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
public boolean equals(WriterOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_maxMemory = true;
boolean that_present_maxMemory = true;
@@ -499,34 +471,21 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_maxMemory = true;
- list.add(present_maxMemory);
- if (present_maxMemory)
- list.add(maxMemory);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(maxMemory);
- boolean present_latencyMs = true;
- list.add(present_latencyMs);
- if (present_latencyMs)
- list.add(latencyMs);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(latencyMs);
- boolean present_timeoutMs = true;
- list.add(present_timeoutMs);
- if (present_timeoutMs)
- list.add(timeoutMs);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeoutMs);
- boolean present_threads = true;
- list.add(present_threads);
- if (present_threads)
- list.add(threads);
+ hashCode = hashCode * 8191 + threads;
- boolean present_durability = true && (isSetDurability());
- list.add(present_durability);
- if (present_durability)
- list.add(durability.getValue());
+ hashCode = hashCode * 8191 + ((isSetDurability()) ? 131071 : 524287);
+ if (isSetDurability())
+ hashCode = hashCode * 8191 + durability.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -537,7 +496,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMaxMemory()).compareTo(other.isSetMaxMemory());
+ lastComparison = java.lang.Boolean.valueOf(isSetMaxMemory()).compareTo(other.isSetMaxMemory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -547,7 +506,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLatencyMs()).compareTo(other.isSetLatencyMs());
+ lastComparison = java.lang.Boolean.valueOf(isSetLatencyMs()).compareTo(other.isSetLatencyMs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -557,7 +516,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimeoutMs()).compareTo(other.isSetTimeoutMs());
+ lastComparison = java.lang.Boolean.valueOf(isSetTimeoutMs()).compareTo(other.isSetTimeoutMs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -567,7 +526,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetThreads()).compareTo(other.isSetThreads());
+ lastComparison = java.lang.Boolean.valueOf(isSetThreads()).compareTo(other.isSetThreads());
if (lastComparison != 0) {
return lastComparison;
}
@@ -577,7 +536,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
+ lastComparison = java.lang.Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
@@ -595,16 +554,16 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
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("WriterOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WriterOptions(");
boolean first = true;
sb.append("maxMemory:");
@@ -649,7 +608,7 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -659,13 +618,13 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
}
- private static class WriterOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class WriterOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WriterOptionsStandardScheme getScheme() {
return new WriterOptionsStandardScheme();
}
}
- private static class WriterOptionsStandardScheme extends StandardScheme<WriterOptions> {
+ private static class WriterOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<WriterOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WriterOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -757,18 +716,18 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
- private static class WriterOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class WriterOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WriterOptionsTupleScheme getScheme() {
return new WriterOptionsTupleScheme();
}
}
- private static class WriterOptionsTupleScheme extends TupleScheme<WriterOptions> {
+ private static class WriterOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<WriterOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WriterOptions 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.isSetMaxMemory()) {
optionals.set(0);
}
@@ -804,8 +763,8 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WriterOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.maxMemory = iprot.readI64();
struct.setMaxMemoryIsSet(true);
@@ -829,5 +788,9 @@ public class WriterOptions implements org.apache.thrift.TBase<WriterOptions, Wri
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[09/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java
index db1a380..a8148d2 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceExistsException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class NamespaceExistsException extends TException implements org.apache.thrift.TBase<NamespaceExistsException, NamespaceExistsException._Fields>, java.io.Serializable, Cloneable, Comparable<NamespaceExistsException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class NamespaceExistsException extends org.apache.thrift.TException implements org.apache.thrift.TBase<NamespaceExistsException, NamespaceExistsException._Fields>, java.io.Serializable, Cloneable, Comparable<NamespaceExistsException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NamespaceExistsException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NamespaceExistsExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NamespaceExistsExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NamespaceExistsExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NamespaceExistsExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class NamespaceExistsException extends TException implements org.apache.t
*/
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;
}
@@ -117,18 +87,18 @@ public class NamespaceExistsException extends TException implements org.apache.t
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NamespaceExistsException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class NamespaceExistsException extends TException implements org.apache.t
}
public NamespaceExistsException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class NamespaceExistsException extends TException implements org.apache.t
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public NamespaceExistsException setMsg(String msg) {
+ public NamespaceExistsException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class NamespaceExistsException extends TException implements org.apache.t
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof NamespaceExistsException)
@@ -231,6 +201,8 @@ public class NamespaceExistsException extends TException implements org.apache.t
public boolean equals(NamespaceExistsException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class NamespaceExistsException extends TException implements org.apache.t
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class NamespaceExistsException extends TException implements org.apache.t
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class NamespaceExistsException extends TException implements org.apache.t
}
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("NamespaceExistsException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NamespaceExistsException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class NamespaceExistsException extends TException implements org.apache.t
}
}
- 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) {
@@ -326,13 +297,13 @@ public class NamespaceExistsException extends TException implements org.apache.t
}
}
- private static class NamespaceExistsExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class NamespaceExistsExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NamespaceExistsExceptionStandardScheme getScheme() {
return new NamespaceExistsExceptionStandardScheme();
}
}
- private static class NamespaceExistsExceptionStandardScheme extends StandardScheme<NamespaceExistsException> {
+ private static class NamespaceExistsExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<NamespaceExistsException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NamespaceExistsException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class NamespaceExistsException extends TException implements org.apache.t
}
- private static class NamespaceExistsExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class NamespaceExistsExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NamespaceExistsExceptionTupleScheme getScheme() {
return new NamespaceExistsExceptionTupleScheme();
}
}
- private static class NamespaceExistsExceptionTupleScheme extends TupleScheme<NamespaceExistsException> {
+ private static class NamespaceExistsExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<NamespaceExistsException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NamespaceExistsException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class NamespaceExistsException extends TException implements org.apache.t
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NamespaceExistsException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class NamespaceExistsException extends TException implements org.apache.t
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotEmptyException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotEmptyException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotEmptyException.java
index f22320e..1927347 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotEmptyException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotEmptyException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class NamespaceNotEmptyException extends TException implements org.apache.thrift.TBase<NamespaceNotEmptyException, NamespaceNotEmptyException._Fields>, java.io.Serializable, Cloneable, Comparable<NamespaceNotEmptyException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class NamespaceNotEmptyException extends org.apache.thrift.TException implements org.apache.thrift.TBase<NamespaceNotEmptyException, NamespaceNotEmptyException._Fields>, java.io.Serializable, Cloneable, Comparable<NamespaceNotEmptyException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NamespaceNotEmptyException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NamespaceNotEmptyExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NamespaceNotEmptyExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NamespaceNotEmptyExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NamespaceNotEmptyExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class NamespaceNotEmptyException extends TException implements org.apache
*/
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;
}
@@ -117,18 +87,18 @@ public class NamespaceNotEmptyException extends TException implements org.apache
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NamespaceNotEmptyException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class NamespaceNotEmptyException extends TException implements org.apache
}
public NamespaceNotEmptyException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class NamespaceNotEmptyException extends TException implements org.apache
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public NamespaceNotEmptyException setMsg(String msg) {
+ public NamespaceNotEmptyException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class NamespaceNotEmptyException extends TException implements org.apache
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof NamespaceNotEmptyException)
@@ -231,6 +201,8 @@ public class NamespaceNotEmptyException extends TException implements org.apache
public boolean equals(NamespaceNotEmptyException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class NamespaceNotEmptyException extends TException implements org.apache
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class NamespaceNotEmptyException extends TException implements org.apache
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class NamespaceNotEmptyException extends TException implements org.apache
}
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("NamespaceNotEmptyException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NamespaceNotEmptyException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class NamespaceNotEmptyException extends TException implements org.apache
}
}
- 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) {
@@ -326,13 +297,13 @@ public class NamespaceNotEmptyException extends TException implements org.apache
}
}
- private static class NamespaceNotEmptyExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class NamespaceNotEmptyExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NamespaceNotEmptyExceptionStandardScheme getScheme() {
return new NamespaceNotEmptyExceptionStandardScheme();
}
}
- private static class NamespaceNotEmptyExceptionStandardScheme extends StandardScheme<NamespaceNotEmptyException> {
+ private static class NamespaceNotEmptyExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<NamespaceNotEmptyException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NamespaceNotEmptyException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class NamespaceNotEmptyException extends TException implements org.apache
}
- private static class NamespaceNotEmptyExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class NamespaceNotEmptyExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NamespaceNotEmptyExceptionTupleScheme getScheme() {
return new NamespaceNotEmptyExceptionTupleScheme();
}
}
- private static class NamespaceNotEmptyExceptionTupleScheme extends TupleScheme<NamespaceNotEmptyException> {
+ private static class NamespaceNotEmptyExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<NamespaceNotEmptyException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NamespaceNotEmptyException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class NamespaceNotEmptyException extends TException implements org.apache
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NamespaceNotEmptyException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class NamespaceNotEmptyException extends TException implements org.apache
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotFoundException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotFoundException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotFoundException.java
index 9e31e48..894e0afb 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotFoundException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespaceNotFoundException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class NamespaceNotFoundException extends TException implements org.apache.thrift.TBase<NamespaceNotFoundException, NamespaceNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<NamespaceNotFoundException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class NamespaceNotFoundException extends org.apache.thrift.TException implements org.apache.thrift.TBase<NamespaceNotFoundException, NamespaceNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<NamespaceNotFoundException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NamespaceNotFoundException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NamespaceNotFoundExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NamespaceNotFoundExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NamespaceNotFoundExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NamespaceNotFoundExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class NamespaceNotFoundException extends TException implements org.apache
*/
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;
}
@@ -117,18 +87,18 @@ public class NamespaceNotFoundException extends TException implements org.apache
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NamespaceNotFoundException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class NamespaceNotFoundException extends TException implements org.apache
}
public NamespaceNotFoundException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class NamespaceNotFoundException extends TException implements org.apache
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public NamespaceNotFoundException setMsg(String msg) {
+ public NamespaceNotFoundException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class NamespaceNotFoundException extends TException implements org.apache
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof NamespaceNotFoundException)
@@ -231,6 +201,8 @@ public class NamespaceNotFoundException extends TException implements org.apache
public boolean equals(NamespaceNotFoundException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class NamespaceNotFoundException extends TException implements org.apache
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class NamespaceNotFoundException extends TException implements org.apache
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class NamespaceNotFoundException extends TException implements org.apache
}
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("NamespaceNotFoundException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NamespaceNotFoundException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class NamespaceNotFoundException extends TException implements org.apache
}
}
- 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) {
@@ -326,13 +297,13 @@ public class NamespaceNotFoundException extends TException implements org.apache
}
}
- private static class NamespaceNotFoundExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class NamespaceNotFoundExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NamespaceNotFoundExceptionStandardScheme getScheme() {
return new NamespaceNotFoundExceptionStandardScheme();
}
}
- private static class NamespaceNotFoundExceptionStandardScheme extends StandardScheme<NamespaceNotFoundException> {
+ private static class NamespaceNotFoundExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<NamespaceNotFoundException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NamespaceNotFoundException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class NamespaceNotFoundException extends TException implements org.apache
}
- private static class NamespaceNotFoundExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class NamespaceNotFoundExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NamespaceNotFoundExceptionTupleScheme getScheme() {
return new NamespaceNotFoundExceptionTupleScheme();
}
}
- private static class NamespaceNotFoundExceptionTupleScheme extends TupleScheme<NamespaceNotFoundException> {
+ private static class NamespaceNotFoundExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<NamespaceNotFoundException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NamespaceNotFoundException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class NamespaceNotFoundException extends TException implements org.apache
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NamespaceNotFoundException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class NamespaceNotFoundException extends TException implements org.apache
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespacePermission.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespacePermission.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespacePermission.java
index 6d790f6..9a831a4 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespacePermission.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NamespacePermission.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum NamespacePermission implements org.apache.thrift.TEnum {
+public enum NamespacePermission implements org.apache.thrift.TEnum {
READ(0),
WRITE(1),
ALTER_NAMESPACE(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NoMoreEntriesException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NoMoreEntriesException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NoMoreEntriesException.java
index 182277a..f28e747 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NoMoreEntriesException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NoMoreEntriesException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class NoMoreEntriesException extends TException implements org.apache.thrift.TBase<NoMoreEntriesException, NoMoreEntriesException._Fields>, java.io.Serializable, Cloneable, Comparable<NoMoreEntriesException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class NoMoreEntriesException extends org.apache.thrift.TException implements org.apache.thrift.TBase<NoMoreEntriesException, NoMoreEntriesException._Fields>, java.io.Serializable, Cloneable, Comparable<NoMoreEntriesException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoMoreEntriesException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NoMoreEntriesExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NoMoreEntriesExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NoMoreEntriesExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NoMoreEntriesExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
*/
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;
}
@@ -117,18 +87,18 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NoMoreEntriesException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
}
public NoMoreEntriesException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public NoMoreEntriesException setMsg(String msg) {
+ public NoMoreEntriesException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof NoMoreEntriesException)
@@ -231,6 +201,8 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
public boolean equals(NoMoreEntriesException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
}
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("NoMoreEntriesException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NoMoreEntriesException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
}
}
- 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) {
@@ -326,13 +297,13 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
}
}
- private static class NoMoreEntriesExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class NoMoreEntriesExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NoMoreEntriesExceptionStandardScheme getScheme() {
return new NoMoreEntriesExceptionStandardScheme();
}
}
- private static class NoMoreEntriesExceptionStandardScheme extends StandardScheme<NoMoreEntriesException> {
+ private static class NoMoreEntriesExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<NoMoreEntriesException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NoMoreEntriesException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
}
- private static class NoMoreEntriesExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class NoMoreEntriesExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NoMoreEntriesExceptionTupleScheme getScheme() {
return new NoMoreEntriesExceptionTupleScheme();
}
}
- private static class NoMoreEntriesExceptionTupleScheme extends TupleScheme<NoMoreEntriesException> {
+ private static class NoMoreEntriesExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<NoMoreEntriesException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NoMoreEntriesException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NoMoreEntriesException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class NoMoreEntriesException extends TException implements org.apache.thr
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PartialKey.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PartialKey.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PartialKey.java
index b03eae9..11be665 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PartialKey.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PartialKey.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum PartialKey implements org.apache.thrift.TEnum {
+public enum PartialKey implements org.apache.thrift.TEnum {
ROW(0),
ROW_COLFAM(1),
ROW_COLFAM_COLQUAL(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Range.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Range.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Range.java
index db8fe8e..92c6172 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Range.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Range.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, java.io.Serializable, Cloneable, Comparable<Range> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Range");
@@ -59,11 +32,8 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
private static final org.apache.thrift.protocol.TField STOP_FIELD_DESC = new org.apache.thrift.protocol.TField("stop", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField STOP_INCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("stopInclusive", org.apache.thrift.protocol.TType.BOOL, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new RangeStandardSchemeFactory());
- schemes.put(TupleScheme.class, new RangeTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RangeStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RangeTupleSchemeFactory();
public Key start; // required
public boolean startInclusive; // required
@@ -77,10 +47,10 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
STOP((short)3, "stop"),
STOP_INCLUSIVE((short)4, "stopInclusive");
- 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);
}
}
@@ -109,21 +79,21 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
*/
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;
}
@@ -132,7 +102,7 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,9 +111,9 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
private static final int __STARTINCLUSIVE_ISSET_ID = 0;
private static final int __STOPINCLUSIVE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Key.class)));
tmpMap.put(_Fields.START_INCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("startInclusive", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -152,7 +122,7 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Key.class)));
tmpMap.put(_Fields.STOP_INCLUSIVE, new org.apache.thrift.meta_data.FieldMetaData("stopInclusive", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Range.class, metaDataMap);
}
@@ -238,16 +208,16 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
}
public void unsetStartInclusive() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID);
}
/** Returns true if field startInclusive is set (has been assigned a value) and false otherwise */
public boolean isSetStartInclusive() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID);
}
public void setStartInclusiveIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTINCLUSIVE_ISSET_ID, value);
}
public Key getStop() {
@@ -285,19 +255,19 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
}
public void unsetStopInclusive() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID);
}
/** Returns true if field stopInclusive is set (has been assigned a value) and false otherwise */
public boolean isSetStopInclusive() {
- return EncodingUtils.testBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID);
}
public void setStopInclusiveIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STOPINCLUSIVE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case START:
if (value == null) {
@@ -311,7 +281,7 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
if (value == null) {
unsetStartInclusive();
} else {
- setStartInclusive((Boolean)value);
+ setStartInclusive((java.lang.Boolean)value);
}
break;
@@ -327,14 +297,14 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
if (value == null) {
unsetStopInclusive();
} else {
- setStopInclusive((Boolean)value);
+ setStopInclusive((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case START:
return getStart();
@@ -349,13 +319,13 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
return isStopInclusive();
}
- 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) {
@@ -368,11 +338,11 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
case STOP_INCLUSIVE:
return isSetStopInclusive();
}
- 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 Range)
@@ -383,6 +353,8 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
public boolean equals(Range that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_start = true && this.isSetStart();
boolean that_present_start = true && that.isSetStart();
@@ -425,29 +397,21 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_start = true && (isSetStart());
- list.add(present_start);
- if (present_start)
- list.add(start);
+ hashCode = hashCode * 8191 + ((isSetStart()) ? 131071 : 524287);
+ if (isSetStart())
+ hashCode = hashCode * 8191 + start.hashCode();
- boolean present_startInclusive = true;
- list.add(present_startInclusive);
- if (present_startInclusive)
- list.add(startInclusive);
+ hashCode = hashCode * 8191 + ((startInclusive) ? 131071 : 524287);
- boolean present_stop = true && (isSetStop());
- list.add(present_stop);
- if (present_stop)
- list.add(stop);
+ hashCode = hashCode * 8191 + ((isSetStop()) ? 131071 : 524287);
+ if (isSetStop())
+ hashCode = hashCode * 8191 + stop.hashCode();
- boolean present_stopInclusive = true;
- list.add(present_stopInclusive);
- if (present_stopInclusive)
- list.add(stopInclusive);
+ hashCode = hashCode * 8191 + ((stopInclusive) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -458,7 +422,7 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
+ lastComparison = java.lang.Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
if (lastComparison != 0) {
return lastComparison;
}
@@ -468,7 +432,7 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStartInclusive()).compareTo(other.isSetStartInclusive());
+ lastComparison = java.lang.Boolean.valueOf(isSetStartInclusive()).compareTo(other.isSetStartInclusive());
if (lastComparison != 0) {
return lastComparison;
}
@@ -478,7 +442,7 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStop()).compareTo(other.isSetStop());
+ lastComparison = java.lang.Boolean.valueOf(isSetStop()).compareTo(other.isSetStop());
if (lastComparison != 0) {
return lastComparison;
}
@@ -488,7 +452,7 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStopInclusive()).compareTo(other.isSetStopInclusive());
+ lastComparison = java.lang.Boolean.valueOf(isSetStopInclusive()).compareTo(other.isSetStopInclusive());
if (lastComparison != 0) {
return lastComparison;
}
@@ -506,16 +470,16 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
}
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("Range(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Range(");
boolean first = true;
sb.append("start:");
@@ -564,7 +528,7 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -574,13 +538,13 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
}
}
- private static class RangeStandardSchemeFactory implements SchemeFactory {
+ private static class RangeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RangeStandardScheme getScheme() {
return new RangeStandardScheme();
}
}
- private static class RangeStandardScheme extends StandardScheme<Range> {
+ private static class RangeStandardScheme extends org.apache.thrift.scheme.StandardScheme<Range> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Range struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -663,18 +627,18 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
}
- private static class RangeTupleSchemeFactory implements SchemeFactory {
+ private static class RangeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RangeTupleScheme getScheme() {
return new RangeTupleScheme();
}
}
- private static class RangeTupleScheme extends TupleScheme<Range> {
+ private static class RangeTupleScheme extends org.apache.thrift.scheme.TupleScheme<Range> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Range 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.isSetStart()) {
optionals.set(0);
}
@@ -704,8 +668,8 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Range struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.start = new Key();
struct.start.read(iprot);
@@ -727,5 +691,9 @@ public class Range implements org.apache.thrift.TBase<Range, Range._Fields>, jav
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[33/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TKey.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TKey.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TKey.java
index fc66459..9121dfd 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TKey.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TKey.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.io.Serializable, Cloneable, Comparable<TKey> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TKey");
@@ -60,16 +33,13 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
private static final org.apache.thrift.protocol.TField COL_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("colVisibility", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TKeyStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TKeyTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TKeyStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TKeyTupleSchemeFactory();
- public ByteBuffer row; // required
- public ByteBuffer colFamily; // required
- public ByteBuffer colQualifier; // required
- public ByteBuffer colVisibility; // required
+ public java.nio.ByteBuffer row; // required
+ public java.nio.ByteBuffer colFamily; // required
+ public java.nio.ByteBuffer colQualifier; // required
+ public java.nio.ByteBuffer colVisibility; // required
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -80,10 +50,10 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
COL_VISIBILITY((short)4, "colVisibility"),
TIMESTAMP((short)5, "timestamp");
- 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);
}
}
@@ -114,21 +84,21 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
*/
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;
}
@@ -137,7 +107,7 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -145,9 +115,9 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
// isset id assignments
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COL_FAMILY, new org.apache.thrift.meta_data.FieldMetaData("colFamily", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -158,7 +128,7 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TKey.class, metaDataMap);
}
@@ -166,10 +136,10 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
}
public TKey(
- ByteBuffer row,
- ByteBuffer colFamily,
- ByteBuffer colQualifier,
- ByteBuffer colVisibility,
+ java.nio.ByteBuffer row,
+ java.nio.ByteBuffer colFamily,
+ java.nio.ByteBuffer colQualifier,
+ java.nio.ByteBuffer colVisibility,
long timestamp)
{
this();
@@ -220,16 +190,16 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return row == null ? null : row.array();
}
- public ByteBuffer bufferForRow() {
+ public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TKey setRow(byte[] row) {
- this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
+ this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
- public TKey setRow(ByteBuffer row) {
+ public TKey setRow(java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@@ -254,16 +224,16 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return colFamily == null ? null : colFamily.array();
}
- public ByteBuffer bufferForColFamily() {
+ public java.nio.ByteBuffer bufferForColFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(colFamily);
}
public TKey setColFamily(byte[] colFamily) {
- this.colFamily = colFamily == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colFamily, colFamily.length));
+ this.colFamily = colFamily == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colFamily.clone());
return this;
}
- public TKey setColFamily(ByteBuffer colFamily) {
+ public TKey setColFamily(java.nio.ByteBuffer colFamily) {
this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(colFamily);
return this;
}
@@ -288,16 +258,16 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return colQualifier == null ? null : colQualifier.array();
}
- public ByteBuffer bufferForColQualifier() {
+ public java.nio.ByteBuffer bufferForColQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
}
public TKey setColQualifier(byte[] colQualifier) {
- this.colQualifier = colQualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colQualifier, colQualifier.length));
+ this.colQualifier = colQualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colQualifier.clone());
return this;
}
- public TKey setColQualifier(ByteBuffer colQualifier) {
+ public TKey setColQualifier(java.nio.ByteBuffer colQualifier) {
this.colQualifier = org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
return this;
}
@@ -322,16 +292,16 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return colVisibility == null ? null : colVisibility.array();
}
- public ByteBuffer bufferForColVisibility() {
+ public java.nio.ByteBuffer bufferForColVisibility() {
return org.apache.thrift.TBaseHelper.copyBinary(colVisibility);
}
public TKey setColVisibility(byte[] colVisibility) {
- this.colVisibility = colVisibility == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colVisibility, colVisibility.length));
+ this.colVisibility = colVisibility == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colVisibility.clone());
return this;
}
- public TKey setColVisibility(ByteBuffer colVisibility) {
+ public TKey setColVisibility(java.nio.ByteBuffer colVisibility) {
this.colVisibility = org.apache.thrift.TBaseHelper.copyBinary(colVisibility);
return this;
}
@@ -362,25 +332,29 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
}
public void unsetTimestamp() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
- return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
- setRow((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setRow((byte[])value);
+ } else {
+ setRow((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -388,7 +362,11 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
if (value == null) {
unsetColFamily();
} else {
- setColFamily((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColFamily((byte[])value);
+ } else {
+ setColFamily((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -396,7 +374,11 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
if (value == null) {
unsetColQualifier();
} else {
- setColQualifier((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColQualifier((byte[])value);
+ } else {
+ setColQualifier((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -404,7 +386,11 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
if (value == null) {
unsetColVisibility();
} else {
- setColVisibility((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColVisibility((byte[])value);
+ } else {
+ setColVisibility((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -412,14 +398,14 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
if (value == null) {
unsetTimestamp();
} else {
- setTimestamp((Long)value);
+ setTimestamp((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@@ -437,13 +423,13 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return getTimestamp();
}
- 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) {
@@ -458,11 +444,11 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
case TIMESTAMP:
return isSetTimestamp();
}
- 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 TKey)
@@ -473,6 +459,8 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
public boolean equals(TKey that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@@ -524,34 +512,27 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_row = true && (isSetRow());
- list.add(present_row);
- if (present_row)
- list.add(row);
+ hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
+ if (isSetRow())
+ hashCode = hashCode * 8191 + row.hashCode();
- boolean present_colFamily = true && (isSetColFamily());
- list.add(present_colFamily);
- if (present_colFamily)
- list.add(colFamily);
+ hashCode = hashCode * 8191 + ((isSetColFamily()) ? 131071 : 524287);
+ if (isSetColFamily())
+ hashCode = hashCode * 8191 + colFamily.hashCode();
- boolean present_colQualifier = true && (isSetColQualifier());
- list.add(present_colQualifier);
- if (present_colQualifier)
- list.add(colQualifier);
+ hashCode = hashCode * 8191 + ((isSetColQualifier()) ? 131071 : 524287);
+ if (isSetColQualifier())
+ hashCode = hashCode * 8191 + colQualifier.hashCode();
- boolean present_colVisibility = true && (isSetColVisibility());
- list.add(present_colVisibility);
- if (present_colVisibility)
- list.add(colVisibility);
+ hashCode = hashCode * 8191 + ((isSetColVisibility()) ? 131071 : 524287);
+ if (isSetColVisibility())
+ hashCode = hashCode * 8191 + colVisibility.hashCode();
- boolean present_timestamp = true;
- list.add(present_timestamp);
- if (present_timestamp)
- list.add(timestamp);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -562,7 +543,7 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
+ lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@@ -572,7 +553,7 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
+ lastComparison = java.lang.Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
if (lastComparison != 0) {
return lastComparison;
}
@@ -582,7 +563,7 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -592,7 +573,7 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColVisibility()).compareTo(other.isSetColVisibility());
+ lastComparison = java.lang.Boolean.valueOf(isSetColVisibility()).compareTo(other.isSetColVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@@ -602,7 +583,7 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
+ lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -620,16 +601,16 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
}
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("TKey(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TKey(");
boolean first = true;
sb.append("row:");
@@ -684,7 +665,7 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -694,13 +675,13 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
}
}
- private static class TKeyStandardSchemeFactory implements SchemeFactory {
+ private static class TKeyStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TKeyStandardScheme getScheme() {
return new TKeyStandardScheme();
}
}
- private static class TKeyStandardScheme extends StandardScheme<TKey> {
+ private static class TKeyStandardScheme extends org.apache.thrift.scheme.StandardScheme<TKey> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TKey struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -796,18 +777,18 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
}
- private static class TKeyTupleSchemeFactory implements SchemeFactory {
+ private static class TKeyTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TKeyTupleScheme getScheme() {
return new TKeyTupleScheme();
}
}
- private static class TKeyTupleScheme extends TupleScheme<TKey> {
+ private static class TKeyTupleScheme extends org.apache.thrift.scheme.TupleScheme<TKey> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TKey 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.isSetRow()) {
optionals.set(0);
}
@@ -843,8 +824,8 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TKey struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
@@ -868,5 +849,9 @@ public class TKey implements org.apache.thrift.TBase<TKey, TKey._Fields>, java.i
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyExtent.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyExtent.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyExtent.java
index 9aaa4dc..283c9bf 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyExtent.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyExtent.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExtent._Fields>, java.io.Serializable, Cloneable, Comparable<TKeyExtent> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TKeyExtent");
@@ -58,15 +31,12 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
private static final org.apache.thrift.protocol.TField END_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("endRow", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PREV_END_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("prevEndRow", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TKeyExtentStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TKeyExtentTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TKeyExtentStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TKeyExtentTupleSchemeFactory();
- public ByteBuffer table; // required
- public ByteBuffer endRow; // required
- public ByteBuffer prevEndRow; // required
+ public java.nio.ByteBuffer table; // required
+ public java.nio.ByteBuffer endRow; // required
+ public java.nio.ByteBuffer prevEndRow; // 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 {
@@ -74,10 +44,10 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
END_ROW((short)2, "endRow"),
PREV_END_ROW((short)3, "prevEndRow");
- 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);
}
}
@@ -104,21 +74,21 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
*/
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;
}
@@ -127,22 +97,22 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
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.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.END_ROW, new org.apache.thrift.meta_data.FieldMetaData("endRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.PREV_END_ROW, new org.apache.thrift.meta_data.FieldMetaData("prevEndRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TKeyExtent.class, metaDataMap);
}
@@ -150,9 +120,9 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
}
public TKeyExtent(
- ByteBuffer table,
- ByteBuffer endRow,
- ByteBuffer prevEndRow)
+ java.nio.ByteBuffer table,
+ java.nio.ByteBuffer endRow,
+ java.nio.ByteBuffer prevEndRow)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
@@ -191,16 +161,16 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
return table == null ? null : table.array();
}
- public ByteBuffer bufferForTable() {
+ public java.nio.ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
public TKeyExtent setTable(byte[] table) {
- this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
+ this.table = table == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(table.clone());
return this;
}
- public TKeyExtent setTable(ByteBuffer table) {
+ public TKeyExtent setTable(java.nio.ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
@@ -225,16 +195,16 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
return endRow == null ? null : endRow.array();
}
- public ByteBuffer bufferForEndRow() {
+ public java.nio.ByteBuffer bufferForEndRow() {
return org.apache.thrift.TBaseHelper.copyBinary(endRow);
}
public TKeyExtent setEndRow(byte[] endRow) {
- this.endRow = endRow == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(endRow, endRow.length));
+ this.endRow = endRow == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(endRow.clone());
return this;
}
- public TKeyExtent setEndRow(ByteBuffer endRow) {
+ public TKeyExtent setEndRow(java.nio.ByteBuffer endRow) {
this.endRow = org.apache.thrift.TBaseHelper.copyBinary(endRow);
return this;
}
@@ -259,16 +229,16 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
return prevEndRow == null ? null : prevEndRow.array();
}
- public ByteBuffer bufferForPrevEndRow() {
+ public java.nio.ByteBuffer bufferForPrevEndRow() {
return org.apache.thrift.TBaseHelper.copyBinary(prevEndRow);
}
public TKeyExtent setPrevEndRow(byte[] prevEndRow) {
- this.prevEndRow = prevEndRow == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(prevEndRow, prevEndRow.length));
+ this.prevEndRow = prevEndRow == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(prevEndRow.clone());
return this;
}
- public TKeyExtent setPrevEndRow(ByteBuffer prevEndRow) {
+ public TKeyExtent setPrevEndRow(java.nio.ByteBuffer prevEndRow) {
this.prevEndRow = org.apache.thrift.TBaseHelper.copyBinary(prevEndRow);
return this;
}
@@ -288,13 +258,17 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
- setTable((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setTable((byte[])value);
+ } else {
+ setTable((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -302,7 +276,11 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
if (value == null) {
unsetEndRow();
} else {
- setEndRow((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setEndRow((byte[])value);
+ } else {
+ setEndRow((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -310,14 +288,18 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
if (value == null) {
unsetPrevEndRow();
} else {
- setPrevEndRow((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setPrevEndRow((byte[])value);
+ } else {
+ setPrevEndRow((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
@@ -329,13 +311,13 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
return getPrevEndRow();
}
- 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) {
@@ -346,11 +328,11 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
case PREV_END_ROW:
return isSetPrevEndRow();
}
- 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 TKeyExtent)
@@ -361,6 +343,8 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
public boolean equals(TKeyExtent that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
@@ -394,24 +378,21 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_table = true && (isSetTable());
- list.add(present_table);
- if (present_table)
- list.add(table);
+ hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
+ if (isSetTable())
+ hashCode = hashCode * 8191 + table.hashCode();
- boolean present_endRow = true && (isSetEndRow());
- list.add(present_endRow);
- if (present_endRow)
- list.add(endRow);
+ hashCode = hashCode * 8191 + ((isSetEndRow()) ? 131071 : 524287);
+ if (isSetEndRow())
+ hashCode = hashCode * 8191 + endRow.hashCode();
- boolean present_prevEndRow = true && (isSetPrevEndRow());
- list.add(present_prevEndRow);
- if (present_prevEndRow)
- list.add(prevEndRow);
+ hashCode = hashCode * 8191 + ((isSetPrevEndRow()) ? 131071 : 524287);
+ if (isSetPrevEndRow())
+ hashCode = hashCode * 8191 + prevEndRow.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -422,7 +403,7 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
+ lastComparison = java.lang.Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,7 +413,7 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEndRow()).compareTo(other.isSetEndRow());
+ lastComparison = java.lang.Boolean.valueOf(isSetEndRow()).compareTo(other.isSetEndRow());
if (lastComparison != 0) {
return lastComparison;
}
@@ -442,7 +423,7 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPrevEndRow()).compareTo(other.isSetPrevEndRow());
+ lastComparison = java.lang.Boolean.valueOf(isSetPrevEndRow()).compareTo(other.isSetPrevEndRow());
if (lastComparison != 0) {
return lastComparison;
}
@@ -460,16 +441,16 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
}
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("TKeyExtent(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TKeyExtent(");
boolean first = true;
sb.append("table:");
@@ -512,7 +493,7 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
}
}
- 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) {
@@ -520,13 +501,13 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
}
}
- private static class TKeyExtentStandardSchemeFactory implements SchemeFactory {
+ private static class TKeyExtentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TKeyExtentStandardScheme getScheme() {
return new TKeyExtentStandardScheme();
}
}
- private static class TKeyExtentStandardScheme extends StandardScheme<TKeyExtent> {
+ private static class TKeyExtentStandardScheme extends org.apache.thrift.scheme.StandardScheme<TKeyExtent> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TKeyExtent struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -598,18 +579,18 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
}
- private static class TKeyExtentTupleSchemeFactory implements SchemeFactory {
+ private static class TKeyExtentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TKeyExtentTupleScheme getScheme() {
return new TKeyExtentTupleScheme();
}
}
- private static class TKeyExtentTupleScheme extends TupleScheme<TKeyExtent> {
+ private static class TKeyExtentTupleScheme extends org.apache.thrift.scheme.TupleScheme<TKeyExtent> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TKeyExtent 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.isSetTable()) {
optionals.set(0);
}
@@ -633,8 +614,8 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TKeyExtent 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.table = iprot.readBinary();
struct.setTableIsSet(true);
@@ -650,5 +631,9 @@ public class TKeyExtent implements org.apache.thrift.TBase<TKeyExtent, TKeyExten
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyValue.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyValue.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyValue.java
index 01a3820..4968dec 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyValue.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyValue.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._Fields>, java.io.Serializable, Cloneable, Comparable<TKeyValue> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TKeyValue");
private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", 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 TKeyValueStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TKeyValueTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TKeyValueStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TKeyValueTupleSchemeFactory();
public TKey key; // required
- public ByteBuffer value; // required
+ public java.nio.ByteBuffer value; // 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 {
KEY((short)1, "key"),
VALUE((short)2, "value");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,20 +92,20 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKey.class)));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TKeyValue.class, metaDataMap);
}
@@ -144,7 +114,7 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
public TKeyValue(
TKey key,
- ByteBuffer value)
+ java.nio.ByteBuffer value)
{
this();
this.key = key;
@@ -202,16 +172,16 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
return value == null ? null : value.array();
}
- public ByteBuffer bufferForValue() {
+ public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public TKeyValue setValue(byte[] value) {
- this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
+ this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
- public TKeyValue setValue(ByteBuffer value) {
+ public TKeyValue setValue(java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
@@ -231,7 +201,7 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case KEY:
if (value == null) {
@@ -245,14 +215,18 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
if (value == null) {
unsetValue();
} else {
- setValue((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setValue((byte[])value);
+ } else {
+ setValue((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case KEY:
return getKey();
@@ -261,13 +235,13 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
return getValue();
}
- 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) {
@@ -276,11 +250,11 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
case VALUE:
return isSetValue();
}
- 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 TKeyValue)
@@ -291,6 +265,8 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
public boolean equals(TKeyValue that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_key = true && this.isSetKey();
boolean that_present_key = true && that.isSetKey();
@@ -315,19 +291,17 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_key = true && (isSetKey());
- list.add(present_key);
- if (present_key)
- list.add(key);
+ hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287);
+ if (isSetKey())
+ hashCode = hashCode * 8191 + key.hashCode();
- boolean present_value = true && (isSetValue());
- list.add(present_value);
- if (present_value)
- list.add(value);
+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
+ if (isSetValue())
+ hashCode = hashCode * 8191 + value.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -338,7 +312,7 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
+ lastComparison = java.lang.Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
if (lastComparison != 0) {
return lastComparison;
}
@@ -348,7 +322,7 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -366,16 +340,16 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
}
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("TKeyValue(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TKeyValue(");
boolean first = true;
sb.append("key:");
@@ -413,7 +387,7 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
}
}
- 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) {
@@ -421,13 +395,13 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
}
}
- private static class TKeyValueStandardSchemeFactory implements SchemeFactory {
+ private static class TKeyValueStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TKeyValueStandardScheme getScheme() {
return new TKeyValueStandardScheme();
}
}
- private static class TKeyValueStandardScheme extends StandardScheme<TKeyValue> {
+ private static class TKeyValueStandardScheme extends org.apache.thrift.scheme.StandardScheme<TKeyValue> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TKeyValue struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -487,18 +461,18 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
}
- private static class TKeyValueTupleSchemeFactory implements SchemeFactory {
+ private static class TKeyValueTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TKeyValueTupleScheme getScheme() {
return new TKeyValueTupleScheme();
}
}
- private static class TKeyValueTupleScheme extends TupleScheme<TKeyValue> {
+ private static class TKeyValueTupleScheme extends org.apache.thrift.scheme.TupleScheme<TKeyValue> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TKeyValue 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.isSetKey()) {
optionals.set(0);
}
@@ -516,8 +490,8 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TKeyValue 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.key = new TKey();
struct.key.read(iprot);
@@ -530,5 +504,9 @@ public class TKeyValue implements org.apache.thrift.TBase<TKeyValue, TKeyValue._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TMutation.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TMutation.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TMutation.java
index 1a153a9..79fe3b1 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TMutation.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TMutation.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._Fields>, java.io.Serializable, Cloneable, Comparable<TMutation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMutation");
@@ -60,17 +33,14 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
private static final org.apache.thrift.protocol.TField ENTRIES_FIELD_DESC = new org.apache.thrift.protocol.TField("entries", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField SOURCES_FIELD_DESC = new org.apache.thrift.protocol.TField("sources", org.apache.thrift.protocol.TType.LIST, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TMutationStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TMutationTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TMutationStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TMutationTupleSchemeFactory();
- public ByteBuffer row; // required
- public ByteBuffer data; // required
- public List<ByteBuffer> values; // required
+ public java.nio.ByteBuffer row; // required
+ public java.nio.ByteBuffer data; // required
+ public java.util.List<java.nio.ByteBuffer> values; // required
public int entries; // required
- public List<String> sources; // optional
+ public java.util.List<java.lang.String> sources; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -80,10 +50,10 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
ENTRIES((short)4, "entries"),
SOURCES((short)5, "sources");
- 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);
}
}
@@ -114,21 +84,21 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
*/
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;
}
@@ -137,7 +107,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -146,9 +116,9 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
private static final int __ENTRIES_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.SOURCES};
- 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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -161,7 +131,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
tmpMap.put(_Fields.SOURCES, new org.apache.thrift.meta_data.FieldMetaData("sources", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
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(TMutation.class, metaDataMap);
}
@@ -169,9 +139,9 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
}
public TMutation(
- ByteBuffer row,
- ByteBuffer data,
- List<ByteBuffer> values,
+ java.nio.ByteBuffer row,
+ java.nio.ByteBuffer data,
+ java.util.List<java.nio.ByteBuffer> values,
int entries)
{
this();
@@ -194,12 +164,12 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
}
if (other.isSetValues()) {
- List<ByteBuffer> __this__values = new ArrayList<ByteBuffer>(other.values);
+ java.util.List<java.nio.ByteBuffer> __this__values = new java.util.ArrayList<java.nio.ByteBuffer>(other.values);
this.values = __this__values;
}
this.entries = other.entries;
if (other.isSetSources()) {
- List<String> __this__sources = new ArrayList<String>(other.sources);
+ java.util.List<java.lang.String> __this__sources = new java.util.ArrayList<java.lang.String>(other.sources);
this.sources = __this__sources;
}
}
@@ -223,16 +193,16 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return row == null ? null : row.array();
}
- public ByteBuffer bufferForRow() {
+ public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TMutation setRow(byte[] row) {
- this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
+ this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
- public TMutation setRow(ByteBuffer row) {
+ public TMutation setRow(java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@@ -257,16 +227,16 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return data == null ? null : data.array();
}
- public ByteBuffer bufferForData() {
+ public java.nio.ByteBuffer bufferForData() {
return org.apache.thrift.TBaseHelper.copyBinary(data);
}
public TMutation setData(byte[] data) {
- this.data = data == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(data, data.length));
+ this.data = data == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(data.clone());
return this;
}
- public TMutation setData(ByteBuffer data) {
+ public TMutation setData(java.nio.ByteBuffer data) {
this.data = org.apache.thrift.TBaseHelper.copyBinary(data);
return this;
}
@@ -290,22 +260,22 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return (this.values == null) ? 0 : this.values.size();
}
- public java.util.Iterator<ByteBuffer> getValuesIterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> getValuesIterator() {
return (this.values == null) ? null : this.values.iterator();
}
- public void addToValues(ByteBuffer elem) {
+ public void addToValues(java.nio.ByteBuffer elem) {
if (this.values == null) {
- this.values = new ArrayList<ByteBuffer>();
+ this.values = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.values.add(elem);
}
- public List<ByteBuffer> getValues() {
+ public java.util.List<java.nio.ByteBuffer> getValues() {
return this.values;
}
- public TMutation setValues(List<ByteBuffer> values) {
+ public TMutation setValues(java.util.List<java.nio.ByteBuffer> values) {
this.values = values;
return this;
}
@@ -336,38 +306,38 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
}
public void unsetEntries() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENTRIES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENTRIES_ISSET_ID);
}
/** Returns true if field entries is set (has been assigned a value) and false otherwise */
public boolean isSetEntries() {
- return EncodingUtils.testBit(__isset_bitfield, __ENTRIES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENTRIES_ISSET_ID);
}
public void setEntriesIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENTRIES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENTRIES_ISSET_ID, value);
}
public int getSourcesSize() {
return (this.sources == null) ? 0 : this.sources.size();
}
- public java.util.Iterator<String> getSourcesIterator() {
+ public java.util.Iterator<java.lang.String> getSourcesIterator() {
return (this.sources == null) ? null : this.sources.iterator();
}
- public void addToSources(String elem) {
+ public void addToSources(java.lang.String elem) {
if (this.sources == null) {
- this.sources = new ArrayList<String>();
+ this.sources = new java.util.ArrayList<java.lang.String>();
}
this.sources.add(elem);
}
- public List<String> getSources() {
+ public java.util.List<java.lang.String> getSources() {
return this.sources;
}
- public TMutation setSources(List<String> sources) {
+ public TMutation setSources(java.util.List<java.lang.String> sources) {
this.sources = sources;
return this;
}
@@ -387,13 +357,17 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
- setRow((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setRow((byte[])value);
+ } else {
+ setRow((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -401,7 +375,11 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (value == null) {
unsetData();
} else {
- setData((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setData((byte[])value);
+ } else {
+ setData((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -409,7 +387,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (value == null) {
unsetValues();
} else {
- setValues((List<ByteBuffer>)value);
+ setValues((java.util.List<java.nio.ByteBuffer>)value);
}
break;
@@ -417,7 +395,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (value == null) {
unsetEntries();
} else {
- setEntries((Integer)value);
+ setEntries((java.lang.Integer)value);
}
break;
@@ -425,14 +403,14 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (value == null) {
unsetSources();
} else {
- setSources((List<String>)value);
+ setSources((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@@ -450,13 +428,13 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return getSources();
}
- 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) {
@@ -471,11 +449,11 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
case SOURCES:
return isSetSources();
}
- 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 TMutation)
@@ -486,6 +464,8 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
public boolean equals(TMutation that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@@ -537,34 +517,27 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_row = true && (isSetRow());
- list.add(present_row);
- if (present_row)
- list.add(row);
+ hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
+ if (isSetRow())
+ hashCode = hashCode * 8191 + row.hashCode();
- boolean present_data = true && (isSetData());
- list.add(present_data);
- if (present_data)
- list.add(data);
+ hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
+ if (isSetData())
+ hashCode = hashCode * 8191 + data.hashCode();
- boolean present_values = true && (isSetValues());
- list.add(present_values);
- if (present_values)
- list.add(values);
+ hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287);
+ if (isSetValues())
+ hashCode = hashCode * 8191 + values.hashCode();
- boolean present_entries = true;
- list.add(present_entries);
- if (present_entries)
- list.add(entries);
+ hashCode = hashCode * 8191 + entries;
- boolean present_sources = true && (isSetSources());
- list.add(present_sources);
- if (present_sources)
- list.add(sources);
+ hashCode = hashCode * 8191 + ((isSetSources()) ? 131071 : 524287);
+ if (isSetSources())
+ hashCode = hashCode * 8191 + sources.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -575,7 +548,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
+ lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@@ -585,7 +558,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData());
+ lastComparison = java.lang.Boolean.valueOf(isSetData()).compareTo(other.isSetData());
if (lastComparison != 0) {
return lastComparison;
}
@@ -595,7 +568,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues());
+ lastComparison = java.lang.Boolean.valueOf(isSetValues()).compareTo(other.isSetValues());
if (lastComparison != 0) {
return lastComparison;
}
@@ -605,7 +578,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEntries()).compareTo(other.isSetEntries());
+ lastComparison = java.lang.Boolean.valueOf(isSetEntries()).compareTo(other.isSetEntries());
if (lastComparison != 0) {
return lastComparison;
}
@@ -615,7 +588,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSources()).compareTo(other.isSetSources());
+ lastComparison = java.lang.Boolean.valueOf(isSetSources()).compareTo(other.isSetSources());
if (lastComparison != 0) {
return lastComparison;
}
@@ -633,16 +606,16 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
}
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("TMutation(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TMutation(");
boolean first = true;
sb.append("row:");
@@ -699,7 +672,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -709,13 +682,13 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
}
}
- private static class TMutationStandardSchemeFactory implements SchemeFactory {
+ private static class TMutationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMutationStandardScheme getScheme() {
return new TMutationStandardScheme();
}
}
- private static class TMutationStandardScheme extends StandardScheme<TMutation> {
+ private static class TMutationStandardScheme extends org.apache.thrift.scheme.StandardScheme<TMutation> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TMutation struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -747,8 +720,8 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.values = new ArrayList<ByteBuffer>(_list0.size);
- ByteBuffer _elem1;
+ struct.values = new java.util.ArrayList<java.nio.ByteBuffer>(_list0.size);
+ java.nio.ByteBuffer _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readBinary();
@@ -773,8 +746,8 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
- struct.sources = new ArrayList<String>(_list3.size);
- String _elem4;
+ struct.sources = new java.util.ArrayList<java.lang.String>(_list3.size);
+ java.lang.String _elem4;
for (int _i5 = 0; _i5 < _list3.size; ++_i5)
{
_elem4 = iprot.readString();
@@ -816,7 +789,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
oprot.writeFieldBegin(VALUES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size()));
- for (ByteBuffer _iter6 : struct.values)
+ for (java.nio.ByteBuffer _iter6 : struct.values)
{
oprot.writeBinary(_iter6);
}
@@ -832,7 +805,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
oprot.writeFieldBegin(SOURCES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.sources.size()));
- for (String _iter7 : struct.sources)
+ for (java.lang.String _iter7 : struct.sources)
{
oprot.writeString(_iter7);
}
@@ -847,18 +820,18 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
}
- private static class TMutationTupleSchemeFactory implements SchemeFactory {
+ private static class TMutationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMutationTupleScheme getScheme() {
return new TMutationTupleScheme();
}
}
- private static class TMutationTupleScheme extends TupleScheme<TMutation> {
+ private static class TMutationTupleScheme extends org.apache.thrift.scheme.TupleScheme<TMutation> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TMutation 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.isSetRow()) {
optionals.set(0);
}
@@ -884,7 +857,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (struct.isSetValues()) {
{
oprot.writeI32(struct.values.size());
- for (ByteBuffer _iter8 : struct.values)
+ for (java.nio.ByteBuffer _iter8 : struct.values)
{
oprot.writeBinary(_iter8);
}
@@ -896,7 +869,7 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (struct.isSetSources()) {
{
oprot.writeI32(struct.sources.size());
- for (String _iter9 : struct.sources)
+ for (java.lang.String _iter9 : struct.sources)
{
oprot.writeString(_iter9);
}
@@ -906,8 +879,8 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TMutation struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
@@ -919,8 +892,8 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.values = new ArrayList<ByteBuffer>(_list10.size);
- ByteBuffer _elem11;
+ struct.values = new java.util.ArrayList<java.nio.ByteBuffer>(_list10.size);
+ java.nio.ByteBuffer _elem11;
for (int _i12 = 0; _i12 < _list10.size; ++_i12)
{
_elem11 = iprot.readBinary();
@@ -936,8 +909,8 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.sources = new ArrayList<String>(_list13.size);
- String _elem14;
+ struct.sources = new java.util.ArrayList<java.lang.String>(_list13.size);
+ java.lang.String _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = iprot.readString();
@@ -949,5 +922,9 @@ public class TMutation implements org.apache.thrift.TBase<TMutation, TMutation._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[28/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
index a9dfe2d..1612d1b 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
@@ -15,121 +15,94 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class MasterClientService {
public interface Iface extends FateService.Iface {
- public long initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public long initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, ByteBuffer startRow, ByteBuffer endRow, long flushID, long maxLoops) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
public void setMasterGoalState(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, MasterGoalState state) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
public void shutdown(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, boolean stopTabletServers) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tabletServer, boolean force) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
public MasterMonitorInfo getMasterStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
public void waitForBalance(org.apache.accumulo.core.trace.thrift.TInfo tinfo) throws org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletSplit split) throws org.apache.thrift.TException;
+ public void reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String serverName, TabletSplit split) throws org.apache.thrift.TException;
- public void reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet) throws org.apache.thrift.TException;
+ public void reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet) throws org.apache.thrift.TException;
- public List<String> getActiveTservers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public java.util.List<java.lang.String> getActiveTservers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
public org.apache.accumulo.core.security.thrift.TDelegationToken getDelegationToken(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.security.thrift.TDelegationTokenConfig cfg) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public boolean drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, Set<String> logsToWatch) throws org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public boolean drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.util.Set<java.lang.String> logsToWatch) throws org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
}
public interface AsyncIface extends FateService .AsyncIface {
- public void initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
- public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, ByteBuffer startRow, ByteBuffer endRow, long flushID, long maxLoops, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setMasterGoalState(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, MasterGoalState state, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setMasterGoalState(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, MasterGoalState state, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void shutdown(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, boolean stopTabletServers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void shutdown(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, boolean stopTabletServers, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tabletServer, boolean force, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getMasterStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getMasterStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<MasterMonitorInfo> resultHandler) throws org.apache.thrift.TException;
- public void waitForBalance(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void waitForBalance(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletSplit split, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String serverName, TabletSplit split, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getActiveTservers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getActiveTservers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void getDelegationToken(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.security.thrift.TDelegationTokenConfig cfg, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getDelegationToken(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.security.thrift.TDelegationTokenConfig cfg, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.security.thrift.TDelegationToken> resultHandler) throws org.apache.thrift.TException;
- public void drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, Set<String> logsToWatch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.util.Set<java.lang.String> logsToWatch, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
}
@@ -153,13 +126,13 @@ public class MasterClientService {
super(iprot, oprot);
}
- public long initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public long initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_initiateFlush(tinfo, credentials, tableName);
return recv_initiateFlush();
}
- public void send_initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName) throws org.apache.thrift.TException
+ public void send_initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName) throws org.apache.thrift.TException
{
initiateFlush_args args = new initiateFlush_args();
args.setTinfo(tinfo);
@@ -187,13 +160,13 @@ public class MasterClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initiateFlush failed: unknown result");
}
- public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, ByteBuffer startRow, ByteBuffer endRow, long flushID, long maxLoops) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_waitForFlush(tinfo, credentials, tableName, startRow, endRow, flushID, maxLoops);
recv_waitForFlush();
}
- public void send_waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, ByteBuffer startRow, ByteBuffer endRow, long flushID, long maxLoops) throws org.apache.thrift.TException
+ public void send_waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops) throws org.apache.thrift.TException
{
waitForFlush_args args = new waitForFlush_args();
args.setTinfo(tinfo);
@@ -222,13 +195,13 @@ public class MasterClientService {
return;
}
- public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_setTableProperty(tinfo, credentials, tableName, property, value);
recv_setTableProperty();
}
- public void send_setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, String value) throws org.apache.thrift.TException
+ public void send_setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value) throws org.apache.thrift.TException
{
setTableProperty_args args = new setTableProperty_args();
args.setTinfo(tinfo);
@@ -255,13 +228,13 @@ public class MasterClientService {
return;
}
- public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_removeTableProperty(tinfo, credentials, tableName, property);
recv_removeTableProperty();
}
- public void send_removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property) throws org.apache.thrift.TException
+ public void send_removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property) throws org.apache.thrift.TException
{
removeTableProperty_args args = new removeTableProperty_args();
args.setTinfo(tinfo);
@@ -287,13 +260,13 @@ public class MasterClientService {
return;
}
- public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_setNamespaceProperty(tinfo, credentials, ns, property, value);
recv_setNamespaceProperty();
}
- public void send_setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, String value) throws org.apache.thrift.TException
+ public void send_setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value) throws org.apache.thrift.TException
{
setNamespaceProperty_args args = new setNamespaceProperty_args();
args.setTinfo(tinfo);
@@ -320,13 +293,13 @@ public class MasterClientService {
return;
}
- public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_removeNamespaceProperty(tinfo, credentials, ns, property);
recv_removeNamespaceProperty();
}
- public void send_removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property) throws org.apache.thrift.TException
+ public void send_removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property) throws org.apache.thrift.TException
{
removeNamespaceProperty_args args = new removeNamespaceProperty_args();
args.setTinfo(tinfo);
@@ -408,13 +381,13 @@ public class MasterClientService {
return;
}
- public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tabletServer, boolean force) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_shutdownTabletServer(tinfo, credentials, tabletServer, force);
recv_shutdownTabletServer();
}
- public void send_shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tabletServer, boolean force) throws org.apache.thrift.TException
+ public void send_shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force) throws org.apache.thrift.TException
{
shutdownTabletServer_args args = new shutdownTabletServer_args();
args.setTinfo(tinfo);
@@ -437,13 +410,13 @@ public class MasterClientService {
return;
}
- public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, java.lang.String value) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_setSystemProperty(tinfo, credentials, property, value);
recv_setSystemProperty();
}
- public void send_setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, String value) throws org.apache.thrift.TException
+ public void send_setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, java.lang.String value) throws org.apache.thrift.TException
{
setSystemProperty_args args = new setSystemProperty_args();
args.setTinfo(tinfo);
@@ -466,13 +439,13 @@ public class MasterClientService {
return;
}
- public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_removeSystemProperty(tinfo, credentials, property);
recv_removeSystemProperty();
}
- public void send_removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property) throws org.apache.thrift.TException
+ public void send_removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property) throws org.apache.thrift.TException
{
removeSystemProperty_args args = new removeSystemProperty_args();
args.setTinfo(tinfo);
@@ -547,12 +520,12 @@ public class MasterClientService {
return;
}
- public void reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletSplit split) throws org.apache.thrift.TException
+ public void reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String serverName, TabletSplit split) throws org.apache.thrift.TException
{
send_reportSplitExtent(tinfo, credentials, serverName, split);
}
- public void send_reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletSplit split) throws org.apache.thrift.TException
+ public void send_reportSplitExtent(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String serverName, TabletSplit split) throws org.apache.thrift.TException
{
reportSplitExtent_args args = new reportSplitExtent_args();
args.setTinfo(tinfo);
@@ -562,12 +535,12 @@ public class MasterClientService {
sendBaseOneway("reportSplitExtent", args);
}
- public void reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet) throws org.apache.thrift.TException
+ public void reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet) throws org.apache.thrift.TException
{
send_reportTabletStatus(tinfo, credentials, serverName, status, tablet);
}
- public void send_reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet) throws org.apache.thrift.TException
+ public void send_reportTabletStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String serverName, TabletLoadState status, org.apache.accumulo.core.data.thrift.TKeyExtent tablet) throws org.apache.thrift.TException
{
reportTabletStatus_args args = new reportTabletStatus_args();
args.setTinfo(tinfo);
@@ -578,7 +551,7 @@ public class MasterClientService {
sendBaseOneway("reportTabletStatus", args);
}
- public List<String> getActiveTservers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public java.util.List<java.lang.String> getActiveTservers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_getActiveTservers(tinfo, credentials);
return recv_getActiveTservers();
@@ -592,7 +565,7 @@ public class MasterClientService {
sendBase("getActiveTservers", args);
}
- public List<String> recv_getActiveTservers() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public java.util.List<java.lang.String> recv_getActiveTservers() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
getActiveTservers_result result = new getActiveTservers_result();
receiveBase(result, "getActiveTservers");
@@ -639,13 +612,13 @@ public class MasterClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDelegationToken failed: unknown result");
}
- public boolean drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, Set<String> logsToWatch) throws org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public boolean drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.util.Set<java.lang.String> logsToWatch) throws org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_drainReplicationTable(tfino, credentials, tableName, logsToWatch);
return recv_drainReplicationTable();
}
- public void send_drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, Set<String> logsToWatch) throws org.apache.thrift.TException
+ public void send_drainReplicationTable(org.apache.accumulo.core.trace.thrift.TInfo tfino, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.util.Set<java.lang.String> logsToWatch) throws org.apache.thrift.TException
{
drainReplicationTable_args args = new drainReplicationTable_args();
args.setTfino(tfino);
@@ -686,18 +659,18 @@ public class MasterClientService {
super(protocolFactory, clientManager, transport);
}
- public void initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void initiateFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
initiateFlush_call method_call = new initiateFlush_call(tinfo, credentials, tableName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class initiateFlush_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class initiateFlush_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String tableName;
- public initiateFlush_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String tableName;
+ public initiateFlush_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.tinfo = tinfo;
this.credentials = credentials;
@@ -714,9 +687,9 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public long getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public java.lang.Long getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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);
@@ -724,22 +697,22 @@ public class MasterClientService {
}
}
- public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, ByteBuffer startRow, ByteBuffer endRow, long flushID, long maxLoops, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void waitForFlush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
waitForFlush_call method_call = new waitForFlush_call(tinfo, credentials, tableName, startRow, endRow, flushID, maxLoops, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class waitForFlush_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class waitForFlush_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String tableName;
- private ByteBuffer startRow;
- private ByteBuffer endRow;
+ private java.lang.String tableName;
+ private java.nio.ByteBuffer startRow;
+ private java.nio.ByteBuffer endRow;
private long flushID;
private long maxLoops;
- public waitForFlush_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, ByteBuffer startRow, ByteBuffer endRow, long flushID, long maxLoops, 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 waitForFlush_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, long flushID, long maxLoops, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -764,30 +737,30 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_waitForFlush();
+ return null;
}
}
- public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void setTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setTableProperty_call method_call = new setTableProperty_call(tinfo, credentials, tableName, property, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setTableProperty_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class setTableProperty_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String tableName;
- private String property;
- private String value;
- public setTableProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String tableName;
+ private java.lang.String property;
+ private java.lang.String value;
+ public setTableProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, java.lang.String value, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -808,29 +781,29 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_setTableProperty();
+ return null;
}
}
- public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void removeTableProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
removeTableProperty_call method_call = new removeTableProperty_call(tinfo, credentials, tableName, property, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class removeTableProperty_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class removeTableProperty_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String tableName;
- private String property;
- public removeTableProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String tableName;
+ private java.lang.String property;
+ public removeTableProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, java.lang.String property, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -849,30 +822,30 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_removeTableProperty();
+ return null;
}
}
- public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void setNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setNamespaceProperty_call method_call = new setNamespaceProperty_call(tinfo, credentials, ns, property, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setNamespaceProperty_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class setNamespaceProperty_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String ns;
- private String property;
- private String value;
- public setNamespaceProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String ns;
+ private java.lang.String property;
+ private java.lang.String value;
+ public setNamespaceProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, java.lang.String value, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -893,29 +866,29 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_setNamespaceProperty();
+ return null;
}
}
- public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void removeNamespaceProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
removeNamespaceProperty_call method_call = new removeNamespaceProperty_call(tinfo, credentials, ns, property, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class removeNamespaceProperty_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class removeNamespaceProperty_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String ns;
- private String property;
- public removeNamespaceProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String ns;
+ private java.lang.String property;
+ public removeNamespaceProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, java.lang.String property, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -934,28 +907,28 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_removeNamespaceProperty();
+ return null;
}
}
- public void setMasterGoalState(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, MasterGoalState state, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void setMasterGoalState(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, MasterGoalState state, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setMasterGoalState_call method_call = new setMasterGoalState_call(tinfo, credentials, state, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setMasterGoalState_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class setMasterGoalState_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
private MasterGoalState state;
- public setMasterGoalState_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, MasterGoalState state, 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 setMasterGoalState_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, MasterGoalState state, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -972,28 +945,28 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_setMasterGoalState();
+ return null;
}
}
- public void shutdown(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, boolean stopTabletServers, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void shutdown(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, boolean stopTabletServers, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
shutdown_call method_call = new shutdown_call(tinfo, credentials, stopTabletServers, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class shutdown_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class shutdown_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
private boolean stopTabletServers;
- public shutdown_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, boolean stopTabletServers, 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 shutdown_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, boolean stopTabletServers, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -1010,29 +983,29 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_shutdown();
+ return null;
}
}
- public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tabletServer, boolean force, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void shutdownTabletServer(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
shutdownTabletServer_call method_call = new shutdownTabletServer_call(tinfo, credentials, tabletServer, force, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class shutdownTabletServer_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class shutdownTabletServer_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String tabletServer;
+ private java.lang.String tabletServer;
private boolean force;
- public shutdownTabletServer_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tabletServer, boolean force, 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 shutdownTabletServer_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tabletServer, boolean force, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -1051,29 +1024,29 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_shutdownTabletServer();
+ return null;
}
}
- public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void setSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setSystemProperty_call method_call = new setSystemProperty_call(tinfo, credentials, property, value, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setSystemProperty_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class setSystemProperty_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String property;
- private String value;
- public setSystemProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String property;
+ private java.lang.String value;
+ public setSystemProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, java.lang.String value, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -1092,28 +1065,28 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_setSystemProperty();
+ return null;
}
}
- public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void removeSystemProperty(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
removeSystemProperty_call method_call = new removeSystemProperty_call(tinfo, credentials, property, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class removeSystemProperty_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class removeSystemProperty_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private String property;
- public removeSystemProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String property;
+ public removeSystemProperty_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String property, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -1130,27 +1103,27 @@ public class MasterClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_removeSystemProperty();
+ return null;
}
}
- public void getMasterStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getMasterStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<MasterMonitorInfo> resultHandler) throws org.apache.thrift.TException {
checkReady();
getMasterStats_call method_call = new getMasterStats_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getMasterStats_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class getMasterStats_call extends org.apache.thrift.async.TAsyncMethodCall<MasterMonitorInfo> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public getMasterStats_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, 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 getMasterStats_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<MasterMonitorInfo> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.tinfo = tinfo;
this.credentials = credentials;
@@ -1167,7 +1140,7 @@ public class MasterClientService {
public MasterMonitorInfo getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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);
@@ -1175,16 +1148,16 @@ public class MasterClientService {
}
}
- public void waitForBalance(org.apache.accumulo.core.trace.t
<TRUNCATED>
[06/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/python/AccumuloProxy-remote
----------------------------------------------------------------------
diff --git a/proxy/src/main/python/AccumuloProxy-remote b/proxy/src/main/python/AccumuloProxy-remote
index bc08e9b..a98dd67 100644
--- a/proxy/src/main/python/AccumuloProxy-remote
+++ b/proxy/src/main/python/AccumuloProxy-remote
@@ -14,7 +14,7 @@
# limitations under the License.
#!/usr/bin/env python
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
@@ -23,779 +23,802 @@
import sys
import pprint
-from urlparse import urlparse
-from thrift.transport import TTransport
-from thrift.transport import TSocket
-from thrift.transport import TSSLSocket
-from thrift.transport import THttpClient
-from thrift.protocol import TBinaryProtocol
+if sys.version_info[0] > 2:
+ from urllib.parse import urlparse
+else:
+ from urlparse import urlparse
+from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+from thrift.protocol.TBinaryProtocol import TBinaryProtocol
from accumulo import AccumuloProxy
from accumulo.ttypes import *
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
- print('')
- print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]')
- print('')
- print('Functions:')
- print(' string login(string principal, loginProperties)')
- print(' i32 addConstraint(string login, string tableName, string constraintClassName)')
- print(' void addSplits(string login, string tableName, splits)')
- print(' void attachIterator(string login, string tableName, IteratorSetting setting, scopes)')
- print(' void checkIteratorConflicts(string login, string tableName, IteratorSetting setting, scopes)')
- print(' void clearLocatorCache(string login, string tableName)')
- print(' void cloneTable(string login, string tableName, string newTableName, bool flush, propertiesToSet, propertiesToExclude)')
- print(' void compactTable(string login, string tableName, string startRow, string endRow, iterators, bool flush, bool wait, CompactionStrategyConfig compactionStrategy)')
- print(' void cancelCompaction(string login, string tableName)')
- print(' void createTable(string login, string tableName, bool versioningIter, TimeType type)')
- print(' void deleteTable(string login, string tableName)')
- print(' void deleteRows(string login, string tableName, string startRow, string endRow)')
- print(' void exportTable(string login, string tableName, string exportDir)')
- print(' void flushTable(string login, string tableName, string startRow, string endRow, bool wait)')
- print(' getDiskUsage(string login, tables)')
- print(' getLocalityGroups(string login, string tableName)')
- print(' IteratorSetting getIteratorSetting(string login, string tableName, string iteratorName, IteratorScope scope)')
- print(' string getMaxRow(string login, string tableName, auths, string startRow, bool startInclusive, string endRow, bool endInclusive)')
- print(' getTableProperties(string login, string tableName)')
- print(' void importDirectory(string login, string tableName, string importDir, string failureDir, bool setTime)')
- print(' void importTable(string login, string tableName, string importDir)')
- print(' listSplits(string login, string tableName, i32 maxSplits)')
- print(' listTables(string login)')
- print(' listIterators(string login, string tableName)')
- print(' listConstraints(string login, string tableName)')
- print(' void mergeTablets(string login, string tableName, string startRow, string endRow)')
- print(' void offlineTable(string login, string tableName, bool wait)')
- print(' void onlineTable(string login, string tableName, bool wait)')
- print(' void removeConstraint(string login, string tableName, i32 constraint)')
- print(' void removeIterator(string login, string tableName, string iterName, scopes)')
- print(' void removeTableProperty(string login, string tableName, string property)')
- print(' void renameTable(string login, string oldTableName, string newTableName)')
- print(' void setLocalityGroups(string login, string tableName, groups)')
- print(' void setTableProperty(string login, string tableName, string property, string value)')
- print(' splitRangeByTablets(string login, string tableName, Range range, i32 maxSplits)')
- print(' bool tableExists(string login, string tableName)')
- print(' tableIdMap(string login)')
- print(' bool testTableClassLoad(string login, string tableName, string className, string asTypeName)')
- print(' void pingTabletServer(string login, string tserver)')
- print(' getActiveScans(string login, string tserver)')
- print(' getActiveCompactions(string login, string tserver)')
- print(' getSiteConfiguration(string login)')
- print(' getSystemConfiguration(string login)')
- print(' getTabletServers(string login)')
- print(' void removeProperty(string login, string property)')
- print(' void setProperty(string login, string property, string value)')
- print(' bool testClassLoad(string login, string className, string asTypeName)')
- print(' bool authenticateUser(string login, string user, properties)')
- print(' void changeUserAuthorizations(string login, string user, authorizations)')
- print(' void changeLocalUserPassword(string login, string user, string password)')
- print(' void createLocalUser(string login, string user, string password)')
- print(' void dropLocalUser(string login, string user)')
- print(' getUserAuthorizations(string login, string user)')
- print(' void grantSystemPermission(string login, string user, SystemPermission perm)')
- print(' void grantTablePermission(string login, string user, string table, TablePermission perm)')
- print(' bool hasSystemPermission(string login, string user, SystemPermission perm)')
- print(' bool hasTablePermission(string login, string user, string table, TablePermission perm)')
- print(' listLocalUsers(string login)')
- print(' void revokeSystemPermission(string login, string user, SystemPermission perm)')
- print(' void revokeTablePermission(string login, string user, string table, TablePermission perm)')
- print(' void grantNamespacePermission(string login, string user, string namespaceName, NamespacePermission perm)')
- print(' bool hasNamespacePermission(string login, string user, string namespaceName, NamespacePermission perm)')
- print(' void revokeNamespacePermission(string login, string user, string namespaceName, NamespacePermission perm)')
- print(' string createBatchScanner(string login, string tableName, BatchScanOptions options)')
- print(' string createScanner(string login, string tableName, ScanOptions options)')
- print(' bool hasNext(string scanner)')
- print(' KeyValueAndPeek nextEntry(string scanner)')
- print(' ScanResult nextK(string scanner, i32 k)')
- print(' void closeScanner(string scanner)')
- print(' void updateAndFlush(string login, string tableName, cells)')
- print(' string createWriter(string login, string tableName, WriterOptions opts)')
- print(' void update(string writer, cells)')
- print(' void flush(string writer)')
- print(' void closeWriter(string writer)')
- print(' ConditionalStatus updateRowConditionally(string login, string tableName, string row, ConditionalUpdates updates)')
- print(' string createConditionalWriter(string login, string tableName, ConditionalWriterOptions options)')
- print(' updateRowsConditionally(string conditionalWriter, updates)')
- print(' void closeConditionalWriter(string conditionalWriter)')
- print(' Range getRowRange(string row)')
- print(' Key getFollowing(Key key, PartialKey part)')
- print(' string systemNamespace()')
- print(' string defaultNamespace()')
- print(' listNamespaces(string login)')
- print(' bool namespaceExists(string login, string namespaceName)')
- print(' void createNamespace(string login, string namespaceName)')
- print(' void deleteNamespace(string login, string namespaceName)')
- print(' void renameNamespace(string login, string oldNamespaceName, string newNamespaceName)')
- print(' void setNamespaceProperty(string login, string namespaceName, string property, string value)')
- print(' void removeNamespaceProperty(string login, string namespaceName, string property)')
- print(' getNamespaceProperties(string login, string namespaceName)')
- print(' namespaceIdMap(string login)')
- print(' void attachNamespaceIterator(string login, string namespaceName, IteratorSetting setting, scopes)')
- print(' void removeNamespaceIterator(string login, string namespaceName, string name, scopes)')
- print(' IteratorSetting getNamespaceIteratorSetting(string login, string namespaceName, string name, IteratorScope scope)')
- print(' listNamespaceIterators(string login, string namespaceName)')
- print(' void checkNamespaceIteratorConflicts(string login, string namespaceName, IteratorSetting setting, scopes)')
- print(' i32 addNamespaceConstraint(string login, string namespaceName, string constraintClassName)')
- print(' void removeNamespaceConstraint(string login, string namespaceName, i32 id)')
- print(' listNamespaceConstraints(string login, string namespaceName)')
- print(' bool testNamespaceClassLoad(string login, string namespaceName, string className, string asTypeName)')
- print('')
- sys.exit(0)
-
-pp = pprint.PrettyPrinter(indent = 2)
+ print('')
+ print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]')
+ print('')
+ print('Functions:')
+ print(' string login(string principal, loginProperties)')
+ print(' i32 addConstraint(string login, string tableName, string constraintClassName)')
+ print(' void addSplits(string login, string tableName, splits)')
+ print(' void attachIterator(string login, string tableName, IteratorSetting setting, scopes)')
+ print(' void checkIteratorConflicts(string login, string tableName, IteratorSetting setting, scopes)')
+ print(' void clearLocatorCache(string login, string tableName)')
+ print(' void cloneTable(string login, string tableName, string newTableName, bool flush, propertiesToSet, propertiesToExclude)')
+ print(' void compactTable(string login, string tableName, string startRow, string endRow, iterators, bool flush, bool wait, CompactionStrategyConfig compactionStrategy)')
+ print(' void cancelCompaction(string login, string tableName)')
+ print(' void createTable(string login, string tableName, bool versioningIter, TimeType type)')
+ print(' void deleteTable(string login, string tableName)')
+ print(' void deleteRows(string login, string tableName, string startRow, string endRow)')
+ print(' void exportTable(string login, string tableName, string exportDir)')
+ print(' void flushTable(string login, string tableName, string startRow, string endRow, bool wait)')
+ print(' getDiskUsage(string login, tables)')
+ print(' getLocalityGroups(string login, string tableName)')
+ print(' IteratorSetting getIteratorSetting(string login, string tableName, string iteratorName, IteratorScope scope)')
+ print(' string getMaxRow(string login, string tableName, auths, string startRow, bool startInclusive, string endRow, bool endInclusive)')
+ print(' getTableProperties(string login, string tableName)')
+ print(' void importDirectory(string login, string tableName, string importDir, string failureDir, bool setTime)')
+ print(' void importTable(string login, string tableName, string importDir)')
+ print(' listSplits(string login, string tableName, i32 maxSplits)')
+ print(' listTables(string login)')
+ print(' listIterators(string login, string tableName)')
+ print(' listConstraints(string login, string tableName)')
+ print(' void mergeTablets(string login, string tableName, string startRow, string endRow)')
+ print(' void offlineTable(string login, string tableName, bool wait)')
+ print(' void onlineTable(string login, string tableName, bool wait)')
+ print(' void removeConstraint(string login, string tableName, i32 constraint)')
+ print(' void removeIterator(string login, string tableName, string iterName, scopes)')
+ print(' void removeTableProperty(string login, string tableName, string property)')
+ print(' void renameTable(string login, string oldTableName, string newTableName)')
+ print(' void setLocalityGroups(string login, string tableName, groups)')
+ print(' void setTableProperty(string login, string tableName, string property, string value)')
+ print(' splitRangeByTablets(string login, string tableName, Range range, i32 maxSplits)')
+ print(' bool tableExists(string login, string tableName)')
+ print(' tableIdMap(string login)')
+ print(' bool testTableClassLoad(string login, string tableName, string className, string asTypeName)')
+ print(' void pingTabletServer(string login, string tserver)')
+ print(' getActiveScans(string login, string tserver)')
+ print(' getActiveCompactions(string login, string tserver)')
+ print(' getSiteConfiguration(string login)')
+ print(' getSystemConfiguration(string login)')
+ print(' getTabletServers(string login)')
+ print(' void removeProperty(string login, string property)')
+ print(' void setProperty(string login, string property, string value)')
+ print(' bool testClassLoad(string login, string className, string asTypeName)')
+ print(' bool authenticateUser(string login, string user, properties)')
+ print(' void changeUserAuthorizations(string login, string user, authorizations)')
+ print(' void changeLocalUserPassword(string login, string user, string password)')
+ print(' void createLocalUser(string login, string user, string password)')
+ print(' void dropLocalUser(string login, string user)')
+ print(' getUserAuthorizations(string login, string user)')
+ print(' void grantSystemPermission(string login, string user, SystemPermission perm)')
+ print(' void grantTablePermission(string login, string user, string table, TablePermission perm)')
+ print(' bool hasSystemPermission(string login, string user, SystemPermission perm)')
+ print(' bool hasTablePermission(string login, string user, string table, TablePermission perm)')
+ print(' listLocalUsers(string login)')
+ print(' void revokeSystemPermission(string login, string user, SystemPermission perm)')
+ print(' void revokeTablePermission(string login, string user, string table, TablePermission perm)')
+ print(' void grantNamespacePermission(string login, string user, string namespaceName, NamespacePermission perm)')
+ print(' bool hasNamespacePermission(string login, string user, string namespaceName, NamespacePermission perm)')
+ print(' void revokeNamespacePermission(string login, string user, string namespaceName, NamespacePermission perm)')
+ print(' string createBatchScanner(string login, string tableName, BatchScanOptions options)')
+ print(' string createScanner(string login, string tableName, ScanOptions options)')
+ print(' bool hasNext(string scanner)')
+ print(' KeyValueAndPeek nextEntry(string scanner)')
+ print(' ScanResult nextK(string scanner, i32 k)')
+ print(' void closeScanner(string scanner)')
+ print(' void updateAndFlush(string login, string tableName, cells)')
+ print(' string createWriter(string login, string tableName, WriterOptions opts)')
+ print(' void update(string writer, cells)')
+ print(' void flush(string writer)')
+ print(' void closeWriter(string writer)')
+ print(' ConditionalStatus updateRowConditionally(string login, string tableName, string row, ConditionalUpdates updates)')
+ print(' string createConditionalWriter(string login, string tableName, ConditionalWriterOptions options)')
+ print(' updateRowsConditionally(string conditionalWriter, updates)')
+ print(' void closeConditionalWriter(string conditionalWriter)')
+ print(' Range getRowRange(string row)')
+ print(' Key getFollowing(Key key, PartialKey part)')
+ print(' string systemNamespace()')
+ print(' string defaultNamespace()')
+ print(' listNamespaces(string login)')
+ print(' bool namespaceExists(string login, string namespaceName)')
+ print(' void createNamespace(string login, string namespaceName)')
+ print(' void deleteNamespace(string login, string namespaceName)')
+ print(' void renameNamespace(string login, string oldNamespaceName, string newNamespaceName)')
+ print(' void setNamespaceProperty(string login, string namespaceName, string property, string value)')
+ print(' void removeNamespaceProperty(string login, string namespaceName, string property)')
+ print(' getNamespaceProperties(string login, string namespaceName)')
+ print(' namespaceIdMap(string login)')
+ print(' void attachNamespaceIterator(string login, string namespaceName, IteratorSetting setting, scopes)')
+ print(' void removeNamespaceIterator(string login, string namespaceName, string name, scopes)')
+ print(' IteratorSetting getNamespaceIteratorSetting(string login, string namespaceName, string name, IteratorScope scope)')
+ print(' listNamespaceIterators(string login, string namespaceName)')
+ print(' void checkNamespaceIteratorConflicts(string login, string namespaceName, IteratorSetting setting, scopes)')
+ print(' i32 addNamespaceConstraint(string login, string namespaceName, string constraintClassName)')
+ print(' void removeNamespaceConstraint(string login, string namespaceName, i32 id)')
+ print(' listNamespaceConstraints(string login, string namespaceName)')
+ print(' bool testNamespaceClassLoad(string login, string namespaceName, string className, string asTypeName)')
+ print('')
+ sys.exit(0)
+
+pp = pprint.PrettyPrinter(indent=2)
host = 'localhost'
port = 9090
uri = ''
framed = False
ssl = False
+validate = True
+ca_certs = None
+keyfile = None
+certfile = None
http = False
argi = 1
if sys.argv[argi] == '-h':
- parts = sys.argv[argi+1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- argi += 2
+ parts = sys.argv[argi + 1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ argi += 2
if sys.argv[argi] == '-u':
- url = urlparse(sys.argv[argi+1])
- parts = url[1].split(':')
- host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- else:
- port = 80
- uri = url[2]
- if url[4]:
- uri += '?%s' % url[4]
- http = True
- argi += 2
+ url = urlparse(sys.argv[argi + 1])
+ parts = url[1].split(':')
+ host = parts[0]
+ if len(parts) > 1:
+ port = int(parts[1])
+ else:
+ port = 80
+ uri = url[2]
+ if url[4]:
+ uri += '?%s' % url[4]
+ http = True
+ argi += 2
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
- framed = True
- argi += 1
+ framed = True
+ argi += 1
if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl':
- ssl = True
- argi += 1
+ ssl = True
+ argi += 1
+
+if sys.argv[argi] == '-novalidate':
+ validate = False
+ argi += 1
+
+if sys.argv[argi] == '-ca_certs':
+ ca_certs = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-keyfile':
+ keyfile = sys.argv[argi+1]
+ argi += 2
+
+if sys.argv[argi] == '-certfile':
+ certfile = sys.argv[argi+1]
+ argi += 2
cmd = sys.argv[argi]
-args = sys.argv[argi+1:]
+args = sys.argv[argi + 1:]
if http:
- transport = THttpClient.THttpClient(host, port, uri)
+ transport = THttpClient.THttpClient(host, port, uri)
else:
- socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port)
- if framed:
- transport = TTransport.TFramedTransport(socket)
- else:
- transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol(transport)
+ if ssl:
+ socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile)
+ else:
+ socket = TSocket.TSocket(host, port)
+ if framed:
+ transport = TTransport.TFramedTransport(socket)
+ else:
+ transport = TTransport.TBufferedTransport(socket)
+protocol = TBinaryProtocol(transport)
client = AccumuloProxy.Client(protocol)
transport.open()
if cmd == 'login':
- if len(args) != 2:
- print('login requires 2 args')
- sys.exit(1)
- pp.pprint(client.login(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('login requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.login(args[0], eval(args[1]),))
elif cmd == 'addConstraint':
- if len(args) != 3:
- print('addConstraint requires 3 args')
- sys.exit(1)
- pp.pprint(client.addConstraint(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('addConstraint requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.addConstraint(args[0], args[1], args[2],))
elif cmd == 'addSplits':
- if len(args) != 3:
- print('addSplits requires 3 args')
- sys.exit(1)
- pp.pprint(client.addSplits(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('addSplits requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.addSplits(args[0], args[1], eval(args[2]),))
elif cmd == 'attachIterator':
- if len(args) != 4:
- print('attachIterator requires 4 args')
- sys.exit(1)
- pp.pprint(client.attachIterator(args[0],args[1],eval(args[2]),eval(args[3]),))
+ if len(args) != 4:
+ print('attachIterator requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.attachIterator(args[0], args[1], eval(args[2]), eval(args[3]),))
elif cmd == 'checkIteratorConflicts':
- if len(args) != 4:
- print('checkIteratorConflicts requires 4 args')
- sys.exit(1)
- pp.pprint(client.checkIteratorConflicts(args[0],args[1],eval(args[2]),eval(args[3]),))
+ if len(args) != 4:
+ print('checkIteratorConflicts requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.checkIteratorConflicts(args[0], args[1], eval(args[2]), eval(args[3]),))
elif cmd == 'clearLocatorCache':
- if len(args) != 2:
- print('clearLocatorCache requires 2 args')
- sys.exit(1)
- pp.pprint(client.clearLocatorCache(args[0],args[1],))
+ if len(args) != 2:
+ print('clearLocatorCache requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.clearLocatorCache(args[0], args[1],))
elif cmd == 'cloneTable':
- if len(args) != 6:
- print('cloneTable requires 6 args')
- sys.exit(1)
- pp.pprint(client.cloneTable(args[0],args[1],args[2],eval(args[3]),eval(args[4]),eval(args[5]),))
+ if len(args) != 6:
+ print('cloneTable requires 6 args')
+ sys.exit(1)
+ pp.pprint(client.cloneTable(args[0], args[1], args[2], eval(args[3]), eval(args[4]), eval(args[5]),))
elif cmd == 'compactTable':
- if len(args) != 8:
- print('compactTable requires 8 args')
- sys.exit(1)
- pp.pprint(client.compactTable(args[0],args[1],args[2],args[3],eval(args[4]),eval(args[5]),eval(args[6]),eval(args[7]),))
+ if len(args) != 8:
+ print('compactTable requires 8 args')
+ sys.exit(1)
+ pp.pprint(client.compactTable(args[0], args[1], args[2], args[3], eval(args[4]), eval(args[5]), eval(args[6]), eval(args[7]),))
elif cmd == 'cancelCompaction':
- if len(args) != 2:
- print('cancelCompaction requires 2 args')
- sys.exit(1)
- pp.pprint(client.cancelCompaction(args[0],args[1],))
+ if len(args) != 2:
+ print('cancelCompaction requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.cancelCompaction(args[0], args[1],))
elif cmd == 'createTable':
- if len(args) != 4:
- print('createTable requires 4 args')
- sys.exit(1)
- pp.pprint(client.createTable(args[0],args[1],eval(args[2]),eval(args[3]),))
+ if len(args) != 4:
+ print('createTable requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.createTable(args[0], args[1], eval(args[2]), eval(args[3]),))
elif cmd == 'deleteTable':
- if len(args) != 2:
- print('deleteTable requires 2 args')
- sys.exit(1)
- pp.pprint(client.deleteTable(args[0],args[1],))
+ if len(args) != 2:
+ print('deleteTable requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.deleteTable(args[0], args[1],))
elif cmd == 'deleteRows':
- if len(args) != 4:
- print('deleteRows requires 4 args')
- sys.exit(1)
- pp.pprint(client.deleteRows(args[0],args[1],args[2],args[3],))
+ if len(args) != 4:
+ print('deleteRows requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.deleteRows(args[0], args[1], args[2], args[3],))
elif cmd == 'exportTable':
- if len(args) != 3:
- print('exportTable requires 3 args')
- sys.exit(1)
- pp.pprint(client.exportTable(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('exportTable requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.exportTable(args[0], args[1], args[2],))
elif cmd == 'flushTable':
- if len(args) != 5:
- print('flushTable requires 5 args')
- sys.exit(1)
- pp.pprint(client.flushTable(args[0],args[1],args[2],args[3],eval(args[4]),))
+ if len(args) != 5:
+ print('flushTable requires 5 args')
+ sys.exit(1)
+ pp.pprint(client.flushTable(args[0], args[1], args[2], args[3], eval(args[4]),))
elif cmd == 'getDiskUsage':
- if len(args) != 2:
- print('getDiskUsage requires 2 args')
- sys.exit(1)
- pp.pprint(client.getDiskUsage(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('getDiskUsage requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getDiskUsage(args[0], eval(args[1]),))
elif cmd == 'getLocalityGroups':
- if len(args) != 2:
- print('getLocalityGroups requires 2 args')
- sys.exit(1)
- pp.pprint(client.getLocalityGroups(args[0],args[1],))
+ if len(args) != 2:
+ print('getLocalityGroups requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getLocalityGroups(args[0], args[1],))
elif cmd == 'getIteratorSetting':
- if len(args) != 4:
- print('getIteratorSetting requires 4 args')
- sys.exit(1)
- pp.pprint(client.getIteratorSetting(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('getIteratorSetting requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.getIteratorSetting(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'getMaxRow':
- if len(args) != 7:
- print('getMaxRow requires 7 args')
- sys.exit(1)
- pp.pprint(client.getMaxRow(args[0],args[1],eval(args[2]),args[3],eval(args[4]),args[5],eval(args[6]),))
+ if len(args) != 7:
+ print('getMaxRow requires 7 args')
+ sys.exit(1)
+ pp.pprint(client.getMaxRow(args[0], args[1], eval(args[2]), args[3], eval(args[4]), args[5], eval(args[6]),))
elif cmd == 'getTableProperties':
- if len(args) != 2:
- print('getTableProperties requires 2 args')
- sys.exit(1)
- pp.pprint(client.getTableProperties(args[0],args[1],))
+ if len(args) != 2:
+ print('getTableProperties requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getTableProperties(args[0], args[1],))
elif cmd == 'importDirectory':
- if len(args) != 5:
- print('importDirectory requires 5 args')
- sys.exit(1)
- pp.pprint(client.importDirectory(args[0],args[1],args[2],args[3],eval(args[4]),))
+ if len(args) != 5:
+ print('importDirectory requires 5 args')
+ sys.exit(1)
+ pp.pprint(client.importDirectory(args[0], args[1], args[2], args[3], eval(args[4]),))
elif cmd == 'importTable':
- if len(args) != 3:
- print('importTable requires 3 args')
- sys.exit(1)
- pp.pprint(client.importTable(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('importTable requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.importTable(args[0], args[1], args[2],))
elif cmd == 'listSplits':
- if len(args) != 3:
- print('listSplits requires 3 args')
- sys.exit(1)
- pp.pprint(client.listSplits(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('listSplits requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.listSplits(args[0], args[1], eval(args[2]),))
elif cmd == 'listTables':
- if len(args) != 1:
- print('listTables requires 1 args')
- sys.exit(1)
- pp.pprint(client.listTables(args[0],))
+ if len(args) != 1:
+ print('listTables requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.listTables(args[0],))
elif cmd == 'listIterators':
- if len(args) != 2:
- print('listIterators requires 2 args')
- sys.exit(1)
- pp.pprint(client.listIterators(args[0],args[1],))
+ if len(args) != 2:
+ print('listIterators requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.listIterators(args[0], args[1],))
elif cmd == 'listConstraints':
- if len(args) != 2:
- print('listConstraints requires 2 args')
- sys.exit(1)
- pp.pprint(client.listConstraints(args[0],args[1],))
+ if len(args) != 2:
+ print('listConstraints requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.listConstraints(args[0], args[1],))
elif cmd == 'mergeTablets':
- if len(args) != 4:
- print('mergeTablets requires 4 args')
- sys.exit(1)
- pp.pprint(client.mergeTablets(args[0],args[1],args[2],args[3],))
+ if len(args) != 4:
+ print('mergeTablets requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.mergeTablets(args[0], args[1], args[2], args[3],))
elif cmd == 'offlineTable':
- if len(args) != 3:
- print('offlineTable requires 3 args')
- sys.exit(1)
- pp.pprint(client.offlineTable(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('offlineTable requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.offlineTable(args[0], args[1], eval(args[2]),))
elif cmd == 'onlineTable':
- if len(args) != 3:
- print('onlineTable requires 3 args')
- sys.exit(1)
- pp.pprint(client.onlineTable(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('onlineTable requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.onlineTable(args[0], args[1], eval(args[2]),))
elif cmd == 'removeConstraint':
- if len(args) != 3:
- print('removeConstraint requires 3 args')
- sys.exit(1)
- pp.pprint(client.removeConstraint(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('removeConstraint requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.removeConstraint(args[0], args[1], eval(args[2]),))
elif cmd == 'removeIterator':
- if len(args) != 4:
- print('removeIterator requires 4 args')
- sys.exit(1)
- pp.pprint(client.removeIterator(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('removeIterator requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.removeIterator(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'removeTableProperty':
- if len(args) != 3:
- print('removeTableProperty requires 3 args')
- sys.exit(1)
- pp.pprint(client.removeTableProperty(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('removeTableProperty requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.removeTableProperty(args[0], args[1], args[2],))
elif cmd == 'renameTable':
- if len(args) != 3:
- print('renameTable requires 3 args')
- sys.exit(1)
- pp.pprint(client.renameTable(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('renameTable requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.renameTable(args[0], args[1], args[2],))
elif cmd == 'setLocalityGroups':
- if len(args) != 3:
- print('setLocalityGroups requires 3 args')
- sys.exit(1)
- pp.pprint(client.setLocalityGroups(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('setLocalityGroups requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.setLocalityGroups(args[0], args[1], eval(args[2]),))
elif cmd == 'setTableProperty':
- if len(args) != 4:
- print('setTableProperty requires 4 args')
- sys.exit(1)
- pp.pprint(client.setTableProperty(args[0],args[1],args[2],args[3],))
+ if len(args) != 4:
+ print('setTableProperty requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.setTableProperty(args[0], args[1], args[2], args[3],))
elif cmd == 'splitRangeByTablets':
- if len(args) != 4:
- print('splitRangeByTablets requires 4 args')
- sys.exit(1)
- pp.pprint(client.splitRangeByTablets(args[0],args[1],eval(args[2]),eval(args[3]),))
+ if len(args) != 4:
+ print('splitRangeByTablets requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.splitRangeByTablets(args[0], args[1], eval(args[2]), eval(args[3]),))
elif cmd == 'tableExists':
- if len(args) != 2:
- print('tableExists requires 2 args')
- sys.exit(1)
- pp.pprint(client.tableExists(args[0],args[1],))
+ if len(args) != 2:
+ print('tableExists requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.tableExists(args[0], args[1],))
elif cmd == 'tableIdMap':
- if len(args) != 1:
- print('tableIdMap requires 1 args')
- sys.exit(1)
- pp.pprint(client.tableIdMap(args[0],))
+ if len(args) != 1:
+ print('tableIdMap requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.tableIdMap(args[0],))
elif cmd == 'testTableClassLoad':
- if len(args) != 4:
- print('testTableClassLoad requires 4 args')
- sys.exit(1)
- pp.pprint(client.testTableClassLoad(args[0],args[1],args[2],args[3],))
+ if len(args) != 4:
+ print('testTableClassLoad requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.testTableClassLoad(args[0], args[1], args[2], args[3],))
elif cmd == 'pingTabletServer':
- if len(args) != 2:
- print('pingTabletServer requires 2 args')
- sys.exit(1)
- pp.pprint(client.pingTabletServer(args[0],args[1],))
+ if len(args) != 2:
+ print('pingTabletServer requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.pingTabletServer(args[0], args[1],))
elif cmd == 'getActiveScans':
- if len(args) != 2:
- print('getActiveScans requires 2 args')
- sys.exit(1)
- pp.pprint(client.getActiveScans(args[0],args[1],))
+ if len(args) != 2:
+ print('getActiveScans requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getActiveScans(args[0], args[1],))
elif cmd == 'getActiveCompactions':
- if len(args) != 2:
- print('getActiveCompactions requires 2 args')
- sys.exit(1)
- pp.pprint(client.getActiveCompactions(args[0],args[1],))
+ if len(args) != 2:
+ print('getActiveCompactions requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getActiveCompactions(args[0], args[1],))
elif cmd == 'getSiteConfiguration':
- if len(args) != 1:
- print('getSiteConfiguration requires 1 args')
- sys.exit(1)
- pp.pprint(client.getSiteConfiguration(args[0],))
+ if len(args) != 1:
+ print('getSiteConfiguration requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getSiteConfiguration(args[0],))
elif cmd == 'getSystemConfiguration':
- if len(args) != 1:
- print('getSystemConfiguration requires 1 args')
- sys.exit(1)
- pp.pprint(client.getSystemConfiguration(args[0],))
+ if len(args) != 1:
+ print('getSystemConfiguration requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getSystemConfiguration(args[0],))
elif cmd == 'getTabletServers':
- if len(args) != 1:
- print('getTabletServers requires 1 args')
- sys.exit(1)
- pp.pprint(client.getTabletServers(args[0],))
+ if len(args) != 1:
+ print('getTabletServers requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getTabletServers(args[0],))
elif cmd == 'removeProperty':
- if len(args) != 2:
- print('removeProperty requires 2 args')
- sys.exit(1)
- pp.pprint(client.removeProperty(args[0],args[1],))
+ if len(args) != 2:
+ print('removeProperty requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.removeProperty(args[0], args[1],))
elif cmd == 'setProperty':
- if len(args) != 3:
- print('setProperty requires 3 args')
- sys.exit(1)
- pp.pprint(client.setProperty(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('setProperty requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.setProperty(args[0], args[1], args[2],))
elif cmd == 'testClassLoad':
- if len(args) != 3:
- print('testClassLoad requires 3 args')
- sys.exit(1)
- pp.pprint(client.testClassLoad(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('testClassLoad requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.testClassLoad(args[0], args[1], args[2],))
elif cmd == 'authenticateUser':
- if len(args) != 3:
- print('authenticateUser requires 3 args')
- sys.exit(1)
- pp.pprint(client.authenticateUser(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('authenticateUser requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.authenticateUser(args[0], args[1], eval(args[2]),))
elif cmd == 'changeUserAuthorizations':
- if len(args) != 3:
- print('changeUserAuthorizations requires 3 args')
- sys.exit(1)
- pp.pprint(client.changeUserAuthorizations(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('changeUserAuthorizations requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.changeUserAuthorizations(args[0], args[1], eval(args[2]),))
elif cmd == 'changeLocalUserPassword':
- if len(args) != 3:
- print('changeLocalUserPassword requires 3 args')
- sys.exit(1)
- pp.pprint(client.changeLocalUserPassword(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('changeLocalUserPassword requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.changeLocalUserPassword(args[0], args[1], args[2],))
elif cmd == 'createLocalUser':
- if len(args) != 3:
- print('createLocalUser requires 3 args')
- sys.exit(1)
- pp.pprint(client.createLocalUser(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('createLocalUser requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.createLocalUser(args[0], args[1], args[2],))
elif cmd == 'dropLocalUser':
- if len(args) != 2:
- print('dropLocalUser requires 2 args')
- sys.exit(1)
- pp.pprint(client.dropLocalUser(args[0],args[1],))
+ if len(args) != 2:
+ print('dropLocalUser requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.dropLocalUser(args[0], args[1],))
elif cmd == 'getUserAuthorizations':
- if len(args) != 2:
- print('getUserAuthorizations requires 2 args')
- sys.exit(1)
- pp.pprint(client.getUserAuthorizations(args[0],args[1],))
+ if len(args) != 2:
+ print('getUserAuthorizations requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getUserAuthorizations(args[0], args[1],))
elif cmd == 'grantSystemPermission':
- if len(args) != 3:
- print('grantSystemPermission requires 3 args')
- sys.exit(1)
- pp.pprint(client.grantSystemPermission(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('grantSystemPermission requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.grantSystemPermission(args[0], args[1], eval(args[2]),))
elif cmd == 'grantTablePermission':
- if len(args) != 4:
- print('grantTablePermission requires 4 args')
- sys.exit(1)
- pp.pprint(client.grantTablePermission(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('grantTablePermission requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.grantTablePermission(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'hasSystemPermission':
- if len(args) != 3:
- print('hasSystemPermission requires 3 args')
- sys.exit(1)
- pp.pprint(client.hasSystemPermission(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('hasSystemPermission requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.hasSystemPermission(args[0], args[1], eval(args[2]),))
elif cmd == 'hasTablePermission':
- if len(args) != 4:
- print('hasTablePermission requires 4 args')
- sys.exit(1)
- pp.pprint(client.hasTablePermission(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('hasTablePermission requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.hasTablePermission(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'listLocalUsers':
- if len(args) != 1:
- print('listLocalUsers requires 1 args')
- sys.exit(1)
- pp.pprint(client.listLocalUsers(args[0],))
+ if len(args) != 1:
+ print('listLocalUsers requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.listLocalUsers(args[0],))
elif cmd == 'revokeSystemPermission':
- if len(args) != 3:
- print('revokeSystemPermission requires 3 args')
- sys.exit(1)
- pp.pprint(client.revokeSystemPermission(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('revokeSystemPermission requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.revokeSystemPermission(args[0], args[1], eval(args[2]),))
elif cmd == 'revokeTablePermission':
- if len(args) != 4:
- print('revokeTablePermission requires 4 args')
- sys.exit(1)
- pp.pprint(client.revokeTablePermission(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('revokeTablePermission requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.revokeTablePermission(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'grantNamespacePermission':
- if len(args) != 4:
- print('grantNamespacePermission requires 4 args')
- sys.exit(1)
- pp.pprint(client.grantNamespacePermission(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('grantNamespacePermission requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.grantNamespacePermission(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'hasNamespacePermission':
- if len(args) != 4:
- print('hasNamespacePermission requires 4 args')
- sys.exit(1)
- pp.pprint(client.hasNamespacePermission(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('hasNamespacePermission requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.hasNamespacePermission(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'revokeNamespacePermission':
- if len(args) != 4:
- print('revokeNamespacePermission requires 4 args')
- sys.exit(1)
- pp.pprint(client.revokeNamespacePermission(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('revokeNamespacePermission requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.revokeNamespacePermission(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'createBatchScanner':
- if len(args) != 3:
- print('createBatchScanner requires 3 args')
- sys.exit(1)
- pp.pprint(client.createBatchScanner(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('createBatchScanner requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.createBatchScanner(args[0], args[1], eval(args[2]),))
elif cmd == 'createScanner':
- if len(args) != 3:
- print('createScanner requires 3 args')
- sys.exit(1)
- pp.pprint(client.createScanner(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('createScanner requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.createScanner(args[0], args[1], eval(args[2]),))
elif cmd == 'hasNext':
- if len(args) != 1:
- print('hasNext requires 1 args')
- sys.exit(1)
- pp.pprint(client.hasNext(args[0],))
+ if len(args) != 1:
+ print('hasNext requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.hasNext(args[0],))
elif cmd == 'nextEntry':
- if len(args) != 1:
- print('nextEntry requires 1 args')
- sys.exit(1)
- pp.pprint(client.nextEntry(args[0],))
+ if len(args) != 1:
+ print('nextEntry requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.nextEntry(args[0],))
elif cmd == 'nextK':
- if len(args) != 2:
- print('nextK requires 2 args')
- sys.exit(1)
- pp.pprint(client.nextK(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('nextK requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.nextK(args[0], eval(args[1]),))
elif cmd == 'closeScanner':
- if len(args) != 1:
- print('closeScanner requires 1 args')
- sys.exit(1)
- pp.pprint(client.closeScanner(args[0],))
+ if len(args) != 1:
+ print('closeScanner requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.closeScanner(args[0],))
elif cmd == 'updateAndFlush':
- if len(args) != 3:
- print('updateAndFlush requires 3 args')
- sys.exit(1)
- pp.pprint(client.updateAndFlush(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('updateAndFlush requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.updateAndFlush(args[0], args[1], eval(args[2]),))
elif cmd == 'createWriter':
- if len(args) != 3:
- print('createWriter requires 3 args')
- sys.exit(1)
- pp.pprint(client.createWriter(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('createWriter requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.createWriter(args[0], args[1], eval(args[2]),))
elif cmd == 'update':
- if len(args) != 2:
- print('update requires 2 args')
- sys.exit(1)
- pp.pprint(client.update(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('update requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.update(args[0], eval(args[1]),))
elif cmd == 'flush':
- if len(args) != 1:
- print('flush requires 1 args')
- sys.exit(1)
- pp.pprint(client.flush(args[0],))
+ if len(args) != 1:
+ print('flush requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.flush(args[0],))
elif cmd == 'closeWriter':
- if len(args) != 1:
- print('closeWriter requires 1 args')
- sys.exit(1)
- pp.pprint(client.closeWriter(args[0],))
+ if len(args) != 1:
+ print('closeWriter requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.closeWriter(args[0],))
elif cmd == 'updateRowConditionally':
- if len(args) != 4:
- print('updateRowConditionally requires 4 args')
- sys.exit(1)
- pp.pprint(client.updateRowConditionally(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('updateRowConditionally requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.updateRowConditionally(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'createConditionalWriter':
- if len(args) != 3:
- print('createConditionalWriter requires 3 args')
- sys.exit(1)
- pp.pprint(client.createConditionalWriter(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('createConditionalWriter requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.createConditionalWriter(args[0], args[1], eval(args[2]),))
elif cmd == 'updateRowsConditionally':
- if len(args) != 2:
- print('updateRowsConditionally requires 2 args')
- sys.exit(1)
- pp.pprint(client.updateRowsConditionally(args[0],eval(args[1]),))
+ if len(args) != 2:
+ print('updateRowsConditionally requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.updateRowsConditionally(args[0], eval(args[1]),))
elif cmd == 'closeConditionalWriter':
- if len(args) != 1:
- print('closeConditionalWriter requires 1 args')
- sys.exit(1)
- pp.pprint(client.closeConditionalWriter(args[0],))
+ if len(args) != 1:
+ print('closeConditionalWriter requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.closeConditionalWriter(args[0],))
elif cmd == 'getRowRange':
- if len(args) != 1:
- print('getRowRange requires 1 args')
- sys.exit(1)
- pp.pprint(client.getRowRange(args[0],))
+ if len(args) != 1:
+ print('getRowRange requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.getRowRange(args[0],))
elif cmd == 'getFollowing':
- if len(args) != 2:
- print('getFollowing requires 2 args')
- sys.exit(1)
- pp.pprint(client.getFollowing(eval(args[0]),eval(args[1]),))
+ if len(args) != 2:
+ print('getFollowing requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getFollowing(eval(args[0]), eval(args[1]),))
elif cmd == 'systemNamespace':
- if len(args) != 0:
- print('systemNamespace requires 0 args')
- sys.exit(1)
- pp.pprint(client.systemNamespace())
+ if len(args) != 0:
+ print('systemNamespace requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.systemNamespace())
elif cmd == 'defaultNamespace':
- if len(args) != 0:
- print('defaultNamespace requires 0 args')
- sys.exit(1)
- pp.pprint(client.defaultNamespace())
+ if len(args) != 0:
+ print('defaultNamespace requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.defaultNamespace())
elif cmd == 'listNamespaces':
- if len(args) != 1:
- print('listNamespaces requires 1 args')
- sys.exit(1)
- pp.pprint(client.listNamespaces(args[0],))
+ if len(args) != 1:
+ print('listNamespaces requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.listNamespaces(args[0],))
elif cmd == 'namespaceExists':
- if len(args) != 2:
- print('namespaceExists requires 2 args')
- sys.exit(1)
- pp.pprint(client.namespaceExists(args[0],args[1],))
+ if len(args) != 2:
+ print('namespaceExists requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.namespaceExists(args[0], args[1],))
elif cmd == 'createNamespace':
- if len(args) != 2:
- print('createNamespace requires 2 args')
- sys.exit(1)
- pp.pprint(client.createNamespace(args[0],args[1],))
+ if len(args) != 2:
+ print('createNamespace requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.createNamespace(args[0], args[1],))
elif cmd == 'deleteNamespace':
- if len(args) != 2:
- print('deleteNamespace requires 2 args')
- sys.exit(1)
- pp.pprint(client.deleteNamespace(args[0],args[1],))
+ if len(args) != 2:
+ print('deleteNamespace requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.deleteNamespace(args[0], args[1],))
elif cmd == 'renameNamespace':
- if len(args) != 3:
- print('renameNamespace requires 3 args')
- sys.exit(1)
- pp.pprint(client.renameNamespace(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('renameNamespace requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.renameNamespace(args[0], args[1], args[2],))
elif cmd == 'setNamespaceProperty':
- if len(args) != 4:
- print('setNamespaceProperty requires 4 args')
- sys.exit(1)
- pp.pprint(client.setNamespaceProperty(args[0],args[1],args[2],args[3],))
+ if len(args) != 4:
+ print('setNamespaceProperty requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.setNamespaceProperty(args[0], args[1], args[2], args[3],))
elif cmd == 'removeNamespaceProperty':
- if len(args) != 3:
- print('removeNamespaceProperty requires 3 args')
- sys.exit(1)
- pp.pprint(client.removeNamespaceProperty(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('removeNamespaceProperty requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.removeNamespaceProperty(args[0], args[1], args[2],))
elif cmd == 'getNamespaceProperties':
- if len(args) != 2:
- print('getNamespaceProperties requires 2 args')
- sys.exit(1)
- pp.pprint(client.getNamespaceProperties(args[0],args[1],))
+ if len(args) != 2:
+ print('getNamespaceProperties requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.getNamespaceProperties(args[0], args[1],))
elif cmd == 'namespaceIdMap':
- if len(args) != 1:
- print('namespaceIdMap requires 1 args')
- sys.exit(1)
- pp.pprint(client.namespaceIdMap(args[0],))
+ if len(args) != 1:
+ print('namespaceIdMap requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.namespaceIdMap(args[0],))
elif cmd == 'attachNamespaceIterator':
- if len(args) != 4:
- print('attachNamespaceIterator requires 4 args')
- sys.exit(1)
- pp.pprint(client.attachNamespaceIterator(args[0],args[1],eval(args[2]),eval(args[3]),))
+ if len(args) != 4:
+ print('attachNamespaceIterator requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.attachNamespaceIterator(args[0], args[1], eval(args[2]), eval(args[3]),))
elif cmd == 'removeNamespaceIterator':
- if len(args) != 4:
- print('removeNamespaceIterator requires 4 args')
- sys.exit(1)
- pp.pprint(client.removeNamespaceIterator(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('removeNamespaceIterator requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.removeNamespaceIterator(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'getNamespaceIteratorSetting':
- if len(args) != 4:
- print('getNamespaceIteratorSetting requires 4 args')
- sys.exit(1)
- pp.pprint(client.getNamespaceIteratorSetting(args[0],args[1],args[2],eval(args[3]),))
+ if len(args) != 4:
+ print('getNamespaceIteratorSetting requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.getNamespaceIteratorSetting(args[0], args[1], args[2], eval(args[3]),))
elif cmd == 'listNamespaceIterators':
- if len(args) != 2:
- print('listNamespaceIterators requires 2 args')
- sys.exit(1)
- pp.pprint(client.listNamespaceIterators(args[0],args[1],))
+ if len(args) != 2:
+ print('listNamespaceIterators requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.listNamespaceIterators(args[0], args[1],))
elif cmd == 'checkNamespaceIteratorConflicts':
- if len(args) != 4:
- print('checkNamespaceIteratorConflicts requires 4 args')
- sys.exit(1)
- pp.pprint(client.checkNamespaceIteratorConflicts(args[0],args[1],eval(args[2]),eval(args[3]),))
+ if len(args) != 4:
+ print('checkNamespaceIteratorConflicts requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.checkNamespaceIteratorConflicts(args[0], args[1], eval(args[2]), eval(args[3]),))
elif cmd == 'addNamespaceConstraint':
- if len(args) != 3:
- print('addNamespaceConstraint requires 3 args')
- sys.exit(1)
- pp.pprint(client.addNamespaceConstraint(args[0],args[1],args[2],))
+ if len(args) != 3:
+ print('addNamespaceConstraint requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.addNamespaceConstraint(args[0], args[1], args[2],))
elif cmd == 'removeNamespaceConstraint':
- if len(args) != 3:
- print('removeNamespaceConstraint requires 3 args')
- sys.exit(1)
- pp.pprint(client.removeNamespaceConstraint(args[0],args[1],eval(args[2]),))
+ if len(args) != 3:
+ print('removeNamespaceConstraint requires 3 args')
+ sys.exit(1)
+ pp.pprint(client.removeNamespaceConstraint(args[0], args[1], eval(args[2]),))
elif cmd == 'listNamespaceConstraints':
- if len(args) != 2:
- print('listNamespaceConstraints requires 2 args')
- sys.exit(1)
- pp.pprint(client.listNamespaceConstraints(args[0],args[1],))
+ if len(args) != 2:
+ print('listNamespaceConstraints requires 2 args')
+ sys.exit(1)
+ pp.pprint(client.listNamespaceConstraints(args[0], args[1],))
elif cmd == 'testNamespaceClassLoad':
- if len(args) != 4:
- print('testNamespaceClassLoad requires 4 args')
- sys.exit(1)
- pp.pprint(client.testNamespaceClassLoad(args[0],args[1],args[2],args[3],))
+ if len(args) != 4:
+ print('testNamespaceClassLoad requires 4 args')
+ sys.exit(1)
+ pp.pprint(client.testNamespaceClassLoad(args[0], args[1], args[2], args[3],))
else:
- print('Unrecognized method %s' % cmd)
- sys.exit(1)
+ print('Unrecognized method %s' % cmd)
+ sys.exit(1)
transport.close()
[36/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
index fd59d4b..b3573cc 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
@@ -15,53 +15,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiScan, InitialMultiScan._Fields>, java.io.Serializable, Cloneable, Comparable<InitialMultiScan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InitialMultiScan");
private static final org.apache.thrift.protocol.TField SCAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scanID", org.apache.thrift.protocol.TType.I64, (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.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new InitialMultiScanStandardSchemeFactory());
- schemes.put(TupleScheme.class, new InitialMultiScanTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new InitialMultiScanStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new InitialMultiScanTupleSchemeFactory();
public long scanID; // required
public MultiScanResult result; // required
@@ -71,10 +41,10 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
SCAN_ID((short)1, "scanID"),
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);
}
}
@@ -99,21 +69,21 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,14 +100,14 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
// isset id assignments
private static final int __SCANID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SCAN_ID, new org.apache.thrift.meta_data.FieldMetaData("scanID", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "ScanID")));
tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MultiScanResult.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InitialMultiScan.class, metaDataMap);
}
@@ -187,16 +157,16 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
}
public void unsetScanID() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SCANID_ISSET_ID);
}
/** Returns true if field scanID is set (has been assigned a value) and false otherwise */
public boolean isSetScanID() {
- return EncodingUtils.testBit(__isset_bitfield, __SCANID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SCANID_ISSET_ID);
}
public void setScanIDIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SCANID_ISSET_ID, value);
}
public MultiScanResult getResult() {
@@ -223,13 +193,13 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SCAN_ID:
if (value == null) {
unsetScanID();
} else {
- setScanID((Long)value);
+ setScanID((java.lang.Long)value);
}
break;
@@ -244,7 +214,7 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SCAN_ID:
return getScanID();
@@ -253,13 +223,13 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
return getResult();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -268,11 +238,11 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
case RESULT:
return isSetResult();
}
- 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 InitialMultiScan)
@@ -283,6 +253,8 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
public boolean equals(InitialMultiScan that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_scanID = true;
boolean that_present_scanID = true;
@@ -307,19 +279,15 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_scanID = true;
- list.add(present_scanID);
- if (present_scanID)
- list.add(scanID);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(scanID);
- boolean present_result = true && (isSetResult());
- list.add(present_result);
- if (present_result)
- list.add(result);
+ hashCode = hashCode * 8191 + ((isSetResult()) ? 131071 : 524287);
+ if (isSetResult())
+ hashCode = hashCode * 8191 + result.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -330,7 +298,7 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetScanID()).compareTo(other.isSetScanID());
+ lastComparison = java.lang.Boolean.valueOf(isSetScanID()).compareTo(other.isSetScanID());
if (lastComparison != 0) {
return lastComparison;
}
@@ -340,7 +308,7 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
+ lastComparison = java.lang.Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,16 +326,16 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
}
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("InitialMultiScan(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("InitialMultiScan(");
boolean first = true;
sb.append("scanID:");
@@ -401,7 +369,7 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -411,13 +379,13 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
}
}
- private static class InitialMultiScanStandardSchemeFactory implements SchemeFactory {
+ private static class InitialMultiScanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public InitialMultiScanStandardScheme getScheme() {
return new InitialMultiScanStandardScheme();
}
}
- private static class InitialMultiScanStandardScheme extends StandardScheme<InitialMultiScan> {
+ private static class InitialMultiScanStandardScheme extends org.apache.thrift.scheme.StandardScheme<InitialMultiScan> {
public void read(org.apache.thrift.protocol.TProtocol iprot, InitialMultiScan struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -475,18 +443,18 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
}
- private static class InitialMultiScanTupleSchemeFactory implements SchemeFactory {
+ private static class InitialMultiScanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public InitialMultiScanTupleScheme getScheme() {
return new InitialMultiScanTupleScheme();
}
}
- private static class InitialMultiScanTupleScheme extends TupleScheme<InitialMultiScan> {
+ private static class InitialMultiScanTupleScheme extends org.apache.thrift.scheme.TupleScheme<InitialMultiScan> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, InitialMultiScan 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.isSetScanID()) {
optionals.set(0);
}
@@ -504,8 +472,8 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, InitialMultiScan 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.scanID = iprot.readI64();
struct.setScanIDIsSet(true);
@@ -518,5 +486,9 @@ public class InitialMultiScan implements org.apache.thrift.TBase<InitialMultiSca
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
index 879bdcb..34e54c8 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
@@ -15,53 +15,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class InitialScan implements org.apache.thrift.TBase<InitialScan, InitialScan._Fields>, java.io.Serializable, Cloneable, Comparable<InitialScan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InitialScan");
private static final org.apache.thrift.protocol.TField SCAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("scanID", org.apache.thrift.protocol.TType.I64, (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.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new InitialScanStandardSchemeFactory());
- schemes.put(TupleScheme.class, new InitialScanTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new InitialScanStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new InitialScanTupleSchemeFactory();
public long scanID; // required
public ScanResult result; // required
@@ -71,10 +41,10 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
SCAN_ID((short)1, "scanID"),
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);
}
}
@@ -99,21 +69,21 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,14 +100,14 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
// isset id assignments
private static final int __SCANID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SCAN_ID, new org.apache.thrift.meta_data.FieldMetaData("scanID", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "ScanID")));
tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ScanResult.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InitialScan.class, metaDataMap);
}
@@ -187,16 +157,16 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
}
public void unsetScanID() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SCANID_ISSET_ID);
}
/** Returns true if field scanID is set (has been assigned a value) and false otherwise */
public boolean isSetScanID() {
- return EncodingUtils.testBit(__isset_bitfield, __SCANID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SCANID_ISSET_ID);
}
public void setScanIDIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SCANID_ISSET_ID, value);
}
public ScanResult getResult() {
@@ -223,13 +193,13 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SCAN_ID:
if (value == null) {
unsetScanID();
} else {
- setScanID((Long)value);
+ setScanID((java.lang.Long)value);
}
break;
@@ -244,7 +214,7 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SCAN_ID:
return getScanID();
@@ -253,13 +223,13 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
return getResult();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -268,11 +238,11 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
case RESULT:
return isSetResult();
}
- 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 InitialScan)
@@ -283,6 +253,8 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
public boolean equals(InitialScan that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_scanID = true;
boolean that_present_scanID = true;
@@ -307,19 +279,15 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_scanID = true;
- list.add(present_scanID);
- if (present_scanID)
- list.add(scanID);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(scanID);
- boolean present_result = true && (isSetResult());
- list.add(present_result);
- if (present_result)
- list.add(result);
+ hashCode = hashCode * 8191 + ((isSetResult()) ? 131071 : 524287);
+ if (isSetResult())
+ hashCode = hashCode * 8191 + result.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -330,7 +298,7 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetScanID()).compareTo(other.isSetScanID());
+ lastComparison = java.lang.Boolean.valueOf(isSetScanID()).compareTo(other.isSetScanID());
if (lastComparison != 0) {
return lastComparison;
}
@@ -340,7 +308,7 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
+ lastComparison = java.lang.Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,16 +326,16 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
}
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("InitialScan(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("InitialScan(");
boolean first = true;
sb.append("scanID:");
@@ -401,7 +369,7 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -411,13 +379,13 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
}
}
- private static class InitialScanStandardSchemeFactory implements SchemeFactory {
+ private static class InitialScanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public InitialScanStandardScheme getScheme() {
return new InitialScanStandardScheme();
}
}
- private static class InitialScanStandardScheme extends StandardScheme<InitialScan> {
+ private static class InitialScanStandardScheme extends org.apache.thrift.scheme.StandardScheme<InitialScan> {
public void read(org.apache.thrift.protocol.TProtocol iprot, InitialScan struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -475,18 +443,18 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
}
- private static class InitialScanTupleSchemeFactory implements SchemeFactory {
+ private static class InitialScanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public InitialScanTupleScheme getScheme() {
return new InitialScanTupleScheme();
}
}
- private static class InitialScanTupleScheme extends TupleScheme<InitialScan> {
+ private static class InitialScanTupleScheme extends org.apache.thrift.scheme.TupleScheme<InitialScan> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, InitialScan 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.isSetScanID()) {
optionals.set(0);
}
@@ -504,8 +472,8 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, InitialScan 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.scanID = iprot.readI64();
struct.setScanIDIsSet(true);
@@ -518,5 +486,9 @@ public class InitialScan implements org.apache.thrift.TBase<InitialScan, Initial
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
index 3edc5d7..dcb2f68 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fields>, java.io.Serializable, Cloneable, Comparable<IterInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IterInfo");
@@ -58,15 +31,12 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ITER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("iterName", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new IterInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new IterInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new IterInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new IterInfoTupleSchemeFactory();
public int priority; // required
- public String className; // required
- public String iterName; // required
+ public java.lang.String className; // required
+ public java.lang.String iterName; // 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 {
@@ -74,10 +44,10 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
CLASS_NAME((short)2, "className"),
ITER_NAME((short)3, "iterName");
- 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);
}
}
@@ -104,21 +74,21 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
*/
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;
}
@@ -127,7 +97,7 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -135,16 +105,16 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
// isset id assignments
private static final int __PRIORITY_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("priority", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ITER_NAME, new org.apache.thrift.meta_data.FieldMetaData("iterName", 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(IterInfo.class, metaDataMap);
}
@@ -153,8 +123,8 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
public IterInfo(
int priority,
- String className,
- String iterName)
+ java.lang.String className,
+ java.lang.String iterName)
{
this();
this.priority = priority;
@@ -200,23 +170,23 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
}
public void unsetPriority() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID);
}
/** Returns true if field priority is set (has been assigned a value) and false otherwise */
public boolean isSetPriority() {
- return EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID);
}
public void setPriorityIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value);
}
- public String getClassName() {
+ public java.lang.String getClassName() {
return this.className;
}
- public IterInfo setClassName(String className) {
+ public IterInfo setClassName(java.lang.String className) {
this.className = className;
return this;
}
@@ -236,11 +206,11 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
}
}
- public String getIterName() {
+ public java.lang.String getIterName() {
return this.iterName;
}
- public IterInfo setIterName(String iterName) {
+ public IterInfo setIterName(java.lang.String iterName) {
this.iterName = iterName;
return this;
}
@@ -260,13 +230,13 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PRIORITY:
if (value == null) {
unsetPriority();
} else {
- setPriority((Integer)value);
+ setPriority((java.lang.Integer)value);
}
break;
@@ -274,7 +244,7 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
if (value == null) {
unsetClassName();
} else {
- setClassName((String)value);
+ setClassName((java.lang.String)value);
}
break;
@@ -282,14 +252,14 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
if (value == null) {
unsetIterName();
} else {
- setIterName((String)value);
+ setIterName((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PRIORITY:
return getPriority();
@@ -301,13 +271,13 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
return getIterName();
}
- 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) {
@@ -318,11 +288,11 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
case ITER_NAME:
return isSetIterName();
}
- 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 IterInfo)
@@ -333,6 +303,8 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
public boolean equals(IterInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_priority = true;
boolean that_present_priority = true;
@@ -366,24 +338,19 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_priority = true;
- list.add(present_priority);
- if (present_priority)
- list.add(priority);
+ hashCode = hashCode * 8191 + priority;
- boolean present_className = true && (isSetClassName());
- list.add(present_className);
- if (present_className)
- list.add(className);
+ hashCode = hashCode * 8191 + ((isSetClassName()) ? 131071 : 524287);
+ if (isSetClassName())
+ hashCode = hashCode * 8191 + className.hashCode();
- boolean present_iterName = true && (isSetIterName());
- list.add(present_iterName);
- if (present_iterName)
- list.add(iterName);
+ hashCode = hashCode * 8191 + ((isSetIterName()) ? 131071 : 524287);
+ if (isSetIterName())
+ hashCode = hashCode * 8191 + iterName.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -394,7 +361,7 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority());
+ lastComparison = java.lang.Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority());
if (lastComparison != 0) {
return lastComparison;
}
@@ -404,7 +371,7 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName());
+ lastComparison = java.lang.Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -414,7 +381,7 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIterName()).compareTo(other.isSetIterName());
+ lastComparison = java.lang.Boolean.valueOf(isSetIterName()).compareTo(other.isSetIterName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,16 +399,16 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
}
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("IterInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("IterInfo(");
boolean first = true;
sb.append("priority:");
@@ -480,7 +447,7 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -490,13 +457,13 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
}
}
- private static class IterInfoStandardSchemeFactory implements SchemeFactory {
+ private static class IterInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IterInfoStandardScheme getScheme() {
return new IterInfoStandardScheme();
}
}
- private static class IterInfoStandardScheme extends StandardScheme<IterInfo> {
+ private static class IterInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<IterInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, IterInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -566,18 +533,18 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
}
- private static class IterInfoTupleSchemeFactory implements SchemeFactory {
+ private static class IterInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IterInfoTupleScheme getScheme() {
return new IterInfoTupleScheme();
}
}
- private static class IterInfoTupleScheme extends TupleScheme<IterInfo> {
+ private static class IterInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<IterInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, IterInfo 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.isSetPriority()) {
optionals.set(0);
}
@@ -601,8 +568,8 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, IterInfo 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.priority = iprot.readI32();
struct.setPriorityIsSet(true);
@@ -618,5 +585,9 @@ public class IterInfo implements org.apache.thrift.TBase<IterInfo, IterInfo._Fie
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java
index ab11e18..5b873f1 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java
@@ -15,52 +15,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFileInfo._Fields>, java.io.Serializable, Cloneable, Comparable<MapFileInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MapFileInfo");
private static final org.apache.thrift.protocol.TField ESTIMATED_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("estimatedSize", org.apache.thrift.protocol.TType.I64, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new MapFileInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new MapFileInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MapFileInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MapFileInfoTupleSchemeFactory();
public long estimatedSize; // required
@@ -68,10 +38,10 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ESTIMATED_SIZE((short)1, "estimatedSize");
- 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);
}
}
@@ -94,21 +64,21 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
*/
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;
}
@@ -117,7 +87,7 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -125,12 +95,12 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
// isset id assignments
private static final int __ESTIMATEDSIZE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ESTIMATED_SIZE, new org.apache.thrift.meta_data.FieldMetaData("estimatedSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MapFileInfo.class, metaDataMap);
}
@@ -174,55 +144,55 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
}
public void unsetEstimatedSize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ESTIMATEDSIZE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ESTIMATEDSIZE_ISSET_ID);
}
/** Returns true if field estimatedSize is set (has been assigned a value) and false otherwise */
public boolean isSetEstimatedSize() {
- return EncodingUtils.testBit(__isset_bitfield, __ESTIMATEDSIZE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ESTIMATEDSIZE_ISSET_ID);
}
public void setEstimatedSizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ESTIMATEDSIZE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ESTIMATEDSIZE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ESTIMATED_SIZE:
if (value == null) {
unsetEstimatedSize();
} else {
- setEstimatedSize((Long)value);
+ setEstimatedSize((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ESTIMATED_SIZE:
return getEstimatedSize();
}
- 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 ESTIMATED_SIZE:
return isSetEstimatedSize();
}
- 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 MapFileInfo)
@@ -233,6 +203,8 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
public boolean equals(MapFileInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_estimatedSize = true;
boolean that_present_estimatedSize = true;
@@ -248,14 +220,11 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_estimatedSize = true;
- list.add(present_estimatedSize);
- if (present_estimatedSize)
- list.add(estimatedSize);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(estimatedSize);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -266,7 +235,7 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEstimatedSize()).compareTo(other.isSetEstimatedSize());
+ lastComparison = java.lang.Boolean.valueOf(isSetEstimatedSize()).compareTo(other.isSetEstimatedSize());
if (lastComparison != 0) {
return lastComparison;
}
@@ -284,16 +253,16 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
}
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("MapFileInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("MapFileInfo(");
boolean first = true;
sb.append("estimatedSize:");
@@ -316,7 +285,7 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -326,13 +295,13 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
}
}
- private static class MapFileInfoStandardSchemeFactory implements SchemeFactory {
+ private static class MapFileInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MapFileInfoStandardScheme getScheme() {
return new MapFileInfoStandardScheme();
}
}
- private static class MapFileInfoStandardScheme extends StandardScheme<MapFileInfo> {
+ private static class MapFileInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<MapFileInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, MapFileInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -376,18 +345,18 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
}
- private static class MapFileInfoTupleSchemeFactory implements SchemeFactory {
+ private static class MapFileInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MapFileInfoTupleScheme getScheme() {
return new MapFileInfoTupleScheme();
}
}
- private static class MapFileInfoTupleScheme extends TupleScheme<MapFileInfo> {
+ private static class MapFileInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<MapFileInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MapFileInfo 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.isSetEstimatedSize()) {
optionals.set(0);
}
@@ -399,8 +368,8 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MapFileInfo 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.estimatedSize = iprot.readI64();
struct.setEstimatedSizeIsSet(true);
@@ -408,5 +377,9 @@ public class MapFileInfo implements org.apache.thrift.TBase<MapFileInfo, MapFile
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[32/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TRange.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TRange.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TRange.java
index d4df3d3..c90b213 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TRange.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TRange.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>, java.io.Serializable, Cloneable, Comparable<TRange> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRange");
@@ -61,11 +34,8 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
private static final org.apache.thrift.protocol.TField INFINITE_START_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("infiniteStartKey", org.apache.thrift.protocol.TType.BOOL, (short)5);
private static final org.apache.thrift.protocol.TField INFINITE_STOP_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("infiniteStopKey", org.apache.thrift.protocol.TType.BOOL, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TRangeStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TRangeTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TRangeStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TRangeTupleSchemeFactory();
public TKey start; // required
public TKey stop; // required
@@ -83,10 +53,10 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
INFINITE_START_KEY((short)5, "infiniteStartKey"),
INFINITE_STOP_KEY((short)6, "infiniteStopKey");
- 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);
}
}
@@ -119,21 +89,21 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
*/
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;
}
@@ -142,7 +112,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -153,9 +123,9 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
private static final int __INFINITESTARTKEY_ISSET_ID = 2;
private static final int __INFINITESTOPKEY_ISSET_ID = 3;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKey.class)));
tmpMap.put(_Fields.STOP, new org.apache.thrift.meta_data.FieldMetaData("stop", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -168,7 +138,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.INFINITE_STOP_KEY, new org.apache.thrift.meta_data.FieldMetaData("infiniteStopKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRange.class, metaDataMap);
}
@@ -290,16 +260,16 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
public void unsetStartKeyInclusive() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTKEYINCLUSIVE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTKEYINCLUSIVE_ISSET_ID);
}
/** Returns true if field startKeyInclusive is set (has been assigned a value) and false otherwise */
public boolean isSetStartKeyInclusive() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTKEYINCLUSIVE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTKEYINCLUSIVE_ISSET_ID);
}
public void setStartKeyInclusiveIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTKEYINCLUSIVE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTKEYINCLUSIVE_ISSET_ID, value);
}
public boolean isStopKeyInclusive() {
@@ -313,16 +283,16 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
public void unsetStopKeyInclusive() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STOPKEYINCLUSIVE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STOPKEYINCLUSIVE_ISSET_ID);
}
/** Returns true if field stopKeyInclusive is set (has been assigned a value) and false otherwise */
public boolean isSetStopKeyInclusive() {
- return EncodingUtils.testBit(__isset_bitfield, __STOPKEYINCLUSIVE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STOPKEYINCLUSIVE_ISSET_ID);
}
public void setStopKeyInclusiveIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STOPKEYINCLUSIVE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STOPKEYINCLUSIVE_ISSET_ID, value);
}
public boolean isInfiniteStartKey() {
@@ -336,16 +306,16 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
public void unsetInfiniteStartKey() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INFINITESTARTKEY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INFINITESTARTKEY_ISSET_ID);
}
/** Returns true if field infiniteStartKey is set (has been assigned a value) and false otherwise */
public boolean isSetInfiniteStartKey() {
- return EncodingUtils.testBit(__isset_bitfield, __INFINITESTARTKEY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INFINITESTARTKEY_ISSET_ID);
}
public void setInfiniteStartKeyIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INFINITESTARTKEY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INFINITESTARTKEY_ISSET_ID, value);
}
public boolean isInfiniteStopKey() {
@@ -359,19 +329,19 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
public void unsetInfiniteStopKey() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INFINITESTOPKEY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INFINITESTOPKEY_ISSET_ID);
}
/** Returns true if field infiniteStopKey is set (has been assigned a value) and false otherwise */
public boolean isSetInfiniteStopKey() {
- return EncodingUtils.testBit(__isset_bitfield, __INFINITESTOPKEY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INFINITESTOPKEY_ISSET_ID);
}
public void setInfiniteStopKeyIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INFINITESTOPKEY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INFINITESTOPKEY_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case START:
if (value == null) {
@@ -393,7 +363,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
if (value == null) {
unsetStartKeyInclusive();
} else {
- setStartKeyInclusive((Boolean)value);
+ setStartKeyInclusive((java.lang.Boolean)value);
}
break;
@@ -401,7 +371,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
if (value == null) {
unsetStopKeyInclusive();
} else {
- setStopKeyInclusive((Boolean)value);
+ setStopKeyInclusive((java.lang.Boolean)value);
}
break;
@@ -409,7 +379,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
if (value == null) {
unsetInfiniteStartKey();
} else {
- setInfiniteStartKey((Boolean)value);
+ setInfiniteStartKey((java.lang.Boolean)value);
}
break;
@@ -417,14 +387,14 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
if (value == null) {
unsetInfiniteStopKey();
} else {
- setInfiniteStopKey((Boolean)value);
+ setInfiniteStopKey((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case START:
return getStart();
@@ -445,13 +415,13 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
return isInfiniteStopKey();
}
- 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) {
@@ -468,11 +438,11 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
case INFINITE_STOP_KEY:
return isSetInfiniteStopKey();
}
- 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 TRange)
@@ -483,6 +453,8 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
public boolean equals(TRange that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_start = true && this.isSetStart();
boolean that_present_start = true && that.isSetStart();
@@ -543,39 +515,25 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_start = true && (isSetStart());
- list.add(present_start);
- if (present_start)
- list.add(start);
+ hashCode = hashCode * 8191 + ((isSetStart()) ? 131071 : 524287);
+ if (isSetStart())
+ hashCode = hashCode * 8191 + start.hashCode();
- boolean present_stop = true && (isSetStop());
- list.add(present_stop);
- if (present_stop)
- list.add(stop);
+ hashCode = hashCode * 8191 + ((isSetStop()) ? 131071 : 524287);
+ if (isSetStop())
+ hashCode = hashCode * 8191 + stop.hashCode();
- boolean present_startKeyInclusive = true;
- list.add(present_startKeyInclusive);
- if (present_startKeyInclusive)
- list.add(startKeyInclusive);
+ hashCode = hashCode * 8191 + ((startKeyInclusive) ? 131071 : 524287);
- boolean present_stopKeyInclusive = true;
- list.add(present_stopKeyInclusive);
- if (present_stopKeyInclusive)
- list.add(stopKeyInclusive);
+ hashCode = hashCode * 8191 + ((stopKeyInclusive) ? 131071 : 524287);
- boolean present_infiniteStartKey = true;
- list.add(present_infiniteStartKey);
- if (present_infiniteStartKey)
- list.add(infiniteStartKey);
+ hashCode = hashCode * 8191 + ((infiniteStartKey) ? 131071 : 524287);
- boolean present_infiniteStopKey = true;
- list.add(present_infiniteStopKey);
- if (present_infiniteStopKey)
- list.add(infiniteStopKey);
+ hashCode = hashCode * 8191 + ((infiniteStopKey) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -586,7 +544,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
+ lastComparison = java.lang.Boolean.valueOf(isSetStart()).compareTo(other.isSetStart());
if (lastComparison != 0) {
return lastComparison;
}
@@ -596,7 +554,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStop()).compareTo(other.isSetStop());
+ lastComparison = java.lang.Boolean.valueOf(isSetStop()).compareTo(other.isSetStop());
if (lastComparison != 0) {
return lastComparison;
}
@@ -606,7 +564,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStartKeyInclusive()).compareTo(other.isSetStartKeyInclusive());
+ lastComparison = java.lang.Boolean.valueOf(isSetStartKeyInclusive()).compareTo(other.isSetStartKeyInclusive());
if (lastComparison != 0) {
return lastComparison;
}
@@ -616,7 +574,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStopKeyInclusive()).compareTo(other.isSetStopKeyInclusive());
+ lastComparison = java.lang.Boolean.valueOf(isSetStopKeyInclusive()).compareTo(other.isSetStopKeyInclusive());
if (lastComparison != 0) {
return lastComparison;
}
@@ -626,7 +584,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetInfiniteStartKey()).compareTo(other.isSetInfiniteStartKey());
+ lastComparison = java.lang.Boolean.valueOf(isSetInfiniteStartKey()).compareTo(other.isSetInfiniteStartKey());
if (lastComparison != 0) {
return lastComparison;
}
@@ -636,7 +594,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetInfiniteStopKey()).compareTo(other.isSetInfiniteStopKey());
+ lastComparison = java.lang.Boolean.valueOf(isSetInfiniteStopKey()).compareTo(other.isSetInfiniteStopKey());
if (lastComparison != 0) {
return lastComparison;
}
@@ -654,16 +612,16 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
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("TRange(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TRange(");
boolean first = true;
sb.append("start:");
@@ -720,7 +678,7 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -730,13 +688,13 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
}
- private static class TRangeStandardSchemeFactory implements SchemeFactory {
+ private static class TRangeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRangeStandardScheme getScheme() {
return new TRangeStandardScheme();
}
}
- private static class TRangeStandardScheme extends StandardScheme<TRange> {
+ private static class TRangeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRange> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TRange struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -841,18 +799,18 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
- private static class TRangeTupleSchemeFactory implements SchemeFactory {
+ private static class TRangeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRangeTupleScheme getScheme() {
return new TRangeTupleScheme();
}
}
- private static class TRangeTupleScheme extends TupleScheme<TRange> {
+ private static class TRangeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRange> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRange 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.isSetStart()) {
optionals.set(0);
}
@@ -894,8 +852,8 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TRange struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.start = new TKey();
struct.start.read(iprot);
@@ -925,5 +883,9 @@ public class TRange implements org.apache.thrift.TBase<TRange, TRange._Fields>,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java
index f3da03f..3a37af2 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, UpdateErrors._Fields>, java.io.Serializable, Cloneable, Comparable<UpdateErrors> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UpdateErrors");
@@ -58,15 +31,12 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
private static final org.apache.thrift.protocol.TField VIOLATION_SUMMARIES_FIELD_DESC = new org.apache.thrift.protocol.TField("violationSummaries", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField AUTHORIZATION_FAILURES_FIELD_DESC = new org.apache.thrift.protocol.TField("authorizationFailures", org.apache.thrift.protocol.TType.MAP, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UpdateErrorsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UpdateErrorsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UpdateErrorsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UpdateErrorsTupleSchemeFactory();
- public Map<TKeyExtent,Long> failedExtents; // required
- public List<TConstraintViolationSummary> violationSummaries; // required
- public Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> authorizationFailures; // required
+ public java.util.Map<TKeyExtent,java.lang.Long> failedExtents; // required
+ public java.util.List<TConstraintViolationSummary> violationSummaries; // required
+ public java.util.Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> authorizationFailures; // 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 {
@@ -74,10 +44,10 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
VIOLATION_SUMMARIES((short)2, "violationSummaries"),
AUTHORIZATION_FAILURES((short)3, "authorizationFailures");
- 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);
}
}
@@ -104,21 +74,21 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
*/
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;
}
@@ -127,15 +97,15 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
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.FAILED_EXTENTS, new org.apache.thrift.meta_data.FieldMetaData("failedExtents", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyExtent.class),
@@ -147,7 +117,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyExtent.class),
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UpdateErrors.class, metaDataMap);
}
@@ -155,9 +125,9 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
}
public UpdateErrors(
- Map<TKeyExtent,Long> failedExtents,
- List<TConstraintViolationSummary> violationSummaries,
- Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> authorizationFailures)
+ java.util.Map<TKeyExtent,java.lang.Long> failedExtents,
+ java.util.List<TConstraintViolationSummary> violationSummaries,
+ java.util.Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> authorizationFailures)
{
this();
this.failedExtents = failedExtents;
@@ -170,30 +140,30 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
*/
public UpdateErrors(UpdateErrors other) {
if (other.isSetFailedExtents()) {
- Map<TKeyExtent,Long> __this__failedExtents = new HashMap<TKeyExtent,Long>(other.failedExtents.size());
- for (Map.Entry<TKeyExtent, Long> other_element : other.failedExtents.entrySet()) {
+ java.util.Map<TKeyExtent,java.lang.Long> __this__failedExtents = new java.util.HashMap<TKeyExtent,java.lang.Long>(other.failedExtents.size());
+ for (java.util.Map.Entry<TKeyExtent, java.lang.Long> other_element : other.failedExtents.entrySet()) {
TKeyExtent other_element_key = other_element.getKey();
- Long other_element_value = other_element.getValue();
+ java.lang.Long other_element_value = other_element.getValue();
TKeyExtent __this__failedExtents_copy_key = new TKeyExtent(other_element_key);
- Long __this__failedExtents_copy_value = other_element_value;
+ java.lang.Long __this__failedExtents_copy_value = other_element_value;
__this__failedExtents.put(__this__failedExtents_copy_key, __this__failedExtents_copy_value);
}
this.failedExtents = __this__failedExtents;
}
if (other.isSetViolationSummaries()) {
- List<TConstraintViolationSummary> __this__violationSummaries = new ArrayList<TConstraintViolationSummary>(other.violationSummaries.size());
+ java.util.List<TConstraintViolationSummary> __this__violationSummaries = new java.util.ArrayList<TConstraintViolationSummary>(other.violationSummaries.size());
for (TConstraintViolationSummary other_element : other.violationSummaries) {
__this__violationSummaries.add(new TConstraintViolationSummary(other_element));
}
this.violationSummaries = __this__violationSummaries;
}
if (other.isSetAuthorizationFailures()) {
- Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> __this__authorizationFailures = new HashMap<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>(other.authorizationFailures.size());
- for (Map.Entry<TKeyExtent, org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> other_element : other.authorizationFailures.entrySet()) {
+ java.util.Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> __this__authorizationFailures = new java.util.HashMap<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>(other.authorizationFailures.size());
+ for (java.util.Map.Entry<TKeyExtent, org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> other_element : other.authorizationFailures.entrySet()) {
TKeyExtent other_element_key = other_element.getKey();
org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode other_element_value = other_element.getValue();
@@ -225,16 +195,16 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
public void putToFailedExtents(TKeyExtent key, long val) {
if (this.failedExtents == null) {
- this.failedExtents = new HashMap<TKeyExtent,Long>();
+ this.failedExtents = new java.util.HashMap<TKeyExtent,java.lang.Long>();
}
this.failedExtents.put(key, val);
}
- public Map<TKeyExtent,Long> getFailedExtents() {
+ public java.util.Map<TKeyExtent,java.lang.Long> getFailedExtents() {
return this.failedExtents;
}
- public UpdateErrors setFailedExtents(Map<TKeyExtent,Long> failedExtents) {
+ public UpdateErrors setFailedExtents(java.util.Map<TKeyExtent,java.lang.Long> failedExtents) {
this.failedExtents = failedExtents;
return this;
}
@@ -264,16 +234,16 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
public void addToViolationSummaries(TConstraintViolationSummary elem) {
if (this.violationSummaries == null) {
- this.violationSummaries = new ArrayList<TConstraintViolationSummary>();
+ this.violationSummaries = new java.util.ArrayList<TConstraintViolationSummary>();
}
this.violationSummaries.add(elem);
}
- public List<TConstraintViolationSummary> getViolationSummaries() {
+ public java.util.List<TConstraintViolationSummary> getViolationSummaries() {
return this.violationSummaries;
}
- public UpdateErrors setViolationSummaries(List<TConstraintViolationSummary> violationSummaries) {
+ public UpdateErrors setViolationSummaries(java.util.List<TConstraintViolationSummary> violationSummaries) {
this.violationSummaries = violationSummaries;
return this;
}
@@ -299,16 +269,16 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
public void putToAuthorizationFailures(TKeyExtent key, org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode val) {
if (this.authorizationFailures == null) {
- this.authorizationFailures = new HashMap<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>();
+ this.authorizationFailures = new java.util.HashMap<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>();
}
this.authorizationFailures.put(key, val);
}
- public Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> getAuthorizationFailures() {
+ public java.util.Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> getAuthorizationFailures() {
return this.authorizationFailures;
}
- public UpdateErrors setAuthorizationFailures(Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> authorizationFailures) {
+ public UpdateErrors setAuthorizationFailures(java.util.Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> authorizationFailures) {
this.authorizationFailures = authorizationFailures;
return this;
}
@@ -328,13 +298,13 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case FAILED_EXTENTS:
if (value == null) {
unsetFailedExtents();
} else {
- setFailedExtents((Map<TKeyExtent,Long>)value);
+ setFailedExtents((java.util.Map<TKeyExtent,java.lang.Long>)value);
}
break;
@@ -342,7 +312,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (value == null) {
unsetViolationSummaries();
} else {
- setViolationSummaries((List<TConstraintViolationSummary>)value);
+ setViolationSummaries((java.util.List<TConstraintViolationSummary>)value);
}
break;
@@ -350,14 +320,14 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (value == null) {
unsetAuthorizationFailures();
} else {
- setAuthorizationFailures((Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>)value);
+ setAuthorizationFailures((java.util.Map<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FAILED_EXTENTS:
return getFailedExtents();
@@ -369,13 +339,13 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
return getAuthorizationFailures();
}
- 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) {
@@ -386,11 +356,11 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
case AUTHORIZATION_FAILURES:
return isSetAuthorizationFailures();
}
- 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 UpdateErrors)
@@ -401,6 +371,8 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
public boolean equals(UpdateErrors that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_failedExtents = true && this.isSetFailedExtents();
boolean that_present_failedExtents = true && that.isSetFailedExtents();
@@ -434,24 +406,21 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_failedExtents = true && (isSetFailedExtents());
- list.add(present_failedExtents);
- if (present_failedExtents)
- list.add(failedExtents);
+ hashCode = hashCode * 8191 + ((isSetFailedExtents()) ? 131071 : 524287);
+ if (isSetFailedExtents())
+ hashCode = hashCode * 8191 + failedExtents.hashCode();
- boolean present_violationSummaries = true && (isSetViolationSummaries());
- list.add(present_violationSummaries);
- if (present_violationSummaries)
- list.add(violationSummaries);
+ hashCode = hashCode * 8191 + ((isSetViolationSummaries()) ? 131071 : 524287);
+ if (isSetViolationSummaries())
+ hashCode = hashCode * 8191 + violationSummaries.hashCode();
- boolean present_authorizationFailures = true && (isSetAuthorizationFailures());
- list.add(present_authorizationFailures);
- if (present_authorizationFailures)
- list.add(authorizationFailures);
+ hashCode = hashCode * 8191 + ((isSetAuthorizationFailures()) ? 131071 : 524287);
+ if (isSetAuthorizationFailures())
+ hashCode = hashCode * 8191 + authorizationFailures.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -462,7 +431,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetFailedExtents()).compareTo(other.isSetFailedExtents());
+ lastComparison = java.lang.Boolean.valueOf(isSetFailedExtents()).compareTo(other.isSetFailedExtents());
if (lastComparison != 0) {
return lastComparison;
}
@@ -472,7 +441,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetViolationSummaries()).compareTo(other.isSetViolationSummaries());
+ lastComparison = java.lang.Boolean.valueOf(isSetViolationSummaries()).compareTo(other.isSetViolationSummaries());
if (lastComparison != 0) {
return lastComparison;
}
@@ -482,7 +451,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthorizationFailures()).compareTo(other.isSetAuthorizationFailures());
+ lastComparison = java.lang.Boolean.valueOf(isSetAuthorizationFailures()).compareTo(other.isSetAuthorizationFailures());
if (lastComparison != 0) {
return lastComparison;
}
@@ -500,16 +469,16 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
}
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("UpdateErrors(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("UpdateErrors(");
boolean first = true;
sb.append("failedExtents:");
@@ -552,7 +521,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
}
}
- 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) {
@@ -560,13 +529,13 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
}
}
- private static class UpdateErrorsStandardSchemeFactory implements SchemeFactory {
+ private static class UpdateErrorsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UpdateErrorsStandardScheme getScheme() {
return new UpdateErrorsStandardScheme();
}
}
- private static class UpdateErrorsStandardScheme extends StandardScheme<UpdateErrors> {
+ private static class UpdateErrorsStandardScheme extends org.apache.thrift.scheme.StandardScheme<UpdateErrors> {
public void read(org.apache.thrift.protocol.TProtocol iprot, UpdateErrors struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -582,7 +551,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map58 = iprot.readMapBegin();
- struct.failedExtents = new HashMap<TKeyExtent,Long>(2*_map58.size);
+ struct.failedExtents = new java.util.HashMap<TKeyExtent,java.lang.Long>(2*_map58.size);
TKeyExtent _key59;
long _val60;
for (int _i61 = 0; _i61 < _map58.size; ++_i61)
@@ -603,7 +572,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
- struct.violationSummaries = new ArrayList<TConstraintViolationSummary>(_list62.size);
+ struct.violationSummaries = new java.util.ArrayList<TConstraintViolationSummary>(_list62.size);
TConstraintViolationSummary _elem63;
for (int _i64 = 0; _i64 < _list62.size; ++_i64)
{
@@ -622,7 +591,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map65 = iprot.readMapBegin();
- struct.authorizationFailures = new HashMap<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>(2*_map65.size);
+ struct.authorizationFailures = new java.util.HashMap<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>(2*_map65.size);
TKeyExtent _key66;
org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode _val67;
for (int _i68 = 0; _i68 < _map65.size; ++_i68)
@@ -658,7 +627,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
oprot.writeFieldBegin(FAILED_EXTENTS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, struct.failedExtents.size()));
- for (Map.Entry<TKeyExtent, Long> _iter69 : struct.failedExtents.entrySet())
+ for (java.util.Map.Entry<TKeyExtent, java.lang.Long> _iter69 : struct.failedExtents.entrySet())
{
_iter69.getKey().write(oprot);
oprot.writeI64(_iter69.getValue());
@@ -683,7 +652,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
oprot.writeFieldBegin(AUTHORIZATION_FAILURES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I32, struct.authorizationFailures.size()));
- for (Map.Entry<TKeyExtent, org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> _iter71 : struct.authorizationFailures.entrySet())
+ for (java.util.Map.Entry<TKeyExtent, org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> _iter71 : struct.authorizationFailures.entrySet())
{
_iter71.getKey().write(oprot);
oprot.writeI32(_iter71.getValue().getValue());
@@ -698,18 +667,18 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
}
- private static class UpdateErrorsTupleSchemeFactory implements SchemeFactory {
+ private static class UpdateErrorsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UpdateErrorsTupleScheme getScheme() {
return new UpdateErrorsTupleScheme();
}
}
- private static class UpdateErrorsTupleScheme extends TupleScheme<UpdateErrors> {
+ private static class UpdateErrorsTupleScheme extends org.apache.thrift.scheme.TupleScheme<UpdateErrors> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, UpdateErrors 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.isSetFailedExtents()) {
optionals.set(0);
}
@@ -723,7 +692,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (struct.isSetFailedExtents()) {
{
oprot.writeI32(struct.failedExtents.size());
- for (Map.Entry<TKeyExtent, Long> _iter72 : struct.failedExtents.entrySet())
+ for (java.util.Map.Entry<TKeyExtent, java.lang.Long> _iter72 : struct.failedExtents.entrySet())
{
_iter72.getKey().write(oprot);
oprot.writeI64(_iter72.getValue());
@@ -742,7 +711,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (struct.isSetAuthorizationFailures()) {
{
oprot.writeI32(struct.authorizationFailures.size());
- for (Map.Entry<TKeyExtent, org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> _iter74 : struct.authorizationFailures.entrySet())
+ for (java.util.Map.Entry<TKeyExtent, org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode> _iter74 : struct.authorizationFailures.entrySet())
{
_iter74.getKey().write(oprot);
oprot.writeI32(_iter74.getValue().getValue());
@@ -753,12 +722,12 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, UpdateErrors 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)) {
{
org.apache.thrift.protocol.TMap _map75 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.failedExtents = new HashMap<TKeyExtent,Long>(2*_map75.size);
+ struct.failedExtents = new java.util.HashMap<TKeyExtent,java.lang.Long>(2*_map75.size);
TKeyExtent _key76;
long _val77;
for (int _i78 = 0; _i78 < _map75.size; ++_i78)
@@ -774,7 +743,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.violationSummaries = new ArrayList<TConstraintViolationSummary>(_list79.size);
+ struct.violationSummaries = new java.util.ArrayList<TConstraintViolationSummary>(_list79.size);
TConstraintViolationSummary _elem80;
for (int _i81 = 0; _i81 < _list79.size; ++_i81)
{
@@ -788,7 +757,7 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map82 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.authorizationFailures = new HashMap<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>(2*_map82.size);
+ struct.authorizationFailures = new java.util.HashMap<TKeyExtent,org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode>(2*_map82.size);
TKeyExtent _key83;
org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode _val84;
for (int _i85 = 0; _i85 < _map82.size; ++_i85)
@@ -804,5 +773,9 @@ public class UpdateErrors implements org.apache.thrift.TBase<UpdateErrors, Updat
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[17/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
index 4ce9927..641556c 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
@@ -15,53 +15,26 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TabletClientService {
public interface Iface extends org.apache.accumulo.core.client.impl.thrift.ClientService.Iface {
- public org.apache.accumulo.core.data.thrift.InitialScan startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, TooManyFilesException, TSampleNotPresentException, org.apache.thrift.TException;
+ public org.apache.accumulo.core.data.thrift.InitialScan startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, TooManyFilesException, TSampleNotPresentException, org.apache.thrift.TException;
public org.apache.accumulo.core.data.thrift.ScanResult continueScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID) throws NoSuchScanIDException, NotServingTabletException, TooManyFilesException, TSampleNotPresentException, org.apache.thrift.TException;
public void closeScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID) throws org.apache.thrift.TException;
- public org.apache.accumulo.core.data.thrift.InitialMultiScan startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TRange>> batch, List<org.apache.accumulo.core.data.thrift.TColumn> columns, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, TSampleNotPresentException, org.apache.thrift.TException;
+ public org.apache.accumulo.core.data.thrift.InitialMultiScan startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TRange>> batch, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, TSampleNotPresentException, org.apache.thrift.TException;
public org.apache.accumulo.core.data.thrift.MultiScanResult continueMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID) throws NoSuchScanIDException, TSampleNotPresentException, org.apache.thrift.TException;
@@ -69,119 +42,119 @@ public class TabletClientService {
public long startUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, TDurability durability) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public void applyUpdates(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, List<org.apache.accumulo.core.data.thrift.TMutation> mutations) throws org.apache.thrift.TException;
+ public void applyUpdates(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, java.util.List<org.apache.accumulo.core.data.thrift.TMutation> mutations) throws org.apache.thrift.TException;
public org.apache.accumulo.core.data.thrift.UpdateErrors closeUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID) throws NoSuchScanIDException, org.apache.thrift.TException;
public void update(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.data.thrift.TMutation mutation, TDurability durability) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, ConstraintViolationException, org.apache.thrift.TException;
- public org.apache.accumulo.core.data.thrift.TConditionalSession startConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, List<ByteBuffer> authorizations, String tableID, TDurability durability, String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+ public org.apache.accumulo.core.data.thrift.TConditionalSession startConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.List<java.nio.ByteBuffer> authorizations, java.lang.String tableID, TDurability durability, java.lang.String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public List<org.apache.accumulo.core.data.thrift.TCMResult> conditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TConditionalMutation>> mutations, List<String> symbols) throws NoSuchScanIDException, org.apache.thrift.TException;
+ public java.util.List<org.apache.accumulo.core.data.thrift.TCMResult> conditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TConditionalMutation>> mutations, java.util.List<java.lang.String> symbols) throws NoSuchScanIDException, org.apache.thrift.TException;
public void invalidateConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID) throws org.apache.thrift.TException;
public void closeConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID) throws org.apache.thrift.TException;
- public List<org.apache.accumulo.core.data.thrift.TKeyExtent> bulkImport(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files, boolean setTime) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> bulkImport(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.Map<java.lang.String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files, boolean setTime) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public void splitTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, ByteBuffer splitPoint) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, org.apache.thrift.TException;
+ public void splitTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, java.nio.ByteBuffer splitPoint) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, org.apache.thrift.TException;
- public void loadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException;
+ public void loadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException;
- public void unloadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, TUnloadTabletGoal goal, long requestTime) throws org.apache.thrift.TException;
+ public void unloadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, TUnloadTabletGoal goal, long requestTime) throws org.apache.thrift.TException;
- public void flush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws org.apache.thrift.TException;
+ public void flush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, java.lang.String tableId, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow) throws org.apache.thrift.TException;
- public void flushTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException;
+ public void flushTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException;
- public void chop(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException;
+ public void chop(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException;
- public void compact(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws org.apache.thrift.TException;
+ public void compact(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, java.lang.String tableId, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow) throws org.apache.thrift.TException;
public org.apache.accumulo.core.master.thrift.TabletServerStatus getTabletServerStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public List<TabletStats> getTabletStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableId) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+ public java.util.List<TabletStats> getTabletStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableId) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
public TabletStats getHistoricalStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public void halt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+ public void halt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public void fastHalt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock) throws org.apache.thrift.TException;
+ public void fastHalt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock) throws org.apache.thrift.TException;
- public List<ActiveScan> getActiveScans(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+ public java.util.List<ActiveScan> getActiveScans(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public List<ActiveCompaction> getActiveCompactions(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
+ public java.util.List<ActiveCompaction> getActiveCompactions(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException;
- public void removeLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, List<String> filenames) throws org.apache.thrift.TException;
+ public void removeLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.List<java.lang.String> filenames) throws org.apache.thrift.TException;
- public List<String> getActiveLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException;
+ public java.util.List<java.lang.String> getActiveLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException;
}
public interface AsyncIface extends org.apache.accumulo.core.client.impl.thrift.ClientService .AsyncIface {
- public void startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.InitialScan> resultHandler) throws org.apache.thrift.TException;
- public void continueScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void continueScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.ScanResult> resultHandler) throws org.apache.thrift.TException;
- public void closeScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void closeScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TRange>> batch, List<org.apache.accumulo.core.data.thrift.TColumn> columns, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TRange>> batch, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.InitialMultiScan> resultHandler) throws org.apache.thrift.TException;
- public void continueMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void continueMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.MultiScanResult> resultHandler) throws org.apache.thrift.TException;
- public void closeMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void closeMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void startUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, TDurability durability, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void startUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, TDurability durability, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
- public void applyUpdates(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, List<org.apache.accumulo.core.data.thrift.TMutation> mutations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void applyUpdates(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, java.util.List<org.apache.accumulo.core.data.thrift.TMutation> mutations, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void closeUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void closeUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.UpdateErrors> resultHandler) throws org.apache.thrift.TException;
- public void update(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.data.thrift.TMutation mutation, TDurability durability, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void update(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, org.apache.accumulo.core.data.thrift.TMutation mutation, TDurability durability, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void startConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, List<ByteBuffer> authorizations, String tableID, TDurability durability, String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void startConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.List<java.nio.ByteBuffer> authorizations, java.lang.String tableID, TDurability durability, java.lang.String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.TConditionalSession> resultHandler) throws org.apache.thrift.TException;
- public void conditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TConditionalMutation>> mutations, List<String> symbols, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void conditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TConditionalMutation>> mutations, java.util.List<java.lang.String> symbols, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.accumulo.core.data.thrift.TCMResult>> resultHandler) throws org.apache.thrift.TException;
- public void invalidateConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void invalidateConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void closeConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void closeConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void bulkImport(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files, boolean setTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void bulkImport(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.Map<java.lang.String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files, boolean setTime, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent>> resultHandler) throws org.apache.thrift.TException;
- public void splitTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, ByteBuffer splitPoint, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void splitTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, java.nio.ByteBuffer splitPoint, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void loadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void loadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void unloadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, TUnloadTabletGoal goal, long requestTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void unloadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, TUnloadTabletGoal goal, long requestTime, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void flush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void flush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, java.lang.String tableId, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void flushTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void flushTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void chop(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void chop(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void compact(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void compact(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, java.lang.String tableId, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getTabletServerStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTabletServerStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.master.thrift.TabletServerStatus> resultHandler) throws org.apache.thrift.TException;
- public void getTabletStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTabletStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TabletStats>> resultHandler) throws org.apache.thrift.TException;
- public void getHistoricalStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getHistoricalStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<TabletStats> resultHandler) throws org.apache.thrift.TException;
- public void halt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void halt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void fastHalt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void fastHalt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getActiveScans(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getActiveScans(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveScan>> resultHandler) throws org.apache.thrift.TException;
- public void getActiveCompactions(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getActiveCompactions(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveCompaction>> resultHandler) throws org.apache.thrift.TException;
- public void removeLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, List<String> filenames, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.List<java.lang.String> filenames, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getActiveLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getActiveLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
}
@@ -205,13 +178,13 @@ public class TabletClientService {
super(iprot, oprot);
}
- public org.apache.accumulo.core.data.thrift.InitialScan startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, TooManyFilesException, TSampleNotPresentException, org.apache.thrift.TException
+ public org.apache.accumulo.core.data.thrift.InitialScan startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, TooManyFilesException, TSampleNotPresentException, org.apache.thrift.TException
{
send_startScan(tinfo, credentials, extent, range, columns, batchSize, ssiList, ssio, authorizations, waitForWrites, isolated, readaheadThreshold, samplerConfig, batchTimeOut, classLoaderContext);
return recv_startScan();
}
- public void send_startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext) throws org.apache.thrift.TException
+ public void send_startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext) throws org.apache.thrift.TException
{
startScan_args args = new startScan_args();
args.setTinfo(tinfo);
@@ -303,13 +276,13 @@ public class TabletClientService {
sendBaseOneway("closeScan", args);
}
- public org.apache.accumulo.core.data.thrift.InitialMultiScan startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TRange>> batch, List<org.apache.accumulo.core.data.thrift.TColumn> columns, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, TSampleNotPresentException, org.apache.thrift.TException
+ public org.apache.accumulo.core.data.thrift.InitialMultiScan startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TRange>> batch, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, TSampleNotPresentException, org.apache.thrift.TException
{
send_startMultiScan(tinfo, credentials, batch, columns, ssiList, ssio, authorizations, waitForWrites, samplerConfig, batchTimeOut, classLoaderContext);
return recv_startMultiScan();
}
- public void send_startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TRange>> batch, List<org.apache.accumulo.core.data.thrift.TColumn> columns, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext) throws org.apache.thrift.TException
+ public void send_startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TRange>> batch, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext) throws org.apache.thrift.TException
{
startMultiScan_args args = new startMultiScan_args();
args.setTinfo(tinfo);
@@ -424,12 +397,12 @@ public class TabletClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startUpdate failed: unknown result");
}
- public void applyUpdates(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, List<org.apache.accumulo.core.data.thrift.TMutation> mutations) throws org.apache.thrift.TException
+ public void applyUpdates(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, java.util.List<org.apache.accumulo.core.data.thrift.TMutation> mutations) throws org.apache.thrift.TException
{
send_applyUpdates(tinfo, updateID, keyExtent, mutations);
}
- public void send_applyUpdates(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, List<org.apache.accumulo.core.data.thrift.TMutation> mutations) throws org.apache.thrift.TException
+ public void send_applyUpdates(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long updateID, org.apache.accumulo.core.data.thrift.TKeyExtent keyExtent, java.util.List<org.apache.accumulo.core.data.thrift.TMutation> mutations) throws org.apache.thrift.TException
{
applyUpdates_args args = new applyUpdates_args();
args.setTinfo(tinfo);
@@ -499,13 +472,13 @@ public class TabletClientService {
return;
}
- public org.apache.accumulo.core.data.thrift.TConditionalSession startConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, List<ByteBuffer> authorizations, String tableID, TDurability durability, String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public org.apache.accumulo.core.data.thrift.TConditionalSession startConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.List<java.nio.ByteBuffer> authorizations, java.lang.String tableID, TDurability durability, java.lang.String classLoaderContext) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
send_startConditionalUpdate(tinfo, credentials, authorizations, tableID, durability, classLoaderContext);
return recv_startConditionalUpdate();
}
- public void send_startConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, List<ByteBuffer> authorizations, String tableID, TDurability durability, String classLoaderContext) throws org.apache.thrift.TException
+ public void send_startConditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.List<java.nio.ByteBuffer> authorizations, java.lang.String tableID, TDurability durability, java.lang.String classLoaderContext) throws org.apache.thrift.TException
{
startConditionalUpdate_args args = new startConditionalUpdate_args();
args.setTinfo(tinfo);
@@ -530,13 +503,13 @@ public class TabletClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startConditionalUpdate failed: unknown result");
}
- public List<org.apache.accumulo.core.data.thrift.TCMResult> conditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TConditionalMutation>> mutations, List<String> symbols) throws NoSuchScanIDException, org.apache.thrift.TException
+ public java.util.List<org.apache.accumulo.core.data.thrift.TCMResult> conditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TConditionalMutation>> mutations, java.util.List<java.lang.String> symbols) throws NoSuchScanIDException, org.apache.thrift.TException
{
send_conditionalUpdate(tinfo, sessID, mutations, symbols);
return recv_conditionalUpdate();
}
- public void send_conditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TConditionalMutation>> mutations, List<String> symbols) throws org.apache.thrift.TException
+ public void send_conditionalUpdate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long sessID, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TConditionalMutation>> mutations, java.util.List<java.lang.String> symbols) throws org.apache.thrift.TException
{
conditionalUpdate_args args = new conditionalUpdate_args();
args.setTinfo(tinfo);
@@ -546,7 +519,7 @@ public class TabletClientService {
sendBase("conditionalUpdate", args);
}
- public List<org.apache.accumulo.core.data.thrift.TCMResult> recv_conditionalUpdate() throws NoSuchScanIDException, org.apache.thrift.TException
+ public java.util.List<org.apache.accumulo.core.data.thrift.TCMResult> recv_conditionalUpdate() throws NoSuchScanIDException, org.apache.thrift.TException
{
conditionalUpdate_result result = new conditionalUpdate_result();
receiveBase(result, "conditionalUpdate");
@@ -593,13 +566,13 @@ public class TabletClientService {
sendBaseOneway("closeConditionalUpdate", args);
}
- public List<org.apache.accumulo.core.data.thrift.TKeyExtent> bulkImport(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files, boolean setTime) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> bulkImport(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.Map<java.lang.String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files, boolean setTime) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
send_bulkImport(tinfo, credentials, tid, files, setTime);
return recv_bulkImport();
}
- public void send_bulkImport(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files, boolean setTime) throws org.apache.thrift.TException
+ public void send_bulkImport(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.Map<java.lang.String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files, boolean setTime) throws org.apache.thrift.TException
{
bulkImport_args args = new bulkImport_args();
args.setTinfo(tinfo);
@@ -610,7 +583,7 @@ public class TabletClientService {
sendBase("bulkImport", args);
}
- public List<org.apache.accumulo.core.data.thrift.TKeyExtent> recv_bulkImport() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> recv_bulkImport() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
bulkImport_result result = new bulkImport_result();
receiveBase(result, "bulkImport");
@@ -623,13 +596,13 @@ public class TabletClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "bulkImport failed: unknown result");
}
- public void splitTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, ByteBuffer splitPoint) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, org.apache.thrift.TException
+ public void splitTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, java.nio.ByteBuffer splitPoint) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, org.apache.thrift.TException
{
send_splitTablet(tinfo, credentials, extent, splitPoint);
recv_splitTablet();
}
- public void send_splitTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, ByteBuffer splitPoint) throws org.apache.thrift.TException
+ public void send_splitTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, java.nio.ByteBuffer splitPoint) throws org.apache.thrift.TException
{
splitTablet_args args = new splitTablet_args();
args.setTinfo(tinfo);
@@ -652,12 +625,12 @@ public class TabletClientService {
return;
}
- public void loadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
+ public void loadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
{
send_loadTablet(tinfo, credentials, lock, extent);
}
- public void send_loadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
+ public void send_loadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
{
loadTablet_args args = new loadTablet_args();
args.setTinfo(tinfo);
@@ -667,12 +640,12 @@ public class TabletClientService {
sendBaseOneway("loadTablet", args);
}
- public void unloadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, TUnloadTabletGoal goal, long requestTime) throws org.apache.thrift.TException
+ public void unloadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, TUnloadTabletGoal goal, long requestTime) throws org.apache.thrift.TException
{
send_unloadTablet(tinfo, credentials, lock, extent, goal, requestTime);
}
- public void send_unloadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, TUnloadTabletGoal goal, long requestTime) throws org.apache.thrift.TException
+ public void send_unloadTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent, TUnloadTabletGoal goal, long requestTime) throws org.apache.thrift.TException
{
unloadTablet_args args = new unloadTablet_args();
args.setTinfo(tinfo);
@@ -684,12 +657,12 @@ public class TabletClientService {
sendBaseOneway("unloadTablet", args);
}
- public void flush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws org.apache.thrift.TException
+ public void flush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, java.lang.String tableId, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow) throws org.apache.thrift.TException
{
send_flush(tinfo, credentials, lock, tableId, startRow, endRow);
}
- public void send_flush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws org.apache.thrift.TException
+ public void send_flush(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, java.lang.String tableId, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow) throws org.apache.thrift.TException
{
flush_args args = new flush_args();
args.setTinfo(tinfo);
@@ -701,12 +674,12 @@ public class TabletClientService {
sendBaseOneway("flush", args);
}
- public void flushTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
+ public void flushTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
{
send_flushTablet(tinfo, credentials, lock, extent);
}
- public void send_flushTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
+ public void send_flushTablet(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
{
flushTablet_args args = new flushTablet_args();
args.setTinfo(tinfo);
@@ -716,12 +689,12 @@ public class TabletClientService {
sendBaseOneway("flushTablet", args);
}
- public void chop(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
+ public void chop(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
{
send_chop(tinfo, credentials, lock, extent);
}
- public void send_chop(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
+ public void send_chop(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, org.apache.accumulo.core.data.thrift.TKeyExtent extent) throws org.apache.thrift.TException
{
chop_args args = new chop_args();
args.setTinfo(tinfo);
@@ -731,12 +704,12 @@ public class TabletClientService {
sendBaseOneway("chop", args);
}
- public void compact(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws org.apache.thrift.TException
+ public void compact(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, java.lang.String tableId, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow) throws org.apache.thrift.TException
{
send_compact(tinfo, credentials, lock, tableId, startRow, endRow);
}
- public void send_compact(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws org.apache.thrift.TException
+ public void send_compact(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock, java.lang.String tableId, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow) throws org.apache.thrift.TException
{
compact_args args = new compact_args();
args.setTinfo(tinfo);
@@ -775,13 +748,13 @@ public class TabletClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTabletServerStatus failed: unknown result");
}
- public List<TabletStats> getTabletStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableId) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<TabletStats> getTabletStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableId) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
send_getTabletStats(tinfo, credentials, tableId);
return recv_getTabletStats();
}
- public void send_getTabletStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableId) throws org.apache.thrift.TException
+ public void send_getTabletStats(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableId) throws org.apache.thrift.TException
{
getTabletStats_args args = new getTabletStats_args();
args.setTinfo(tinfo);
@@ -790,7 +763,7 @@ public class TabletClientService {
sendBase("getTabletStats", args);
}
- public List<TabletStats> recv_getTabletStats() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<TabletStats> recv_getTabletStats() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
getTabletStats_result result = new getTabletStats_result();
receiveBase(result, "getTabletStats");
@@ -830,13 +803,13 @@ public class TabletClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHistoricalStats failed: unknown result");
}
- public void halt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public void halt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
send_halt(tinfo, credentials, lock);
recv_halt();
}
- public void send_halt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock) throws org.apache.thrift.TException
+ public void send_halt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock) throws org.apache.thrift.TException
{
halt_args args = new halt_args();
args.setTinfo(tinfo);
@@ -855,12 +828,12 @@ public class TabletClientService {
return;
}
- public void fastHalt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock) throws org.apache.thrift.TException
+ public void fastHalt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock) throws org.apache.thrift.TException
{
send_fastHalt(tinfo, credentials, lock);
}
- public void send_fastHalt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String lock) throws org.apache.thrift.TException
+ public void send_fastHalt(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String lock) throws org.apache.thrift.TException
{
fastHalt_args args = new fastHalt_args();
args.setTinfo(tinfo);
@@ -869,7 +842,7 @@ public class TabletClientService {
sendBaseOneway("fastHalt", args);
}
- public List<ActiveScan> getActiveScans(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<ActiveScan> getActiveScans(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
send_getActiveScans(tinfo, credentials);
return recv_getActiveScans();
@@ -883,7 +856,7 @@ public class TabletClientService {
sendBase("getActiveScans", args);
}
- public List<ActiveScan> recv_getActiveScans() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<ActiveScan> recv_getActiveScans() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
getActiveScans_result result = new getActiveScans_result();
receiveBase(result, "getActiveScans");
@@ -896,7 +869,7 @@ public class TabletClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveScans failed: unknown result");
}
- public List<ActiveCompaction> getActiveCompactions(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<ActiveCompaction> getActiveCompactions(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
send_getActiveCompactions(tinfo, credentials);
return recv_getActiveCompactions();
@@ -910,7 +883,7 @@ public class TabletClientService {
sendBase("getActiveCompactions", args);
}
- public List<ActiveCompaction> recv_getActiveCompactions() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<ActiveCompaction> recv_getActiveCompactions() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.thrift.TException
{
getActiveCompactions_result result = new getActiveCompactions_result();
receiveBase(result, "getActiveCompactions");
@@ -923,12 +896,12 @@ public class TabletClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCompactions failed: unknown result");
}
- public void removeLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, List<String> filenames) throws org.apache.thrift.TException
+ public void removeLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.List<java.lang.String> filenames) throws org.apache.thrift.TException
{
send_removeLogs(tinfo, credentials, filenames);
}
- public void send_removeLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, List<String> filenames) throws org.apache.thrift.TException
+ public void send_removeLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.List<java.lang.String> filenames) throws org.apache.thrift.TException
{
removeLogs_args args = new removeLogs_args();
args.setTinfo(tinfo);
@@ -937,7 +910,7 @@ public class TabletClientService {
sendBaseOneway("removeLogs", args);
}
- public List<String> getActiveLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
+ public java.util.List<java.lang.String> getActiveLogs(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
{
send_getActiveLogs(tinfo, credentials);
return recv_getActiveLogs();
@@ -951,7 +924,7 @@ public class TabletClientService {
sendBase("getActiveLogs", args);
}
- public List<String> recv_getActiveLogs() throws org.apache.thrift.TException
+ public java.util.List<java.lang.String> recv_getActiveLogs() throws org.apache.thrift.TException
{
getActiveLogs_result result = new getActiveLogs_result();
receiveBase(result, "getActiveLogs");
@@ -979,30 +952,30 @@ public class TabletClientService {
super(protocolFactory, clientManager, transport);
}
- public void startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void startScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.InitialScan> resultHandler) throws org.apache.thrift.TException {
checkReady();
startScan_call method_call = new startScan_call(tinfo, credentials, extent, range, columns, batchSize, ssiList, ssio, authorizations, waitForWrites, isolated, readaheadThreshold, samplerConfig, batchTimeOut, classLoaderContext, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class startScan_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class startScan_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.accumulo.core.data.thrift.InitialScan> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
private org.apache.accumulo.core.data.thrift.TKeyExtent extent;
private org.apache.accumulo.core.data.thrift.TRange range;
- private List<org.apache.accumulo.core.data.thrift.TColumn> columns;
+ private java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns;
private int batchSize;
- private List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList;
- private Map<String,Map<String,String>> ssio;
- private List<ByteBuffer> authorizations;
+ private java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList;
+ private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio;
+ private java.util.List<java.nio.ByteBuffer> authorizations;
private boolean waitForWrites;
private boolean isolated;
private long readaheadThreshold;
private TSamplerConfiguration samplerConfig;
private long batchTimeOut;
- private String classLoaderContext;
- public startScan_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String classLoaderContext;
+ public startScan_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.data.thrift.TKeyExtent extent, org.apache.accumulo.core.data.thrift.TRange range, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, int batchSize, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, boolean isolated, long readaheadThreshold, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.InitialScan> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apa
che.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.tinfo = tinfo;
this.credentials = credentials;
@@ -1045,7 +1018,7 @@ public class TabletClientService {
public org.apache.accumulo.core.data.thrift.InitialScan getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, NotServingTabletException, TooManyFilesException, TSampleNotPresentException, 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);
@@ -1053,17 +1026,17 @@ public class TabletClientService {
}
}
- public void continueScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void continueScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.ScanResult> resultHandler) throws org.apache.thrift.TException {
checkReady();
continueScan_call method_call = new continueScan_call(tinfo, scanID, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class continueScan_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class continueScan_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.accumulo.core.data.thrift.ScanResult> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private long scanID;
- public continueScan_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, 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 continueScan_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.ScanResult> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.tinfo = tinfo;
this.scanID = scanID;
@@ -1080,7 +1053,7 @@ public class TabletClientService {
public org.apache.accumulo.core.data.thrift.ScanResult getResult() throws NoSuchScanIDException, NotServingTabletException, TooManyFilesException, TSampleNotPresentException, 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);
@@ -1088,17 +1061,17 @@ public class TabletClientService {
}
}
- public void closeScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void closeScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
closeScan_call method_call = new closeScan_call(tinfo, scanID, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class closeScan_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class closeScan_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private long scanID;
- public closeScan_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, 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 closeScan_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long scanID, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
this.tinfo = tinfo;
this.scanID = scanID;
@@ -1113,35 +1086,36 @@ public class TabletClientService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.thrift.TException {
+ public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return null;
}
}
- public void startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TRange>> batch, List<org.apache.accumulo.core.data.thrift.TColumn> columns, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void startMultiScan(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TRange>> batch, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, java.lang.String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback<org.apache.accumulo.core.data.thrift.InitialMultiScan> resultHandler) throws org.apache.thrift.TException {
checkReady();
startMultiScan_call method_call = new startMultiScan_call(tinfo, credentials, batch, columns, ssiList, ssio, authorizations, waitForWrites, samplerConfig, batchTimeOut, classLoaderContext, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class startMultiScan_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class startMultiScan_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.accumulo.core.data.thrift.InitialMultiScan> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- private Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TRange>> batch;
- private List<org.apache.accumulo.core.data.thrift.TColumn> columns;
- private List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList;
- private Map<String,Map<String,String>> ssio;
- private List<ByteBuffer> authorizations;
+ private java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TRange>> batch;
+ private java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns;
+ private java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList;
+ private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio;
+ private java.util.List<java.nio.ByteBuffer> authorizations;
private boolean waitForWrites;
private TSamplerConfiguration samplerConfig;
private long batchTimeOut;
- private String classLoaderContext;
- public startMultiScan_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, Map<org.apache.accumulo.core.data.thrift.TKeyExtent,List<org.apache.accumulo.core.data.thrift.TRange>> batch, List<org.apache.accumulo.core.data.thrift.TColumn> columns, List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchTimeOut, String classLoaderContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.lang.String classLoaderContext;
+ public startMultiScan_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.util.Map<org.apache.accumulo.core.data.thrift.TKeyExtent,java.util.List<org.apache.accumulo.core.data.thrift.TRange>> batch, java.util.List<org.apache.accumulo.core.data.thrift.TColumn> columns, java.util.List<org.apache.accumulo.core.data.thrift.IterInfo> ssiList, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> ssio, java.util.List<java.nio.ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration samplerConfig, long batchT
<TRUNCATED>
[13/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java
index 777e075..8b9e20f 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOptions, BatchScanOptions._Fields>, java.io.Serializable, Cloneable, Comparable<BatchScanOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchScanOptions");
@@ -60,16 +33,13 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField THREADS_FIELD_DESC = new org.apache.thrift.protocol.TField("threads", org.apache.thrift.protocol.TType.I32, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new BatchScanOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new BatchScanOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BatchScanOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BatchScanOptionsTupleSchemeFactory();
- public Set<ByteBuffer> authorizations; // optional
- public List<Range> ranges; // optional
- public List<ScanColumn> columns; // optional
- public List<IteratorSetting> iterators; // optional
+ public java.util.Set<java.nio.ByteBuffer> authorizations; // optional
+ public java.util.List<Range> ranges; // optional
+ public java.util.List<ScanColumn> columns; // optional
+ public java.util.List<IteratorSetting> iterators; // optional
public int threads; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -80,10 +50,10 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
ITERATORS((short)4, "iterators"),
THREADS((short)5, "threads");
- 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);
}
}
@@ -114,21 +84,21 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
*/
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;
}
@@ -137,7 +107,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -146,9 +116,9 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
private static final int __THREADS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.AUTHORIZATIONS,_Fields.RANGES,_Fields.COLUMNS,_Fields.ITERATORS,_Fields.THREADS};
- 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.AUTHORIZATIONS, new org.apache.thrift.meta_data.FieldMetaData("authorizations", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
@@ -163,7 +133,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IteratorSetting.class))));
tmpMap.put(_Fields.THREADS, new org.apache.thrift.meta_data.FieldMetaData("threads", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BatchScanOptions.class, metaDataMap);
}
@@ -176,25 +146,25 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
public BatchScanOptions(BatchScanOptions other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetAuthorizations()) {
- Set<ByteBuffer> __this__authorizations = new HashSet<ByteBuffer>(other.authorizations);
+ java.util.Set<java.nio.ByteBuffer> __this__authorizations = new java.util.HashSet<java.nio.ByteBuffer>(other.authorizations);
this.authorizations = __this__authorizations;
}
if (other.isSetRanges()) {
- List<Range> __this__ranges = new ArrayList<Range>(other.ranges.size());
+ java.util.List<Range> __this__ranges = new java.util.ArrayList<Range>(other.ranges.size());
for (Range other_element : other.ranges) {
__this__ranges.add(new Range(other_element));
}
this.ranges = __this__ranges;
}
if (other.isSetColumns()) {
- List<ScanColumn> __this__columns = new ArrayList<ScanColumn>(other.columns.size());
+ java.util.List<ScanColumn> __this__columns = new java.util.ArrayList<ScanColumn>(other.columns.size());
for (ScanColumn other_element : other.columns) {
__this__columns.add(new ScanColumn(other_element));
}
this.columns = __this__columns;
}
if (other.isSetIterators()) {
- List<IteratorSetting> __this__iterators = new ArrayList<IteratorSetting>(other.iterators.size());
+ java.util.List<IteratorSetting> __this__iterators = new java.util.ArrayList<IteratorSetting>(other.iterators.size());
for (IteratorSetting other_element : other.iterators) {
__this__iterators.add(new IteratorSetting(other_element));
}
@@ -221,22 +191,22 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
return (this.authorizations == null) ? 0 : this.authorizations.size();
}
- public java.util.Iterator<ByteBuffer> getAuthorizationsIterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> getAuthorizationsIterator() {
return (this.authorizations == null) ? null : this.authorizations.iterator();
}
- public void addToAuthorizations(ByteBuffer elem) {
+ public void addToAuthorizations(java.nio.ByteBuffer elem) {
if (this.authorizations == null) {
- this.authorizations = new HashSet<ByteBuffer>();
+ this.authorizations = new java.util.HashSet<java.nio.ByteBuffer>();
}
this.authorizations.add(elem);
}
- public Set<ByteBuffer> getAuthorizations() {
+ public java.util.Set<java.nio.ByteBuffer> getAuthorizations() {
return this.authorizations;
}
- public BatchScanOptions setAuthorizations(Set<ByteBuffer> authorizations) {
+ public BatchScanOptions setAuthorizations(java.util.Set<java.nio.ByteBuffer> authorizations) {
this.authorizations = authorizations;
return this;
}
@@ -266,16 +236,16 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
public void addToRanges(Range elem) {
if (this.ranges == null) {
- this.ranges = new ArrayList<Range>();
+ this.ranges = new java.util.ArrayList<Range>();
}
this.ranges.add(elem);
}
- public List<Range> getRanges() {
+ public java.util.List<Range> getRanges() {
return this.ranges;
}
- public BatchScanOptions setRanges(List<Range> ranges) {
+ public BatchScanOptions setRanges(java.util.List<Range> ranges) {
this.ranges = ranges;
return this;
}
@@ -305,16 +275,16 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
public void addToColumns(ScanColumn elem) {
if (this.columns == null) {
- this.columns = new ArrayList<ScanColumn>();
+ this.columns = new java.util.ArrayList<ScanColumn>();
}
this.columns.add(elem);
}
- public List<ScanColumn> getColumns() {
+ public java.util.List<ScanColumn> getColumns() {
return this.columns;
}
- public BatchScanOptions setColumns(List<ScanColumn> columns) {
+ public BatchScanOptions setColumns(java.util.List<ScanColumn> columns) {
this.columns = columns;
return this;
}
@@ -344,16 +314,16 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
public void addToIterators(IteratorSetting elem) {
if (this.iterators == null) {
- this.iterators = new ArrayList<IteratorSetting>();
+ this.iterators = new java.util.ArrayList<IteratorSetting>();
}
this.iterators.add(elem);
}
- public List<IteratorSetting> getIterators() {
+ public java.util.List<IteratorSetting> getIterators() {
return this.iterators;
}
- public BatchScanOptions setIterators(List<IteratorSetting> iterators) {
+ public BatchScanOptions setIterators(java.util.List<IteratorSetting> iterators) {
this.iterators = iterators;
return this;
}
@@ -384,25 +354,25 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
}
public void unsetThreads() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THREADS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THREADS_ISSET_ID);
}
/** Returns true if field threads is set (has been assigned a value) and false otherwise */
public boolean isSetThreads() {
- return EncodingUtils.testBit(__isset_bitfield, __THREADS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THREADS_ISSET_ID);
}
public void setThreadsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THREADS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THREADS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case AUTHORIZATIONS:
if (value == null) {
unsetAuthorizations();
} else {
- setAuthorizations((Set<ByteBuffer>)value);
+ setAuthorizations((java.util.Set<java.nio.ByteBuffer>)value);
}
break;
@@ -410,7 +380,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (value == null) {
unsetRanges();
} else {
- setRanges((List<Range>)value);
+ setRanges((java.util.List<Range>)value);
}
break;
@@ -418,7 +388,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (value == null) {
unsetColumns();
} else {
- setColumns((List<ScanColumn>)value);
+ setColumns((java.util.List<ScanColumn>)value);
}
break;
@@ -426,7 +396,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (value == null) {
unsetIterators();
} else {
- setIterators((List<IteratorSetting>)value);
+ setIterators((java.util.List<IteratorSetting>)value);
}
break;
@@ -434,14 +404,14 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (value == null) {
unsetThreads();
} else {
- setThreads((Integer)value);
+ setThreads((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTHORIZATIONS:
return getAuthorizations();
@@ -459,13 +429,13 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
return getThreads();
}
- 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) {
@@ -480,11 +450,11 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
case THREADS:
return isSetThreads();
}
- 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 BatchScanOptions)
@@ -495,6 +465,8 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
public boolean equals(BatchScanOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authorizations = true && this.isSetAuthorizations();
boolean that_present_authorizations = true && that.isSetAuthorizations();
@@ -546,34 +518,29 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_authorizations = true && (isSetAuthorizations());
- list.add(present_authorizations);
- if (present_authorizations)
- list.add(authorizations);
-
- boolean present_ranges = true && (isSetRanges());
- list.add(present_ranges);
- if (present_ranges)
- list.add(ranges);
-
- boolean present_columns = true && (isSetColumns());
- list.add(present_columns);
- if (present_columns)
- list.add(columns);
-
- boolean present_iterators = true && (isSetIterators());
- list.add(present_iterators);
- if (present_iterators)
- list.add(iterators);
-
- boolean present_threads = true && (isSetThreads());
- list.add(present_threads);
- if (present_threads)
- list.add(threads);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetAuthorizations()) ? 131071 : 524287);
+ if (isSetAuthorizations())
+ hashCode = hashCode * 8191 + authorizations.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetRanges()) ? 131071 : 524287);
+ if (isSetRanges())
+ hashCode = hashCode * 8191 + ranges.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
+ if (isSetColumns())
+ hashCode = hashCode * 8191 + columns.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetIterators()) ? 131071 : 524287);
+ if (isSetIterators())
+ hashCode = hashCode * 8191 + iterators.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetThreads()) ? 131071 : 524287);
+ if (isSetThreads())
+ hashCode = hashCode * 8191 + threads;
+
+ return hashCode;
}
@Override
@@ -584,7 +551,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
+ lastComparison = java.lang.Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -594,7 +561,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRanges()).compareTo(other.isSetRanges());
+ lastComparison = java.lang.Boolean.valueOf(isSetRanges()).compareTo(other.isSetRanges());
if (lastComparison != 0) {
return lastComparison;
}
@@ -604,7 +571,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@@ -614,7 +581,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
+ lastComparison = java.lang.Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
if (lastComparison != 0) {
return lastComparison;
}
@@ -624,7 +591,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetThreads()).compareTo(other.isSetThreads());
+ lastComparison = java.lang.Boolean.valueOf(isSetThreads()).compareTo(other.isSetThreads());
if (lastComparison != 0) {
return lastComparison;
}
@@ -642,16 +609,16 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
}
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("BatchScanOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("BatchScanOptions(");
boolean first = true;
if (isSetAuthorizations()) {
@@ -716,7 +683,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -726,13 +693,13 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
}
}
- private static class BatchScanOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class BatchScanOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BatchScanOptionsStandardScheme getScheme() {
return new BatchScanOptionsStandardScheme();
}
}
- private static class BatchScanOptionsStandardScheme extends StandardScheme<BatchScanOptions> {
+ private static class BatchScanOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<BatchScanOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, BatchScanOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -748,8 +715,8 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set50 = iprot.readSetBegin();
- struct.authorizations = new HashSet<ByteBuffer>(2*_set50.size);
- ByteBuffer _elem51;
+ struct.authorizations = new java.util.HashSet<java.nio.ByteBuffer>(2*_set50.size);
+ java.nio.ByteBuffer _elem51;
for (int _i52 = 0; _i52 < _set50.size; ++_i52)
{
_elem51 = iprot.readBinary();
@@ -766,7 +733,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list53 = iprot.readListBegin();
- struct.ranges = new ArrayList<Range>(_list53.size);
+ struct.ranges = new java.util.ArrayList<Range>(_list53.size);
Range _elem54;
for (int _i55 = 0; _i55 < _list53.size; ++_i55)
{
@@ -785,7 +752,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
- struct.columns = new ArrayList<ScanColumn>(_list56.size);
+ struct.columns = new java.util.ArrayList<ScanColumn>(_list56.size);
ScanColumn _elem57;
for (int _i58 = 0; _i58 < _list56.size; ++_i58)
{
@@ -804,7 +771,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
- struct.iterators = new ArrayList<IteratorSetting>(_list59.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list59.size);
IteratorSetting _elem60;
for (int _i61 = 0; _i61 < _list59.size; ++_i61)
{
@@ -847,7 +814,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
oprot.writeFieldBegin(AUTHORIZATIONS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.authorizations.size()));
- for (ByteBuffer _iter62 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter62 : struct.authorizations)
{
oprot.writeBinary(_iter62);
}
@@ -909,18 +876,18 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
}
- private static class BatchScanOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class BatchScanOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BatchScanOptionsTupleScheme getScheme() {
return new BatchScanOptionsTupleScheme();
}
}
- private static class BatchScanOptionsTupleScheme extends TupleScheme<BatchScanOptions> {
+ private static class BatchScanOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<BatchScanOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, BatchScanOptions 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.isSetAuthorizations()) {
optionals.set(0);
}
@@ -940,7 +907,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (struct.isSetAuthorizations()) {
{
oprot.writeI32(struct.authorizations.size());
- for (ByteBuffer _iter66 : struct.authorizations)
+ for (java.nio.ByteBuffer _iter66 : struct.authorizations)
{
oprot.writeBinary(_iter66);
}
@@ -980,13 +947,13 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BatchScanOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TSet _set70 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.authorizations = new HashSet<ByteBuffer>(2*_set70.size);
- ByteBuffer _elem71;
+ struct.authorizations = new java.util.HashSet<java.nio.ByteBuffer>(2*_set70.size);
+ java.nio.ByteBuffer _elem71;
for (int _i72 = 0; _i72 < _set70.size; ++_i72)
{
_elem71 = iprot.readBinary();
@@ -998,7 +965,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list73 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.ranges = new ArrayList<Range>(_list73.size);
+ struct.ranges = new java.util.ArrayList<Range>(_list73.size);
Range _elem74;
for (int _i75 = 0; _i75 < _list73.size; ++_i75)
{
@@ -1012,7 +979,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list76 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.columns = new ArrayList<ScanColumn>(_list76.size);
+ struct.columns = new java.util.ArrayList<ScanColumn>(_list76.size);
ScanColumn _elem77;
for (int _i78 = 0; _i78 < _list76.size; ++_i78)
{
@@ -1026,7 +993,7 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.iterators = new ArrayList<IteratorSetting>(_list79.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list79.size);
IteratorSetting _elem80;
for (int _i81 = 0; _i81 < _list79.size; ++_i81)
{
@@ -1044,5 +1011,9 @@ public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOption
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Column.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Column.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Column.java
index 96ae162..7220637 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Column.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Column.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class Column implements org.apache.thrift.TBase<Column, Column._Fields>, java.io.Serializable, Cloneable, Comparable<Column> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Column");
@@ -58,15 +31,12 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
private static final org.apache.thrift.protocol.TField COL_QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("colQualifier", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField COL_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("colVisibility", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ColumnStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ColumnTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ColumnStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ColumnTupleSchemeFactory();
- public ByteBuffer colFamily; // required
- public ByteBuffer colQualifier; // required
- public ByteBuffer colVisibility; // required
+ public java.nio.ByteBuffer colFamily; // required
+ public java.nio.ByteBuffer colQualifier; // required
+ public java.nio.ByteBuffer colVisibility; // 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 {
@@ -74,10 +44,10 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
COL_QUALIFIER((short)2, "colQualifier"),
COL_VISIBILITY((short)3, "colVisibility");
- 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);
}
}
@@ -104,21 +74,21 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
*/
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;
}
@@ -127,22 +97,22 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
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.COL_FAMILY, new org.apache.thrift.meta_data.FieldMetaData("colFamily", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COL_QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("colQualifier", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COL_VISIBILITY, new org.apache.thrift.meta_data.FieldMetaData("colVisibility", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Column.class, metaDataMap);
}
@@ -150,9 +120,9 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
}
public Column(
- ByteBuffer colFamily,
- ByteBuffer colQualifier,
- ByteBuffer colVisibility)
+ java.nio.ByteBuffer colFamily,
+ java.nio.ByteBuffer colQualifier,
+ java.nio.ByteBuffer colVisibility)
{
this();
this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(colFamily);
@@ -191,16 +161,16 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
return colFamily == null ? null : colFamily.array();
}
- public ByteBuffer bufferForColFamily() {
+ public java.nio.ByteBuffer bufferForColFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(colFamily);
}
public Column setColFamily(byte[] colFamily) {
- this.colFamily = colFamily == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colFamily, colFamily.length));
+ this.colFamily = colFamily == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colFamily.clone());
return this;
}
- public Column setColFamily(ByteBuffer colFamily) {
+ public Column setColFamily(java.nio.ByteBuffer colFamily) {
this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(colFamily);
return this;
}
@@ -225,16 +195,16 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
return colQualifier == null ? null : colQualifier.array();
}
- public ByteBuffer bufferForColQualifier() {
+ public java.nio.ByteBuffer bufferForColQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
}
public Column setColQualifier(byte[] colQualifier) {
- this.colQualifier = colQualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colQualifier, colQualifier.length));
+ this.colQualifier = colQualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colQualifier.clone());
return this;
}
- public Column setColQualifier(ByteBuffer colQualifier) {
+ public Column setColQualifier(java.nio.ByteBuffer colQualifier) {
this.colQualifier = org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
return this;
}
@@ -259,16 +229,16 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
return colVisibility == null ? null : colVisibility.array();
}
- public ByteBuffer bufferForColVisibility() {
+ public java.nio.ByteBuffer bufferForColVisibility() {
return org.apache.thrift.TBaseHelper.copyBinary(colVisibility);
}
public Column setColVisibility(byte[] colVisibility) {
- this.colVisibility = colVisibility == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colVisibility, colVisibility.length));
+ this.colVisibility = colVisibility == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colVisibility.clone());
return this;
}
- public Column setColVisibility(ByteBuffer colVisibility) {
+ public Column setColVisibility(java.nio.ByteBuffer colVisibility) {
this.colVisibility = org.apache.thrift.TBaseHelper.copyBinary(colVisibility);
return this;
}
@@ -288,13 +258,17 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COL_FAMILY:
if (value == null) {
unsetColFamily();
} else {
- setColFamily((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColFamily((byte[])value);
+ } else {
+ setColFamily((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -302,7 +276,11 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
if (value == null) {
unsetColQualifier();
} else {
- setColQualifier((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColQualifier((byte[])value);
+ } else {
+ setColQualifier((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -310,14 +288,18 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
if (value == null) {
unsetColVisibility();
} else {
- setColVisibility((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColVisibility((byte[])value);
+ } else {
+ setColVisibility((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COL_FAMILY:
return getColFamily();
@@ -329,13 +311,13 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
return getColVisibility();
}
- 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) {
@@ -346,11 +328,11 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
case COL_VISIBILITY:
return isSetColVisibility();
}
- 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 Column)
@@ -361,6 +343,8 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
public boolean equals(Column that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_colFamily = true && this.isSetColFamily();
boolean that_present_colFamily = true && that.isSetColFamily();
@@ -394,24 +378,21 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_colFamily = true && (isSetColFamily());
- list.add(present_colFamily);
- if (present_colFamily)
- list.add(colFamily);
+ hashCode = hashCode * 8191 + ((isSetColFamily()) ? 131071 : 524287);
+ if (isSetColFamily())
+ hashCode = hashCode * 8191 + colFamily.hashCode();
- boolean present_colQualifier = true && (isSetColQualifier());
- list.add(present_colQualifier);
- if (present_colQualifier)
- list.add(colQualifier);
+ hashCode = hashCode * 8191 + ((isSetColQualifier()) ? 131071 : 524287);
+ if (isSetColQualifier())
+ hashCode = hashCode * 8191 + colQualifier.hashCode();
- boolean present_colVisibility = true && (isSetColVisibility());
- list.add(present_colVisibility);
- if (present_colVisibility)
- list.add(colVisibility);
+ hashCode = hashCode * 8191 + ((isSetColVisibility()) ? 131071 : 524287);
+ if (isSetColVisibility())
+ hashCode = hashCode * 8191 + colVisibility.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -422,7 +403,7 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
+ lastComparison = java.lang.Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,7 +413,7 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -442,7 +423,7 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColVisibility()).compareTo(other.isSetColVisibility());
+ lastComparison = java.lang.Boolean.valueOf(isSetColVisibility()).compareTo(other.isSetColVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@@ -460,16 +441,16 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
}
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("Column(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Column(");
boolean first = true;
sb.append("colFamily:");
@@ -512,7 +493,7 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
}
}
- 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) {
@@ -520,13 +501,13 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
}
}
- private static class ColumnStandardSchemeFactory implements SchemeFactory {
+ private static class ColumnStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnStandardScheme getScheme() {
return new ColumnStandardScheme();
}
}
- private static class ColumnStandardScheme extends StandardScheme<Column> {
+ private static class ColumnStandardScheme extends org.apache.thrift.scheme.StandardScheme<Column> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Column struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -598,18 +579,18 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
}
- private static class ColumnTupleSchemeFactory implements SchemeFactory {
+ private static class ColumnTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnTupleScheme getScheme() {
return new ColumnTupleScheme();
}
}
- private static class ColumnTupleScheme extends TupleScheme<Column> {
+ private static class ColumnTupleScheme extends org.apache.thrift.scheme.TupleScheme<Column> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Column 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.isSetColFamily()) {
optionals.set(0);
}
@@ -633,8 +614,8 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Column 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.colFamily = iprot.readBinary();
struct.setColFamilyIsSet(true);
@@ -650,5 +631,9 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ColumnUpdate.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ColumnUpdate.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ColumnUpdate.java
index 33dfdbe..f655f46 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ColumnUpdate.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ColumnUpdate.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, ColumnUpdate._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnUpdate> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnUpdate");
@@ -61,17 +34,14 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField DELETE_CELL_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteCell", org.apache.thrift.protocol.TType.BOOL, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ColumnUpdateStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ColumnUpdateTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ColumnUpdateStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ColumnUpdateTupleSchemeFactory();
- public ByteBuffer colFamily; // required
- public ByteBuffer colQualifier; // required
- public ByteBuffer colVisibility; // optional
+ public java.nio.ByteBuffer colFamily; // required
+ public java.nio.ByteBuffer colQualifier; // required
+ public java.nio.ByteBuffer colVisibility; // optional
public long timestamp; // optional
- public ByteBuffer value; // optional
+ public java.nio.ByteBuffer value; // optional
public boolean deleteCell; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -83,10 +53,10 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
VALUE((short)5, "value"),
DELETE_CELL((short)6, "deleteCell");
- 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);
}
}
@@ -119,21 +89,21 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
*/
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;
}
@@ -142,7 +112,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -152,9 +122,9 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
private static final int __DELETECELL_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.COL_VISIBILITY,_Fields.TIMESTAMP,_Fields.VALUE,_Fields.DELETE_CELL};
- 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.COL_FAMILY, new org.apache.thrift.meta_data.FieldMetaData("colFamily", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COL_QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("colQualifier", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -167,7 +137,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.DELETE_CELL, new org.apache.thrift.meta_data.FieldMetaData("deleteCell", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnUpdate.class, metaDataMap);
}
@@ -175,8 +145,8 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
}
public ColumnUpdate(
- ByteBuffer colFamily,
- ByteBuffer colQualifier)
+ java.nio.ByteBuffer colFamily,
+ java.nio.ByteBuffer colQualifier)
{
this();
this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(colFamily);
@@ -225,16 +195,16 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return colFamily == null ? null : colFamily.array();
}
- public ByteBuffer bufferForColFamily() {
+ public java.nio.ByteBuffer bufferForColFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(colFamily);
}
public ColumnUpdate setColFamily(byte[] colFamily) {
- this.colFamily = colFamily == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colFamily, colFamily.length));
+ this.colFamily = colFamily == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colFamily.clone());
return this;
}
- public ColumnUpdate setColFamily(ByteBuffer colFamily) {
+ public ColumnUpdate setColFamily(java.nio.ByteBuffer colFamily) {
this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(colFamily);
return this;
}
@@ -259,16 +229,16 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return colQualifier == null ? null : colQualifier.array();
}
- public ByteBuffer bufferForColQualifier() {
+ public java.nio.ByteBuffer bufferForColQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
}
public ColumnUpdate setColQualifier(byte[] colQualifier) {
- this.colQualifier = colQualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colQualifier, colQualifier.length));
+ this.colQualifier = colQualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colQualifier.clone());
return this;
}
- public ColumnUpdate setColQualifier(ByteBuffer colQualifier) {
+ public ColumnUpdate setColQualifier(java.nio.ByteBuffer colQualifier) {
this.colQualifier = org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
return this;
}
@@ -293,16 +263,16 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return colVisibility == null ? null : colVisibility.array();
}
- public ByteBuffer bufferForColVisibility() {
+ public java.nio.ByteBuffer bufferForColVisibility() {
return org.apache.thrift.TBaseHelper.copyBinary(colVisibility);
}
public ColumnUpdate setColVisibility(byte[] colVisibility) {
- this.colVisibility = colVisibility == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colVisibility, colVisibility.length));
+ this.colVisibility = colVisibility == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colVisibility.clone());
return this;
}
- public ColumnUpdate setColVisibility(ByteBuffer colVisibility) {
+ public ColumnUpdate setColVisibility(java.nio.ByteBuffer colVisibility) {
this.colVisibility = org.apache.thrift.TBaseHelper.copyBinary(colVisibility);
return this;
}
@@ -333,16 +303,16 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
}
public void unsetTimestamp() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
- return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public byte[] getValue() {
@@ -350,16 +320,16 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return value == null ? null : value.array();
}
- public ByteBuffer bufferForValue() {
+ public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public ColumnUpdate setValue(byte[] value) {
- this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
+ this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
- public ColumnUpdate setValue(ByteBuffer value) {
+ public ColumnUpdate setValue(java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
@@ -390,25 +360,29 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
}
public void unsetDeleteCell() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETECELL_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DELETECELL_ISSET_ID);
}
/** Returns true if field deleteCell is set (has been assigned a value) and false otherwise */
public boolean isSetDeleteCell() {
- return EncodingUtils.testBit(__isset_bitfield, __DELETECELL_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DELETECELL_ISSET_ID);
}
public void setDeleteCellIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETECELL_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DELETECELL_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COL_FAMILY:
if (value == null) {
unsetColFamily();
} else {
- setColFamily((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColFamily((byte[])value);
+ } else {
+ setColFamily((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -416,7 +390,11 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
if (value == null) {
unsetColQualifier();
} else {
- setColQualifier((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColQualifier((byte[])value);
+ } else {
+ setColQualifier((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -424,7 +402,11 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
if (value == null) {
unsetColVisibility();
} else {
- setColVisibility((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColVisibility((byte[])value);
+ } else {
+ setColVisibility((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -432,7 +414,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
if (value == null) {
unsetTimestamp();
} else {
- setTimestamp((Long)value);
+ setTimestamp((java.lang.Long)value);
}
break;
@@ -440,7 +422,11 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
if (value == null) {
unsetValue();
} else {
- setValue((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setValue((byte[])value);
+ } else {
+ setValue((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -448,14 +434,14 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
if (value == null) {
unsetDeleteCell();
} else {
- setDeleteCell((Boolean)value);
+ setDeleteCell((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COL_FAMILY:
return getColFamily();
@@ -476,13 +462,13 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return isDeleteCell();
}
- 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) {
@@ -499,11 +485,11 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
case DELETE_CELL:
return isSetDeleteCell();
}
- 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 ColumnUpdate)
@@ -514,6 +500,8 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
public boolean equals(ColumnUpdate that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_colFamily = true && this.isSetColFamily();
boolean that_present_colFamily = true && that.isSetColFamily();
@@ -574,39 +562,33 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_colFamily = true && (isSetColFamily());
- list.add(present_colFamily);
- if (present_colFamily)
- list.add(colFamily);
+ hashCode = hashCode * 8191 + ((isSetColFamily()) ? 131071 : 524287);
+ if (isSetColFamily())
+ hashCode = hashCode * 8191 + colFamily.hashCode();
- boolean present_colQualifier = true && (isSetColQualifier());
- list.add(present_colQualifier);
- if (present_colQualifier)
- list.add(colQualifier);
+ hashCode = hashCode * 8191 + ((isSetColQualifier()) ? 131071 : 524287);
+ if (isSetColQualifier())
+ hashCode = hashCode * 8191 + colQualifier.hashCode();
- boolean present_colVisibility = true && (isSetColVisibility());
- list.add(present_colVisibility);
- if (present_colVisibility)
- list.add(colVisibility);
+ hashCode = hashCode * 8191 + ((isSetColVisibility()) ? 131071 : 524287);
+ if (isSetColVisibility())
+ hashCode = hashCode * 8191 + colVisibility.hashCode();
- boolean present_timestamp = true && (isSetTimestamp());
- list.add(present_timestamp);
- if (present_timestamp)
- list.add(timestamp);
+ hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
+ if (isSetTimestamp())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
- boolean present_value = true && (isSetValue());
- list.add(present_value);
- if (present_value)
- list.add(value);
+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
+ if (isSetValue())
+ hashCode = hashCode * 8191 + value.hashCode();
- boolean present_deleteCell = true && (isSetDeleteCell());
- list.add(present_deleteCell);
- if (present_deleteCell)
- list.add(deleteCell);
+ hashCode = hashCode * 8191 + ((isSetDeleteCell()) ? 131071 : 524287);
+ if (isSetDeleteCell())
+ hashCode = hashCode * 8191 + ((deleteCell) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -617,7 +599,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
+ lastComparison = java.lang.Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
if (lastComparison != 0) {
return lastComparison;
}
@@ -627,7 +609,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -637,7 +619,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColVisibility()).compareTo(other.isSetColVisibility());
+ lastComparison = java.lang.Boolean.valueOf(isSetColVisibility()).compareTo(other.isSetColVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@@ -647,7 +629,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
+ lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -657,7 +639,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -667,7 +649,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDeleteCell()).compareTo(other.isSetDeleteCell());
+ lastComparison = java.lang.Boolean.valueOf(isSetDeleteCell()).compareTo(other.isSetDeleteCell());
if (lastComparison != 0) {
return lastComparison;
}
@@ -685,16 +667,16 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
}
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("ColumnUpdate(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ColumnUpdate(");
boolean first = true;
sb.append("colFamily:");
@@ -761,7 +743,7 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -771,13 +753,13 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
}
}
- private static class ColumnUpdateStandardSchemeFactory implements SchemeFactory {
+ private static class ColumnUpdateStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnUpdateStandardScheme getScheme() {
return new ColumnUpdateStandardScheme();
}
}
- private static class ColumnUpdateStandardScheme extends StandardScheme<ColumnUpdate> {
+ private static class ColumnUpdateStandardScheme extends org.apache.thrift.scheme.StandardScheme<ColumnUpdate> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnUpdate struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -892,18 +874,18 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
}
- private static class ColumnUpdateTupleSchemeFactory implements SchemeFactory {
+ private static class ColumnUpdateTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnUpdateTupleScheme getScheme() {
return new ColumnUpdateTupleScheme();
}
}
- private static class ColumnUpdateTupleScheme extends TupleScheme<ColumnUpdate> {
+ private static class ColumnUpdateTupleScheme extends org.apache.thrift.scheme.TupleScheme<ColumnUpdate> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ColumnUpdate 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.isSetColFamily()) {
optionals.set(0);
}
@@ -945,8 +927,8 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnUpdate struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.colFamily = iprot.readBinary();
struct.setColFamilyIsSet(true);
@@ -974,5 +956,9 @@ public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, Colum
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionReason.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionReason.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionReason.java
index 77cf53d..b4b3255 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionReason.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionReason.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum CompactionReason implements org.apache.thrift.TEnum {
+public enum CompactionReason implements org.apache.thrift.TEnum {
USER(0),
SYSTEM(1),
CHOP(2),
[40/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
ACCUMULO-4551 Add thrift-gen changes from 0.10.0
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/62bbce43
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/62bbce43
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/62bbce43
Branch: refs/heads/master
Commit: 62bbce43ede2dade0a229e22fdd581cf917e6bf3
Parents: ead6674
Author: Christopher Tubbs <ct...@apache.org>
Authored: Sat Feb 4 23:49:35 2017 -0500
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Feb 9 14:27:47 2017 -0500
----------------------------------------------------------------------
.../core/client/impl/thrift/ClientService.java | 8983 +--
.../client/impl/thrift/ConfigurationType.java | 7 +-
.../client/impl/thrift/SecurityErrorCode.java | 7 +-
.../core/client/impl/thrift/TDiskUsage.java | 160 +-
.../core/client/impl/thrift/TableOperation.java | 7 +-
.../thrift/TableOperationExceptionType.java | 7 +-
.../thrift/ThriftNotActiveServiceException.java | 104 +-
.../impl/thrift/ThriftSecurityException.java | 136 +-
.../thrift/ThriftTableOperationException.java | 183 +-
.../core/client/impl/thrift/ThriftTest.java | 720 +-
.../core/data/thrift/InitialMultiScan.java | 130 +-
.../accumulo/core/data/thrift/InitialScan.java | 130 +-
.../accumulo/core/data/thrift/IterInfo.java | 159 +-
.../accumulo/core/data/thrift/MapFileInfo.java | 121 +-
.../core/data/thrift/MultiScanResult.java | 264 +-
.../accumulo/core/data/thrift/ScanResult.java | 148 +-
.../accumulo/core/data/thrift/TCMResult.java | 130 +-
.../accumulo/core/data/thrift/TCMStatus.java | 7 +-
.../accumulo/core/data/thrift/TColumn.java | 181 +-
.../accumulo/core/data/thrift/TCondition.java | 261 +-
.../core/data/thrift/TConditionalMutation.java | 157 +-
.../core/data/thrift/TConditionalSession.java | 155 +-
.../thrift/TConstraintViolationSummary.java | 174 +-
.../apache/accumulo/core/data/thrift/TKey.java | 221 +-
.../accumulo/core/data/thrift/TKeyExtent.java | 181 +-
.../accumulo/core/data/thrift/TKeyValue.java | 140 +-
.../accumulo/core/data/thrift/TMutation.java | 247 +-
.../accumulo/core/data/thrift/TRange.java | 184 +-
.../accumulo/core/data/thrift/UpdateErrors.java | 203 +-
.../core/gc/thrift/GCMonitorService.java | 296 +-
.../accumulo/core/gc/thrift/GCStatus.java | 142 +-
.../accumulo/core/gc/thrift/GcCycleStats.java | 196 +-
.../core/master/thrift/BulkImportState.java | 7 +-
.../core/master/thrift/BulkImportStatus.java | 149 +-
.../accumulo/core/master/thrift/Compacting.java | 136 +-
.../accumulo/core/master/thrift/DeadServer.java | 159 +-
.../core/master/thrift/FateOperation.java | 7 +-
.../core/master/thrift/FateService.java | 1337 +-
.../core/master/thrift/MasterClientService.java | 5295 +-
.../core/master/thrift/MasterGoalState.java | 7 +-
.../core/master/thrift/MasterMonitorInfo.java | 339 +-
.../core/master/thrift/MasterState.java | 7 +-
.../core/master/thrift/RecoveryException.java | 127 +-
.../core/master/thrift/RecoveryStatus.java | 155 +-
.../accumulo/core/master/thrift/TableInfo.java | 294 +-
.../core/master/thrift/TabletLoadState.java | 7 +-
.../core/master/thrift/TabletServerStatus.java | 402 +-
.../core/master/thrift/TabletSplit.java | 142 +-
.../core/replication/thrift/KeyValues.java | 133 +-
.../thrift/RemoteReplicationErrorCode.java | 7 +-
.../thrift/RemoteReplicationException.java | 136 +-
.../thrift/ReplicationCoordinator.java | 332 +-
.../thrift/ReplicationCoordinatorErrorCode.java | 7 +-
.../thrift/ReplicationCoordinatorException.java | 136 +-
.../replication/thrift/ReplicationServicer.java | 620 +-
.../core/replication/thrift/WalEdits.java | 145 +-
.../security/thrift/TAuthenticationKey.java | 182 +-
.../thrift/TAuthenticationTokenIdentifier.java | 193 +-
.../core/security/thrift/TCredentials.java | 188 +-
.../core/security/thrift/TDelegationToken.java | 140 +-
.../security/thrift/TDelegationTokenConfig.java | 123 +-
.../core/tabletserver/thrift/ActionStats.java | 226 +-
.../tabletserver/thrift/ActiveCompaction.java | 373 +-
.../core/tabletserver/thrift/ActiveScan.java | 446 +-
.../tabletserver/thrift/CompactionReason.java | 7 +-
.../tabletserver/thrift/CompactionType.java | 7 +-
.../thrift/ConstraintViolationException.java | 135 +-
.../tabletserver/thrift/IteratorConfig.java | 133 +-
.../thrift/NoSuchScanIDException.java | 104 +-
.../thrift/NotServingTabletException.java | 117 +-
.../core/tabletserver/thrift/ScanState.java | 7 +-
.../core/tabletserver/thrift/ScanType.java | 7 +-
.../core/tabletserver/thrift/TDurability.java | 7 +-
.../tabletserver/thrift/TIteratorSetting.java | 200 +-
.../thrift/TSampleNotPresentException.java | 117 +-
.../thrift/TSamplerConfiguration.java | 166 +-
.../tabletserver/thrift/TUnloadTabletGoal.java | 7 +-
.../thrift/TabletClientService.java | 8256 +--
.../core/tabletserver/thrift/TabletStats.java | 202 +-
.../thrift/TooManyFilesException.java | 117 +-
.../accumulo/core/trace/thrift/TInfo.java | 136 +-
proxy/src/main/cpp/AccumuloProxy.cpp | 2 +-
proxy/src/main/cpp/AccumuloProxy.h | 2 +-
proxy/src/main/cpp/proxy_constants.cpp | 2 +-
proxy/src/main/cpp/proxy_constants.h | 2 +-
proxy/src/main/cpp/proxy_types.cpp | 2 +-
proxy/src/main/cpp/proxy_types.h | 43 +-
.../proxy/thrift/AccumuloException.java | 127 +-
.../accumulo/proxy/thrift/AccumuloProxy.java | 33465 +++++------
.../proxy/thrift/AccumuloSecurityException.java | 127 +-
.../accumulo/proxy/thrift/ActiveCompaction.java | 282 +-
.../accumulo/proxy/thrift/ActiveScan.java | 337 +-
.../accumulo/proxy/thrift/BatchScanOptions.java | 247 +-
.../apache/accumulo/proxy/thrift/Column.java | 181 +-
.../accumulo/proxy/thrift/ColumnUpdate.java | 236 +-
.../accumulo/proxy/thrift/CompactionReason.java | 7 +-
.../proxy/thrift/CompactionStrategyConfig.java | 166 +-
.../accumulo/proxy/thrift/CompactionType.java | 7 +-
.../apache/accumulo/proxy/thrift/Condition.java | 180 +-
.../proxy/thrift/ConditionalStatus.java | 7 +-
.../proxy/thrift/ConditionalUpdates.java | 160 +-
.../proxy/thrift/ConditionalWriterOptions.java | 203 +-
.../apache/accumulo/proxy/thrift/DiskUsage.java | 160 +-
.../accumulo/proxy/thrift/Durability.java | 7 +-
.../accumulo/proxy/thrift/IteratorScope.java | 7 +-
.../accumulo/proxy/thrift/IteratorSetting.java | 200 +-
.../org/apache/accumulo/proxy/thrift/Key.java | 223 +-
.../apache/accumulo/proxy/thrift/KeyExtent.java | 175 +-
.../apache/accumulo/proxy/thrift/KeyValue.java | 140 +-
.../accumulo/proxy/thrift/KeyValueAndPeek.java | 130 +-
.../thrift/MutationsRejectedException.java | 127 +-
.../proxy/thrift/NamespaceExistsException.java | 127 +-
.../thrift/NamespaceNotEmptyException.java | 127 +-
.../thrift/NamespaceNotFoundException.java | 127 +-
.../proxy/thrift/NamespacePermission.java | 7 +-
.../proxy/thrift/NoMoreEntriesException.java | 127 +-
.../accumulo/proxy/thrift/PartialKey.java | 7 +-
.../org/apache/accumulo/proxy/thrift/Range.java | 154 +-
.../accumulo/proxy/thrift/ScanColumn.java | 154 +-
.../accumulo/proxy/thrift/ScanOptions.java | 219 +-
.../accumulo/proxy/thrift/ScanResult.java | 148 +-
.../apache/accumulo/proxy/thrift/ScanState.java | 7 +-
.../apache/accumulo/proxy/thrift/ScanType.java | 7 +-
.../accumulo/proxy/thrift/SystemPermission.java | 7 +-
.../proxy/thrift/TableExistsException.java | 127 +-
.../proxy/thrift/TableNotFoundException.java | 127 +-
.../accumulo/proxy/thrift/TablePermission.java | 7 +-
.../apache/accumulo/proxy/thrift/TimeType.java | 7 +-
.../accumulo/proxy/thrift/UnknownScanner.java | 127 +-
.../accumulo/proxy/thrift/UnknownWriter.java | 127 +-
.../accumulo/proxy/thrift/WriterOptions.java | 175 +-
proxy/src/main/python/AccumuloProxy-remote | 1115 +-
proxy/src/main/python/AccumuloProxy.py | 49268 ++++++++---------
proxy/src/main/python/constants.py | 9 +-
proxy/src/main/python/ttypes.py | 6432 ++-
proxy/src/main/ruby/accumulo_proxy.rb | 2 +-
proxy/src/main/ruby/proxy_constants.rb | 2 +-
proxy/src/main/ruby/proxy_types.rb | 2 +-
.../accumulo/tracer/thrift/Annotation.java | 140 +-
.../accumulo/tracer/thrift/RemoteSpan.java | 306 +-
.../accumulo/tracer/thrift/SpanReceiver.java | 160 +-
.../accumulo/tracer/thrift/TestService.java | 307 +-
142 files changed, 64716 insertions(+), 67719 deletions(-)
----------------------------------------------------------------------
[26/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/TableInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/TableInfo.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/TableInfo.java
index 5c385d7..d122cf4 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/TableInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/TableInfo.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TableInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableInfo");
@@ -67,11 +40,8 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
private static final org.apache.thrift.protocol.TField SCANS_FIELD_DESC = new org.apache.thrift.protocol.TField("scans", org.apache.thrift.protocol.TType.STRUCT, (short)11);
private static final org.apache.thrift.protocol.TField SCAN_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("scanRate", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TableInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TableInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TableInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TableInfoTupleSchemeFactory();
public long recs; // required
public long recsInMemory; // required
@@ -101,10 +71,10 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
SCANS((short)11, "scans"),
SCAN_RATE((short)12, "scanRate");
- 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);
}
}
@@ -149,21 +119,21 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
*/
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;
}
@@ -172,7 +142,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -188,9 +158,9 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
private static final int __QUERYBYTERATE_ISSET_ID = 7;
private static final int __SCANRATE_ISSET_ID = 8;
private short __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RECS, new org.apache.thrift.meta_data.FieldMetaData("recs", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.RECS_IN_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("recsInMemory", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -215,7 +185,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Compacting.class)));
tmpMap.put(_Fields.SCAN_RATE, new org.apache.thrift.meta_data.FieldMetaData("scanRate", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableInfo.class, metaDataMap);
}
@@ -325,16 +295,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetRecs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RECS_ISSET_ID);
}
/** Returns true if field recs is set (has been assigned a value) and false otherwise */
public boolean isSetRecs() {
- return EncodingUtils.testBit(__isset_bitfield, __RECS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RECS_ISSET_ID);
}
public void setRecsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RECS_ISSET_ID, value);
}
public long getRecsInMemory() {
@@ -348,16 +318,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetRecsInMemory() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECSINMEMORY_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RECSINMEMORY_ISSET_ID);
}
/** Returns true if field recsInMemory is set (has been assigned a value) and false otherwise */
public boolean isSetRecsInMemory() {
- return EncodingUtils.testBit(__isset_bitfield, __RECSINMEMORY_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RECSINMEMORY_ISSET_ID);
}
public void setRecsInMemoryIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECSINMEMORY_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RECSINMEMORY_ISSET_ID, value);
}
public int getTablets() {
@@ -371,16 +341,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetTablets() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TABLETS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLETS_ISSET_ID);
}
/** Returns true if field tablets is set (has been assigned a value) and false otherwise */
public boolean isSetTablets() {
- return EncodingUtils.testBit(__isset_bitfield, __TABLETS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLETS_ISSET_ID);
}
public void setTabletsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TABLETS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLETS_ISSET_ID, value);
}
public int getOnlineTablets() {
@@ -394,16 +364,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetOnlineTablets() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ONLINETABLETS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ONLINETABLETS_ISSET_ID);
}
/** Returns true if field onlineTablets is set (has been assigned a value) and false otherwise */
public boolean isSetOnlineTablets() {
- return EncodingUtils.testBit(__isset_bitfield, __ONLINETABLETS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ONLINETABLETS_ISSET_ID);
}
public void setOnlineTabletsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ONLINETABLETS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ONLINETABLETS_ISSET_ID, value);
}
public double getIngestRate() {
@@ -417,16 +387,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetIngestRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
}
/** Returns true if field ingestRate is set (has been assigned a value) and false otherwise */
public boolean isSetIngestRate() {
- return EncodingUtils.testBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
}
public void setIngestRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INGESTRATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INGESTRATE_ISSET_ID, value);
}
public double getIngestByteRate() {
@@ -440,16 +410,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetIngestByteRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INGESTBYTERATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INGESTBYTERATE_ISSET_ID);
}
/** Returns true if field ingestByteRate is set (has been assigned a value) and false otherwise */
public boolean isSetIngestByteRate() {
- return EncodingUtils.testBit(__isset_bitfield, __INGESTBYTERATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INGESTBYTERATE_ISSET_ID);
}
public void setIngestByteRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INGESTBYTERATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INGESTBYTERATE_ISSET_ID, value);
}
public double getQueryRate() {
@@ -463,16 +433,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetQueryRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
}
/** Returns true if field queryRate is set (has been assigned a value) and false otherwise */
public boolean isSetQueryRate() {
- return EncodingUtils.testBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
}
public void setQueryRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUERYRATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYRATE_ISSET_ID, value);
}
public double getQueryByteRate() {
@@ -486,16 +456,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetQueryByteRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUERYBYTERATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYBYTERATE_ISSET_ID);
}
/** Returns true if field queryByteRate is set (has been assigned a value) and false otherwise */
public boolean isSetQueryByteRate() {
- return EncodingUtils.testBit(__isset_bitfield, __QUERYBYTERATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYBYTERATE_ISSET_ID);
}
public void setQueryByteRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUERYBYTERATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYBYTERATE_ISSET_ID, value);
}
public Compacting getMinors() {
@@ -581,25 +551,25 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
public void unsetScanRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCANRATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SCANRATE_ISSET_ID);
}
/** Returns true if field scanRate is set (has been assigned a value) and false otherwise */
public boolean isSetScanRate() {
- return EncodingUtils.testBit(__isset_bitfield, __SCANRATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SCANRATE_ISSET_ID);
}
public void setScanRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCANRATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SCANRATE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case RECS:
if (value == null) {
unsetRecs();
} else {
- setRecs((Long)value);
+ setRecs((java.lang.Long)value);
}
break;
@@ -607,7 +577,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
if (value == null) {
unsetRecsInMemory();
} else {
- setRecsInMemory((Long)value);
+ setRecsInMemory((java.lang.Long)value);
}
break;
@@ -615,7 +585,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
if (value == null) {
unsetTablets();
} else {
- setTablets((Integer)value);
+ setTablets((java.lang.Integer)value);
}
break;
@@ -623,7 +593,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
if (value == null) {
unsetOnlineTablets();
} else {
- setOnlineTablets((Integer)value);
+ setOnlineTablets((java.lang.Integer)value);
}
break;
@@ -631,7 +601,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
if (value == null) {
unsetIngestRate();
} else {
- setIngestRate((Double)value);
+ setIngestRate((java.lang.Double)value);
}
break;
@@ -639,7 +609,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
if (value == null) {
unsetIngestByteRate();
} else {
- setIngestByteRate((Double)value);
+ setIngestByteRate((java.lang.Double)value);
}
break;
@@ -647,7 +617,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
if (value == null) {
unsetQueryRate();
} else {
- setQueryRate((Double)value);
+ setQueryRate((java.lang.Double)value);
}
break;
@@ -655,7 +625,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
if (value == null) {
unsetQueryByteRate();
} else {
- setQueryByteRate((Double)value);
+ setQueryByteRate((java.lang.Double)value);
}
break;
@@ -687,14 +657,14 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
if (value == null) {
unsetScanRate();
} else {
- setScanRate((Double)value);
+ setScanRate((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RECS:
return getRecs();
@@ -733,13 +703,13 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return getScanRate();
}
- 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) {
@@ -768,11 +738,11 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
case SCAN_RATE:
return isSetScanRate();
}
- 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 TableInfo)
@@ -783,6 +753,8 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
public boolean equals(TableInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_recs = true;
boolean that_present_recs = true;
@@ -897,69 +869,39 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_recs = true;
- list.add(present_recs);
- if (present_recs)
- list.add(recs);
-
- boolean present_recsInMemory = true;
- list.add(present_recsInMemory);
- if (present_recsInMemory)
- list.add(recsInMemory);
-
- boolean present_tablets = true;
- list.add(present_tablets);
- if (present_tablets)
- list.add(tablets);
-
- boolean present_onlineTablets = true;
- list.add(present_onlineTablets);
- if (present_onlineTablets)
- list.add(onlineTablets);
-
- boolean present_ingestRate = true;
- list.add(present_ingestRate);
- if (present_ingestRate)
- list.add(ingestRate);
-
- boolean present_ingestByteRate = true;
- list.add(present_ingestByteRate);
- if (present_ingestByteRate)
- list.add(ingestByteRate);
-
- boolean present_queryRate = true;
- list.add(present_queryRate);
- if (present_queryRate)
- list.add(queryRate);
-
- boolean present_queryByteRate = true;
- list.add(present_queryByteRate);
- if (present_queryByteRate)
- list.add(queryByteRate);
-
- boolean present_minors = true && (isSetMinors());
- list.add(present_minors);
- if (present_minors)
- list.add(minors);
-
- boolean present_majors = true && (isSetMajors());
- list.add(present_majors);
- if (present_majors)
- list.add(majors);
-
- boolean present_scans = true && (isSetScans());
- list.add(present_scans);
- if (present_scans)
- list.add(scans);
-
- boolean present_scanRate = true;
- list.add(present_scanRate);
- if (present_scanRate)
- list.add(scanRate);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(recs);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(recsInMemory);
+
+ hashCode = hashCode * 8191 + tablets;
+
+ hashCode = hashCode * 8191 + onlineTablets;
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(ingestRate);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(ingestByteRate);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryRate);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryByteRate);
+
+ hashCode = hashCode * 8191 + ((isSetMinors()) ? 131071 : 524287);
+ if (isSetMinors())
+ hashCode = hashCode * 8191 + minors.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetMajors()) ? 131071 : 524287);
+ if (isSetMajors())
+ hashCode = hashCode * 8191 + majors.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetScans()) ? 131071 : 524287);
+ if (isSetScans())
+ hashCode = hashCode * 8191 + scans.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(scanRate);
+
+ return hashCode;
}
@Override
@@ -970,7 +912,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRecs()).compareTo(other.isSetRecs());
+ lastComparison = java.lang.Boolean.valueOf(isSetRecs()).compareTo(other.isSetRecs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -980,7 +922,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRecsInMemory()).compareTo(other.isSetRecsInMemory());
+ lastComparison = java.lang.Boolean.valueOf(isSetRecsInMemory()).compareTo(other.isSetRecsInMemory());
if (lastComparison != 0) {
return lastComparison;
}
@@ -990,7 +932,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTablets()).compareTo(other.isSetTablets());
+ lastComparison = java.lang.Boolean.valueOf(isSetTablets()).compareTo(other.isSetTablets());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1000,7 +942,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOnlineTablets()).compareTo(other.isSetOnlineTablets());
+ lastComparison = java.lang.Boolean.valueOf(isSetOnlineTablets()).compareTo(other.isSetOnlineTablets());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1010,7 +952,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIngestRate()).compareTo(other.isSetIngestRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetIngestRate()).compareTo(other.isSetIngestRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1020,7 +962,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIngestByteRate()).compareTo(other.isSetIngestByteRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetIngestByteRate()).compareTo(other.isSetIngestByteRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1030,7 +972,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQueryRate()).compareTo(other.isSetQueryRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueryRate()).compareTo(other.isSetQueryRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1040,7 +982,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQueryByteRate()).compareTo(other.isSetQueryByteRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueryByteRate()).compareTo(other.isSetQueryByteRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1050,7 +992,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMinors()).compareTo(other.isSetMinors());
+ lastComparison = java.lang.Boolean.valueOf(isSetMinors()).compareTo(other.isSetMinors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1060,7 +1002,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMajors()).compareTo(other.isSetMajors());
+ lastComparison = java.lang.Boolean.valueOf(isSetMajors()).compareTo(other.isSetMajors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1070,7 +1012,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetScans()).compareTo(other.isSetScans());
+ lastComparison = java.lang.Boolean.valueOf(isSetScans()).compareTo(other.isSetScans());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1080,7 +1022,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetScanRate()).compareTo(other.isSetScanRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetScanRate()).compareTo(other.isSetScanRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1098,16 +1040,16 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
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("TableInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TableInfo(");
boolean first = true;
sb.append("recs:");
@@ -1195,7 +1137,7 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1205,13 +1147,13 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
}
- private static class TableInfoStandardSchemeFactory implements SchemeFactory {
+ private static class TableInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TableInfoStandardScheme getScheme() {
return new TableInfoStandardScheme();
}
}
- private static class TableInfoStandardScheme extends StandardScheme<TableInfo> {
+ private static class TableInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TableInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TableInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1385,18 +1327,18 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
- private static class TableInfoTupleSchemeFactory implements SchemeFactory {
+ private static class TableInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TableInfoTupleScheme getScheme() {
return new TableInfoTupleScheme();
}
}
- private static class TableInfoTupleScheme extends TupleScheme<TableInfo> {
+ private static class TableInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TableInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TableInfo 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.isSetRecs()) {
optionals.set(0);
}
@@ -1474,8 +1416,8 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TableInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(12);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(12);
if (incoming.get(0)) {
struct.recs = iprot.readI64();
struct.setRecsIsSet(true);
@@ -1530,5 +1472,9 @@ public class TableInfo implements org.apache.thrift.TBase<TableInfo, TableInfo._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletLoadState.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletLoadState.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletLoadState.java
index 1a3a80c..5f1adf1 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletLoadState.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletLoadState.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.master.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TabletLoadState implements org.apache.thrift.TEnum {
+public enum TabletLoadState implements org.apache.thrift.TEnum {
LOADED(0),
LOAD_FAILURE(1),
UNLOADED(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
index 07444b5..c0756cd 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerStatus, TabletServerStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TabletServerStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletServerStatus");
@@ -69,15 +42,12 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
private static final org.apache.thrift.protocol.TField SYNCS_FIELD_DESC = new org.apache.thrift.protocol.TField("syncs", org.apache.thrift.protocol.TType.I64, (short)16);
private static final org.apache.thrift.protocol.TField BULK_IMPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkImports", org.apache.thrift.protocol.TType.LIST, (short)17);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TabletServerStatusStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TabletServerStatusTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TabletServerStatusStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TabletServerStatusTupleSchemeFactory();
- public Map<String,TableInfo> tableMap; // required
+ public java.util.Map<java.lang.String,TableInfo> tableMap; // required
public long lastContact; // required
- public String name; // required
+ public java.lang.String name; // required
public double osLoad; // required
public long holdTime; // required
public long lookups; // required
@@ -85,10 +55,10 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
public long indexCacheRequest; // required
public long dataCacheHits; // required
public long dataCacheRequest; // required
- public List<RecoveryStatus> logSorts; // required
+ public java.util.List<RecoveryStatus> logSorts; // required
public long flushs; // required
public long syncs; // required
- public List<BulkImportStatus> bulkImports; // required
+ public java.util.List<BulkImportStatus> bulkImports; // 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 {
@@ -107,10 +77,10 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
SYNCS((short)16, "syncs"),
BULK_IMPORTS((short)17, "bulkImports");
- 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);
}
}
@@ -159,21 +129,21 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
*/
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;
}
@@ -182,7 +152,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -199,9 +169,9 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
private static final int __FLUSHS_ISSET_ID = 8;
private static final int __SYNCS_ISSET_ID = 9;
private short __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE_MAP, new org.apache.thrift.meta_data.FieldMetaData("tableMap", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
@@ -234,7 +204,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
tmpMap.put(_Fields.BULK_IMPORTS, new org.apache.thrift.meta_data.FieldMetaData("bulkImports", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkImportStatus.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TabletServerStatus.class, metaDataMap);
}
@@ -242,9 +212,9 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public TabletServerStatus(
- Map<String,TableInfo> tableMap,
+ java.util.Map<java.lang.String,TableInfo> tableMap,
long lastContact,
- String name,
+ java.lang.String name,
double osLoad,
long holdTime,
long lookups,
@@ -252,10 +222,10 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
long indexCacheRequest,
long dataCacheHits,
long dataCacheRequest,
- List<RecoveryStatus> logSorts,
+ java.util.List<RecoveryStatus> logSorts,
long flushs,
long syncs,
- List<BulkImportStatus> bulkImports)
+ java.util.List<BulkImportStatus> bulkImports)
{
this();
this.tableMap = tableMap;
@@ -290,13 +260,13 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
public TabletServerStatus(TabletServerStatus other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTableMap()) {
- Map<String,TableInfo> __this__tableMap = new HashMap<String,TableInfo>(other.tableMap.size());
- for (Map.Entry<String, TableInfo> other_element : other.tableMap.entrySet()) {
+ java.util.Map<java.lang.String,TableInfo> __this__tableMap = new java.util.HashMap<java.lang.String,TableInfo>(other.tableMap.size());
+ for (java.util.Map.Entry<java.lang.String, TableInfo> other_element : other.tableMap.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
TableInfo other_element_value = other_element.getValue();
- String __this__tableMap_copy_key = other_element_key;
+ java.lang.String __this__tableMap_copy_key = other_element_key;
TableInfo __this__tableMap_copy_value = new TableInfo(other_element_value);
@@ -316,7 +286,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
this.dataCacheHits = other.dataCacheHits;
this.dataCacheRequest = other.dataCacheRequest;
if (other.isSetLogSorts()) {
- List<RecoveryStatus> __this__logSorts = new ArrayList<RecoveryStatus>(other.logSorts.size());
+ java.util.List<RecoveryStatus> __this__logSorts = new java.util.ArrayList<RecoveryStatus>(other.logSorts.size());
for (RecoveryStatus other_element : other.logSorts) {
__this__logSorts.add(new RecoveryStatus(other_element));
}
@@ -325,7 +295,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
this.flushs = other.flushs;
this.syncs = other.syncs;
if (other.isSetBulkImports()) {
- List<BulkImportStatus> __this__bulkImports = new ArrayList<BulkImportStatus>(other.bulkImports.size());
+ java.util.List<BulkImportStatus> __this__bulkImports = new java.util.ArrayList<BulkImportStatus>(other.bulkImports.size());
for (BulkImportStatus other_element : other.bulkImports) {
__this__bulkImports.add(new BulkImportStatus(other_element));
}
@@ -369,18 +339,18 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return (this.tableMap == null) ? 0 : this.tableMap.size();
}
- public void putToTableMap(String key, TableInfo val) {
+ public void putToTableMap(java.lang.String key, TableInfo val) {
if (this.tableMap == null) {
- this.tableMap = new HashMap<String,TableInfo>();
+ this.tableMap = new java.util.HashMap<java.lang.String,TableInfo>();
}
this.tableMap.put(key, val);
}
- public Map<String,TableInfo> getTableMap() {
+ public java.util.Map<java.lang.String,TableInfo> getTableMap() {
return this.tableMap;
}
- public TabletServerStatus setTableMap(Map<String,TableInfo> tableMap) {
+ public TabletServerStatus setTableMap(java.util.Map<java.lang.String,TableInfo> tableMap) {
this.tableMap = tableMap;
return this;
}
@@ -411,23 +381,23 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetLastContact() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTCONTACT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LASTCONTACT_ISSET_ID);
}
/** Returns true if field lastContact is set (has been assigned a value) and false otherwise */
public boolean isSetLastContact() {
- return EncodingUtils.testBit(__isset_bitfield, __LASTCONTACT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LASTCONTACT_ISSET_ID);
}
public void setLastContactIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTCONTACT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LASTCONTACT_ISSET_ID, value);
}
- public String getName() {
+ public java.lang.String getName() {
return this.name;
}
- public TabletServerStatus setName(String name) {
+ public TabletServerStatus setName(java.lang.String name) {
this.name = name;
return this;
}
@@ -458,16 +428,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetOsLoad() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSLOAD_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OSLOAD_ISSET_ID);
}
/** Returns true if field osLoad is set (has been assigned a value) and false otherwise */
public boolean isSetOsLoad() {
- return EncodingUtils.testBit(__isset_bitfield, __OSLOAD_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OSLOAD_ISSET_ID);
}
public void setOsLoadIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSLOAD_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OSLOAD_ISSET_ID, value);
}
public long getHoldTime() {
@@ -481,16 +451,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetHoldTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
}
/** Returns true if field holdTime is set (has been assigned a value) and false otherwise */
public boolean isSetHoldTime() {
- return EncodingUtils.testBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HOLDTIME_ISSET_ID);
}
public void setHoldTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HOLDTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HOLDTIME_ISSET_ID, value);
}
public long getLookups() {
@@ -504,16 +474,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetLookups() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOOKUPS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LOOKUPS_ISSET_ID);
}
/** Returns true if field lookups is set (has been assigned a value) and false otherwise */
public boolean isSetLookups() {
- return EncodingUtils.testBit(__isset_bitfield, __LOOKUPS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LOOKUPS_ISSET_ID);
}
public void setLookupsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOOKUPS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LOOKUPS_ISSET_ID, value);
}
public long getIndexCacheHits() {
@@ -527,16 +497,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetIndexCacheHits() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INDEXCACHEHITS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INDEXCACHEHITS_ISSET_ID);
}
/** Returns true if field indexCacheHits is set (has been assigned a value) and false otherwise */
public boolean isSetIndexCacheHits() {
- return EncodingUtils.testBit(__isset_bitfield, __INDEXCACHEHITS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INDEXCACHEHITS_ISSET_ID);
}
public void setIndexCacheHitsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INDEXCACHEHITS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEXCACHEHITS_ISSET_ID, value);
}
public long getIndexCacheRequest() {
@@ -550,16 +520,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetIndexCacheRequest() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INDEXCACHEREQUEST_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INDEXCACHEREQUEST_ISSET_ID);
}
/** Returns true if field indexCacheRequest is set (has been assigned a value) and false otherwise */
public boolean isSetIndexCacheRequest() {
- return EncodingUtils.testBit(__isset_bitfield, __INDEXCACHEREQUEST_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INDEXCACHEREQUEST_ISSET_ID);
}
public void setIndexCacheRequestIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INDEXCACHEREQUEST_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEXCACHEREQUEST_ISSET_ID, value);
}
public long getDataCacheHits() {
@@ -573,16 +543,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetDataCacheHits() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATACACHEHITS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATACACHEHITS_ISSET_ID);
}
/** Returns true if field dataCacheHits is set (has been assigned a value) and false otherwise */
public boolean isSetDataCacheHits() {
- return EncodingUtils.testBit(__isset_bitfield, __DATACACHEHITS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATACACHEHITS_ISSET_ID);
}
public void setDataCacheHitsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATACACHEHITS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATACACHEHITS_ISSET_ID, value);
}
public long getDataCacheRequest() {
@@ -596,16 +566,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetDataCacheRequest() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATACACHEREQUEST_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATACACHEREQUEST_ISSET_ID);
}
/** Returns true if field dataCacheRequest is set (has been assigned a value) and false otherwise */
public boolean isSetDataCacheRequest() {
- return EncodingUtils.testBit(__isset_bitfield, __DATACACHEREQUEST_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATACACHEREQUEST_ISSET_ID);
}
public void setDataCacheRequestIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATACACHEREQUEST_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATACACHEREQUEST_ISSET_ID, value);
}
public int getLogSortsSize() {
@@ -618,16 +588,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
public void addToLogSorts(RecoveryStatus elem) {
if (this.logSorts == null) {
- this.logSorts = new ArrayList<RecoveryStatus>();
+ this.logSorts = new java.util.ArrayList<RecoveryStatus>();
}
this.logSorts.add(elem);
}
- public List<RecoveryStatus> getLogSorts() {
+ public java.util.List<RecoveryStatus> getLogSorts() {
return this.logSorts;
}
- public TabletServerStatus setLogSorts(List<RecoveryStatus> logSorts) {
+ public TabletServerStatus setLogSorts(java.util.List<RecoveryStatus> logSorts) {
this.logSorts = logSorts;
return this;
}
@@ -658,16 +628,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetFlushs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FLUSHS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FLUSHS_ISSET_ID);
}
/** Returns true if field flushs is set (has been assigned a value) and false otherwise */
public boolean isSetFlushs() {
- return EncodingUtils.testBit(__isset_bitfield, __FLUSHS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FLUSHS_ISSET_ID);
}
public void setFlushsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FLUSHS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FLUSHS_ISSET_ID, value);
}
public long getSyncs() {
@@ -681,16 +651,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
public void unsetSyncs() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SYNCS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SYNCS_ISSET_ID);
}
/** Returns true if field syncs is set (has been assigned a value) and false otherwise */
public boolean isSetSyncs() {
- return EncodingUtils.testBit(__isset_bitfield, __SYNCS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SYNCS_ISSET_ID);
}
public void setSyncsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SYNCS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SYNCS_ISSET_ID, value);
}
public int getBulkImportsSize() {
@@ -703,16 +673,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
public void addToBulkImports(BulkImportStatus elem) {
if (this.bulkImports == null) {
- this.bulkImports = new ArrayList<BulkImportStatus>();
+ this.bulkImports = new java.util.ArrayList<BulkImportStatus>();
}
this.bulkImports.add(elem);
}
- public List<BulkImportStatus> getBulkImports() {
+ public java.util.List<BulkImportStatus> getBulkImports() {
return this.bulkImports;
}
- public TabletServerStatus setBulkImports(List<BulkImportStatus> bulkImports) {
+ public TabletServerStatus setBulkImports(java.util.List<BulkImportStatus> bulkImports) {
this.bulkImports = bulkImports;
return this;
}
@@ -732,13 +702,13 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TABLE_MAP:
if (value == null) {
unsetTableMap();
} else {
- setTableMap((Map<String,TableInfo>)value);
+ setTableMap((java.util.Map<java.lang.String,TableInfo>)value);
}
break;
@@ -746,7 +716,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetLastContact();
} else {
- setLastContact((Long)value);
+ setLastContact((java.lang.Long)value);
}
break;
@@ -754,7 +724,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetName();
} else {
- setName((String)value);
+ setName((java.lang.String)value);
}
break;
@@ -762,7 +732,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetOsLoad();
} else {
- setOsLoad((Double)value);
+ setOsLoad((java.lang.Double)value);
}
break;
@@ -770,7 +740,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetHoldTime();
} else {
- setHoldTime((Long)value);
+ setHoldTime((java.lang.Long)value);
}
break;
@@ -778,7 +748,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetLookups();
} else {
- setLookups((Long)value);
+ setLookups((java.lang.Long)value);
}
break;
@@ -786,7 +756,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetIndexCacheHits();
} else {
- setIndexCacheHits((Long)value);
+ setIndexCacheHits((java.lang.Long)value);
}
break;
@@ -794,7 +764,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetIndexCacheRequest();
} else {
- setIndexCacheRequest((Long)value);
+ setIndexCacheRequest((java.lang.Long)value);
}
break;
@@ -802,7 +772,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetDataCacheHits();
} else {
- setDataCacheHits((Long)value);
+ setDataCacheHits((java.lang.Long)value);
}
break;
@@ -810,7 +780,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetDataCacheRequest();
} else {
- setDataCacheRequest((Long)value);
+ setDataCacheRequest((java.lang.Long)value);
}
break;
@@ -818,7 +788,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetLogSorts();
} else {
- setLogSorts((List<RecoveryStatus>)value);
+ setLogSorts((java.util.List<RecoveryStatus>)value);
}
break;
@@ -826,7 +796,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetFlushs();
} else {
- setFlushs((Long)value);
+ setFlushs((java.lang.Long)value);
}
break;
@@ -834,7 +804,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetSyncs();
} else {
- setSyncs((Long)value);
+ setSyncs((java.lang.Long)value);
}
break;
@@ -842,14 +812,14 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (value == null) {
unsetBulkImports();
} else {
- setBulkImports((List<BulkImportStatus>)value);
+ setBulkImports((java.util.List<BulkImportStatus>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_MAP:
return getTableMap();
@@ -894,13 +864,13 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return getBulkImports();
}
- 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) {
@@ -933,11 +903,11 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
case BULK_IMPORTS:
return isSetBulkImports();
}
- 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 TabletServerStatus)
@@ -948,6 +918,8 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
public boolean equals(TabletServerStatus that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tableMap = true && this.isSetTableMap();
boolean that_present_tableMap = true && that.isSetTableMap();
@@ -1080,79 +1052,45 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_tableMap = true && (isSetTableMap());
- list.add(present_tableMap);
- if (present_tableMap)
- list.add(tableMap);
-
- boolean present_lastContact = true;
- list.add(present_lastContact);
- if (present_lastContact)
- list.add(lastContact);
-
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
-
- boolean present_osLoad = true;
- list.add(present_osLoad);
- if (present_osLoad)
- list.add(osLoad);
-
- boolean present_holdTime = true;
- list.add(present_holdTime);
- if (present_holdTime)
- list.add(holdTime);
-
- boolean present_lookups = true;
- list.add(present_lookups);
- if (present_lookups)
- list.add(lookups);
-
- boolean present_indexCacheHits = true;
- list.add(present_indexCacheHits);
- if (present_indexCacheHits)
- list.add(indexCacheHits);
-
- boolean present_indexCacheRequest = true;
- list.add(present_indexCacheRequest);
- if (present_indexCacheRequest)
- list.add(indexCacheRequest);
-
- boolean present_dataCacheHits = true;
- list.add(present_dataCacheHits);
- if (present_dataCacheHits)
- list.add(dataCacheHits);
-
- boolean present_dataCacheRequest = true;
- list.add(present_dataCacheRequest);
- if (present_dataCacheRequest)
- list.add(dataCacheRequest);
-
- boolean present_logSorts = true && (isSetLogSorts());
- list.add(present_logSorts);
- if (present_logSorts)
- list.add(logSorts);
-
- boolean present_flushs = true;
- list.add(present_flushs);
- if (present_flushs)
- list.add(flushs);
-
- boolean present_syncs = true;
- list.add(present_syncs);
- if (present_syncs)
- list.add(syncs);
-
- boolean present_bulkImports = true && (isSetBulkImports());
- list.add(present_bulkImports);
- if (present_bulkImports)
- list.add(bulkImports);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetTableMap()) ? 131071 : 524287);
+ if (isSetTableMap())
+ hashCode = hashCode * 8191 + tableMap.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lastContact);
+
+ hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
+ if (isSetName())
+ hashCode = hashCode * 8191 + name.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(osLoad);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(holdTime);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lookups);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(indexCacheHits);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(indexCacheRequest);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(dataCacheHits);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(dataCacheRequest);
+
+ hashCode = hashCode * 8191 + ((isSetLogSorts()) ? 131071 : 524287);
+ if (isSetLogSorts())
+ hashCode = hashCode * 8191 + logSorts.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(flushs);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(syncs);
+
+ hashCode = hashCode * 8191 + ((isSetBulkImports()) ? 131071 : 524287);
+ if (isSetBulkImports())
+ hashCode = hashCode * 8191 + bulkImports.hashCode();
+
+ return hashCode;
}
@Override
@@ -1163,7 +1101,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTableMap()).compareTo(other.isSetTableMap());
+ lastComparison = java.lang.Boolean.valueOf(isSetTableMap()).compareTo(other.isSetTableMap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1173,7 +1111,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLastContact()).compareTo(other.isSetLastContact());
+ lastComparison = java.lang.Boolean.valueOf(isSetLastContact()).compareTo(other.isSetLastContact());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1183,7 +1121,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1193,7 +1131,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOsLoad()).compareTo(other.isSetOsLoad());
+ lastComparison = java.lang.Boolean.valueOf(isSetOsLoad()).compareTo(other.isSetOsLoad());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1203,7 +1141,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHoldTime()).compareTo(other.isSetHoldTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetHoldTime()).compareTo(other.isSetHoldTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1213,7 +1151,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLookups()).compareTo(other.isSetLookups());
+ lastComparison = java.lang.Boolean.valueOf(isSetLookups()).compareTo(other.isSetLookups());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1223,7 +1161,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIndexCacheHits()).compareTo(other.isSetIndexCacheHits());
+ lastComparison = java.lang.Boolean.valueOf(isSetIndexCacheHits()).compareTo(other.isSetIndexCacheHits());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1233,7 +1171,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIndexCacheRequest()).compareTo(other.isSetIndexCacheRequest());
+ lastComparison = java.lang.Boolean.valueOf(isSetIndexCacheRequest()).compareTo(other.isSetIndexCacheRequest());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1243,7 +1181,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDataCacheHits()).compareTo(other.isSetDataCacheHits());
+ lastComparison = java.lang.Boolean.valueOf(isSetDataCacheHits()).compareTo(other.isSetDataCacheHits());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1253,7 +1191,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDataCacheRequest()).compareTo(other.isSetDataCacheRequest());
+ lastComparison = java.lang.Boolean.valueOf(isSetDataCacheRequest()).compareTo(other.isSetDataCacheRequest());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1263,7 +1201,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLogSorts()).compareTo(other.isSetLogSorts());
+ lastComparison = java.lang.Boolean.valueOf(isSetLogSorts()).compareTo(other.isSetLogSorts());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1273,7 +1211,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFlushs()).compareTo(other.isSetFlushs());
+ lastComparison = java.lang.Boolean.valueOf(isSetFlushs()).compareTo(other.isSetFlushs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1283,7 +1221,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSyncs()).compareTo(other.isSetSyncs());
+ lastComparison = java.lang.Boolean.valueOf(isSetSyncs()).compareTo(other.isSetSyncs());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1293,7 +1231,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBulkImports()).compareTo(other.isSetBulkImports());
+ lastComparison = java.lang.Boolean.valueOf(isSetBulkImports()).compareTo(other.isSetBulkImports());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1311,16 +1249,16 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
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("TabletServerStatus(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TabletServerStatus(");
boolean first = true;
sb.append("tableMap:");
@@ -1411,7 +1349,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1421,13 +1359,13 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
}
- private static class TabletServerStatusStandardSchemeFactory implements SchemeFactory {
+ private static class TabletServerStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletServerStatusStandardScheme getScheme() {
return new TabletServerStatusStandardScheme();
}
}
- private static class TabletServerStatusStandardScheme extends StandardScheme<TabletServerStatus> {
+ private static class TabletServerStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<TabletServerStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TabletServerStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1443,8 +1381,8 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
- struct.tableMap = new HashMap<String,TableInfo>(2*_map0.size);
- String _key1;
+ struct.tableMap = new java.util.HashMap<java.lang.String,TableInfo>(2*_map0.size);
+ java.lang.String _key1;
TableInfo _val2;
for (int _i3 = 0; _i3 < _map0.size; ++_i3)
{
@@ -1536,7 +1474,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
- struct.logSorts = new ArrayList<RecoveryStatus>(_list4.size);
+ struct.logSorts = new java.util.ArrayList<RecoveryStatus>(_list4.size);
RecoveryStatus _elem5;
for (int _i6 = 0; _i6 < _list4.size; ++_i6)
{
@@ -1571,7 +1509,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list7 = iprot.readListBegin();
- struct.bulkImports = new ArrayList<BulkImportStatus>(_list7.size);
+ struct.bulkImports = new java.util.ArrayList<BulkImportStatus>(_list7.size);
BulkImportStatus _elem8;
for (int _i9 = 0; _i9 < _list7.size; ++_i9)
{
@@ -1605,7 +1543,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
oprot.writeFieldBegin(TABLE_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.tableMap.size()));
- for (Map.Entry<String, TableInfo> _iter10 : struct.tableMap.entrySet())
+ for (java.util.Map.Entry<java.lang.String, TableInfo> _iter10 : struct.tableMap.entrySet())
{
oprot.writeString(_iter10.getKey());
_iter10.getValue().write(oprot);
@@ -1679,18 +1617,18 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
- private static class TabletServerStatusTupleSchemeFactory implements SchemeFactory {
+ private static class TabletServerStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletServerStatusTupleScheme getScheme() {
return new TabletServerStatusTupleScheme();
}
}
- private static class TabletServerStatusTupleScheme extends TupleScheme<TabletServerStatus> {
+ private static class TabletServerStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<TabletServerStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TabletServerStatus 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.isSetTableMap()) {
optionals.set(0);
}
@@ -1737,7 +1675,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (struct.isSetTableMap()) {
{
oprot.writeI32(struct.tableMap.size());
- for (Map.Entry<String, TableInfo> _iter13 : struct.tableMap.entrySet())
+ for (java.util.Map.Entry<java.lang.String, TableInfo> _iter13 : struct.tableMap.entrySet())
{
oprot.writeString(_iter13.getKey());
_iter13.getValue().write(oprot);
@@ -1799,13 +1737,13 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TabletServerStatus struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(14);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(14);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map16 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.tableMap = new HashMap<String,TableInfo>(2*_map16.size);
- String _key17;
+ struct.tableMap = new java.util.HashMap<java.lang.String,TableInfo>(2*_map16.size);
+ java.lang.String _key17;
TableInfo _val18;
for (int _i19 = 0; _i19 < _map16.size; ++_i19)
{
@@ -1856,7 +1794,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (incoming.get(10)) {
{
org.apache.thrift.protocol.TList _list20 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.logSorts = new ArrayList<RecoveryStatus>(_list20.size);
+ struct.logSorts = new java.util.ArrayList<RecoveryStatus>(_list20.size);
RecoveryStatus _elem21;
for (int _i22 = 0; _i22 < _list20.size; ++_i22)
{
@@ -1878,7 +1816,7 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
if (incoming.get(13)) {
{
org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.bulkImports = new ArrayList<BulkImportStatus>(_list23.size);
+ struct.bulkImports = new java.util.ArrayList<BulkImportStatus>(_list23.size);
BulkImportStatus _elem24;
for (int _i25 = 0; _i25 < _list23.size; ++_i25)
{
@@ -1892,5 +1830,9 @@ public class TabletServerStatus implements org.apache.thrift.TBase<TabletServerS
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[27/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java
index 2891727..36eea21 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.master.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum MasterGoalState implements org.apache.thrift.TEnum {
+public enum MasterGoalState implements org.apache.thrift.TEnum {
CLEAN_STOP(0),
SAFE_MODE(1),
NORMAL(2);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
index 9e7b8ea..f6be4d6 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorInfo, MasterMonitorInfo._Fields>, java.io.Serializable, Cloneable, Comparable<MasterMonitorInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MasterMonitorInfo");
@@ -64,15 +37,12 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
private static final org.apache.thrift.protocol.TField DEAD_TABLET_SERVERS_FIELD_DESC = new org.apache.thrift.protocol.TField("deadTabletServers", org.apache.thrift.protocol.TType.LIST, (short)10);
private static final org.apache.thrift.protocol.TField BULK_IMPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkImports", org.apache.thrift.protocol.TType.LIST, (short)11);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new MasterMonitorInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new MasterMonitorInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MasterMonitorInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MasterMonitorInfoTupleSchemeFactory();
- public Map<String,TableInfo> tableMap; // required
- public List<TabletServerStatus> tServerInfo; // required
- public Map<String,Byte> badTServers; // required
+ public java.util.Map<java.lang.String,TableInfo> tableMap; // required
+ public java.util.List<TabletServerStatus> tServerInfo; // required
+ public java.util.Map<java.lang.String,java.lang.Byte> badTServers; // required
/**
*
* @see MasterState
@@ -84,9 +54,9 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
*/
public MasterGoalState goalState; // required
public int unassignedTablets; // required
- public Set<String> serversShuttingDown; // required
- public List<DeadServer> deadTabletServers; // required
- public List<BulkImportStatus> bulkImports; // required
+ public java.util.Set<java.lang.String> serversShuttingDown; // required
+ public java.util.List<DeadServer> deadTabletServers; // required
+ public java.util.List<BulkImportStatus> bulkImports; // 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 {
@@ -108,10 +78,10 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
DEAD_TABLET_SERVERS((short)10, "deadTabletServers"),
BULK_IMPORTS((short)11, "bulkImports");
- 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);
}
}
@@ -150,21 +120,21 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
*/
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;
}
@@ -173,7 +143,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -181,9 +151,9 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
// isset id assignments
private static final int __UNASSIGNEDTABLETS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TABLE_MAP, new org.apache.thrift.meta_data.FieldMetaData("tableMap", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
@@ -210,7 +180,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
tmpMap.put(_Fields.BULK_IMPORTS, new org.apache.thrift.meta_data.FieldMetaData("bulkImports", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkImportStatus.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterMonitorInfo.class, metaDataMap);
}
@@ -218,15 +188,15 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
public MasterMonitorInfo(
- Map<String,TableInfo> tableMap,
- List<TabletServerStatus> tServerInfo,
- Map<String,Byte> badTServers,
+ java.util.Map<java.lang.String,TableInfo> tableMap,
+ java.util.List<TabletServerStatus> tServerInfo,
+ java.util.Map<java.lang.String,java.lang.Byte> badTServers,
MasterState state,
MasterGoalState goalState,
int unassignedTablets,
- Set<String> serversShuttingDown,
- List<DeadServer> deadTabletServers,
- List<BulkImportStatus> bulkImports)
+ java.util.Set<java.lang.String> serversShuttingDown,
+ java.util.List<DeadServer> deadTabletServers,
+ java.util.List<BulkImportStatus> bulkImports)
{
this();
this.tableMap = tableMap;
@@ -247,13 +217,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
public MasterMonitorInfo(MasterMonitorInfo other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTableMap()) {
- Map<String,TableInfo> __this__tableMap = new HashMap<String,TableInfo>(other.tableMap.size());
- for (Map.Entry<String, TableInfo> other_element : other.tableMap.entrySet()) {
+ java.util.Map<java.lang.String,TableInfo> __this__tableMap = new java.util.HashMap<java.lang.String,TableInfo>(other.tableMap.size());
+ for (java.util.Map.Entry<java.lang.String, TableInfo> other_element : other.tableMap.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
TableInfo other_element_value = other_element.getValue();
- String __this__tableMap_copy_key = other_element_key;
+ java.lang.String __this__tableMap_copy_key = other_element_key;
TableInfo __this__tableMap_copy_value = new TableInfo(other_element_value);
@@ -262,14 +232,14 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
this.tableMap = __this__tableMap;
}
if (other.isSetTServerInfo()) {
- List<TabletServerStatus> __this__tServerInfo = new ArrayList<TabletServerStatus>(other.tServerInfo.size());
+ java.util.List<TabletServerStatus> __this__tServerInfo = new java.util.ArrayList<TabletServerStatus>(other.tServerInfo.size());
for (TabletServerStatus other_element : other.tServerInfo) {
__this__tServerInfo.add(new TabletServerStatus(other_element));
}
this.tServerInfo = __this__tServerInfo;
}
if (other.isSetBadTServers()) {
- Map<String,Byte> __this__badTServers = new HashMap<String,Byte>(other.badTServers);
+ java.util.Map<java.lang.String,java.lang.Byte> __this__badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(other.badTServers);
this.badTServers = __this__badTServers;
}
if (other.isSetState()) {
@@ -280,18 +250,18 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
this.unassignedTablets = other.unassignedTablets;
if (other.isSetServersShuttingDown()) {
- Set<String> __this__serversShuttingDown = new HashSet<String>(other.serversShuttingDown);
+ java.util.Set<java.lang.String> __this__serversShuttingDown = new java.util.HashSet<java.lang.String>(other.serversShuttingDown);
this.serversShuttingDown = __this__serversShuttingDown;
}
if (other.isSetDeadTabletServers()) {
- List<DeadServer> __this__deadTabletServers = new ArrayList<DeadServer>(other.deadTabletServers.size());
+ java.util.List<DeadServer> __this__deadTabletServers = new java.util.ArrayList<DeadServer>(other.deadTabletServers.size());
for (DeadServer other_element : other.deadTabletServers) {
__this__deadTabletServers.add(new DeadServer(other_element));
}
this.deadTabletServers = __this__deadTabletServers;
}
if (other.isSetBulkImports()) {
- List<BulkImportStatus> __this__bulkImports = new ArrayList<BulkImportStatus>(other.bulkImports.size());
+ java.util.List<BulkImportStatus> __this__bulkImports = new java.util.ArrayList<BulkImportStatus>(other.bulkImports.size());
for (BulkImportStatus other_element : other.bulkImports) {
__this__bulkImports.add(new BulkImportStatus(other_element));
}
@@ -321,18 +291,18 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return (this.tableMap == null) ? 0 : this.tableMap.size();
}
- public void putToTableMap(String key, TableInfo val) {
+ public void putToTableMap(java.lang.String key, TableInfo val) {
if (this.tableMap == null) {
- this.tableMap = new HashMap<String,TableInfo>();
+ this.tableMap = new java.util.HashMap<java.lang.String,TableInfo>();
}
this.tableMap.put(key, val);
}
- public Map<String,TableInfo> getTableMap() {
+ public java.util.Map<java.lang.String,TableInfo> getTableMap() {
return this.tableMap;
}
- public MasterMonitorInfo setTableMap(Map<String,TableInfo> tableMap) {
+ public MasterMonitorInfo setTableMap(java.util.Map<java.lang.String,TableInfo> tableMap) {
this.tableMap = tableMap;
return this;
}
@@ -362,16 +332,16 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
public void addToTServerInfo(TabletServerStatus elem) {
if (this.tServerInfo == null) {
- this.tServerInfo = new ArrayList<TabletServerStatus>();
+ this.tServerInfo = new java.util.ArrayList<TabletServerStatus>();
}
this.tServerInfo.add(elem);
}
- public List<TabletServerStatus> getTServerInfo() {
+ public java.util.List<TabletServerStatus> getTServerInfo() {
return this.tServerInfo;
}
- public MasterMonitorInfo setTServerInfo(List<TabletServerStatus> tServerInfo) {
+ public MasterMonitorInfo setTServerInfo(java.util.List<TabletServerStatus> tServerInfo) {
this.tServerInfo = tServerInfo;
return this;
}
@@ -395,18 +365,18 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return (this.badTServers == null) ? 0 : this.badTServers.size();
}
- public void putToBadTServers(String key, byte val) {
+ public void putToBadTServers(java.lang.String key, byte val) {
if (this.badTServers == null) {
- this.badTServers = new HashMap<String,Byte>();
+ this.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>();
}
this.badTServers.put(key, val);
}
- public Map<String,Byte> getBadTServers() {
+ public java.util.Map<java.lang.String,java.lang.Byte> getBadTServers() {
return this.badTServers;
}
- public MasterMonitorInfo setBadTServers(Map<String,Byte> badTServers) {
+ public MasterMonitorInfo setBadTServers(java.util.Map<java.lang.String,java.lang.Byte> badTServers) {
this.badTServers = badTServers;
return this;
}
@@ -501,38 +471,38 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
public void unsetUnassignedTablets() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID);
}
/** Returns true if field unassignedTablets is set (has been assigned a value) and false otherwise */
public boolean isSetUnassignedTablets() {
- return EncodingUtils.testBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID);
}
public void setUnassignedTabletsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID, value);
}
public int getServersShuttingDownSize() {
return (this.serversShuttingDown == null) ? 0 : this.serversShuttingDown.size();
}
- public java.util.Iterator<String> getServersShuttingDownIterator() {
+ public java.util.Iterator<java.lang.String> getServersShuttingDownIterator() {
return (this.serversShuttingDown == null) ? null : this.serversShuttingDown.iterator();
}
- public void addToServersShuttingDown(String elem) {
+ public void addToServersShuttingDown(java.lang.String elem) {
if (this.serversShuttingDown == null) {
- this.serversShuttingDown = new HashSet<String>();
+ this.serversShuttingDown = new java.util.HashSet<java.lang.String>();
}
this.serversShuttingDown.add(elem);
}
- public Set<String> getServersShuttingDown() {
+ public java.util.Set<java.lang.String> getServersShuttingDown() {
return this.serversShuttingDown;
}
- public MasterMonitorInfo setServersShuttingDown(Set<String> serversShuttingDown) {
+ public MasterMonitorInfo setServersShuttingDown(java.util.Set<java.lang.String> serversShuttingDown) {
this.serversShuttingDown = serversShuttingDown;
return this;
}
@@ -562,16 +532,16 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
public void addToDeadTabletServers(DeadServer elem) {
if (this.deadTabletServers == null) {
- this.deadTabletServers = new ArrayList<DeadServer>();
+ this.deadTabletServers = new java.util.ArrayList<DeadServer>();
}
this.deadTabletServers.add(elem);
}
- public List<DeadServer> getDeadTabletServers() {
+ public java.util.List<DeadServer> getDeadTabletServers() {
return this.deadTabletServers;
}
- public MasterMonitorInfo setDeadTabletServers(List<DeadServer> deadTabletServers) {
+ public MasterMonitorInfo setDeadTabletServers(java.util.List<DeadServer> deadTabletServers) {
this.deadTabletServers = deadTabletServers;
return this;
}
@@ -601,16 +571,16 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
public void addToBulkImports(BulkImportStatus elem) {
if (this.bulkImports == null) {
- this.bulkImports = new ArrayList<BulkImportStatus>();
+ this.bulkImports = new java.util.ArrayList<BulkImportStatus>();
}
this.bulkImports.add(elem);
}
- public List<BulkImportStatus> getBulkImports() {
+ public java.util.List<BulkImportStatus> getBulkImports() {
return this.bulkImports;
}
- public MasterMonitorInfo setBulkImports(List<BulkImportStatus> bulkImports) {
+ public MasterMonitorInfo setBulkImports(java.util.List<BulkImportStatus> bulkImports) {
this.bulkImports = bulkImports;
return this;
}
@@ -630,13 +600,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TABLE_MAP:
if (value == null) {
unsetTableMap();
} else {
- setTableMap((Map<String,TableInfo>)value);
+ setTableMap((java.util.Map<java.lang.String,TableInfo>)value);
}
break;
@@ -644,7 +614,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (value == null) {
unsetTServerInfo();
} else {
- setTServerInfo((List<TabletServerStatus>)value);
+ setTServerInfo((java.util.List<TabletServerStatus>)value);
}
break;
@@ -652,7 +622,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (value == null) {
unsetBadTServers();
} else {
- setBadTServers((Map<String,Byte>)value);
+ setBadTServers((java.util.Map<java.lang.String,java.lang.Byte>)value);
}
break;
@@ -676,7 +646,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (value == null) {
unsetUnassignedTablets();
} else {
- setUnassignedTablets((Integer)value);
+ setUnassignedTablets((java.lang.Integer)value);
}
break;
@@ -684,7 +654,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (value == null) {
unsetServersShuttingDown();
} else {
- setServersShuttingDown((Set<String>)value);
+ setServersShuttingDown((java.util.Set<java.lang.String>)value);
}
break;
@@ -692,7 +662,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (value == null) {
unsetDeadTabletServers();
} else {
- setDeadTabletServers((List<DeadServer>)value);
+ setDeadTabletServers((java.util.List<DeadServer>)value);
}
break;
@@ -700,14 +670,14 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (value == null) {
unsetBulkImports();
} else {
- setBulkImports((List<BulkImportStatus>)value);
+ setBulkImports((java.util.List<BulkImportStatus>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_MAP:
return getTableMap();
@@ -737,13 +707,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return getBulkImports();
}
- 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) {
@@ -766,11 +736,11 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
case BULK_IMPORTS:
return isSetBulkImports();
}
- 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 MasterMonitorInfo)
@@ -781,6 +751,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
public boolean equals(MasterMonitorInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tableMap = true && this.isSetTableMap();
boolean that_present_tableMap = true && that.isSetTableMap();
@@ -868,54 +840,43 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tableMap = true && (isSetTableMap());
- list.add(present_tableMap);
- if (present_tableMap)
- list.add(tableMap);
+ hashCode = hashCode * 8191 + ((isSetTableMap()) ? 131071 : 524287);
+ if (isSetTableMap())
+ hashCode = hashCode * 8191 + tableMap.hashCode();
- boolean present_tServerInfo = true && (isSetTServerInfo());
- list.add(present_tServerInfo);
- if (present_tServerInfo)
- list.add(tServerInfo);
+ hashCode = hashCode * 8191 + ((isSetTServerInfo()) ? 131071 : 524287);
+ if (isSetTServerInfo())
+ hashCode = hashCode * 8191 + tServerInfo.hashCode();
- boolean present_badTServers = true && (isSetBadTServers());
- list.add(present_badTServers);
- if (present_badTServers)
- list.add(badTServers);
+ hashCode = hashCode * 8191 + ((isSetBadTServers()) ? 131071 : 524287);
+ if (isSetBadTServers())
+ hashCode = hashCode * 8191 + badTServers.hashCode();
- boolean present_state = true && (isSetState());
- list.add(present_state);
- if (present_state)
- list.add(state.getValue());
+ hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
+ if (isSetState())
+ hashCode = hashCode * 8191 + state.getValue();
- boolean present_goalState = true && (isSetGoalState());
- list.add(present_goalState);
- if (present_goalState)
- list.add(goalState.getValue());
+ hashCode = hashCode * 8191 + ((isSetGoalState()) ? 131071 : 524287);
+ if (isSetGoalState())
+ hashCode = hashCode * 8191 + goalState.getValue();
- boolean present_unassignedTablets = true;
- list.add(present_unassignedTablets);
- if (present_unassignedTablets)
- list.add(unassignedTablets);
+ hashCode = hashCode * 8191 + unassignedTablets;
- boolean present_serversShuttingDown = true && (isSetServersShuttingDown());
- list.add(present_serversShuttingDown);
- if (present_serversShuttingDown)
- list.add(serversShuttingDown);
+ hashCode = hashCode * 8191 + ((isSetServersShuttingDown()) ? 131071 : 524287);
+ if (isSetServersShuttingDown())
+ hashCode = hashCode * 8191 + serversShuttingDown.hashCode();
- boolean present_deadTabletServers = true && (isSetDeadTabletServers());
- list.add(present_deadTabletServers);
- if (present_deadTabletServers)
- list.add(deadTabletServers);
+ hashCode = hashCode * 8191 + ((isSetDeadTabletServers()) ? 131071 : 524287);
+ if (isSetDeadTabletServers())
+ hashCode = hashCode * 8191 + deadTabletServers.hashCode();
- boolean present_bulkImports = true && (isSetBulkImports());
- list.add(present_bulkImports);
- if (present_bulkImports)
- list.add(bulkImports);
+ hashCode = hashCode * 8191 + ((isSetBulkImports()) ? 131071 : 524287);
+ if (isSetBulkImports())
+ hashCode = hashCode * 8191 + bulkImports.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -926,7 +887,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTableMap()).compareTo(other.isSetTableMap());
+ lastComparison = java.lang.Boolean.valueOf(isSetTableMap()).compareTo(other.isSetTableMap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -936,7 +897,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTServerInfo()).compareTo(other.isSetTServerInfo());
+ lastComparison = java.lang.Boolean.valueOf(isSetTServerInfo()).compareTo(other.isSetTServerInfo());
if (lastComparison != 0) {
return lastComparison;
}
@@ -946,7 +907,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBadTServers()).compareTo(other.isSetBadTServers());
+ lastComparison = java.lang.Boolean.valueOf(isSetBadTServers()).compareTo(other.isSetBadTServers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -956,7 +917,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ lastComparison = java.lang.Boolean.valueOf(isSetState()).compareTo(other.isSetState());
if (lastComparison != 0) {
return lastComparison;
}
@@ -966,7 +927,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetGoalState()).compareTo(other.isSetGoalState());
+ lastComparison = java.lang.Boolean.valueOf(isSetGoalState()).compareTo(other.isSetGoalState());
if (lastComparison != 0) {
return lastComparison;
}
@@ -976,7 +937,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUnassignedTablets()).compareTo(other.isSetUnassignedTablets());
+ lastComparison = java.lang.Boolean.valueOf(isSetUnassignedTablets()).compareTo(other.isSetUnassignedTablets());
if (lastComparison != 0) {
return lastComparison;
}
@@ -986,7 +947,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServersShuttingDown()).compareTo(other.isSetServersShuttingDown());
+ lastComparison = java.lang.Boolean.valueOf(isSetServersShuttingDown()).compareTo(other.isSetServersShuttingDown());
if (lastComparison != 0) {
return lastComparison;
}
@@ -996,7 +957,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDeadTabletServers()).compareTo(other.isSetDeadTabletServers());
+ lastComparison = java.lang.Boolean.valueOf(isSetDeadTabletServers()).compareTo(other.isSetDeadTabletServers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1006,7 +967,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBulkImports()).compareTo(other.isSetBulkImports());
+ lastComparison = java.lang.Boolean.valueOf(isSetBulkImports()).compareTo(other.isSetBulkImports());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1024,16 +985,16 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
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("MasterMonitorInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("MasterMonitorInfo(");
boolean first = true;
sb.append("tableMap:");
@@ -1120,7 +1081,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1130,13 +1091,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
}
- private static class MasterMonitorInfoStandardSchemeFactory implements SchemeFactory {
+ private static class MasterMonitorInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MasterMonitorInfoStandardScheme getScheme() {
return new MasterMonitorInfoStandardScheme();
}
}
- private static class MasterMonitorInfoStandardScheme extends StandardScheme<MasterMonitorInfo> {
+ private static class MasterMonitorInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<MasterMonitorInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, MasterMonitorInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1152,8 +1113,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin();
- struct.tableMap = new HashMap<String,TableInfo>(2*_map26.size);
- String _key27;
+ struct.tableMap = new java.util.HashMap<java.lang.String,TableInfo>(2*_map26.size);
+ java.lang.String _key27;
TableInfo _val28;
for (int _i29 = 0; _i29 < _map26.size; ++_i29)
{
@@ -1173,7 +1134,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
- struct.tServerInfo = new ArrayList<TabletServerStatus>(_list30.size);
+ struct.tServerInfo = new java.util.ArrayList<TabletServerStatus>(_list30.size);
TabletServerStatus _elem31;
for (int _i32 = 0; _i32 < _list30.size; ++_i32)
{
@@ -1192,8 +1153,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map33 = iprot.readMapBegin();
- struct.badTServers = new HashMap<String,Byte>(2*_map33.size);
- String _key34;
+ struct.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(2*_map33.size);
+ java.lang.String _key34;
byte _val35;
for (int _i36 = 0; _i36 < _map33.size; ++_i36)
{
@@ -1236,8 +1197,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set37 = iprot.readSetBegin();
- struct.serversShuttingDown = new HashSet<String>(2*_set37.size);
- String _elem38;
+ struct.serversShuttingDown = new java.util.HashSet<java.lang.String>(2*_set37.size);
+ java.lang.String _elem38;
for (int _i39 = 0; _i39 < _set37.size; ++_i39)
{
_elem38 = iprot.readString();
@@ -1254,7 +1215,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
- struct.deadTabletServers = new ArrayList<DeadServer>(_list40.size);
+ struct.deadTabletServers = new java.util.ArrayList<DeadServer>(_list40.size);
DeadServer _elem41;
for (int _i42 = 0; _i42 < _list40.size; ++_i42)
{
@@ -1273,7 +1234,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list43 = iprot.readListBegin();
- struct.bulkImports = new ArrayList<BulkImportStatus>(_list43.size);
+ struct.bulkImports = new java.util.ArrayList<BulkImportStatus>(_list43.size);
BulkImportStatus _elem44;
for (int _i45 = 0; _i45 < _list43.size; ++_i45)
{
@@ -1307,7 +1268,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
oprot.writeFieldBegin(TABLE_MAP_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.tableMap.size()));
- for (Map.Entry<String, TableInfo> _iter46 : struct.tableMap.entrySet())
+ for (java.util.Map.Entry<java.lang.String, TableInfo> _iter46 : struct.tableMap.entrySet())
{
oprot.writeString(_iter46.getKey());
_iter46.getValue().write(oprot);
@@ -1332,7 +1293,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
oprot.writeFieldBegin(BAD_TSERVERS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, struct.badTServers.size()));
- for (Map.Entry<String, Byte> _iter48 : struct.badTServers.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Byte> _iter48 : struct.badTServers.entrySet())
{
oprot.writeString(_iter48.getKey());
oprot.writeByte(_iter48.getValue());
@@ -1358,7 +1319,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
oprot.writeFieldBegin(SERVERS_SHUTTING_DOWN_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.serversShuttingDown.size()));
- for (String _iter49 : struct.serversShuttingDown)
+ for (java.lang.String _iter49 : struct.serversShuttingDown)
{
oprot.writeString(_iter49);
}
@@ -1396,18 +1357,18 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
- private static class MasterMonitorInfoTupleSchemeFactory implements SchemeFactory {
+ private static class MasterMonitorInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MasterMonitorInfoTupleScheme getScheme() {
return new MasterMonitorInfoTupleScheme();
}
}
- private static class MasterMonitorInfoTupleScheme extends TupleScheme<MasterMonitorInfo> {
+ private static class MasterMonitorInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<MasterMonitorInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MasterMonitorInfo 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.isSetTableMap()) {
optionals.set(0);
}
@@ -1439,7 +1400,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (struct.isSetTableMap()) {
{
oprot.writeI32(struct.tableMap.size());
- for (Map.Entry<String, TableInfo> _iter52 : struct.tableMap.entrySet())
+ for (java.util.Map.Entry<java.lang.String, TableInfo> _iter52 : struct.tableMap.entrySet())
{
oprot.writeString(_iter52.getKey());
_iter52.getValue().write(oprot);
@@ -1458,7 +1419,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (struct.isSetBadTServers()) {
{
oprot.writeI32(struct.badTServers.size());
- for (Map.Entry<String, Byte> _iter54 : struct.badTServers.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.Byte> _iter54 : struct.badTServers.entrySet())
{
oprot.writeString(_iter54.getKey());
oprot.writeByte(_iter54.getValue());
@@ -1477,7 +1438,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (struct.isSetServersShuttingDown()) {
{
oprot.writeI32(struct.serversShuttingDown.size());
- for (String _iter55 : struct.serversShuttingDown)
+ for (java.lang.String _iter55 : struct.serversShuttingDown)
{
oprot.writeString(_iter55);
}
@@ -1505,13 +1466,13 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MasterMonitorInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(9);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.tableMap = new HashMap<String,TableInfo>(2*_map58.size);
- String _key59;
+ struct.tableMap = new java.util.HashMap<java.lang.String,TableInfo>(2*_map58.size);
+ java.lang.String _key59;
TableInfo _val60;
for (int _i61 = 0; _i61 < _map58.size; ++_i61)
{
@@ -1526,7 +1487,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list62 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.tServerInfo = new ArrayList<TabletServerStatus>(_list62.size);
+ struct.tServerInfo = new java.util.ArrayList<TabletServerStatus>(_list62.size);
TabletServerStatus _elem63;
for (int _i64 = 0; _i64 < _list62.size; ++_i64)
{
@@ -1540,8 +1501,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map65 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, iprot.readI32());
- struct.badTServers = new HashMap<String,Byte>(2*_map65.size);
- String _key66;
+ struct.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(2*_map65.size);
+ java.lang.String _key66;
byte _val67;
for (int _i68 = 0; _i68 < _map65.size; ++_i68)
{
@@ -1567,8 +1528,8 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TSet _set69 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.serversShuttingDown = new HashSet<String>(2*_set69.size);
- String _elem70;
+ struct.serversShuttingDown = new java.util.HashSet<java.lang.String>(2*_set69.size);
+ java.lang.String _elem70;
for (int _i71 = 0; _i71 < _set69.size; ++_i71)
{
_elem70 = iprot.readString();
@@ -1580,7 +1541,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (incoming.get(7)) {
{
org.apache.thrift.protocol.TList _list72 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.deadTabletServers = new ArrayList<DeadServer>(_list72.size);
+ struct.deadTabletServers = new java.util.ArrayList<DeadServer>(_list72.size);
DeadServer _elem73;
for (int _i74 = 0; _i74 < _list72.size; ++_i74)
{
@@ -1594,7 +1555,7 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.bulkImports = new ArrayList<BulkImportStatus>(_list75.size);
+ struct.bulkImports = new java.util.ArrayList<BulkImportStatus>(_list75.size);
BulkImportStatus _elem76;
for (int _i77 = 0; _i77 < _list75.size; ++_i77)
{
@@ -1608,5 +1569,9 @@ public class MasterMonitorInfo implements org.apache.thrift.TBase<MasterMonitorI
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java
index 29548d3..28fa329 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.master.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum MasterState implements org.apache.thrift.TEnum {
+public enum MasterState implements org.apache.thrift.TEnum {
INITIAL(0),
HAVE_LOCK(1),
SAFE_MODE(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java
index 641345c..7b1c9a1 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class RecoveryException extends TException implements org.apache.thrift.TBase<RecoveryException, RecoveryException._Fields>, java.io.Serializable, Cloneable, Comparable<RecoveryException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class RecoveryException extends org.apache.thrift.TException implements org.apache.thrift.TBase<RecoveryException, RecoveryException._Fields>, java.io.Serializable, Cloneable, Comparable<RecoveryException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RecoveryException");
private static final org.apache.thrift.protocol.TField WHY_FIELD_DESC = new org.apache.thrift.protocol.TField("why", 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 RecoveryExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new RecoveryExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RecoveryExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RecoveryExceptionTupleSchemeFactory();
- public String why; // required
+ public java.lang.String why; // 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 {
WHY((short)1, "why");
- 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);
}
}
@@ -94,21 +64,21 @@ public class RecoveryException extends TException implements org.apache.thrift.T
*/
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;
}
@@ -117,18 +87,18 @@ public class RecoveryException extends TException implements org.apache.thrift.T
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.WHY, new org.apache.thrift.meta_data.FieldMetaData("why", 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(RecoveryException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class RecoveryException extends TException implements org.apache.thrift.T
}
public RecoveryException(
- String why)
+ java.lang.String why)
{
this();
this.why = why;
@@ -160,11 +130,11 @@ public class RecoveryException extends TException implements org.apache.thrift.T
this.why = null;
}
- public String getWhy() {
+ public java.lang.String getWhy() {
return this.why;
}
- public RecoveryException setWhy(String why) {
+ public RecoveryException setWhy(java.lang.String why) {
this.why = why;
return this;
}
@@ -184,43 +154,43 @@ public class RecoveryException extends TException implements org.apache.thrift.T
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case WHY:
if (value == null) {
unsetWhy();
} else {
- setWhy((String)value);
+ setWhy((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case WHY:
return getWhy();
}
- 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 WHY:
return isSetWhy();
}
- 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 RecoveryException)
@@ -231,6 +201,8 @@ public class RecoveryException extends TException implements org.apache.thrift.T
public boolean equals(RecoveryException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_why = true && this.isSetWhy();
boolean that_present_why = true && that.isSetWhy();
@@ -246,14 +218,13 @@ public class RecoveryException extends TException implements org.apache.thrift.T
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_why = true && (isSetWhy());
- list.add(present_why);
- if (present_why)
- list.add(why);
+ hashCode = hashCode * 8191 + ((isSetWhy()) ? 131071 : 524287);
+ if (isSetWhy())
+ hashCode = hashCode * 8191 + why.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class RecoveryException extends TException implements org.apache.thrift.T
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetWhy()).compareTo(other.isSetWhy());
+ lastComparison = java.lang.Boolean.valueOf(isSetWhy()).compareTo(other.isSetWhy());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class RecoveryException extends TException implements org.apache.thrift.T
}
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("RecoveryException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("RecoveryException(");
boolean first = true;
sb.append("why:");
@@ -318,7 +289,7 @@ public class RecoveryException extends TException implements org.apache.thrift.T
}
}
- 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) {
@@ -326,13 +297,13 @@ public class RecoveryException extends TException implements org.apache.thrift.T
}
}
- private static class RecoveryExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class RecoveryExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RecoveryExceptionStandardScheme getScheme() {
return new RecoveryExceptionStandardScheme();
}
}
- private static class RecoveryExceptionStandardScheme extends StandardScheme<RecoveryException> {
+ private static class RecoveryExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<RecoveryException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, RecoveryException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class RecoveryException extends TException implements org.apache.thrift.T
}
- private static class RecoveryExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class RecoveryExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RecoveryExceptionTupleScheme getScheme() {
return new RecoveryExceptionTupleScheme();
}
}
- private static class RecoveryExceptionTupleScheme extends TupleScheme<RecoveryException> {
+ private static class RecoveryExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<RecoveryException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RecoveryException 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.isSetWhy()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class RecoveryException extends TException implements org.apache.thrift.T
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RecoveryException 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.why = iprot.readString();
struct.setWhyIsSet(true);
@@ -410,5 +381,9 @@ public class RecoveryException extends TException implements org.apache.thrift.T
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java
index 44a27df..5275897 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, RecoveryStatus._Fields>, java.io.Serializable, Cloneable, Comparable<RecoveryStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RecoveryStatus");
@@ -58,13 +31,10 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
private static final org.apache.thrift.protocol.TField RUNTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("runtime", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField PROGRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("progress", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new RecoveryStatusStandardSchemeFactory());
- schemes.put(TupleScheme.class, new RecoveryStatusTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RecoveryStatusStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RecoveryStatusTupleSchemeFactory();
- public String name; // required
+ public java.lang.String name; // required
public int runtime; // required
public double progress; // required
@@ -74,10 +44,10 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
RUNTIME((short)5, "runtime"),
PROGRESS((short)6, "progress");
- 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);
}
}
@@ -104,21 +74,21 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
*/
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;
}
@@ -127,7 +97,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -136,16 +106,16 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
private static final int __RUNTIME_ISSET_ID = 0;
private static final int __PROGRESS_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.RUNTIME, new org.apache.thrift.meta_data.FieldMetaData("runtime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.PROGRESS, new org.apache.thrift.meta_data.FieldMetaData("progress", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RecoveryStatus.class, metaDataMap);
}
@@ -153,7 +123,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
}
public RecoveryStatus(
- String name,
+ java.lang.String name,
int runtime,
double progress)
{
@@ -190,11 +160,11 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
this.progress = 0.0;
}
- public String getName() {
+ public java.lang.String getName() {
return this.name;
}
- public RecoveryStatus setName(String name) {
+ public RecoveryStatus setName(java.lang.String name) {
this.name = name;
return this;
}
@@ -225,16 +195,16 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
}
public void unsetRuntime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RUNTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RUNTIME_ISSET_ID);
}
/** Returns true if field runtime is set (has been assigned a value) and false otherwise */
public boolean isSetRuntime() {
- return EncodingUtils.testBit(__isset_bitfield, __RUNTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RUNTIME_ISSET_ID);
}
public void setRuntimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RUNTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RUNTIME_ISSET_ID, value);
}
public double getProgress() {
@@ -248,25 +218,25 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
}
public void unsetProgress() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROGRESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PROGRESS_ISSET_ID);
}
/** Returns true if field progress is set (has been assigned a value) and false otherwise */
public boolean isSetProgress() {
- return EncodingUtils.testBit(__isset_bitfield, __PROGRESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PROGRESS_ISSET_ID);
}
public void setProgressIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROGRESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PROGRESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unsetName();
} else {
- setName((String)value);
+ setName((java.lang.String)value);
}
break;
@@ -274,7 +244,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
if (value == null) {
unsetRuntime();
} else {
- setRuntime((Integer)value);
+ setRuntime((java.lang.Integer)value);
}
break;
@@ -282,14 +252,14 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
if (value == null) {
unsetProgress();
} else {
- setProgress((Double)value);
+ setProgress((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return getName();
@@ -301,13 +271,13 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
return getProgress();
}
- 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) {
@@ -318,11 +288,11 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
case PROGRESS:
return isSetProgress();
}
- 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 RecoveryStatus)
@@ -333,6 +303,8 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
public boolean equals(RecoveryStatus that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
@@ -366,24 +338,17 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name)
- list.add(name);
+ hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
+ if (isSetName())
+ hashCode = hashCode * 8191 + name.hashCode();
- boolean present_runtime = true;
- list.add(present_runtime);
- if (present_runtime)
- list.add(runtime);
+ hashCode = hashCode * 8191 + runtime;
- boolean present_progress = true;
- list.add(present_progress);
- if (present_progress)
- list.add(progress);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(progress);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -394,7 +359,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -404,7 +369,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRuntime()).compareTo(other.isSetRuntime());
+ lastComparison = java.lang.Boolean.valueOf(isSetRuntime()).compareTo(other.isSetRuntime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -414,7 +379,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetProgress()).compareTo(other.isSetProgress());
+ lastComparison = java.lang.Boolean.valueOf(isSetProgress()).compareTo(other.isSetProgress());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,16 +397,16 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
}
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("RecoveryStatus(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("RecoveryStatus(");
boolean first = true;
sb.append("name:");
@@ -476,7 +441,7 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -486,13 +451,13 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
}
}
- private static class RecoveryStatusStandardSchemeFactory implements SchemeFactory {
+ private static class RecoveryStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RecoveryStatusStandardScheme getScheme() {
return new RecoveryStatusStandardScheme();
}
}
- private static class RecoveryStatusStandardScheme extends StandardScheme<RecoveryStatus> {
+ private static class RecoveryStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<RecoveryStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, RecoveryStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -560,18 +525,18 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
}
- private static class RecoveryStatusTupleSchemeFactory implements SchemeFactory {
+ private static class RecoveryStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RecoveryStatusTupleScheme getScheme() {
return new RecoveryStatusTupleScheme();
}
}
- private static class RecoveryStatusTupleScheme extends TupleScheme<RecoveryStatus> {
+ private static class RecoveryStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<RecoveryStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RecoveryStatus 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.isSetName()) {
optionals.set(0);
}
@@ -595,8 +560,8 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RecoveryStatus 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.name = iprot.readString();
struct.setNameIsSet(true);
@@ -612,5 +577,9 @@ public class RecoveryStatus implements org.apache.thrift.TBase<RecoveryStatus, R
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[04/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/python/constants.py
----------------------------------------------------------------------
diff --git a/proxy/src/main/python/constants.py b/proxy/src/main/python/constants.py
index 8139236..3b2f97a 100644
--- a/proxy/src/main/python/constants.py
+++ b/proxy/src/main/python/constants.py
@@ -13,13 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
-from ttypes import *
-
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+import sys
+from .ttypes import *
[05/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/python/AccumuloProxy.py
----------------------------------------------------------------------
diff --git a/proxy/src/main/python/AccumuloProxy.py b/proxy/src/main/python/AccumuloProxy.py
index 19bd257..ea6e63a 100644
--- a/proxy/src/main/python/AccumuloProxy.py
+++ b/proxy/src/main/python/AccumuloProxy.py
@@ -13,83 +13,8495 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# Autogenerated by Thrift Compiler (0.10.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TException, TApplicationException
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+import sys
import logging
-from ttypes import *
+from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
-class Iface:
- def login(self, principal, loginProperties):
+class Iface(object):
+ def login(self, principal, loginProperties):
+ """
+ Parameters:
+ - principal
+ - loginProperties
+ """
+ pass
+
+ def addConstraint(self, login, tableName, constraintClassName):
+ """
+ Parameters:
+ - login
+ - tableName
+ - constraintClassName
+ """
+ pass
+
+ def addSplits(self, login, tableName, splits):
+ """
+ Parameters:
+ - login
+ - tableName
+ - splits
+ """
+ pass
+
+ def attachIterator(self, login, tableName, setting, scopes):
+ """
+ Parameters:
+ - login
+ - tableName
+ - setting
+ - scopes
+ """
+ pass
+
+ def checkIteratorConflicts(self, login, tableName, setting, scopes):
+ """
+ Parameters:
+ - login
+ - tableName
+ - setting
+ - scopes
+ """
+ pass
+
+ def clearLocatorCache(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ pass
+
+ def cloneTable(self, login, tableName, newTableName, flush, propertiesToSet, propertiesToExclude):
+ """
+ Parameters:
+ - login
+ - tableName
+ - newTableName
+ - flush
+ - propertiesToSet
+ - propertiesToExclude
+ """
+ pass
+
+ def compactTable(self, login, tableName, startRow, endRow, iterators, flush, wait, compactionStrategy):
+ """
+ Parameters:
+ - login
+ - tableName
+ - startRow
+ - endRow
+ - iterators
+ - flush
+ - wait
+ - compactionStrategy
+ """
+ pass
+
+ def cancelCompaction(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ pass
+
+ def createTable(self, login, tableName, versioningIter, type):
+ """
+ Parameters:
+ - login
+ - tableName
+ - versioningIter
+ - type
+ """
+ pass
+
+ def deleteTable(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ pass
+
+ def deleteRows(self, login, tableName, startRow, endRow):
+ """
+ Parameters:
+ - login
+ - tableName
+ - startRow
+ - endRow
+ """
+ pass
+
+ def exportTable(self, login, tableName, exportDir):
+ """
+ Parameters:
+ - login
+ - tableName
+ - exportDir
+ """
+ pass
+
+ def flushTable(self, login, tableName, startRow, endRow, wait):
+ """
+ Parameters:
+ - login
+ - tableName
+ - startRow
+ - endRow
+ - wait
+ """
+ pass
+
+ def getDiskUsage(self, login, tables):
+ """
+ Parameters:
+ - login
+ - tables
+ """
+ pass
+
+ def getLocalityGroups(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ pass
+
+ def getIteratorSetting(self, login, tableName, iteratorName, scope):
+ """
+ Parameters:
+ - login
+ - tableName
+ - iteratorName
+ - scope
+ """
+ pass
+
+ def getMaxRow(self, login, tableName, auths, startRow, startInclusive, endRow, endInclusive):
+ """
+ Parameters:
+ - login
+ - tableName
+ - auths
+ - startRow
+ - startInclusive
+ - endRow
+ - endInclusive
+ """
+ pass
+
+ def getTableProperties(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ pass
+
+ def importDirectory(self, login, tableName, importDir, failureDir, setTime):
+ """
+ Parameters:
+ - login
+ - tableName
+ - importDir
+ - failureDir
+ - setTime
+ """
+ pass
+
+ def importTable(self, login, tableName, importDir):
+ """
+ Parameters:
+ - login
+ - tableName
+ - importDir
+ """
+ pass
+
+ def listSplits(self, login, tableName, maxSplits):
+ """
+ Parameters:
+ - login
+ - tableName
+ - maxSplits
+ """
+ pass
+
+ def listTables(self, login):
+ """
+ Parameters:
+ - login
+ """
+ pass
+
+ def listIterators(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ pass
+
+ def listConstraints(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ pass
+
+ def mergeTablets(self, login, tableName, startRow, endRow):
+ """
+ Parameters:
+ - login
+ - tableName
+ - startRow
+ - endRow
+ """
+ pass
+
+ def offlineTable(self, login, tableName, wait):
+ """
+ Parameters:
+ - login
+ - tableName
+ - wait
+ """
+ pass
+
+ def onlineTable(self, login, tableName, wait):
+ """
+ Parameters:
+ - login
+ - tableName
+ - wait
+ """
+ pass
+
+ def removeConstraint(self, login, tableName, constraint):
+ """
+ Parameters:
+ - login
+ - tableName
+ - constraint
+ """
+ pass
+
+ def removeIterator(self, login, tableName, iterName, scopes):
+ """
+ Parameters:
+ - login
+ - tableName
+ - iterName
+ - scopes
+ """
+ pass
+
+ def removeTableProperty(self, login, tableName, property):
+ """
+ Parameters:
+ - login
+ - tableName
+ - property
+ """
+ pass
+
+ def renameTable(self, login, oldTableName, newTableName):
+ """
+ Parameters:
+ - login
+ - oldTableName
+ - newTableName
+ """
+ pass
+
+ def setLocalityGroups(self, login, tableName, groups):
+ """
+ Parameters:
+ - login
+ - tableName
+ - groups
+ """
+ pass
+
+ def setTableProperty(self, login, tableName, property, value):
+ """
+ Parameters:
+ - login
+ - tableName
+ - property
+ - value
+ """
+ pass
+
+ def splitRangeByTablets(self, login, tableName, range, maxSplits):
+ """
+ Parameters:
+ - login
+ - tableName
+ - range
+ - maxSplits
+ """
+ pass
+
+ def tableExists(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ pass
+
+ def tableIdMap(self, login):
+ """
+ Parameters:
+ - login
+ """
+ pass
+
+ def testTableClassLoad(self, login, tableName, className, asTypeName):
+ """
+ Parameters:
+ - login
+ - tableName
+ - className
+ - asTypeName
+ """
+ pass
+
+ def pingTabletServer(self, login, tserver):
+ """
+ Parameters:
+ - login
+ - tserver
+ """
+ pass
+
+ def getActiveScans(self, login, tserver):
+ """
+ Parameters:
+ - login
+ - tserver
+ """
+ pass
+
+ def getActiveCompactions(self, login, tserver):
+ """
+ Parameters:
+ - login
+ - tserver
+ """
+ pass
+
+ def getSiteConfiguration(self, login):
+ """
+ Parameters:
+ - login
+ """
+ pass
+
+ def getSystemConfiguration(self, login):
+ """
+ Parameters:
+ - login
+ """
+ pass
+
+ def getTabletServers(self, login):
+ """
+ Parameters:
+ - login
+ """
+ pass
+
+ def removeProperty(self, login, property):
+ """
+ Parameters:
+ - login
+ - property
+ """
+ pass
+
+ def setProperty(self, login, property, value):
+ """
+ Parameters:
+ - login
+ - property
+ - value
+ """
+ pass
+
+ def testClassLoad(self, login, className, asTypeName):
+ """
+ Parameters:
+ - login
+ - className
+ - asTypeName
+ """
+ pass
+
+ def authenticateUser(self, login, user, properties):
+ """
+ Parameters:
+ - login
+ - user
+ - properties
+ """
+ pass
+
+ def changeUserAuthorizations(self, login, user, authorizations):
+ """
+ Parameters:
+ - login
+ - user
+ - authorizations
+ """
+ pass
+
+ def changeLocalUserPassword(self, login, user, password):
+ """
+ Parameters:
+ - login
+ - user
+ - password
+ """
+ pass
+
+ def createLocalUser(self, login, user, password):
+ """
+ Parameters:
+ - login
+ - user
+ - password
+ """
+ pass
+
+ def dropLocalUser(self, login, user):
+ """
+ Parameters:
+ - login
+ - user
+ """
+ pass
+
+ def getUserAuthorizations(self, login, user):
+ """
+ Parameters:
+ - login
+ - user
+ """
+ pass
+
+ def grantSystemPermission(self, login, user, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - perm
+ """
+ pass
+
+ def grantTablePermission(self, login, user, table, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - table
+ - perm
+ """
+ pass
+
+ def hasSystemPermission(self, login, user, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - perm
+ """
+ pass
+
+ def hasTablePermission(self, login, user, table, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - table
+ - perm
+ """
+ pass
+
+ def listLocalUsers(self, login):
+ """
+ Parameters:
+ - login
+ """
+ pass
+
+ def revokeSystemPermission(self, login, user, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - perm
+ """
+ pass
+
+ def revokeTablePermission(self, login, user, table, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - table
+ - perm
+ """
+ pass
+
+ def grantNamespacePermission(self, login, user, namespaceName, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - namespaceName
+ - perm
+ """
+ pass
+
+ def hasNamespacePermission(self, login, user, namespaceName, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - namespaceName
+ - perm
+ """
+ pass
+
+ def revokeNamespacePermission(self, login, user, namespaceName, perm):
+ """
+ Parameters:
+ - login
+ - user
+ - namespaceName
+ - perm
+ """
+ pass
+
+ def createBatchScanner(self, login, tableName, options):
+ """
+ Parameters:
+ - login
+ - tableName
+ - options
+ """
+ pass
+
+ def createScanner(self, login, tableName, options):
+ """
+ Parameters:
+ - login
+ - tableName
+ - options
+ """
+ pass
+
+ def hasNext(self, scanner):
+ """
+ Parameters:
+ - scanner
+ """
+ pass
+
+ def nextEntry(self, scanner):
+ """
+ Parameters:
+ - scanner
+ """
+ pass
+
+ def nextK(self, scanner, k):
+ """
+ Parameters:
+ - scanner
+ - k
+ """
+ pass
+
+ def closeScanner(self, scanner):
+ """
+ Parameters:
+ - scanner
+ """
+ pass
+
+ def updateAndFlush(self, login, tableName, cells):
+ """
+ Parameters:
+ - login
+ - tableName
+ - cells
+ """
+ pass
+
+ def createWriter(self, login, tableName, opts):
+ """
+ Parameters:
+ - login
+ - tableName
+ - opts
+ """
+ pass
+
+ def update(self, writer, cells):
+ """
+ Parameters:
+ - writer
+ - cells
+ """
+ pass
+
+ def flush(self, writer):
+ """
+ Parameters:
+ - writer
+ """
+ pass
+
+ def closeWriter(self, writer):
+ """
+ Parameters:
+ - writer
+ """
+ pass
+
+ def updateRowConditionally(self, login, tableName, row, updates):
+ """
+ Parameters:
+ - login
+ - tableName
+ - row
+ - updates
+ """
+ pass
+
+ def createConditionalWriter(self, login, tableName, options):
+ """
+ Parameters:
+ - login
+ - tableName
+ - options
+ """
+ pass
+
+ def updateRowsConditionally(self, conditionalWriter, updates):
+ """
+ Parameters:
+ - conditionalWriter
+ - updates
+ """
+ pass
+
+ def closeConditionalWriter(self, conditionalWriter):
+ """
+ Parameters:
+ - conditionalWriter
+ """
+ pass
+
+ def getRowRange(self, row):
+ """
+ Parameters:
+ - row
+ """
+ pass
+
+ def getFollowing(self, key, part):
+ """
+ Parameters:
+ - key
+ - part
+ """
+ pass
+
+ def systemNamespace(self):
+ pass
+
+ def defaultNamespace(self):
+ pass
+
+ def listNamespaces(self, login):
+ """
+ Parameters:
+ - login
+ """
+ pass
+
+ def namespaceExists(self, login, namespaceName):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ """
+ pass
+
+ def createNamespace(self, login, namespaceName):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ """
+ pass
+
+ def deleteNamespace(self, login, namespaceName):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ """
+ pass
+
+ def renameNamespace(self, login, oldNamespaceName, newNamespaceName):
+ """
+ Parameters:
+ - login
+ - oldNamespaceName
+ - newNamespaceName
+ """
+ pass
+
+ def setNamespaceProperty(self, login, namespaceName, property, value):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - property
+ - value
+ """
+ pass
+
+ def removeNamespaceProperty(self, login, namespaceName, property):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - property
+ """
+ pass
+
+ def getNamespaceProperties(self, login, namespaceName):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ """
+ pass
+
+ def namespaceIdMap(self, login):
+ """
+ Parameters:
+ - login
+ """
+ pass
+
+ def attachNamespaceIterator(self, login, namespaceName, setting, scopes):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - setting
+ - scopes
+ """
+ pass
+
+ def removeNamespaceIterator(self, login, namespaceName, name, scopes):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - name
+ - scopes
+ """
+ pass
+
+ def getNamespaceIteratorSetting(self, login, namespaceName, name, scope):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - name
+ - scope
+ """
+ pass
+
+ def listNamespaceIterators(self, login, namespaceName):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ """
+ pass
+
+ def checkNamespaceIteratorConflicts(self, login, namespaceName, setting, scopes):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - setting
+ - scopes
+ """
+ pass
+
+ def addNamespaceConstraint(self, login, namespaceName, constraintClassName):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - constraintClassName
+ """
+ pass
+
+ def removeNamespaceConstraint(self, login, namespaceName, id):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - id
+ """
+ pass
+
+ def listNamespaceConstraints(self, login, namespaceName):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ """
+ pass
+
+ def testNamespaceClassLoad(self, login, namespaceName, className, asTypeName):
+ """
+ Parameters:
+ - login
+ - namespaceName
+ - className
+ - asTypeName
+ """
+ pass
+
+
+class Client(Iface):
+ def __init__(self, iprot, oprot=None):
+ self._iprot = self._oprot = iprot
+ if oprot is not None:
+ self._oprot = oprot
+ self._seqid = 0
+
+ def login(self, principal, loginProperties):
+ """
+ Parameters:
+ - principal
+ - loginProperties
+ """
+ self.send_login(principal, loginProperties)
+ return self.recv_login()
+
+ def send_login(self, principal, loginProperties):
+ self._oprot.writeMessageBegin('login', TMessageType.CALL, self._seqid)
+ args = login_args()
+ args.principal = principal
+ args.loginProperties = loginProperties
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_login(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = login_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch2 is not None:
+ raise result.ouch2
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "login failed: unknown result")
+
+ def addConstraint(self, login, tableName, constraintClassName):
+ """
+ Parameters:
+ - login
+ - tableName
+ - constraintClassName
+ """
+ self.send_addConstraint(login, tableName, constraintClassName)
+ return self.recv_addConstraint()
+
+ def send_addConstraint(self, login, tableName, constraintClassName):
+ self._oprot.writeMessageBegin('addConstraint', TMessageType.CALL, self._seqid)
+ args = addConstraint_args()
+ args.login = login
+ args.tableName = tableName
+ args.constraintClassName = constraintClassName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_addConstraint(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = addConstraint_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "addConstraint failed: unknown result")
+
+ def addSplits(self, login, tableName, splits):
+ """
+ Parameters:
+ - login
+ - tableName
+ - splits
+ """
+ self.send_addSplits(login, tableName, splits)
+ self.recv_addSplits()
+
+ def send_addSplits(self, login, tableName, splits):
+ self._oprot.writeMessageBegin('addSplits', TMessageType.CALL, self._seqid)
+ args = addSplits_args()
+ args.login = login
+ args.tableName = tableName
+ args.splits = splits
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_addSplits(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = addSplits_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def attachIterator(self, login, tableName, setting, scopes):
+ """
+ Parameters:
+ - login
+ - tableName
+ - setting
+ - scopes
+ """
+ self.send_attachIterator(login, tableName, setting, scopes)
+ self.recv_attachIterator()
+
+ def send_attachIterator(self, login, tableName, setting, scopes):
+ self._oprot.writeMessageBegin('attachIterator', TMessageType.CALL, self._seqid)
+ args = attachIterator_args()
+ args.login = login
+ args.tableName = tableName
+ args.setting = setting
+ args.scopes = scopes
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_attachIterator(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = attachIterator_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def checkIteratorConflicts(self, login, tableName, setting, scopes):
+ """
+ Parameters:
+ - login
+ - tableName
+ - setting
+ - scopes
+ """
+ self.send_checkIteratorConflicts(login, tableName, setting, scopes)
+ self.recv_checkIteratorConflicts()
+
+ def send_checkIteratorConflicts(self, login, tableName, setting, scopes):
+ self._oprot.writeMessageBegin('checkIteratorConflicts', TMessageType.CALL, self._seqid)
+ args = checkIteratorConflicts_args()
+ args.login = login
+ args.tableName = tableName
+ args.setting = setting
+ args.scopes = scopes
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_checkIteratorConflicts(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = checkIteratorConflicts_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def clearLocatorCache(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ self.send_clearLocatorCache(login, tableName)
+ self.recv_clearLocatorCache()
+
+ def send_clearLocatorCache(self, login, tableName):
+ self._oprot.writeMessageBegin('clearLocatorCache', TMessageType.CALL, self._seqid)
+ args = clearLocatorCache_args()
+ args.login = login
+ args.tableName = tableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_clearLocatorCache(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = clearLocatorCache_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ return
+
+ def cloneTable(self, login, tableName, newTableName, flush, propertiesToSet, propertiesToExclude):
+ """
+ Parameters:
+ - login
+ - tableName
+ - newTableName
+ - flush
+ - propertiesToSet
+ - propertiesToExclude
+ """
+ self.send_cloneTable(login, tableName, newTableName, flush, propertiesToSet, propertiesToExclude)
+ self.recv_cloneTable()
+
+ def send_cloneTable(self, login, tableName, newTableName, flush, propertiesToSet, propertiesToExclude):
+ self._oprot.writeMessageBegin('cloneTable', TMessageType.CALL, self._seqid)
+ args = cloneTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.newTableName = newTableName
+ args.flush = flush
+ args.propertiesToSet = propertiesToSet
+ args.propertiesToExclude = propertiesToExclude
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_cloneTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = cloneTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ if result.ouch4 is not None:
+ raise result.ouch4
+ return
+
+ def compactTable(self, login, tableName, startRow, endRow, iterators, flush, wait, compactionStrategy):
+ """
+ Parameters:
+ - login
+ - tableName
+ - startRow
+ - endRow
+ - iterators
+ - flush
+ - wait
+ - compactionStrategy
+ """
+ self.send_compactTable(login, tableName, startRow, endRow, iterators, flush, wait, compactionStrategy)
+ self.recv_compactTable()
+
+ def send_compactTable(self, login, tableName, startRow, endRow, iterators, flush, wait, compactionStrategy):
+ self._oprot.writeMessageBegin('compactTable', TMessageType.CALL, self._seqid)
+ args = compactTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.startRow = startRow
+ args.endRow = endRow
+ args.iterators = iterators
+ args.flush = flush
+ args.wait = wait
+ args.compactionStrategy = compactionStrategy
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_compactTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = compactTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def cancelCompaction(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ self.send_cancelCompaction(login, tableName)
+ self.recv_cancelCompaction()
+
+ def send_cancelCompaction(self, login, tableName):
+ self._oprot.writeMessageBegin('cancelCompaction', TMessageType.CALL, self._seqid)
+ args = cancelCompaction_args()
+ args.login = login
+ args.tableName = tableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_cancelCompaction(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = cancelCompaction_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def createTable(self, login, tableName, versioningIter, type):
+ """
+ Parameters:
+ - login
+ - tableName
+ - versioningIter
+ - type
+ """
+ self.send_createTable(login, tableName, versioningIter, type)
+ self.recv_createTable()
+
+ def send_createTable(self, login, tableName, versioningIter, type):
+ self._oprot.writeMessageBegin('createTable', TMessageType.CALL, self._seqid)
+ args = createTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.versioningIter = versioningIter
+ args.type = type
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def deleteTable(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ self.send_deleteTable(login, tableName)
+ self.recv_deleteTable()
+
+ def send_deleteTable(self, login, tableName):
+ self._oprot.writeMessageBegin('deleteTable', TMessageType.CALL, self._seqid)
+ args = deleteTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def deleteRows(self, login, tableName, startRow, endRow):
+ """
+ Parameters:
+ - login
+ - tableName
+ - startRow
+ - endRow
+ """
+ self.send_deleteRows(login, tableName, startRow, endRow)
+ self.recv_deleteRows()
+
+ def send_deleteRows(self, login, tableName, startRow, endRow):
+ self._oprot.writeMessageBegin('deleteRows', TMessageType.CALL, self._seqid)
+ args = deleteRows_args()
+ args.login = login
+ args.tableName = tableName
+ args.startRow = startRow
+ args.endRow = endRow
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteRows(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteRows_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def exportTable(self, login, tableName, exportDir):
+ """
+ Parameters:
+ - login
+ - tableName
+ - exportDir
+ """
+ self.send_exportTable(login, tableName, exportDir)
+ self.recv_exportTable()
+
+ def send_exportTable(self, login, tableName, exportDir):
+ self._oprot.writeMessageBegin('exportTable', TMessageType.CALL, self._seqid)
+ args = exportTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.exportDir = exportDir
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_exportTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = exportTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def flushTable(self, login, tableName, startRow, endRow, wait):
+ """
+ Parameters:
+ - login
+ - tableName
+ - startRow
+ - endRow
+ - wait
+ """
+ self.send_flushTable(login, tableName, startRow, endRow, wait)
+ self.recv_flushTable()
+
+ def send_flushTable(self, login, tableName, startRow, endRow, wait):
+ self._oprot.writeMessageBegin('flushTable', TMessageType.CALL, self._seqid)
+ args = flushTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.startRow = startRow
+ args.endRow = endRow
+ args.wait = wait
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_flushTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = flushTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def getDiskUsage(self, login, tables):
+ """
+ Parameters:
+ - login
+ - tables
+ """
+ self.send_getDiskUsage(login, tables)
+ return self.recv_getDiskUsage()
+
+ def send_getDiskUsage(self, login, tables):
+ self._oprot.writeMessageBegin('getDiskUsage', TMessageType.CALL, self._seqid)
+ args = getDiskUsage_args()
+ args.login = login
+ args.tables = tables
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getDiskUsage(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getDiskUsage_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getDiskUsage failed: unknown result")
+
+ def getLocalityGroups(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ self.send_getLocalityGroups(login, tableName)
+ return self.recv_getLocalityGroups()
+
+ def send_getLocalityGroups(self, login, tableName):
+ self._oprot.writeMessageBegin('getLocalityGroups', TMessageType.CALL, self._seqid)
+ args = getLocalityGroups_args()
+ args.login = login
+ args.tableName = tableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getLocalityGroups(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getLocalityGroups_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getLocalityGroups failed: unknown result")
+
+ def getIteratorSetting(self, login, tableName, iteratorName, scope):
+ """
+ Parameters:
+ - login
+ - tableName
+ - iteratorName
+ - scope
+ """
+ self.send_getIteratorSetting(login, tableName, iteratorName, scope)
+ return self.recv_getIteratorSetting()
+
+ def send_getIteratorSetting(self, login, tableName, iteratorName, scope):
+ self._oprot.writeMessageBegin('getIteratorSetting', TMessageType.CALL, self._seqid)
+ args = getIteratorSetting_args()
+ args.login = login
+ args.tableName = tableName
+ args.iteratorName = iteratorName
+ args.scope = scope
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getIteratorSetting(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getIteratorSetting_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getIteratorSetting failed: unknown result")
+
+ def getMaxRow(self, login, tableName, auths, startRow, startInclusive, endRow, endInclusive):
+ """
+ Parameters:
+ - login
+ - tableName
+ - auths
+ - startRow
+ - startInclusive
+ - endRow
+ - endInclusive
+ """
+ self.send_getMaxRow(login, tableName, auths, startRow, startInclusive, endRow, endInclusive)
+ return self.recv_getMaxRow()
+
+ def send_getMaxRow(self, login, tableName, auths, startRow, startInclusive, endRow, endInclusive):
+ self._oprot.writeMessageBegin('getMaxRow', TMessageType.CALL, self._seqid)
+ args = getMaxRow_args()
+ args.login = login
+ args.tableName = tableName
+ args.auths = auths
+ args.startRow = startRow
+ args.startInclusive = startInclusive
+ args.endRow = endRow
+ args.endInclusive = endInclusive
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getMaxRow(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getMaxRow_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getMaxRow failed: unknown result")
+
+ def getTableProperties(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ self.send_getTableProperties(login, tableName)
+ return self.recv_getTableProperties()
+
+ def send_getTableProperties(self, login, tableName):
+ self._oprot.writeMessageBegin('getTableProperties', TMessageType.CALL, self._seqid)
+ args = getTableProperties_args()
+ args.login = login
+ args.tableName = tableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTableProperties(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTableProperties_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableProperties failed: unknown result")
+
+ def importDirectory(self, login, tableName, importDir, failureDir, setTime):
+ """
+ Parameters:
+ - login
+ - tableName
+ - importDir
+ - failureDir
+ - setTime
+ """
+ self.send_importDirectory(login, tableName, importDir, failureDir, setTime)
+ self.recv_importDirectory()
+
+ def send_importDirectory(self, login, tableName, importDir, failureDir, setTime):
+ self._oprot.writeMessageBegin('importDirectory', TMessageType.CALL, self._seqid)
+ args = importDirectory_args()
+ args.login = login
+ args.tableName = tableName
+ args.importDir = importDir
+ args.failureDir = failureDir
+ args.setTime = setTime
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_importDirectory(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = importDirectory_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch3 is not None:
+ raise result.ouch3
+ if result.ouch4 is not None:
+ raise result.ouch4
+ return
+
+ def importTable(self, login, tableName, importDir):
+ """
+ Parameters:
+ - login
+ - tableName
+ - importDir
+ """
+ self.send_importTable(login, tableName, importDir)
+ self.recv_importTable()
+
+ def send_importTable(self, login, tableName, importDir):
+ self._oprot.writeMessageBegin('importTable', TMessageType.CALL, self._seqid)
+ args = importTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.importDir = importDir
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_importTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = importTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def listSplits(self, login, tableName, maxSplits):
+ """
+ Parameters:
+ - login
+ - tableName
+ - maxSplits
+ """
+ self.send_listSplits(login, tableName, maxSplits)
+ return self.recv_listSplits()
+
+ def send_listSplits(self, login, tableName, maxSplits):
+ self._oprot.writeMessageBegin('listSplits', TMessageType.CALL, self._seqid)
+ args = listSplits_args()
+ args.login = login
+ args.tableName = tableName
+ args.maxSplits = maxSplits
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_listSplits(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = listSplits_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "listSplits failed: unknown result")
+
+ def listTables(self, login):
+ """
+ Parameters:
+ - login
+ """
+ self.send_listTables(login)
+ return self.recv_listTables()
+
+ def send_listTables(self, login):
+ self._oprot.writeMessageBegin('listTables', TMessageType.CALL, self._seqid)
+ args = listTables_args()
+ args.login = login
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_listTables(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = listTables_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "listTables failed: unknown result")
+
+ def listIterators(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ self.send_listIterators(login, tableName)
+ return self.recv_listIterators()
+
+ def send_listIterators(self, login, tableName):
+ self._oprot.writeMessageBegin('listIterators', TMessageType.CALL, self._seqid)
+ args = listIterators_args()
+ args.login = login
+ args.tableName = tableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_listIterators(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = listIterators_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "listIterators failed: unknown result")
+
+ def listConstraints(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ self.send_listConstraints(login, tableName)
+ return self.recv_listConstraints()
+
+ def send_listConstraints(self, login, tableName):
+ self._oprot.writeMessageBegin('listConstraints', TMessageType.CALL, self._seqid)
+ args = listConstraints_args()
+ args.login = login
+ args.tableName = tableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_listConstraints(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = listConstraints_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "listConstraints failed: unknown result")
+
+ def mergeTablets(self, login, tableName, startRow, endRow):
+ """
+ Parameters:
+ - login
+ - tableName
+ - startRow
+ - endRow
+ """
+ self.send_mergeTablets(login, tableName, startRow, endRow)
+ self.recv_mergeTablets()
+
+ def send_mergeTablets(self, login, tableName, startRow, endRow):
+ self._oprot.writeMessageBegin('mergeTablets', TMessageType.CALL, self._seqid)
+ args = mergeTablets_args()
+ args.login = login
+ args.tableName = tableName
+ args.startRow = startRow
+ args.endRow = endRow
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_mergeTablets(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = mergeTablets_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def offlineTable(self, login, tableName, wait):
+ """
+ Parameters:
+ - login
+ - tableName
+ - wait
+ """
+ self.send_offlineTable(login, tableName, wait)
+ self.recv_offlineTable()
+
+ def send_offlineTable(self, login, tableName, wait):
+ self._oprot.writeMessageBegin('offlineTable', TMessageType.CALL, self._seqid)
+ args = offlineTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.wait = wait
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_offlineTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = offlineTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def onlineTable(self, login, tableName, wait):
+ """
+ Parameters:
+ - login
+ - tableName
+ - wait
+ """
+ self.send_onlineTable(login, tableName, wait)
+ self.recv_onlineTable()
+
+ def send_onlineTable(self, login, tableName, wait):
+ self._oprot.writeMessageBegin('onlineTable', TMessageType.CALL, self._seqid)
+ args = onlineTable_args()
+ args.login = login
+ args.tableName = tableName
+ args.wait = wait
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_onlineTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = onlineTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def removeConstraint(self, login, tableName, constraint):
+ """
+ Parameters:
+ - login
+ - tableName
+ - constraint
+ """
+ self.send_removeConstraint(login, tableName, constraint)
+ self.recv_removeConstraint()
+
+ def send_removeConstraint(self, login, tableName, constraint):
+ self._oprot.writeMessageBegin('removeConstraint', TMessageType.CALL, self._seqid)
+ args = removeConstraint_args()
+ args.login = login
+ args.tableName = tableName
+ args.constraint = constraint
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_removeConstraint(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = removeConstraint_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def removeIterator(self, login, tableName, iterName, scopes):
+ """
+ Parameters:
+ - login
+ - tableName
+ - iterName
+ - scopes
+ """
+ self.send_removeIterator(login, tableName, iterName, scopes)
+ self.recv_removeIterator()
+
+ def send_removeIterator(self, login, tableName, iterName, scopes):
+ self._oprot.writeMessageBegin('removeIterator', TMessageType.CALL, self._seqid)
+ args = removeIterator_args()
+ args.login = login
+ args.tableName = tableName
+ args.iterName = iterName
+ args.scopes = scopes
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_removeIterator(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = removeIterator_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def removeTableProperty(self, login, tableName, property):
+ """
+ Parameters:
+ - login
+ - tableName
+ - property
+ """
+ self.send_removeTableProperty(login, tableName, property)
+ self.recv_removeTableProperty()
+
+ def send_removeTableProperty(self, login, tableName, property):
+ self._oprot.writeMessageBegin('removeTableProperty', TMessageType.CALL, self._seqid)
+ args = removeTableProperty_args()
+ args.login = login
+ args.tableName = tableName
+ args.property = property
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_removeTableProperty(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = removeTableProperty_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def renameTable(self, login, oldTableName, newTableName):
+ """
+ Parameters:
+ - login
+ - oldTableName
+ - newTableName
+ """
+ self.send_renameTable(login, oldTableName, newTableName)
+ self.recv_renameTable()
+
+ def send_renameTable(self, login, oldTableName, newTableName):
+ self._oprot.writeMessageBegin('renameTable', TMessageType.CALL, self._seqid)
+ args = renameTable_args()
+ args.login = login
+ args.oldTableName = oldTableName
+ args.newTableName = newTableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_renameTable(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = renameTable_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ if result.ouch4 is not None:
+ raise result.ouch4
+ return
+
+ def setLocalityGroups(self, login, tableName, groups):
+ """
+ Parameters:
+ - login
+ - tableName
+ - groups
+ """
+ self.send_setLocalityGroups(login, tableName, groups)
+ self.recv_setLocalityGroups()
+
+ def send_setLocalityGroups(self, login, tableName, groups):
+ self._oprot.writeMessageBegin('setLocalityGroups', TMessageType.CALL, self._seqid)
+ args = setLocalityGroups_args()
+ args.login = login
+ args.tableName = tableName
+ args.groups = groups
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_setLocalityGroups(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = setLocalityGroups_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def setTableProperty(self, login, tableName, property, value):
+ """
+ Parameters:
+ - login
+ - tableName
+ - property
+ - value
+ """
+ self.send_setTableProperty(login, tableName, property, value)
+ self.recv_setTableProperty()
+
+ def send_setTableProperty(self, login, tableName, property, value):
+ self._oprot.writeMessageBegin('setTableProperty', TMessageType.CALL, self._seqid)
+ args = setTableProperty_args()
+ args.login = login
+ args.tableName = tableName
+ args.property = property
+ args.value = value
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_setTableProperty(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = setTableProperty_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ return
+
+ def splitRangeByTablets(self, login, tableName, range, maxSplits):
+ """
+ Parameters:
+ - login
+ - tableName
+ - range
+ - maxSplits
+ """
+ self.send_splitRangeByTablets(login, tableName, range, maxSplits)
+ return self.recv_splitRangeByTablets()
+
+ def send_splitRangeByTablets(self, login, tableName, range, maxSplits):
+ self._oprot.writeMessageBegin('splitRangeByTablets', TMessageType.CALL, self._seqid)
+ args = splitRangeByTablets_args()
+ args.login = login
+ args.tableName = tableName
+ args.range = range
+ args.maxSplits = maxSplits
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_splitRangeByTablets(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = splitRangeByTablets_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "splitRangeByTablets failed: unknown result")
+
+ def tableExists(self, login, tableName):
+ """
+ Parameters:
+ - login
+ - tableName
+ """
+ self.send_tableExists(login, tableName)
+ return self.recv_tableExists()
+
+ def send_tableExists(self, login, tableName):
+ self._oprot.writeMessageBegin('tableExists', TMessageType.CALL, self._seqid)
+ args = tableExists_args()
+ args.login = login
+ args.tableName = tableName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_tableExists(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = tableExists_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "tableExists failed: unknown result")
+
+ def tableIdMap(self, login):
+ """
+ Parameters:
+ - login
+ """
+ self.send_tableIdMap(login)
+ return self.recv_tableIdMap()
+
+ def send_tableIdMap(self, login):
+ self._oprot.writeMessageBegin('tableIdMap', TMessageType.CALL, self._seqid)
+ args = tableIdMap_args()
+ args.login = login
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_tableIdMap(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = tableIdMap_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "tableIdMap failed: unknown result")
+
+ def testTableClassLoad(self, login, tableName, className, asTypeName):
+ """
+ Parameters:
+ - login
+ - tableName
+ - className
+ - asTypeName
+ """
+ self.send_testTableClassLoad(login, tableName, className, asTypeName)
+ return self.recv_testTableClassLoad()
+
+ def send_testTableClassLoad(self, login, tableName, className, asTypeName):
+ self._oprot.writeMessageBegin('testTableClassLoad', TMessageType.CALL, self._seqid)
+ args = testTableClassLoad_args()
+ args.login = login
+ args.tableName = tableName
+ args.className = className
+ args.asTypeName = asTypeName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_testTableClassLoad(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = testTableClassLoad_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ if result.ouch3 is not None:
+ raise result.ouch3
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "testTableClassLoad failed: unknown result")
+
+ def pingTabletServer(self, login, tserver):
+ """
+ Parameters:
+ - login
+ - tserver
+ """
+ self.send_pingTabletServer(login, tserver)
+ self.recv_pingTabletServer()
+
+ def send_pingTabletServer(self, login, tserver):
+ self._oprot.writeMessageBegin('pingTabletServer', TMessageType.CALL, self._seqid)
+ args = pingTabletServer_args()
+ args.login = login
+ args.tserver = tserver
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_pingTabletServer(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = pingTabletServer_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ return
+
+ def getActiveScans(self, login, tserver):
+ """
+ Parameters:
+ - login
+ - tserver
+ """
+ self.send_getActiveScans(login, tserver)
+ return self.recv_getActiveScans()
+
+ def send_getActiveScans(self, login, tserver):
+ self._oprot.writeMessageBegin('getActiveScans', TMessageType.CALL, self._seqid)
+ args = getActiveScans_args()
+ args.login = login
+ args.tserver = tserver
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getActiveScans(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getActiveScans_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveScans failed: unknown result")
+
+ def getActiveCompactions(self, login, tserver):
+ """
+ Parameters:
+ - login
+ - tserver
+ """
+ self.send_getActiveCompactions(login, tserver)
+ return self.recv_getActiveCompactions()
+
+ def send_getActiveCompactions(self, login, tserver):
+ self._oprot.writeMessageBegin('getActiveCompactions', TMessageType.CALL, self._seqid)
+ args = getActiveCompactions_args()
+ args.login = login
+ args.tserver = tserver
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getActiveCompactions(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getActiveCompactions_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCompactions failed: unknown result")
+
+ def getSiteConfiguration(self, login):
+ """
+ Parameters:
+ - login
+ """
+ self.send_getSiteConfiguration(login)
+ return self.recv_getSiteConfiguration()
+
+ def send_getSiteConfiguration(self, login):
+ self._oprot.writeMessageBegin('getSiteConfiguration', TMessageType.CALL, self._seqid)
+ args = getSiteConfiguration_args()
+ args.login = login
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getSiteConfiguration(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getSiteConfiguration_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getSiteConfiguration failed: unknown result")
+
+ def getSystemConfiguration(self, login):
+ """
+ Parameters:
+ - login
+ """
+ self.send_getSystemConfiguration(login)
+ return self.recv_getSystemConfiguration()
+
+ def send_getSystemConfiguration(self, login):
+ self._oprot.writeMessageBegin('getSystemConfiguration', TMessageType.CALL, self._seqid)
+ args = getSystemConfiguration_args()
+ args.login = login
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getSystemConfiguration(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getSystemConfiguration_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getSystemConfiguration failed: unknown result")
+
+ def getTabletServers(self, login):
+ """
+ Parameters:
+ - login
+ """
+ self.send_getTabletServers(login)
+ return self.recv_getTabletServers()
+
+ def send_getTabletServers(self, login):
+ self._oprot.writeMessageBegin('getTabletServers', TMessageType.CALL, self._seqid)
+ args = getTabletServers_args()
+ args.login = login
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getTabletServers(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getTabletServers_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getTabletServers failed: unknown result")
+
+ def removeProperty(self, login, property):
+ """
+ Parameters:
+ - login
+ - property
+ """
+ self.send_removeProperty(login, property)
+ self.recv_removeProperty()
+
+ def send_removeProperty(self, login, property):
+ self._oprot.writeMessageBegin('removeProperty', TMessageType.CALL, self._seqid)
+ args = removeProperty_args()
+ args.login = login
+ args.property = property
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_removeProperty(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = removeProperty_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ return
+
+ def setProperty(self, login, property, value):
+ """
+ Parameters:
+ - login
+ - property
+ - value
+ """
+ self.send_setProperty(login, property, value)
+ self.recv_setProperty()
+
+ def send_setProperty(self, login, property, value):
+ self._oprot.writeMessageBegin('setProperty', TMessageType.CALL, self._seqid)
+ args = setProperty_args()
+ args.login = login
+ args.property = property
+ args.value = value
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_setProperty(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = setProperty_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ return
+
+ def testClassLoad(self, login, className, asTypeName):
+ """
+ Parameters:
+ - login
+ - className
+ - asTypeName
+ """
+ self.send_testClassLoad(login, className, asTypeName)
+ return self.recv_testClassLoad()
+
+ def send_testClassLoad(self, login, className, asTypeName):
+ self._oprot.writeMessageBegin('testClassLoad', TMessageType.CALL, self._seqid)
+ args = testClassLoad_args()
+ args.login = login
+ args.className = className
+ args.asTypeName = asTypeName
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_testClassLoad(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = testClassLoad_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "testClassLoad failed: unknown result")
+
+ def authenticateUser(self, login, user, properties):
+ """
+ Parameters:
+ - login
+ - user
+ - properties
+ """
+ self.send_authenticateUser(login, user, properties)
+ return self.recv_authenticateUser()
+
+ def send_authenticateUser(self, login, user, properties):
+ self._oprot.writeMessageBegin('authenticateUser', TMessageType.CALL, self._seqid)
+ args = authenticateUser_args()
+ args.login = login
+ args.user = user
+ args.properties = properties
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_authenticateUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = authenticateUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result")
+
+ def changeUserAuthorizations(self, login, user, authorizations):
+ """
+ Parameters:
+ - login
+ - user
+ - authorizations
+ """
+ self.send_changeUserAuthorizations(login, user, authorizations)
+ self.recv_changeUserAuthorizations()
+
+ def send_changeUserAuthorizations(self, login, user, authorizations):
+ self._oprot.writeMessageBegin('changeUserAuthorizations', TMessageType.CALL, self._seqid)
+ args = changeUserAuthorizations_args()
+ args.login = login
+ args.user = user
+ args.authorizations = authorizations
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_changeUserAuthorizations(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = changeUserAuthorizations_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ return
+
+ def changeLocalUserPassword(self, login, user, password):
+ """
+ Parameters:
+ - login
+ - user
+ - password
+ """
+ self.send_changeLocalUserPassword(login, user, password)
+ self.recv_changeLocalUserPassword()
+
+ def send_changeLocalUserPassword(self, login, user, password):
+ self._oprot.writeMessageBegin('changeLocalUserPassword', TMessageType.CALL, self._seqid)
+ args = changeLocalUserPassword_args()
+ args.login = login
+ args.user = user
+ args.password = password
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_changeLocalUserPassword(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = changeLocalUserPassword_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ return
+
+ def createLocalUser(self, login, user, password):
+ """
+ Parameters:
+ - login
+ - user
+ - password
+ """
+ self.send_createLocalUser(login, user, password)
+ self.recv_createLocalUser()
+
+ def send_createLocalUser(self, login, user, password):
+ self._oprot.writeMessageBegin('createLocalUser', TMessageType.CALL, self._seqid)
+ args = createLocalUser_args()
+ args.login = login
+ args.user = user
+ args.password = password
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createLocalUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createLocalUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ return
+
+ def dropLocalUser(self, login, user):
+ """
+ Parameters:
+ - login
+ - user
+ """
+ self.send_dropLocalUser(login, user)
+ self.recv_dropLocalUser()
+
+ def send_dropLocalUser(self, login, user):
+ self._oprot.writeMessageBegin('dropLocalUser', TMessageType.CALL, self._seqid)
+ args = dropLocalUser_args()
+ args.login = login
+ args.user = user
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_dropLocalUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = dropLocalUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.ouch1 is not None:
+ raise result.ouch1
+ if result.ouch2 is not None:
+ raise result.ouch2
+ return
+
+ def getUserAuthorizations(self, login, user):
+ """
+ Parameters:
+ - login
+ - user
+ """
+ self.send_getUserAuthorizations(login, user)
+ return self.recv_getUserAuthorizations()
+
+ def send_getUserAuthorizations(self, login, user):
+ self._oprot.writeMessageBegin('getUserAuthorizations', TMessageType.CALL, self._seqid)
+ args = getUserAuthorizations_args()
+ args.login = login
+ args.user = user
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getUserAuthorizations(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getUserAuthorizations_result()
+ result.read(iprot)
+ iprot.readMessageEn
<TRUNCATED>
[12/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionStrategyConfig.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionStrategyConfig.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionStrategyConfig.java
index e8f7f88..03c0688 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionStrategyConfig.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionStrategyConfig.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class CompactionStrategyConfig implements org.apache.thrift.TBase<CompactionStrategyConfig, CompactionStrategyConfig._Fields>, java.io.Serializable, Cloneable, Comparable<CompactionStrategyConfig> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CompactionStrategyConfig");
private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.MAP, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new CompactionStrategyConfigStandardSchemeFactory());
- schemes.put(TupleScheme.class, new CompactionStrategyConfigTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CompactionStrategyConfigStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CompactionStrategyConfigTupleSchemeFactory();
- public String className; // required
- public Map<String,String> options; // required
+ public java.lang.String className; // required
+ public java.util.Map<java.lang.String,java.lang.String> options; // 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 {
CLASS_NAME((short)1, "className"),
OPTIONS((short)2, "options");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,22 +92,22 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
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.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CompactionStrategyConfig.class, metaDataMap);
}
@@ -145,8 +115,8 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
}
public CompactionStrategyConfig(
- String className,
- Map<String,String> options)
+ java.lang.String className,
+ java.util.Map<java.lang.String,java.lang.String> options)
{
this();
this.className = className;
@@ -161,7 +131,7 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
this.className = other.className;
}
if (other.isSetOptions()) {
- Map<String,String> __this__options = new HashMap<String,String>(other.options);
+ java.util.Map<java.lang.String,java.lang.String> __this__options = new java.util.HashMap<java.lang.String,java.lang.String>(other.options);
this.options = __this__options;
}
}
@@ -176,11 +146,11 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
this.options = null;
}
- public String getClassName() {
+ public java.lang.String getClassName() {
return this.className;
}
- public CompactionStrategyConfig setClassName(String className) {
+ public CompactionStrategyConfig setClassName(java.lang.String className) {
this.className = className;
return this;
}
@@ -204,18 +174,18 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
return (this.options == null) ? 0 : this.options.size();
}
- public void putToOptions(String key, String val) {
+ public void putToOptions(java.lang.String key, java.lang.String val) {
if (this.options == null) {
- this.options = new HashMap<String,String>();
+ this.options = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.options.put(key, val);
}
- public Map<String,String> getOptions() {
+ public java.util.Map<java.lang.String,java.lang.String> getOptions() {
return this.options;
}
- public CompactionStrategyConfig setOptions(Map<String,String> options) {
+ public CompactionStrategyConfig setOptions(java.util.Map<java.lang.String,java.lang.String> options) {
this.options = options;
return this;
}
@@ -235,13 +205,13 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CLASS_NAME:
if (value == null) {
unsetClassName();
} else {
- setClassName((String)value);
+ setClassName((java.lang.String)value);
}
break;
@@ -249,14 +219,14 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
if (value == null) {
unsetOptions();
} else {
- setOptions((Map<String,String>)value);
+ setOptions((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CLASS_NAME:
return getClassName();
@@ -265,13 +235,13 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
return getOptions();
}
- 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) {
@@ -280,11 +250,11 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
case OPTIONS:
return isSetOptions();
}
- 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 CompactionStrategyConfig)
@@ -295,6 +265,8 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
public boolean equals(CompactionStrategyConfig that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_className = true && this.isSetClassName();
boolean that_present_className = true && that.isSetClassName();
@@ -319,19 +291,17 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_className = true && (isSetClassName());
- list.add(present_className);
- if (present_className)
- list.add(className);
+ hashCode = hashCode * 8191 + ((isSetClassName()) ? 131071 : 524287);
+ if (isSetClassName())
+ hashCode = hashCode * 8191 + className.hashCode();
- boolean present_options = true && (isSetOptions());
- list.add(present_options);
- if (present_options)
- list.add(options);
+ hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
+ if (isSetOptions())
+ hashCode = hashCode * 8191 + options.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -342,7 +312,7 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName());
+ lastComparison = java.lang.Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -352,7 +322,7 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
+ lastComparison = java.lang.Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -370,16 +340,16 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
}
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("CompactionStrategyConfig(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("CompactionStrategyConfig(");
boolean first = true;
sb.append("className:");
@@ -414,7 +384,7 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
}
}
- 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) {
@@ -422,13 +392,13 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
}
}
- private static class CompactionStrategyConfigStandardSchemeFactory implements SchemeFactory {
+ private static class CompactionStrategyConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public CompactionStrategyConfigStandardScheme getScheme() {
return new CompactionStrategyConfigStandardScheme();
}
}
- private static class CompactionStrategyConfigStandardScheme extends StandardScheme<CompactionStrategyConfig> {
+ private static class CompactionStrategyConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<CompactionStrategyConfig> {
public void read(org.apache.thrift.protocol.TProtocol iprot, CompactionStrategyConfig struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -452,9 +422,9 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map154 = iprot.readMapBegin();
- struct.options = new HashMap<String,String>(2*_map154.size);
- String _key155;
- String _val156;
+ struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map154.size);
+ java.lang.String _key155;
+ java.lang.String _val156;
for (int _i157 = 0; _i157 < _map154.size; ++_i157)
{
_key155 = iprot.readString();
@@ -492,7 +462,7 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.options.size()));
- for (Map.Entry<String, String> _iter158 : struct.options.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter158 : struct.options.entrySet())
{
oprot.writeString(_iter158.getKey());
oprot.writeString(_iter158.getValue());
@@ -507,18 +477,18 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
}
- private static class CompactionStrategyConfigTupleSchemeFactory implements SchemeFactory {
+ private static class CompactionStrategyConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public CompactionStrategyConfigTupleScheme getScheme() {
return new CompactionStrategyConfigTupleScheme();
}
}
- private static class CompactionStrategyConfigTupleScheme extends TupleScheme<CompactionStrategyConfig> {
+ private static class CompactionStrategyConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<CompactionStrategyConfig> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, CompactionStrategyConfig 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.isSetClassName()) {
optionals.set(0);
}
@@ -532,7 +502,7 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
if (struct.isSetOptions()) {
{
oprot.writeI32(struct.options.size());
- for (Map.Entry<String, String> _iter159 : struct.options.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter159 : struct.options.entrySet())
{
oprot.writeString(_iter159.getKey());
oprot.writeString(_iter159.getValue());
@@ -543,8 +513,8 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, CompactionStrategyConfig 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.className = iprot.readString();
struct.setClassNameIsSet(true);
@@ -552,9 +522,9 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map160 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.options = new HashMap<String,String>(2*_map160.size);
- String _key161;
- String _val162;
+ struct.options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map160.size);
+ java.lang.String _key161;
+ java.lang.String _val162;
for (int _i163 = 0; _i163 < _map160.size; ++_i163)
{
_key161 = iprot.readString();
@@ -567,5 +537,9 @@ public class CompactionStrategyConfig implements org.apache.thrift.TBase<Compact
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionType.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionType.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionType.java
index d561796..da93702 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionType.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionType.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum CompactionType implements org.apache.thrift.TEnum {
+public enum CompactionType implements org.apache.thrift.TEnum {
MINOR(0),
MERGE(1),
MAJOR(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Condition.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Condition.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Condition.java
index d946a87..ac4aef4 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Condition.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Condition.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class Condition implements org.apache.thrift.TBase<Condition, Condition._Fields>, java.io.Serializable, Cloneable, Comparable<Condition> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Condition");
@@ -59,16 +32,13 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField ITERATORS_FIELD_DESC = new org.apache.thrift.protocol.TField("iterators", org.apache.thrift.protocol.TType.LIST, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ConditionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ConditionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ConditionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ConditionTupleSchemeFactory();
public Column column; // required
public long timestamp; // optional
- public ByteBuffer value; // optional
- public List<IteratorSetting> iterators; // optional
+ public java.nio.ByteBuffer value; // optional
+ public java.util.List<IteratorSetting> iterators; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -77,10 +47,10 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
VALUE((short)3, "value"),
ITERATORS((short)4, "iterators");
- 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);
}
}
@@ -109,21 +79,21 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
*/
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;
}
@@ -132,7 +102,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -141,9 +111,9 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.VALUE,_Fields.ITERATORS};
- 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.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Column.class)));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -153,7 +123,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
tmpMap.put(_Fields.ITERATORS, new org.apache.thrift.meta_data.FieldMetaData("iterators", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IteratorSetting.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Condition.class, metaDataMap);
}
@@ -180,7 +150,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
if (other.isSetIterators()) {
- List<IteratorSetting> __this__iterators = new ArrayList<IteratorSetting>(other.iterators.size());
+ java.util.List<IteratorSetting> __this__iterators = new java.util.ArrayList<IteratorSetting>(other.iterators.size());
for (IteratorSetting other_element : other.iterators) {
__this__iterators.add(new IteratorSetting(other_element));
}
@@ -236,16 +206,16 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
}
public void unsetTimestamp() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
- return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public byte[] getValue() {
@@ -253,16 +223,16 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
return value == null ? null : value.array();
}
- public ByteBuffer bufferForValue() {
+ public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public Condition setValue(byte[] value) {
- this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
+ this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
- public Condition setValue(ByteBuffer value) {
+ public Condition setValue(java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
@@ -292,16 +262,16 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
public void addToIterators(IteratorSetting elem) {
if (this.iterators == null) {
- this.iterators = new ArrayList<IteratorSetting>();
+ this.iterators = new java.util.ArrayList<IteratorSetting>();
}
this.iterators.add(elem);
}
- public List<IteratorSetting> getIterators() {
+ public java.util.List<IteratorSetting> getIterators() {
return this.iterators;
}
- public Condition setIterators(List<IteratorSetting> iterators) {
+ public Condition setIterators(java.util.List<IteratorSetting> iterators) {
this.iterators = iterators;
return this;
}
@@ -321,7 +291,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COLUMN:
if (value == null) {
@@ -335,7 +305,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
if (value == null) {
unsetTimestamp();
} else {
- setTimestamp((Long)value);
+ setTimestamp((java.lang.Long)value);
}
break;
@@ -343,7 +313,11 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
if (value == null) {
unsetValue();
} else {
- setValue((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setValue((byte[])value);
+ } else {
+ setValue((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -351,14 +325,14 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
if (value == null) {
unsetIterators();
} else {
- setIterators((List<IteratorSetting>)value);
+ setIterators((java.util.List<IteratorSetting>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COLUMN:
return getColumn();
@@ -373,13 +347,13 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
return getIterators();
}
- 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) {
@@ -392,11 +366,11 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
case ITERATORS:
return isSetIterators();
}
- 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 Condition)
@@ -407,6 +381,8 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
public boolean equals(Condition that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
@@ -449,29 +425,25 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_column = true && (isSetColumn());
- list.add(present_column);
- if (present_column)
- list.add(column);
+ hashCode = hashCode * 8191 + ((isSetColumn()) ? 131071 : 524287);
+ if (isSetColumn())
+ hashCode = hashCode * 8191 + column.hashCode();
- boolean present_timestamp = true && (isSetTimestamp());
- list.add(present_timestamp);
- if (present_timestamp)
- list.add(timestamp);
+ hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
+ if (isSetTimestamp())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
- boolean present_value = true && (isSetValue());
- list.add(present_value);
- if (present_value)
- list.add(value);
+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
+ if (isSetValue())
+ hashCode = hashCode * 8191 + value.hashCode();
- boolean present_iterators = true && (isSetIterators());
- list.add(present_iterators);
- if (present_iterators)
- list.add(iterators);
+ hashCode = hashCode * 8191 + ((isSetIterators()) ? 131071 : 524287);
+ if (isSetIterators())
+ hashCode = hashCode * 8191 + iterators.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -482,7 +454,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
@@ -492,7 +464,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
+ lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -502,7 +474,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -512,7 +484,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
+ lastComparison = java.lang.Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
if (lastComparison != 0) {
return lastComparison;
}
@@ -530,16 +502,16 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
}
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("Condition(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Condition(");
boolean first = true;
sb.append("column:");
@@ -595,7 +567,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -605,13 +577,13 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
}
}
- private static class ConditionStandardSchemeFactory implements SchemeFactory {
+ private static class ConditionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ConditionStandardScheme getScheme() {
return new ConditionStandardScheme();
}
}
- private static class ConditionStandardScheme extends StandardScheme<Condition> {
+ private static class ConditionStandardScheme extends org.apache.thrift.scheme.StandardScheme<Condition> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Condition struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -652,7 +624,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list82 = iprot.readListBegin();
- struct.iterators = new ArrayList<IteratorSetting>(_list82.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list82.size);
IteratorSetting _elem83;
for (int _i84 = 0; _i84 < _list82.size; ++_i84)
{
@@ -719,18 +691,18 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
}
- private static class ConditionTupleSchemeFactory implements SchemeFactory {
+ private static class ConditionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ConditionTupleScheme getScheme() {
return new ConditionTupleScheme();
}
}
- private static class ConditionTupleScheme extends TupleScheme<Condition> {
+ private static class ConditionTupleScheme extends org.apache.thrift.scheme.TupleScheme<Condition> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Condition 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.isSetColumn()) {
optionals.set(0);
}
@@ -766,8 +738,8 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Condition struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.column = new Column();
struct.column.read(iprot);
@@ -784,7 +756,7 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.iterators = new ArrayList<IteratorSetting>(_list87.size);
+ struct.iterators = new java.util.ArrayList<IteratorSetting>(_list87.size);
IteratorSetting _elem88;
for (int _i89 = 0; _i89 < _list87.size; ++_i89)
{
@@ -798,5 +770,9 @@ public class Condition implements org.apache.thrift.TBase<Condition, Condition._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalStatus.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalStatus.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalStatus.java
index c8626a5..6e5c1c3 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalStatus.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalStatus.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.proxy.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum ConditionalStatus implements org.apache.thrift.TEnum {
+public enum ConditionalStatus implements org.apache.thrift.TEnum {
ACCEPTED(0),
REJECTED(1),
VIOLATED(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalUpdates.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalUpdates.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalUpdates.java
index 07f1338..a573685 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalUpdates.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ConditionalUpdates.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUpdates, ConditionalUpdates._Fields>, java.io.Serializable, Cloneable, Comparable<ConditionalUpdates> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ConditionalUpdates");
private static final org.apache.thrift.protocol.TField CONDITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("conditions", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField UPDATES_FIELD_DESC = new org.apache.thrift.protocol.TField("updates", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ConditionalUpdatesStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ConditionalUpdatesTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ConditionalUpdatesStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ConditionalUpdatesTupleSchemeFactory();
- public List<Condition> conditions; // required
- public List<ColumnUpdate> updates; // required
+ public java.util.List<Condition> conditions; // required
+ public java.util.List<ColumnUpdate> updates; // 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 {
CONDITIONS((short)2, "conditions"),
UPDATES((short)3, "updates");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,22 +92,22 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
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.CONDITIONS, new org.apache.thrift.meta_data.FieldMetaData("conditions", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Condition.class))));
tmpMap.put(_Fields.UPDATES, new org.apache.thrift.meta_data.FieldMetaData("updates", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnUpdate.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ConditionalUpdates.class, metaDataMap);
}
@@ -145,8 +115,8 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
}
public ConditionalUpdates(
- List<Condition> conditions,
- List<ColumnUpdate> updates)
+ java.util.List<Condition> conditions,
+ java.util.List<ColumnUpdate> updates)
{
this();
this.conditions = conditions;
@@ -158,14 +128,14 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
*/
public ConditionalUpdates(ConditionalUpdates other) {
if (other.isSetConditions()) {
- List<Condition> __this__conditions = new ArrayList<Condition>(other.conditions.size());
+ java.util.List<Condition> __this__conditions = new java.util.ArrayList<Condition>(other.conditions.size());
for (Condition other_element : other.conditions) {
__this__conditions.add(new Condition(other_element));
}
this.conditions = __this__conditions;
}
if (other.isSetUpdates()) {
- List<ColumnUpdate> __this__updates = new ArrayList<ColumnUpdate>(other.updates.size());
+ java.util.List<ColumnUpdate> __this__updates = new java.util.ArrayList<ColumnUpdate>(other.updates.size());
for (ColumnUpdate other_element : other.updates) {
__this__updates.add(new ColumnUpdate(other_element));
}
@@ -193,16 +163,16 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
public void addToConditions(Condition elem) {
if (this.conditions == null) {
- this.conditions = new ArrayList<Condition>();
+ this.conditions = new java.util.ArrayList<Condition>();
}
this.conditions.add(elem);
}
- public List<Condition> getConditions() {
+ public java.util.List<Condition> getConditions() {
return this.conditions;
}
- public ConditionalUpdates setConditions(List<Condition> conditions) {
+ public ConditionalUpdates setConditions(java.util.List<Condition> conditions) {
this.conditions = conditions;
return this;
}
@@ -232,16 +202,16 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
public void addToUpdates(ColumnUpdate elem) {
if (this.updates == null) {
- this.updates = new ArrayList<ColumnUpdate>();
+ this.updates = new java.util.ArrayList<ColumnUpdate>();
}
this.updates.add(elem);
}
- public List<ColumnUpdate> getUpdates() {
+ public java.util.List<ColumnUpdate> getUpdates() {
return this.updates;
}
- public ConditionalUpdates setUpdates(List<ColumnUpdate> updates) {
+ public ConditionalUpdates setUpdates(java.util.List<ColumnUpdate> updates) {
this.updates = updates;
return this;
}
@@ -261,13 +231,13 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CONDITIONS:
if (value == null) {
unsetConditions();
} else {
- setConditions((List<Condition>)value);
+ setConditions((java.util.List<Condition>)value);
}
break;
@@ -275,14 +245,14 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
if (value == null) {
unsetUpdates();
} else {
- setUpdates((List<ColumnUpdate>)value);
+ setUpdates((java.util.List<ColumnUpdate>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CONDITIONS:
return getConditions();
@@ -291,13 +261,13 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
return getUpdates();
}
- 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) {
@@ -306,11 +276,11 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
case UPDATES:
return isSetUpdates();
}
- 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 ConditionalUpdates)
@@ -321,6 +291,8 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
public boolean equals(ConditionalUpdates that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_conditions = true && this.isSetConditions();
boolean that_present_conditions = true && that.isSetConditions();
@@ -345,19 +317,17 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_conditions = true && (isSetConditions());
- list.add(present_conditions);
- if (present_conditions)
- list.add(conditions);
+ hashCode = hashCode * 8191 + ((isSetConditions()) ? 131071 : 524287);
+ if (isSetConditions())
+ hashCode = hashCode * 8191 + conditions.hashCode();
- boolean present_updates = true && (isSetUpdates());
- list.add(present_updates);
- if (present_updates)
- list.add(updates);
+ hashCode = hashCode * 8191 + ((isSetUpdates()) ? 131071 : 524287);
+ if (isSetUpdates())
+ hashCode = hashCode * 8191 + updates.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -368,7 +338,7 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetConditions()).compareTo(other.isSetConditions());
+ lastComparison = java.lang.Boolean.valueOf(isSetConditions()).compareTo(other.isSetConditions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -378,7 +348,7 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUpdates()).compareTo(other.isSetUpdates());
+ lastComparison = java.lang.Boolean.valueOf(isSetUpdates()).compareTo(other.isSetUpdates());
if (lastComparison != 0) {
return lastComparison;
}
@@ -396,16 +366,16 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
}
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("ConditionalUpdates(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ConditionalUpdates(");
boolean first = true;
sb.append("conditions:");
@@ -440,7 +410,7 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
}
}
- 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) {
@@ -448,13 +418,13 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
}
}
- private static class ConditionalUpdatesStandardSchemeFactory implements SchemeFactory {
+ private static class ConditionalUpdatesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ConditionalUpdatesStandardScheme getScheme() {
return new ConditionalUpdatesStandardScheme();
}
}
- private static class ConditionalUpdatesStandardScheme extends StandardScheme<ConditionalUpdates> {
+ private static class ConditionalUpdatesStandardScheme extends org.apache.thrift.scheme.StandardScheme<ConditionalUpdates> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ConditionalUpdates struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -470,7 +440,7 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list90 = iprot.readListBegin();
- struct.conditions = new ArrayList<Condition>(_list90.size);
+ struct.conditions = new java.util.ArrayList<Condition>(_list90.size);
Condition _elem91;
for (int _i92 = 0; _i92 < _list90.size; ++_i92)
{
@@ -489,7 +459,7 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list93 = iprot.readListBegin();
- struct.updates = new ArrayList<ColumnUpdate>(_list93.size);
+ struct.updates = new java.util.ArrayList<ColumnUpdate>(_list93.size);
ColumnUpdate _elem94;
for (int _i95 = 0; _i95 < _list93.size; ++_i95)
{
@@ -549,18 +519,18 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
}
- private static class ConditionalUpdatesTupleSchemeFactory implements SchemeFactory {
+ private static class ConditionalUpdatesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ConditionalUpdatesTupleScheme getScheme() {
return new ConditionalUpdatesTupleScheme();
}
}
- private static class ConditionalUpdatesTupleScheme extends TupleScheme<ConditionalUpdates> {
+ private static class ConditionalUpdatesTupleScheme extends org.apache.thrift.scheme.TupleScheme<ConditionalUpdates> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ConditionalUpdates 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.isSetConditions()) {
optionals.set(0);
}
@@ -590,12 +560,12 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ConditionalUpdates 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)) {
{
org.apache.thrift.protocol.TList _list100 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.conditions = new ArrayList<Condition>(_list100.size);
+ struct.conditions = new java.util.ArrayList<Condition>(_list100.size);
Condition _elem101;
for (int _i102 = 0; _i102 < _list100.size; ++_i102)
{
@@ -609,7 +579,7 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.updates = new ArrayList<ColumnUpdate>(_list103.size);
+ struct.updates = new java.util.ArrayList<ColumnUpdate>(_list103.size);
ColumnUpdate _elem104;
for (int _i105 = 0; _i105 < _list103.size; ++_i105)
{
@@ -623,5 +593,9 @@ public class ConditionalUpdates implements org.apache.thrift.TBase<ConditionalUp
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[29/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java
index cc49eca..959c4a4 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/FateService.java
@@ -15,51 +15,24 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class FateService {
public interface Iface {
public long beginFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public void executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public void executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, java.util.List<java.nio.ByteBuffer> arguments, java.util.Map<java.lang.String,java.lang.String> options, boolean autoClean) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
- public String waitForFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
+ public java.lang.String waitForFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
public void finishFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException;
@@ -67,17 +40,17 @@ public class FateService {
public interface AsyncIface {
- public void beginFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void beginFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
- public void executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, java.util.List<java.nio.ByteBuffer> arguments, java.util.Map<java.lang.String,java.lang.String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void waitForFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void waitForFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void finishFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void finishFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -127,13 +100,13 @@ public class FateService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "beginFateOperation failed: unknown result");
}
- public void executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public void executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, java.util.List<java.nio.ByteBuffer> arguments, java.util.Map<java.lang.String,java.lang.String> options, boolean autoClean) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_executeFateOperation(tinfo, credentials, opid, op, arguments, options, autoClean);
recv_executeFateOperation();
}
- public void send_executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean) throws org.apache.thrift.TException
+ public void send_executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, java.util.List<java.nio.ByteBuffer> arguments, java.util.Map<java.lang.String,java.lang.String> options, boolean autoClean) throws org.apache.thrift.TException
{
executeFateOperation_args args = new executeFateOperation_args();
args.setTinfo(tinfo);
@@ -162,7 +135,7 @@ public class FateService {
return;
}
- public String waitForFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public java.lang.String waitForFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid) throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
send_waitForFateOperation(tinfo, credentials, opid);
return recv_waitForFateOperation();
@@ -177,7 +150,7 @@ public class FateService {
sendBase("waitForFateOperation", args);
}
- public String recv_waitForFateOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
+ public java.lang.String recv_waitForFateOperation() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException
{
waitForFateOperation_result result = new waitForFateOperation_result();
receiveBase(result, "waitForFateOperation");
@@ -242,17 +215,17 @@ public class FateService {
super(protocolFactory, clientManager, transport);
}
- public void beginFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void beginFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
beginFateOperation_call method_call = new beginFateOperation_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class beginFateOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class beginFateOperation_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public beginFateOperation_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, 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 beginFateOperation_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.tinfo = tinfo;
this.credentials = credentials;
@@ -267,9 +240,9 @@ public class FateService {
prot.writeMessageEnd();
}
- public long getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public java.lang.Long getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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);
@@ -277,22 +250,22 @@ public class FateService {
}
}
- public void executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void executeFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, java.util.List<java.nio.ByteBuffer> arguments, java.util.Map<java.lang.String,java.lang.String> options, boolean autoClean, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
executeFateOperation_call method_call = new executeFateOperation_call(tinfo, credentials, opid, op, arguments, options, autoClean, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class executeFateOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class executeFateOperation_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
private long opid;
private FateOperation op;
- private List<ByteBuffer> arguments;
- private Map<String,String> options;
+ private java.util.List<java.nio.ByteBuffer> arguments;
+ private java.util.Map<java.lang.String,java.lang.String> options;
private boolean autoClean;
- public executeFateOperation_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, List<ByteBuffer> arguments, Map<String,String> options, boolean autoClean, 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 executeFateOperation_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, FateOperation op, java.util.List<java.nio.ByteBuffer> arguments, java.util.Map<java.lang.String,java.lang.String> options, boolean autoClean, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -317,28 +290,28 @@ public class FateService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_executeFateOperation();
+ return null;
}
}
- public void waitForFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void waitForFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
waitForFateOperation_call method_call = new waitForFateOperation_call(tinfo, credentials, opid, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class waitForFateOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class waitForFateOperation_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
private long opid;
- public waitForFateOperation_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, 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 waitForFateOperation_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -355,9 +328,9 @@ public class FateService {
prot.writeMessageEnd();
}
- public String getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public java.lang.String getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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);
@@ -365,18 +338,18 @@ public class FateService {
}
}
- public void finishFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void finishFateOperation(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
finishFateOperation_call method_call = new finishFateOperation_call(tinfo, credentials, opid, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class finishFateOperation_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class finishFateOperation_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
private long opid;
- public finishFateOperation_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, 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 finishFateOperation_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long opid, 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.tinfo = tinfo;
this.credentials = credentials;
@@ -393,29 +366,29 @@ public class FateService {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, org.apache.thrift.TException {
+ public Void getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException, 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_finishFateOperation();
+ 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("beginFateOperation", new beginFateOperation());
processMap.put("executeFateOperation", new executeFateOperation());
processMap.put("waitForFateOperation", new waitForFateOperation());
@@ -535,16 +508,16 @@ public class FateService {
}
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("beginFateOperation", new beginFateOperation());
processMap.put("executeFateOperation", new executeFateOperation());
processMap.put("waitForFateOperation", new waitForFateOperation());
@@ -552,7 +525,7 @@ public class FateService {
return processMap;
}
- public static class beginFateOperation<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, beginFateOperation_args, Long> {
+ public static class beginFateOperation<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, beginFateOperation_args, java.lang.Long> {
public beginFateOperation() {
super("beginFateOperation");
}
@@ -561,47 +534,54 @@ public class FateService {
return new beginFateOperation_args();
}
- public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Long>() {
- public void onComplete(Long o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() {
+ public void onComplete(java.lang.Long o) {
beginFateOperation_result result = new beginFateOperation_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
beginFateOperation_result result = new beginFateOperation_result();
if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) {
- result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
- result.setSecIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) {
- result.tnase = (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) e;
- result.setTnaseIsSet(true);
- msg = result;
- }
- else
- {
+ result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) {
+ result.tnase = (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) e;
+ result.setTnaseIsSet(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();
}
};
}
@@ -610,7 +590,7 @@ public class FateService {
return false;
}
- public void start(I iface, beginFateOperation_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
+ public void start(I iface, beginFateOperation_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
iface.beginFateOperation(args.tinfo, args.credentials,resultHandler);
}
}
@@ -624,50 +604,56 @@ public class FateService {
return new executeFateOperation_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) {
executeFateOperation_result result = new executeFateOperation_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;
executeFateOperation_result result = new executeFateOperation_result();
if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) {
- result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
- result.setSecIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) {
- result.tope = (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) e;
- result.setTopeIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) {
- result.tnase = (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) e;
- result.setTnaseIsSet(true);
- msg = result;
- }
- else
- {
+ result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) {
+ result.tope = (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) e;
+ result.setTopeIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) {
+ result.tnase = (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) e;
+ result.setTnaseIsSet(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();
}
};
}
@@ -676,12 +662,12 @@ public class FateService {
return false;
}
- public void start(I iface, executeFateOperation_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, executeFateOperation_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.executeFateOperation(args.tinfo, args.credentials, args.opid, args.op, args.arguments, args.options, args.autoClean,resultHandler);
}
}
- public static class waitForFateOperation<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, waitForFateOperation_args, String> {
+ public static class waitForFateOperation<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, waitForFateOperation_args, java.lang.String> {
public waitForFateOperation() {
super("waitForFateOperation");
}
@@ -690,51 +676,57 @@ public class FateService {
return new waitForFateOperation_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) {
waitForFateOperation_result result = new waitForFateOperation_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;
waitForFateOperation_result result = new waitForFateOperation_result();
if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) {
- result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
- result.setSecIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) {
- result.tope = (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) e;
- result.setTopeIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) {
- result.tnase = (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) e;
- result.setTnaseIsSet(true);
- msg = result;
- }
- else
- {
+ result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) {
+ result.tope = (org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException) e;
+ result.setTopeIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) {
+ result.tnase = (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) e;
+ result.setTnaseIsSet(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();
}
};
}
@@ -743,7 +735,7 @@ public class FateService {
return false;
}
- public void start(I iface, waitForFateOperation_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ public void start(I iface, waitForFateOperation_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.waitForFateOperation(args.tinfo, args.credentials, args.opid,resultHandler);
}
}
@@ -757,45 +749,52 @@ public class FateService {
return new finishFateOperation_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) {
finishFateOperation_result result = new finishFateOperation_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;
finishFateOperation_result result = new finishFateOperation_result();
if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) {
- result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
- result.setSecIsSet(true);
- msg = result;
- }
- else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) {
- result.tnase = (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) e;
- result.setTnaseIsSet(true);
- msg = result;
- }
- else
- {
+ result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) {
+ result.tnase = (org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException) e;
+ result.setTnaseIsSet(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();
}
};
}
@@ -804,7 +803,7 @@ public class FateService {
return false;
}
- public void start(I iface, finishFateOperation_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ public void start(I iface, finishFateOperation_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.finishFateOperation(args.tinfo, args.credentials, args.opid,resultHandler);
}
}
@@ -817,11 +816,8 @@ public class FateService {
private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", 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 beginFateOperation_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new beginFateOperation_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new beginFateOperation_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new beginFateOperation_argsTupleSchemeFactory();
public org.apache.accumulo.core.trace.thrift.TInfo tinfo; // required
public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required
@@ -831,10 +827,10 @@ public class FateService {
TINFO((short)2, "tinfo"),
CREDENTIALS((short)1, "credentials");
- 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);
}
}
@@ -859,21 +855,21 @@ public class FateService {
*/
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;
}
@@ -882,20 +878,20 @@ public class FateService {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.trace.thrift.TInfo.class)));
tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.security.thrift.TCredentials.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFateOperation_args.class, metaDataMap);
}
@@ -981,7 +977,7 @@ public class FateService {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TINFO:
if (value == null) {
@@ -1002,7 +998,7 @@ public class FateService {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TINFO:
return getTinfo();
@@ -1011,13 +1007,13 @@ public class FateService {
return getCredentials();
}
- 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) {
@@ -1026,11 +1022,11 @@ public class FateService {
case CREDENTIALS:
return isSetCredentials();
}
- 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 beginFateOperation_args)
@@ -1041,6 +1037,8 @@ public class FateService {
public boolean equals(beginFateOperation_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tinfo = true && this.isSetTinfo();
boolean that_present_tinfo = true && that.isSetTinfo();
@@ -1065,19 +1063,17 @@ public class FateService {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tinfo = true && (isSetTinfo());
- list.add(present_tinfo);
- if (present_tinfo)
- list.add(tinfo);
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
- boolean present_credentials = true && (isSetCredentials());
- list.add(present_credentials);
- if (present_credentials)
- list.add(credentials);
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1088,7 +1084,7 @@ public class FateService {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTinfo()).compareTo(other.isSetTinfo());
+ lastComparison = java.lang.Boolean.valueOf(isSetTinfo()).compareTo(other.isSetTinfo());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1098,7 +1094,7 @@ public class FateService {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
+ lastComparison = java.lang.Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1116,16 +1112,16 @@ public class FateService {
}
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("beginFateOperation_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("beginFateOperation_args(");
boolean first = true;
sb.append("tinfo:");
@@ -1166,7 +1162,7 @@ public class FateService {
}
}
- 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) {
@@ -1174,13 +1170,13 @@ public class FateService {
}
}
- private static class beginFateOperation_argsStandardSchemeFactory implements SchemeFactory {
+ private static class beginFateOperation_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public beginFateOperation_argsStandardScheme getScheme() {
return new beginFateOperation_argsStandardScheme();
}
}
- private static class beginFateOperation_argsStandardScheme extends StandardScheme<beginFateOperation_args> {
+ private static class beginFateOperation_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<beginFateOperation_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, beginFateOperation_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1241,18 +1237,18 @@ public class FateService {
}
- private static class beginFateOperation_argsTupleSchemeFactory implements SchemeFactory {
+ private static class beginFateOperation_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public beginFateOperation_argsTupleScheme getScheme() {
return new beginFateOperation_argsTupleScheme();
}
}
- private static class beginFateOperation_argsTupleScheme extends TupleScheme<beginFateOperation_args> {
+ private static class beginFateOperation_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<beginFateOperation_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, beginFateOperation_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTinfo()) {
optionals.set(0);
}
@@ -1270,8 +1266,8 @@ public class FateService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, beginFateOperation_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo();
struct.tinfo.read(iprot);
@@ -1285,6 +1281,9 @@ public class FateService {
}
}
+ 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 beginFateOperation_result implements org.apache.thrift.TBase<beginFateOperation_result, beginFateOperation_result._Fields>, java.io.Serializable, Cloneable, Comparable<beginFateOperation_result> {
@@ -1294,11 +1293,8 @@ public class FateService {
private static final org.apache.thrift.protocol.TField SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField TNASE_FIELD_DESC = new org.apache.thrift.protocol.TField("tnase", 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 beginFateOperation_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new beginFateOperation_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new beginFateOperation_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new beginFateOperation_resultTupleSchemeFactory();
public long success; // required
public org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec; // required
@@ -1310,10 +1306,10 @@ public class FateService {
SEC((short)1, "sec"),
TNASE((short)2, "tnase");
- 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);
}
}
@@ -1340,21 +1336,21 @@ public class FateService {
*/
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;
}
@@ -1363,7 +1359,7 @@ public class FateService {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -1371,16 +1367,16 @@ public class FateService {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", 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, org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException.class)));
tmpMap.put(_Fields.TNASE, new org.apache.thrift.meta_data.FieldMetaData("tnase", 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, org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFateOperation_result.class, metaDataMap);
}
@@ -1436,16 +1432,16 @@ public class FateService {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException getSec() {
@@ -1496,13 +1492,13 @@ public class FateService {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Long)value);
+ setSuccess((java.lang.Long)value);
}
break;
@@ -1525,7 +1521,7 @@ public class FateService {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -1537,13 +1533,13 @@ public class FateService {
return getTnase();
}
- 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) {
@@ -1554,11 +1550,11 @@ public class FateService {
case TNASE:
return isSetTnase();
}
- 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 beginFateOperation_result)
@@ -1569,6 +1565,8 @@ public class FateService {
public boolean equals(beginFateOperation_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -1602,24 +1600,19 @@ public class FateService {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
- boolean present_sec = true && (isSetSec());
- list.add(present_sec);
- if (present_sec)
- list.add(sec);
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
- boolean present_tnase = true && (isSetTnase());
- list.add(present_tnase);
- if (present_tnase)
- list.add(tnase);
+ hashCode = hashCode * 8191 + ((isSetTnase()) ? 131071 : 524287);
+ if (isSetTnase())
+ hashCode = hashCode * 8191 + tnase.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1630,7 +1623,7 @@ public class FateService {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1640,7 +1633,7 @@ public class FateService {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSec()).compareTo(other.isSetSec());
+ lastComparison = java.lang.Boolean.valueOf(isSetSec()).compareTo(other.isSetSec());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1650,7 +1643,7 @@ public class FateService {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTnase()).compareTo(other.isSetTnase());
+ lastComparison = java.lang.Boolean.valueOf(isSetTnase()).compareTo(other.isSetTnase());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1668,16 +1661,16 @@ public class FateService {
}
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("beginFateOperation_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("beginFateOperation_result(");
boolean first = true;
sb.append("success:");
@@ -1716,7 +1709,7 @@ public class FateService {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1726,13 +1719,13 @@ public class FateService {
}
}
- private static class beginFateOperation_resultStandardSchemeFactory implements SchemeFactory {
+ private static class beginFateOperation_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public beginFateOperation_resultStandardScheme getScheme() {
return new beginFateOperation_resultStandardScheme();
}
}
- private static class beginFateOperation_resultStandardScheme extends StandardScheme<beginFateOperation_result> {
+ private static class beginFateOperation_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<beginFateOperation_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, beginFateOperation_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1806,18 +1799,18 @@ public class FateService {
}
- private static class beginFateOperation_resultTupleSchemeFactory implements SchemeFactory {
+ private static class beginFateOperation_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public beginFateOperation_resultTupleScheme getScheme() {
return new beginFateOperation_resultTupleScheme();
}
}
- private static class beginFateOperation_resultTupleScheme extends TupleScheme<beginFateOperation_result> {
+ private static class beginFateOperation_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<beginFateOperation_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, beginFateOperation_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -1841,8 +1834,8 @@ public class FateService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, beginFateOperation_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.readI64();
struct.setSuccessIsSet(true);
@@ -1860,6 +1853,9 @@ public class FateService {
}
}
+ 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 executeFateOperation_args implements org.apache.thrift.TBase<executeFateOperation_args, executeFateOperation_args._Fields>, java.io.Serializable, Cloneable, Comparable<executeFateOperation_args> {
@@ -1873,11 +1869,8 @@ public class FateService {
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.MAP, (short)5);
private static final org.apache.thrift.protocol.TField AUTO_CLEAN_FIELD_DESC = new org.apache.thrift.protocol.TField("autoClean", org.apache.thrift.protocol.TType.BOOL, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new executeFateOperation_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new executeFateOperation_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new executeFateOperation_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new executeFateOperation_argsTupleSchemeFactory();
public org.apache.accumulo.core.trace.thrift.TInfo tinfo; // required
public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required
@@ -1887,8 +1880,8 @@ public class FateService {
* @see FateOperation
*/
public FateOperation op; // required
- public List<ByteBuffer> arguments; // required
- public Map<String,String> options; // required
+ public java.util.List<java.nio.ByteBuffer> arguments; // required
+ public java.util.Map<java.lang.String,java.lang.String> options; // required
public boolean autoClean; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -1905,10 +1898,10 @@ public class FateService {
OPTIONS((short)5, "options"),
AUTO_CLEAN((short)6, "autoClean");
- 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);
}
}
@@ -1943,21 +1936,21 @@ public class FateService {
*/
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;
}
@@ -1966,7 +1959,7 @@ public class FateService {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -1975,9 +1968,9 @@ public class FateService {
private static final int __OPID_ISSET_ID = 0;
private static final int __AUTOCLEAN_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.trace.thrift.TInfo.class)));
tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -1995,7 +1988,7 @@ public class FateService {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.AUTO_CLEAN, new org.apache.thrift.meta_data.FieldMetaData("autoClean", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(executeFateOperation_args.class, metaDataMap);
}
@@ -2007,8 +2000,8 @@ public class FateService {
org.apache.accumulo.core.security.thrift.TCredentials credentials,
long opid,
FateOperation op,
- List<ByteBuffer> arguments,
- Map<String,String> options,
+ java.util.List<java.nio.ByteBuffer> arguments,
+ java.util.Map<java.lang.String,java.lang.String> options,
boolean autoClean)
{
this();
@@ -2039,11 +2032,11 @@ public class FateService {
this.op = other.op;
}
if (other.isSetArguments()) {
- List<ByteBuffer> __this__arguments = new ArrayList<ByteBuffer>(other.arguments);
+ java.util.List<java.nio.ByteBuffer> __this__arguments = new java.util.ArrayList<java.nio.ByteBuffer>(other.arguments);
this.arguments = __this__arguments;
}
if (other.isSetOptions()) {
- Map<String,String> __this__options = new HashMap<String,String>(other.options);
+ java.util.Map<java.lang.String,java.lang.String> __this__options = new java.util.HashMap<java.lang.String,java.lang.String>(other.options);
this.options = __this__options;
}
this.autoClean = other.autoClean;
@@ -2125,16 +2118,16 @@ public class FateService {
}
public void unsetOpid() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OPID_ISSET_ID);
}
/** Returns true if field opid is set (has been assigned a value) and false otherwise */
public boolean isSetOpid() {
- return EncodingUtils.testBit(__isset_bitfield, __OPID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OPID_ISSET_ID);
}
public void setOpidIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OPID_ISSET_ID, value);
}
/**
@@ -2173,22 +2166,22 @@ public class FateService {
return (this.arguments == null) ? 0 : this.arguments.size();
}
- public java.util.Iterator<ByteBuffer> getArgumentsIterator() {
+ public java.util.Iterator<java.nio.ByteBuffer> getArgumentsIterator() {
return (this.arguments == null) ? null : this.arguments.iterator();
}
- public void addToArguments(ByteBuffer elem) {
+ public void addToArguments(java.nio.ByteBuffer elem) {
if (this.arguments == null) {
- this.arguments = new ArrayList<ByteBuffer>();
+ this.arguments = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.arguments.add(elem);
}
- public List<ByteBuffer> getArguments() {
+ public java.util.List<java.nio.ByteBuffer> getArguments() {
return this.arguments;
}
- public executeFateOperation_args setArguments(List<ByteBuffer> arguments) {
+ public executeFateOperation_args setArguments(java.util.List<java.nio.ByteBuffer> arguments) {
this.arguments = arguments;
return this;
}
@@ -2212,18 +2205,18 @@ public class FateService {
return (this.options == null) ? 0 : this.options.size();
}
- public void putToOptions(String key, String val) {
+ public void putToOptions(java.lang.String key, java.lang.String val) {
if (this.options == null) {
- this.options = new HashMap<String,String>();
+ this.options = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.options.put(key, val);
}
- public Map<String,String> getOptions() {
+ public java.util.Map<java.lang.String,java.lang.String> getOptions() {
return this.options;
}
- public executeFateOperation_args setOptions(Map<String,String> options) {
+ public executeFateOperation_args setOptions(java.util.Map<java.lang.String,java.lang.String> options) {
this.options = options;
return this;
}
@@ -2254,19 +2247,19 @@ public class FateService {
}
public void unsetAutoClean() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AUTOCLEAN_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AUTOCLEAN_ISSET_ID);
}
/** Returns true if field autoClean is set (has been assigned a value) and false otherwise */
public boolean isSetAutoClean() {
- return EncodingUtils.testBit(__isset_bitfield, __AUTOCLEAN_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AUTOCLEAN_ISSET_ID);
}
public void setAutoCleanIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AUTOCLEAN_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AUTOCLEAN_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TINFO:
if (value == null) {
@@ -2288,7 +2281,7 @@ public
<TRUNCATED>
[15/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
index 150de3e..518146b 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
@@ -15,453 +15,426 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class AccumuloProxy {
public interface Iface {
- public ByteBuffer login(String principal, Map<String,String> loginProperties) throws AccumuloSecurityException, org.apache.thrift.TException;
+ public java.nio.ByteBuffer login(java.lang.String principal, java.util.Map<java.lang.String,java.lang.String> loginProperties) throws AccumuloSecurityException, org.apache.thrift.TException;
- public int addConstraint(ByteBuffer login, String tableName, String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public int addConstraint(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void addSplits(ByteBuffer login, String tableName, Set<ByteBuffer> splits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void addSplits(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Set<java.nio.ByteBuffer> splits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void attachIterator(ByteBuffer login, String tableName, IteratorSetting setting, Set<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, org.apache.thrift.TException;
+ public void attachIterator(java.nio.ByteBuffer login, java.lang.String tableName, IteratorSetting setting, java.util.Set<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, org.apache.thrift.TException;
- public void checkIteratorConflicts(ByteBuffer login, String tableName, IteratorSetting setting, Set<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, org.apache.thrift.TException;
+ public void checkIteratorConflicts(java.nio.ByteBuffer login, java.lang.String tableName, IteratorSetting setting, java.util.Set<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, org.apache.thrift.TException;
- public void clearLocatorCache(ByteBuffer login, String tableName) throws TableNotFoundException, org.apache.thrift.TException;
+ public void clearLocatorCache(java.nio.ByteBuffer login, java.lang.String tableName) throws TableNotFoundException, org.apache.thrift.TException;
- public void cloneTable(ByteBuffer login, String tableName, String newTableName, boolean flush, Map<String,String> propertiesToSet, Set<String> propertiesToExclude) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException, org.apache.thrift.TException;
+ public void cloneTable(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String newTableName, boolean flush, java.util.Map<java.lang.String,java.lang.String> propertiesToSet, java.util.Set<java.lang.String> propertiesToExclude) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException, org.apache.thrift.TException;
- public void compactTable(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, List<IteratorSetting> iterators, boolean flush, boolean wait, CompactionStrategyConfig compactionStrategy) throws AccumuloSecurityException, TableNotFoundException, AccumuloException, org.apache.thrift.TException;
+ public void compactTable(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, java.util.List<IteratorSetting> iterators, boolean flush, boolean wait, CompactionStrategyConfig compactionStrategy) throws AccumuloSecurityException, TableNotFoundException, AccumuloException, org.apache.thrift.TException;
- public void cancelCompaction(ByteBuffer login, String tableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException, org.apache.thrift.TException;
+ public void cancelCompaction(java.nio.ByteBuffer login, java.lang.String tableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException, org.apache.thrift.TException;
- public void createTable(ByteBuffer login, String tableName, boolean versioningIter, TimeType type) throws AccumuloException, AccumuloSecurityException, TableExistsException, org.apache.thrift.TException;
+ public void createTable(java.nio.ByteBuffer login, java.lang.String tableName, boolean versioningIter, TimeType type) throws AccumuloException, AccumuloSecurityException, TableExistsException, org.apache.thrift.TException;
- public void deleteTable(ByteBuffer login, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void deleteTable(java.nio.ByteBuffer login, java.lang.String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void deleteRows(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void deleteRows(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void exportTable(ByteBuffer login, String tableName, String exportDir) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void exportTable(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String exportDir) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void flushTable(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void flushTable(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public List<DiskUsage> getDiskUsage(ByteBuffer login, Set<String> tables) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.util.List<DiskUsage> getDiskUsage(java.nio.ByteBuffer login, java.util.Set<java.lang.String> tables) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public Map<String,Set<String>> getLocalityGroups(ByteBuffer login, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getLocalityGroups(java.nio.ByteBuffer login, java.lang.String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public IteratorSetting getIteratorSetting(ByteBuffer login, String tableName, String iteratorName, IteratorScope scope) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public IteratorSetting getIteratorSetting(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String iteratorName, IteratorScope scope) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public ByteBuffer getMaxRow(ByteBuffer login, String tableName, Set<ByteBuffer> auths, ByteBuffer startRow, boolean startInclusive, ByteBuffer endRow, boolean endInclusive) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.nio.ByteBuffer getMaxRow(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Set<java.nio.ByteBuffer> auths, java.nio.ByteBuffer startRow, boolean startInclusive, java.nio.ByteBuffer endRow, boolean endInclusive) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public Map<String,String> getTableProperties(ByteBuffer login, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> getTableProperties(java.nio.ByteBuffer login, java.lang.String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void importDirectory(ByteBuffer login, String tableName, String importDir, String failureDir, boolean setTime) throws TableNotFoundException, AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void importDirectory(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String importDir, java.lang.String failureDir, boolean setTime) throws TableNotFoundException, AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void importTable(ByteBuffer login, String tableName, String importDir) throws TableExistsException, AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void importTable(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String importDir) throws TableExistsException, AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public List<ByteBuffer> listSplits(ByteBuffer login, String tableName, int maxSplits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.util.List<java.nio.ByteBuffer> listSplits(java.nio.ByteBuffer login, java.lang.String tableName, int maxSplits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public Set<String> listTables(ByteBuffer login) throws org.apache.thrift.TException;
+ public java.util.Set<java.lang.String> listTables(java.nio.ByteBuffer login) throws org.apache.thrift.TException;
- public Map<String,Set<IteratorScope>> listIterators(ByteBuffer login, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.util.Set<IteratorScope>> listIterators(java.nio.ByteBuffer login, java.lang.String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public Map<String,Integer> listConstraints(ByteBuffer login, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.Integer> listConstraints(java.nio.ByteBuffer login, java.lang.String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void mergeTablets(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void mergeTablets(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void offlineTable(ByteBuffer login, String tableName, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void offlineTable(java.nio.ByteBuffer login, java.lang.String tableName, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void onlineTable(ByteBuffer login, String tableName, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void onlineTable(java.nio.ByteBuffer login, java.lang.String tableName, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void removeConstraint(ByteBuffer login, String tableName, int constraint) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void removeConstraint(java.nio.ByteBuffer login, java.lang.String tableName, int constraint) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void removeIterator(ByteBuffer login, String tableName, String iterName, Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void removeIterator(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String iterName, java.util.Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void removeTableProperty(ByteBuffer login, String tableName, String property) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void removeTableProperty(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String property) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void renameTable(ByteBuffer login, String oldTableName, String newTableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException, org.apache.thrift.TException;
+ public void renameTable(java.nio.ByteBuffer login, java.lang.String oldTableName, java.lang.String newTableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException, org.apache.thrift.TException;
- public void setLocalityGroups(ByteBuffer login, String tableName, Map<String,Set<String>> groups) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void setLocalityGroups(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> groups) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void setTableProperty(ByteBuffer login, String tableName, String property, String value) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void setTableProperty(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String property, java.lang.String value) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public Set<Range> splitRangeByTablets(ByteBuffer login, String tableName, Range range, int maxSplits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.util.Set<Range> splitRangeByTablets(java.nio.ByteBuffer login, java.lang.String tableName, Range range, int maxSplits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public boolean tableExists(ByteBuffer login, String tableName) throws org.apache.thrift.TException;
+ public boolean tableExists(java.nio.ByteBuffer login, java.lang.String tableName) throws org.apache.thrift.TException;
- public Map<String,String> tableIdMap(ByteBuffer login) throws org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> tableIdMap(java.nio.ByteBuffer login) throws org.apache.thrift.TException;
- public boolean testTableClassLoad(ByteBuffer login, String tableName, String className, String asTypeName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public boolean testTableClassLoad(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String className, java.lang.String asTypeName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void pingTabletServer(ByteBuffer login, String tserver) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void pingTabletServer(java.nio.ByteBuffer login, java.lang.String tserver) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public List<ActiveScan> getActiveScans(ByteBuffer login, String tserver) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public java.util.List<ActiveScan> getActiveScans(java.nio.ByteBuffer login, java.lang.String tserver) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public List<ActiveCompaction> getActiveCompactions(ByteBuffer login, String tserver) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public java.util.List<ActiveCompaction> getActiveCompactions(java.nio.ByteBuffer login, java.lang.String tserver) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public Map<String,String> getSiteConfiguration(ByteBuffer login) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> getSiteConfiguration(java.nio.ByteBuffer login) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public Map<String,String> getSystemConfiguration(ByteBuffer login) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> getSystemConfiguration(java.nio.ByteBuffer login) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public List<String> getTabletServers(ByteBuffer login) throws org.apache.thrift.TException;
+ public java.util.List<java.lang.String> getTabletServers(java.nio.ByteBuffer login) throws org.apache.thrift.TException;
- public void removeProperty(ByteBuffer login, String property) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void removeProperty(java.nio.ByteBuffer login, java.lang.String property) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void setProperty(ByteBuffer login, String property, String value) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void setProperty(java.nio.ByteBuffer login, java.lang.String property, java.lang.String value) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public boolean testClassLoad(ByteBuffer login, String className, String asTypeName) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public boolean testClassLoad(java.nio.ByteBuffer login, java.lang.String className, java.lang.String asTypeName) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public boolean authenticateUser(ByteBuffer login, String user, Map<String,String> properties) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public boolean authenticateUser(java.nio.ByteBuffer login, java.lang.String user, java.util.Map<java.lang.String,java.lang.String> properties) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void changeUserAuthorizations(ByteBuffer login, String user, Set<ByteBuffer> authorizations) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void changeUserAuthorizations(java.nio.ByteBuffer login, java.lang.String user, java.util.Set<java.nio.ByteBuffer> authorizations) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void changeLocalUserPassword(ByteBuffer login, String user, ByteBuffer password) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void changeLocalUserPassword(java.nio.ByteBuffer login, java.lang.String user, java.nio.ByteBuffer password) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void createLocalUser(ByteBuffer login, String user, ByteBuffer password) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void createLocalUser(java.nio.ByteBuffer login, java.lang.String user, java.nio.ByteBuffer password) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void dropLocalUser(ByteBuffer login, String user) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void dropLocalUser(java.nio.ByteBuffer login, java.lang.String user) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public List<ByteBuffer> getUserAuthorizations(ByteBuffer login, String user) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public java.util.List<java.nio.ByteBuffer> getUserAuthorizations(java.nio.ByteBuffer login, java.lang.String user) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void grantSystemPermission(ByteBuffer login, String user, SystemPermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void grantSystemPermission(java.nio.ByteBuffer login, java.lang.String user, SystemPermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void grantTablePermission(ByteBuffer login, String user, String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void grantTablePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public boolean hasSystemPermission(ByteBuffer login, String user, SystemPermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public boolean hasSystemPermission(java.nio.ByteBuffer login, java.lang.String user, SystemPermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public boolean hasTablePermission(ByteBuffer login, String user, String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public boolean hasTablePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public Set<String> listLocalUsers(ByteBuffer login) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.util.Set<java.lang.String> listLocalUsers(java.nio.ByteBuffer login) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void revokeSystemPermission(ByteBuffer login, String user, SystemPermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void revokeSystemPermission(java.nio.ByteBuffer login, java.lang.String user, SystemPermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void revokeTablePermission(ByteBuffer login, String user, String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public void revokeTablePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String table, TablePermission perm) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void grantNamespacePermission(ByteBuffer login, String user, String namespaceName, NamespacePermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void grantNamespacePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String namespaceName, NamespacePermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public boolean hasNamespacePermission(ByteBuffer login, String user, String namespaceName, NamespacePermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public boolean hasNamespacePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String namespaceName, NamespacePermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void revokeNamespacePermission(ByteBuffer login, String user, String namespaceName, NamespacePermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public void revokeNamespacePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String namespaceName, NamespacePermission perm) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public String createBatchScanner(ByteBuffer login, String tableName, BatchScanOptions options) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.lang.String createBatchScanner(java.nio.ByteBuffer login, java.lang.String tableName, BatchScanOptions options) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public String createScanner(ByteBuffer login, String tableName, ScanOptions options) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.lang.String createScanner(java.nio.ByteBuffer login, java.lang.String tableName, ScanOptions options) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public boolean hasNext(String scanner) throws UnknownScanner, org.apache.thrift.TException;
+ public boolean hasNext(java.lang.String scanner) throws UnknownScanner, org.apache.thrift.TException;
- public KeyValueAndPeek nextEntry(String scanner) throws NoMoreEntriesException, UnknownScanner, AccumuloSecurityException, org.apache.thrift.TException;
+ public KeyValueAndPeek nextEntry(java.lang.String scanner) throws NoMoreEntriesException, UnknownScanner, AccumuloSecurityException, org.apache.thrift.TException;
- public ScanResult nextK(String scanner, int k) throws NoMoreEntriesException, UnknownScanner, AccumuloSecurityException, org.apache.thrift.TException;
+ public ScanResult nextK(java.lang.String scanner, int k) throws NoMoreEntriesException, UnknownScanner, AccumuloSecurityException, org.apache.thrift.TException;
- public void closeScanner(String scanner) throws UnknownScanner, org.apache.thrift.TException;
+ public void closeScanner(java.lang.String scanner) throws UnknownScanner, org.apache.thrift.TException;
- public void updateAndFlush(ByteBuffer login, String tableName, Map<ByteBuffer,List<ColumnUpdate>> cells) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException, org.apache.thrift.TException;
+ public void updateAndFlush(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Map<java.nio.ByteBuffer,java.util.List<ColumnUpdate>> cells) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, MutationsRejectedException, org.apache.thrift.TException;
- public String createWriter(ByteBuffer login, String tableName, WriterOptions opts) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.lang.String createWriter(java.nio.ByteBuffer login, java.lang.String tableName, WriterOptions opts) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public void update(String writer, Map<ByteBuffer,List<ColumnUpdate>> cells) throws org.apache.thrift.TException;
+ public void update(java.lang.String writer, java.util.Map<java.nio.ByteBuffer,java.util.List<ColumnUpdate>> cells) throws org.apache.thrift.TException;
- public void flush(String writer) throws UnknownWriter, MutationsRejectedException, org.apache.thrift.TException;
+ public void flush(java.lang.String writer) throws UnknownWriter, MutationsRejectedException, org.apache.thrift.TException;
- public void closeWriter(String writer) throws UnknownWriter, MutationsRejectedException, org.apache.thrift.TException;
+ public void closeWriter(java.lang.String writer) throws UnknownWriter, MutationsRejectedException, org.apache.thrift.TException;
- public ConditionalStatus updateRowConditionally(ByteBuffer login, String tableName, ByteBuffer row, ConditionalUpdates updates) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public ConditionalStatus updateRowConditionally(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer row, ConditionalUpdates updates) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public String createConditionalWriter(ByteBuffer login, String tableName, ConditionalWriterOptions options) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
+ public java.lang.String createConditionalWriter(java.nio.ByteBuffer login, java.lang.String tableName, ConditionalWriterOptions options) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException;
- public Map<ByteBuffer,ConditionalStatus> updateRowsConditionally(String conditionalWriter, Map<ByteBuffer,ConditionalUpdates> updates) throws UnknownWriter, AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public java.util.Map<java.nio.ByteBuffer,ConditionalStatus> updateRowsConditionally(java.lang.String conditionalWriter, java.util.Map<java.nio.ByteBuffer,ConditionalUpdates> updates) throws UnknownWriter, AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void closeConditionalWriter(String conditionalWriter) throws org.apache.thrift.TException;
+ public void closeConditionalWriter(java.lang.String conditionalWriter) throws org.apache.thrift.TException;
- public Range getRowRange(ByteBuffer row) throws org.apache.thrift.TException;
+ public Range getRowRange(java.nio.ByteBuffer row) throws org.apache.thrift.TException;
public Key getFollowing(Key key, PartialKey part) throws org.apache.thrift.TException;
- public String systemNamespace() throws org.apache.thrift.TException;
+ public java.lang.String systemNamespace() throws org.apache.thrift.TException;
- public String defaultNamespace() throws org.apache.thrift.TException;
+ public java.lang.String defaultNamespace() throws org.apache.thrift.TException;
- public List<String> listNamespaces(ByteBuffer login) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public java.util.List<java.lang.String> listNamespaces(java.nio.ByteBuffer login) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public boolean namespaceExists(ByteBuffer login, String namespaceName) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public boolean namespaceExists(java.nio.ByteBuffer login, java.lang.String namespaceName) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void createNamespace(ByteBuffer login, String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceExistsException, org.apache.thrift.TException;
+ public void createNamespace(java.nio.ByteBuffer login, java.lang.String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceExistsException, org.apache.thrift.TException;
- public void deleteNamespace(ByteBuffer login, String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceNotEmptyException, org.apache.thrift.TException;
+ public void deleteNamespace(java.nio.ByteBuffer login, java.lang.String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceNotEmptyException, org.apache.thrift.TException;
- public void renameNamespace(ByteBuffer login, String oldNamespaceName, String newNamespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceExistsException, org.apache.thrift.TException;
+ public void renameNamespace(java.nio.ByteBuffer login, java.lang.String oldNamespaceName, java.lang.String newNamespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceExistsException, org.apache.thrift.TException;
- public void setNamespaceProperty(ByteBuffer login, String namespaceName, String property, String value) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public void setNamespaceProperty(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String property, java.lang.String value) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public void removeNamespaceProperty(ByteBuffer login, String namespaceName, String property) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public void removeNamespaceProperty(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String property) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public Map<String,String> getNamespaceProperties(ByteBuffer login, String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> getNamespaceProperties(java.nio.ByteBuffer login, java.lang.String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public Map<String,String> namespaceIdMap(ByteBuffer login) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> namespaceIdMap(java.nio.ByteBuffer login) throws AccumuloException, AccumuloSecurityException, org.apache.thrift.TException;
- public void attachNamespaceIterator(ByteBuffer login, String namespaceName, IteratorSetting setting, Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public void attachNamespaceIterator(java.nio.ByteBuffer login, java.lang.String namespaceName, IteratorSetting setting, java.util.Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public void removeNamespaceIterator(ByteBuffer login, String namespaceName, String name, Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public void removeNamespaceIterator(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String name, java.util.Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public IteratorSetting getNamespaceIteratorSetting(ByteBuffer login, String namespaceName, String name, IteratorScope scope) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public IteratorSetting getNamespaceIteratorSetting(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String name, IteratorScope scope) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public Map<String,Set<IteratorScope>> listNamespaceIterators(ByteBuffer login, String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.util.Set<IteratorScope>> listNamespaceIterators(java.nio.ByteBuffer login, java.lang.String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public void checkNamespaceIteratorConflicts(ByteBuffer login, String namespaceName, IteratorSetting setting, Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public void checkNamespaceIteratorConflicts(java.nio.ByteBuffer login, java.lang.String namespaceName, IteratorSetting setting, java.util.Set<IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public int addNamespaceConstraint(ByteBuffer login, String namespaceName, String constraintClassName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public int addNamespaceConstraint(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String constraintClassName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public void removeNamespaceConstraint(ByteBuffer login, String namespaceName, int id) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public void removeNamespaceConstraint(java.nio.ByteBuffer login, java.lang.String namespaceName, int id) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public Map<String,Integer> listNamespaceConstraints(ByteBuffer login, String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.Integer> listNamespaceConstraints(java.nio.ByteBuffer login, java.lang.String namespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
- public boolean testNamespaceClassLoad(ByteBuffer login, String namespaceName, String className, String asTypeName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
+ public boolean testNamespaceClassLoad(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String className, java.lang.String asTypeName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void login(String principal, Map<String,String> loginProperties, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void login(java.lang.String principal, java.util.Map<java.lang.String,java.lang.String> loginProperties, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException;
- public void addConstraint(ByteBuffer login, String tableName, String constraintClassName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void addConstraint(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String constraintClassName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException;
- public void addSplits(ByteBuffer login, String tableName, Set<ByteBuffer> splits, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void addSplits(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Set<java.nio.ByteBuffer> splits, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void attachIterator(ByteBuffer login, String tableName, IteratorSetting setting, Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void attachIterator(java.nio.ByteBuffer login, java.lang.String tableName, IteratorSetting setting, java.util.Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void checkIteratorConflicts(ByteBuffer login, String tableName, IteratorSetting setting, Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void checkIteratorConflicts(java.nio.ByteBuffer login, java.lang.String tableName, IteratorSetting setting, java.util.Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void clearLocatorCache(ByteBuffer login, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void clearLocatorCache(java.nio.ByteBuffer login, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void cloneTable(ByteBuffer login, String tableName, String newTableName, boolean flush, Map<String,String> propertiesToSet, Set<String> propertiesToExclude, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void cloneTable(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String newTableName, boolean flush, java.util.Map<java.lang.String,java.lang.String> propertiesToSet, java.util.Set<java.lang.String> propertiesToExclude, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void compactTable(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, List<IteratorSetting> iterators, boolean flush, boolean wait, CompactionStrategyConfig compactionStrategy, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void compactTable(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, java.util.List<IteratorSetting> iterators, boolean flush, boolean wait, CompactionStrategyConfig compactionStrategy, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void cancelCompaction(ByteBuffer login, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void cancelCompaction(java.nio.ByteBuffer login, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void createTable(ByteBuffer login, String tableName, boolean versioningIter, TimeType type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createTable(java.nio.ByteBuffer login, java.lang.String tableName, boolean versioningIter, TimeType type, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void deleteTable(ByteBuffer login, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteTable(java.nio.ByteBuffer login, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void deleteRows(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteRows(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void exportTable(ByteBuffer login, String tableName, String exportDir, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void exportTable(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String exportDir, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void flushTable(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, boolean wait, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void flushTable(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, boolean wait, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getDiskUsage(ByteBuffer login, Set<String> tables, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getDiskUsage(java.nio.ByteBuffer login, java.util.Set<java.lang.String> tables, org.apache.thrift.async.AsyncMethodCallback<java.util.List<DiskUsage>> resultHandler) throws org.apache.thrift.TException;
- public void getLocalityGroups(ByteBuffer login, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLocalityGroups(java.nio.ByteBuffer login, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> resultHandler) throws org.apache.thrift.TException;
- public void getIteratorSetting(ByteBuffer login, String tableName, String iteratorName, IteratorScope scope, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getIteratorSetting(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String iteratorName, IteratorScope scope, org.apache.thrift.async.AsyncMethodCallback<IteratorSetting> resultHandler) throws org.apache.thrift.TException;
- public void getMaxRow(ByteBuffer login, String tableName, Set<ByteBuffer> auths, ByteBuffer startRow, boolean startInclusive, ByteBuffer endRow, boolean endInclusive, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getMaxRow(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Set<java.nio.ByteBuffer> auths, java.nio.ByteBuffer startRow, boolean startInclusive, java.nio.ByteBuffer endRow, boolean endInclusive, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException;
- public void getTableProperties(ByteBuffer login, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTableProperties(java.nio.ByteBuffer login, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void importDirectory(ByteBuffer login, String tableName, String importDir, String failureDir, boolean setTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void importDirectory(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String importDir, java.lang.String failureDir, boolean setTime, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void importTable(ByteBuffer login, String tableName, String importDir, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void importTable(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String importDir, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void listSplits(ByteBuffer login, String tableName, int maxSplits, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listSplits(java.nio.ByteBuffer login, java.lang.String tableName, int maxSplits, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.nio.ByteBuffer>> resultHandler) throws org.apache.thrift.TException;
- public void listTables(ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listTables(java.nio.ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback<java.util.Set<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void listIterators(ByteBuffer login, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listIterators(java.nio.ByteBuffer login, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.util.Set<IteratorScope>>> resultHandler) throws org.apache.thrift.TException;
- public void listConstraints(ByteBuffer login, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listConstraints(java.nio.ByteBuffer login, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.Integer>> resultHandler) throws org.apache.thrift.TException;
- public void mergeTablets(ByteBuffer login, String tableName, ByteBuffer startRow, ByteBuffer endRow, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void mergeTablets(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer startRow, java.nio.ByteBuffer endRow, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void offlineTable(ByteBuffer login, String tableName, boolean wait, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void offlineTable(java.nio.ByteBuffer login, java.lang.String tableName, boolean wait, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void onlineTable(ByteBuffer login, String tableName, boolean wait, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void onlineTable(java.nio.ByteBuffer login, java.lang.String tableName, boolean wait, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeConstraint(ByteBuffer login, String tableName, int constraint, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeConstraint(java.nio.ByteBuffer login, java.lang.String tableName, int constraint, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeIterator(ByteBuffer login, String tableName, String iterName, Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeIterator(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String iterName, java.util.Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeTableProperty(ByteBuffer login, String tableName, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeTableProperty(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void renameTable(ByteBuffer login, String oldTableName, String newTableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void renameTable(java.nio.ByteBuffer login, java.lang.String oldTableName, java.lang.String newTableName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setLocalityGroups(ByteBuffer login, String tableName, Map<String,Set<String>> groups, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setLocalityGroups(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> groups, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setTableProperty(ByteBuffer login, String tableName, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setTableProperty(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void splitRangeByTablets(ByteBuffer login, String tableName, Range range, int maxSplits, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void splitRangeByTablets(java.nio.ByteBuffer login, java.lang.String tableName, Range range, int maxSplits, org.apache.thrift.async.AsyncMethodCallback<java.util.Set<Range>> resultHandler) throws org.apache.thrift.TException;
- public void tableExists(ByteBuffer login, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void tableExists(java.nio.ByteBuffer login, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void tableIdMap(ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void tableIdMap(java.nio.ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void testTableClassLoad(ByteBuffer login, String tableName, String className, String asTypeName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void testTableClassLoad(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String className, java.lang.String asTypeName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void pingTabletServer(ByteBuffer login, String tserver, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void pingTabletServer(java.nio.ByteBuffer login, java.lang.String tserver, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getActiveScans(ByteBuffer login, String tserver, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getActiveScans(java.nio.ByteBuffer login, java.lang.String tserver, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveScan>> resultHandler) throws org.apache.thrift.TException;
- public void getActiveCompactions(ByteBuffer login, String tserver, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getActiveCompactions(java.nio.ByteBuffer login, java.lang.String tserver, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ActiveCompaction>> resultHandler) throws org.apache.thrift.TException;
- public void getSiteConfiguration(ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getSiteConfiguration(java.nio.ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void getSystemConfiguration(ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getSystemConfiguration(java.nio.ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void getTabletServers(ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTabletServers(java.nio.ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void removeProperty(ByteBuffer login, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeProperty(java.nio.ByteBuffer login, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setProperty(ByteBuffer login, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setProperty(java.nio.ByteBuffer login, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void testClassLoad(ByteBuffer login, String className, String asTypeName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void testClassLoad(java.nio.ByteBuffer login, java.lang.String className, java.lang.String asTypeName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void authenticateUser(ByteBuffer login, String user, Map<String,String> properties, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void authenticateUser(java.nio.ByteBuffer login, java.lang.String user, java.util.Map<java.lang.String,java.lang.String> properties, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void changeUserAuthorizations(ByteBuffer login, String user, Set<ByteBuffer> authorizations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void changeUserAuthorizations(java.nio.ByteBuffer login, java.lang.String user, java.util.Set<java.nio.ByteBuffer> authorizations, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void changeLocalUserPassword(ByteBuffer login, String user, ByteBuffer password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void changeLocalUserPassword(java.nio.ByteBuffer login, java.lang.String user, java.nio.ByteBuffer password, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void createLocalUser(ByteBuffer login, String user, ByteBuffer password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createLocalUser(java.nio.ByteBuffer login, java.lang.String user, java.nio.ByteBuffer password, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void dropLocalUser(ByteBuffer login, String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void dropLocalUser(java.nio.ByteBuffer login, java.lang.String user, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getUserAuthorizations(ByteBuffer login, String user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getUserAuthorizations(java.nio.ByteBuffer login, java.lang.String user, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.nio.ByteBuffer>> resultHandler) throws org.apache.thrift.TException;
- public void grantSystemPermission(ByteBuffer login, String user, SystemPermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void grantSystemPermission(java.nio.ByteBuffer login, java.lang.String user, SystemPermission perm, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void grantTablePermission(ByteBuffer login, String user, String table, TablePermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void grantTablePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String table, TablePermission perm, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void hasSystemPermission(ByteBuffer login, String user, SystemPermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void hasSystemPermission(java.nio.ByteBuffer login, java.lang.String user, SystemPermission perm, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void hasTablePermission(ByteBuffer login, String user, String table, TablePermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void hasTablePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String table, TablePermission perm, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void listLocalUsers(ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listLocalUsers(java.nio.ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback<java.util.Set<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void revokeSystemPermission(ByteBuffer login, String user, SystemPermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void revokeSystemPermission(java.nio.ByteBuffer login, java.lang.String user, SystemPermission perm, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void revokeTablePermission(ByteBuffer login, String user, String table, TablePermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void revokeTablePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String table, TablePermission perm, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void grantNamespacePermission(ByteBuffer login, String user, String namespaceName, NamespacePermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void grantNamespacePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String namespaceName, NamespacePermission perm, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void hasNamespacePermission(ByteBuffer login, String user, String namespaceName, NamespacePermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void hasNamespacePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String namespaceName, NamespacePermission perm, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void revokeNamespacePermission(ByteBuffer login, String user, String namespaceName, NamespacePermission perm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void revokeNamespacePermission(java.nio.ByteBuffer login, java.lang.String user, java.lang.String namespaceName, NamespacePermission perm, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void createBatchScanner(ByteBuffer login, String tableName, BatchScanOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createBatchScanner(java.nio.ByteBuffer login, java.lang.String tableName, BatchScanOptions options, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void createScanner(ByteBuffer login, String tableName, ScanOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createScanner(java.nio.ByteBuffer login, java.lang.String tableName, ScanOptions options, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void hasNext(String scanner, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void hasNext(java.lang.String scanner, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void nextEntry(String scanner, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void nextEntry(java.lang.String scanner, org.apache.thrift.async.AsyncMethodCallback<KeyValueAndPeek> resultHandler) throws org.apache.thrift.TException;
- public void nextK(String scanner, int k, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void nextK(java.lang.String scanner, int k, org.apache.thrift.async.AsyncMethodCallback<ScanResult> resultHandler) throws org.apache.thrift.TException;
- public void closeScanner(String scanner, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void closeScanner(java.lang.String scanner, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void updateAndFlush(ByteBuffer login, String tableName, Map<ByteBuffer,List<ColumnUpdate>> cells, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateAndFlush(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Map<java.nio.ByteBuffer,java.util.List<ColumnUpdate>> cells, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void createWriter(ByteBuffer login, String tableName, WriterOptions opts, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createWriter(java.nio.ByteBuffer login, java.lang.String tableName, WriterOptions opts, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void update(String writer, Map<ByteBuffer,List<ColumnUpdate>> cells, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void update(java.lang.String writer, java.util.Map<java.nio.ByteBuffer,java.util.List<ColumnUpdate>> cells, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void flush(String writer, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void flush(java.lang.String writer, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void closeWriter(String writer, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void closeWriter(java.lang.String writer, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void updateRowConditionally(ByteBuffer login, String tableName, ByteBuffer row, ConditionalUpdates updates, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateRowConditionally(java.nio.ByteBuffer login, java.lang.String tableName, java.nio.ByteBuffer row, ConditionalUpdates updates, org.apache.thrift.async.AsyncMethodCallback<ConditionalStatus> resultHandler) throws org.apache.thrift.TException;
- public void createConditionalWriter(ByteBuffer login, String tableName, ConditionalWriterOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createConditionalWriter(java.nio.ByteBuffer login, java.lang.String tableName, ConditionalWriterOptions options, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void updateRowsConditionally(String conditionalWriter, Map<ByteBuffer,ConditionalUpdates> updates, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateRowsConditionally(java.lang.String conditionalWriter, java.util.Map<java.nio.ByteBuffer,ConditionalUpdates> updates, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.nio.ByteBuffer,ConditionalStatus>> resultHandler) throws org.apache.thrift.TException;
- public void closeConditionalWriter(String conditionalWriter, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void closeConditionalWriter(java.lang.String conditionalWriter, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getRowRange(ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getRowRange(java.nio.ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback<Range> resultHandler) throws org.apache.thrift.TException;
- public void getFollowing(Key key, PartialKey part, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getFollowing(Key key, PartialKey part, org.apache.thrift.async.AsyncMethodCallback<Key> resultHandler) throws org.apache.thrift.TException;
- public void systemNamespace(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void systemNamespace(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void defaultNamespace(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void defaultNamespace(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void listNamespaces(ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listNamespaces(java.nio.ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void namespaceExists(ByteBuffer login, String namespaceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void namespaceExists(java.nio.ByteBuffer login, java.lang.String namespaceName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void createNamespace(ByteBuffer login, String namespaceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createNamespace(java.nio.ByteBuffer login, java.lang.String namespaceName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void deleteNamespace(ByteBuffer login, String namespaceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteNamespace(java.nio.ByteBuffer login, java.lang.String namespaceName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void renameNamespace(ByteBuffer login, String oldNamespaceName, String newNamespaceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void renameNamespace(java.nio.ByteBuffer login, java.lang.String oldNamespaceName, java.lang.String newNamespaceName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setNamespaceProperty(ByteBuffer login, String namespaceName, String property, String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setNamespaceProperty(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String property, java.lang.String value, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeNamespaceProperty(ByteBuffer login, String namespaceName, String property, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeNamespaceProperty(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String property, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getNamespaceProperties(ByteBuffer login, String namespaceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getNamespaceProperties(java.nio.ByteBuffer login, java.lang.String namespaceName, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void namespaceIdMap(ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void namespaceIdMap(java.nio.ByteBuffer login, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void attachNamespaceIterator(ByteBuffer login, String namespaceName, IteratorSetting setting, Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void attachNamespaceIterator(java.nio.ByteBuffer login, java.lang.String namespaceName, IteratorSetting setting, java.util.Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void removeNamespaceIterator(ByteBuffer login, String namespaceName, String name, Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeNamespaceIterator(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String name, java.util.Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getNamespaceIteratorSetting(ByteBuffer login, String namespaceName, String name, IteratorScope scope, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getNamespaceIteratorSetting(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String name, IteratorScope scope, org.apache.thrift.async.AsyncMethodCallback<IteratorSetting> resultHandler) throws org.apache.thrift.TException;
- public void listNamespaceIterators(ByteBuffer login, String namespaceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listNamespaceIterators(java.nio.ByteBuffer login, java.lang.String namespaceName, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.util.Set<IteratorScope>>> resultHandler) throws org.apache.thrift.TException;
- public void checkNamespaceIteratorConflicts(ByteBuffer login, String namespaceName, IteratorSetting setting, Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void checkNamespaceIteratorConflicts(java.nio.ByteBuffer login, java.lang.String namespaceName, IteratorSetting setting, java.util.Set<IteratorScope> scopes, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void addNamespaceConstraint(ByteBuffer login, String namespaceName, String constraintClassName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void addNamespaceConstraint(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String constraintClassName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException;
- public void removeNamespaceConstraint(ByteBuffer login, String namespaceName, int id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void removeNamespaceConstraint(java.nio.ByteBuffer login, java.lang.String namespaceName, int id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void listNamespaceConstraints(ByteBuffer login, String namespaceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listNamespaceConstraints(java.nio.ByteBuffer login, java.lang.String namespaceName, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.Integer>> resultHandler) throws org.apache.thrift.TException;
- public void testNamespaceClassLoad(ByteBuffer login, String namespaceName, String className, String asTypeName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void testNamespaceClassLoad(java.nio.ByteBuffer login, java.lang.String namespaceName, java.lang.String className, java.lang.String asTypeName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -481,13 +454,13 @@ public class AccumuloProxy {
super(iprot, oprot);
}
- public ByteBuffer login(String principal, Map<String,String> loginProperties) throws AccumuloSecurityException, org.apache.thrift.TException
+ public java.nio.ByteBuffer login(java.lang.String principal, java.util.Map<java.lang.String,java.lang.String> loginProperties) throws AccumuloSecurityException, org.apache.thrift.TException
{
send_login(principal, loginProperties);
return recv_login();
}
- public void send_login(String principal, Map<String,String> loginProperties) throws org.apache.thrift.TException
+ public void send_login(java.lang.String principal, java.util.Map<java.lang.String,java.lang.String> loginProperties) throws org.apache.thrift.TException
{
login_args args = new login_args();
args.setPrincipal(principal);
@@ -495,7 +468,7 @@ public class AccumuloProxy {
sendBase("login", args);
}
- public ByteBuffer recv_login() throws AccumuloSecurityException, org.apache.thrift.TException
+ public java.nio.ByteBuffer recv_login() throws AccumuloSecurityException, org.apache.thrift.TException
{
login_result result = new login_result();
receiveBase(result, "login");
@@ -508,13 +481,13 @@ public class AccumuloProxy {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "login failed: unknown result");
}
- public int addConstraint(ByteBuffer login, String tableName, String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
+ public int addConstraint(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
{
send_addConstraint(login, tableName, constraintClassName);
return recv_addConstraint();
}
- public void send_addConstraint(ByteBuffer login, String tableName, String constraintClassName) throws org.apache.thrift.TException
+ public void send_addConstraint(java.nio.ByteBuffer login, java.lang.String tableName, java.lang.String constraintClassName) throws org.apache.thrift.TException
{
addConstraint_args args = new addConstraint_args();
args.setLogin(login);
@@ -542,13 +515,13 @@ public class AccumuloProxy {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addConstraint failed: unknown result");
}
- public void addSplits(ByteBuffer login, String tableName, Set<ByteBuffer> splits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
+ public void addSplits(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Set<java.nio.ByteBuffer> splits) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, org.apache.thrift.TException
{
send_addSplits(login, tableName, splits);
recv_addSplits();
}
- public void send_addSplits(ByteBuffer login, String tableName, Set<ByteBuffer> splits) throws org.apache.thrift.TException
+ public void send_addSplits(java.nio.ByteBuffer login, java.lang.String tableName, java.util.Set<java.nio.ByteBuffer> splits) throws org.apache.thrift.TException
{
addSplits_args args = new addSplits_args();
args.setLogin(login);
@@ -573,13 +546,13 @@ public class AccumuloProxy {
return;
}
- public void attachIterator(ByteBuffer login, String tableName, IteratorSetting setting, Set<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, org.apache.thrift.TException
+ public void attachIterator(java.nio.ByteBuffer login, java.lang.String tableName, IteratorSetting setting, java.util.Set<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, org.apache.thrift.TException
{
send_attachIterator(login, tableName, setting, scopes);
recv_attachIterator();
}
- public void send_attachIterator(ByteBuffer login, String tableName, IteratorSetting setting, Set<IteratorScope> scopes) throws org.apache.thrift.TException
+ public void send_attachIterator(java.nio.ByteBuffer login, java.lang.String tableName, IteratorSetting setting, java.util.Set<IteratorScope> scopes) throws org.apache.thrift.TException
{
attachIterator_args args = new attachIterator_args();
args.setLogin(login);
@@ -605,13 +578,13 @@ public class AccumuloProxy {
return;
}
- public void checkIteratorConflicts(ByteBuffer login, String tableName, IteratorSetting setting, Set<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, org.apache.thrift.TException
+ public void checkIteratorConflicts(java.nio.ByteBuffer login, java.lang.String tableName, IteratorSetting setting, java.util.Set<IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, org.apache.thrift.TException
{
send_checkIteratorConflicts(login, tableName, setting, scopes);
recv_checkIteratorConflicts();
}
- public void send_checkIteratorConflicts(ByteBuffer login, String tableName, IteratorSetting setting, Set<IteratorScope> scopes) throws org.apache.thrift.TException
+ public void send_checkIteratorConflicts(java.nio.ByteBuffer login, java.lang.String tableName, IteratorSetting setting, java.util.Set<IteratorScope> scopes) throws org.apache.thr
<TRUNCATED>
[31/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java b/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java
index 949771e..6b8da94 100644
--- a/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java
+++ b/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.gc.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class GCMonitorService {
public interface Iface {
@@ -61,11 +34,11 @@ public class GCMonitorService {
public interface AsyncIface {
- public void getStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<GCStatus> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -130,17 +103,17 @@ public class GCMonitorService {
super(protocolFactory, clientManager, transport);
}
- public void getStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getStatus(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<GCStatus> resultHandler) throws org.apache.thrift.TException {
checkReady();
getStatus_call method_call = new getStatus_call(tinfo, credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall<GCStatus> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public getStatus_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, 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 getStatus_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<GCStatus> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.tinfo = tinfo;
this.credentials = credentials;
@@ -157,7 +130,7 @@ public class GCMonitorService {
public GCStatus getResult() throws org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException, 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);
@@ -168,16 +141,16 @@ public class GCMonitorService {
}
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("getStatus", new getStatus());
return processMap;
}
@@ -209,16 +182,16 @@ public class GCMonitorService {
}
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("getStatus", new getStatus());
return processMap;
}
@@ -232,41 +205,49 @@ public class GCMonitorService {
return new getStatus_args();
}
- public AsyncMethodCallback<GCStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<GCStatus> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<GCStatus>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<GCStatus>() {
public void onComplete(GCStatus o) {
getStatus_result result = new getStatus_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;
getStatus_result result = new getStatus_result();
if (e instanceof org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) {
- result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
- result.setSecIsSet(true);
- msg = result;
- }
- else
- {
+ result.sec = (org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException) e;
+ result.setSecIsSet(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();
}
};
}
@@ -275,7 +256,7 @@ public class GCMonitorService {
return false;
}
- public void start(I iface, getStatus_args args, org.apache.thrift.async.AsyncMethodCallback<GCStatus> resultHandler) throws TException {
+ public void start(I iface, getStatus_args args, org.apache.thrift.async.AsyncMethodCallback<GCStatus> resultHandler) throws org.apache.thrift.TException {
iface.getStatus(args.tinfo, args.credentials,resultHandler);
}
}
@@ -288,11 +269,8 @@ public class GCMonitorService {
private static final org.apache.thrift.protocol.TField TINFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tinfo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", 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 getStatus_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getStatus_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getStatus_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getStatus_argsTupleSchemeFactory();
public org.apache.accumulo.core.trace.thrift.TInfo tinfo; // required
public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required
@@ -302,10 +280,10 @@ public class GCMonitorService {
TINFO((short)2, "tinfo"),
CREDENTIALS((short)1, "credentials");
- 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);
}
}
@@ -330,21 +308,21 @@ public class GCMonitorService {
*/
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;
}
@@ -353,20 +331,20 @@ public class GCMonitorService {
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TINFO, new org.apache.thrift.meta_data.FieldMetaData("tinfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.trace.thrift.TInfo.class)));
tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.security.thrift.TCredentials.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_args.class, metaDataMap);
}
@@ -452,7 +430,7 @@ public class GCMonitorService {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TINFO:
if (value == null) {
@@ -473,7 +451,7 @@ public class GCMonitorService {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TINFO:
return getTinfo();
@@ -482,13 +460,13 @@ public class GCMonitorService {
return getCredentials();
}
- 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) {
@@ -497,11 +475,11 @@ public class GCMonitorService {
case CREDENTIALS:
return isSetCredentials();
}
- 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 getStatus_args)
@@ -512,6 +490,8 @@ public class GCMonitorService {
public boolean equals(getStatus_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tinfo = true && this.isSetTinfo();
boolean that_present_tinfo = true && that.isSetTinfo();
@@ -536,19 +516,17 @@ public class GCMonitorService {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tinfo = true && (isSetTinfo());
- list.add(present_tinfo);
- if (present_tinfo)
- list.add(tinfo);
+ hashCode = hashCode * 8191 + ((isSetTinfo()) ? 131071 : 524287);
+ if (isSetTinfo())
+ hashCode = hashCode * 8191 + tinfo.hashCode();
- boolean present_credentials = true && (isSetCredentials());
- list.add(present_credentials);
- if (present_credentials)
- list.add(credentials);
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -559,7 +537,7 @@ public class GCMonitorService {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTinfo()).compareTo(other.isSetTinfo());
+ lastComparison = java.lang.Boolean.valueOf(isSetTinfo()).compareTo(other.isSetTinfo());
if (lastComparison != 0) {
return lastComparison;
}
@@ -569,7 +547,7 @@ public class GCMonitorService {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
+ lastComparison = java.lang.Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
if (lastComparison != 0) {
return lastComparison;
}
@@ -587,16 +565,16 @@ public class GCMonitorService {
}
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("getStatus_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getStatus_args(");
boolean first = true;
sb.append("tinfo:");
@@ -637,7 +615,7 @@ public class GCMonitorService {
}
}
- 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) {
@@ -645,13 +623,13 @@ public class GCMonitorService {
}
}
- private static class getStatus_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getStatus_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getStatus_argsStandardScheme getScheme() {
return new getStatus_argsStandardScheme();
}
}
- private static class getStatus_argsStandardScheme extends StandardScheme<getStatus_args> {
+ private static class getStatus_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getStatus_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -712,18 +690,18 @@ public class GCMonitorService {
}
- private static class getStatus_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getStatus_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getStatus_argsTupleScheme getScheme() {
return new getStatus_argsTupleScheme();
}
}
- private static class getStatus_argsTupleScheme extends TupleScheme<getStatus_args> {
+ private static class getStatus_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getStatus_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTinfo()) {
optionals.set(0);
}
@@ -741,8 +719,8 @@ public class GCMonitorService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tinfo = new org.apache.accumulo.core.trace.thrift.TInfo();
struct.tinfo.read(iprot);
@@ -756,6 +734,9 @@ public class GCMonitorService {
}
}
+ 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 getStatus_result implements org.apache.thrift.TBase<getStatus_result, getStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getStatus_result> {
@@ -764,11 +745,8 @@ public class GCMonitorService {
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 SEC_FIELD_DESC = new org.apache.thrift.protocol.TField("sec", 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 getStatus_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getStatus_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getStatus_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getStatus_resultTupleSchemeFactory();
public GCStatus success; // required
public org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException sec; // required
@@ -778,10 +756,10 @@ public class GCMonitorService {
SUCCESS((short)0, "success"),
SEC((short)1, "sec");
- 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);
}
}
@@ -806,21 +784,21 @@ public class GCMonitorService {
*/
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;
}
@@ -829,20 +807,20 @@ public class GCMonitorService {
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, GCStatus.class)));
tmpMap.put(_Fields.SEC, new org.apache.thrift.meta_data.FieldMetaData("sec", 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, org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_result.class, metaDataMap);
}
@@ -928,7 +906,7 @@ public class GCMonitorService {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -949,7 +927,7 @@ public class GCMonitorService {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -958,13 +936,13 @@ public class GCMonitorService {
return getSec();
}
- 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) {
@@ -973,11 +951,11 @@ public class GCMonitorService {
case SEC:
return isSetSec();
}
- 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 getStatus_result)
@@ -988,6 +966,8 @@ public class GCMonitorService {
public boolean equals(getStatus_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -1012,19 +992,17 @@ public class GCMonitorService {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_sec = true && (isSetSec());
- list.add(present_sec);
- if (present_sec)
- list.add(sec);
+ hashCode = hashCode * 8191 + ((isSetSec()) ? 131071 : 524287);
+ if (isSetSec())
+ hashCode = hashCode * 8191 + sec.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1035,7 +1013,7 @@ public class GCMonitorService {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1045,7 +1023,7 @@ public class GCMonitorService {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSec()).compareTo(other.isSetSec());
+ lastComparison = java.lang.Boolean.valueOf(isSetSec()).compareTo(other.isSetSec());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1063,16 +1041,16 @@ public class GCMonitorService {
}
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("getStatus_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getStatus_result(");
boolean first = true;
sb.append("success:");
@@ -1110,7 +1088,7 @@ public class GCMonitorService {
}
}
- 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) {
@@ -1118,13 +1096,13 @@ public class GCMonitorService {
}
}
- private static class getStatus_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getStatus_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getStatus_resultStandardScheme getScheme() {
return new getStatus_resultStandardScheme();
}
}
- private static class getStatus_resultStandardScheme extends StandardScheme<getStatus_result> {
+ private static class getStatus_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getStatus_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1185,18 +1163,18 @@ public class GCMonitorService {
}
- private static class getStatus_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getStatus_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getStatus_resultTupleScheme getScheme() {
return new getStatus_resultTupleScheme();
}
}
- private static class getStatus_resultTupleScheme extends TupleScheme<getStatus_result> {
+ private static class getStatus_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getStatus_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -1214,8 +1192,8 @@ public class GCMonitorService {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_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 GCStatus();
struct.success.read(iprot);
@@ -1229,6 +1207,10 @@ public class GCMonitorService {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java b/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java
index 98bf9da..02012ce 100644
--- a/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java
+++ b/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.gc.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fields>, java.io.Serializable, Cloneable, Comparable<GCStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GCStatus");
@@ -59,11 +32,8 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
private static final org.apache.thrift.protocol.TField CURRENT_FIELD_DESC = new org.apache.thrift.protocol.TField("current", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField CURRENT_LOG_FIELD_DESC = new org.apache.thrift.protocol.TField("currentLog", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GCStatusStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GCStatusTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GCStatusStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GCStatusTupleSchemeFactory();
public GcCycleStats last; // required
public GcCycleStats lastLog; // required
@@ -77,10 +47,10 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
CURRENT((short)3, "current"),
CURRENT_LOG((short)4, "currentLog");
- 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);
}
}
@@ -109,21 +79,21 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
*/
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;
}
@@ -132,15 +102,15 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
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.LAST, new org.apache.thrift.meta_data.FieldMetaData("last", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GcCycleStats.class)));
tmpMap.put(_Fields.LAST_LOG, new org.apache.thrift.meta_data.FieldMetaData("lastLog", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -149,7 +119,7 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GcCycleStats.class)));
tmpMap.put(_Fields.CURRENT_LOG, new org.apache.thrift.meta_data.FieldMetaData("currentLog", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GcCycleStats.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GCStatus.class, metaDataMap);
}
@@ -295,7 +265,7 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case LAST:
if (value == null) {
@@ -332,7 +302,7 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LAST:
return getLast();
@@ -347,13 +317,13 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
return getCurrentLog();
}
- 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) {
@@ -366,11 +336,11 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
case CURRENT_LOG:
return isSetCurrentLog();
}
- 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 GCStatus)
@@ -381,6 +351,8 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
public boolean equals(GCStatus that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_last = true && this.isSetLast();
boolean that_present_last = true && that.isSetLast();
@@ -423,29 +395,25 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_last = true && (isSetLast());
- list.add(present_last);
- if (present_last)
- list.add(last);
+ hashCode = hashCode * 8191 + ((isSetLast()) ? 131071 : 524287);
+ if (isSetLast())
+ hashCode = hashCode * 8191 + last.hashCode();
- boolean present_lastLog = true && (isSetLastLog());
- list.add(present_lastLog);
- if (present_lastLog)
- list.add(lastLog);
+ hashCode = hashCode * 8191 + ((isSetLastLog()) ? 131071 : 524287);
+ if (isSetLastLog())
+ hashCode = hashCode * 8191 + lastLog.hashCode();
- boolean present_current = true && (isSetCurrent());
- list.add(present_current);
- if (present_current)
- list.add(current);
+ hashCode = hashCode * 8191 + ((isSetCurrent()) ? 131071 : 524287);
+ if (isSetCurrent())
+ hashCode = hashCode * 8191 + current.hashCode();
- boolean present_currentLog = true && (isSetCurrentLog());
- list.add(present_currentLog);
- if (present_currentLog)
- list.add(currentLog);
+ hashCode = hashCode * 8191 + ((isSetCurrentLog()) ? 131071 : 524287);
+ if (isSetCurrentLog())
+ hashCode = hashCode * 8191 + currentLog.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -456,7 +424,7 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLast()).compareTo(other.isSetLast());
+ lastComparison = java.lang.Boolean.valueOf(isSetLast()).compareTo(other.isSetLast());
if (lastComparison != 0) {
return lastComparison;
}
@@ -466,7 +434,7 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLastLog()).compareTo(other.isSetLastLog());
+ lastComparison = java.lang.Boolean.valueOf(isSetLastLog()).compareTo(other.isSetLastLog());
if (lastComparison != 0) {
return lastComparison;
}
@@ -476,7 +444,7 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCurrent()).compareTo(other.isSetCurrent());
+ lastComparison = java.lang.Boolean.valueOf(isSetCurrent()).compareTo(other.isSetCurrent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -486,7 +454,7 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCurrentLog()).compareTo(other.isSetCurrentLog());
+ lastComparison = java.lang.Boolean.valueOf(isSetCurrentLog()).compareTo(other.isSetCurrentLog());
if (lastComparison != 0) {
return lastComparison;
}
@@ -504,16 +472,16 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
}
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("GCStatus(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("GCStatus(");
boolean first = true;
sb.append("last:");
@@ -576,7 +544,7 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
}
}
- 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) {
@@ -584,13 +552,13 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
}
}
- private static class GCStatusStandardSchemeFactory implements SchemeFactory {
+ private static class GCStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GCStatusStandardScheme getScheme() {
return new GCStatusStandardScheme();
}
}
- private static class GCStatusStandardScheme extends StandardScheme<GCStatus> {
+ private static class GCStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<GCStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, GCStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -679,18 +647,18 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
}
- private static class GCStatusTupleSchemeFactory implements SchemeFactory {
+ private static class GCStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GCStatusTupleScheme getScheme() {
return new GCStatusTupleScheme();
}
}
- private static class GCStatusTupleScheme extends TupleScheme<GCStatus> {
+ private static class GCStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<GCStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GCStatus 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.isSetLast()) {
optionals.set(0);
}
@@ -720,8 +688,8 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GCStatus struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.last = new GcCycleStats();
struct.last.read(iprot);
@@ -745,5 +713,9 @@ public class GCStatus implements org.apache.thrift.TBase<GCStatus, GCStatus._Fie
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java b/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
index 339c2a1..b1eb415 100644
--- a/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
+++ b/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.gc.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCycleStats._Fields>, java.io.Serializable, Cloneable, Comparable<GcCycleStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GcCycleStats");
@@ -61,11 +34,8 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
private static final org.apache.thrift.protocol.TField DELETED_FIELD_DESC = new org.apache.thrift.protocol.TField("deleted", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField ERRORS_FIELD_DESC = new org.apache.thrift.protocol.TField("errors", org.apache.thrift.protocol.TType.I64, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new GcCycleStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GcCycleStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GcCycleStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GcCycleStatsTupleSchemeFactory();
public long started; // required
public long finished; // required
@@ -83,10 +53,10 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
DELETED((short)5, "deleted"),
ERRORS((short)6, "errors");
- 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);
}
}
@@ -119,21 +89,21 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
*/
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;
}
@@ -142,7 +112,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -155,9 +125,9 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
private static final int __DELETED_ISSET_ID = 4;
private static final int __ERRORS_ISSET_ID = 5;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STARTED, new org.apache.thrift.meta_data.FieldMetaData("started", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.FINISHED, new org.apache.thrift.meta_data.FieldMetaData("finished", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -170,7 +140,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.ERRORS, new org.apache.thrift.meta_data.FieldMetaData("errors", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GcCycleStats.class, metaDataMap);
}
@@ -244,16 +214,16 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
public void unsetStarted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTED_ISSET_ID);
}
/** Returns true if field started is set (has been assigned a value) and false otherwise */
public boolean isSetStarted() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTED_ISSET_ID);
}
public void setStartedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTED_ISSET_ID, value);
}
public long getFinished() {
@@ -267,16 +237,16 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
public void unsetFinished() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FINISHED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FINISHED_ISSET_ID);
}
/** Returns true if field finished is set (has been assigned a value) and false otherwise */
public boolean isSetFinished() {
- return EncodingUtils.testBit(__isset_bitfield, __FINISHED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FINISHED_ISSET_ID);
}
public void setFinishedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FINISHED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FINISHED_ISSET_ID, value);
}
public long getCandidates() {
@@ -290,16 +260,16 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
public void unsetCandidates() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CANDIDATES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CANDIDATES_ISSET_ID);
}
/** Returns true if field candidates is set (has been assigned a value) and false otherwise */
public boolean isSetCandidates() {
- return EncodingUtils.testBit(__isset_bitfield, __CANDIDATES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CANDIDATES_ISSET_ID);
}
public void setCandidatesIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CANDIDATES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CANDIDATES_ISSET_ID, value);
}
public long getInUse() {
@@ -313,16 +283,16 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
public void unsetInUse() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INUSE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INUSE_ISSET_ID);
}
/** Returns true if field inUse is set (has been assigned a value) and false otherwise */
public boolean isSetInUse() {
- return EncodingUtils.testBit(__isset_bitfield, __INUSE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INUSE_ISSET_ID);
}
public void setInUseIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INUSE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INUSE_ISSET_ID, value);
}
public long getDeleted() {
@@ -336,16 +306,16 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
public void unsetDeleted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DELETED_ISSET_ID);
}
/** Returns true if field deleted is set (has been assigned a value) and false otherwise */
public boolean isSetDeleted() {
- return EncodingUtils.testBit(__isset_bitfield, __DELETED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DELETED_ISSET_ID);
}
public void setDeletedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DELETED_ISSET_ID, value);
}
public long getErrors() {
@@ -359,25 +329,25 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
public void unsetErrors() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRORS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERRORS_ISSET_ID);
}
/** Returns true if field errors is set (has been assigned a value) and false otherwise */
public boolean isSetErrors() {
- return EncodingUtils.testBit(__isset_bitfield, __ERRORS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERRORS_ISSET_ID);
}
public void setErrorsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRORS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERRORS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case STARTED:
if (value == null) {
unsetStarted();
} else {
- setStarted((Long)value);
+ setStarted((java.lang.Long)value);
}
break;
@@ -385,7 +355,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
if (value == null) {
unsetFinished();
} else {
- setFinished((Long)value);
+ setFinished((java.lang.Long)value);
}
break;
@@ -393,7 +363,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
if (value == null) {
unsetCandidates();
} else {
- setCandidates((Long)value);
+ setCandidates((java.lang.Long)value);
}
break;
@@ -401,7 +371,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
if (value == null) {
unsetInUse();
} else {
- setInUse((Long)value);
+ setInUse((java.lang.Long)value);
}
break;
@@ -409,7 +379,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
if (value == null) {
unsetDeleted();
} else {
- setDeleted((Long)value);
+ setDeleted((java.lang.Long)value);
}
break;
@@ -417,14 +387,14 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
if (value == null) {
unsetErrors();
} else {
- setErrors((Long)value);
+ setErrors((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STARTED:
return getStarted();
@@ -445,13 +415,13 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
return getErrors();
}
- 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) {
@@ -468,11 +438,11 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
case ERRORS:
return isSetErrors();
}
- 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 GcCycleStats)
@@ -483,6 +453,8 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
public boolean equals(GcCycleStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_started = true;
boolean that_present_started = true;
@@ -543,39 +515,21 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_started = true;
- list.add(present_started);
- if (present_started)
- list.add(started);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(started);
- boolean present_finished = true;
- list.add(present_finished);
- if (present_finished)
- list.add(finished);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(finished);
- boolean present_candidates = true;
- list.add(present_candidates);
- if (present_candidates)
- list.add(candidates);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(candidates);
- boolean present_inUse = true;
- list.add(present_inUse);
- if (present_inUse)
- list.add(inUse);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(inUse);
- boolean present_deleted = true;
- list.add(present_deleted);
- if (present_deleted)
- list.add(deleted);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(deleted);
- boolean present_errors = true;
- list.add(present_errors);
- if (present_errors)
- list.add(errors);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(errors);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -586,7 +540,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetStarted()).compareTo(other.isSetStarted());
+ lastComparison = java.lang.Boolean.valueOf(isSetStarted()).compareTo(other.isSetStarted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -596,7 +550,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFinished()).compareTo(other.isSetFinished());
+ lastComparison = java.lang.Boolean.valueOf(isSetFinished()).compareTo(other.isSetFinished());
if (lastComparison != 0) {
return lastComparison;
}
@@ -606,7 +560,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCandidates()).compareTo(other.isSetCandidates());
+ lastComparison = java.lang.Boolean.valueOf(isSetCandidates()).compareTo(other.isSetCandidates());
if (lastComparison != 0) {
return lastComparison;
}
@@ -616,7 +570,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetInUse()).compareTo(other.isSetInUse());
+ lastComparison = java.lang.Boolean.valueOf(isSetInUse()).compareTo(other.isSetInUse());
if (lastComparison != 0) {
return lastComparison;
}
@@ -626,7 +580,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDeleted()).compareTo(other.isSetDeleted());
+ lastComparison = java.lang.Boolean.valueOf(isSetDeleted()).compareTo(other.isSetDeleted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -636,7 +590,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
+ lastComparison = java.lang.Boolean.valueOf(isSetErrors()).compareTo(other.isSetErrors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -654,16 +608,16 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
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("GcCycleStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("GcCycleStats(");
boolean first = true;
sb.append("started:");
@@ -706,7 +660,7 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -716,13 +670,13 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
}
- private static class GcCycleStatsStandardSchemeFactory implements SchemeFactory {
+ private static class GcCycleStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GcCycleStatsStandardScheme getScheme() {
return new GcCycleStatsStandardScheme();
}
}
- private static class GcCycleStatsStandardScheme extends StandardScheme<GcCycleStats> {
+ private static class GcCycleStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<GcCycleStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, GcCycleStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -821,18 +775,18 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
- private static class GcCycleStatsTupleSchemeFactory implements SchemeFactory {
+ private static class GcCycleStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GcCycleStatsTupleScheme getScheme() {
return new GcCycleStatsTupleScheme();
}
}
- private static class GcCycleStatsTupleScheme extends TupleScheme<GcCycleStats> {
+ private static class GcCycleStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<GcCycleStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GcCycleStats 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.isSetStarted()) {
optionals.set(0);
}
@@ -874,8 +828,8 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GcCycleStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.started = iprot.readI64();
struct.setStartedIsSet(true);
@@ -903,5 +857,9 @@ public class GcCycleStats implements org.apache.thrift.TBase<GcCycleStats, GcCyc
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
index a4f2efe..6a77ae8 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/BulkImportState.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.master.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum BulkImportState implements org.apache.thrift.TEnum {
+public enum BulkImportState implements org.apache.thrift.TEnum {
INITIAL(0),
MOVING(1),
PROCESSING(2),
[10/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Key.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Key.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Key.java
index 93237c5..d935c9a 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Key.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Key.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.Serializable, Cloneable, Comparable<Key> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Key");
@@ -60,16 +33,13 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
private static final org.apache.thrift.protocol.TField COL_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("colVisibility", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new KeyStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KeyTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KeyStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KeyTupleSchemeFactory();
- public ByteBuffer row; // required
- public ByteBuffer colFamily; // required
- public ByteBuffer colQualifier; // required
- public ByteBuffer colVisibility; // required
+ public java.nio.ByteBuffer row; // required
+ public java.nio.ByteBuffer colFamily; // required
+ public java.nio.ByteBuffer colQualifier; // required
+ public java.nio.ByteBuffer colVisibility; // required
public long timestamp; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -80,10 +50,10 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
COL_VISIBILITY((short)4, "colVisibility"),
TIMESTAMP((short)5, "timestamp");
- 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);
}
}
@@ -114,21 +84,21 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
*/
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;
}
@@ -137,7 +107,7 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -146,9 +116,9 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TIMESTAMP};
- 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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COL_FAMILY, new org.apache.thrift.meta_data.FieldMetaData("colFamily", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -159,7 +129,7 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Key.class, metaDataMap);
}
@@ -169,10 +139,10 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
}
public Key(
- ByteBuffer row,
- ByteBuffer colFamily,
- ByteBuffer colQualifier,
- ByteBuffer colVisibility)
+ java.nio.ByteBuffer row,
+ java.nio.ByteBuffer colFamily,
+ java.nio.ByteBuffer colQualifier,
+ java.nio.ByteBuffer colVisibility)
{
this();
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
@@ -220,16 +190,16 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return row == null ? null : row.array();
}
- public ByteBuffer bufferForRow() {
+ public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public Key setRow(byte[] row) {
- this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
+ this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
- public Key setRow(ByteBuffer row) {
+ public Key setRow(java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@@ -254,16 +224,16 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return colFamily == null ? null : colFamily.array();
}
- public ByteBuffer bufferForColFamily() {
+ public java.nio.ByteBuffer bufferForColFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(colFamily);
}
public Key setColFamily(byte[] colFamily) {
- this.colFamily = colFamily == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colFamily, colFamily.length));
+ this.colFamily = colFamily == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colFamily.clone());
return this;
}
- public Key setColFamily(ByteBuffer colFamily) {
+ public Key setColFamily(java.nio.ByteBuffer colFamily) {
this.colFamily = org.apache.thrift.TBaseHelper.copyBinary(colFamily);
return this;
}
@@ -288,16 +258,16 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return colQualifier == null ? null : colQualifier.array();
}
- public ByteBuffer bufferForColQualifier() {
+ public java.nio.ByteBuffer bufferForColQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
}
public Key setColQualifier(byte[] colQualifier) {
- this.colQualifier = colQualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colQualifier, colQualifier.length));
+ this.colQualifier = colQualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colQualifier.clone());
return this;
}
- public Key setColQualifier(ByteBuffer colQualifier) {
+ public Key setColQualifier(java.nio.ByteBuffer colQualifier) {
this.colQualifier = org.apache.thrift.TBaseHelper.copyBinary(colQualifier);
return this;
}
@@ -322,16 +292,16 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return colVisibility == null ? null : colVisibility.array();
}
- public ByteBuffer bufferForColVisibility() {
+ public java.nio.ByteBuffer bufferForColVisibility() {
return org.apache.thrift.TBaseHelper.copyBinary(colVisibility);
}
public Key setColVisibility(byte[] colVisibility) {
- this.colVisibility = colVisibility == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(colVisibility, colVisibility.length));
+ this.colVisibility = colVisibility == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(colVisibility.clone());
return this;
}
- public Key setColVisibility(ByteBuffer colVisibility) {
+ public Key setColVisibility(java.nio.ByteBuffer colVisibility) {
this.colVisibility = org.apache.thrift.TBaseHelper.copyBinary(colVisibility);
return this;
}
@@ -362,25 +332,29 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
}
public void unsetTimestamp() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
- return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
- setRow((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setRow((byte[])value);
+ } else {
+ setRow((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -388,7 +362,11 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
if (value == null) {
unsetColFamily();
} else {
- setColFamily((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColFamily((byte[])value);
+ } else {
+ setColFamily((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -396,7 +374,11 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
if (value == null) {
unsetColQualifier();
} else {
- setColQualifier((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColQualifier((byte[])value);
+ } else {
+ setColQualifier((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -404,7 +386,11 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
if (value == null) {
unsetColVisibility();
} else {
- setColVisibility((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColVisibility((byte[])value);
+ } else {
+ setColVisibility((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -412,14 +398,14 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
if (value == null) {
unsetTimestamp();
} else {
- setTimestamp((Long)value);
+ setTimestamp((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@@ -437,13 +423,13 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return getTimestamp();
}
- 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) {
@@ -458,11 +444,11 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
case TIMESTAMP:
return isSetTimestamp();
}
- 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 Key)
@@ -473,6 +459,8 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
public boolean equals(Key that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@@ -524,34 +512,29 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_row = true && (isSetRow());
- list.add(present_row);
- if (present_row)
- list.add(row);
+ hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
+ if (isSetRow())
+ hashCode = hashCode * 8191 + row.hashCode();
- boolean present_colFamily = true && (isSetColFamily());
- list.add(present_colFamily);
- if (present_colFamily)
- list.add(colFamily);
+ hashCode = hashCode * 8191 + ((isSetColFamily()) ? 131071 : 524287);
+ if (isSetColFamily())
+ hashCode = hashCode * 8191 + colFamily.hashCode();
- boolean present_colQualifier = true && (isSetColQualifier());
- list.add(present_colQualifier);
- if (present_colQualifier)
- list.add(colQualifier);
+ hashCode = hashCode * 8191 + ((isSetColQualifier()) ? 131071 : 524287);
+ if (isSetColQualifier())
+ hashCode = hashCode * 8191 + colQualifier.hashCode();
- boolean present_colVisibility = true && (isSetColVisibility());
- list.add(present_colVisibility);
- if (present_colVisibility)
- list.add(colVisibility);
+ hashCode = hashCode * 8191 + ((isSetColVisibility()) ? 131071 : 524287);
+ if (isSetColVisibility())
+ hashCode = hashCode * 8191 + colVisibility.hashCode();
- boolean present_timestamp = true && (isSetTimestamp());
- list.add(present_timestamp);
- if (present_timestamp)
- list.add(timestamp);
+ hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
+ if (isSetTimestamp())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -562,7 +545,7 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
+ lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@@ -572,7 +555,7 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
+ lastComparison = java.lang.Boolean.valueOf(isSetColFamily()).compareTo(other.isSetColFamily());
if (lastComparison != 0) {
return lastComparison;
}
@@ -582,7 +565,7 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetColQualifier()).compareTo(other.isSetColQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -592,7 +575,7 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColVisibility()).compareTo(other.isSetColVisibility());
+ lastComparison = java.lang.Boolean.valueOf(isSetColVisibility()).compareTo(other.isSetColVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@@ -602,7 +585,7 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
+ lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@@ -620,16 +603,16 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
}
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("Key(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Key(");
boolean first = true;
sb.append("row:");
@@ -686,7 +669,7 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -696,13 +679,13 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
}
}
- private static class KeyStandardSchemeFactory implements SchemeFactory {
+ private static class KeyStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyStandardScheme getScheme() {
return new KeyStandardScheme();
}
}
- private static class KeyStandardScheme extends StandardScheme<Key> {
+ private static class KeyStandardScheme extends org.apache.thrift.scheme.StandardScheme<Key> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Key struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -800,18 +783,18 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
}
- private static class KeyTupleSchemeFactory implements SchemeFactory {
+ private static class KeyTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyTupleScheme getScheme() {
return new KeyTupleScheme();
}
}
- private static class KeyTupleScheme extends TupleScheme<Key> {
+ private static class KeyTupleScheme extends org.apache.thrift.scheme.TupleScheme<Key> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Key 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.isSetRow()) {
optionals.set(0);
}
@@ -847,8 +830,8 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Key struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
@@ -872,5 +855,9 @@ public class Key implements org.apache.thrift.TBase<Key, Key._Fields>, java.io.S
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyExtent.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyExtent.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyExtent.java
index 09001c6..8df1b9e 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyExtent.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyExtent.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._Fields>, java.io.Serializable, Cloneable, Comparable<KeyExtent> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyExtent");
@@ -58,15 +31,12 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
private static final org.apache.thrift.protocol.TField END_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("endRow", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PREV_END_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("prevEndRow", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new KeyExtentStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KeyExtentTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KeyExtentStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KeyExtentTupleSchemeFactory();
- public String tableId; // required
- public ByteBuffer endRow; // required
- public ByteBuffer prevEndRow; // required
+ public java.lang.String tableId; // required
+ public java.nio.ByteBuffer endRow; // required
+ public java.nio.ByteBuffer prevEndRow; // 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 {
@@ -74,10 +44,10 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
END_ROW((short)2, "endRow"),
PREV_END_ROW((short)3, "prevEndRow");
- 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);
}
}
@@ -104,21 +74,21 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
*/
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;
}
@@ -127,22 +97,22 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
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.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tableId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.END_ROW, new org.apache.thrift.meta_data.FieldMetaData("endRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.PREV_END_ROW, new org.apache.thrift.meta_data.FieldMetaData("prevEndRow", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyExtent.class, metaDataMap);
}
@@ -150,9 +120,9 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
}
public KeyExtent(
- String tableId,
- ByteBuffer endRow,
- ByteBuffer prevEndRow)
+ java.lang.String tableId,
+ java.nio.ByteBuffer endRow,
+ java.nio.ByteBuffer prevEndRow)
{
this();
this.tableId = tableId;
@@ -186,11 +156,11 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
this.prevEndRow = null;
}
- public String getTableId() {
+ public java.lang.String getTableId() {
return this.tableId;
}
- public KeyExtent setTableId(String tableId) {
+ public KeyExtent setTableId(java.lang.String tableId) {
this.tableId = tableId;
return this;
}
@@ -215,16 +185,16 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
return endRow == null ? null : endRow.array();
}
- public ByteBuffer bufferForEndRow() {
+ public java.nio.ByteBuffer bufferForEndRow() {
return org.apache.thrift.TBaseHelper.copyBinary(endRow);
}
public KeyExtent setEndRow(byte[] endRow) {
- this.endRow = endRow == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(endRow, endRow.length));
+ this.endRow = endRow == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(endRow.clone());
return this;
}
- public KeyExtent setEndRow(ByteBuffer endRow) {
+ public KeyExtent setEndRow(java.nio.ByteBuffer endRow) {
this.endRow = org.apache.thrift.TBaseHelper.copyBinary(endRow);
return this;
}
@@ -249,16 +219,16 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
return prevEndRow == null ? null : prevEndRow.array();
}
- public ByteBuffer bufferForPrevEndRow() {
+ public java.nio.ByteBuffer bufferForPrevEndRow() {
return org.apache.thrift.TBaseHelper.copyBinary(prevEndRow);
}
public KeyExtent setPrevEndRow(byte[] prevEndRow) {
- this.prevEndRow = prevEndRow == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(prevEndRow, prevEndRow.length));
+ this.prevEndRow = prevEndRow == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(prevEndRow.clone());
return this;
}
- public KeyExtent setPrevEndRow(ByteBuffer prevEndRow) {
+ public KeyExtent setPrevEndRow(java.nio.ByteBuffer prevEndRow) {
this.prevEndRow = org.apache.thrift.TBaseHelper.copyBinary(prevEndRow);
return this;
}
@@ -278,13 +248,13 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TABLE_ID:
if (value == null) {
unsetTableId();
} else {
- setTableId((String)value);
+ setTableId((java.lang.String)value);
}
break;
@@ -292,7 +262,11 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
if (value == null) {
unsetEndRow();
} else {
- setEndRow((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setEndRow((byte[])value);
+ } else {
+ setEndRow((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -300,14 +274,18 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
if (value == null) {
unsetPrevEndRow();
} else {
- setPrevEndRow((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setPrevEndRow((byte[])value);
+ } else {
+ setPrevEndRow((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_ID:
return getTableId();
@@ -319,13 +297,13 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
return getPrevEndRow();
}
- 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) {
@@ -336,11 +314,11 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
case PREV_END_ROW:
return isSetPrevEndRow();
}
- 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 KeyExtent)
@@ -351,6 +329,8 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
public boolean equals(KeyExtent that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tableId = true && this.isSetTableId();
boolean that_present_tableId = true && that.isSetTableId();
@@ -384,24 +364,21 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tableId = true && (isSetTableId());
- list.add(present_tableId);
- if (present_tableId)
- list.add(tableId);
+ hashCode = hashCode * 8191 + ((isSetTableId()) ? 131071 : 524287);
+ if (isSetTableId())
+ hashCode = hashCode * 8191 + tableId.hashCode();
- boolean present_endRow = true && (isSetEndRow());
- list.add(present_endRow);
- if (present_endRow)
- list.add(endRow);
+ hashCode = hashCode * 8191 + ((isSetEndRow()) ? 131071 : 524287);
+ if (isSetEndRow())
+ hashCode = hashCode * 8191 + endRow.hashCode();
- boolean present_prevEndRow = true && (isSetPrevEndRow());
- list.add(present_prevEndRow);
- if (present_prevEndRow)
- list.add(prevEndRow);
+ hashCode = hashCode * 8191 + ((isSetPrevEndRow()) ? 131071 : 524287);
+ if (isSetPrevEndRow())
+ hashCode = hashCode * 8191 + prevEndRow.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -412,7 +389,7 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTableId()).compareTo(other.isSetTableId());
+ lastComparison = java.lang.Boolean.valueOf(isSetTableId()).compareTo(other.isSetTableId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -422,7 +399,7 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEndRow()).compareTo(other.isSetEndRow());
+ lastComparison = java.lang.Boolean.valueOf(isSetEndRow()).compareTo(other.isSetEndRow());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,7 +409,7 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPrevEndRow()).compareTo(other.isSetPrevEndRow());
+ lastComparison = java.lang.Boolean.valueOf(isSetPrevEndRow()).compareTo(other.isSetPrevEndRow());
if (lastComparison != 0) {
return lastComparison;
}
@@ -450,16 +427,16 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
}
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("KeyExtent(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("KeyExtent(");
boolean first = true;
sb.append("tableId:");
@@ -502,7 +479,7 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
}
}
- 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) {
@@ -510,13 +487,13 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
}
}
- private static class KeyExtentStandardSchemeFactory implements SchemeFactory {
+ private static class KeyExtentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyExtentStandardScheme getScheme() {
return new KeyExtentStandardScheme();
}
}
- private static class KeyExtentStandardScheme extends StandardScheme<KeyExtent> {
+ private static class KeyExtentStandardScheme extends org.apache.thrift.scheme.StandardScheme<KeyExtent> {
public void read(org.apache.thrift.protocol.TProtocol iprot, KeyExtent struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -588,18 +565,18 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
}
- private static class KeyExtentTupleSchemeFactory implements SchemeFactory {
+ private static class KeyExtentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyExtentTupleScheme getScheme() {
return new KeyExtentTupleScheme();
}
}
- private static class KeyExtentTupleScheme extends TupleScheme<KeyExtent> {
+ private static class KeyExtentTupleScheme extends org.apache.thrift.scheme.TupleScheme<KeyExtent> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyExtent 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.isSetTableId()) {
optionals.set(0);
}
@@ -623,8 +600,8 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyExtent 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.tableId = iprot.readString();
struct.setTableIdIsSet(true);
@@ -640,5 +617,9 @@ public class KeyExtent implements org.apache.thrift.TBase<KeyExtent, KeyExtent._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValue.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValue.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValue.java
index 480236c..0f87c09 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValue.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValue.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fields>, java.io.Serializable, Cloneable, Comparable<KeyValue> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyValue");
private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", 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 KeyValueStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KeyValueTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KeyValueStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KeyValueTupleSchemeFactory();
public Key key; // required
- public ByteBuffer value; // required
+ public java.nio.ByteBuffer value; // 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 {
KEY((short)1, "key"),
VALUE((short)2, "value");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,20 +92,20 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
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.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Key.class)));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyValue.class, metaDataMap);
}
@@ -144,7 +114,7 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
public KeyValue(
Key key,
- ByteBuffer value)
+ java.nio.ByteBuffer value)
{
this();
this.key = key;
@@ -202,16 +172,16 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
return value == null ? null : value.array();
}
- public ByteBuffer bufferForValue() {
+ public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public KeyValue setValue(byte[] value) {
- this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
+ this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
- public KeyValue setValue(ByteBuffer value) {
+ public KeyValue setValue(java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
@@ -231,7 +201,7 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case KEY:
if (value == null) {
@@ -245,14 +215,18 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
if (value == null) {
unsetValue();
} else {
- setValue((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setValue((byte[])value);
+ } else {
+ setValue((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case KEY:
return getKey();
@@ -261,13 +235,13 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
return getValue();
}
- 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) {
@@ -276,11 +250,11 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
case VALUE:
return isSetValue();
}
- 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 KeyValue)
@@ -291,6 +265,8 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
public boolean equals(KeyValue that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_key = true && this.isSetKey();
boolean that_present_key = true && that.isSetKey();
@@ -315,19 +291,17 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_key = true && (isSetKey());
- list.add(present_key);
- if (present_key)
- list.add(key);
+ hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287);
+ if (isSetKey())
+ hashCode = hashCode * 8191 + key.hashCode();
- boolean present_value = true && (isSetValue());
- list.add(present_value);
- if (present_value)
- list.add(value);
+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
+ if (isSetValue())
+ hashCode = hashCode * 8191 + value.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -338,7 +312,7 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
+ lastComparison = java.lang.Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
if (lastComparison != 0) {
return lastComparison;
}
@@ -348,7 +322,7 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -366,16 +340,16 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
}
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("KeyValue(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("KeyValue(");
boolean first = true;
sb.append("key:");
@@ -413,7 +387,7 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
}
}
- 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) {
@@ -421,13 +395,13 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
}
}
- private static class KeyValueStandardSchemeFactory implements SchemeFactory {
+ private static class KeyValueStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyValueStandardScheme getScheme() {
return new KeyValueStandardScheme();
}
}
- private static class KeyValueStandardScheme extends StandardScheme<KeyValue> {
+ private static class KeyValueStandardScheme extends org.apache.thrift.scheme.StandardScheme<KeyValue> {
public void read(org.apache.thrift.protocol.TProtocol iprot, KeyValue struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -487,18 +461,18 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
}
- private static class KeyValueTupleSchemeFactory implements SchemeFactory {
+ private static class KeyValueTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyValueTupleScheme getScheme() {
return new KeyValueTupleScheme();
}
}
- private static class KeyValueTupleScheme extends TupleScheme<KeyValue> {
+ private static class KeyValueTupleScheme extends org.apache.thrift.scheme.TupleScheme<KeyValue> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyValue 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.isSetKey()) {
optionals.set(0);
}
@@ -516,8 +490,8 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyValue 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.key = new Key();
struct.key.read(iprot);
@@ -530,5 +504,9 @@ public class KeyValue implements org.apache.thrift.TBase<KeyValue, KeyValue._Fie
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValueAndPeek.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValueAndPeek.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValueAndPeek.java
index 3bb4f13..2d121da 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValueAndPeek.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValueAndPeek.java
@@ -15,53 +15,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek, KeyValueAndPeek._Fields>, java.io.Serializable, Cloneable, Comparable<KeyValueAndPeek> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyValueAndPeek");
private static final org.apache.thrift.protocol.TField KEY_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("keyValue", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField HAS_NEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("hasNext", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new KeyValueAndPeekStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KeyValueAndPeekTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KeyValueAndPeekStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KeyValueAndPeekTupleSchemeFactory();
public KeyValue keyValue; // required
public boolean hasNext; // required
@@ -71,10 +41,10 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
KEY_VALUE((short)1, "keyValue"),
HAS_NEXT((short)2, "hasNext");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,14 +100,14 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
// isset id assignments
private static final int __HASNEXT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.KEY_VALUE, new org.apache.thrift.meta_data.FieldMetaData("keyValue", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, KeyValue.class)));
tmpMap.put(_Fields.HAS_NEXT, new org.apache.thrift.meta_data.FieldMetaData("hasNext", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyValueAndPeek.class, metaDataMap);
}
@@ -211,19 +181,19 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
}
public void unsetHasNext() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASNEXT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASNEXT_ISSET_ID);
}
/** Returns true if field hasNext is set (has been assigned a value) and false otherwise */
public boolean isSetHasNext() {
- return EncodingUtils.testBit(__isset_bitfield, __HASNEXT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASNEXT_ISSET_ID);
}
public void setHasNextIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASNEXT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASNEXT_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case KEY_VALUE:
if (value == null) {
@@ -237,14 +207,14 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
if (value == null) {
unsetHasNext();
} else {
- setHasNext((Boolean)value);
+ setHasNext((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case KEY_VALUE:
return getKeyValue();
@@ -253,13 +223,13 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
return isHasNext();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -268,11 +238,11 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
case HAS_NEXT:
return isSetHasNext();
}
- 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 KeyValueAndPeek)
@@ -283,6 +253,8 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
public boolean equals(KeyValueAndPeek that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_keyValue = true && this.isSetKeyValue();
boolean that_present_keyValue = true && that.isSetKeyValue();
@@ -307,19 +279,15 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_keyValue = true && (isSetKeyValue());
- list.add(present_keyValue);
- if (present_keyValue)
- list.add(keyValue);
+ hashCode = hashCode * 8191 + ((isSetKeyValue()) ? 131071 : 524287);
+ if (isSetKeyValue())
+ hashCode = hashCode * 8191 + keyValue.hashCode();
- boolean present_hasNext = true;
- list.add(present_hasNext);
- if (present_hasNext)
- list.add(hasNext);
+ hashCode = hashCode * 8191 + ((hasNext) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -330,7 +298,7 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetKeyValue()).compareTo(other.isSetKeyValue());
+ lastComparison = java.lang.Boolean.valueOf(isSetKeyValue()).compareTo(other.isSetKeyValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -340,7 +308,7 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHasNext()).compareTo(other.isSetHasNext());
+ lastComparison = java.lang.Boolean.valueOf(isSetHasNext()).compareTo(other.isSetHasNext());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,16 +326,16 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
}
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("KeyValueAndPeek(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("KeyValueAndPeek(");
boolean first = true;
sb.append("keyValue:");
@@ -401,7 +369,7 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -411,13 +379,13 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
}
}
- private static class KeyValueAndPeekStandardSchemeFactory implements SchemeFactory {
+ private static class KeyValueAndPeekStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyValueAndPeekStandardScheme getScheme() {
return new KeyValueAndPeekStandardScheme();
}
}
- private static class KeyValueAndPeekStandardScheme extends StandardScheme<KeyValueAndPeek> {
+ private static class KeyValueAndPeekStandardScheme extends org.apache.thrift.scheme.StandardScheme<KeyValueAndPeek> {
public void read(org.apache.thrift.protocol.TProtocol iprot, KeyValueAndPeek struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -475,18 +443,18 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
}
- private static class KeyValueAndPeekTupleSchemeFactory implements SchemeFactory {
+ private static class KeyValueAndPeekTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyValueAndPeekTupleScheme getScheme() {
return new KeyValueAndPeekTupleScheme();
}
}
- private static class KeyValueAndPeekTupleScheme extends TupleScheme<KeyValueAndPeek> {
+ private static class KeyValueAndPeekTupleScheme extends org.apache.thrift.scheme.TupleScheme<KeyValueAndPeek> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyValueAndPeek 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.isSetKeyValue()) {
optionals.set(0);
}
@@ -504,8 +472,8 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyValueAndPeek 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.keyValue = new KeyValue();
struct.keyValue.read(iprot);
@@ -518,5 +486,9 @@ public class KeyValueAndPeek implements org.apache.thrift.TBase<KeyValueAndPeek,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/MutationsRejectedException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/MutationsRejectedException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/MutationsRejectedException.java
index db5b6c4..c1532ba 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/MutationsRejectedException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/MutationsRejectedException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class MutationsRejectedException extends TException implements org.apache.thrift.TBase<MutationsRejectedException, MutationsRejectedException._Fields>, java.io.Serializable, Cloneable, Comparable<MutationsRejectedException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class MutationsRejectedException extends org.apache.thrift.TException implements org.apache.thrift.TBase<MutationsRejectedException, MutationsRejectedException._Fields>, java.io.Serializable, Cloneable, Comparable<MutationsRejectedException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MutationsRejectedException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new MutationsRejectedExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new MutationsRejectedExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MutationsRejectedExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MutationsRejectedExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class MutationsRejectedException extends TException implements org.apache
*/
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;
}
@@ -117,18 +87,18 @@ public class MutationsRejectedException extends TException implements org.apache
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.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MutationsRejectedException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class MutationsRejectedException extends TException implements org.apache
}
public MutationsRejectedException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class MutationsRejectedException extends TException implements org.apache
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public MutationsRejectedException setMsg(String msg) {
+ public MutationsRejectedException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class MutationsRejectedException extends TException implements org.apache
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof MutationsRejectedException)
@@ -231,6 +201,8 @@ public class MutationsRejectedException extends TException implements org.apache
public boolean equals(MutationsRejectedException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class MutationsRejectedException extends TException implements org.apache
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class MutationsRejectedException extends TException implements org.apache
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class MutationsRejectedException extends TException implements org.apache
}
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("MutationsRejectedException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("MutationsRejectedException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class MutationsRejectedException extends TException implements org.apache
}
}
- 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) {
@@ -326,13 +297,13 @@ public class MutationsRejectedException extends TException implements org.apache
}
}
- private static class MutationsRejectedExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class MutationsRejectedExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MutationsRejectedExceptionStandardScheme getScheme() {
return new MutationsRejectedExceptionStandardScheme();
}
}
- private static class MutationsRejectedExceptionStandardScheme extends StandardScheme<MutationsRejectedException> {
+ private static class MutationsRejectedExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<MutationsRejectedException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, MutationsRejectedException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class MutationsRejectedException extends TException implements org.apache
}
- private static class MutationsRejectedExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class MutationsRejectedExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MutationsRejectedExceptionTupleScheme getScheme() {
return new MutationsRejectedExceptionTupleScheme();
}
}
- private static class MutationsRejectedExceptionTupleScheme extends TupleScheme<MutationsRejectedException> {
+ private static class MutationsRejectedExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<MutationsRejectedException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MutationsRejectedException 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.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class MutationsRejectedException extends TException implements org.apache
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MutationsRejectedException 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.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class MutationsRejectedException extends TException implements org.apache
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[25/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
index 48d4465..ace2df8 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletSplit._Fields>, java.io.Serializable, Cloneable, Comparable<TabletSplit> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletSplit");
private static final org.apache.thrift.protocol.TField OLD_TABLET_FIELD_DESC = new org.apache.thrift.protocol.TField("oldTablet", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField NEW_TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("newTablets", org.apache.thrift.protocol.TType.LIST, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TabletSplitStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TabletSplitTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TabletSplitStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TabletSplitTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent oldTablet; // required
- public List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets; // required
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets; // 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 {
OLD_TABLET((short)1, "oldTablet"),
NEW_TABLETS((short)2, "newTablets");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,21 +92,21 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
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.OLD_TABLET, new org.apache.thrift.meta_data.FieldMetaData("oldTablet", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
tmpMap.put(_Fields.NEW_TABLETS, new org.apache.thrift.meta_data.FieldMetaData("newTablets", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TabletSplit.class, metaDataMap);
}
@@ -145,7 +115,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
public TabletSplit(
org.apache.accumulo.core.data.thrift.TKeyExtent oldTablet,
- List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets)
+ java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets)
{
this();
this.oldTablet = oldTablet;
@@ -160,7 +130,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
this.oldTablet = new org.apache.accumulo.core.data.thrift.TKeyExtent(other.oldTablet);
}
if (other.isSetNewTablets()) {
- List<org.apache.accumulo.core.data.thrift.TKeyExtent> __this__newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(other.newTablets.size());
+ java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> __this__newTablets = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(other.newTablets.size());
for (org.apache.accumulo.core.data.thrift.TKeyExtent other_element : other.newTablets) {
__this__newTablets.add(new org.apache.accumulo.core.data.thrift.TKeyExtent(other_element));
}
@@ -212,16 +182,16 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
public void addToNewTablets(org.apache.accumulo.core.data.thrift.TKeyExtent elem) {
if (this.newTablets == null) {
- this.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>();
+ this.newTablets = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>();
}
this.newTablets.add(elem);
}
- public List<org.apache.accumulo.core.data.thrift.TKeyExtent> getNewTablets() {
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> getNewTablets() {
return this.newTablets;
}
- public TabletSplit setNewTablets(List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets) {
+ public TabletSplit setNewTablets(java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets) {
this.newTablets = newTablets;
return this;
}
@@ -241,7 +211,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case OLD_TABLET:
if (value == null) {
@@ -255,14 +225,14 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
if (value == null) {
unsetNewTablets();
} else {
- setNewTablets((List<org.apache.accumulo.core.data.thrift.TKeyExtent>)value);
+ setNewTablets((java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case OLD_TABLET:
return getOldTablet();
@@ -271,13 +241,13 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
return getNewTablets();
}
- 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) {
@@ -286,11 +256,11 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
case NEW_TABLETS:
return isSetNewTablets();
}
- 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 TabletSplit)
@@ -301,6 +271,8 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
public boolean equals(TabletSplit that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_oldTablet = true && this.isSetOldTablet();
boolean that_present_oldTablet = true && that.isSetOldTablet();
@@ -325,19 +297,17 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_oldTablet = true && (isSetOldTablet());
- list.add(present_oldTablet);
- if (present_oldTablet)
- list.add(oldTablet);
+ hashCode = hashCode * 8191 + ((isSetOldTablet()) ? 131071 : 524287);
+ if (isSetOldTablet())
+ hashCode = hashCode * 8191 + oldTablet.hashCode();
- boolean present_newTablets = true && (isSetNewTablets());
- list.add(present_newTablets);
- if (present_newTablets)
- list.add(newTablets);
+ hashCode = hashCode * 8191 + ((isSetNewTablets()) ? 131071 : 524287);
+ if (isSetNewTablets())
+ hashCode = hashCode * 8191 + newTablets.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -348,7 +318,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetOldTablet()).compareTo(other.isSetOldTablet());
+ lastComparison = java.lang.Boolean.valueOf(isSetOldTablet()).compareTo(other.isSetOldTablet());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,7 +328,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNewTablets()).compareTo(other.isSetNewTablets());
+ lastComparison = java.lang.Boolean.valueOf(isSetNewTablets()).compareTo(other.isSetNewTablets());
if (lastComparison != 0) {
return lastComparison;
}
@@ -376,16 +346,16 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
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("TabletSplit(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TabletSplit(");
boolean first = true;
sb.append("oldTablet:");
@@ -423,7 +393,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
}
- 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) {
@@ -431,13 +401,13 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
}
- private static class TabletSplitStandardSchemeFactory implements SchemeFactory {
+ private static class TabletSplitStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletSplitStandardScheme getScheme() {
return new TabletSplitStandardScheme();
}
}
- private static class TabletSplitStandardScheme extends StandardScheme<TabletSplit> {
+ private static class TabletSplitStandardScheme extends org.apache.thrift.scheme.StandardScheme<TabletSplit> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TabletSplit struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -462,7 +432,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
- struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list78.size);
+ struct.newTablets = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list78.size);
org.apache.accumulo.core.data.thrift.TKeyExtent _elem79;
for (int _i80 = 0; _i80 < _list78.size; ++_i80)
{
@@ -515,18 +485,18 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
- private static class TabletSplitTupleSchemeFactory implements SchemeFactory {
+ private static class TabletSplitTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletSplitTupleScheme getScheme() {
return new TabletSplitTupleScheme();
}
}
- private static class TabletSplitTupleScheme extends TupleScheme<TabletSplit> {
+ private static class TabletSplitTupleScheme extends org.apache.thrift.scheme.TupleScheme<TabletSplit> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TabletSplit 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.isSetOldTablet()) {
optionals.set(0);
}
@@ -550,8 +520,8 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TabletSplit 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.oldTablet = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.oldTablet.read(iprot);
@@ -560,7 +530,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list83.size);
+ struct.newTablets = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list83.size);
org.apache.accumulo.core.data.thrift.TKeyExtent _elem84;
for (int _i85 = 0; _i85 < _list83.size; ++_i85)
{
@@ -574,5 +544,9 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java
index dd70af1..4a1aa09 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.replication.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._Fields>, java.io.Serializable, Cloneable, Comparable<KeyValues> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyValues");
private static final org.apache.thrift.protocol.TField KEY_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("keyValues", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new KeyValuesStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KeyValuesTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KeyValuesStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KeyValuesTupleSchemeFactory();
- public List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues; // required
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues; // 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 {
KEY_VALUES((short)1, "keyValues");
- 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);
}
}
@@ -94,21 +64,21 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
*/
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;
}
@@ -117,19 +87,19 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
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.KEY_VALUES, new org.apache.thrift.meta_data.FieldMetaData("keyValues", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyValue.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyValues.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
public KeyValues(
- List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues)
+ java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues)
{
this();
this.keyValues = keyValues;
@@ -148,7 +118,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
*/
public KeyValues(KeyValues other) {
if (other.isSetKeyValues()) {
- List<org.apache.accumulo.core.data.thrift.TKeyValue> __this__keyValues = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(other.keyValues.size());
+ java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> __this__keyValues = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(other.keyValues.size());
for (org.apache.accumulo.core.data.thrift.TKeyValue other_element : other.keyValues) {
__this__keyValues.add(new org.apache.accumulo.core.data.thrift.TKeyValue(other_element));
}
@@ -175,16 +145,16 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
public void addToKeyValues(org.apache.accumulo.core.data.thrift.TKeyValue elem) {
if (this.keyValues == null) {
- this.keyValues = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>();
+ this.keyValues = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>();
}
this.keyValues.add(elem);
}
- public List<org.apache.accumulo.core.data.thrift.TKeyValue> getKeyValues() {
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> getKeyValues() {
return this.keyValues;
}
- public KeyValues setKeyValues(List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues) {
+ public KeyValues setKeyValues(java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues) {
this.keyValues = keyValues;
return this;
}
@@ -204,43 +174,43 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case KEY_VALUES:
if (value == null) {
unsetKeyValues();
} else {
- setKeyValues((List<org.apache.accumulo.core.data.thrift.TKeyValue>)value);
+ setKeyValues((java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case KEY_VALUES:
return getKeyValues();
}
- 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 KEY_VALUES:
return isSetKeyValues();
}
- 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 KeyValues)
@@ -251,6 +221,8 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
public boolean equals(KeyValues that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_keyValues = true && this.isSetKeyValues();
boolean that_present_keyValues = true && that.isSetKeyValues();
@@ -266,14 +238,13 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_keyValues = true && (isSetKeyValues());
- list.add(present_keyValues);
- if (present_keyValues)
- list.add(keyValues);
+ hashCode = hashCode * 8191 + ((isSetKeyValues()) ? 131071 : 524287);
+ if (isSetKeyValues())
+ hashCode = hashCode * 8191 + keyValues.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -284,7 +255,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetKeyValues()).compareTo(other.isSetKeyValues());
+ lastComparison = java.lang.Boolean.valueOf(isSetKeyValues()).compareTo(other.isSetKeyValues());
if (lastComparison != 0) {
return lastComparison;
}
@@ -302,16 +273,16 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
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("KeyValues(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("KeyValues(");
boolean first = true;
sb.append("keyValues:");
@@ -338,7 +309,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
}
- 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) {
@@ -346,13 +317,13 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
}
- private static class KeyValuesStandardSchemeFactory implements SchemeFactory {
+ private static class KeyValuesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyValuesStandardScheme getScheme() {
return new KeyValuesStandardScheme();
}
}
- private static class KeyValuesStandardScheme extends StandardScheme<KeyValues> {
+ private static class KeyValuesStandardScheme extends org.apache.thrift.scheme.StandardScheme<KeyValues> {
public void read(org.apache.thrift.protocol.TProtocol iprot, KeyValues struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -368,7 +339,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.keyValues = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(_list8.size);
+ struct.keyValues = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(_list8.size);
org.apache.accumulo.core.data.thrift.TKeyValue _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
@@ -416,18 +387,18 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
- private static class KeyValuesTupleSchemeFactory implements SchemeFactory {
+ private static class KeyValuesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyValuesTupleScheme getScheme() {
return new KeyValuesTupleScheme();
}
}
- private static class KeyValuesTupleScheme extends TupleScheme<KeyValues> {
+ private static class KeyValuesTupleScheme extends org.apache.thrift.scheme.TupleScheme<KeyValues> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyValues 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.isSetKeyValues()) {
optionals.set(0);
}
@@ -445,12 +416,12 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyValues 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)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.keyValues = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(_list13.size);
+ struct.keyValues = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(_list13.size);
org.apache.accumulo.core.data.thrift.TKeyValue _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
@@ -464,5 +435,9 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
index 2ec6a15..464b3e6 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.replication.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum RemoteReplicationErrorCode implements org.apache.thrift.TEnum {
+public enum RemoteReplicationErrorCode implements org.apache.thrift.TEnum {
COULD_NOT_DESERIALIZE(0),
COULD_NOT_APPLY(1),
TABLE_DOES_NOT_EXIST(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
index 5b4a9d1..db22b3e 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
@@ -15,60 +15,30 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.replication.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class RemoteReplicationException extends TException implements org.apache.thrift.TBase<RemoteReplicationException, RemoteReplicationException._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteReplicationException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class RemoteReplicationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<RemoteReplicationException, RemoteReplicationException._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteReplicationException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteReplicationException");
private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", 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 RemoteReplicationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new RemoteReplicationExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RemoteReplicationExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RemoteReplicationExceptionTupleSchemeFactory();
/**
*
* @see RemoteReplicationErrorCode
*/
public RemoteReplicationErrorCode code; // required
- public String reason; // required
+ public java.lang.String reason; // 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 {
@@ -79,10 +49,10 @@ public class RemoteReplicationException extends TException implements org.apache
CODE((short)1, "code"),
REASON((short)2, "reason");
- 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);
}
}
@@ -107,21 +77,21 @@ public class RemoteReplicationException extends TException implements org.apache
*/
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;
}
@@ -130,20 +100,20 @@ public class RemoteReplicationException extends TException implements org.apache
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.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RemoteReplicationErrorCode.class)));
tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", 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(RemoteReplicationException.class, metaDataMap);
}
@@ -152,7 +122,7 @@ public class RemoteReplicationException extends TException implements org.apache
public RemoteReplicationException(
RemoteReplicationErrorCode code,
- String reason)
+ java.lang.String reason)
{
this();
this.code = code;
@@ -213,11 +183,11 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
- public String getReason() {
+ public java.lang.String getReason() {
return this.reason;
}
- public RemoteReplicationException setReason(String reason) {
+ public RemoteReplicationException setReason(java.lang.String reason) {
this.reason = reason;
return this;
}
@@ -237,7 +207,7 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CODE:
if (value == null) {
@@ -251,14 +221,14 @@ public class RemoteReplicationException extends TException implements org.apache
if (value == null) {
unsetReason();
} else {
- setReason((String)value);
+ setReason((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CODE:
return getCode();
@@ -267,13 +237,13 @@ public class RemoteReplicationException extends TException implements org.apache
return getReason();
}
- 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) {
@@ -282,11 +252,11 @@ public class RemoteReplicationException extends TException implements org.apache
case REASON:
return isSetReason();
}
- 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 RemoteReplicationException)
@@ -297,6 +267,8 @@ public class RemoteReplicationException extends TException implements org.apache
public boolean equals(RemoteReplicationException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_code = true && this.isSetCode();
boolean that_present_code = true && that.isSetCode();
@@ -321,19 +293,17 @@ public class RemoteReplicationException extends TException implements org.apache
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_code = true && (isSetCode());
- list.add(present_code);
- if (present_code)
- list.add(code.getValue());
+ hashCode = hashCode * 8191 + ((isSetCode()) ? 131071 : 524287);
+ if (isSetCode())
+ hashCode = hashCode * 8191 + code.getValue();
- boolean present_reason = true && (isSetReason());
- list.add(present_reason);
- if (present_reason)
- list.add(reason);
+ hashCode = hashCode * 8191 + ((isSetReason()) ? 131071 : 524287);
+ if (isSetReason())
+ hashCode = hashCode * 8191 + reason.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -344,7 +314,7 @@ public class RemoteReplicationException extends TException implements org.apache
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
+ lastComparison = java.lang.Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
if (lastComparison != 0) {
return lastComparison;
}
@@ -354,7 +324,7 @@ public class RemoteReplicationException extends TException implements org.apache
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
+ lastComparison = java.lang.Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
if (lastComparison != 0) {
return lastComparison;
}
@@ -372,16 +342,16 @@ public class RemoteReplicationException extends TException implements org.apache
}
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("RemoteReplicationException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("RemoteReplicationException(");
boolean first = true;
sb.append("code:");
@@ -416,7 +386,7 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
- 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) {
@@ -424,13 +394,13 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
- private static class RemoteReplicationExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class RemoteReplicationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RemoteReplicationExceptionStandardScheme getScheme() {
return new RemoteReplicationExceptionStandardScheme();
}
}
- private static class RemoteReplicationExceptionStandardScheme extends StandardScheme<RemoteReplicationException> {
+ private static class RemoteReplicationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<RemoteReplicationException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteReplicationException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -489,18 +459,18 @@ public class RemoteReplicationException extends TException implements org.apache
}
- private static class RemoteReplicationExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class RemoteReplicationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RemoteReplicationExceptionTupleScheme getScheme() {
return new RemoteReplicationExceptionTupleScheme();
}
}
- private static class RemoteReplicationExceptionTupleScheme extends TupleScheme<RemoteReplicationException> {
+ private static class RemoteReplicationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<RemoteReplicationException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RemoteReplicationException 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.isSetCode()) {
optionals.set(0);
}
@@ -518,8 +488,8 @@ public class RemoteReplicationException extends TException implements org.apache
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RemoteReplicationException 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.code = org.apache.accumulo.core.replication.thrift.RemoteReplicationErrorCode.findByValue(iprot.readI32());
struct.setCodeIsSet(true);
@@ -531,5 +501,9 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[39/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ClientService.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ClientService.java b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ClientService.java
index 0df0107..af65874 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ClientService.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ClientService.java
@@ -15,173 +15,146 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.client.impl.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ClientService {
public interface Iface {
- public String getRootTabletLocation() throws org.apache.thrift.TException;
+ public java.lang.String getRootTabletLocation() throws org.apache.thrift.TException;
- public String getInstanceId() throws org.apache.thrift.TException;
+ public java.lang.String getInstanceId() throws org.apache.thrift.TException;
- public String getZooKeepers() throws org.apache.thrift.TException;
+ public java.lang.String getZooKeepers() throws org.apache.thrift.TException;
- public List<String> bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, String tableId, List<String> files, String errorDir, boolean setTime) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public java.util.List<java.lang.String> bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.lang.String tableId, java.util.List<java.lang.String> files, java.lang.String errorDir, boolean setTime) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
public boolean isActive(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long tid) throws org.apache.thrift.TException;
public void ping(org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, org.apache.thrift.TException;
- public List<TDiskUsage> getDiskUsage(Set<String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public java.util.List<TDiskUsage> getDiskUsage(java.util.Set<java.lang.String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
- public Set<String> listLocalUsers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, org.apache.thrift.TException;
+ public java.util.Set<java.lang.String> listLocalUsers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, org.apache.thrift.TException;
- public void createLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, ByteBuffer password) throws ThriftSecurityException, org.apache.thrift.TException;
+ public void createLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.nio.ByteBuffer password) throws ThriftSecurityException, org.apache.thrift.TException;
- public void dropLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal) throws ThriftSecurityException, org.apache.thrift.TException;
+ public void dropLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal) throws ThriftSecurityException, org.apache.thrift.TException;
- public void changeLocalUserPassword(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, ByteBuffer password) throws ThriftSecurityException, org.apache.thrift.TException;
+ public void changeLocalUserPassword(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.nio.ByteBuffer password) throws ThriftSecurityException, org.apache.thrift.TException;
public boolean authenticate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, org.apache.thrift.TException;
public boolean authenticateUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.security.thrift.TCredentials toAuth) throws ThriftSecurityException, org.apache.thrift.TException;
- public void changeAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, List<ByteBuffer> authorizations) throws ThriftSecurityException, org.apache.thrift.TException;
+ public void changeAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.util.List<java.nio.ByteBuffer> authorizations) throws ThriftSecurityException, org.apache.thrift.TException;
- public List<ByteBuffer> getUserAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal) throws ThriftSecurityException, org.apache.thrift.TException;
+ public java.util.List<java.nio.ByteBuffer> getUserAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal) throws ThriftSecurityException, org.apache.thrift.TException;
- public boolean hasSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte sysPerm) throws ThriftSecurityException, org.apache.thrift.TException;
+ public boolean hasSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte sysPerm) throws ThriftSecurityException, org.apache.thrift.TException;
- public boolean hasTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte tblPerm) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public boolean hasTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte tblPerm) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
- public boolean hasNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte tblNspcPerm) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public boolean hasNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte tblNspcPerm) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
- public void grantSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte permission) throws ThriftSecurityException, org.apache.thrift.TException;
+ public void grantSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte permission) throws ThriftSecurityException, org.apache.thrift.TException;
- public void revokeSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte permission) throws ThriftSecurityException, org.apache.thrift.TException;
+ public void revokeSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte permission) throws ThriftSecurityException, org.apache.thrift.TException;
- public void grantTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public void grantTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
- public void revokeTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public void revokeTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
- public void grantNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public void grantNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
- public void revokeNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public void revokeNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
- public Map<String,String> getConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, ConfigurationType type) throws org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> getConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, ConfigurationType type) throws org.apache.thrift.TException;
- public Map<String,String> getTableConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName) throws ThriftTableOperationException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> getTableConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName) throws ThriftTableOperationException, org.apache.thrift.TException;
- public Map<String,String> getNamespaceConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns) throws ThriftTableOperationException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,java.lang.String> getNamespaceConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns) throws ThriftTableOperationException, org.apache.thrift.TException;
- public boolean checkClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String className, String interfaceMatch) throws org.apache.thrift.TException;
+ public boolean checkClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String className, java.lang.String interfaceMatch) throws org.apache.thrift.TException;
- public boolean checkTableClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableId, String className, String interfaceMatch) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public boolean checkTableClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableId, java.lang.String className, java.lang.String interfaceMatch) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
- public boolean checkNamespaceClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String namespaceId, String className, String interfaceMatch) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
+ public boolean checkNamespaceClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String namespaceId, java.lang.String className, java.lang.String interfaceMatch) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void getRootTabletLocation(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getRootTabletLocation(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void getInstanceId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getInstanceId(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void getZooKeepers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getZooKeepers(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, String tableId, List<String> files, String errorDir, boolean setTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.lang.String tableId, java.util.List<java.lang.String> files, java.lang.String errorDir, boolean setTime, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void isActive(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long tid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void isActive(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long tid, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void ping(org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void ping(org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getDiskUsage(Set<String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getDiskUsage(java.util.Set<java.lang.String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDiskUsage>> resultHandler) throws org.apache.thrift.TException;
- public void listLocalUsers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void listLocalUsers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.Set<java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void createLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, ByteBuffer password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.nio.ByteBuffer password, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void dropLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void dropLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void changeLocalUserPassword(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, ByteBuffer password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void changeLocalUserPassword(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.nio.ByteBuffer password, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void authenticate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void authenticate(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void authenticateUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.security.thrift.TCredentials toAuth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void authenticateUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.accumulo.core.security.thrift.TCredentials toAuth, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void changeAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, List<ByteBuffer> authorizations, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void changeAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.util.List<java.nio.ByteBuffer> authorizations, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getUserAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getUserAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.nio.ByteBuffer>> resultHandler) throws org.apache.thrift.TException;
- public void hasSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte sysPerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void hasSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte sysPerm, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void hasTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte tblPerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void hasTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte tblPerm, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void hasNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte tblNspcPerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void hasNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte tblNspcPerm, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void grantSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte permission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void grantSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte permission, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void revokeSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte permission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void revokeSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte permission, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void grantTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte permission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void grantTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte permission, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void revokeTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte permission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void revokeTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte permission, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void grantNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte permission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void grantNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte permission, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void revokeNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte permission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void revokeNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte permission, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, ConfigurationType type, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, ConfigurationType type, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void getTableConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTableConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void getNamespaceConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getNamespaceConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
- public void checkClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String className, String interfaceMatch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void checkClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String className, java.lang.String interfaceMatch, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void checkTableClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableId, String className, String interfaceMatch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void checkTableClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableId, java.lang.String className, java.lang.String interfaceMatch, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void checkNamespaceClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String namespaceId, String className, String interfaceMatch, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void checkNamespaceClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String namespaceId, java.lang.String className, java.lang.String interfaceMatch, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -201,7 +174,7 @@ public class ClientService {
super(iprot, oprot);
}
- public String getRootTabletLocation() throws org.apache.thrift.TException
+ public java.lang.String getRootTabletLocation() throws org.apache.thrift.TException
{
send_getRootTabletLocation();
return recv_getRootTabletLocation();
@@ -213,7 +186,7 @@ public class ClientService {
sendBase("getRootTabletLocation", args);
}
- public String recv_getRootTabletLocation() throws org.apache.thrift.TException
+ public java.lang.String recv_getRootTabletLocation() throws org.apache.thrift.TException
{
getRootTabletLocation_result result = new getRootTabletLocation_result();
receiveBase(result, "getRootTabletLocation");
@@ -223,7 +196,7 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRootTabletLocation failed: unknown result");
}
- public String getInstanceId() throws org.apache.thrift.TException
+ public java.lang.String getInstanceId() throws org.apache.thrift.TException
{
send_getInstanceId();
return recv_getInstanceId();
@@ -235,7 +208,7 @@ public class ClientService {
sendBase("getInstanceId", args);
}
- public String recv_getInstanceId() throws org.apache.thrift.TException
+ public java.lang.String recv_getInstanceId() throws org.apache.thrift.TException
{
getInstanceId_result result = new getInstanceId_result();
receiveBase(result, "getInstanceId");
@@ -245,7 +218,7 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInstanceId failed: unknown result");
}
- public String getZooKeepers() throws org.apache.thrift.TException
+ public java.lang.String getZooKeepers() throws org.apache.thrift.TException
{
send_getZooKeepers();
return recv_getZooKeepers();
@@ -257,7 +230,7 @@ public class ClientService {
sendBase("getZooKeepers", args);
}
- public String recv_getZooKeepers() throws org.apache.thrift.TException
+ public java.lang.String recv_getZooKeepers() throws org.apache.thrift.TException
{
getZooKeepers_result result = new getZooKeepers_result();
receiveBase(result, "getZooKeepers");
@@ -267,13 +240,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getZooKeepers failed: unknown result");
}
- public List<String> bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, String tableId, List<String> files, String errorDir, boolean setTime) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public java.util.List<java.lang.String> bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.lang.String tableId, java.util.List<java.lang.String> files, java.lang.String errorDir, boolean setTime) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_bulkImportFiles(tinfo, credentials, tid, tableId, files, errorDir, setTime);
return recv_bulkImportFiles();
}
- public void send_bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, String tableId, List<String> files, String errorDir, boolean setTime) throws org.apache.thrift.TException
+ public void send_bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.lang.String tableId, java.util.List<java.lang.String> files, java.lang.String errorDir, boolean setTime) throws org.apache.thrift.TException
{
bulkImportFiles_args args = new bulkImportFiles_args();
args.setTinfo(tinfo);
@@ -286,7 +259,7 @@ public class ClientService {
sendBase("bulkImportFiles", args);
}
- public List<String> recv_bulkImportFiles() throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public java.util.List<java.lang.String> recv_bulkImportFiles() throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
bulkImportFiles_result result = new bulkImportFiles_result();
receiveBase(result, "bulkImportFiles");
@@ -349,13 +322,13 @@ public class ClientService {
return;
}
- public List<TDiskUsage> getDiskUsage(Set<String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public java.util.List<TDiskUsage> getDiskUsage(java.util.Set<java.lang.String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_getDiskUsage(tables, credentials);
return recv_getDiskUsage();
}
- public void send_getDiskUsage(Set<String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
+ public void send_getDiskUsage(java.util.Set<java.lang.String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
{
getDiskUsage_args args = new getDiskUsage_args();
args.setTables(tables);
@@ -363,7 +336,7 @@ public class ClientService {
sendBase("getDiskUsage", args);
}
- public List<TDiskUsage> recv_getDiskUsage() throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public java.util.List<TDiskUsage> recv_getDiskUsage() throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
getDiskUsage_result result = new getDiskUsage_result();
receiveBase(result, "getDiskUsage");
@@ -379,7 +352,7 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDiskUsage failed: unknown result");
}
- public Set<String> listLocalUsers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, org.apache.thrift.TException
+ public java.util.Set<java.lang.String> listLocalUsers(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ThriftSecurityException, org.apache.thrift.TException
{
send_listLocalUsers(tinfo, credentials);
return recv_listLocalUsers();
@@ -393,7 +366,7 @@ public class ClientService {
sendBase("listLocalUsers", args);
}
- public Set<String> recv_listLocalUsers() throws ThriftSecurityException, org.apache.thrift.TException
+ public java.util.Set<java.lang.String> recv_listLocalUsers() throws ThriftSecurityException, org.apache.thrift.TException
{
listLocalUsers_result result = new listLocalUsers_result();
receiveBase(result, "listLocalUsers");
@@ -406,13 +379,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listLocalUsers failed: unknown result");
}
- public void createLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, ByteBuffer password) throws ThriftSecurityException, org.apache.thrift.TException
+ public void createLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.nio.ByteBuffer password) throws ThriftSecurityException, org.apache.thrift.TException
{
send_createLocalUser(tinfo, credentials, principal, password);
recv_createLocalUser();
}
- public void send_createLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, ByteBuffer password) throws org.apache.thrift.TException
+ public void send_createLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.nio.ByteBuffer password) throws org.apache.thrift.TException
{
createLocalUser_args args = new createLocalUser_args();
args.setTinfo(tinfo);
@@ -432,13 +405,13 @@ public class ClientService {
return;
}
- public void dropLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal) throws ThriftSecurityException, org.apache.thrift.TException
+ public void dropLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal) throws ThriftSecurityException, org.apache.thrift.TException
{
send_dropLocalUser(tinfo, credentials, principal);
recv_dropLocalUser();
}
- public void send_dropLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal) throws org.apache.thrift.TException
+ public void send_dropLocalUser(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal) throws org.apache.thrift.TException
{
dropLocalUser_args args = new dropLocalUser_args();
args.setTinfo(tinfo);
@@ -457,13 +430,13 @@ public class ClientService {
return;
}
- public void changeLocalUserPassword(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, ByteBuffer password) throws ThriftSecurityException, org.apache.thrift.TException
+ public void changeLocalUserPassword(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.nio.ByteBuffer password) throws ThriftSecurityException, org.apache.thrift.TException
{
send_changeLocalUserPassword(tinfo, credentials, principal, password);
recv_changeLocalUserPassword();
}
- public void send_changeLocalUserPassword(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, ByteBuffer password) throws org.apache.thrift.TException
+ public void send_changeLocalUserPassword(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.nio.ByteBuffer password) throws org.apache.thrift.TException
{
changeLocalUserPassword_args args = new changeLocalUserPassword_args();
args.setTinfo(tinfo);
@@ -538,13 +511,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
}
- public void changeAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, List<ByteBuffer> authorizations) throws ThriftSecurityException, org.apache.thrift.TException
+ public void changeAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.util.List<java.nio.ByteBuffer> authorizations) throws ThriftSecurityException, org.apache.thrift.TException
{
send_changeAuthorizations(tinfo, credentials, principal, authorizations);
recv_changeAuthorizations();
}
- public void send_changeAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, List<ByteBuffer> authorizations) throws org.apache.thrift.TException
+ public void send_changeAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.util.List<java.nio.ByteBuffer> authorizations) throws org.apache.thrift.TException
{
changeAuthorizations_args args = new changeAuthorizations_args();
args.setTinfo(tinfo);
@@ -564,13 +537,13 @@ public class ClientService {
return;
}
- public List<ByteBuffer> getUserAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal) throws ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<java.nio.ByteBuffer> getUserAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal) throws ThriftSecurityException, org.apache.thrift.TException
{
send_getUserAuthorizations(tinfo, credentials, principal);
return recv_getUserAuthorizations();
}
- public void send_getUserAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal) throws org.apache.thrift.TException
+ public void send_getUserAuthorizations(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal) throws org.apache.thrift.TException
{
getUserAuthorizations_args args = new getUserAuthorizations_args();
args.setTinfo(tinfo);
@@ -579,7 +552,7 @@ public class ClientService {
sendBase("getUserAuthorizations", args);
}
- public List<ByteBuffer> recv_getUserAuthorizations() throws ThriftSecurityException, org.apache.thrift.TException
+ public java.util.List<java.nio.ByteBuffer> recv_getUserAuthorizations() throws ThriftSecurityException, org.apache.thrift.TException
{
getUserAuthorizations_result result = new getUserAuthorizations_result();
receiveBase(result, "getUserAuthorizations");
@@ -592,13 +565,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserAuthorizations failed: unknown result");
}
- public boolean hasSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte sysPerm) throws ThriftSecurityException, org.apache.thrift.TException
+ public boolean hasSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte sysPerm) throws ThriftSecurityException, org.apache.thrift.TException
{
send_hasSystemPermission(tinfo, credentials, principal, sysPerm);
return recv_hasSystemPermission();
}
- public void send_hasSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte sysPerm) throws org.apache.thrift.TException
+ public void send_hasSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte sysPerm) throws org.apache.thrift.TException
{
hasSystemPermission_args args = new hasSystemPermission_args();
args.setTinfo(tinfo);
@@ -621,13 +594,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "hasSystemPermission failed: unknown result");
}
- public boolean hasTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte tblPerm) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public boolean hasTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte tblPerm) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_hasTablePermission(tinfo, credentials, principal, tableName, tblPerm);
return recv_hasTablePermission();
}
- public void send_hasTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte tblPerm) throws org.apache.thrift.TException
+ public void send_hasTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte tblPerm) throws org.apache.thrift.TException
{
hasTablePermission_args args = new hasTablePermission_args();
args.setTinfo(tinfo);
@@ -654,13 +627,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "hasTablePermission failed: unknown result");
}
- public boolean hasNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte tblNspcPerm) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public boolean hasNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte tblNspcPerm) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_hasNamespacePermission(tinfo, credentials, principal, ns, tblNspcPerm);
return recv_hasNamespacePermission();
}
- public void send_hasNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte tblNspcPerm) throws org.apache.thrift.TException
+ public void send_hasNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte tblNspcPerm) throws org.apache.thrift.TException
{
hasNamespacePermission_args args = new hasNamespacePermission_args();
args.setTinfo(tinfo);
@@ -687,13 +660,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "hasNamespacePermission failed: unknown result");
}
- public void grantSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte permission) throws ThriftSecurityException, org.apache.thrift.TException
+ public void grantSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte permission) throws ThriftSecurityException, org.apache.thrift.TException
{
send_grantSystemPermission(tinfo, credentials, principal, permission);
recv_grantSystemPermission();
}
- public void send_grantSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte permission) throws org.apache.thrift.TException
+ public void send_grantSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte permission) throws org.apache.thrift.TException
{
grantSystemPermission_args args = new grantSystemPermission_args();
args.setTinfo(tinfo);
@@ -713,13 +686,13 @@ public class ClientService {
return;
}
- public void revokeSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte permission) throws ThriftSecurityException, org.apache.thrift.TException
+ public void revokeSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte permission) throws ThriftSecurityException, org.apache.thrift.TException
{
send_revokeSystemPermission(tinfo, credentials, principal, permission);
recv_revokeSystemPermission();
}
- public void send_revokeSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, byte permission) throws org.apache.thrift.TException
+ public void send_revokeSystemPermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, byte permission) throws org.apache.thrift.TException
{
revokeSystemPermission_args args = new revokeSystemPermission_args();
args.setTinfo(tinfo);
@@ -739,13 +712,13 @@ public class ClientService {
return;
}
- public void grantTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public void grantTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_grantTablePermission(tinfo, credentials, principal, tableName, permission);
recv_grantTablePermission();
}
- public void send_grantTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte permission) throws org.apache.thrift.TException
+ public void send_grantTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte permission) throws org.apache.thrift.TException
{
grantTablePermission_args args = new grantTablePermission_args();
args.setTinfo(tinfo);
@@ -769,13 +742,13 @@ public class ClientService {
return;
}
- public void revokeTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public void revokeTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_revokeTablePermission(tinfo, credentials, principal, tableName, permission);
recv_revokeTablePermission();
}
- public void send_revokeTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String tableName, byte permission) throws org.apache.thrift.TException
+ public void send_revokeTablePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String tableName, byte permission) throws org.apache.thrift.TException
{
revokeTablePermission_args args = new revokeTablePermission_args();
args.setTinfo(tinfo);
@@ -799,13 +772,13 @@ public class ClientService {
return;
}
- public void grantNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public void grantNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_grantNamespacePermission(tinfo, credentials, principal, ns, permission);
recv_grantNamespacePermission();
}
- public void send_grantNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte permission) throws org.apache.thrift.TException
+ public void send_grantNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte permission) throws org.apache.thrift.TException
{
grantNamespacePermission_args args = new grantNamespacePermission_args();
args.setTinfo(tinfo);
@@ -829,13 +802,13 @@ public class ClientService {
return;
}
- public void revokeNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public void revokeNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte permission) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_revokeNamespacePermission(tinfo, credentials, principal, ns, permission);
recv_revokeNamespacePermission();
}
- public void send_revokeNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String principal, String ns, byte permission) throws org.apache.thrift.TException
+ public void send_revokeNamespacePermission(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String principal, java.lang.String ns, byte permission) throws org.apache.thrift.TException
{
revokeNamespacePermission_args args = new revokeNamespacePermission_args();
args.setTinfo(tinfo);
@@ -859,7 +832,7 @@ public class ClientService {
return;
}
- public Map<String,String> getConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, ConfigurationType type) throws org.apache.thrift.TException
+ public java.util.Map<java.lang.String,java.lang.String> getConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, ConfigurationType type) throws org.apache.thrift.TException
{
send_getConfiguration(tinfo, credentials, type);
return recv_getConfiguration();
@@ -874,7 +847,7 @@ public class ClientService {
sendBase("getConfiguration", args);
}
- public Map<String,String> recv_getConfiguration() throws org.apache.thrift.TException
+ public java.util.Map<java.lang.String,java.lang.String> recv_getConfiguration() throws org.apache.thrift.TException
{
getConfiguration_result result = new getConfiguration_result();
receiveBase(result, "getConfiguration");
@@ -884,13 +857,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getConfiguration failed: unknown result");
}
- public Map<String,String> getTableConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName) throws ThriftTableOperationException, org.apache.thrift.TException
+ public java.util.Map<java.lang.String,java.lang.String> getTableConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName) throws ThriftTableOperationException, org.apache.thrift.TException
{
send_getTableConfiguration(tinfo, credentials, tableName);
return recv_getTableConfiguration();
}
- public void send_getTableConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableName) throws org.apache.thrift.TException
+ public void send_getTableConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableName) throws org.apache.thrift.TException
{
getTableConfiguration_args args = new getTableConfiguration_args();
args.setTinfo(tinfo);
@@ -899,7 +872,7 @@ public class ClientService {
sendBase("getTableConfiguration", args);
}
- public Map<String,String> recv_getTableConfiguration() throws ThriftTableOperationException, org.apache.thrift.TException
+ public java.util.Map<java.lang.String,java.lang.String> recv_getTableConfiguration() throws ThriftTableOperationException, org.apache.thrift.TException
{
getTableConfiguration_result result = new getTableConfiguration_result();
receiveBase(result, "getTableConfiguration");
@@ -912,13 +885,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableConfiguration failed: unknown result");
}
- public Map<String,String> getNamespaceConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns) throws ThriftTableOperationException, org.apache.thrift.TException
+ public java.util.Map<java.lang.String,java.lang.String> getNamespaceConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns) throws ThriftTableOperationException, org.apache.thrift.TException
{
send_getNamespaceConfiguration(tinfo, credentials, ns);
return recv_getNamespaceConfiguration();
}
- public void send_getNamespaceConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String ns) throws org.apache.thrift.TException
+ public void send_getNamespaceConfiguration(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String ns) throws org.apache.thrift.TException
{
getNamespaceConfiguration_args args = new getNamespaceConfiguration_args();
args.setTinfo(tinfo);
@@ -927,7 +900,7 @@ public class ClientService {
sendBase("getNamespaceConfiguration", args);
}
- public Map<String,String> recv_getNamespaceConfiguration() throws ThriftTableOperationException, org.apache.thrift.TException
+ public java.util.Map<java.lang.String,java.lang.String> recv_getNamespaceConfiguration() throws ThriftTableOperationException, org.apache.thrift.TException
{
getNamespaceConfiguration_result result = new getNamespaceConfiguration_result();
receiveBase(result, "getNamespaceConfiguration");
@@ -940,13 +913,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNamespaceConfiguration failed: unknown result");
}
- public boolean checkClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String className, String interfaceMatch) throws org.apache.thrift.TException
+ public boolean checkClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String className, java.lang.String interfaceMatch) throws org.apache.thrift.TException
{
send_checkClass(tinfo, credentials, className, interfaceMatch);
return recv_checkClass();
}
- public void send_checkClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String className, String interfaceMatch) throws org.apache.thrift.TException
+ public void send_checkClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String className, java.lang.String interfaceMatch) throws org.apache.thrift.TException
{
checkClass_args args = new checkClass_args();
args.setTinfo(tinfo);
@@ -966,13 +939,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkClass failed: unknown result");
}
- public boolean checkTableClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableId, String className, String interfaceMatch) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public boolean checkTableClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableId, java.lang.String className, java.lang.String interfaceMatch) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_checkTableClass(tinfo, credentials, tableId, className, interfaceMatch);
return recv_checkTableClass();
}
- public void send_checkTableClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String tableId, String className, String interfaceMatch) throws org.apache.thrift.TException
+ public void send_checkTableClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String tableId, java.lang.String className, java.lang.String interfaceMatch) throws org.apache.thrift.TException
{
checkTableClass_args args = new checkTableClass_args();
args.setTinfo(tinfo);
@@ -999,13 +972,13 @@ public class ClientService {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkTableClass failed: unknown result");
}
- public boolean checkNamespaceClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String namespaceId, String className, String interfaceMatch) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
+ public boolean checkNamespaceClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String namespaceId, java.lang.String className, java.lang.String interfaceMatch) throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException
{
send_checkNamespaceClass(tinfo, credentials, namespaceId, className, interfaceMatch);
return recv_checkNamespaceClass();
}
- public void send_checkNamespaceClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, String namespaceId, String className, String interfaceMatch) throws org.apache.thrift.TException
+ public void send_checkNamespaceClass(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, java.lang.String namespaceId, java.lang.String className, java.lang.String interfaceMatch) throws org.apache.thrift.TException
{
checkNamespaceClass_args args = new checkNamespaceClass_args();
args.setTinfo(tinfo);
@@ -1050,15 +1023,15 @@ public class ClientService {
super(protocolFactory, clientManager, transport);
}
- public void getRootTabletLocation(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getRootTabletLocation(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
getRootTabletLocation_call method_call = new getRootTabletLocation_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getRootTabletLocation_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getRootTabletLocation_call(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 getRootTabletLocation_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ public getRootTabletLocation_call(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);
}
@@ -1069,9 +1042,9 @@ public class ClientService {
prot.writeMessageEnd();
}
- public String getResult() throws org.apache.thrift.TException {
+ public java.lang.String getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1079,15 +1052,15 @@ public class ClientService {
}
}
- public void getInstanceId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getInstanceId(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
getInstanceId_call method_call = new getInstanceId_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getInstanceId_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getInstanceId_call(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 getInstanceId_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ public getInstanceId_call(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);
}
@@ -1098,9 +1071,9 @@ public class ClientService {
prot.writeMessageEnd();
}
- public String getResult() throws org.apache.thrift.TException {
+ public java.lang.String getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1108,15 +1081,15 @@ public class ClientService {
}
}
- public void getZooKeepers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getZooKeepers(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
getZooKeepers_call method_call = new getZooKeepers_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getZooKeepers_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getZooKeepers_call(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 getZooKeepers_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ public getZooKeepers_call(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);
}
@@ -1127,9 +1100,9 @@ public class ClientService {
prot.writeMessageEnd();
}
- public String getResult() throws org.apache.thrift.TException {
+ public java.lang.String getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1137,22 +1110,22 @@ public class ClientService {
}
}
- public void bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, String tableId, List<String> files, String errorDir, boolean setTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void bulkImportFiles(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.lang.String tableId, java.util.List<java.lang.String> files, java.lang.String errorDir, boolean setTime, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
checkReady();
bulkImportFiles_call method_call = new bulkImportFiles_call(tinfo, credentials, tid, tableId, files, errorDir, setTime, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class bulkImportFiles_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class bulkImportFiles_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
private long tid;
- private String tableId;
- private List<String> files;
- private String errorDir;
+ private java.lang.String tableId;
+ private java.util.List<java.lang.String> files;
+ private java.lang.String errorDir;
private boolean setTime;
- public bulkImportFiles_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, String tableId, List<String> files, String errorDir, boolean setTime, 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 bulkImportFiles_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, org.apache.accumulo.core.security.thrift.TCredentials credentials, long tid, java.lang.String tableId, java.util.List<java.lang.String> files, java.lang.String errorDir, boolean setTime, org.apache.thrift.async.AsyncMethodCallback<java.util.List<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.tinfo = tinfo;
this.credentials = credentials;
@@ -1177,9 +1150,9 @@ public class ClientService {
prot.writeMessageEnd();
}
- public List<String> getResult() throws ThriftSecurityException, ThriftTableOperationException, org.apache.thrift.TException {
+ public java.util.List<java.lang.String> getResult() throws ThriftSecurityException, ThriftTableOperationException, 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);
@@ -1187,17 +1160,17 @@ public class ClientService {
}
}
- public void isActive(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long tid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void isActive(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long tid, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
isActive_call method_call = new isActive_call(tinfo, tid, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class isActive_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class isActive_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private org.apache.accumulo.core.trace.thrift.TInfo tinfo;
private long tid;
- public isActive_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long tid, 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 isActive_call(org.apache.accumulo.core.trace.thrift.TInfo tinfo, long tid, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.tinfo = tinfo;
this.tid = tid;
@@ -1212,9 +1185,9 @@ public class ClientService {
prot.writeMessageEnd();
}
- public boolean getResult() throws org.apache.thrift.TException {
+ public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1222,16 +1195,16 @@ public class ClientService {
}
}
- public void ping(org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void ping(org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
ping_call method_call = new ping_call(credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public ping_call(org.apache.accumulo.core.security.thrift.TCredentials credentials, 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 ping_call(org.apache.accumulo.core.security.thrift.TCredentials credentials, 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.credentials = credentials;
}
@@ -1244,27 +1217,27 @@ public class ClientService {
prot.writeMessageEnd();
}
- public void getResult() throws ThriftSecurityException, org.apache.thrift.TException {
+ public Void getResult() throws ThriftSecurityException, 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_ping();
+ return null;
}
}
- public void getDiskUsage(Set<String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getDiskUsage(java.util.Set<java.lang.String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDiskUsage>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getDiskUsage_call method_call = new getDiskUsage_call(tables, credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getDiskUsage_call extends org.apache.thrift.async.TAsyncMethodCall {
- private Set<String> tables;
+ public static class getDiskUsage_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<TDiskUsage>> {
+ private java.util.Set<java.lang.String> tables;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public getDiskUsage_call(Set<String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials, 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 getDiskUsage_call(java.util.Set<java.lang.String> tables, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.util.List<TDiskUsage>> 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.tables = tables;
this.credentials = crede
<TRUNCATED>
[24/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java
index 0ceabcf..c15ba25 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinator.java
@@ -15,57 +15,30 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.replication.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ReplicationCoordinator {
public interface Iface {
- public String getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException;
+ public java.lang.String getServicerAddress(java.lang.String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getServicerAddress(java.lang.String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
}
- public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
@@ -85,13 +58,13 @@ public class ReplicationCoordinator {
super(iprot, oprot);
}
- public String getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException
+ public java.lang.String getServicerAddress(java.lang.String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws ReplicationCoordinatorException, org.apache.thrift.TException
{
send_getServicerAddress(remoteTableId, credentials);
return recv_getServicerAddress();
}
- public void send_getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
+ public void send_getServicerAddress(java.lang.String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials) throws org.apache.thrift.TException
{
getServicerAddress_args args = new getServicerAddress_args();
args.setRemoteTableId(remoteTableId);
@@ -99,7 +72,7 @@ public class ReplicationCoordinator {
sendBase("getServicerAddress", args);
}
- public String recv_getServicerAddress() throws ReplicationCoordinatorException, org.apache.thrift.TException
+ public java.lang.String recv_getServicerAddress() throws ReplicationCoordinatorException, org.apache.thrift.TException
{
getServicerAddress_result result = new getServicerAddress_result();
receiveBase(result, "getServicerAddress");
@@ -130,17 +103,17 @@ public class ReplicationCoordinator {
super(protocolFactory, clientManager, transport);
}
- public void getServicerAddress(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ public void getServicerAddress(java.lang.String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
getServicerAddress_call method_call = new getServicerAddress_call(remoteTableId, credentials, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getServicerAddress_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String remoteTableId;
+ public static class getServicerAddress_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ private java.lang.String remoteTableId;
private org.apache.accumulo.core.security.thrift.TCredentials credentials;
- public getServicerAddress_call(String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, 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 getServicerAddress_call(java.lang.String remoteTableId, org.apache.accumulo.core.security.thrift.TCredentials credentials, 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.remoteTableId = remoteTableId;
this.credentials = credentials;
@@ -155,9 +128,9 @@ public class ReplicationCoordinator {
prot.writeMessageEnd();
}
- public String getResult() throws ReplicationCoordinatorException, org.apache.thrift.TException {
+ public java.lang.String getResult() throws ReplicationCoordinatorException, 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);
@@ -168,16 +141,16 @@ public class ReplicationCoordinator {
}
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("getServicerAddress", new getServicerAddress());
return processMap;
}
@@ -209,21 +182,21 @@ public class ReplicationCoordinator {
}
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("getServicerAddress", new getServicerAddress());
return processMap;
}
- public static class getServicerAddress<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getServicerAddress_args, String> {
+ public static class getServicerAddress<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getServicerAddress_args, java.lang.String> {
public getServicerAddress() {
super("getServicerAddress");
}
@@ -232,41 +205,49 @@ public class ReplicationCoordinator {
return new getServicerAddress_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) {
getServicerAddress_result result = new getServicerAddress_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;
getServicerAddress_result result = new getServicerAddress_result();
if (e instanceof ReplicationCoordinatorException) {
- result.e = (ReplicationCoordinatorException) e;
- result.setEIsSet(true);
- msg = result;
- }
- else
- {
+ result.e = (ReplicationCoordinatorException) e;
+ result.setEIsSet(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();
}
};
}
@@ -275,7 +256,7 @@ public class ReplicationCoordinator {
return false;
}
- public void start(I iface, getServicerAddress_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ public void start(I iface, getServicerAddress_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.getServicerAddress(args.remoteTableId, args.credentials,resultHandler);
}
}
@@ -288,13 +269,10 @@ public class ReplicationCoordinator {
private static final org.apache.thrift.protocol.TField REMOTE_TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("remoteTableId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", 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 getServicerAddress_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getServicerAddress_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getServicerAddress_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getServicerAddress_argsTupleSchemeFactory();
- public String remoteTableId; // required
+ public java.lang.String remoteTableId; // required
public org.apache.accumulo.core.security.thrift.TCredentials credentials; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -302,10 +280,10 @@ public class ReplicationCoordinator {
REMOTE_TABLE_ID((short)1, "remoteTableId"),
CREDENTIALS((short)2, "credentials");
- 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);
}
}
@@ -330,21 +308,21 @@ public class ReplicationCoordinator {
*/
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;
}
@@ -353,20 +331,20 @@ public class ReplicationCoordinator {
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.REMOTE_TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("remoteTableId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.security.thrift.TCredentials.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getServicerAddress_args.class, metaDataMap);
}
@@ -374,7 +352,7 @@ public class ReplicationCoordinator {
}
public getServicerAddress_args(
- String remoteTableId,
+ java.lang.String remoteTableId,
org.apache.accumulo.core.security.thrift.TCredentials credentials)
{
this();
@@ -404,11 +382,11 @@ public class ReplicationCoordinator {
this.credentials = null;
}
- public String getRemoteTableId() {
+ public java.lang.String getRemoteTableId() {
return this.remoteTableId;
}
- public getServicerAddress_args setRemoteTableId(String remoteTableId) {
+ public getServicerAddress_args setRemoteTableId(java.lang.String remoteTableId) {
this.remoteTableId = remoteTableId;
return this;
}
@@ -452,13 +430,13 @@ public class ReplicationCoordinator {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case REMOTE_TABLE_ID:
if (value == null) {
unsetRemoteTableId();
} else {
- setRemoteTableId((String)value);
+ setRemoteTableId((java.lang.String)value);
}
break;
@@ -473,7 +451,7 @@ public class ReplicationCoordinator {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case REMOTE_TABLE_ID:
return getRemoteTableId();
@@ -482,13 +460,13 @@ public class ReplicationCoordinator {
return getCredentials();
}
- 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) {
@@ -497,11 +475,11 @@ public class ReplicationCoordinator {
case CREDENTIALS:
return isSetCredentials();
}
- 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 getServicerAddress_args)
@@ -512,6 +490,8 @@ public class ReplicationCoordinator {
public boolean equals(getServicerAddress_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_remoteTableId = true && this.isSetRemoteTableId();
boolean that_present_remoteTableId = true && that.isSetRemoteTableId();
@@ -536,19 +516,17 @@ public class ReplicationCoordinator {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_remoteTableId = true && (isSetRemoteTableId());
- list.add(present_remoteTableId);
- if (present_remoteTableId)
- list.add(remoteTableId);
+ hashCode = hashCode * 8191 + ((isSetRemoteTableId()) ? 131071 : 524287);
+ if (isSetRemoteTableId())
+ hashCode = hashCode * 8191 + remoteTableId.hashCode();
- boolean present_credentials = true && (isSetCredentials());
- list.add(present_credentials);
- if (present_credentials)
- list.add(credentials);
+ hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
+ if (isSetCredentials())
+ hashCode = hashCode * 8191 + credentials.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -559,7 +537,7 @@ public class ReplicationCoordinator {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRemoteTableId()).compareTo(other.isSetRemoteTableId());
+ lastComparison = java.lang.Boolean.valueOf(isSetRemoteTableId()).compareTo(other.isSetRemoteTableId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -569,7 +547,7 @@ public class ReplicationCoordinator {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
+ lastComparison = java.lang.Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
if (lastComparison != 0) {
return lastComparison;
}
@@ -587,16 +565,16 @@ public class ReplicationCoordinator {
}
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("getServicerAddress_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getServicerAddress_args(");
boolean first = true;
sb.append("remoteTableId:");
@@ -634,7 +612,7 @@ public class ReplicationCoordinator {
}
}
- 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) {
@@ -642,13 +620,13 @@ public class ReplicationCoordinator {
}
}
- private static class getServicerAddress_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getServicerAddress_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getServicerAddress_argsStandardScheme getScheme() {
return new getServicerAddress_argsStandardScheme();
}
}
- private static class getServicerAddress_argsStandardScheme extends StandardScheme<getServicerAddress_args> {
+ private static class getServicerAddress_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getServicerAddress_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getServicerAddress_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -708,18 +686,18 @@ public class ReplicationCoordinator {
}
- private static class getServicerAddress_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getServicerAddress_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getServicerAddress_argsTupleScheme getScheme() {
return new getServicerAddress_argsTupleScheme();
}
}
- private static class getServicerAddress_argsTupleScheme extends TupleScheme<getServicerAddress_args> {
+ private static class getServicerAddress_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getServicerAddress_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getServicerAddress_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.isSetRemoteTableId()) {
optionals.set(0);
}
@@ -737,8 +715,8 @@ public class ReplicationCoordinator {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getServicerAddress_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.remoteTableId = iprot.readString();
struct.setRemoteTableIdIsSet(true);
@@ -751,6 +729,9 @@ public class ReplicationCoordinator {
}
}
+ 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 getServicerAddress_result implements org.apache.thrift.TBase<getServicerAddress_result, getServicerAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<getServicerAddress_result> {
@@ -759,13 +740,10 @@ public class ReplicationCoordinator {
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getServicerAddress_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getServicerAddress_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getServicerAddress_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getServicerAddress_resultTupleSchemeFactory();
- public String success; // required
+ public java.lang.String success; // required
public ReplicationCoordinatorException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -773,10 +751,10 @@ public class ReplicationCoordinator {
SUCCESS((short)0, "success"),
E((short)1, "e");
- 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);
}
}
@@ -801,21 +779,21 @@ public class ReplicationCoordinator {
*/
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;
}
@@ -824,20 +802,20 @@ public class ReplicationCoordinator {
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)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ReplicationCoordinatorException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getServicerAddress_result.class, metaDataMap);
}
@@ -845,7 +823,7 @@ public class ReplicationCoordinator {
}
public getServicerAddress_result(
- String success,
+ java.lang.String success,
ReplicationCoordinatorException e)
{
this();
@@ -875,11 +853,11 @@ public class ReplicationCoordinator {
this.e = null;
}
- public String getSuccess() {
+ public java.lang.String getSuccess() {
return this.success;
}
- public getServicerAddress_result setSuccess(String success) {
+ public getServicerAddress_result setSuccess(java.lang.String success) {
this.success = success;
return this;
}
@@ -923,13 +901,13 @@ public class ReplicationCoordinator {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((String)value);
+ setSuccess((java.lang.String)value);
}
break;
@@ -944,7 +922,7 @@ public class ReplicationCoordinator {
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -953,13 +931,13 @@ public class ReplicationCoordinator {
return getE();
}
- 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) {
@@ -968,11 +946,11 @@ public class ReplicationCoordinator {
case E:
return isSetE();
}
- 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 getServicerAddress_result)
@@ -983,6 +961,8 @@ public class ReplicationCoordinator {
public boolean equals(getServicerAddress_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -1007,19 +987,17 @@ public class ReplicationCoordinator {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_e = true && (isSetE());
- list.add(present_e);
- if (present_e)
- list.add(e);
+ hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287);
+ if (isSetE())
+ hashCode = hashCode * 8191 + e.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -1030,7 +1008,7 @@ public class ReplicationCoordinator {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1040,7 +1018,7 @@ public class ReplicationCoordinator {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
+ lastComparison = java.lang.Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1058,16 +1036,16 @@ public class ReplicationCoordinator {
}
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("getServicerAddress_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getServicerAddress_result(");
boolean first = true;
sb.append("success:");
@@ -1102,7 +1080,7 @@ public class ReplicationCoordinator {
}
}
- 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) {
@@ -1110,13 +1088,13 @@ public class ReplicationCoordinator {
}
}
- private static class getServicerAddress_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getServicerAddress_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getServicerAddress_resultStandardScheme getScheme() {
return new getServicerAddress_resultStandardScheme();
}
}
- private static class getServicerAddress_resultStandardScheme extends StandardScheme<getServicerAddress_result> {
+ private static class getServicerAddress_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getServicerAddress_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getServicerAddress_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1176,18 +1154,18 @@ public class ReplicationCoordinator {
}
- private static class getServicerAddress_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getServicerAddress_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getServicerAddress_resultTupleScheme getScheme() {
return new getServicerAddress_resultTupleScheme();
}
}
- private static class getServicerAddress_resultTupleScheme extends TupleScheme<getServicerAddress_result> {
+ private static class getServicerAddress_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getServicerAddress_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getServicerAddress_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
@@ -1205,8 +1183,8 @@ public class ReplicationCoordinator {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getServicerAddress_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 = iprot.readString();
struct.setSuccessIsSet(true);
@@ -1219,6 +1197,10 @@ public class ReplicationCoordinator {
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java
index 545656b..57e0139 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorErrorCode.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.replication.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum ReplicationCoordinatorErrorCode implements org.apache.thrift.TEnum {
+public enum ReplicationCoordinatorErrorCode implements org.apache.thrift.TEnum {
NO_AVAILABLE_SERVERS(0),
SERVICE_CONFIGURATION_UNAVAILABLE(1),
CANNOT_AUTHENTICATE(2);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java
index 5e3b99d..5820029 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/ReplicationCoordinatorException.java
@@ -15,60 +15,30 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.replication.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class ReplicationCoordinatorException extends TException implements org.apache.thrift.TBase<ReplicationCoordinatorException, ReplicationCoordinatorException._Fields>, java.io.Serializable, Cloneable, Comparable<ReplicationCoordinatorException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class ReplicationCoordinatorException extends org.apache.thrift.TException implements org.apache.thrift.TBase<ReplicationCoordinatorException, ReplicationCoordinatorException._Fields>, java.io.Serializable, Cloneable, Comparable<ReplicationCoordinatorException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ReplicationCoordinatorException");
private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", 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 ReplicationCoordinatorExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ReplicationCoordinatorExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ReplicationCoordinatorExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ReplicationCoordinatorExceptionTupleSchemeFactory();
/**
*
* @see ReplicationCoordinatorErrorCode
*/
public ReplicationCoordinatorErrorCode code; // required
- public String reason; // required
+ public java.lang.String reason; // 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 {
@@ -79,10 +49,10 @@ public class ReplicationCoordinatorException extends TException implements org.a
CODE((short)1, "code"),
REASON((short)2, "reason");
- 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);
}
}
@@ -107,21 +77,21 @@ public class ReplicationCoordinatorException extends TException implements org.a
*/
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;
}
@@ -130,20 +100,20 @@ public class ReplicationCoordinatorException extends TException implements org.a
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.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ReplicationCoordinatorErrorCode.class)));
tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", 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(ReplicationCoordinatorException.class, metaDataMap);
}
@@ -152,7 +122,7 @@ public class ReplicationCoordinatorException extends TException implements org.a
public ReplicationCoordinatorException(
ReplicationCoordinatorErrorCode code,
- String reason)
+ java.lang.String reason)
{
this();
this.code = code;
@@ -213,11 +183,11 @@ public class ReplicationCoordinatorException extends TException implements org.a
}
}
- public String getReason() {
+ public java.lang.String getReason() {
return this.reason;
}
- public ReplicationCoordinatorException setReason(String reason) {
+ public ReplicationCoordinatorException setReason(java.lang.String reason) {
this.reason = reason;
return this;
}
@@ -237,7 +207,7 @@ public class ReplicationCoordinatorException extends TException implements org.a
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CODE:
if (value == null) {
@@ -251,14 +221,14 @@ public class ReplicationCoordinatorException extends TException implements org.a
if (value == null) {
unsetReason();
} else {
- setReason((String)value);
+ setReason((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CODE:
return getCode();
@@ -267,13 +237,13 @@ public class ReplicationCoordinatorException extends TException implements org.a
return getReason();
}
- 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) {
@@ -282,11 +252,11 @@ public class ReplicationCoordinatorException extends TException implements org.a
case REASON:
return isSetReason();
}
- 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 ReplicationCoordinatorException)
@@ -297,6 +267,8 @@ public class ReplicationCoordinatorException extends TException implements org.a
public boolean equals(ReplicationCoordinatorException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_code = true && this.isSetCode();
boolean that_present_code = true && that.isSetCode();
@@ -321,19 +293,17 @@ public class ReplicationCoordinatorException extends TException implements org.a
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_code = true && (isSetCode());
- list.add(present_code);
- if (present_code)
- list.add(code.getValue());
+ hashCode = hashCode * 8191 + ((isSetCode()) ? 131071 : 524287);
+ if (isSetCode())
+ hashCode = hashCode * 8191 + code.getValue();
- boolean present_reason = true && (isSetReason());
- list.add(present_reason);
- if (present_reason)
- list.add(reason);
+ hashCode = hashCode * 8191 + ((isSetReason()) ? 131071 : 524287);
+ if (isSetReason())
+ hashCode = hashCode * 8191 + reason.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -344,7 +314,7 @@ public class ReplicationCoordinatorException extends TException implements org.a
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
+ lastComparison = java.lang.Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
if (lastComparison != 0) {
return lastComparison;
}
@@ -354,7 +324,7 @@ public class ReplicationCoordinatorException extends TException implements org.a
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
+ lastComparison = java.lang.Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
if (lastComparison != 0) {
return lastComparison;
}
@@ -372,16 +342,16 @@ public class ReplicationCoordinatorException extends TException implements org.a
}
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("ReplicationCoordinatorException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ReplicationCoordinatorException(");
boolean first = true;
sb.append("code:");
@@ -416,7 +386,7 @@ public class ReplicationCoordinatorException extends TException implements org.a
}
}
- 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) {
@@ -424,13 +394,13 @@ public class ReplicationCoordinatorException extends TException implements org.a
}
}
- private static class ReplicationCoordinatorExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class ReplicationCoordinatorExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ReplicationCoordinatorExceptionStandardScheme getScheme() {
return new ReplicationCoordinatorExceptionStandardScheme();
}
}
- private static class ReplicationCoordinatorExceptionStandardScheme extends StandardScheme<ReplicationCoordinatorException> {
+ private static class ReplicationCoordinatorExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<ReplicationCoordinatorException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ReplicationCoordinatorException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -489,18 +459,18 @@ public class ReplicationCoordinatorException extends TException implements org.a
}
- private static class ReplicationCoordinatorExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class ReplicationCoordinatorExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ReplicationCoordinatorExceptionTupleScheme getScheme() {
return new ReplicationCoordinatorExceptionTupleScheme();
}
}
- private static class ReplicationCoordinatorExceptionTupleScheme extends TupleScheme<ReplicationCoordinatorException> {
+ private static class ReplicationCoordinatorExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<ReplicationCoordinatorException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ReplicationCoordinatorException 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.isSetCode()) {
optionals.set(0);
}
@@ -518,8 +488,8 @@ public class ReplicationCoordinatorException extends TException implements org.a
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ReplicationCoordinatorException 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.code = org.apache.accumulo.core.replication.thrift.ReplicationCoordinatorErrorCode.findByValue(iprot.readI32());
struct.setCodeIsSet(true);
@@ -531,5 +501,9 @@ public class ReplicationCoordinatorException extends TException implements org.a
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
[21/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
Posted by ct...@apache.org.
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationToken.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationToken.java b/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationToken.java
index 9e2b3a0..ade9302 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationToken.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationToken.java
@@ -15,55 +15,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.security.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToken, TDelegationToken._Fields>, java.io.Serializable, Cloneable, Comparable<TDelegationToken> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDelegationToken");
private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", 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 TDelegationTokenStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TDelegationTokenTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TDelegationTokenStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TDelegationTokenTupleSchemeFactory();
- public ByteBuffer password; // required
+ public java.nio.ByteBuffer password; // required
public TAuthenticationTokenIdentifier identifier; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -71,10 +41,10 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
PASSWORD((short)1, "password"),
IDENTIFIER((short)2, "identifier");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,20 +92,20 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
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.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthenticationTokenIdentifier.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDelegationToken.class, metaDataMap);
}
@@ -143,7 +113,7 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
}
public TDelegationToken(
- ByteBuffer password,
+ java.nio.ByteBuffer password,
TAuthenticationTokenIdentifier identifier)
{
this();
@@ -178,16 +148,16 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
return password == null ? null : password.array();
}
- public ByteBuffer bufferForPassword() {
+ public java.nio.ByteBuffer bufferForPassword() {
return org.apache.thrift.TBaseHelper.copyBinary(password);
}
public TDelegationToken setPassword(byte[] password) {
- this.password = password == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(password, password.length));
+ this.password = password == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(password.clone());
return this;
}
- public TDelegationToken setPassword(ByteBuffer password) {
+ public TDelegationToken setPassword(java.nio.ByteBuffer password) {
this.password = org.apache.thrift.TBaseHelper.copyBinary(password);
return this;
}
@@ -231,13 +201,17 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PASSWORD:
if (value == null) {
unsetPassword();
} else {
- setPassword((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setPassword((byte[])value);
+ } else {
+ setPassword((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -252,7 +226,7 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PASSWORD:
return getPassword();
@@ -261,13 +235,13 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
return getIdentifier();
}
- 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) {
@@ -276,11 +250,11 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
case IDENTIFIER:
return isSetIdentifier();
}
- 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 TDelegationToken)
@@ -291,6 +265,8 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
public boolean equals(TDelegationToken that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_password = true && this.isSetPassword();
boolean that_present_password = true && that.isSetPassword();
@@ -315,19 +291,17 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_password = true && (isSetPassword());
- list.add(present_password);
- if (present_password)
- list.add(password);
+ hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287);
+ if (isSetPassword())
+ hashCode = hashCode * 8191 + password.hashCode();
- boolean present_identifier = true && (isSetIdentifier());
- list.add(present_identifier);
- if (present_identifier)
- list.add(identifier);
+ hashCode = hashCode * 8191 + ((isSetIdentifier()) ? 131071 : 524287);
+ if (isSetIdentifier())
+ hashCode = hashCode * 8191 + identifier.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -338,7 +312,7 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
+ lastComparison = java.lang.Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
if (lastComparison != 0) {
return lastComparison;
}
@@ -348,7 +322,7 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(other.isSetIdentifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetIdentifier()).compareTo(other.isSetIdentifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -366,16 +340,16 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
}
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("TDelegationToken(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TDelegationToken(");
boolean first = true;
sb.append("password:");
@@ -413,7 +387,7 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
}
}
- 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) {
@@ -421,13 +395,13 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
}
}
- private static class TDelegationTokenStandardSchemeFactory implements SchemeFactory {
+ private static class TDelegationTokenStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDelegationTokenStandardScheme getScheme() {
return new TDelegationTokenStandardScheme();
}
}
- private static class TDelegationTokenStandardScheme extends StandardScheme<TDelegationToken> {
+ private static class TDelegationTokenStandardScheme extends org.apache.thrift.scheme.StandardScheme<TDelegationToken> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TDelegationToken struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -487,18 +461,18 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
}
- private static class TDelegationTokenTupleSchemeFactory implements SchemeFactory {
+ private static class TDelegationTokenTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDelegationTokenTupleScheme getScheme() {
return new TDelegationTokenTupleScheme();
}
}
- private static class TDelegationTokenTupleScheme extends TupleScheme<TDelegationToken> {
+ private static class TDelegationTokenTupleScheme extends org.apache.thrift.scheme.TupleScheme<TDelegationToken> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDelegationToken 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.isSetPassword()) {
optionals.set(0);
}
@@ -516,8 +490,8 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TDelegationToken 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.password = iprot.readBinary();
struct.setPasswordIsSet(true);
@@ -530,5 +504,9 @@ public class TDelegationToken implements org.apache.thrift.TBase<TDelegationToke
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationTokenConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationTokenConfig.java b/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationTokenConfig.java
index 21e5013..1025b07 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationTokenConfig.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/thrift/TDelegationTokenConfig.java
@@ -15,52 +15,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.security.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegationTokenConfig, TDelegationTokenConfig._Fields>, java.io.Serializable, Cloneable, Comparable<TDelegationTokenConfig> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDelegationTokenConfig");
private static final org.apache.thrift.protocol.TField LIFETIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lifetime", org.apache.thrift.protocol.TType.I64, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TDelegationTokenConfigStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TDelegationTokenConfigTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TDelegationTokenConfigStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TDelegationTokenConfigTupleSchemeFactory();
public long lifetime; // optional
@@ -68,10 +38,10 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
LIFETIME((short)1, "lifetime");
- 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);
}
}
@@ -94,21 +64,21 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
*/
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;
}
@@ -117,7 +87,7 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -126,12 +96,12 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
private static final int __LIFETIME_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.LIFETIME};
- 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.LIFETIME, new org.apache.thrift.meta_data.FieldMetaData("lifetime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDelegationTokenConfig.class, metaDataMap);
}
@@ -167,55 +137,55 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
}
public void unsetLifetime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIFETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LIFETIME_ISSET_ID);
}
/** Returns true if field lifetime is set (has been assigned a value) and false otherwise */
public boolean isSetLifetime() {
- return EncodingUtils.testBit(__isset_bitfield, __LIFETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIFETIME_ISSET_ID);
}
public void setLifetimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIFETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIFETIME_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case LIFETIME:
if (value == null) {
unsetLifetime();
} else {
- setLifetime((Long)value);
+ setLifetime((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LIFETIME:
return getLifetime();
}
- 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 LIFETIME:
return isSetLifetime();
}
- 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 TDelegationTokenConfig)
@@ -226,6 +196,8 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
public boolean equals(TDelegationTokenConfig that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_lifetime = true && this.isSetLifetime();
boolean that_present_lifetime = true && that.isSetLifetime();
@@ -241,14 +213,13 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_lifetime = true && (isSetLifetime());
- list.add(present_lifetime);
- if (present_lifetime)
- list.add(lifetime);
+ hashCode = hashCode * 8191 + ((isSetLifetime()) ? 131071 : 524287);
+ if (isSetLifetime())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lifetime);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -259,7 +230,7 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLifetime()).compareTo(other.isSetLifetime());
+ lastComparison = java.lang.Boolean.valueOf(isSetLifetime()).compareTo(other.isSetLifetime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -277,16 +248,16 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
}
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("TDelegationTokenConfig(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TDelegationTokenConfig(");
boolean first = true;
if (isSetLifetime()) {
@@ -311,7 +282,7 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -321,13 +292,13 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
}
}
- private static class TDelegationTokenConfigStandardSchemeFactory implements SchemeFactory {
+ private static class TDelegationTokenConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDelegationTokenConfigStandardScheme getScheme() {
return new TDelegationTokenConfigStandardScheme();
}
}
- private static class TDelegationTokenConfigStandardScheme extends StandardScheme<TDelegationTokenConfig> {
+ private static class TDelegationTokenConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<TDelegationTokenConfig> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TDelegationTokenConfig struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -373,18 +344,18 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
}
- private static class TDelegationTokenConfigTupleSchemeFactory implements SchemeFactory {
+ private static class TDelegationTokenConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDelegationTokenConfigTupleScheme getScheme() {
return new TDelegationTokenConfigTupleScheme();
}
}
- private static class TDelegationTokenConfigTupleScheme extends TupleScheme<TDelegationTokenConfig> {
+ private static class TDelegationTokenConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<TDelegationTokenConfig> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDelegationTokenConfig 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.isSetLifetime()) {
optionals.set(0);
}
@@ -396,8 +367,8 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TDelegationTokenConfig 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.lifetime = iprot.readI64();
struct.setLifetimeIsSet(true);
@@ -405,5 +376,9 @@ public class TDelegationTokenConfig implements org.apache.thrift.TBase<TDelegati
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActionStats.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActionStats.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActionStats.java
index 4997cf8..03c937a 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActionStats.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActionStats.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionStats._Fields>, java.io.Serializable, Cloneable, Comparable<ActionStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ActionStats");
@@ -63,11 +36,8 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
private static final org.apache.thrift.protocol.TField QUEUE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueTime", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
private static final org.apache.thrift.protocol.TField QUEUE_SUM_DEV_FIELD_DESC = new org.apache.thrift.protocol.TField("queueSumDev", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ActionStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ActionStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ActionStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ActionStatsTupleSchemeFactory();
public int status; // required
public double elapsed; // required
@@ -89,10 +59,10 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
QUEUE_TIME((short)7, "queueTime"),
QUEUE_SUM_DEV((short)8, "queueSumDev");
- 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);
}
}
@@ -129,21 +99,21 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
*/
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;
}
@@ -152,7 +122,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -167,9 +137,9 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
private static final int __QUEUETIME_ISSET_ID = 6;
private static final int __QUEUESUMDEV_ISSET_ID = 7;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.ELAPSED, new org.apache.thrift.meta_data.FieldMetaData("elapsed", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -186,7 +156,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.QUEUE_SUM_DEV, new org.apache.thrift.meta_data.FieldMetaData("queueSumDev", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ActionStats.class, metaDataMap);
}
@@ -272,16 +242,16 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
public void unsetStatus() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STATUS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATUS_ISSET_ID);
}
/** Returns true if field status is set (has been assigned a value) and false otherwise */
public boolean isSetStatus() {
- return EncodingUtils.testBit(__isset_bitfield, __STATUS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATUS_ISSET_ID);
}
public void setStatusIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STATUS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATUS_ISSET_ID, value);
}
public double getElapsed() {
@@ -295,16 +265,16 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
public void unsetElapsed() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ELAPSED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ELAPSED_ISSET_ID);
}
/** Returns true if field elapsed is set (has been assigned a value) and false otherwise */
public boolean isSetElapsed() {
- return EncodingUtils.testBit(__isset_bitfield, __ELAPSED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ELAPSED_ISSET_ID);
}
public void setElapsedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ELAPSED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ELAPSED_ISSET_ID, value);
}
public int getNum() {
@@ -318,16 +288,16 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
public void unsetNum() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUM_ISSET_ID);
}
/** Returns true if field num is set (has been assigned a value) and false otherwise */
public boolean isSetNum() {
- return EncodingUtils.testBit(__isset_bitfield, __NUM_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUM_ISSET_ID);
}
public void setNumIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUM_ISSET_ID, value);
}
public long getCount() {
@@ -341,16 +311,16 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
public void unsetCount() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID);
}
/** Returns true if field count is set (has been assigned a value) and false otherwise */
public boolean isSetCount() {
- return EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID);
}
public void setCountIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value);
}
public double getSumDev() {
@@ -364,16 +334,16 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
public void unsetSumDev() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUMDEV_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUMDEV_ISSET_ID);
}
/** Returns true if field sumDev is set (has been assigned a value) and false otherwise */
public boolean isSetSumDev() {
- return EncodingUtils.testBit(__isset_bitfield, __SUMDEV_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUMDEV_ISSET_ID);
}
public void setSumDevIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUMDEV_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUMDEV_ISSET_ID, value);
}
public int getFail() {
@@ -387,16 +357,16 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
public void unsetFail() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FAIL_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FAIL_ISSET_ID);
}
/** Returns true if field fail is set (has been assigned a value) and false otherwise */
public boolean isSetFail() {
- return EncodingUtils.testBit(__isset_bitfield, __FAIL_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FAIL_ISSET_ID);
}
public void setFailIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FAIL_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FAIL_ISSET_ID, value);
}
public double getQueueTime() {
@@ -410,16 +380,16 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
public void unsetQueueTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUEUETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUEUETIME_ISSET_ID);
}
/** Returns true if field queueTime is set (has been assigned a value) and false otherwise */
public boolean isSetQueueTime() {
- return EncodingUtils.testBit(__isset_bitfield, __QUEUETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUEUETIME_ISSET_ID);
}
public void setQueueTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUEUETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUEUETIME_ISSET_ID, value);
}
public double getQueueSumDev() {
@@ -433,25 +403,25 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
public void unsetQueueSumDev() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID);
}
/** Returns true if field queueSumDev is set (has been assigned a value) and false otherwise */
public boolean isSetQueueSumDev() {
- return EncodingUtils.testBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID);
}
public void setQueueSumDevIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUEUESUMDEV_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case STATUS:
if (value == null) {
unsetStatus();
} else {
- setStatus((Integer)value);
+ setStatus((java.lang.Integer)value);
}
break;
@@ -459,7 +429,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
if (value == null) {
unsetElapsed();
} else {
- setElapsed((Double)value);
+ setElapsed((java.lang.Double)value);
}
break;
@@ -467,7 +437,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
if (value == null) {
unsetNum();
} else {
- setNum((Integer)value);
+ setNum((java.lang.Integer)value);
}
break;
@@ -475,7 +445,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
if (value == null) {
unsetCount();
} else {
- setCount((Long)value);
+ setCount((java.lang.Long)value);
}
break;
@@ -483,7 +453,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
if (value == null) {
unsetSumDev();
} else {
- setSumDev((Double)value);
+ setSumDev((java.lang.Double)value);
}
break;
@@ -491,7 +461,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
if (value == null) {
unsetFail();
} else {
- setFail((Integer)value);
+ setFail((java.lang.Integer)value);
}
break;
@@ -499,7 +469,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
if (value == null) {
unsetQueueTime();
} else {
- setQueueTime((Double)value);
+ setQueueTime((java.lang.Double)value);
}
break;
@@ -507,14 +477,14 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
if (value == null) {
unsetQueueSumDev();
} else {
- setQueueSumDev((Double)value);
+ setQueueSumDev((java.lang.Double)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STATUS:
return getStatus();
@@ -541,13 +511,13 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return getQueueSumDev();
}
- 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) {
@@ -568,11 +538,11 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
case QUEUE_SUM_DEV:
return isSetQueueSumDev();
}
- 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 ActionStats)
@@ -583,6 +553,8 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
public boolean equals(ActionStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_status = true;
boolean that_present_status = true;
@@ -661,49 +633,25 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_status = true;
- list.add(present_status);
- if (present_status)
- list.add(status);
+ hashCode = hashCode * 8191 + status;
- boolean present_elapsed = true;
- list.add(present_elapsed);
- if (present_elapsed)
- list.add(elapsed);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(elapsed);
- boolean present_num = true;
- list.add(present_num);
- if (present_num)
- list.add(num);
+ hashCode = hashCode * 8191 + num;
- boolean present_count = true;
- list.add(present_count);
- if (present_count)
- list.add(count);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(count);
- boolean present_sumDev = true;
- list.add(present_sumDev);
- if (present_sumDev)
- list.add(sumDev);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sumDev);
- boolean present_fail = true;
- list.add(present_fail);
- if (present_fail)
- list.add(fail);
+ hashCode = hashCode * 8191 + fail;
- boolean present_queueTime = true;
- list.add(present_queueTime);
- if (present_queueTime)
- list.add(queueTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queueTime);
- boolean present_queueSumDev = true;
- list.add(present_queueSumDev);
- if (present_queueSumDev)
- list.add(queueSumDev);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queueSumDev);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -714,7 +662,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
+ lastComparison = java.lang.Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
@@ -724,7 +672,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetElapsed()).compareTo(other.isSetElapsed());
+ lastComparison = java.lang.Boolean.valueOf(isSetElapsed()).compareTo(other.isSetElapsed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -734,7 +682,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNum()).compareTo(other.isSetNum());
+ lastComparison = java.lang.Boolean.valueOf(isSetNum()).compareTo(other.isSetNum());
if (lastComparison != 0) {
return lastComparison;
}
@@ -744,7 +692,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCount()).compareTo(other.isSetCount());
+ lastComparison = java.lang.Boolean.valueOf(isSetCount()).compareTo(other.isSetCount());
if (lastComparison != 0) {
return lastComparison;
}
@@ -754,7 +702,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSumDev()).compareTo(other.isSetSumDev());
+ lastComparison = java.lang.Boolean.valueOf(isSetSumDev()).compareTo(other.isSetSumDev());
if (lastComparison != 0) {
return lastComparison;
}
@@ -764,7 +712,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFail()).compareTo(other.isSetFail());
+ lastComparison = java.lang.Boolean.valueOf(isSetFail()).compareTo(other.isSetFail());
if (lastComparison != 0) {
return lastComparison;
}
@@ -774,7 +722,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQueueTime()).compareTo(other.isSetQueueTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueueTime()).compareTo(other.isSetQueueTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -784,7 +732,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQueueSumDev()).compareTo(other.isSetQueueSumDev());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueueSumDev()).compareTo(other.isSetQueueSumDev());
if (lastComparison != 0) {
return lastComparison;
}
@@ -802,16 +750,16 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
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("ActionStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ActionStats(");
boolean first = true;
sb.append("status:");
@@ -862,7 +810,7 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -872,13 +820,13 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
}
- private static class ActionStatsStandardSchemeFactory implements SchemeFactory {
+ private static class ActionStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActionStatsStandardScheme getScheme() {
return new ActionStatsStandardScheme();
}
}
- private static class ActionStatsStandardScheme extends StandardScheme<ActionStats> {
+ private static class ActionStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ActionStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ActionStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -999,18 +947,18 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
- private static class ActionStatsTupleSchemeFactory implements SchemeFactory {
+ private static class ActionStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ActionStatsTupleScheme getScheme() {
return new ActionStatsTupleScheme();
}
}
- private static class ActionStatsTupleScheme extends TupleScheme<ActionStats> {
+ private static class ActionStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ActionStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ActionStats 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.isSetStatus()) {
optionals.set(0);
}
@@ -1064,8 +1012,8 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ActionStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(8);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.status = iprot.readI32();
struct.setStatusIsSet(true);
@@ -1101,5 +1049,9 @@ public class ActionStats implements org.apache.thrift.TBase<ActionStats, ActionS
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}