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:30:03 UTC
[35/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/data/thrift/MultiScanResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
index eba7661..fe918ff 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult, MultiScanResult._Fields>, java.io.Serializable, Cloneable, Comparable<MultiScanResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MultiScanResult");
@@ -62,15 +35,12 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
private static final org.apache.thrift.protocol.TField PART_NEXT_KEY_INCLUSIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("partNextKeyInclusive", org.apache.thrift.protocol.TType.BOOL, (short)6);
private static final org.apache.thrift.protocol.TField MORE_FIELD_DESC = new org.apache.thrift.protocol.TField("more", org.apache.thrift.protocol.TType.BOOL, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new MultiScanResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new MultiScanResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MultiScanResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MultiScanResultTupleSchemeFactory();
- public List<TKeyValue> results; // required
- public Map<TKeyExtent,List<TRange>> failures; // required
- public List<TKeyExtent> fullScans; // required
+ public java.util.List<TKeyValue> results; // required
+ public java.util.Map<TKeyExtent,java.util.List<TRange>> failures; // required
+ public java.util.List<TKeyExtent> fullScans; // required
public TKeyExtent partScan; // required
public TKey partNextKey; // required
public boolean partNextKeyInclusive; // required
@@ -86,10 +56,10 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
PART_NEXT_KEY_INCLUSIVE((short)6, "partNextKeyInclusive"),
MORE((short)7, "more");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -124,21 +94,21 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -147,7 +117,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -156,9 +126,9 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
private static final int __PARTNEXTKEYINCLUSIVE_ISSET_ID = 0;
private static final int __MORE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RESULTS, new org.apache.thrift.meta_data.FieldMetaData("results", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyValue.class))));
@@ -175,7 +145,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.MORE, new org.apache.thrift.meta_data.FieldMetaData("more", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MultiScanResult.class, metaDataMap);
}
@@ -183,9 +153,9 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
public MultiScanResult(
- List<TKeyValue> results,
- Map<TKeyExtent,List<TRange>> failures,
- List<TKeyExtent> fullScans,
+ java.util.List<TKeyValue> results,
+ java.util.Map<TKeyExtent,java.util.List<TRange>> failures,
+ java.util.List<TKeyExtent> fullScans,
TKeyExtent partScan,
TKey partNextKey,
boolean partNextKeyInclusive,
@@ -209,17 +179,32 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
public MultiScanResult(MultiScanResult other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetResults()) {
- List<TKeyValue> __this__results = new ArrayList<TKeyValue>(other.results.size());
+ java.util.List<TKeyValue> __this__results = new java.util.ArrayList<TKeyValue>(other.results.size());
for (TKeyValue other_element : other.results) {
__this__results.add(new TKeyValue(other_element));
}
this.results = __this__results;
}
if (other.isSetFailures()) {
- this.failures = other.failures;
+ java.util.Map<TKeyExtent,java.util.List<TRange>> __this__failures = new java.util.HashMap<TKeyExtent,java.util.List<TRange>>(other.failures.size());
+ for (java.util.Map.Entry<TKeyExtent, java.util.List<TRange>> other_element : other.failures.entrySet()) {
+
+ TKeyExtent other_element_key = other_element.getKey();
+ java.util.List<TRange> other_element_value = other_element.getValue();
+
+ TKeyExtent __this__failures_copy_key = new TKeyExtent(other_element_key);
+
+ java.util.List<TRange> __this__failures_copy_value = new java.util.ArrayList<TRange>(other_element_value.size());
+ for (TRange other_element_value_element : other_element_value) {
+ __this__failures_copy_value.add(new TRange(other_element_value_element));
+ }
+
+ __this__failures.put(__this__failures_copy_key, __this__failures_copy_value);
+ }
+ this.failures = __this__failures;
}
if (other.isSetFullScans()) {
- List<TKeyExtent> __this__fullScans = new ArrayList<TKeyExtent>(other.fullScans.size());
+ java.util.List<TKeyExtent> __this__fullScans = new java.util.ArrayList<TKeyExtent>(other.fullScans.size());
for (TKeyExtent other_element : other.fullScans) {
__this__fullScans.add(new TKeyExtent(other_element));
}
@@ -262,16 +247,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
public void addToResults(TKeyValue elem) {
if (this.results == null) {
- this.results = new ArrayList<TKeyValue>();
+ this.results = new java.util.ArrayList<TKeyValue>();
}
this.results.add(elem);
}
- public List<TKeyValue> getResults() {
+ public java.util.List<TKeyValue> getResults() {
return this.results;
}
- public MultiScanResult setResults(List<TKeyValue> results) {
+ public MultiScanResult setResults(java.util.List<TKeyValue> results) {
this.results = results;
return this;
}
@@ -295,18 +280,18 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return (this.failures == null) ? 0 : this.failures.size();
}
- public void putToFailures(TKeyExtent key, List<TRange> val) {
+ public void putToFailures(TKeyExtent key, java.util.List<TRange> val) {
if (this.failures == null) {
- this.failures = new HashMap<TKeyExtent,List<TRange>>();
+ this.failures = new java.util.HashMap<TKeyExtent,java.util.List<TRange>>();
}
this.failures.put(key, val);
}
- public Map<TKeyExtent,List<TRange>> getFailures() {
+ public java.util.Map<TKeyExtent,java.util.List<TRange>> getFailures() {
return this.failures;
}
- public MultiScanResult setFailures(Map<TKeyExtent,List<TRange>> failures) {
+ public MultiScanResult setFailures(java.util.Map<TKeyExtent,java.util.List<TRange>> failures) {
this.failures = failures;
return this;
}
@@ -336,16 +321,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
public void addToFullScans(TKeyExtent elem) {
if (this.fullScans == null) {
- this.fullScans = new ArrayList<TKeyExtent>();
+ this.fullScans = new java.util.ArrayList<TKeyExtent>();
}
this.fullScans.add(elem);
}
- public List<TKeyExtent> getFullScans() {
+ public java.util.List<TKeyExtent> getFullScans() {
return this.fullScans;
}
- public MultiScanResult setFullScans(List<TKeyExtent> fullScans) {
+ public MultiScanResult setFullScans(java.util.List<TKeyExtent> fullScans) {
this.fullScans = fullScans;
return this;
}
@@ -424,16 +409,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
public void unsetPartNextKeyInclusive() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
}
/** Returns true if field partNextKeyInclusive is set (has been assigned a value) and false otherwise */
public boolean isSetPartNextKeyInclusive() {
- return EncodingUtils.testBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID);
}
public void setPartNextKeyInclusiveIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTNEXTKEYINCLUSIVE_ISSET_ID, value);
}
public boolean isMore() {
@@ -447,25 +432,25 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
public void unsetMore() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
}
/** Returns true if field more is set (has been assigned a value) and false otherwise */
public boolean isSetMore() {
- return EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
}
public void setMoreIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case RESULTS:
if (value == null) {
unsetResults();
} else {
- setResults((List<TKeyValue>)value);
+ setResults((java.util.List<TKeyValue>)value);
}
break;
@@ -473,7 +458,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (value == null) {
unsetFailures();
} else {
- setFailures((Map<TKeyExtent,List<TRange>>)value);
+ setFailures((java.util.Map<TKeyExtent,java.util.List<TRange>>)value);
}
break;
@@ -481,7 +466,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (value == null) {
unsetFullScans();
} else {
- setFullScans((List<TKeyExtent>)value);
+ setFullScans((java.util.List<TKeyExtent>)value);
}
break;
@@ -505,7 +490,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (value == null) {
unsetPartNextKeyInclusive();
} else {
- setPartNextKeyInclusive((Boolean)value);
+ setPartNextKeyInclusive((java.lang.Boolean)value);
}
break;
@@ -513,14 +498,14 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (value == null) {
unsetMore();
} else {
- setMore((Boolean)value);
+ setMore((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RESULTS:
return getResults();
@@ -544,13 +529,13 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return isMore();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -569,11 +554,11 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
case MORE:
return isSetMore();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof MultiScanResult)
@@ -584,6 +569,8 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
public boolean equals(MultiScanResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_results = true && this.isSetResults();
boolean that_present_results = true && that.isSetResults();
@@ -653,44 +640,33 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_results = true && (isSetResults());
- list.add(present_results);
- if (present_results)
- list.add(results);
+ hashCode = hashCode * 8191 + ((isSetResults()) ? 131071 : 524287);
+ if (isSetResults())
+ hashCode = hashCode * 8191 + results.hashCode();
- boolean present_failures = true && (isSetFailures());
- list.add(present_failures);
- if (present_failures)
- list.add(failures);
+ hashCode = hashCode * 8191 + ((isSetFailures()) ? 131071 : 524287);
+ if (isSetFailures())
+ hashCode = hashCode * 8191 + failures.hashCode();
- boolean present_fullScans = true && (isSetFullScans());
- list.add(present_fullScans);
- if (present_fullScans)
- list.add(fullScans);
+ hashCode = hashCode * 8191 + ((isSetFullScans()) ? 131071 : 524287);
+ if (isSetFullScans())
+ hashCode = hashCode * 8191 + fullScans.hashCode();
- boolean present_partScan = true && (isSetPartScan());
- list.add(present_partScan);
- if (present_partScan)
- list.add(partScan);
+ hashCode = hashCode * 8191 + ((isSetPartScan()) ? 131071 : 524287);
+ if (isSetPartScan())
+ hashCode = hashCode * 8191 + partScan.hashCode();
- boolean present_partNextKey = true && (isSetPartNextKey());
- list.add(present_partNextKey);
- if (present_partNextKey)
- list.add(partNextKey);
+ hashCode = hashCode * 8191 + ((isSetPartNextKey()) ? 131071 : 524287);
+ if (isSetPartNextKey())
+ hashCode = hashCode * 8191 + partNextKey.hashCode();
- boolean present_partNextKeyInclusive = true;
- list.add(present_partNextKeyInclusive);
- if (present_partNextKeyInclusive)
- list.add(partNextKeyInclusive);
+ hashCode = hashCode * 8191 + ((partNextKeyInclusive) ? 131071 : 524287);
- boolean present_more = true;
- list.add(present_more);
- if (present_more)
- list.add(more);
+ hashCode = hashCode * 8191 + ((more) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -701,7 +677,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
+ lastComparison = java.lang.Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
if (lastComparison != 0) {
return lastComparison;
}
@@ -711,7 +687,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailures()).compareTo(other.isSetFailures());
+ lastComparison = java.lang.Boolean.valueOf(isSetFailures()).compareTo(other.isSetFailures());
if (lastComparison != 0) {
return lastComparison;
}
@@ -721,7 +697,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFullScans()).compareTo(other.isSetFullScans());
+ lastComparison = java.lang.Boolean.valueOf(isSetFullScans()).compareTo(other.isSetFullScans());
if (lastComparison != 0) {
return lastComparison;
}
@@ -731,7 +707,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPartScan()).compareTo(other.isSetPartScan());
+ lastComparison = java.lang.Boolean.valueOf(isSetPartScan()).compareTo(other.isSetPartScan());
if (lastComparison != 0) {
return lastComparison;
}
@@ -741,7 +717,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPartNextKey()).compareTo(other.isSetPartNextKey());
+ lastComparison = java.lang.Boolean.valueOf(isSetPartNextKey()).compareTo(other.isSetPartNextKey());
if (lastComparison != 0) {
return lastComparison;
}
@@ -751,7 +727,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPartNextKeyInclusive()).compareTo(other.isSetPartNextKeyInclusive());
+ lastComparison = java.lang.Boolean.valueOf(isSetPartNextKeyInclusive()).compareTo(other.isSetPartNextKeyInclusive());
if (lastComparison != 0) {
return lastComparison;
}
@@ -761,7 +737,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
+ lastComparison = java.lang.Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
if (lastComparison != 0) {
return lastComparison;
}
@@ -779,16 +755,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("MultiScanResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("MultiScanResult(");
boolean first = true;
sb.append("results:");
@@ -861,7 +837,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -871,13 +847,13 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
}
- private static class MultiScanResultStandardSchemeFactory implements SchemeFactory {
+ private static class MultiScanResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MultiScanResultStandardScheme getScheme() {
return new MultiScanResultStandardScheme();
}
}
- private static class MultiScanResultStandardScheme extends StandardScheme<MultiScanResult> {
+ private static class MultiScanResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<MultiScanResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, MultiScanResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -893,7 +869,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
- struct.results = new ArrayList<TKeyValue>(_list24.size);
+ struct.results = new java.util.ArrayList<TKeyValue>(_list24.size);
TKeyValue _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
@@ -912,16 +888,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map27 = iprot.readMapBegin();
- struct.failures = new HashMap<TKeyExtent,List<TRange>>(2*_map27.size);
+ struct.failures = new java.util.HashMap<TKeyExtent,java.util.List<TRange>>(2*_map27.size);
TKeyExtent _key28;
- List<TRange> _val29;
+ java.util.List<TRange> _val29;
for (int _i30 = 0; _i30 < _map27.size; ++_i30)
{
_key28 = new TKeyExtent();
_key28.read(iprot);
{
org.apache.thrift.protocol.TList _list31 = iprot.readListBegin();
- _val29 = new ArrayList<TRange>(_list31.size);
+ _val29 = new java.util.ArrayList<TRange>(_list31.size);
TRange _elem32;
for (int _i33 = 0; _i33 < _list31.size; ++_i33)
{
@@ -944,7 +920,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
- struct.fullScans = new ArrayList<TKeyExtent>(_list34.size);
+ struct.fullScans = new java.util.ArrayList<TKeyExtent>(_list34.size);
TKeyExtent _elem35;
for (int _i36 = 0; _i36 < _list34.size; ++_i36)
{
@@ -1024,7 +1000,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
oprot.writeFieldBegin(FAILURES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.LIST, struct.failures.size()));
- for (Map.Entry<TKeyExtent, List<TRange>> _iter38 : struct.failures.entrySet())
+ for (java.util.Map.Entry<TKeyExtent, java.util.List<TRange>> _iter38 : struct.failures.entrySet())
{
_iter38.getKey().write(oprot);
{
@@ -1074,18 +1050,18 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
- private static class MultiScanResultTupleSchemeFactory implements SchemeFactory {
+ private static class MultiScanResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MultiScanResultTupleScheme getScheme() {
return new MultiScanResultTupleScheme();
}
}
- private static class MultiScanResultTupleScheme extends TupleScheme<MultiScanResult> {
+ private static class MultiScanResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<MultiScanResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MultiScanResult struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetResults()) {
optionals.set(0);
}
@@ -1120,7 +1096,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (struct.isSetFailures()) {
{
oprot.writeI32(struct.failures.size());
- for (Map.Entry<TKeyExtent, List<TRange>> _iter42 : struct.failures.entrySet())
+ for (java.util.Map.Entry<TKeyExtent, java.util.List<TRange>> _iter42 : struct.failures.entrySet())
{
_iter42.getKey().write(oprot);
{
@@ -1158,12 +1134,12 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MultiScanResult struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.results = new ArrayList<TKeyValue>(_list45.size);
+ struct.results = new java.util.ArrayList<TKeyValue>(_list45.size);
TKeyValue _elem46;
for (int _i47 = 0; _i47 < _list45.size; ++_i47)
{
@@ -1177,16 +1153,16 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map48 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
- struct.failures = new HashMap<TKeyExtent,List<TRange>>(2*_map48.size);
+ struct.failures = new java.util.HashMap<TKeyExtent,java.util.List<TRange>>(2*_map48.size);
TKeyExtent _key49;
- List<TRange> _val50;
+ java.util.List<TRange> _val50;
for (int _i51 = 0; _i51 < _map48.size; ++_i51)
{
_key49 = new TKeyExtent();
_key49.read(iprot);
{
org.apache.thrift.protocol.TList _list52 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- _val50 = new ArrayList<TRange>(_list52.size);
+ _val50 = new java.util.ArrayList<TRange>(_list52.size);
TRange _elem53;
for (int _i54 = 0; _i54 < _list52.size; ++_i54)
{
@@ -1203,7 +1179,7 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.fullScans = new ArrayList<TKeyExtent>(_list55.size);
+ struct.fullScans = new java.util.ArrayList<TKeyExtent>(_list55.size);
TKeyExtent _elem56;
for (int _i57 = 0; _i57 < _list55.size; ++_i57)
{
@@ -1235,5 +1211,9 @@ public class MultiScanResult implements org.apache.thrift.TBase<MultiScanResult,
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
index d147578..2241aec 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
@@ -15,55 +15,25 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResult._Fields>, java.io.Serializable, Cloneable, Comparable<ScanResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ScanResult");
private static final org.apache.thrift.protocol.TField RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("results", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField MORE_FIELD_DESC = new org.apache.thrift.protocol.TField("more", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ScanResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ScanResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ScanResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ScanResultTupleSchemeFactory();
- public List<TKeyValue> results; // required
+ public java.util.List<TKeyValue> results; // required
public boolean more; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -71,10 +41,10 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
RESULTS((short)1, "results"),
MORE((short)2, "more");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -99,21 +69,21 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -122,7 +92,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -130,15 +100,15 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
// isset id assignments
private static final int __MORE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RESULTS, new org.apache.thrift.meta_data.FieldMetaData("results", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKeyValue.class))));
tmpMap.put(_Fields.MORE, new org.apache.thrift.meta_data.FieldMetaData("more", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ScanResult.class, metaDataMap);
}
@@ -146,7 +116,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
public ScanResult(
- List<TKeyValue> results,
+ java.util.List<TKeyValue> results,
boolean more)
{
this();
@@ -161,7 +131,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public ScanResult(ScanResult other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetResults()) {
- List<TKeyValue> __this__results = new ArrayList<TKeyValue>(other.results.size());
+ java.util.List<TKeyValue> __this__results = new java.util.ArrayList<TKeyValue>(other.results.size());
for (TKeyValue other_element : other.results) {
__this__results.add(new TKeyValue(other_element));
}
@@ -191,16 +161,16 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public void addToResults(TKeyValue elem) {
if (this.results == null) {
- this.results = new ArrayList<TKeyValue>();
+ this.results = new java.util.ArrayList<TKeyValue>();
}
this.results.add(elem);
}
- public List<TKeyValue> getResults() {
+ public java.util.List<TKeyValue> getResults() {
return this.results;
}
- public ScanResult setResults(List<TKeyValue> results) {
+ public ScanResult setResults(java.util.List<TKeyValue> results) {
this.results = results;
return this;
}
@@ -231,25 +201,25 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
public void unsetMore() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MORE_ISSET_ID);
}
/** Returns true if field more is set (has been assigned a value) and false otherwise */
public boolean isSetMore() {
- return EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MORE_ISSET_ID);
}
public void setMoreIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MORE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case RESULTS:
if (value == null) {
unsetResults();
} else {
- setResults((List<TKeyValue>)value);
+ setResults((java.util.List<TKeyValue>)value);
}
break;
@@ -257,14 +227,14 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
if (value == null) {
unsetMore();
} else {
- setMore((Boolean)value);
+ setMore((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RESULTS:
return getResults();
@@ -273,13 +243,13 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return isMore();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -288,11 +258,11 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
case MORE:
return isSetMore();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof ScanResult)
@@ -303,6 +273,8 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
public boolean equals(ScanResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_results = true && this.isSetResults();
boolean that_present_results = true && that.isSetResults();
@@ -327,19 +299,15 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_results = true && (isSetResults());
- list.add(present_results);
- if (present_results)
- list.add(results);
+ hashCode = hashCode * 8191 + ((isSetResults()) ? 131071 : 524287);
+ if (isSetResults())
+ hashCode = hashCode * 8191 + results.hashCode();
- boolean present_more = true;
- list.add(present_more);
- if (present_more)
- list.add(more);
+ hashCode = hashCode * 8191 + ((more) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -350,7 +318,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
+ lastComparison = java.lang.Boolean.valueOf(isSetResults()).compareTo(other.isSetResults());
if (lastComparison != 0) {
return lastComparison;
}
@@ -360,7 +328,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
+ lastComparison = java.lang.Boolean.valueOf(isSetMore()).compareTo(other.isSetMore());
if (lastComparison != 0) {
return lastComparison;
}
@@ -378,16 +346,16 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ScanResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ScanResult(");
boolean first = true;
sb.append("results:");
@@ -418,7 +386,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -428,13 +396,13 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
- private static class ScanResultStandardSchemeFactory implements SchemeFactory {
+ private static class ScanResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanResultStandardScheme getScheme() {
return new ScanResultStandardScheme();
}
}
- private static class ScanResultStandardScheme extends StandardScheme<ScanResult> {
+ private static class ScanResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<ScanResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ScanResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -450,7 +418,7 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.results = new ArrayList<TKeyValue>(_list16.size);
+ struct.results = new java.util.ArrayList<TKeyValue>(_list16.size);
TKeyValue _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
@@ -509,18 +477,18 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
- private static class ScanResultTupleSchemeFactory implements SchemeFactory {
+ private static class ScanResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ScanResultTupleScheme getScheme() {
return new ScanResultTupleScheme();
}
}
- private static class ScanResultTupleScheme extends TupleScheme<ScanResult> {
+ private static class ScanResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<ScanResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ScanResult struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetResults()) {
optionals.set(0);
}
@@ -544,12 +512,12 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ScanResult struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.results = new ArrayList<TKeyValue>(_list21.size);
+ struct.results = new java.util.ArrayList<TKeyValue>(_list21.size);
TKeyValue _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
@@ -567,5 +535,9 @@ public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResul
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java
index 40ba6b1..086cb40 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMResult.java
@@ -15,53 +15,23 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._Fields>, java.io.Serializable, Cloneable, Comparable<TCMResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCMResult");
private static final org.apache.thrift.protocol.TField CMID_FIELD_DESC = new org.apache.thrift.protocol.TField("cmid", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TCMResultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TCMResultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCMResultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCMResultTupleSchemeFactory();
public long cmid; // required
/**
@@ -79,10 +49,10 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
*/
STATUS((short)2, "status");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -107,21 +77,21 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -130,7 +100,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -138,14 +108,14 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
// isset id assignments
private static final int __CMID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CMID, new org.apache.thrift.meta_data.FieldMetaData("cmid", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCMStatus.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCMResult.class, metaDataMap);
}
@@ -195,16 +165,16 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
public void unsetCmid() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CMID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CMID_ISSET_ID);
}
/** Returns true if field cmid is set (has been assigned a value) and false otherwise */
public boolean isSetCmid() {
- return EncodingUtils.testBit(__isset_bitfield, __CMID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CMID_ISSET_ID);
}
public void setCmidIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CMID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CMID_ISSET_ID, value);
}
/**
@@ -239,13 +209,13 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case CMID:
if (value == null) {
unsetCmid();
} else {
- setCmid((Long)value);
+ setCmid((java.lang.Long)value);
}
break;
@@ -260,7 +230,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CMID:
return getCmid();
@@ -269,13 +239,13 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
return getStatus();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -284,11 +254,11 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
case STATUS:
return isSetStatus();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TCMResult)
@@ -299,6 +269,8 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
public boolean equals(TCMResult that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_cmid = true;
boolean that_present_cmid = true;
@@ -323,19 +295,15 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_cmid = true;
- list.add(present_cmid);
- if (present_cmid)
- list.add(cmid);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(cmid);
- boolean present_status = true && (isSetStatus());
- list.add(present_status);
- if (present_status)
- list.add(status.getValue());
+ hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
+ if (isSetStatus())
+ hashCode = hashCode * 8191 + status.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -346,7 +314,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetCmid()).compareTo(other.isSetCmid());
+ lastComparison = java.lang.Boolean.valueOf(isSetCmid()).compareTo(other.isSetCmid());
if (lastComparison != 0) {
return lastComparison;
}
@@ -356,7 +324,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
+ lastComparison = java.lang.Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
@@ -374,16 +342,16 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TCMResult(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TCMResult(");
boolean first = true;
sb.append("cmid:");
@@ -414,7 +382,7 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -424,13 +392,13 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
- private static class TCMResultStandardSchemeFactory implements SchemeFactory {
+ private static class TCMResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCMResultStandardScheme getScheme() {
return new TCMResultStandardScheme();
}
}
- private static class TCMResultStandardScheme extends StandardScheme<TCMResult> {
+ private static class TCMResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCMResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCMResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -487,18 +455,18 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
- private static class TCMResultTupleSchemeFactory implements SchemeFactory {
+ private static class TCMResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCMResultTupleScheme getScheme() {
return new TCMResultTupleScheme();
}
}
- private static class TCMResultTupleScheme extends TupleScheme<TCMResult> {
+ private static class TCMResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCMResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCMResult struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetCmid()) {
optionals.set(0);
}
@@ -516,8 +484,8 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCMResult struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.cmid = iprot.readI64();
struct.setCmidIsSet(true);
@@ -529,5 +497,9 @@ public class TCMResult implements org.apache.thrift.TBase<TCMResult, TCMResult._
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java
index 6cbe5af..70137af 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TCMStatus.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@@ -23,11 +23,8 @@
package org.apache.accumulo.core.data.thrift;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-@SuppressWarnings({"unused"}) public enum TCMStatus implements org.apache.thrift.TEnum {
+public enum TCMStatus implements org.apache.thrift.TEnum {
ACCEPTED(0),
REJECTED(1),
VIOLATED(2),
http://git-wip-us.apache.org/repos/asf/accumulo/blob/62bbce43/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java b/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
index 839d801..a3027be 100644
--- a/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
@@ -15,42 +15,15 @@
* limitations under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.accumulo.core.data.thrift;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.protocol.TProtocolException;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.TException;
-import org.apache.thrift.async.AsyncMethodCallback;
-import org.apache.thrift.server.AbstractNonblockingServer.*;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import javax.annotation.Generated;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields>, java.io.Serializable, Cloneable, Comparable<TColumn> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn");
@@ -58,15 +31,12 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
private static final org.apache.thrift.protocol.TField COLUMN_QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("columnQualifier", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField COLUMN_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("columnVisibility", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TColumnStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TColumnTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnTupleSchemeFactory();
- public ByteBuffer columnFamily; // required
- public ByteBuffer columnQualifier; // required
- public ByteBuffer columnVisibility; // required
+ public java.nio.ByteBuffer columnFamily; // required
+ public java.nio.ByteBuffer columnQualifier; // required
+ public java.nio.ByteBuffer columnVisibility; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -74,10 +44,10 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
COLUMN_QUALIFIER((short)2, "columnQualifier"),
COLUMN_VISIBILITY((short)3, "columnVisibility");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -104,21 +74,21 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -127,22 +97,22 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.COLUMN_FAMILY, new org.apache.thrift.meta_data.FieldMetaData("columnFamily", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMN_QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("columnQualifier", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMN_VISIBILITY, new org.apache.thrift.meta_data.FieldMetaData("columnVisibility", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumn.class, metaDataMap);
}
@@ -150,9 +120,9 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
public TColumn(
- ByteBuffer columnFamily,
- ByteBuffer columnQualifier,
- ByteBuffer columnVisibility)
+ java.nio.ByteBuffer columnFamily,
+ java.nio.ByteBuffer columnQualifier,
+ java.nio.ByteBuffer columnVisibility)
{
this();
this.columnFamily = org.apache.thrift.TBaseHelper.copyBinary(columnFamily);
@@ -191,16 +161,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return columnFamily == null ? null : columnFamily.array();
}
- public ByteBuffer bufferForColumnFamily() {
+ public java.nio.ByteBuffer bufferForColumnFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(columnFamily);
}
public TColumn setColumnFamily(byte[] columnFamily) {
- this.columnFamily = columnFamily == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(columnFamily, columnFamily.length));
+ this.columnFamily = columnFamily == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(columnFamily.clone());
return this;
}
- public TColumn setColumnFamily(ByteBuffer columnFamily) {
+ public TColumn setColumnFamily(java.nio.ByteBuffer columnFamily) {
this.columnFamily = org.apache.thrift.TBaseHelper.copyBinary(columnFamily);
return this;
}
@@ -225,16 +195,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return columnQualifier == null ? null : columnQualifier.array();
}
- public ByteBuffer bufferForColumnQualifier() {
+ public java.nio.ByteBuffer bufferForColumnQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(columnQualifier);
}
public TColumn setColumnQualifier(byte[] columnQualifier) {
- this.columnQualifier = columnQualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(columnQualifier, columnQualifier.length));
+ this.columnQualifier = columnQualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(columnQualifier.clone());
return this;
}
- public TColumn setColumnQualifier(ByteBuffer columnQualifier) {
+ public TColumn setColumnQualifier(java.nio.ByteBuffer columnQualifier) {
this.columnQualifier = org.apache.thrift.TBaseHelper.copyBinary(columnQualifier);
return this;
}
@@ -259,16 +229,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return columnVisibility == null ? null : columnVisibility.array();
}
- public ByteBuffer bufferForColumnVisibility() {
+ public java.nio.ByteBuffer bufferForColumnVisibility() {
return org.apache.thrift.TBaseHelper.copyBinary(columnVisibility);
}
public TColumn setColumnVisibility(byte[] columnVisibility) {
- this.columnVisibility = columnVisibility == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(columnVisibility, columnVisibility.length));
+ this.columnVisibility = columnVisibility == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(columnVisibility.clone());
return this;
}
- public TColumn setColumnVisibility(ByteBuffer columnVisibility) {
+ public TColumn setColumnVisibility(java.nio.ByteBuffer columnVisibility) {
this.columnVisibility = org.apache.thrift.TBaseHelper.copyBinary(columnVisibility);
return this;
}
@@ -288,13 +258,17 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case COLUMN_FAMILY:
if (value == null) {
unsetColumnFamily();
} else {
- setColumnFamily((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColumnFamily((byte[])value);
+ } else {
+ setColumnFamily((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -302,7 +276,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
if (value == null) {
unsetColumnQualifier();
} else {
- setColumnQualifier((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColumnQualifier((byte[])value);
+ } else {
+ setColumnQualifier((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -310,14 +288,18 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
if (value == null) {
unsetColumnVisibility();
} else {
- setColumnVisibility((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setColumnVisibility((byte[])value);
+ } else {
+ setColumnVisibility((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COLUMN_FAMILY:
return getColumnFamily();
@@ -329,13 +311,13 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return getColumnVisibility();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -346,11 +328,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
case COLUMN_VISIBILITY:
return isSetColumnVisibility();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
+ public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof TColumn)
@@ -361,6 +343,8 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
public boolean equals(TColumn that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_columnFamily = true && this.isSetColumnFamily();
boolean that_present_columnFamily = true && that.isSetColumnFamily();
@@ -394,24 +378,21 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_columnFamily = true && (isSetColumnFamily());
- list.add(present_columnFamily);
- if (present_columnFamily)
- list.add(columnFamily);
+ hashCode = hashCode * 8191 + ((isSetColumnFamily()) ? 131071 : 524287);
+ if (isSetColumnFamily())
+ hashCode = hashCode * 8191 + columnFamily.hashCode();
- boolean present_columnQualifier = true && (isSetColumnQualifier());
- list.add(present_columnQualifier);
- if (present_columnQualifier)
- list.add(columnQualifier);
+ hashCode = hashCode * 8191 + ((isSetColumnQualifier()) ? 131071 : 524287);
+ if (isSetColumnQualifier())
+ hashCode = hashCode * 8191 + columnQualifier.hashCode();
- boolean present_columnVisibility = true && (isSetColumnVisibility());
- list.add(present_columnVisibility);
- if (present_columnVisibility)
- list.add(columnVisibility);
+ hashCode = hashCode * 8191 + ((isSetColumnVisibility()) ? 131071 : 524287);
+ if (isSetColumnVisibility())
+ hashCode = hashCode * 8191 + columnVisibility.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -422,7 +403,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetColumnFamily()).compareTo(other.isSetColumnFamily());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumnFamily()).compareTo(other.isSetColumnFamily());
if (lastComparison != 0) {
return lastComparison;
}
@@ -432,7 +413,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumnQualifier()).compareTo(other.isSetColumnQualifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumnQualifier()).compareTo(other.isSetColumnQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -442,7 +423,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumnVisibility()).compareTo(other.isSetColumnVisibility());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumnVisibility()).compareTo(other.isSetColumnVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@@ -460,16 +441,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TColumn(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TColumn(");
boolean first = true;
sb.append("columnFamily:");
@@ -512,7 +493,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -520,13 +501,13 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
- private static class TColumnStandardSchemeFactory implements SchemeFactory {
+ private static class TColumnStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnStandardScheme getScheme() {
return new TColumnStandardScheme();
}
}
- private static class TColumnStandardScheme extends StandardScheme<TColumn> {
+ private static class TColumnStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumn> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TColumn struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -598,18 +579,18 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
- private static class TColumnTupleSchemeFactory implements SchemeFactory {
+ private static class TColumnTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnTupleScheme getScheme() {
return new TColumnTupleScheme();
}
}
- private static class TColumnTupleScheme extends TupleScheme<TColumn> {
+ private static class TColumnTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumn> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetColumnFamily()) {
optionals.set(0);
}
@@ -633,8 +614,8 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.columnFamily = iprot.readBinary();
struct.setColumnFamilyIsSet(true);
@@ -650,5 +631,9 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+ private static void unusedMethod() {}
}