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:53 UTC
[25/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/TabletSplit.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
index 48d4465..ace2df8 100644
--- a/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
+++ b/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
@@ -15,66 +15,36 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.master.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletSplit._Fields>, java.io.Serializable, Cloneable, Comparable<TabletSplit> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletSplit");
private static final org.apache.thrift.protocol.TField OLD_TABLET_FIELD_DESC = new org.apache.thrift.protocol.TField("oldTablet", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField NEW_TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("newTablets", org.apache.thrift.protocol.TType.LIST, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TabletSplitStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TabletSplitTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TabletSplitStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TabletSplitTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent oldTablet; // required
- public List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets; // required
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
OLD_TABLET((short)1, "oldTablet"),
NEW_TABLETS((short)2, "newTablets");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,21 +92,21 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.OLD_TABLET, new org.apache.thrift.meta_data.FieldMetaData("oldTablet", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
tmpMap.put(_Fields.NEW_TABLETS, new org.apache.thrift.meta_data.FieldMetaData("newTablets", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TabletSplit.class, metaDataMap);
}
@@ -145,7 +115,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
public TabletSplit(
org.apache.accumulo.core.data.thrift.TKeyExtent oldTablet,
- List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets)
+ java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets)
{
this();
this.oldTablet = oldTablet;
@@ -160,7 +130,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
this.oldTablet = new org.apache.accumulo.core.data.thrift.TKeyExtent(other.oldTablet);
}
if (other.isSetNewTablets()) {
- List<org.apache.accumulo.core.data.thrift.TKeyExtent> __this__newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(other.newTablets.size());
+ java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> __this__newTablets = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(other.newTablets.size());
for (org.apache.accumulo.core.data.thrift.TKeyExtent other_element : other.newTablets) {
__this__newTablets.add(new org.apache.accumulo.core.data.thrift.TKeyExtent(other_element));
}
@@ -212,16 +182,16 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
public void addToNewTablets(org.apache.accumulo.core.data.thrift.TKeyExtent elem) {
if (this.newTablets == null) {
- this.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>();
+ this.newTablets = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>();
}
this.newTablets.add(elem);
}
- public List<org.apache.accumulo.core.data.thrift.TKeyExtent> getNewTablets() {
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> getNewTablets() {
return this.newTablets;
}
- public TabletSplit setNewTablets(List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets) {
+ public TabletSplit setNewTablets(java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent> newTablets) {
this.newTablets = newTablets;
return this;
}
@@ -241,7 +211,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case OLD_TABLET:
if (value == null) {
@@ -255,14 +225,14 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
if (value == null) {
unsetNewTablets();
} else {
- setNewTablets((List<org.apache.accumulo.core.data.thrift.TKeyExtent>)value);
+ setNewTablets((java.util.List<org.apache.accumulo.core.data.thrift.TKeyExtent>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case OLD_TABLET:
return getOldTablet();
@@ -271,13 +241,13 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
return getNewTablets();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -286,11 +256,11 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
case NEW_TABLETS:
return isSetNewTablets();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TabletSplit)
@@ -301,6 +271,8 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
public boolean equals(TabletSplit that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_oldTablet = true && this.isSetOldTablet();
boolean that_present_oldTablet = true && that.isSetOldTablet();
@@ -325,19 +297,17 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_oldTablet = true && (isSetOldTablet());
- list.add(present_oldTablet);
- if (present_oldTablet)
- list.add(oldTablet);
+ hashCode = hashCode * 8191 + ((isSetOldTablet()) ? 131071 : 524287);
+ if (isSetOldTablet())
+ hashCode = hashCode * 8191 + oldTablet.hashCode();
- boolean present_newTablets = true && (isSetNewTablets());
- list.add(present_newTablets);
- if (present_newTablets)
- list.add(newTablets);
+ hashCode = hashCode * 8191 + ((isSetNewTablets()) ? 131071 : 524287);
+ if (isSetNewTablets())
+ hashCode = hashCode * 8191 + newTablets.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -348,7 +318,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetOldTablet()).compareTo(other.isSetOldTablet());
+ lastComparison = java.lang.Boolean.valueOf(isSetOldTablet()).compareTo(other.isSetOldTablet());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,7 +328,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNewTablets()).compareTo(other.isSetNewTablets());
+ lastComparison = java.lang.Boolean.valueOf(isSetNewTablets()).compareTo(other.isSetNewTablets());
if (lastComparison != 0) {
return lastComparison;
}
@@ -376,16 +346,16 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TabletSplit(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TabletSplit(");
boolean first = true;
sb.append("oldTablet:");
@@ -423,7 +393,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -431,13 +401,13 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
}
- private static class TabletSplitStandardSchemeFactory implements SchemeFactory {
+ private static class TabletSplitStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletSplitStandardScheme getScheme() {
return new TabletSplitStandardScheme();
}
}
- private static class TabletSplitStandardScheme extends StandardScheme<TabletSplit> {
+ private static class TabletSplitStandardScheme extends org.apache.thrift.scheme.StandardScheme<TabletSplit> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TabletSplit struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -462,7 +432,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
- struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list78.size);
+ struct.newTablets = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list78.size);
org.apache.accumulo.core.data.thrift.TKeyExtent _elem79;
for (int _i80 = 0; _i80 < _list78.size; ++_i80)
{
@@ -515,18 +485,18 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
- private static class TabletSplitTupleSchemeFactory implements SchemeFactory {
+ private static class TabletSplitTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletSplitTupleScheme getScheme() {
return new TabletSplitTupleScheme();
}
}
- private static class TabletSplitTupleScheme extends TupleScheme<TabletSplit> {
+ private static class TabletSplitTupleScheme extends org.apache.thrift.scheme.TupleScheme<TabletSplit> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TabletSplit struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetOldTablet()) {
optionals.set(0);
}
@@ -550,8 +520,8 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TabletSplit struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.oldTablet = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.oldTablet.read(iprot);
@@ -560,7 +530,7 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list83.size);
+ struct.newTablets = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(_list83.size);
org.apache.accumulo.core.data.thrift.TKeyExtent _elem84;
for (int _i85 = 0; _i85 < _list83.size; ++_i85)
{
@@ -574,5 +544,9 @@ public class TabletSplit implements org.apache.thrift.TBase<TabletSplit, TabletS
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java
index dd70af1..4a1aa09 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/KeyValues.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.replication.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._Fields>, java.io.Serializable, Cloneable, Comparable<KeyValues> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("KeyValues");
private static final org.apache.thrift.protocol.TField KEY_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("keyValues", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new KeyValuesStandardSchemeFactory());
- schemes.put(TupleScheme.class, new KeyValuesTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new KeyValuesStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new KeyValuesTupleSchemeFactory();
- public List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues; // required
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
KEY_VALUES((short)1, "keyValues");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -117,19 +87,19 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.KEY_VALUES, new org.apache.thrift.meta_data.FieldMetaData("keyValues", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyValue.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(KeyValues.class, metaDataMap);
}
@@ -137,7 +107,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
public KeyValues(
- List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues)
+ java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues)
{
this();
this.keyValues = keyValues;
@@ -148,7 +118,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
*/
public KeyValues(KeyValues other) {
if (other.isSetKeyValues()) {
- List<org.apache.accumulo.core.data.thrift.TKeyValue> __this__keyValues = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(other.keyValues.size());
+ java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> __this__keyValues = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(other.keyValues.size());
for (org.apache.accumulo.core.data.thrift.TKeyValue other_element : other.keyValues) {
__this__keyValues.add(new org.apache.accumulo.core.data.thrift.TKeyValue(other_element));
}
@@ -175,16 +145,16 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
public void addToKeyValues(org.apache.accumulo.core.data.thrift.TKeyValue elem) {
if (this.keyValues == null) {
- this.keyValues = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>();
+ this.keyValues = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>();
}
this.keyValues.add(elem);
}
- public List<org.apache.accumulo.core.data.thrift.TKeyValue> getKeyValues() {
+ public java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> getKeyValues() {
return this.keyValues;
}
- public KeyValues setKeyValues(List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues) {
+ public KeyValues setKeyValues(java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue> keyValues) {
this.keyValues = keyValues;
return this;
}
@@ -204,43 +174,43 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case KEY_VALUES:
if (value == null) {
unsetKeyValues();
} else {
- setKeyValues((List<org.apache.accumulo.core.data.thrift.TKeyValue>)value);
+ setKeyValues((java.util.List<org.apache.accumulo.core.data.thrift.TKeyValue>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case KEY_VALUES:
return getKeyValues();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case KEY_VALUES:
return isSetKeyValues();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof KeyValues)
@@ -251,6 +221,8 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
public boolean equals(KeyValues that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_keyValues = true && this.isSetKeyValues();
boolean that_present_keyValues = true && that.isSetKeyValues();
@@ -266,14 +238,13 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_keyValues = true && (isSetKeyValues());
- list.add(present_keyValues);
- if (present_keyValues)
- list.add(keyValues);
+ hashCode = hashCode * 8191 + ((isSetKeyValues()) ? 131071 : 524287);
+ if (isSetKeyValues())
+ hashCode = hashCode * 8191 + keyValues.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -284,7 +255,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetKeyValues()).compareTo(other.isSetKeyValues());
+ lastComparison = java.lang.Boolean.valueOf(isSetKeyValues()).compareTo(other.isSetKeyValues());
if (lastComparison != 0) {
return lastComparison;
}
@@ -302,16 +273,16 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("KeyValues(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("KeyValues(");
boolean first = true;
sb.append("keyValues:");
@@ -338,7 +309,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -346,13 +317,13 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
}
- private static class KeyValuesStandardSchemeFactory implements SchemeFactory {
+ private static class KeyValuesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyValuesStandardScheme getScheme() {
return new KeyValuesStandardScheme();
}
}
- private static class KeyValuesStandardScheme extends StandardScheme<KeyValues> {
+ private static class KeyValuesStandardScheme extends org.apache.thrift.scheme.StandardScheme<KeyValues> {
public void read(org.apache.thrift.protocol.TProtocol iprot, KeyValues struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -368,7 +339,7 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.keyValues = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(_list8.size);
+ struct.keyValues = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(_list8.size);
org.apache.accumulo.core.data.thrift.TKeyValue _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
@@ -416,18 +387,18 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
- private static class KeyValuesTupleSchemeFactory implements SchemeFactory {
+ private static class KeyValuesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public KeyValuesTupleScheme getScheme() {
return new KeyValuesTupleScheme();
}
}
- private static class KeyValuesTupleScheme extends TupleScheme<KeyValues> {
+ private static class KeyValuesTupleScheme extends org.apache.thrift.scheme.TupleScheme<KeyValues> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, KeyValues struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetKeyValues()) {
optionals.set(0);
}
@@ -445,12 +416,12 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, KeyValues struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.keyValues = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(_list13.size);
+ struct.keyValues = new java.util.ArrayList<org.apache.accumulo.core.data.thrift.TKeyValue>(_list13.size);
org.apache.accumulo.core.data.thrift.TKeyValue _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
@@ -464,5 +435,9 @@ public class KeyValues implements org.apache.thrift.TBase<KeyValues, KeyValues._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
index 2ec6a15..464b3e6 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationErrorCode.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.replication.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum RemoteReplicationErrorCode implements org.apache.thrift.TEnum {
+public enum RemoteReplicationErrorCode implements org.apache.thrift.TEnum {
COULD_NOT_DESERIALIZE(0),
COULD_NOT_APPLY(1),
TABLE_DOES_NOT_EXIST(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
index 5b4a9d1..db22b3e 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/thrift/RemoteReplicationException.java
@@ -15,60 +15,30 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.replication.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class RemoteReplicationException extends TException implements org.apache.thrift.TBase<RemoteReplicationException, RemoteReplicationException._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteReplicationException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class RemoteReplicationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<RemoteReplicationException, RemoteReplicationException._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteReplicationException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RemoteReplicationException");
private static final org.apache.thrift.protocol.TField CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("reason", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new RemoteReplicationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new RemoteReplicationExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new RemoteReplicationExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new RemoteReplicationExceptionTupleSchemeFactory();
/**
*
* @see RemoteReplicationErrorCode
*/
public RemoteReplicationErrorCode code; // required
- public String reason; // required
+ public java.lang.String reason; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -79,10 +49,10 @@ public class RemoteReplicationException extends TException implements org.apache
CODE((short)1, "code"),
REASON((short)2, "reason");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -107,21 +77,21 @@ public class RemoteReplicationException extends TException implements org.apache
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -130,20 +100,20 @@ public class RemoteReplicationException extends TException implements org.apache
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, RemoteReplicationErrorCode.class)));
tmpMap.put(_Fields.REASON, new org.apache.thrift.meta_data.FieldMetaData("reason", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RemoteReplicationException.class, metaDataMap);
}
@@ -152,7 +122,7 @@ public class RemoteReplicationException extends TException implements org.apache
public RemoteReplicationException(
RemoteReplicationErrorCode code,
- String reason)
+ java.lang.String reason)
{
this();
this.code = code;
@@ -213,11 +183,11 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
- public String getReason() {
+ public java.lang.String getReason() {
return this.reason;
}
- public RemoteReplicationException setReason(String reason) {
+ public RemoteReplicationException setReason(java.lang.String reason) {
this.reason = reason;
return this;
}
@@ -237,7 +207,7 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CODE:
if (value == null) {
@@ -251,14 +221,14 @@ public class RemoteReplicationException extends TException implements org.apache
if (value == null) {
unsetReason();
} else {
- setReason((String)value);
+ setReason((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CODE:
return getCode();
@@ -267,13 +237,13 @@ public class RemoteReplicationException extends TException implements org.apache
return getReason();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -282,11 +252,11 @@ public class RemoteReplicationException extends TException implements org.apache
case REASON:
return isSetReason();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof RemoteReplicationException)
@@ -297,6 +267,8 @@ public class RemoteReplicationException extends TException implements org.apache
public boolean equals(RemoteReplicationException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_code = true && this.isSetCode();
boolean that_present_code = true && that.isSetCode();
@@ -321,19 +293,17 @@ public class RemoteReplicationException extends TException implements org.apache
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_code = true && (isSetCode());
- list.add(present_code);
- if (present_code)
- list.add(code.getValue());
+ hashCode = hashCode * 8191 + ((isSetCode()) ? 131071 : 524287);
+ if (isSetCode())
+ hashCode = hashCode * 8191 + code.getValue();
- boolean present_reason = true && (isSetReason());
- list.add(present_reason);
- if (present_reason)
- list.add(reason);
+ hashCode = hashCode * 8191 + ((isSetReason()) ? 131071 : 524287);
+ if (isSetReason())
+ hashCode = hashCode * 8191 + reason.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -344,7 +314,7 @@ public class RemoteReplicationException extends TException implements org.apache
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
+ lastComparison = java.lang.Boolean.valueOf(isSetCode()).compareTo(other.isSetCode());
if (lastComparison != 0) {
return lastComparison;
}
@@ -354,7 +324,7 @@ public class RemoteReplicationException extends TException implements org.apache
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
+ lastComparison = java.lang.Boolean.valueOf(isSetReason()).compareTo(other.isSetReason());
if (lastComparison != 0) {
return lastComparison;
}
@@ -372,16 +342,16 @@ public class RemoteReplicationException extends TException implements org.apache
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("RemoteReplicationException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("RemoteReplicationException(");
boolean first = true;
sb.append("code:");
@@ -416,7 +386,7 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -424,13 +394,13 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
- private static class RemoteReplicationExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class RemoteReplicationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RemoteReplicationExceptionStandardScheme getScheme() {
return new RemoteReplicationExceptionStandardScheme();
}
}
- private static class RemoteReplicationExceptionStandardScheme extends StandardScheme<RemoteReplicationException> {
+ private static class RemoteReplicationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<RemoteReplicationException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteReplicationException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -489,18 +459,18 @@ public class RemoteReplicationException extends TException implements org.apache
}
- private static class RemoteReplicationExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class RemoteReplicationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public RemoteReplicationExceptionTupleScheme getScheme() {
return new RemoteReplicationExceptionTupleScheme();
}
}
- private static class RemoteReplicationExceptionTupleScheme extends TupleScheme<RemoteReplicationException> {
+ private static class RemoteReplicationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<RemoteReplicationException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, RemoteReplicationException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetCode()) {
optionals.set(0);
}
@@ -518,8 +488,8 @@ public class RemoteReplicationException extends TException implements org.apache
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, RemoteReplicationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.code = org.apache.accumulo.core.replication.thrift.RemoteReplicationErrorCode.findByValue(iprot.readI32());
struct.setCodeIsSet(true);
@@ -531,5 +501,9 @@ public class RemoteReplicationException extends TException implements org.apache
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}