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:44 UTC
[16/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/tabletserver/thrift/TabletStats.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
index 95dd551..8051bf4 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletStats._Fields>, java.io.Serializable, Cloneable, Comparable<TabletStats> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletStats");
@@ -63,11 +36,8 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
private static final org.apache.thrift.protocol.TField QUERY_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryRate", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
private static final org.apache.thrift.protocol.TField SPLIT_CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("splitCreationTime", org.apache.thrift.protocol.TType.I64, (short)8);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TabletStatsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TabletStatsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TabletStatsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TabletStatsTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
public ActionStats majors; // required
@@ -89,10 +59,10 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
QUERY_RATE((short)7, "queryRate"),
SPLIT_CREATION_TIME((short)8, "splitCreationTime");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -129,21 +99,21 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -152,7 +122,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -163,9 +133,9 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
private static final int __QUERYRATE_ISSET_ID = 2;
private static final int __SPLITCREATIONTIME_ISSET_ID = 3;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
tmpMap.put(_Fields.MAJORS, new org.apache.thrift.meta_data.FieldMetaData("majors", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -182,7 +152,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.SPLIT_CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("splitCreationTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TabletStats.class, metaDataMap);
}
@@ -364,16 +334,16 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void unsetNumEntries() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
}
/** Returns true if field numEntries is set (has been assigned a value) and false otherwise */
public boolean isSetNumEntries() {
- return EncodingUtils.testBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
}
public void setNumEntriesIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMENTRIES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUMENTRIES_ISSET_ID, value);
}
public double getIngestRate() {
@@ -387,16 +357,16 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void unsetIngestRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
}
/** Returns true if field ingestRate is set (has been assigned a value) and false otherwise */
public boolean isSetIngestRate() {
- return EncodingUtils.testBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
}
public void setIngestRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INGESTRATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INGESTRATE_ISSET_ID, value);
}
public double getQueryRate() {
@@ -410,16 +380,16 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void unsetQueryRate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
}
/** Returns true if field queryRate is set (has been assigned a value) and false otherwise */
public boolean isSetQueryRate() {
- return EncodingUtils.testBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
}
public void setQueryRateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUERYRATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYRATE_ISSET_ID, value);
}
public long getSplitCreationTime() {
@@ -433,19 +403,19 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void unsetSplitCreationTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
}
/** Returns true if field splitCreationTime is set (has been assigned a value) and false otherwise */
public boolean isSetSplitCreationTime() {
- return EncodingUtils.testBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
}
public void setSplitCreationTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXTENT:
if (value == null) {
@@ -483,7 +453,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
if (value == null) {
unsetNumEntries();
} else {
- setNumEntries((Long)value);
+ setNumEntries((java.lang.Long)value);
}
break;
@@ -491,7 +461,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
if (value == null) {
unsetIngestRate();
} else {
- setIngestRate((Double)value);
+ setIngestRate((java.lang.Double)value);
}
break;
@@ -499,7 +469,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
if (value == null) {
unsetQueryRate();
} else {
- setQueryRate((Double)value);
+ setQueryRate((java.lang.Double)value);
}
break;
@@ -507,14 +477,14 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
if (value == null) {
unsetSplitCreationTime();
} else {
- setSplitCreationTime((Long)value);
+ setSplitCreationTime((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXTENT:
return getExtent();
@@ -541,13 +511,13 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return getSplitCreationTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -568,11 +538,11 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
case SPLIT_CREATION_TIME:
return isSetSplitCreationTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TabletStats)
@@ -583,6 +553,8 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
public boolean equals(TabletStats that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_extent = true && this.isSetExtent();
boolean that_present_extent = true && that.isSetExtent();
@@ -661,49 +633,33 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
- boolean present_majors = true && (isSetMajors());
- list.add(present_majors);
- if (present_majors)
- list.add(majors);
+ hashCode = hashCode * 8191 + ((isSetMajors()) ? 131071 : 524287);
+ if (isSetMajors())
+ hashCode = hashCode * 8191 + majors.hashCode();
- boolean present_minors = true && (isSetMinors());
- list.add(present_minors);
- if (present_minors)
- list.add(minors);
+ hashCode = hashCode * 8191 + ((isSetMinors()) ? 131071 : 524287);
+ if (isSetMinors())
+ hashCode = hashCode * 8191 + minors.hashCode();
- boolean present_splits = true && (isSetSplits());
- list.add(present_splits);
- if (present_splits)
- list.add(splits);
+ hashCode = hashCode * 8191 + ((isSetSplits()) ? 131071 : 524287);
+ if (isSetSplits())
+ hashCode = hashCode * 8191 + splits.hashCode();
- boolean present_numEntries = true;
- list.add(present_numEntries);
- if (present_numEntries)
- list.add(numEntries);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(numEntries);
- boolean present_ingestRate = true;
- list.add(present_ingestRate);
- if (present_ingestRate)
- list.add(ingestRate);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(ingestRate);
- boolean present_queryRate = true;
- list.add(present_queryRate);
- if (present_queryRate)
- list.add(queryRate);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryRate);
- boolean present_splitCreationTime = true;
- list.add(present_splitCreationTime);
- if (present_splitCreationTime)
- list.add(splitCreationTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(splitCreationTime);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -714,7 +670,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -724,7 +680,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMajors()).compareTo(other.isSetMajors());
+ lastComparison = java.lang.Boolean.valueOf(isSetMajors()).compareTo(other.isSetMajors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -734,7 +690,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMinors()).compareTo(other.isSetMinors());
+ lastComparison = java.lang.Boolean.valueOf(isSetMinors()).compareTo(other.isSetMinors());
if (lastComparison != 0) {
return lastComparison;
}
@@ -744,7 +700,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSplits()).compareTo(other.isSetSplits());
+ lastComparison = java.lang.Boolean.valueOf(isSetSplits()).compareTo(other.isSetSplits());
if (lastComparison != 0) {
return lastComparison;
}
@@ -754,7 +710,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNumEntries()).compareTo(other.isSetNumEntries());
+ lastComparison = java.lang.Boolean.valueOf(isSetNumEntries()).compareTo(other.isSetNumEntries());
if (lastComparison != 0) {
return lastComparison;
}
@@ -764,7 +720,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIngestRate()).compareTo(other.isSetIngestRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetIngestRate()).compareTo(other.isSetIngestRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -774,7 +730,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQueryRate()).compareTo(other.isSetQueryRate());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueryRate()).compareTo(other.isSetQueryRate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -784,7 +740,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSplitCreationTime()).compareTo(other.isSetSplitCreationTime());
+ lastComparison = java.lang.Boolean.valueOf(isSetSplitCreationTime()).compareTo(other.isSetSplitCreationTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -802,16 +758,16 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TabletStats(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TabletStats(");
boolean first = true;
sb.append("extent:");
@@ -890,7 +846,7 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -900,13 +856,13 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
}
- private static class TabletStatsStandardSchemeFactory implements SchemeFactory {
+ private static class TabletStatsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletStatsStandardScheme getScheme() {
return new TabletStatsStandardScheme();
}
}
- private static class TabletStatsStandardScheme extends StandardScheme<TabletStats> {
+ private static class TabletStatsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TabletStats> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TabletStats struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1039,18 +995,18 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
- private static class TabletStatsTupleSchemeFactory implements SchemeFactory {
+ private static class TabletStatsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TabletStatsTupleScheme getScheme() {
return new TabletStatsTupleScheme();
}
}
- private static class TabletStatsTupleScheme extends TupleScheme<TabletStats> {
+ private static class TabletStatsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TabletStats> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TabletStats struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetExtent()) {
optionals.set(0);
}
@@ -1104,8 +1060,8 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TabletStats struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(8);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.extent.read(iprot);
@@ -1145,5 +1101,9 @@ public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletS
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
index 09ef8f8..ce5f1c5 100644
--- a/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
+++ b/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
@@ -15,52 +15,22 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.tabletserver.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class TooManyFilesException extends TException implements org.apache.thrift.TBase<TooManyFilesException, TooManyFilesException._Fields>, java.io.Serializable, Cloneable, Comparable<TooManyFilesException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class TooManyFilesException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TooManyFilesException, TooManyFilesException._Fields>, java.io.Serializable, Cloneable, Comparable<TooManyFilesException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TooManyFilesException");
private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TooManyFilesExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TooManyFilesExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TooManyFilesExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TooManyFilesExceptionTupleSchemeFactory();
public org.apache.accumulo.core.data.thrift.TKeyExtent extent; // required
@@ -68,10 +38,10 @@ public class TooManyFilesException extends TException implements org.apache.thri
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXTENT((short)1, "extent");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class TooManyFilesException extends TException implements org.apache.thri
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -117,18 +87,18 @@ public class TooManyFilesException extends TException implements org.apache.thri
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TooManyFilesException.class, metaDataMap);
}
@@ -184,7 +154,7 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXTENT:
if (value == null) {
@@ -197,30 +167,30 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXTENT:
return getExtent();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EXTENT:
return isSetExtent();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TooManyFilesException)
@@ -231,6 +201,8 @@ public class TooManyFilesException extends TException implements org.apache.thri
public boolean equals(TooManyFilesException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_extent = true && this.isSetExtent();
boolean that_present_extent = true && that.isSetExtent();
@@ -246,14 +218,13 @@ public class TooManyFilesException extends TException implements org.apache.thri
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_extent = true && (isSetExtent());
- list.add(present_extent);
- if (present_extent)
- list.add(extent);
+ hashCode = hashCode * 8191 + ((isSetExtent()) ? 131071 : 524287);
+ if (isSetExtent())
+ hashCode = hashCode * 8191 + extent.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class TooManyFilesException extends TException implements org.apache.thri
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
+ lastComparison = java.lang.Boolean.valueOf(isSetExtent()).compareTo(other.isSetExtent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TooManyFilesException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TooManyFilesException(");
boolean first = true;
sb.append("extent:");
@@ -321,7 +292,7 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -329,13 +300,13 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
- private static class TooManyFilesExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TooManyFilesExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TooManyFilesExceptionStandardScheme getScheme() {
return new TooManyFilesExceptionStandardScheme();
}
}
- private static class TooManyFilesExceptionStandardScheme extends StandardScheme<TooManyFilesException> {
+ private static class TooManyFilesExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TooManyFilesException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TooManyFilesException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -382,18 +353,18 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
- private static class TooManyFilesExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TooManyFilesExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TooManyFilesExceptionTupleScheme getScheme() {
return new TooManyFilesExceptionTupleScheme();
}
}
- private static class TooManyFilesExceptionTupleScheme extends TupleScheme<TooManyFilesException> {
+ private static class TooManyFilesExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TooManyFilesException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TooManyFilesException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetExtent()) {
optionals.set(0);
}
@@ -405,8 +376,8 @@ public class TooManyFilesException extends TException implements org.apache.thri
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TooManyFilesException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
struct.extent.read(iprot);
@@ -415,5 +386,9 @@ public class TooManyFilesException extends TException implements org.apache.thri
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java b/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
index f96b634..4e904c4 100644
--- a/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
+++ b/core/src/main/java/org/apache/accumulo/core/trace/thrift/TInfo.java
@@ -15,53 +15,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.trace.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TInfo");
private static final org.apache.thrift.protocol.TField TRACE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("traceId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField PARENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentId", org.apache.thrift.protocol.TType.I64, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TInfoTupleSchemeFactory();
public long traceId; // required
public long parentId; // required
@@ -71,10 +41,10 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
TRACE_ID((short)1, "traceId"),
PARENT_ID((short)2, "parentId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -131,14 +101,14 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
private static final int __TRACEID_ISSET_ID = 0;
private static final int __PARENTID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.TRACE_ID, new org.apache.thrift.meta_data.FieldMetaData("traceId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PARENT_ID, new org.apache.thrift.meta_data.FieldMetaData("parentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TInfo.class, metaDataMap);
}
@@ -188,16 +158,16 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
public void unsetTraceId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRACEID_ISSET_ID);
}
/** Returns true if field traceId is set (has been assigned a value) and false otherwise */
public boolean isSetTraceId() {
- return EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRACEID_ISSET_ID);
}
public void setTraceIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRACEID_ISSET_ID, value);
}
public long getParentId() {
@@ -211,25 +181,25 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
public void unsetParentId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARENTID_ISSET_ID);
}
/** Returns true if field parentId is set (has been assigned a value) and false otherwise */
public boolean isSetParentId() {
- return EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);
}
public void setParentIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARENTID_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case TRACE_ID:
if (value == null) {
unsetTraceId();
} else {
- setTraceId((Long)value);
+ setTraceId((java.lang.Long)value);
}
break;
@@ -237,14 +207,14 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
if (value == null) {
unsetParentId();
} else {
- setParentId((Long)value);
+ setParentId((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRACE_ID:
return getTraceId();
@@ -253,13 +223,13 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
return getParentId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -268,11 +238,11 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
case PARENT_ID:
return isSetParentId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TInfo)
@@ -283,6 +253,8 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
public boolean equals(TInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_traceId = true;
boolean that_present_traceId = true;
@@ -307,19 +279,13 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_traceId = true;
- list.add(present_traceId);
- if (present_traceId)
- list.add(traceId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(traceId);
- boolean present_parentId = true;
- list.add(present_parentId);
- if (present_parentId)
- list.add(parentId);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(parentId);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -330,7 +296,7 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTraceId()).compareTo(other.isSetTraceId());
+ lastComparison = java.lang.Boolean.valueOf(isSetTraceId()).compareTo(other.isSetTraceId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -340,7 +306,7 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
+ lastComparison = java.lang.Boolean.valueOf(isSetParentId()).compareTo(other.isSetParentId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -358,16 +324,16 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TInfo(");
boolean first = true;
sb.append("traceId:");
@@ -394,7 +360,7 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -404,13 +370,13 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
}
- private static class TInfoStandardSchemeFactory implements SchemeFactory {
+ private static class TInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInfoStandardScheme getScheme() {
return new TInfoStandardScheme();
}
}
- private static class TInfoStandardScheme extends StandardScheme<TInfo> {
+ private static class TInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -465,18 +431,18 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
- private static class TInfoTupleSchemeFactory implements SchemeFactory {
+ private static class TInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInfoTupleScheme getScheme() {
return new TInfoTupleScheme();
}
}
- private static class TInfoTupleScheme extends TupleScheme<TInfo> {
+ private static class TInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTraceId()) {
optionals.set(0);
}
@@ -494,8 +460,8 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.traceId = iprot.readI64();
struct.setTraceIdIsSet(true);
@@ -507,5 +473,9 @@ public class TInfo implements org.apache.thrift.TBase<TInfo, TInfo._Fields>, jav
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/AccumuloProxy.cpp
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/AccumuloProxy.cpp b/proxy/src/main/cpp/AccumuloProxy.cpp
index d0add35..dbd45dd 100644
--- a/proxy/src/main/cpp/AccumuloProxy.cpp
+++ b/proxy/src/main/cpp/AccumuloProxy.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/AccumuloProxy.h
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/AccumuloProxy.h b/proxy/src/main/cpp/AccumuloProxy.h
index 429cf55..7dd477b 100644
--- a/proxy/src/main/cpp/AccumuloProxy.h
+++ b/proxy/src/main/cpp/AccumuloProxy.h
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/proxy_constants.cpp
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/proxy_constants.cpp b/proxy/src/main/cpp/proxy_constants.cpp
index d177867..07fb1b8 100644
--- a/proxy/src/main/cpp/proxy_constants.cpp
+++ b/proxy/src/main/cpp/proxy_constants.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/proxy_constants.h
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/proxy_constants.h b/proxy/src/main/cpp/proxy_constants.h
index c2d6fd6..436a732 100644
--- a/proxy/src/main/cpp/proxy_constants.h
+++ b/proxy/src/main/cpp/proxy_constants.h
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/proxy_types.cpp
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/proxy_types.cpp b/proxy/src/main/cpp/proxy_types.cpp
index 09c2d9c..7fb8417 100644
--- a/proxy/src/main/cpp/proxy_types.cpp
+++ b/proxy/src/main/cpp/proxy_types.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/cpp/proxy_types.h
----------------------------------------------------------------------
diff --git a/proxy/src/main/cpp/proxy_types.h b/proxy/src/main/cpp/proxy_types.h
index e5daf2e..0464703 100644
--- a/proxy/src/main/cpp/proxy_types.h
+++ b/proxy/src/main/cpp/proxy_types.h
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -27,6 +27,7 @@
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
+#include <thrift/TBase.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>
@@ -248,7 +249,7 @@ typedef struct _Key__isset {
bool timestamp :1;
} _Key__isset;
-class Key {
+class Key : public virtual ::apache::thrift::TBase {
public:
Key(const Key&);
@@ -321,7 +322,7 @@ typedef struct _ColumnUpdate__isset {
bool deleteCell :1;
} _ColumnUpdate__isset;
-class ColumnUpdate {
+class ColumnUpdate : public virtual ::apache::thrift::TBase {
public:
ColumnUpdate(const ColumnUpdate&);
@@ -401,7 +402,7 @@ typedef struct _DiskUsage__isset {
bool usage :1;
} _DiskUsage__isset;
-class DiskUsage {
+class DiskUsage : public virtual ::apache::thrift::TBase {
public:
DiskUsage(const DiskUsage&);
@@ -453,7 +454,7 @@ typedef struct _KeyValue__isset {
bool value :1;
} _KeyValue__isset;
-class KeyValue {
+class KeyValue : public virtual ::apache::thrift::TBase {
public:
KeyValue(const KeyValue&);
@@ -505,7 +506,7 @@ typedef struct _ScanResult__isset {
bool more :1;
} _ScanResult__isset;
-class ScanResult {
+class ScanResult : public virtual ::apache::thrift::TBase {
public:
ScanResult(const ScanResult&);
@@ -559,7 +560,7 @@ typedef struct _Range__isset {
bool stopInclusive :1;
} _Range__isset;
-class Range {
+class Range : public virtual ::apache::thrift::TBase {
public:
Range(const Range&);
@@ -621,7 +622,7 @@ typedef struct _ScanColumn__isset {
bool colQualifier :1;
} _ScanColumn__isset;
-class ScanColumn {
+class ScanColumn : public virtual ::apache::thrift::TBase {
public:
ScanColumn(const ScanColumn&);
@@ -677,7 +678,7 @@ typedef struct _IteratorSetting__isset {
bool properties :1;
} _IteratorSetting__isset;
-class IteratorSetting {
+class IteratorSetting : public virtual ::apache::thrift::TBase {
public:
IteratorSetting(const IteratorSetting&);
@@ -742,7 +743,7 @@ typedef struct _ScanOptions__isset {
bool bufferSize :1;
} _ScanOptions__isset;
-class ScanOptions {
+class ScanOptions : public virtual ::apache::thrift::TBase {
public:
ScanOptions(const ScanOptions&);
@@ -822,7 +823,7 @@ typedef struct _BatchScanOptions__isset {
bool threads :1;
} _BatchScanOptions__isset;
-class BatchScanOptions {
+class BatchScanOptions : public virtual ::apache::thrift::TBase {
public:
BatchScanOptions(const BatchScanOptions&);
@@ -899,7 +900,7 @@ typedef struct _KeyValueAndPeek__isset {
bool hasNext :1;
} _KeyValueAndPeek__isset;
-class KeyValueAndPeek {
+class KeyValueAndPeek : public virtual ::apache::thrift::TBase {
public:
KeyValueAndPeek(const KeyValueAndPeek&);
@@ -952,7 +953,7 @@ typedef struct _KeyExtent__isset {
bool prevEndRow :1;
} _KeyExtent__isset;
-class KeyExtent {
+class KeyExtent : public virtual ::apache::thrift::TBase {
public:
KeyExtent(const KeyExtent&);
@@ -1010,7 +1011,7 @@ typedef struct _Column__isset {
bool colVisibility :1;
} _Column__isset;
-class Column {
+class Column : public virtual ::apache::thrift::TBase {
public:
Column(const Column&);
@@ -1069,7 +1070,7 @@ typedef struct _Condition__isset {
bool iterators :1;
} _Condition__isset;
-class Condition {
+class Condition : public virtual ::apache::thrift::TBase {
public:
Condition(const Condition&);
@@ -1137,7 +1138,7 @@ typedef struct _ConditionalUpdates__isset {
bool updates :1;
} _ConditionalUpdates__isset;
-class ConditionalUpdates {
+class ConditionalUpdates : public virtual ::apache::thrift::TBase {
public:
ConditionalUpdates(const ConditionalUpdates&);
@@ -1192,7 +1193,7 @@ typedef struct _ConditionalWriterOptions__isset {
bool durability :1;
} _ConditionalWriterOptions__isset;
-class ConditionalWriterOptions {
+class ConditionalWriterOptions : public virtual ::apache::thrift::TBase {
public:
ConditionalWriterOptions(const ConditionalWriterOptions&);
@@ -1278,7 +1279,7 @@ typedef struct _ActiveScan__isset {
bool authorizations :1;
} _ActiveScan__isset;
-class ActiveScan {
+class ActiveScan : public virtual ::apache::thrift::TBase {
public:
ActiveScan(const ActiveScan&);
@@ -1383,7 +1384,7 @@ typedef struct _ActiveCompaction__isset {
bool iterators :1;
} _ActiveCompaction__isset;
-class ActiveCompaction {
+class ActiveCompaction : public virtual ::apache::thrift::TBase {
public:
ActiveCompaction(const ActiveCompaction&);
@@ -1478,7 +1479,7 @@ typedef struct _WriterOptions__isset {
bool durability :1;
} _WriterOptions__isset;
-class WriterOptions {
+class WriterOptions : public virtual ::apache::thrift::TBase {
public:
WriterOptions(const WriterOptions&);
@@ -1547,7 +1548,7 @@ typedef struct _CompactionStrategyConfig__isset {
bool options :1;
} _CompactionStrategyConfig__isset;
-class CompactionStrategyConfig {
+class CompactionStrategyConfig : public virtual ::apache::thrift::TBase {
public:
CompactionStrategyConfig(const CompactionStrategyConfig&);
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
index 76dd4bc..2292638 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
@@ -15,63 +15,33 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.proxy.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class AccumuloException extends TException implements org.apache.thrift.TBase<AccumuloException, AccumuloException._Fields>, java.io.Serializable, Cloneable, Comparable<AccumuloException> {
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+public class AccumuloException extends org.apache.thrift.TException implements org.apache.thrift.TBase<AccumuloException, AccumuloException._Fields>, java.io.Serializable, Cloneable, Comparable<AccumuloException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AccumuloException");
private static final org.apache.thrift.protocol.TField MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("msg", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new AccumuloExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AccumuloExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AccumuloExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AccumuloExceptionTupleSchemeFactory();
- public String msg; // required
+ public java.lang.String msg; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MSG((short)1, "msg");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -94,21 +64,21 @@ public class AccumuloException extends TException implements org.apache.thrift.T
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -117,18 +87,18 @@ public class AccumuloException extends TException implements org.apache.thrift.T
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MSG, new org.apache.thrift.meta_data.FieldMetaData("msg", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AccumuloException.class, metaDataMap);
}
@@ -136,7 +106,7 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
public AccumuloException(
- String msg)
+ java.lang.String msg)
{
this();
this.msg = msg;
@@ -160,11 +130,11 @@ public class AccumuloException extends TException implements org.apache.thrift.T
this.msg = null;
}
- public String getMsg() {
+ public java.lang.String getMsg() {
return this.msg;
}
- public AccumuloException setMsg(String msg) {
+ public AccumuloException setMsg(java.lang.String msg) {
this.msg = msg;
return this;
}
@@ -184,43 +154,43 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case MSG:
if (value == null) {
unsetMsg();
} else {
- setMsg((String)value);
+ setMsg((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MSG:
return getMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MSG:
return isSetMsg();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof AccumuloException)
@@ -231,6 +201,8 @@ public class AccumuloException extends TException implements org.apache.thrift.T
public boolean equals(AccumuloException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_msg = true && this.isSetMsg();
boolean that_present_msg = true && that.isSetMsg();
@@ -246,14 +218,13 @@ public class AccumuloException extends TException implements org.apache.thrift.T
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_msg = true && (isSetMsg());
- list.add(present_msg);
- if (present_msg)
- list.add(msg);
+ hashCode = hashCode * 8191 + ((isSetMsg()) ? 131071 : 524287);
+ if (isSetMsg())
+ hashCode = hashCode * 8191 + msg.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +235,7 @@ public class AccumuloException extends TException implements org.apache.thrift.T
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
+ lastComparison = java.lang.Boolean.valueOf(isSetMsg()).compareTo(other.isSetMsg());
if (lastComparison != 0) {
return lastComparison;
}
@@ -282,16 +253,16 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("AccumuloException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("AccumuloException(");
boolean first = true;
sb.append("msg:");
@@ -318,7 +289,7 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -326,13 +297,13 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
}
- private static class AccumuloExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class AccumuloExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AccumuloExceptionStandardScheme getScheme() {
return new AccumuloExceptionStandardScheme();
}
}
- private static class AccumuloExceptionStandardScheme extends StandardScheme<AccumuloException> {
+ private static class AccumuloExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<AccumuloException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, AccumuloException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -378,18 +349,18 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
- private static class AccumuloExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class AccumuloExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AccumuloExceptionTupleScheme getScheme() {
return new AccumuloExceptionTupleScheme();
}
}
- private static class AccumuloExceptionTupleScheme extends TupleScheme<AccumuloException> {
+ private static class AccumuloExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<AccumuloException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AccumuloException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetMsg()) {
optionals.set(0);
}
@@ -401,8 +372,8 @@ public class AccumuloException extends TException implements org.apache.thrift.T
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, AccumuloException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.msg = iprot.readString();
struct.setMsgIsSet(true);
@@ -410,5 +381,9 @@ public class AccumuloException extends TException implements org.apache.thrift.T
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}