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:58 UTC
[30/41] accumulo git commit: ACCUMULO-4551 Add thrift-gen changes
from 0.10.0
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),