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),