HBASE-21791 Upgrade thrift dependency to 0.12.0

This commit is contained in:
zhangduo 2019-01-27 12:02:00 +08:00
parent e736d78362
commit cf6ab32f39
49 changed files with 19763 additions and 18129 deletions

View File

@ -1,65 +1,35 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* An AlreadyExists exceptions signals that a table with the specified
* name already exists
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
public class AlreadyExists extends TException implements org.apache.thrift.TBase<AlreadyExists, AlreadyExists._Fields>, java.io.Serializable, Cloneable, Comparable<AlreadyExists> {
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class AlreadyExists extends org.apache.thrift.TException implements org.apache.thrift.TBase<AlreadyExists, AlreadyExists._Fields>, java.io.Serializable, Cloneable, Comparable<AlreadyExists> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExists");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 AlreadyExistsStandardSchemeFactory());
schemes.put(TupleScheme.class, new AlreadyExistsTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AlreadyExistsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AlreadyExistsTupleSchemeFactory();
public String message; // required
public @org.apache.thrift.annotation.Nullable java.lang.String message; // 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 {
MESSAGE((short)1, "message");
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);
}
}
@ -67,6 +37,7 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // MESSAGE
@ -82,21 +53,22 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -105,18 +77,18 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(AlreadyExists.class, metaDataMap);
}
@ -124,7 +96,7 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
}
public AlreadyExists(
String message)
java.lang.String message)
{
this();
this.message = message;
@ -148,11 +120,12 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
this.message = null;
}
public String getMessage() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getMessage() {
return this.message;
}
public AlreadyExists setMessage(String message) {
public AlreadyExists setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@ -172,43 +145,44 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
} else {
setMessage((String)value);
setMessage((java.lang.String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
}
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 MESSAGE:
return isSetMessage();
}
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 AlreadyExists)
@ -219,6 +193,8 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
public boolean equals(AlreadyExists that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_message = true && this.isSetMessage();
boolean that_present_message = true && that.isSetMessage();
@ -234,14 +210,13 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_message = true && (isSetMessage());
list.add(present_message);
if (present_message)
list.add(message);
hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
if (isSetMessage())
hashCode = hashCode * 8191 + message.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -252,7 +227,7 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
lastComparison = java.lang.Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@ -265,21 +240,22 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("AlreadyExists(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("AlreadyExists(");
boolean first = true;
sb.append("message:");
@ -306,7 +282,7 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
}
}
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) {
@ -314,13 +290,13 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
}
}
private static class AlreadyExistsStandardSchemeFactory implements SchemeFactory {
private static class AlreadyExistsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AlreadyExistsStandardScheme getScheme() {
return new AlreadyExistsStandardScheme();
}
}
private static class AlreadyExistsStandardScheme extends StandardScheme<AlreadyExists> {
private static class AlreadyExistsStandardScheme extends org.apache.thrift.scheme.StandardScheme<AlreadyExists> {
public void read(org.apache.thrift.protocol.TProtocol iprot, AlreadyExists struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -366,18 +342,18 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
}
private static class AlreadyExistsTupleSchemeFactory implements SchemeFactory {
private static class AlreadyExistsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AlreadyExistsTupleScheme getScheme() {
return new AlreadyExistsTupleScheme();
}
}
private static class AlreadyExistsTupleScheme extends TupleScheme<AlreadyExists> {
private static class AlreadyExistsTupleScheme extends org.apache.thrift.scheme.TupleScheme<AlreadyExists> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, AlreadyExists 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.isSetMessage()) {
optionals.set(0);
}
@ -389,8 +365,8 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, AlreadyExists 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.message = iprot.readString();
struct.setMessageIsSet(true);
@ -398,5 +374,8 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
}
}
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();
}
}

View File

@ -1,67 +1,37 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* A BatchMutation object is used to apply a number of Mutations to a single row.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, BatchMutation._Fields>, java.io.Serializable, Cloneable, Comparable<BatchMutation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchMutation");
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new BatchMutationStandardSchemeFactory());
schemes.put(TupleScheme.class, new BatchMutationTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BatchMutationStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BatchMutationTupleSchemeFactory();
public ByteBuffer row; // required
public List<Mutation> mutations; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.util.List<Mutation> mutations; // 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 {
ROW((short)1, "row"),
MUTATIONS((short)2, "mutations");
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);
}
}
@ -69,6 +39,7 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROW
@ -86,21 +57,22 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -109,21 +81,21 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", 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, Mutation.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BatchMutation.class, metaDataMap);
}
@ -131,8 +103,8 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
}
public BatchMutation(
ByteBuffer row,
List<Mutation> mutations)
java.nio.ByteBuffer row,
java.util.List<Mutation> mutations)
{
this();
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
@ -144,10 +116,10 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
*/
public BatchMutation(BatchMutation other) {
if (other.isSetRow()) {
this.row = other.row;
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetMutations()) {
List<Mutation> __this__mutations = new ArrayList<Mutation>(other.mutations.size());
java.util.List<Mutation> __this__mutations = new java.util.ArrayList<Mutation>(other.mutations.size());
for (Mutation other_element : other.mutations) {
__this__mutations.add(new Mutation(other_element));
}
@ -170,16 +142,16 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public BatchMutation setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public BatchMutation setRow(ByteBuffer row) {
public BatchMutation setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -203,22 +175,24 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
return (this.mutations == null) ? 0 : this.mutations.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<Mutation> getMutationsIterator() {
return (this.mutations == null) ? null : this.mutations.iterator();
}
public void addToMutations(Mutation elem) {
if (this.mutations == null) {
this.mutations = new ArrayList<Mutation>();
this.mutations = new java.util.ArrayList<Mutation>();
}
this.mutations.add(elem);
}
public List<Mutation> getMutations() {
@org.apache.thrift.annotation.Nullable
public java.util.List<Mutation> getMutations() {
return this.mutations;
}
public BatchMutation setMutations(List<Mutation> mutations) {
public BatchMutation setMutations(@org.apache.thrift.annotation.Nullable java.util.List<Mutation> mutations) {
this.mutations = mutations;
return this;
}
@ -238,13 +212,17 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -252,14 +230,15 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
if (value == null) {
unsetMutations();
} else {
setMutations((List<Mutation>)value);
setMutations((java.util.List<Mutation>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@ -268,13 +247,13 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
return getMutations();
}
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) {
@ -283,11 +262,11 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
case MUTATIONS:
return isSetMutations();
}
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 BatchMutation)
@ -298,6 +277,8 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
public boolean equals(BatchMutation that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@ -322,19 +303,17 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_mutations = true && (isSetMutations());
list.add(present_mutations);
if (present_mutations)
list.add(mutations);
hashCode = hashCode * 8191 + ((isSetMutations()) ? 131071 : 524287);
if (isSetMutations())
hashCode = hashCode * 8191 + mutations.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -345,7 +324,7 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -355,7 +334,7 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMutations()).compareTo(other.isSetMutations());
lastComparison = java.lang.Boolean.valueOf(isSetMutations()).compareTo(other.isSetMutations());
if (lastComparison != 0) {
return lastComparison;
}
@ -368,21 +347,22 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("BatchMutation(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("BatchMutation(");
boolean first = true;
sb.append("row:");
@ -417,7 +397,7 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
}
}
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) {
@ -425,13 +405,13 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
}
}
private static class BatchMutationStandardSchemeFactory implements SchemeFactory {
private static class BatchMutationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BatchMutationStandardScheme getScheme() {
return new BatchMutationStandardScheme();
}
}
private static class BatchMutationStandardScheme extends StandardScheme<BatchMutation> {
private static class BatchMutationStandardScheme extends org.apache.thrift.scheme.StandardScheme<BatchMutation> {
public void read(org.apache.thrift.protocol.TProtocol iprot, BatchMutation struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -455,8 +435,8 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.mutations = new ArrayList<Mutation>(_list0.size);
Mutation _elem1;
struct.mutations = new java.util.ArrayList<Mutation>(_list0.size);
@org.apache.thrift.annotation.Nullable Mutation _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new Mutation();
@ -508,18 +488,18 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
}
private static class BatchMutationTupleSchemeFactory implements SchemeFactory {
private static class BatchMutationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BatchMutationTupleScheme getScheme() {
return new BatchMutationTupleScheme();
}
}
private static class BatchMutationTupleScheme extends TupleScheme<BatchMutation> {
private static class BatchMutationTupleScheme extends org.apache.thrift.scheme.TupleScheme<BatchMutation> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, BatchMutation 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.isSetRow()) {
optionals.set(0);
}
@ -543,8 +523,8 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BatchMutation 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.row = iprot.readBinary();
struct.setRowIsSet(true);
@ -552,8 +532,8 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.mutations = new ArrayList<Mutation>(_list5.size);
Mutation _elem6;
struct.mutations = new java.util.ArrayList<Mutation>(_list5.size);
@org.apache.thrift.annotation.Nullable Mutation _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = new Mutation();
@ -566,5 +546,8 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
}
}
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();
}
}

View File

@ -1,45 +1,18 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* An HColumnDescriptor contains information about a column family
* such as the number of versions, compression settings, etc. It is
* used as input when creating a table or adding a column.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescriptor, ColumnDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnDescriptor> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnDescriptor");
@ -53,17 +26,14 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
private static final org.apache.thrift.protocol.TField BLOCK_CACHE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("blockCacheEnabled", org.apache.thrift.protocol.TType.BOOL, (short)8);
private static final org.apache.thrift.protocol.TField TIME_TO_LIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeToLive", org.apache.thrift.protocol.TType.I32, (short)9);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new ColumnDescriptorStandardSchemeFactory());
schemes.put(TupleScheme.class, new ColumnDescriptorTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ColumnDescriptorStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ColumnDescriptorTupleSchemeFactory();
public ByteBuffer name; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer name; // required
public int maxVersions; // required
public String compression; // required
public @org.apache.thrift.annotation.Nullable java.lang.String compression; // required
public boolean inMemory; // required
public String bloomFilterType; // required
public @org.apache.thrift.annotation.Nullable java.lang.String bloomFilterType; // required
public int bloomFilterVectorSize; // required
public int bloomFilterNbHashes; // required
public boolean blockCacheEnabled; // required
@ -81,10 +51,10 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
BLOCK_CACHE_ENABLED((short)8, "blockCacheEnabled"),
TIME_TO_LIVE((short)9, "timeToLive");
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);
}
}
@ -92,6 +62,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // NAME
@ -123,21 +94,22 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -146,7 +118,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -159,9 +131,9 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
private static final int __BLOCKCACHEENABLED_ISSET_ID = 4;
private static final int __TIMETOLIVE_ISSET_ID = 5;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.DEFAULT,
@ -180,7 +152,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.TIME_TO_LIVE, new org.apache.thrift.meta_data.FieldMetaData("timeToLive", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnDescriptor.class, metaDataMap);
}
@ -204,11 +176,11 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
public ColumnDescriptor(
ByteBuffer name,
java.nio.ByteBuffer name,
int maxVersions,
String compression,
java.lang.String compression,
boolean inMemory,
String bloomFilterType,
java.lang.String bloomFilterType,
int bloomFilterVectorSize,
int bloomFilterNbHashes,
boolean blockCacheEnabled,
@ -238,7 +210,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
public ColumnDescriptor(ColumnDescriptor other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetName()) {
this.name = other.name;
this.name = org.apache.thrift.TBaseHelper.copyBinary(other.name);
}
this.maxVersions = other.maxVersions;
if (other.isSetCompression()) {
@ -284,16 +256,16 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return name == null ? null : name.array();
}
public ByteBuffer bufferForName() {
public java.nio.ByteBuffer bufferForName() {
return org.apache.thrift.TBaseHelper.copyBinary(name);
}
public ColumnDescriptor setName(byte[] name) {
this.name = name == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(name, name.length));
this.name = name == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(name.clone());
return this;
}
public ColumnDescriptor setName(ByteBuffer name) {
public ColumnDescriptor setName(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer name) {
this.name = org.apache.thrift.TBaseHelper.copyBinary(name);
return this;
}
@ -324,23 +296,24 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
public void unsetMaxVersions() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID);
}
/** Returns true if field maxVersions is set (has been assigned a value) and false otherwise */
public boolean isSetMaxVersions() {
return EncodingUtils.testBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID);
}
public void setMaxVersionsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID, value);
}
public String getCompression() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getCompression() {
return this.compression;
}
public ColumnDescriptor setCompression(String compression) {
public ColumnDescriptor setCompression(@org.apache.thrift.annotation.Nullable java.lang.String compression) {
this.compression = compression;
return this;
}
@ -371,23 +344,24 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
public void unsetInMemory() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INMEMORY_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INMEMORY_ISSET_ID);
}
/** Returns true if field inMemory is set (has been assigned a value) and false otherwise */
public boolean isSetInMemory() {
return EncodingUtils.testBit(__isset_bitfield, __INMEMORY_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INMEMORY_ISSET_ID);
}
public void setInMemoryIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INMEMORY_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INMEMORY_ISSET_ID, value);
}
public String getBloomFilterType() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getBloomFilterType() {
return this.bloomFilterType;
}
public ColumnDescriptor setBloomFilterType(String bloomFilterType) {
public ColumnDescriptor setBloomFilterType(@org.apache.thrift.annotation.Nullable java.lang.String bloomFilterType) {
this.bloomFilterType = bloomFilterType;
return this;
}
@ -418,16 +392,16 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
public void unsetBloomFilterVectorSize() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOOMFILTERVECTORSIZE_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BLOOMFILTERVECTORSIZE_ISSET_ID);
}
/** Returns true if field bloomFilterVectorSize is set (has been assigned a value) and false otherwise */
public boolean isSetBloomFilterVectorSize() {
return EncodingUtils.testBit(__isset_bitfield, __BLOOMFILTERVECTORSIZE_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BLOOMFILTERVECTORSIZE_ISSET_ID);
}
public void setBloomFilterVectorSizeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOOMFILTERVECTORSIZE_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BLOOMFILTERVECTORSIZE_ISSET_ID, value);
}
public int getBloomFilterNbHashes() {
@ -441,16 +415,16 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
public void unsetBloomFilterNbHashes() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOOMFILTERNBHASHES_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BLOOMFILTERNBHASHES_ISSET_ID);
}
/** Returns true if field bloomFilterNbHashes is set (has been assigned a value) and false otherwise */
public boolean isSetBloomFilterNbHashes() {
return EncodingUtils.testBit(__isset_bitfield, __BLOOMFILTERNBHASHES_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BLOOMFILTERNBHASHES_ISSET_ID);
}
public void setBloomFilterNbHashesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOOMFILTERNBHASHES_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BLOOMFILTERNBHASHES_ISSET_ID, value);
}
public boolean isBlockCacheEnabled() {
@ -464,16 +438,16 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
public void unsetBlockCacheEnabled() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID);
}
/** Returns true if field blockCacheEnabled is set (has been assigned a value) and false otherwise */
public boolean isSetBlockCacheEnabled() {
return EncodingUtils.testBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID);
}
public void setBlockCacheEnabledIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BLOCKCACHEENABLED_ISSET_ID, value);
}
public int getTimeToLive() {
@ -487,25 +461,29 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
public void unsetTimeToLive() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID);
}
/** Returns true if field timeToLive is set (has been assigned a value) and false otherwise */
public boolean isSetTimeToLive() {
return EncodingUtils.testBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID);
}
public void setTimeToLiveIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMETOLIVE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unsetName();
} else {
setName((ByteBuffer)value);
if (value instanceof byte[]) {
setName((byte[])value);
} else {
setName((java.nio.ByteBuffer)value);
}
}
break;
@ -513,7 +491,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
if (value == null) {
unsetMaxVersions();
} else {
setMaxVersions((Integer)value);
setMaxVersions((java.lang.Integer)value);
}
break;
@ -521,7 +499,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
if (value == null) {
unsetCompression();
} else {
setCompression((String)value);
setCompression((java.lang.String)value);
}
break;
@ -529,7 +507,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
if (value == null) {
unsetInMemory();
} else {
setInMemory((Boolean)value);
setInMemory((java.lang.Boolean)value);
}
break;
@ -537,7 +515,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
if (value == null) {
unsetBloomFilterType();
} else {
setBloomFilterType((String)value);
setBloomFilterType((java.lang.String)value);
}
break;
@ -545,7 +523,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
if (value == null) {
unsetBloomFilterVectorSize();
} else {
setBloomFilterVectorSize((Integer)value);
setBloomFilterVectorSize((java.lang.Integer)value);
}
break;
@ -553,7 +531,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
if (value == null) {
unsetBloomFilterNbHashes();
} else {
setBloomFilterNbHashes((Integer)value);
setBloomFilterNbHashes((java.lang.Integer)value);
}
break;
@ -561,7 +539,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
if (value == null) {
unsetBlockCacheEnabled();
} else {
setBlockCacheEnabled((Boolean)value);
setBlockCacheEnabled((java.lang.Boolean)value);
}
break;
@ -569,14 +547,15 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
if (value == null) {
unsetTimeToLive();
} else {
setTimeToLive((Integer)value);
setTimeToLive((java.lang.Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return getName();
@ -606,13 +585,13 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return getTimeToLive();
}
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) {
@ -635,11 +614,11 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
case TIME_TO_LIVE:
return isSetTimeToLive();
}
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 ColumnDescriptor)
@ -650,6 +629,8 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
public boolean equals(ColumnDescriptor that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
@ -737,54 +718,33 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_name = true && (isSetName());
list.add(present_name);
if (present_name)
list.add(name);
hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
if (isSetName())
hashCode = hashCode * 8191 + name.hashCode();
boolean present_maxVersions = true;
list.add(present_maxVersions);
if (present_maxVersions)
list.add(maxVersions);
hashCode = hashCode * 8191 + maxVersions;
boolean present_compression = true && (isSetCompression());
list.add(present_compression);
if (present_compression)
list.add(compression);
hashCode = hashCode * 8191 + ((isSetCompression()) ? 131071 : 524287);
if (isSetCompression())
hashCode = hashCode * 8191 + compression.hashCode();
boolean present_inMemory = true;
list.add(present_inMemory);
if (present_inMemory)
list.add(inMemory);
hashCode = hashCode * 8191 + ((inMemory) ? 131071 : 524287);
boolean present_bloomFilterType = true && (isSetBloomFilterType());
list.add(present_bloomFilterType);
if (present_bloomFilterType)
list.add(bloomFilterType);
hashCode = hashCode * 8191 + ((isSetBloomFilterType()) ? 131071 : 524287);
if (isSetBloomFilterType())
hashCode = hashCode * 8191 + bloomFilterType.hashCode();
boolean present_bloomFilterVectorSize = true;
list.add(present_bloomFilterVectorSize);
if (present_bloomFilterVectorSize)
list.add(bloomFilterVectorSize);
hashCode = hashCode * 8191 + bloomFilterVectorSize;
boolean present_bloomFilterNbHashes = true;
list.add(present_bloomFilterNbHashes);
if (present_bloomFilterNbHashes)
list.add(bloomFilterNbHashes);
hashCode = hashCode * 8191 + bloomFilterNbHashes;
boolean present_blockCacheEnabled = true;
list.add(present_blockCacheEnabled);
if (present_blockCacheEnabled)
list.add(blockCacheEnabled);
hashCode = hashCode * 8191 + ((blockCacheEnabled) ? 131071 : 524287);
boolean present_timeToLive = true;
list.add(present_timeToLive);
if (present_timeToLive)
list.add(timeToLive);
hashCode = hashCode * 8191 + timeToLive;
return list.hashCode();
return hashCode;
}
@Override
@ -795,7 +755,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@ -805,7 +765,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(other.isSetMaxVersions());
lastComparison = java.lang.Boolean.valueOf(isSetMaxVersions()).compareTo(other.isSetMaxVersions());
if (lastComparison != 0) {
return lastComparison;
}
@ -815,7 +775,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCompression()).compareTo(other.isSetCompression());
lastComparison = java.lang.Boolean.valueOf(isSetCompression()).compareTo(other.isSetCompression());
if (lastComparison != 0) {
return lastComparison;
}
@ -825,7 +785,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(other.isSetInMemory());
lastComparison = java.lang.Boolean.valueOf(isSetInMemory()).compareTo(other.isSetInMemory());
if (lastComparison != 0) {
return lastComparison;
}
@ -835,7 +795,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBloomFilterType()).compareTo(other.isSetBloomFilterType());
lastComparison = java.lang.Boolean.valueOf(isSetBloomFilterType()).compareTo(other.isSetBloomFilterType());
if (lastComparison != 0) {
return lastComparison;
}
@ -845,7 +805,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(other.isSetBloomFilterVectorSize());
lastComparison = java.lang.Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(other.isSetBloomFilterVectorSize());
if (lastComparison != 0) {
return lastComparison;
}
@ -855,7 +815,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(other.isSetBloomFilterNbHashes());
lastComparison = java.lang.Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(other.isSetBloomFilterNbHashes());
if (lastComparison != 0) {
return lastComparison;
}
@ -865,7 +825,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(other.isSetBlockCacheEnabled());
lastComparison = java.lang.Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(other.isSetBlockCacheEnabled());
if (lastComparison != 0) {
return lastComparison;
}
@ -875,7 +835,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(other.isSetTimeToLive());
lastComparison = java.lang.Boolean.valueOf(isSetTimeToLive()).compareTo(other.isSetTimeToLive());
if (lastComparison != 0) {
return lastComparison;
}
@ -888,21 +848,22 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("ColumnDescriptor(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("ColumnDescriptor(");
boolean first = true;
sb.append("name:");
@ -969,7 +930,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
}
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;
@ -979,13 +940,13 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
}
private static class ColumnDescriptorStandardSchemeFactory implements SchemeFactory {
private static class ColumnDescriptorStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnDescriptorStandardScheme getScheme() {
return new ColumnDescriptorStandardScheme();
}
}
private static class ColumnDescriptorStandardScheme extends StandardScheme<ColumnDescriptor> {
private static class ColumnDescriptorStandardScheme extends org.apache.thrift.scheme.StandardScheme<ColumnDescriptor> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnDescriptor struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -1123,18 +1084,18 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
private static class ColumnDescriptorTupleSchemeFactory implements SchemeFactory {
private static class ColumnDescriptorTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ColumnDescriptorTupleScheme getScheme() {
return new ColumnDescriptorTupleScheme();
}
}
private static class ColumnDescriptorTupleScheme extends TupleScheme<ColumnDescriptor> {
private static class ColumnDescriptorTupleScheme extends org.apache.thrift.scheme.TupleScheme<ColumnDescriptor> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ColumnDescriptor 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.isSetName()) {
optionals.set(0);
}
@ -1194,8 +1155,8 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ColumnDescriptor struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(9);
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.name = iprot.readBinary();
struct.setNameIsSet(true);
@ -1235,5 +1196,8 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
}
}
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();
}
}

View File

@ -1,66 +1,36 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* An IOError exception signals that an error occurred communicating
* to the Hbase master or an Hbase region server. Also used to return
* more general Hbase error conditions.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
public class IOError extends TException implements org.apache.thrift.TBase<IOError, IOError._Fields>, java.io.Serializable, Cloneable, Comparable<IOError> {
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class IOError extends org.apache.thrift.TException implements org.apache.thrift.TBase<IOError, IOError._Fields>, java.io.Serializable, Cloneable, Comparable<IOError> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IOError");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 IOErrorStandardSchemeFactory());
schemes.put(TupleScheme.class, new IOErrorTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new IOErrorStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new IOErrorTupleSchemeFactory();
public String message; // required
public @org.apache.thrift.annotation.Nullable java.lang.String message; // 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 {
MESSAGE((short)1, "message");
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);
}
}
@ -68,6 +38,7 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // MESSAGE
@ -83,21 +54,22 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -106,18 +78,18 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(IOError.class, metaDataMap);
}
@ -125,7 +97,7 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
}
public IOError(
String message)
java.lang.String message)
{
this();
this.message = message;
@ -149,11 +121,12 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
this.message = null;
}
public String getMessage() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getMessage() {
return this.message;
}
public IOError setMessage(String message) {
public IOError setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@ -173,43 +146,44 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
} else {
setMessage((String)value);
setMessage((java.lang.String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
}
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 MESSAGE:
return isSetMessage();
}
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 IOError)
@ -220,6 +194,8 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
public boolean equals(IOError that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_message = true && this.isSetMessage();
boolean that_present_message = true && that.isSetMessage();
@ -235,14 +211,13 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_message = true && (isSetMessage());
list.add(present_message);
if (present_message)
list.add(message);
hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
if (isSetMessage())
hashCode = hashCode * 8191 + message.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -253,7 +228,7 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
lastComparison = java.lang.Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@ -266,21 +241,22 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("IOError(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("IOError(");
boolean first = true;
sb.append("message:");
@ -307,7 +283,7 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
}
}
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) {
@ -315,13 +291,13 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
}
}
private static class IOErrorStandardSchemeFactory implements SchemeFactory {
private static class IOErrorStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IOErrorStandardScheme getScheme() {
return new IOErrorStandardScheme();
}
}
private static class IOErrorStandardScheme extends StandardScheme<IOError> {
private static class IOErrorStandardScheme extends org.apache.thrift.scheme.StandardScheme<IOError> {
public void read(org.apache.thrift.protocol.TProtocol iprot, IOError struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -367,18 +343,18 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
}
private static class IOErrorTupleSchemeFactory implements SchemeFactory {
private static class IOErrorTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IOErrorTupleScheme getScheme() {
return new IOErrorTupleScheme();
}
}
private static class IOErrorTupleScheme extends TupleScheme<IOError> {
private static class IOErrorTupleScheme extends org.apache.thrift.scheme.TupleScheme<IOError> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, IOError 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.isSetMessage()) {
optionals.set(0);
}
@ -390,8 +366,8 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, IOError 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.message = iprot.readString();
struct.setMessageIsSet(true);
@ -399,5 +375,8 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
}
}
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();
}
}

View File

@ -1,65 +1,35 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* An IllegalArgument exception indicates an illegal or invalid
* argument was passed into a procedure.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
public class IllegalArgument extends TException implements org.apache.thrift.TBase<IllegalArgument, IllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<IllegalArgument> {
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class IllegalArgument extends org.apache.thrift.TException implements org.apache.thrift.TBase<IllegalArgument, IllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<IllegalArgument> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IllegalArgument");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 IllegalArgumentStandardSchemeFactory());
schemes.put(TupleScheme.class, new IllegalArgumentTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new IllegalArgumentStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new IllegalArgumentTupleSchemeFactory();
public String message; // required
public @org.apache.thrift.annotation.Nullable java.lang.String message; // 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 {
MESSAGE((short)1, "message");
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);
}
}
@ -67,6 +37,7 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // MESSAGE
@ -82,21 +53,22 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -105,18 +77,18 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", 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(IllegalArgument.class, metaDataMap);
}
@ -124,7 +96,7 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
}
public IllegalArgument(
String message)
java.lang.String message)
{
this();
this.message = message;
@ -148,11 +120,12 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
this.message = null;
}
public String getMessage() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getMessage() {
return this.message;
}
public IllegalArgument setMessage(String message) {
public IllegalArgument setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@ -172,43 +145,44 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
} else {
setMessage((String)value);
setMessage((java.lang.String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
}
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 MESSAGE:
return isSetMessage();
}
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 IllegalArgument)
@ -219,6 +193,8 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
public boolean equals(IllegalArgument that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_message = true && this.isSetMessage();
boolean that_present_message = true && that.isSetMessage();
@ -234,14 +210,13 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_message = true && (isSetMessage());
list.add(present_message);
if (present_message)
list.add(message);
hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
if (isSetMessage())
hashCode = hashCode * 8191 + message.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -252,7 +227,7 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
lastComparison = java.lang.Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@ -265,21 +240,22 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("IllegalArgument(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("IllegalArgument(");
boolean first = true;
sb.append("message:");
@ -306,7 +282,7 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
}
}
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) {
@ -314,13 +290,13 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
}
}
private static class IllegalArgumentStandardSchemeFactory implements SchemeFactory {
private static class IllegalArgumentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IllegalArgumentStandardScheme getScheme() {
return new IllegalArgumentStandardScheme();
}
}
private static class IllegalArgumentStandardScheme extends StandardScheme<IllegalArgument> {
private static class IllegalArgumentStandardScheme extends org.apache.thrift.scheme.StandardScheme<IllegalArgument> {
public void read(org.apache.thrift.protocol.TProtocol iprot, IllegalArgument struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -366,18 +342,18 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
}
private static class IllegalArgumentTupleSchemeFactory implements SchemeFactory {
private static class IllegalArgumentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IllegalArgumentTupleScheme getScheme() {
return new IllegalArgumentTupleScheme();
}
}
private static class IllegalArgumentTupleScheme extends TupleScheme<IllegalArgument> {
private static class IllegalArgumentTupleScheme extends org.apache.thrift.scheme.TupleScheme<IllegalArgument> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, IllegalArgument 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.isSetMessage()) {
optionals.set(0);
}
@ -389,8 +365,8 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, IllegalArgument 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.message = iprot.readString();
struct.setMessageIsSet(true);
@ -398,5 +374,8 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
}
}
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();
}
}

View File

@ -1,43 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* A Mutation object is used to either update or delete a column-value.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fields>, java.io.Serializable, Cloneable, Comparable<Mutation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Mutation");
@ -46,15 +19,12 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWAL", org.apache.thrift.protocol.TType.BOOL, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new MutationStandardSchemeFactory());
schemes.put(TupleScheme.class, new MutationTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MutationStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MutationTupleSchemeFactory();
public boolean isDelete; // required
public ByteBuffer column; // required
public ByteBuffer value; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer column; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required
public boolean writeToWAL; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -64,10 +34,10 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
VALUE((short)3, "value"),
WRITE_TO_WAL((short)4, "writeToWAL");
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);
}
}
@ -75,6 +45,7 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // IS_DELETE
@ -96,21 +67,22 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -119,7 +91,7 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -128,9 +100,9 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
private static final int __ISDELETE_ISSET_ID = 0;
private static final int __WRITETOWAL_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.IS_DELETE, new org.apache.thrift.meta_data.FieldMetaData("isDelete", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
@ -139,7 +111,7 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWAL", 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(Mutation.class, metaDataMap);
}
@ -152,8 +124,8 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
public Mutation(
boolean isDelete,
ByteBuffer column,
ByteBuffer value,
java.nio.ByteBuffer column,
java.nio.ByteBuffer value,
boolean writeToWAL)
{
this();
@ -172,10 +144,10 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
__isset_bitfield = other.__isset_bitfield;
this.isDelete = other.isDelete;
if (other.isSetColumn()) {
this.column = other.column;
this.column = org.apache.thrift.TBaseHelper.copyBinary(other.column);
}
if (other.isSetValue()) {
this.value = other.value;
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
this.writeToWAL = other.writeToWAL;
}
@ -205,16 +177,16 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
}
public void unsetIsDelete() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDELETE_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISDELETE_ISSET_ID);
}
/** Returns true if field isDelete is set (has been assigned a value) and false otherwise */
public boolean isSetIsDelete() {
return EncodingUtils.testBit(__isset_bitfield, __ISDELETE_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISDELETE_ISSET_ID);
}
public void setIsDeleteIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDELETE_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISDELETE_ISSET_ID, value);
}
public byte[] getColumn() {
@ -222,16 +194,16 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
return column == null ? null : column.array();
}
public ByteBuffer bufferForColumn() {
public java.nio.ByteBuffer bufferForColumn() {
return org.apache.thrift.TBaseHelper.copyBinary(column);
}
public Mutation setColumn(byte[] column) {
this.column = column == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(column, column.length));
this.column = column == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(column.clone());
return this;
}
public Mutation setColumn(ByteBuffer column) {
public Mutation setColumn(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer column) {
this.column = org.apache.thrift.TBaseHelper.copyBinary(column);
return this;
}
@ -256,16 +228,16 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
return value == null ? null : value.array();
}
public ByteBuffer bufferForValue() {
public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public Mutation setValue(byte[] value) {
this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
public Mutation setValue(ByteBuffer value) {
public Mutation setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
@ -296,25 +268,25 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
}
public void unsetWriteToWAL() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITETOWAL_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WRITETOWAL_ISSET_ID);
}
/** Returns true if field writeToWAL is set (has been assigned a value) and false otherwise */
public boolean isSetWriteToWAL() {
return EncodingUtils.testBit(__isset_bitfield, __WRITETOWAL_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WRITETOWAL_ISSET_ID);
}
public void setWriteToWALIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case IS_DELETE:
if (value == null) {
unsetIsDelete();
} else {
setIsDelete((Boolean)value);
setIsDelete((java.lang.Boolean)value);
}
break;
@ -322,7 +294,11 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
if (value == null) {
unsetColumn();
} else {
setColumn((ByteBuffer)value);
if (value instanceof byte[]) {
setColumn((byte[])value);
} else {
setColumn((java.nio.ByteBuffer)value);
}
}
break;
@ -330,7 +306,11 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
if (value == null) {
unsetValue();
} else {
setValue((ByteBuffer)value);
if (value instanceof byte[]) {
setValue((byte[])value);
} else {
setValue((java.nio.ByteBuffer)value);
}
}
break;
@ -338,14 +318,15 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
if (value == null) {
unsetWriteToWAL();
} else {
setWriteToWAL((Boolean)value);
setWriteToWAL((java.lang.Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IS_DELETE:
return isIsDelete();
@ -360,13 +341,13 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
return isWriteToWAL();
}
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) {
@ -379,11 +360,11 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
case WRITE_TO_WAL:
return isSetWriteToWAL();
}
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 Mutation)
@ -394,6 +375,8 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
public boolean equals(Mutation that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_isDelete = true;
boolean that_present_isDelete = true;
@ -436,29 +419,21 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_isDelete = true;
list.add(present_isDelete);
if (present_isDelete)
list.add(isDelete);
hashCode = hashCode * 8191 + ((isDelete) ? 131071 : 524287);
boolean present_column = true && (isSetColumn());
list.add(present_column);
if (present_column)
list.add(column);
hashCode = hashCode * 8191 + ((isSetColumn()) ? 131071 : 524287);
if (isSetColumn())
hashCode = hashCode * 8191 + column.hashCode();
boolean present_value = true && (isSetValue());
list.add(present_value);
if (present_value)
list.add(value);
hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
if (isSetValue())
hashCode = hashCode * 8191 + value.hashCode();
boolean present_writeToWAL = true;
list.add(present_writeToWAL);
if (present_writeToWAL)
list.add(writeToWAL);
hashCode = hashCode * 8191 + ((writeToWAL) ? 131071 : 524287);
return list.hashCode();
return hashCode;
}
@Override
@ -469,7 +444,7 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetIsDelete()).compareTo(other.isSetIsDelete());
lastComparison = java.lang.Boolean.valueOf(isSetIsDelete()).compareTo(other.isSetIsDelete());
if (lastComparison != 0) {
return lastComparison;
}
@ -479,7 +454,7 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
lastComparison = java.lang.Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
@ -489,7 +464,7 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@ -499,7 +474,7 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetWriteToWAL()).compareTo(other.isSetWriteToWAL());
lastComparison = java.lang.Boolean.valueOf(isSetWriteToWAL()).compareTo(other.isSetWriteToWAL());
if (lastComparison != 0) {
return lastComparison;
}
@ -512,21 +487,22 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("Mutation(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("Mutation(");
boolean first = true;
sb.append("isDelete:");
@ -569,7 +545,7 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// 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;
@ -579,13 +555,13 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
}
}
private static class MutationStandardSchemeFactory implements SchemeFactory {
private static class MutationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MutationStandardScheme getScheme() {
return new MutationStandardScheme();
}
}
private static class MutationStandardScheme extends StandardScheme<Mutation> {
private static class MutationStandardScheme extends org.apache.thrift.scheme.StandardScheme<Mutation> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Mutation struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -666,18 +642,18 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
}
private static class MutationTupleSchemeFactory implements SchemeFactory {
private static class MutationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MutationTupleScheme getScheme() {
return new MutationTupleScheme();
}
}
private static class MutationTupleScheme extends TupleScheme<Mutation> {
private static class MutationTupleScheme extends org.apache.thrift.scheme.TupleScheme<Mutation> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Mutation 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.isSetIsDelete()) {
optionals.set(0);
}
@ -707,8 +683,8 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Mutation struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.isDelete = iprot.readBool();
struct.setIsDeleteIsSet(true);
@ -728,5 +704,8 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}

View File

@ -1,43 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* An Append object is used to specify the parameters for performing the append operation.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields>, java.io.Serializable, Cloneable, Comparable<TAppend> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend");
@ -46,16 +19,13 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TAppendStandardSchemeFactory());
schemes.put(TupleScheme.class, new TAppendTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAppendStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAppendTupleSchemeFactory();
public ByteBuffer table; // required
public ByteBuffer row; // required
public List<ByteBuffer> columns; // required
public List<ByteBuffer> values; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer table; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> columns; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> values; // 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 {
@ -64,10 +34,10 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
COLUMNS((short)3, "columns"),
VALUES((short)4, "values");
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);
}
}
@ -75,6 +45,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
@ -96,21 +67,22 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -119,15 +91,15 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._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.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
@ -138,7 +110,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
tmpMap.put(_Fields.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAppend.class, metaDataMap);
}
@ -146,10 +118,10 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
public TAppend(
ByteBuffer table,
ByteBuffer row,
List<ByteBuffer> columns,
List<ByteBuffer> values)
java.nio.ByteBuffer table,
java.nio.ByteBuffer row,
java.util.List<java.nio.ByteBuffer> columns,
java.util.List<java.nio.ByteBuffer> values)
{
this();
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
@ -163,22 +135,22 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
*/
public TAppend(TAppend other) {
if (other.isSetTable()) {
this.table = other.table;
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetRow()) {
this.row = other.row;
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>(other.columns.size());
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
java.util.List<java.nio.ByteBuffer> __this__columns = new java.util.ArrayList<java.nio.ByteBuffer>(other.columns.size());
for (java.nio.ByteBuffer other_element : other.columns) {
__this__columns.add(org.apache.thrift.TBaseHelper.copyBinary(other_element));
}
this.columns = __this__columns;
}
if (other.isSetValues()) {
List<ByteBuffer> __this__values = new ArrayList<ByteBuffer>(other.values.size());
for (ByteBuffer other_element : other.values) {
__this__values.add(other_element);
java.util.List<java.nio.ByteBuffer> __this__values = new java.util.ArrayList<java.nio.ByteBuffer>(other.values.size());
for (java.nio.ByteBuffer other_element : other.values) {
__this__values.add(org.apache.thrift.TBaseHelper.copyBinary(other_element));
}
this.values = __this__values;
}
@ -201,16 +173,16 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
public java.nio.ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
public TAppend setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
this.table = table == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(table.clone());
return this;
}
public TAppend setTable(ByteBuffer table) {
public TAppend setTable(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
@ -235,16 +207,16 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TAppend setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TAppend setRow(ByteBuffer row) {
public TAppend setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -268,22 +240,24 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
public void addToColumns(java.nio.ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
this.columns = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.columns.add(elem);
}
public List<ByteBuffer> getColumns() {
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getColumns() {
return this.columns;
}
public TAppend setColumns(List<ByteBuffer> columns) {
public TAppend setColumns(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> columns) {
this.columns = columns;
return this;
}
@ -307,22 +281,24 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return (this.values == null) ? 0 : this.values.size();
}
public java.util.Iterator<ByteBuffer> getValuesIterator() {
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getValuesIterator() {
return (this.values == null) ? null : this.values.iterator();
}
public void addToValues(ByteBuffer elem) {
public void addToValues(java.nio.ByteBuffer elem) {
if (this.values == null) {
this.values = new ArrayList<ByteBuffer>();
this.values = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.values.add(elem);
}
public List<ByteBuffer> getValues() {
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getValues() {
return this.values;
}
public TAppend setValues(List<ByteBuffer> values) {
public TAppend setValues(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> values) {
this.values = values;
return this;
}
@ -342,13 +318,17 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
if (value instanceof byte[]) {
setTable((byte[])value);
} else {
setTable((java.nio.ByteBuffer)value);
}
}
break;
@ -356,7 +336,11 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -364,7 +348,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
setColumns((java.util.List<java.nio.ByteBuffer>)value);
}
break;
@ -372,14 +356,15 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (value == null) {
unsetValues();
} else {
setValues((List<ByteBuffer>)value);
setValues((java.util.List<java.nio.ByteBuffer>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
@ -394,13 +379,13 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return getValues();
}
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) {
@ -413,11 +398,11 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
case VALUES:
return isSetValues();
}
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 TAppend)
@ -428,6 +413,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
public boolean equals(TAppend that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
@ -470,29 +457,25 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
if (isSetTable())
hashCode = hashCode * 8191 + table.hashCode();
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_columns = true && (isSetColumns());
list.add(present_columns);
if (present_columns)
list.add(columns);
hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
if (isSetColumns())
hashCode = hashCode * 8191 + columns.hashCode();
boolean present_values = true && (isSetValues());
list.add(present_values);
if (present_values)
list.add(values);
hashCode = hashCode * 8191 + ((isSetValues()) ? 131071 : 524287);
if (isSetValues())
hashCode = hashCode * 8191 + values.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -503,7 +486,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
lastComparison = java.lang.Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
@ -513,7 +496,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -523,7 +506,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -533,7 +516,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues());
lastComparison = java.lang.Boolean.valueOf(isSetValues()).compareTo(other.isSetValues());
if (lastComparison != 0) {
return lastComparison;
}
@ -546,21 +529,22 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TAppend(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TAppend(");
boolean first = true;
sb.append("table:");
@ -611,7 +595,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._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) {
@ -619,13 +603,13 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
}
private static class TAppendStandardSchemeFactory implements SchemeFactory {
private static class TAppendStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAppendStandardScheme getScheme() {
return new TAppendStandardScheme();
}
}
private static class TAppendStandardScheme extends StandardScheme<TAppend> {
private static class TAppendStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAppend> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TAppend struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -657,8 +641,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list34.size);
ByteBuffer _elem35;
struct.columns = new java.util.ArrayList<java.nio.ByteBuffer>(_list34.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem35;
for (int _i36 = 0; _i36 < _list34.size; ++_i36)
{
_elem35 = iprot.readBinary();
@ -675,8 +659,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list37 = iprot.readListBegin();
struct.values = new ArrayList<ByteBuffer>(_list37.size);
ByteBuffer _elem38;
struct.values = new java.util.ArrayList<java.nio.ByteBuffer>(_list37.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem38;
for (int _i39 = 0; _i39 < _list37.size; ++_i39)
{
_elem38 = iprot.readBinary();
@ -718,7 +702,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter40 : struct.columns)
for (java.nio.ByteBuffer _iter40 : struct.columns)
{
oprot.writeBinary(_iter40);
}
@ -730,7 +714,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
oprot.writeFieldBegin(VALUES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size()));
for (ByteBuffer _iter41 : struct.values)
for (java.nio.ByteBuffer _iter41 : struct.values)
{
oprot.writeBinary(_iter41);
}
@ -744,18 +728,18 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
private static class TAppendTupleSchemeFactory implements SchemeFactory {
private static class TAppendTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAppendTupleScheme getScheme() {
return new TAppendTupleScheme();
}
}
private static class TAppendTupleScheme extends TupleScheme<TAppend> {
private static class TAppendTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAppend> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAppend 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.isSetTable()) {
optionals.set(0);
}
@ -778,7 +762,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter42 : struct.columns)
for (java.nio.ByteBuffer _iter42 : struct.columns)
{
oprot.writeBinary(_iter42);
}
@ -787,7 +771,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (struct.isSetValues()) {
{
oprot.writeI32(struct.values.size());
for (ByteBuffer _iter43 : struct.values)
for (java.nio.ByteBuffer _iter43 : struct.values)
{
oprot.writeBinary(_iter43);
}
@ -797,8 +781,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TAppend struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
@ -810,8 +794,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list44 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list44.size);
ByteBuffer _elem45;
struct.columns = new java.util.ArrayList<java.nio.ByteBuffer>(_list44.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem45;
for (int _i46 = 0; _i46 < _list44.size; ++_i46)
{
_elem45 = iprot.readBinary();
@ -823,8 +807,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.values = new ArrayList<ByteBuffer>(_list47.size);
ByteBuffer _elem48;
struct.values = new java.util.ArrayList<java.nio.ByteBuffer>(_list47.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem48;
for (int _i49 = 0; _i49 < _list47.size; ++_i49)
{
_elem48 = iprot.readBinary();
@ -836,5 +820,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._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();
}
}

View File

@ -1,59 +1,29 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* TCell - Used to transport a cell value (byte[]) and the timestamp it was
* stored with together as a result for get and getRow methods. This promotes
* the timestamp of a cell to a first-class value, making it easy to take
* note of temporal data. Cell is used all the way from HStore up to HTable.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, java.io.Serializable, Cloneable, Comparable<TCell> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCell");
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", 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 TCellStandardSchemeFactory());
schemes.put(TupleScheme.class, new TCellTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCellStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCellTupleSchemeFactory();
public ByteBuffer value; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required
public long timestamp; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -61,10 +31,10 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
VALUE((short)1, "value"),
TIMESTAMP((short)2, "timestamp");
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);
}
}
@ -72,6 +42,7 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // VALUE
@ -89,21 +60,22 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -112,7 +84,7 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -120,14 +92,14 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
// isset id assignments
private static final int __TIMESTAMP_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.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes")));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", 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(TCell.class, metaDataMap);
}
@ -135,7 +107,7 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
}
public TCell(
ByteBuffer value,
java.nio.ByteBuffer value,
long timestamp)
{
this();
@ -150,7 +122,7 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
public TCell(TCell other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetValue()) {
this.value = other.value;
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
}
this.timestamp = other.timestamp;
}
@ -171,16 +143,16 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
return value == null ? null : value.array();
}
public ByteBuffer bufferForValue() {
public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public TCell setValue(byte[] value) {
this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
public TCell setValue(ByteBuffer value) {
public TCell setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
@ -211,25 +183,29 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case VALUE:
if (value == null) {
unsetValue();
} else {
setValue((ByteBuffer)value);
if (value instanceof byte[]) {
setValue((byte[])value);
} else {
setValue((java.nio.ByteBuffer)value);
}
}
break;
@ -237,14 +213,15 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
setTimestamp((java.lang.Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case VALUE:
return getValue();
@ -253,13 +230,13 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
return getTimestamp();
}
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 +245,11 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
case TIMESTAMP:
return isSetTimestamp();
}
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 TCell)
@ -283,6 +260,8 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
public boolean equals(TCell that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_value = true && this.isSetValue();
boolean that_present_value = true && that.isSetValue();
@ -307,19 +286,15 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_value = true && (isSetValue());
list.add(present_value);
if (present_value)
list.add(value);
hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
if (isSetValue())
hashCode = hashCode * 8191 + value.hashCode();
boolean present_timestamp = true;
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
return list.hashCode();
return hashCode;
}
@Override
@ -330,7 +305,7 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@ -340,7 +315,7 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@ -353,21 +328,22 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TCell(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TCell(");
boolean first = true;
sb.append("value:");
@ -398,7 +374,7 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._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;
@ -408,13 +384,13 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
}
}
private static class TCellStandardSchemeFactory implements SchemeFactory {
private static class TCellStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCellStandardScheme getScheme() {
return new TCellStandardScheme();
}
}
private static class TCellStandardScheme extends StandardScheme<TCell> {
private static class TCellStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCell> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCell struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -471,18 +447,18 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
}
private static class TCellTupleSchemeFactory implements SchemeFactory {
private static class TCellTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCellTupleScheme getScheme() {
return new TCellTupleScheme();
}
}
private static class TCellTupleScheme extends TupleScheme<TCell> {
private static class TCellTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCell> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCell 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.isSetValue()) {
optionals.set(0);
}
@ -500,8 +476,8 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCell 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.value = iprot.readBinary();
struct.setValueIsSet(true);
@ -513,5 +489,8 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._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();
}
}

View File

@ -1,67 +1,37 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Holds column name and the cell.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
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");
private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("columnName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField CELL_FIELD_DESC = new org.apache.thrift.protocol.TField("cell", org.apache.thrift.protocol.TType.STRUCT, (short)2);
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 columnName; // required
public TCell cell; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer columnName; // required
public @org.apache.thrift.annotation.Nullable TCell cell; // 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 {
COLUMN_NAME((short)1, "columnName"),
CELL((short)2, "cell");
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);
}
}
@ -69,6 +39,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // COLUMN_NAME
@ -86,21 +57,22 @@ 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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -109,20 +81,20 @@ 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_NAME, new org.apache.thrift.meta_data.FieldMetaData("columnName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.CELL, new org.apache.thrift.meta_data.FieldMetaData("cell", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCell.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumn.class, metaDataMap);
}
@ -130,7 +102,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
public TColumn(
ByteBuffer columnName,
java.nio.ByteBuffer columnName,
TCell cell)
{
this();
@ -143,7 +115,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
*/
public TColumn(TColumn other) {
if (other.isSetColumnName()) {
this.columnName = other.columnName;
this.columnName = org.apache.thrift.TBaseHelper.copyBinary(other.columnName);
}
if (other.isSetCell()) {
this.cell = new TCell(other.cell);
@ -165,16 +137,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return columnName == null ? null : columnName.array();
}
public ByteBuffer bufferForColumnName() {
public java.nio.ByteBuffer bufferForColumnName() {
return org.apache.thrift.TBaseHelper.copyBinary(columnName);
}
public TColumn setColumnName(byte[] columnName) {
this.columnName = columnName == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(columnName, columnName.length));
this.columnName = columnName == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(columnName.clone());
return this;
}
public TColumn setColumnName(ByteBuffer columnName) {
public TColumn setColumnName(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer columnName) {
this.columnName = org.apache.thrift.TBaseHelper.copyBinary(columnName);
return this;
}
@ -194,11 +166,12 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
@org.apache.thrift.annotation.Nullable
public TCell getCell() {
return this.cell;
}
public TColumn setCell(TCell cell) {
public TColumn setCell(@org.apache.thrift.annotation.Nullable TCell cell) {
this.cell = cell;
return this;
}
@ -218,13 +191,17 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case COLUMN_NAME:
if (value == null) {
unsetColumnName();
} else {
setColumnName((ByteBuffer)value);
if (value instanceof byte[]) {
setColumnName((byte[])value);
} else {
setColumnName((java.nio.ByteBuffer)value);
}
}
break;
@ -239,7 +216,8 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case COLUMN_NAME:
return getColumnName();
@ -248,13 +226,13 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return getCell();
}
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) {
@ -263,11 +241,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
case CELL:
return isSetCell();
}
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)
@ -278,6 +256,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_columnName = true && this.isSetColumnName();
boolean that_present_columnName = true && that.isSetColumnName();
@ -302,19 +282,17 @@ 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_columnName = true && (isSetColumnName());
list.add(present_columnName);
if (present_columnName)
list.add(columnName);
hashCode = hashCode * 8191 + ((isSetColumnName()) ? 131071 : 524287);
if (isSetColumnName())
hashCode = hashCode * 8191 + columnName.hashCode();
boolean present_cell = true && (isSetCell());
list.add(present_cell);
if (present_cell)
list.add(cell);
hashCode = hashCode * 8191 + ((isSetCell()) ? 131071 : 524287);
if (isSetCell())
hashCode = hashCode * 8191 + cell.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -325,7 +303,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName());
lastComparison = java.lang.Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName());
if (lastComparison != 0) {
return lastComparison;
}
@ -335,7 +313,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCell()).compareTo(other.isSetCell());
lastComparison = java.lang.Boolean.valueOf(isSetCell()).compareTo(other.isSetCell());
if (lastComparison != 0) {
return lastComparison;
}
@ -348,21 +326,22 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("columnName:");
@ -400,7 +379,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) {
@ -408,13 +387,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;
@ -474,18 +453,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.isSetColumnName()) {
optionals.set(0);
}
@ -503,8 +482,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(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.columnName = iprot.readBinary();
struct.setColumnNameIsSet(true);
@ -517,5 +496,8 @@ 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();
}
}

View File

@ -1,44 +1,17 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* For increments that are not incrementColumnValue
* equivalents.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncrement._Fields>, java.io.Serializable, Cloneable, Comparable<TIncrement> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement");
@ -47,15 +20,12 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField AMMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("ammount", org.apache.thrift.protocol.TType.I64, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TIncrementStandardSchemeFactory());
schemes.put(TupleScheme.class, new TIncrementTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TIncrementStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TIncrementTupleSchemeFactory();
public ByteBuffer table; // required
public ByteBuffer row; // required
public ByteBuffer column; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer table; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer column; // required
public long ammount; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -65,10 +35,10 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
COLUMN((short)3, "column"),
AMMOUNT((short)4, "ammount");
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);
}
}
@ -76,6 +46,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE
@ -97,21 +68,22 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -120,7 +92,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -128,9 +100,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
// isset id assignments
private static final int __AMMOUNT_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.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
@ -139,7 +111,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.AMMOUNT, new org.apache.thrift.meta_data.FieldMetaData("ammount", 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(TIncrement.class, metaDataMap);
}
@ -147,9 +119,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
public TIncrement(
ByteBuffer table,
ByteBuffer row,
ByteBuffer column,
java.nio.ByteBuffer table,
java.nio.ByteBuffer row,
java.nio.ByteBuffer column,
long ammount)
{
this();
@ -166,13 +138,13 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
public TIncrement(TIncrement other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetTable()) {
this.table = other.table;
this.table = org.apache.thrift.TBaseHelper.copyBinary(other.table);
}
if (other.isSetRow()) {
this.row = other.row;
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetColumn()) {
this.column = other.column;
this.column = org.apache.thrift.TBaseHelper.copyBinary(other.column);
}
this.ammount = other.ammount;
}
@ -195,16 +167,16 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return table == null ? null : table.array();
}
public ByteBuffer bufferForTable() {
public java.nio.ByteBuffer bufferForTable() {
return org.apache.thrift.TBaseHelper.copyBinary(table);
}
public TIncrement setTable(byte[] table) {
this.table = table == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(table, table.length));
this.table = table == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(table.clone());
return this;
}
public TIncrement setTable(ByteBuffer table) {
public TIncrement setTable(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer table) {
this.table = org.apache.thrift.TBaseHelper.copyBinary(table);
return this;
}
@ -229,16 +201,16 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TIncrement setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TIncrement setRow(ByteBuffer row) {
public TIncrement setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -263,16 +235,16 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return column == null ? null : column.array();
}
public ByteBuffer bufferForColumn() {
public java.nio.ByteBuffer bufferForColumn() {
return org.apache.thrift.TBaseHelper.copyBinary(column);
}
public TIncrement setColumn(byte[] column) {
this.column = column == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(column, column.length));
this.column = column == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(column.clone());
return this;
}
public TIncrement setColumn(ByteBuffer column) {
public TIncrement setColumn(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer column) {
this.column = org.apache.thrift.TBaseHelper.copyBinary(column);
return this;
}
@ -303,25 +275,29 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
public void unsetAmmount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AMMOUNT_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AMMOUNT_ISSET_ID);
}
/** Returns true if field ammount is set (has been assigned a value) and false otherwise */
public boolean isSetAmmount() {
return EncodingUtils.testBit(__isset_bitfield, __AMMOUNT_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AMMOUNT_ISSET_ID);
}
public void setAmmountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AMMOUNT_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AMMOUNT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((ByteBuffer)value);
if (value instanceof byte[]) {
setTable((byte[])value);
} else {
setTable((java.nio.ByteBuffer)value);
}
}
break;
@ -329,7 +305,11 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -337,7 +317,11 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (value == null) {
unsetColumn();
} else {
setColumn((ByteBuffer)value);
if (value instanceof byte[]) {
setColumn((byte[])value);
} else {
setColumn((java.nio.ByteBuffer)value);
}
}
break;
@ -345,14 +329,15 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (value == null) {
unsetAmmount();
} else {
setAmmount((Long)value);
setAmmount((java.lang.Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE:
return getTable();
@ -367,13 +352,13 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return getAmmount();
}
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) {
@ -386,11 +371,11 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
case AMMOUNT:
return isSetAmmount();
}
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 TIncrement)
@ -401,6 +386,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
public boolean equals(TIncrement that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
@ -443,29 +430,23 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_table = true && (isSetTable());
list.add(present_table);
if (present_table)
list.add(table);
hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
if (isSetTable())
hashCode = hashCode * 8191 + table.hashCode();
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_column = true && (isSetColumn());
list.add(present_column);
if (present_column)
list.add(column);
hashCode = hashCode * 8191 + ((isSetColumn()) ? 131071 : 524287);
if (isSetColumn())
hashCode = hashCode * 8191 + column.hashCode();
boolean present_ammount = true;
list.add(present_ammount);
if (present_ammount)
list.add(ammount);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(ammount);
return list.hashCode();
return hashCode;
}
@Override
@ -476,7 +457,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
lastComparison = java.lang.Boolean.valueOf(isSetTable()).compareTo(other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
@ -486,7 +467,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -496,7 +477,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
lastComparison = java.lang.Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
@ -506,7 +487,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAmmount()).compareTo(other.isSetAmmount());
lastComparison = java.lang.Boolean.valueOf(isSetAmmount()).compareTo(other.isSetAmmount());
if (lastComparison != 0) {
return lastComparison;
}
@ -519,21 +500,22 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TIncrement(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TIncrement(");
boolean first = true;
sb.append("table:");
@ -580,7 +562,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
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;
@ -590,13 +572,13 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
private static class TIncrementStandardSchemeFactory implements SchemeFactory {
private static class TIncrementStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIncrementStandardScheme getScheme() {
return new TIncrementStandardScheme();
}
}
private static class TIncrementStandardScheme extends StandardScheme<TIncrement> {
private static class TIncrementStandardScheme extends org.apache.thrift.scheme.StandardScheme<TIncrement> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TIncrement struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -679,18 +661,18 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
private static class TIncrementTupleSchemeFactory implements SchemeFactory {
private static class TIncrementTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIncrementTupleScheme getScheme() {
return new TIncrementTupleScheme();
}
}
private static class TIncrementTupleScheme extends TupleScheme<TIncrement> {
private static class TIncrementTupleScheme extends org.apache.thrift.scheme.TupleScheme<TIncrement> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TIncrement 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.isSetTable()) {
optionals.set(0);
}
@ -720,8 +702,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TIncrement struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.table = iprot.readBinary();
struct.setTableIsSet(true);
@ -741,5 +723,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
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();
}
}

View File

@ -1,43 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* A TRegionInfo contains information about an HTable region.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegionInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TRegionInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRegionInfo");
@ -49,18 +22,15 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
private static final org.apache.thrift.protocol.TField SERVER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("serverName", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)7);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TRegionInfoStandardSchemeFactory());
schemes.put(TupleScheme.class, new TRegionInfoTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TRegionInfoStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TRegionInfoTupleSchemeFactory();
public ByteBuffer startKey; // required
public ByteBuffer endKey; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer startKey; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer endKey; // required
public long id; // required
public ByteBuffer name; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer name; // required
public byte version; // required
public ByteBuffer serverName; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer serverName; // required
public int port; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -73,10 +43,10 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
SERVER_NAME((short)6, "serverName"),
PORT((short)7, "port");
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);
}
}
@ -84,6 +54,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // START_KEY
@ -111,21 +82,22 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -134,7 +106,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -144,9 +116,9 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
private static final int __VERSION_ISSET_ID = 1;
private static final int __PORT_ISSET_ID = 2;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START_KEY, new org.apache.thrift.meta_data.FieldMetaData("startKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.END_KEY, new org.apache.thrift.meta_data.FieldMetaData("endKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
@ -161,7 +133,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRegionInfo.class, metaDataMap);
}
@ -169,12 +141,12 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
}
public TRegionInfo(
ByteBuffer startKey,
ByteBuffer endKey,
java.nio.ByteBuffer startKey,
java.nio.ByteBuffer endKey,
long id,
ByteBuffer name,
java.nio.ByteBuffer name,
byte version,
ByteBuffer serverName,
java.nio.ByteBuffer serverName,
int port)
{
this();
@ -196,18 +168,18 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
public TRegionInfo(TRegionInfo other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetStartKey()) {
this.startKey = other.startKey;
this.startKey = org.apache.thrift.TBaseHelper.copyBinary(other.startKey);
}
if (other.isSetEndKey()) {
this.endKey = other.endKey;
this.endKey = org.apache.thrift.TBaseHelper.copyBinary(other.endKey);
}
this.id = other.id;
if (other.isSetName()) {
this.name = other.name;
this.name = org.apache.thrift.TBaseHelper.copyBinary(other.name);
}
this.version = other.version;
if (other.isSetServerName()) {
this.serverName = other.serverName;
this.serverName = org.apache.thrift.TBaseHelper.copyBinary(other.serverName);
}
this.port = other.port;
}
@ -235,16 +207,16 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return startKey == null ? null : startKey.array();
}
public ByteBuffer bufferForStartKey() {
public java.nio.ByteBuffer bufferForStartKey() {
return org.apache.thrift.TBaseHelper.copyBinary(startKey);
}
public TRegionInfo setStartKey(byte[] startKey) {
this.startKey = startKey == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(startKey, startKey.length));
this.startKey = startKey == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(startKey.clone());
return this;
}
public TRegionInfo setStartKey(ByteBuffer startKey) {
public TRegionInfo setStartKey(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer startKey) {
this.startKey = org.apache.thrift.TBaseHelper.copyBinary(startKey);
return this;
}
@ -269,16 +241,16 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return endKey == null ? null : endKey.array();
}
public ByteBuffer bufferForEndKey() {
public java.nio.ByteBuffer bufferForEndKey() {
return org.apache.thrift.TBaseHelper.copyBinary(endKey);
}
public TRegionInfo setEndKey(byte[] endKey) {
this.endKey = endKey == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(endKey, endKey.length));
this.endKey = endKey == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(endKey.clone());
return this;
}
public TRegionInfo setEndKey(ByteBuffer endKey) {
public TRegionInfo setEndKey(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer endKey) {
this.endKey = org.apache.thrift.TBaseHelper.copyBinary(endKey);
return this;
}
@ -309,16 +281,16 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
}
public void unsetId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
}
public byte[] getName() {
@ -326,16 +298,16 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return name == null ? null : name.array();
}
public ByteBuffer bufferForName() {
public java.nio.ByteBuffer bufferForName() {
return org.apache.thrift.TBaseHelper.copyBinary(name);
}
public TRegionInfo setName(byte[] name) {
this.name = name == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(name, name.length));
this.name = name == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(name.clone());
return this;
}
public TRegionInfo setName(ByteBuffer name) {
public TRegionInfo setName(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer name) {
this.name = org.apache.thrift.TBaseHelper.copyBinary(name);
return this;
}
@ -366,16 +338,16 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
}
public void unsetVersion() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
public byte[] getServerName() {
@ -383,16 +355,16 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return serverName == null ? null : serverName.array();
}
public ByteBuffer bufferForServerName() {
public java.nio.ByteBuffer bufferForServerName() {
return org.apache.thrift.TBaseHelper.copyBinary(serverName);
}
public TRegionInfo setServerName(byte[] serverName) {
this.serverName = serverName == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(serverName, serverName.length));
this.serverName = serverName == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(serverName.clone());
return this;
}
public TRegionInfo setServerName(ByteBuffer serverName) {
public TRegionInfo setServerName(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer serverName) {
this.serverName = org.apache.thrift.TBaseHelper.copyBinary(serverName);
return this;
}
@ -423,25 +395,29 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
}
public void unsetPort() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean isSetPort() {
return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void setPortIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case START_KEY:
if (value == null) {
unsetStartKey();
} else {
setStartKey((ByteBuffer)value);
if (value instanceof byte[]) {
setStartKey((byte[])value);
} else {
setStartKey((java.nio.ByteBuffer)value);
}
}
break;
@ -449,7 +425,11 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
if (value == null) {
unsetEndKey();
} else {
setEndKey((ByteBuffer)value);
if (value instanceof byte[]) {
setEndKey((byte[])value);
} else {
setEndKey((java.nio.ByteBuffer)value);
}
}
break;
@ -457,7 +437,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
if (value == null) {
unsetId();
} else {
setId((Long)value);
setId((java.lang.Long)value);
}
break;
@ -465,7 +445,11 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
if (value == null) {
unsetName();
} else {
setName((ByteBuffer)value);
if (value instanceof byte[]) {
setName((byte[])value);
} else {
setName((java.nio.ByteBuffer)value);
}
}
break;
@ -473,7 +457,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
if (value == null) {
unsetVersion();
} else {
setVersion((Byte)value);
setVersion((java.lang.Byte)value);
}
break;
@ -481,7 +465,11 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
if (value == null) {
unsetServerName();
} else {
setServerName((ByteBuffer)value);
if (value instanceof byte[]) {
setServerName((byte[])value);
} else {
setServerName((java.nio.ByteBuffer)value);
}
}
break;
@ -489,14 +477,15 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
if (value == null) {
unsetPort();
} else {
setPort((Integer)value);
setPort((java.lang.Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case START_KEY:
return getStartKey();
@ -520,13 +509,13 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return getPort();
}
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) {
@ -545,11 +534,11 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
case PORT:
return isSetPort();
}
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 TRegionInfo)
@ -560,6 +549,8 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
public boolean equals(TRegionInfo that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_startKey = true && this.isSetStartKey();
boolean that_present_startKey = true && that.isSetStartKey();
@ -629,44 +620,31 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_startKey = true && (isSetStartKey());
list.add(present_startKey);
if (present_startKey)
list.add(startKey);
hashCode = hashCode * 8191 + ((isSetStartKey()) ? 131071 : 524287);
if (isSetStartKey())
hashCode = hashCode * 8191 + startKey.hashCode();
boolean present_endKey = true && (isSetEndKey());
list.add(present_endKey);
if (present_endKey)
list.add(endKey);
hashCode = hashCode * 8191 + ((isSetEndKey()) ? 131071 : 524287);
if (isSetEndKey())
hashCode = hashCode * 8191 + endKey.hashCode();
boolean present_id = true;
list.add(present_id);
if (present_id)
list.add(id);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(id);
boolean present_name = true && (isSetName());
list.add(present_name);
if (present_name)
list.add(name);
hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
if (isSetName())
hashCode = hashCode * 8191 + name.hashCode();
boolean present_version = true;
list.add(present_version);
if (present_version)
list.add(version);
hashCode = hashCode * 8191 + (int) (version);
boolean present_serverName = true && (isSetServerName());
list.add(present_serverName);
if (present_serverName)
list.add(serverName);
hashCode = hashCode * 8191 + ((isSetServerName()) ? 131071 : 524287);
if (isSetServerName())
hashCode = hashCode * 8191 + serverName.hashCode();
boolean present_port = true;
list.add(present_port);
if (present_port)
list.add(port);
hashCode = hashCode * 8191 + port;
return list.hashCode();
return hashCode;
}
@Override
@ -677,7 +655,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetStartKey()).compareTo(other.isSetStartKey());
lastComparison = java.lang.Boolean.valueOf(isSetStartKey()).compareTo(other.isSetStartKey());
if (lastComparison != 0) {
return lastComparison;
}
@ -687,7 +665,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetEndKey()).compareTo(other.isSetEndKey());
lastComparison = java.lang.Boolean.valueOf(isSetEndKey()).compareTo(other.isSetEndKey());
if (lastComparison != 0) {
return lastComparison;
}
@ -697,7 +675,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
lastComparison = java.lang.Boolean.valueOf(isSetId()).compareTo(other.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
@ -707,7 +685,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@ -717,7 +695,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
lastComparison = java.lang.Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
@ -727,7 +705,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetServerName()).compareTo(other.isSetServerName());
lastComparison = java.lang.Boolean.valueOf(isSetServerName()).compareTo(other.isSetServerName());
if (lastComparison != 0) {
return lastComparison;
}
@ -737,7 +715,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
lastComparison = java.lang.Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
if (lastComparison != 0) {
return lastComparison;
}
@ -750,21 +728,22 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TRegionInfo(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TRegionInfo(");
boolean first = true;
sb.append("startKey:");
@ -827,7 +806,7 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
}
}
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;
@ -837,13 +816,13 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
}
}
private static class TRegionInfoStandardSchemeFactory implements SchemeFactory {
private static class TRegionInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRegionInfoStandardScheme getScheme() {
return new TRegionInfoStandardScheme();
}
}
private static class TRegionInfoStandardScheme extends StandardScheme<TRegionInfo> {
private static class TRegionInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRegionInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TRegionInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -961,18 +940,18 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
}
private static class TRegionInfoTupleSchemeFactory implements SchemeFactory {
private static class TRegionInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRegionInfoTupleScheme getScheme() {
return new TRegionInfoTupleScheme();
}
}
private static class TRegionInfoTupleScheme extends TupleScheme<TRegionInfo> {
private static class TRegionInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRegionInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRegionInfo 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.isSetStartKey()) {
optionals.set(0);
}
@ -1020,8 +999,8 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TRegionInfo 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)) {
struct.startKey = iprot.readBinary();
struct.setStartKeyIsSet(true);
@ -1053,5 +1032,8 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
}
}
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();
}
}

View File

@ -1,43 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Holds row name and then a map of columns to cells.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResult._Fields>, java.io.Serializable, Cloneable, Comparable<TRowResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowResult");
@ -45,15 +18,12 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.MAP, (short)2);
private static final org.apache.thrift.protocol.TField SORTED_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("sortedColumns", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TRowResultStandardSchemeFactory());
schemes.put(TupleScheme.class, new TRowResultTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TRowResultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TRowResultTupleSchemeFactory();
public ByteBuffer row; // required
public Map<ByteBuffer,TCell> columns; // optional
public List<TColumn> sortedColumns; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,TCell> columns; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<TColumn> sortedColumns; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@ -61,10 +31,10 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
COLUMNS((short)2, "columns"),
SORTED_COLUMNS((short)3, "sortedColumns");
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);
}
}
@ -72,6 +42,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROW
@ -91,21 +62,22 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -114,16 +86,16 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.SORTED_COLUMNS};
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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@ -133,7 +105,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
tmpMap.put(_Fields.SORTED_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("sortedColumns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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, TColumn.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRowResult.class, metaDataMap);
}
@ -141,7 +113,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
}
public TRowResult(
ByteBuffer row)
java.nio.ByteBuffer row)
{
this();
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
@ -152,16 +124,16 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
*/
public TRowResult(TRowResult other) {
if (other.isSetRow()) {
this.row = other.row;
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetColumns()) {
Map<ByteBuffer,TCell> __this__columns = new HashMap<ByteBuffer,TCell>(other.columns.size());
for (Map.Entry<ByteBuffer, TCell> other_element : other.columns.entrySet()) {
java.util.Map<java.nio.ByteBuffer,TCell> __this__columns = new java.util.HashMap<java.nio.ByteBuffer,TCell>(other.columns.size());
for (java.util.Map.Entry<java.nio.ByteBuffer, TCell> other_element : other.columns.entrySet()) {
ByteBuffer other_element_key = other_element.getKey();
java.nio.ByteBuffer other_element_key = other_element.getKey();
TCell other_element_value = other_element.getValue();
ByteBuffer __this__columns_copy_key = other_element_key;
java.nio.ByteBuffer __this__columns_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
TCell __this__columns_copy_value = new TCell(other_element_value);
@ -170,7 +142,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
this.columns = __this__columns;
}
if (other.isSetSortedColumns()) {
List<TColumn> __this__sortedColumns = new ArrayList<TColumn>(other.sortedColumns.size());
java.util.List<TColumn> __this__sortedColumns = new java.util.ArrayList<TColumn>(other.sortedColumns.size());
for (TColumn other_element : other.sortedColumns) {
__this__sortedColumns.add(new TColumn(other_element));
}
@ -194,16 +166,16 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TRowResult setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TRowResult setRow(ByteBuffer row) {
public TRowResult setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -227,18 +199,19 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
return (this.columns == null) ? 0 : this.columns.size();
}
public void putToColumns(ByteBuffer key, TCell val) {
public void putToColumns(java.nio.ByteBuffer key, TCell val) {
if (this.columns == null) {
this.columns = new HashMap<ByteBuffer,TCell>();
this.columns = new java.util.HashMap<java.nio.ByteBuffer,TCell>();
}
this.columns.put(key, val);
}
public Map<ByteBuffer,TCell> getColumns() {
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.nio.ByteBuffer,TCell> getColumns() {
return this.columns;
}
public TRowResult setColumns(Map<ByteBuffer,TCell> columns) {
public TRowResult setColumns(@org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,TCell> columns) {
this.columns = columns;
return this;
}
@ -262,22 +235,24 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
return (this.sortedColumns == null) ? 0 : this.sortedColumns.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TColumn> getSortedColumnsIterator() {
return (this.sortedColumns == null) ? null : this.sortedColumns.iterator();
}
public void addToSortedColumns(TColumn elem) {
if (this.sortedColumns == null) {
this.sortedColumns = new ArrayList<TColumn>();
this.sortedColumns = new java.util.ArrayList<TColumn>();
}
this.sortedColumns.add(elem);
}
public List<TColumn> getSortedColumns() {
@org.apache.thrift.annotation.Nullable
public java.util.List<TColumn> getSortedColumns() {
return this.sortedColumns;
}
public TRowResult setSortedColumns(List<TColumn> sortedColumns) {
public TRowResult setSortedColumns(@org.apache.thrift.annotation.Nullable java.util.List<TColumn> sortedColumns) {
this.sortedColumns = sortedColumns;
return this;
}
@ -297,13 +272,17 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -311,7 +290,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
if (value == null) {
unsetColumns();
} else {
setColumns((Map<ByteBuffer,TCell>)value);
setColumns((java.util.Map<java.nio.ByteBuffer,TCell>)value);
}
break;
@ -319,14 +298,15 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
if (value == null) {
unsetSortedColumns();
} else {
setSortedColumns((List<TColumn>)value);
setSortedColumns((java.util.List<TColumn>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@ -338,13 +318,13 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
return getSortedColumns();
}
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) {
@ -355,11 +335,11 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
case SORTED_COLUMNS:
return isSetSortedColumns();
}
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 TRowResult)
@ -370,6 +350,8 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
public boolean equals(TRowResult that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@ -403,24 +385,21 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_columns = true && (isSetColumns());
list.add(present_columns);
if (present_columns)
list.add(columns);
hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
if (isSetColumns())
hashCode = hashCode * 8191 + columns.hashCode();
boolean present_sortedColumns = true && (isSetSortedColumns());
list.add(present_sortedColumns);
if (present_sortedColumns)
list.add(sortedColumns);
hashCode = hashCode * 8191 + ((isSetSortedColumns()) ? 131071 : 524287);
if (isSetSortedColumns())
hashCode = hashCode * 8191 + sortedColumns.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -431,7 +410,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -441,7 +420,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -451,7 +430,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSortedColumns()).compareTo(other.isSetSortedColumns());
lastComparison = java.lang.Boolean.valueOf(isSetSortedColumns()).compareTo(other.isSetSortedColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -464,21 +443,22 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TRowResult(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TRowResult(");
boolean first = true;
sb.append("row:");
@ -525,7 +505,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
}
}
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) {
@ -533,13 +513,13 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
}
}
private static class TRowResultStandardSchemeFactory implements SchemeFactory {
private static class TRowResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRowResultStandardScheme getScheme() {
return new TRowResultStandardScheme();
}
}
private static class TRowResultStandardScheme extends StandardScheme<TRowResult> {
private static class TRowResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRowResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TRowResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -563,9 +543,9 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
struct.columns = new HashMap<ByteBuffer,TCell>(2*_map8.size);
ByteBuffer _key9;
TCell _val10;
struct.columns = new java.util.HashMap<java.nio.ByteBuffer,TCell>(2*_map8.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key9;
@org.apache.thrift.annotation.Nullable TCell _val10;
for (int _i11 = 0; _i11 < _map8.size; ++_i11)
{
_key9 = iprot.readBinary();
@ -584,8 +564,8 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
struct.sortedColumns = new ArrayList<TColumn>(_list12.size);
TColumn _elem13;
struct.sortedColumns = new java.util.ArrayList<TColumn>(_list12.size);
@org.apache.thrift.annotation.Nullable TColumn _elem13;
for (int _i14 = 0; _i14 < _list12.size; ++_i14)
{
_elem13 = new TColumn();
@ -624,7 +604,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
for (Map.Entry<ByteBuffer, TCell> _iter15 : struct.columns.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, TCell> _iter15 : struct.columns.entrySet())
{
oprot.writeBinary(_iter15.getKey());
_iter15.getValue().write(oprot);
@ -654,18 +634,18 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
}
private static class TRowResultTupleSchemeFactory implements SchemeFactory {
private static class TRowResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRowResultTupleScheme getScheme() {
return new TRowResultTupleScheme();
}
}
private static class TRowResultTupleScheme extends TupleScheme<TRowResult> {
private static class TRowResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRowResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRowResult 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.isSetRow()) {
optionals.set(0);
}
@ -682,7 +662,7 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (Map.Entry<ByteBuffer, TCell> _iter17 : struct.columns.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, TCell> _iter17 : struct.columns.entrySet())
{
oprot.writeBinary(_iter17.getKey());
_iter17.getValue().write(oprot);
@ -702,8 +682,8 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TRowResult 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.row = iprot.readBinary();
struct.setRowIsSet(true);
@ -711,9 +691,9 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map19 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new HashMap<ByteBuffer,TCell>(2*_map19.size);
ByteBuffer _key20;
TCell _val21;
struct.columns = new java.util.HashMap<java.nio.ByteBuffer,TCell>(2*_map19.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key20;
@org.apache.thrift.annotation.Nullable TCell _val21;
for (int _i22 = 0; _i22 < _map19.size; ++_i22)
{
_key20 = iprot.readBinary();
@ -727,8 +707,8 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.sortedColumns = new ArrayList<TColumn>(_list23.size);
TColumn _elem24;
struct.sortedColumns = new java.util.ArrayList<TColumn>(_list23.size);
@org.apache.thrift.annotation.Nullable TColumn _elem24;
for (int _i25 = 0; _i25 < _list23.size; ++_i25)
{
_elem24 = new TColumn();
@ -741,5 +721,8 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
}
}
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();
}
}

View File

@ -1,43 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* A Scan object is used to specify scanner parameters when opening a scanner.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable, Cloneable, Comparable<TScan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan");
@ -52,18 +25,15 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
private static final org.apache.thrift.protocol.TField REVERSED_FIELD_DESC = new org.apache.thrift.protocol.TField("reversed", org.apache.thrift.protocol.TType.BOOL, (short)9);
private static final org.apache.thrift.protocol.TField CACHE_BLOCKS_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheBlocks", org.apache.thrift.protocol.TType.BOOL, (short)10);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TScanStandardSchemeFactory());
schemes.put(TupleScheme.class, new TScanTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TScanStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TScanTupleSchemeFactory();
public ByteBuffer startRow; // optional
public ByteBuffer stopRow; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer startRow; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer stopRow; // optional
public long timestamp; // optional
public List<ByteBuffer> columns; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> columns; // optional
public int caching; // optional
public ByteBuffer filterString; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer filterString; // optional
public int batchSize; // optional
public boolean sortColumns; // optional
public boolean reversed; // optional
@ -82,10 +52,10 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
REVERSED((short)9, "reversed"),
CACHE_BLOCKS((short)10, "cacheBlocks");
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);
}
}
@ -93,6 +63,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // START_ROW
@ -126,21 +97,22 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -149,7 +121,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -163,9 +135,9 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
private static final int __CACHEBLOCKS_ISSET_ID = 5;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.TIMESTAMP,_Fields.COLUMNS,_Fields.CACHING,_Fields.FILTER_STRING,_Fields.BATCH_SIZE,_Fields.SORT_COLUMNS,_Fields.REVERSED,_Fields.CACHE_BLOCKS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.STOP_ROW, new org.apache.thrift.meta_data.FieldMetaData("stopRow", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@ -187,7 +159,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.CACHE_BLOCKS, new org.apache.thrift.meta_data.FieldMetaData("cacheBlocks", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TScan.class, metaDataMap);
}
@ -200,22 +172,22 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
public TScan(TScan other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetStartRow()) {
this.startRow = other.startRow;
this.startRow = org.apache.thrift.TBaseHelper.copyBinary(other.startRow);
}
if (other.isSetStopRow()) {
this.stopRow = other.stopRow;
this.stopRow = org.apache.thrift.TBaseHelper.copyBinary(other.stopRow);
}
this.timestamp = other.timestamp;
if (other.isSetColumns()) {
List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>(other.columns.size());
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
java.util.List<java.nio.ByteBuffer> __this__columns = new java.util.ArrayList<java.nio.ByteBuffer>(other.columns.size());
for (java.nio.ByteBuffer other_element : other.columns) {
__this__columns.add(org.apache.thrift.TBaseHelper.copyBinary(other_element));
}
this.columns = __this__columns;
}
this.caching = other.caching;
if (other.isSetFilterString()) {
this.filterString = other.filterString;
this.filterString = org.apache.thrift.TBaseHelper.copyBinary(other.filterString);
}
this.batchSize = other.batchSize;
this.sortColumns = other.sortColumns;
@ -252,16 +224,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return startRow == null ? null : startRow.array();
}
public ByteBuffer bufferForStartRow() {
public java.nio.ByteBuffer bufferForStartRow() {
return org.apache.thrift.TBaseHelper.copyBinary(startRow);
}
public TScan setStartRow(byte[] startRow) {
this.startRow = startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(startRow, startRow.length));
this.startRow = startRow == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(startRow.clone());
return this;
}
public TScan setStartRow(ByteBuffer startRow) {
public TScan setStartRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer startRow) {
this.startRow = org.apache.thrift.TBaseHelper.copyBinary(startRow);
return this;
}
@ -286,16 +258,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return stopRow == null ? null : stopRow.array();
}
public ByteBuffer bufferForStopRow() {
public java.nio.ByteBuffer bufferForStopRow() {
return org.apache.thrift.TBaseHelper.copyBinary(stopRow);
}
public TScan setStopRow(byte[] stopRow) {
this.stopRow = stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(stopRow, stopRow.length));
this.stopRow = stopRow == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(stopRow.clone());
return this;
}
public TScan setStopRow(ByteBuffer stopRow) {
public TScan setStopRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer stopRow) {
this.stopRow = org.apache.thrift.TBaseHelper.copyBinary(stopRow);
return this;
}
@ -326,38 +298,40 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public int getColumnsSize() {
return (this.columns == null) ? 0 : this.columns.size();
}
public java.util.Iterator<ByteBuffer> getColumnsIterator() {
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(ByteBuffer elem) {
public void addToColumns(java.nio.ByteBuffer elem) {
if (this.columns == null) {
this.columns = new ArrayList<ByteBuffer>();
this.columns = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.columns.add(elem);
}
public List<ByteBuffer> getColumns() {
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getColumns() {
return this.columns;
}
public TScan setColumns(List<ByteBuffer> columns) {
public TScan setColumns(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> columns) {
this.columns = columns;
return this;
}
@ -388,16 +362,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public void unsetCaching() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHING_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CACHING_ISSET_ID);
}
/** Returns true if field caching is set (has been assigned a value) and false otherwise */
public boolean isSetCaching() {
return EncodingUtils.testBit(__isset_bitfield, __CACHING_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CACHING_ISSET_ID);
}
public void setCachingIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHING_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CACHING_ISSET_ID, value);
}
public byte[] getFilterString() {
@ -405,16 +379,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return filterString == null ? null : filterString.array();
}
public ByteBuffer bufferForFilterString() {
public java.nio.ByteBuffer bufferForFilterString() {
return org.apache.thrift.TBaseHelper.copyBinary(filterString);
}
public TScan setFilterString(byte[] filterString) {
this.filterString = filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(filterString, filterString.length));
this.filterString = filterString == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(filterString.clone());
return this;
}
public TScan setFilterString(ByteBuffer filterString) {
public TScan setFilterString(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer filterString) {
this.filterString = org.apache.thrift.TBaseHelper.copyBinary(filterString);
return this;
}
@ -445,16 +419,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public void unsetBatchSize() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BATCHSIZE_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BATCHSIZE_ISSET_ID);
}
/** Returns true if field batchSize is set (has been assigned a value) and false otherwise */
public boolean isSetBatchSize() {
return EncodingUtils.testBit(__isset_bitfield, __BATCHSIZE_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BATCHSIZE_ISSET_ID);
}
public void setBatchSizeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BATCHSIZE_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BATCHSIZE_ISSET_ID, value);
}
public boolean isSortColumns() {
@ -468,16 +442,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public void unsetSortColumns() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SORTCOLUMNS_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SORTCOLUMNS_ISSET_ID);
}
/** Returns true if field sortColumns is set (has been assigned a value) and false otherwise */
public boolean isSetSortColumns() {
return EncodingUtils.testBit(__isset_bitfield, __SORTCOLUMNS_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SORTCOLUMNS_ISSET_ID);
}
public void setSortColumnsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SORTCOLUMNS_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SORTCOLUMNS_ISSET_ID, value);
}
public boolean isReversed() {
@ -491,16 +465,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public void unsetReversed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REVERSED_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REVERSED_ISSET_ID);
}
/** Returns true if field reversed is set (has been assigned a value) and false otherwise */
public boolean isSetReversed() {
return EncodingUtils.testBit(__isset_bitfield, __REVERSED_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REVERSED_ISSET_ID);
}
public void setReversedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REVERSED_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REVERSED_ISSET_ID, value);
}
public boolean isCacheBlocks() {
@ -514,25 +488,29 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public void unsetCacheBlocks() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID);
}
/** Returns true if field cacheBlocks is set (has been assigned a value) and false otherwise */
public boolean isSetCacheBlocks() {
return EncodingUtils.testBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID);
}
public void setCacheBlocksIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CACHEBLOCKS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case START_ROW:
if (value == null) {
unsetStartRow();
} else {
setStartRow((ByteBuffer)value);
if (value instanceof byte[]) {
setStartRow((byte[])value);
} else {
setStartRow((java.nio.ByteBuffer)value);
}
}
break;
@ -540,7 +518,11 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetStopRow();
} else {
setStopRow((ByteBuffer)value);
if (value instanceof byte[]) {
setStopRow((byte[])value);
} else {
setStopRow((java.nio.ByteBuffer)value);
}
}
break;
@ -548,7 +530,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
setTimestamp((java.lang.Long)value);
}
break;
@ -556,7 +538,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetColumns();
} else {
setColumns((List<ByteBuffer>)value);
setColumns((java.util.List<java.nio.ByteBuffer>)value);
}
break;
@ -564,7 +546,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetCaching();
} else {
setCaching((Integer)value);
setCaching((java.lang.Integer)value);
}
break;
@ -572,7 +554,11 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetFilterString();
} else {
setFilterString((ByteBuffer)value);
if (value instanceof byte[]) {
setFilterString((byte[])value);
} else {
setFilterString((java.nio.ByteBuffer)value);
}
}
break;
@ -580,7 +566,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetBatchSize();
} else {
setBatchSize((Integer)value);
setBatchSize((java.lang.Integer)value);
}
break;
@ -588,7 +574,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetSortColumns();
} else {
setSortColumns((Boolean)value);
setSortColumns((java.lang.Boolean)value);
}
break;
@ -596,7 +582,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetReversed();
} else {
setReversed((Boolean)value);
setReversed((java.lang.Boolean)value);
}
break;
@ -604,14 +590,15 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (value == null) {
unsetCacheBlocks();
} else {
setCacheBlocks((Boolean)value);
setCacheBlocks((java.lang.Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case START_ROW:
return getStartRow();
@ -644,13 +631,13 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return isCacheBlocks();
}
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) {
@ -675,11 +662,11 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
case CACHE_BLOCKS:
return isSetCacheBlocks();
}
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 TScan)
@ -690,6 +677,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
public boolean equals(TScan that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_startRow = true && this.isSetStartRow();
boolean that_present_startRow = true && that.isSetStartRow();
@ -786,59 +775,49 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_startRow = true && (isSetStartRow());
list.add(present_startRow);
if (present_startRow)
list.add(startRow);
hashCode = hashCode * 8191 + ((isSetStartRow()) ? 131071 : 524287);
if (isSetStartRow())
hashCode = hashCode * 8191 + startRow.hashCode();
boolean present_stopRow = true && (isSetStopRow());
list.add(present_stopRow);
if (present_stopRow)
list.add(stopRow);
hashCode = hashCode * 8191 + ((isSetStopRow()) ? 131071 : 524287);
if (isSetStopRow())
hashCode = hashCode * 8191 + stopRow.hashCode();
boolean present_timestamp = true && (isSetTimestamp());
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
if (isSetTimestamp())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
boolean present_columns = true && (isSetColumns());
list.add(present_columns);
if (present_columns)
list.add(columns);
hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
if (isSetColumns())
hashCode = hashCode * 8191 + columns.hashCode();
boolean present_caching = true && (isSetCaching());
list.add(present_caching);
if (present_caching)
list.add(caching);
hashCode = hashCode * 8191 + ((isSetCaching()) ? 131071 : 524287);
if (isSetCaching())
hashCode = hashCode * 8191 + caching;
boolean present_filterString = true && (isSetFilterString());
list.add(present_filterString);
if (present_filterString)
list.add(filterString);
hashCode = hashCode * 8191 + ((isSetFilterString()) ? 131071 : 524287);
if (isSetFilterString())
hashCode = hashCode * 8191 + filterString.hashCode();
boolean present_batchSize = true && (isSetBatchSize());
list.add(present_batchSize);
if (present_batchSize)
list.add(batchSize);
hashCode = hashCode * 8191 + ((isSetBatchSize()) ? 131071 : 524287);
if (isSetBatchSize())
hashCode = hashCode * 8191 + batchSize;
boolean present_sortColumns = true && (isSetSortColumns());
list.add(present_sortColumns);
if (present_sortColumns)
list.add(sortColumns);
hashCode = hashCode * 8191 + ((isSetSortColumns()) ? 131071 : 524287);
if (isSetSortColumns())
hashCode = hashCode * 8191 + ((sortColumns) ? 131071 : 524287);
boolean present_reversed = true && (isSetReversed());
list.add(present_reversed);
if (present_reversed)
list.add(reversed);
hashCode = hashCode * 8191 + ((isSetReversed()) ? 131071 : 524287);
if (isSetReversed())
hashCode = hashCode * 8191 + ((reversed) ? 131071 : 524287);
boolean present_cacheBlocks = true && (isSetCacheBlocks());
list.add(present_cacheBlocks);
if (present_cacheBlocks)
list.add(cacheBlocks);
hashCode = hashCode * 8191 + ((isSetCacheBlocks()) ? 131071 : 524287);
if (isSetCacheBlocks())
hashCode = hashCode * 8191 + ((cacheBlocks) ? 131071 : 524287);
return list.hashCode();
return hashCode;
}
@Override
@ -849,7 +828,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(other.isSetStartRow());
lastComparison = java.lang.Boolean.valueOf(isSetStartRow()).compareTo(other.isSetStartRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -859,7 +838,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(other.isSetStopRow());
lastComparison = java.lang.Boolean.valueOf(isSetStopRow()).compareTo(other.isSetStopRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -869,7 +848,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@ -879,7 +858,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -889,7 +868,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCaching()).compareTo(other.isSetCaching());
lastComparison = java.lang.Boolean.valueOf(isSetCaching()).compareTo(other.isSetCaching());
if (lastComparison != 0) {
return lastComparison;
}
@ -899,7 +878,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(other.isSetFilterString());
lastComparison = java.lang.Boolean.valueOf(isSetFilterString()).compareTo(other.isSetFilterString());
if (lastComparison != 0) {
return lastComparison;
}
@ -909,7 +888,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBatchSize()).compareTo(other.isSetBatchSize());
lastComparison = java.lang.Boolean.valueOf(isSetBatchSize()).compareTo(other.isSetBatchSize());
if (lastComparison != 0) {
return lastComparison;
}
@ -919,7 +898,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSortColumns()).compareTo(other.isSetSortColumns());
lastComparison = java.lang.Boolean.valueOf(isSetSortColumns()).compareTo(other.isSetSortColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -929,7 +908,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReversed()).compareTo(other.isSetReversed());
lastComparison = java.lang.Boolean.valueOf(isSetReversed()).compareTo(other.isSetReversed());
if (lastComparison != 0) {
return lastComparison;
}
@ -939,7 +918,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCacheBlocks()).compareTo(other.isSetCacheBlocks());
lastComparison = java.lang.Boolean.valueOf(isSetCacheBlocks()).compareTo(other.isSetCacheBlocks());
if (lastComparison != 0) {
return lastComparison;
}
@ -952,21 +931,22 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TScan(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TScan(");
boolean first = true;
if (isSetStartRow()) {
@ -1061,7 +1041,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._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;
@ -1071,13 +1051,13 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
}
private static class TScanStandardSchemeFactory implements SchemeFactory {
private static class TScanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TScanStandardScheme getScheme() {
return new TScanStandardScheme();
}
}
private static class TScanStandardScheme extends StandardScheme<TScan> {
private static class TScanStandardScheme extends org.apache.thrift.scheme.StandardScheme<TScan> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TScan struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -1117,8 +1097,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list26.size);
ByteBuffer _elem27;
struct.columns = new java.util.ArrayList<java.nio.ByteBuffer>(_list26.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem27;
for (int _i28 = 0; _i28 < _list26.size; ++_i28)
{
_elem27 = iprot.readBinary();
@ -1218,7 +1198,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
for (ByteBuffer _iter29 : struct.columns)
for (java.nio.ByteBuffer _iter29 : struct.columns)
{
oprot.writeBinary(_iter29);
}
@ -1265,18 +1245,18 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
private static class TScanTupleSchemeFactory implements SchemeFactory {
private static class TScanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TScanTupleScheme getScheme() {
return new TScanTupleScheme();
}
}
private static class TScanTupleScheme extends TupleScheme<TScan> {
private static class TScanTupleScheme extends org.apache.thrift.scheme.TupleScheme<TScan> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TScan 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.isSetStartRow()) {
optionals.set(0);
}
@ -1320,7 +1300,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (ByteBuffer _iter30 : struct.columns)
for (java.nio.ByteBuffer _iter30 : struct.columns)
{
oprot.writeBinary(_iter30);
}
@ -1348,8 +1328,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(10);
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(10);
if (incoming.get(0)) {
struct.startRow = iprot.readBinary();
struct.setStartRowIsSet(true);
@ -1365,8 +1345,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list31 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list31.size);
ByteBuffer _elem32;
struct.columns = new java.util.ArrayList<java.nio.ByteBuffer>(_list31.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem32;
for (int _i33 = 0; _i33 < _list31.size; ++_i33)
{
_elem32 = iprot.readBinary();
@ -1402,5 +1382,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._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();
}
}

View File

@ -1,40 +1,13 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields>, java.io.Serializable, Cloneable, Comparable<TAppend> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend");
@ -45,21 +18,18 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
private static final org.apache.thrift.protocol.TField CELL_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("cellVisibility", org.apache.thrift.protocol.TType.STRUCT, (short)5);
private static final org.apache.thrift.protocol.TField RETURN_RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("returnResults", org.apache.thrift.protocol.TType.BOOL, (short)6);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TAppendStandardSchemeFactory());
schemes.put(TupleScheme.class, new TAppendTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAppendStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAppendTupleSchemeFactory();
public ByteBuffer row; // required
public List<TColumnValue> columns; // required
public Map<ByteBuffer,ByteBuffer> attributes; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TColumnValue> columns; // required
public @org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes; // optional
/**
*
* @see TDurability
*/
public TDurability durability; // optional
public TCellVisibility cellVisibility; // optional
public @org.apache.thrift.annotation.Nullable TDurability durability; // optional
public @org.apache.thrift.annotation.Nullable TCellVisibility cellVisibility; // optional
public boolean returnResults; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -75,10 +45,10 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
CELL_VISIBILITY((short)5, "cellVisibility"),
RETURN_RESULTS((short)6, "returnResults");
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);
}
}
@ -86,6 +56,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROW
@ -111,21 +82,22 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -134,7 +106,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -143,9 +115,9 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
private static final int __RETURNRESULTS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ATTRIBUTES,_Fields.DURABILITY,_Fields.CELL_VISIBILITY,_Fields.RETURN_RESULTS};
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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.REQUIRED,
@ -161,7 +133,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCellVisibility.class)));
tmpMap.put(_Fields.RETURN_RESULTS, new org.apache.thrift.meta_data.FieldMetaData("returnResults", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TAppend.class, metaDataMap);
}
@ -169,8 +141,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
public TAppend(
ByteBuffer row,
List<TColumnValue> columns)
java.nio.ByteBuffer row,
java.util.List<TColumnValue> columns)
{
this();
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
@ -186,14 +158,14 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetColumns()) {
List<TColumnValue> __this__columns = new ArrayList<TColumnValue>(other.columns.size());
java.util.List<TColumnValue> __this__columns = new java.util.ArrayList<TColumnValue>(other.columns.size());
for (TColumnValue other_element : other.columns) {
__this__columns.add(new TColumnValue(other_element));
}
this.columns = __this__columns;
}
if (other.isSetAttributes()) {
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> __this__attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(other.attributes);
this.attributes = __this__attributes;
}
if (other.isSetDurability()) {
@ -225,16 +197,16 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TAppend setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TAppend setRow(ByteBuffer row) {
public TAppend setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -258,22 +230,24 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return (this.columns == null) ? 0 : this.columns.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TColumnValue> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(TColumnValue elem) {
if (this.columns == null) {
this.columns = new ArrayList<TColumnValue>();
this.columns = new java.util.ArrayList<TColumnValue>();
}
this.columns.add(elem);
}
public List<TColumnValue> getColumns() {
@org.apache.thrift.annotation.Nullable
public java.util.List<TColumnValue> getColumns() {
return this.columns;
}
public TAppend setColumns(List<TColumnValue> columns) {
public TAppend setColumns(@org.apache.thrift.annotation.Nullable java.util.List<TColumnValue> columns) {
this.columns = columns;
return this;
}
@ -297,18 +271,19 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return (this.attributes == null) ? 0 : this.attributes.size();
}
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
public void putToAttributes(java.nio.ByteBuffer key, java.nio.ByteBuffer val) {
if (this.attributes == null) {
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
this.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>();
}
this.attributes.put(key, val);
}
public Map<ByteBuffer,ByteBuffer> getAttributes() {
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> getAttributes() {
return this.attributes;
}
public TAppend setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
public TAppend setAttributes(@org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes) {
this.attributes = attributes;
return this;
}
@ -332,6 +307,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
*
* @see TDurability
*/
@org.apache.thrift.annotation.Nullable
public TDurability getDurability() {
return this.durability;
}
@ -340,7 +316,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
*
* @see TDurability
*/
public TAppend setDurability(TDurability durability) {
public TAppend setDurability(@org.apache.thrift.annotation.Nullable TDurability durability) {
this.durability = durability;
return this;
}
@ -360,11 +336,12 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
}
@org.apache.thrift.annotation.Nullable
public TCellVisibility getCellVisibility() {
return this.cellVisibility;
}
public TAppend setCellVisibility(TCellVisibility cellVisibility) {
public TAppend setCellVisibility(@org.apache.thrift.annotation.Nullable TCellVisibility cellVisibility) {
this.cellVisibility = cellVisibility;
return this;
}
@ -395,25 +372,29 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
public void unsetReturnResults() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
}
/** Returns true if field returnResults is set (has been assigned a value) and false otherwise */
public boolean isSetReturnResults() {
return EncodingUtils.testBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
}
public void setReturnResultsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -421,7 +402,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (value == null) {
unsetColumns();
} else {
setColumns((List<TColumnValue>)value);
setColumns((java.util.List<TColumnValue>)value);
}
break;
@ -429,7 +410,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (value == null) {
unsetAttributes();
} else {
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
setAttributes((java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer>)value);
}
break;
@ -453,14 +434,15 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (value == null) {
unsetReturnResults();
} else {
setReturnResults((Boolean)value);
setReturnResults((java.lang.Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@ -481,13 +463,13 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return isReturnResults();
}
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) {
@ -504,11 +486,11 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
case RETURN_RESULTS:
return isSetReturnResults();
}
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 TAppend)
@ -519,6 +501,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
public boolean equals(TAppend that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@ -579,39 +563,33 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_columns = true && (isSetColumns());
list.add(present_columns);
if (present_columns)
list.add(columns);
hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
if (isSetColumns())
hashCode = hashCode * 8191 + columns.hashCode();
boolean present_attributes = true && (isSetAttributes());
list.add(present_attributes);
if (present_attributes)
list.add(attributes);
hashCode = hashCode * 8191 + ((isSetAttributes()) ? 131071 : 524287);
if (isSetAttributes())
hashCode = hashCode * 8191 + attributes.hashCode();
boolean present_durability = true && (isSetDurability());
list.add(present_durability);
if (present_durability)
list.add(durability.getValue());
hashCode = hashCode * 8191 + ((isSetDurability()) ? 131071 : 524287);
if (isSetDurability())
hashCode = hashCode * 8191 + durability.getValue();
boolean present_cellVisibility = true && (isSetCellVisibility());
list.add(present_cellVisibility);
if (present_cellVisibility)
list.add(cellVisibility);
hashCode = hashCode * 8191 + ((isSetCellVisibility()) ? 131071 : 524287);
if (isSetCellVisibility())
hashCode = hashCode * 8191 + cellVisibility.hashCode();
boolean present_returnResults = true && (isSetReturnResults());
list.add(present_returnResults);
if (present_returnResults)
list.add(returnResults);
hashCode = hashCode * 8191 + ((isSetReturnResults()) ? 131071 : 524287);
if (isSetReturnResults())
hashCode = hashCode * 8191 + ((returnResults) ? 131071 : 524287);
return list.hashCode();
return hashCode;
}
@Override
@ -622,7 +600,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -632,7 +610,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -642,7 +620,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
lastComparison = java.lang.Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
@ -652,7 +630,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
lastComparison = java.lang.Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
@ -662,7 +640,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCellVisibility()).compareTo(other.isSetCellVisibility());
lastComparison = java.lang.Boolean.valueOf(isSetCellVisibility()).compareTo(other.isSetCellVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@ -672,7 +650,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReturnResults()).compareTo(other.isSetReturnResults());
lastComparison = java.lang.Boolean.valueOf(isSetReturnResults()).compareTo(other.isSetReturnResults());
if (lastComparison != 0) {
return lastComparison;
}
@ -685,21 +663,22 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TAppend(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TAppend(");
boolean first = true;
sb.append("row:");
@ -779,7 +758,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._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 {
// 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;
@ -789,13 +768,13 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
}
private static class TAppendStandardSchemeFactory implements SchemeFactory {
private static class TAppendStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAppendStandardScheme getScheme() {
return new TAppendStandardScheme();
}
}
private static class TAppendStandardScheme extends StandardScheme<TAppend> {
private static class TAppendStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAppend> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TAppend struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -819,8 +798,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
struct.columns = new ArrayList<TColumnValue>(_list88.size);
TColumnValue _elem89;
struct.columns = new java.util.ArrayList<TColumnValue>(_list88.size);
@org.apache.thrift.annotation.Nullable TColumnValue _elem89;
for (int _i90 = 0; _i90 < _list88.size; ++_i90)
{
_elem89 = new TColumnValue();
@ -838,9 +817,9 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map91 = iprot.readMapBegin();
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map91.size);
ByteBuffer _key92;
ByteBuffer _val93;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map91.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key92;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val93;
for (int _i94 = 0; _i94 < _map91.size; ++_i94)
{
_key92 = iprot.readBinary();
@ -916,7 +895,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
for (Map.Entry<ByteBuffer, ByteBuffer> _iter96 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter96 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter96.getKey());
oprot.writeBinary(_iter96.getValue());
@ -951,17 +930,17 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
private static class TAppendTupleSchemeFactory implements SchemeFactory {
private static class TAppendTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAppendTupleScheme getScheme() {
return new TAppendTupleScheme();
}
}
private static class TAppendTupleScheme extends TupleScheme<TAppend> {
private static class TAppendTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAppend> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAppend struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.row);
{
oprot.writeI32(struct.columns.size());
@ -970,7 +949,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
_iter97.write(oprot);
}
}
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetAttributes()) {
optionals.set(0);
}
@ -987,7 +966,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
for (Map.Entry<ByteBuffer, ByteBuffer> _iter98 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter98 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter98.getKey());
oprot.writeBinary(_iter98.getValue());
@ -1007,13 +986,13 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TAppend struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
{
org.apache.thrift.protocol.TList _list99 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<TColumnValue>(_list99.size);
TColumnValue _elem100;
struct.columns = new java.util.ArrayList<TColumnValue>(_list99.size);
@org.apache.thrift.annotation.Nullable TColumnValue _elem100;
for (int _i101 = 0; _i101 < _list99.size; ++_i101)
{
_elem100 = new TColumnValue();
@ -1022,13 +1001,13 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
}
struct.setColumnsIsSet(true);
BitSet incoming = iprot.readBitSet(4);
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map102 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map102.size);
ByteBuffer _key103;
ByteBuffer _val104;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map102.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key103;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val104;
for (int _i105 = 0; _i105 < _map102.size; ++_i105)
{
_key103 = iprot.readBinary();
@ -1054,5 +1033,8 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._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();
}
}

View File

@ -1,61 +1,31 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, TAuthorization._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthorization> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthorization");
private static final org.apache.thrift.protocol.TField LABELS_FIELD_DESC = new org.apache.thrift.protocol.TField("labels", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TAuthorizationStandardSchemeFactory());
schemes.put(TupleScheme.class, new TAuthorizationTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAuthorizationStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAuthorizationTupleSchemeFactory();
public List<String> labels; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> labels; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
LABELS((short)1, "labels");
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);
}
}
@ -63,6 +33,7 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // LABELS
@ -78,21 +49,22 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, 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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -101,20 +73,20 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.LABELS};
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.LABELS, new org.apache.thrift.meta_data.FieldMetaData("labels", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
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(TAuthorization.class, metaDataMap);
}
@ -126,7 +98,7 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
*/
public TAuthorization(TAuthorization other) {
if (other.isSetLabels()) {
List<String> __this__labels = new ArrayList<String>(other.labels);
java.util.List<java.lang.String> __this__labels = new java.util.ArrayList<java.lang.String>(other.labels);
this.labels = __this__labels;
}
}
@ -144,22 +116,24 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
return (this.labels == null) ? 0 : this.labels.size();
}
public java.util.Iterator<String> getLabelsIterator() {
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getLabelsIterator() {
return (this.labels == null) ? null : this.labels.iterator();
}
public void addToLabels(String elem) {
public void addToLabels(java.lang.String elem) {
if (this.labels == null) {
this.labels = new ArrayList<String>();
this.labels = new java.util.ArrayList<java.lang.String>();
}
this.labels.add(elem);
}
public List<String> getLabels() {
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getLabels() {
return this.labels;
}
public TAuthorization setLabels(List<String> labels) {
public TAuthorization setLabels(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> labels) {
this.labels = labels;
return this;
}
@ -179,43 +153,44 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LABELS:
if (value == null) {
unsetLabels();
} else {
setLabels((List<String>)value);
setLabels((java.util.List<java.lang.String>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LABELS:
return getLabels();
}
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 LABELS:
return isSetLabels();
}
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 TAuthorization)
@ -226,6 +201,8 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
public boolean equals(TAuthorization that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_labels = true && this.isSetLabels();
boolean that_present_labels = true && that.isSetLabels();
@ -241,14 +218,13 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_labels = true && (isSetLabels());
list.add(present_labels);
if (present_labels)
list.add(labels);
hashCode = hashCode * 8191 + ((isSetLabels()) ? 131071 : 524287);
if (isSetLabels())
hashCode = hashCode * 8191 + labels.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -259,7 +235,7 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetLabels()).compareTo(other.isSetLabels());
lastComparison = java.lang.Boolean.valueOf(isSetLabels()).compareTo(other.isSetLabels());
if (lastComparison != 0) {
return lastComparison;
}
@ -272,21 +248,22 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TAuthorization(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TAuthorization(");
boolean first = true;
if (isSetLabels()) {
@ -315,7 +292,7 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, 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) {
@ -323,13 +300,13 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
}
}
private static class TAuthorizationStandardSchemeFactory implements SchemeFactory {
private static class TAuthorizationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAuthorizationStandardScheme getScheme() {
return new TAuthorizationStandardScheme();
}
}
private static class TAuthorizationStandardScheme extends StandardScheme<TAuthorization> {
private static class TAuthorizationStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAuthorization> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TAuthorization struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -345,8 +322,8 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
struct.labels = new ArrayList<String>(_list8.size);
String _elem9;
struct.labels = new java.util.ArrayList<java.lang.String>(_list8.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = iprot.readString();
@ -379,7 +356,7 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
oprot.writeFieldBegin(LABELS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.labels.size()));
for (String _iter11 : struct.labels)
for (java.lang.String _iter11 : struct.labels)
{
oprot.writeString(_iter11);
}
@ -394,18 +371,18 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
}
private static class TAuthorizationTupleSchemeFactory implements SchemeFactory {
private static class TAuthorizationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAuthorizationTupleScheme getScheme() {
return new TAuthorizationTupleScheme();
}
}
private static class TAuthorizationTupleScheme extends TupleScheme<TAuthorization> {
private static class TAuthorizationTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAuthorization> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAuthorization 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.isSetLabels()) {
optionals.set(0);
}
@ -413,7 +390,7 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
if (struct.isSetLabels()) {
{
oprot.writeI32(struct.labels.size());
for (String _iter12 : struct.labels)
for (java.lang.String _iter12 : struct.labels)
{
oprot.writeString(_iter12);
}
@ -423,13 +400,13 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TAuthorization struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.labels = new ArrayList<String>(_list13.size);
String _elem14;
struct.labels = new java.util.ArrayList<java.lang.String>(_list13.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = iprot.readString();
@ -441,5 +418,8 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, 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();
}
}

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,14 +7,11 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Thrift wrapper around
* org.apache.hadoop.hbase.regionserver.BloomType
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TBloomFilterType implements org.apache.thrift.TEnum {
/**
* Bloomfilters disabled
@ -54,6 +51,7 @@ public enum TBloomFilterType implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TBloomFilterType findByValue(int value) {
switch (value) {
case 0:

View File

@ -1,61 +1,31 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility, TCellVisibility._Fields>, java.io.Serializable, Cloneable, Comparable<TCellVisibility> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCellVisibility");
private static final org.apache.thrift.protocol.TField EXPRESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("expression", 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 TCellVisibilityStandardSchemeFactory());
schemes.put(TupleScheme.class, new TCellVisibilityTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCellVisibilityStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCellVisibilityTupleSchemeFactory();
public String expression; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String expression; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXPRESSION((short)1, "expression");
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);
}
}
@ -63,6 +33,7 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EXPRESSION
@ -78,21 +49,22 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -101,19 +73,19 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.EXPRESSION};
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.EXPRESSION, new org.apache.thrift.meta_data.FieldMetaData("expression", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TCellVisibility.class, metaDataMap);
}
@ -138,11 +110,12 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
this.expression = null;
}
public String getExpression() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getExpression() {
return this.expression;
}
public TCellVisibility setExpression(String expression) {
public TCellVisibility setExpression(@org.apache.thrift.annotation.Nullable java.lang.String expression) {
this.expression = expression;
return this;
}
@ -162,43 +135,44 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EXPRESSION:
if (value == null) {
unsetExpression();
} else {
setExpression((String)value);
setExpression((java.lang.String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXPRESSION:
return getExpression();
}
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 EXPRESSION:
return isSetExpression();
}
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 TCellVisibility)
@ -209,6 +183,8 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
public boolean equals(TCellVisibility that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_expression = true && this.isSetExpression();
boolean that_present_expression = true && that.isSetExpression();
@ -224,14 +200,13 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_expression = true && (isSetExpression());
list.add(present_expression);
if (present_expression)
list.add(expression);
hashCode = hashCode * 8191 + ((isSetExpression()) ? 131071 : 524287);
if (isSetExpression())
hashCode = hashCode * 8191 + expression.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -242,7 +217,7 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetExpression()).compareTo(other.isSetExpression());
lastComparison = java.lang.Boolean.valueOf(isSetExpression()).compareTo(other.isSetExpression());
if (lastComparison != 0) {
return lastComparison;
}
@ -255,21 +230,22 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TCellVisibility(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TCellVisibility(");
boolean first = true;
if (isSetExpression()) {
@ -298,7 +274,7 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
}
}
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) {
@ -306,13 +282,13 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
}
}
private static class TCellVisibilityStandardSchemeFactory implements SchemeFactory {
private static class TCellVisibilityStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCellVisibilityStandardScheme getScheme() {
return new TCellVisibilityStandardScheme();
}
}
private static class TCellVisibilityStandardScheme extends StandardScheme<TCellVisibility> {
private static class TCellVisibilityStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCellVisibility> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCellVisibility struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -360,18 +336,18 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
}
private static class TCellVisibilityTupleSchemeFactory implements SchemeFactory {
private static class TCellVisibilityTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCellVisibilityTupleScheme getScheme() {
return new TCellVisibilityTupleScheme();
}
}
private static class TCellVisibilityTupleScheme extends TupleScheme<TCellVisibility> {
private static class TCellVisibilityTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCellVisibility> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCellVisibility 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.isSetExpression()) {
optionals.set(0);
}
@ -383,8 +359,8 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCellVisibility 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.expression = iprot.readString();
struct.setExpressionIsSet(true);
@ -392,5 +368,8 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
}
}
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();
}
}

View File

@ -1,45 +1,18 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Addresses a single cell or multiple cells
* in a HBase table by column family and optionally
* a column qualifier and timestamp
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
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");
@ -47,14 +20,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (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 family; // required
public ByteBuffer qualifier; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer family; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer qualifier; // optional
public long timestamp; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -63,10 +33,10 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
QUALIFIER((short)2, "qualifier"),
TIMESTAMP((short)3, "timestamp");
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);
}
}
@ -74,6 +44,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FAMILY
@ -93,21 +64,22 @@ 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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -116,7 +88,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -125,16 +97,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.QUALIFIER,_Fields.TIMESTAMP};
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.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TColumn.class, metaDataMap);
}
@ -142,7 +114,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
public TColumn(
ByteBuffer family)
java.nio.ByteBuffer family)
{
this();
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
@ -179,16 +151,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return family == null ? null : family.array();
}
public ByteBuffer bufferForFamily() {
public java.nio.ByteBuffer bufferForFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(family);
}
public TColumn setFamily(byte[] family) {
this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
this.family = family == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(family.clone());
return this;
}
public TColumn setFamily(ByteBuffer family) {
public TColumn setFamily(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer family) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
@ -213,16 +185,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return qualifier == null ? null : qualifier.array();
}
public ByteBuffer bufferForQualifier() {
public java.nio.ByteBuffer bufferForQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
public TColumn setQualifier(byte[] qualifier) {
this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
this.qualifier = qualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(qualifier.clone());
return this;
}
public TColumn setQualifier(ByteBuffer qualifier) {
public TColumn setQualifier(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer qualifier) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
@ -253,25 +225,29 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case FAMILY:
if (value == null) {
unsetFamily();
} else {
setFamily((ByteBuffer)value);
if (value instanceof byte[]) {
setFamily((byte[])value);
} else {
setFamily((java.nio.ByteBuffer)value);
}
}
break;
@ -279,7 +255,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
if (value == null) {
unsetQualifier();
} else {
setQualifier((ByteBuffer)value);
if (value instanceof byte[]) {
setQualifier((byte[])value);
} else {
setQualifier((java.nio.ByteBuffer)value);
}
}
break;
@ -287,14 +267,15 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
setTimestamp((java.lang.Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FAMILY:
return getFamily();
@ -306,13 +287,13 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return getTimestamp();
}
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) {
@ -323,11 +304,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
case TIMESTAMP:
return isSetTimestamp();
}
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)
@ -338,6 +319,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_family = true && this.isSetFamily();
boolean that_present_family = true && that.isSetFamily();
@ -371,24 +354,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_family = true && (isSetFamily());
list.add(present_family);
if (present_family)
list.add(family);
hashCode = hashCode * 8191 + ((isSetFamily()) ? 131071 : 524287);
if (isSetFamily())
hashCode = hashCode * 8191 + family.hashCode();
boolean present_qualifier = true && (isSetQualifier());
list.add(present_qualifier);
if (present_qualifier)
list.add(qualifier);
hashCode = hashCode * 8191 + ((isSetQualifier()) ? 131071 : 524287);
if (isSetQualifier())
hashCode = hashCode * 8191 + qualifier.hashCode();
boolean present_timestamp = true && (isSetTimestamp());
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
if (isSetTimestamp())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
return list.hashCode();
return hashCode;
}
@Override
@ -399,7 +379,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
lastComparison = java.lang.Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
@ -409,7 +389,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
lastComparison = java.lang.Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@ -419,7 +399,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@ -432,21 +412,22 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("family:");
@ -492,7 +473,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 {
// 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;
@ -502,13 +483,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;
@ -582,19 +563,19 @@ 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;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.family);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetQualifier()) {
optionals.set(0);
}
@ -612,10 +593,10 @@ 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;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
BitSet incoming = iprot.readBitSet(2);
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
@ -627,5 +608,8 @@ 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();
}
}

View File

@ -1,43 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Represents a single cell and the amount to increment it by
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncrement, TColumnIncrement._Fields>, java.io.Serializable, Cloneable, Comparable<TColumnIncrement> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnIncrement");
@ -45,14 +18,11 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TColumnIncrementStandardSchemeFactory());
schemes.put(TupleScheme.class, new TColumnIncrementTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnIncrementStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnIncrementTupleSchemeFactory();
public ByteBuffer family; // required
public ByteBuffer qualifier; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer family; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer qualifier; // required
public long amount; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -61,10 +31,10 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
QUALIFIER((short)2, "qualifier"),
AMOUNT((short)3, "amount");
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);
}
}
@ -72,6 +42,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FAMILY
@ -91,21 +62,22 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -114,7 +86,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -123,16 +95,16 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
private static final int __AMOUNT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.AMOUNT};
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.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TColumnIncrement.class, metaDataMap);
}
@ -142,8 +114,8 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
}
public TColumnIncrement(
ByteBuffer family,
ByteBuffer qualifier)
java.nio.ByteBuffer family,
java.nio.ByteBuffer qualifier)
{
this();
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
@ -181,16 +153,16 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
return family == null ? null : family.array();
}
public ByteBuffer bufferForFamily() {
public java.nio.ByteBuffer bufferForFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(family);
}
public TColumnIncrement setFamily(byte[] family) {
this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
this.family = family == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(family.clone());
return this;
}
public TColumnIncrement setFamily(ByteBuffer family) {
public TColumnIncrement setFamily(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer family) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
@ -215,16 +187,16 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
return qualifier == null ? null : qualifier.array();
}
public ByteBuffer bufferForQualifier() {
public java.nio.ByteBuffer bufferForQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
public TColumnIncrement setQualifier(byte[] qualifier) {
this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
this.qualifier = qualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(qualifier.clone());
return this;
}
public TColumnIncrement setQualifier(ByteBuffer qualifier) {
public TColumnIncrement setQualifier(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer qualifier) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
@ -255,25 +227,29 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
}
public void unsetAmount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AMOUNT_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AMOUNT_ISSET_ID);
}
/** Returns true if field amount is set (has been assigned a value) and false otherwise */
public boolean isSetAmount() {
return EncodingUtils.testBit(__isset_bitfield, __AMOUNT_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AMOUNT_ISSET_ID);
}
public void setAmountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AMOUNT_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AMOUNT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case FAMILY:
if (value == null) {
unsetFamily();
} else {
setFamily((ByteBuffer)value);
if (value instanceof byte[]) {
setFamily((byte[])value);
} else {
setFamily((java.nio.ByteBuffer)value);
}
}
break;
@ -281,7 +257,11 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
if (value == null) {
unsetQualifier();
} else {
setQualifier((ByteBuffer)value);
if (value instanceof byte[]) {
setQualifier((byte[])value);
} else {
setQualifier((java.nio.ByteBuffer)value);
}
}
break;
@ -289,14 +269,15 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
if (value == null) {
unsetAmount();
} else {
setAmount((Long)value);
setAmount((java.lang.Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FAMILY:
return getFamily();
@ -308,13 +289,13 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
return getAmount();
}
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) {
@ -325,11 +306,11 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
case AMOUNT:
return isSetAmount();
}
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 TColumnIncrement)
@ -340,6 +321,8 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
public boolean equals(TColumnIncrement that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_family = true && this.isSetFamily();
boolean that_present_family = true && that.isSetFamily();
@ -373,24 +356,21 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_family = true && (isSetFamily());
list.add(present_family);
if (present_family)
list.add(family);
hashCode = hashCode * 8191 + ((isSetFamily()) ? 131071 : 524287);
if (isSetFamily())
hashCode = hashCode * 8191 + family.hashCode();
boolean present_qualifier = true && (isSetQualifier());
list.add(present_qualifier);
if (present_qualifier)
list.add(qualifier);
hashCode = hashCode * 8191 + ((isSetQualifier()) ? 131071 : 524287);
if (isSetQualifier())
hashCode = hashCode * 8191 + qualifier.hashCode();
boolean present_amount = true && (isSetAmount());
list.add(present_amount);
if (present_amount)
list.add(amount);
hashCode = hashCode * 8191 + ((isSetAmount()) ? 131071 : 524287);
if (isSetAmount())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(amount);
return list.hashCode();
return hashCode;
}
@Override
@ -401,7 +381,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
lastComparison = java.lang.Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
@ -411,7 +391,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
lastComparison = java.lang.Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@ -421,7 +401,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAmount()).compareTo(other.isSetAmount());
lastComparison = java.lang.Boolean.valueOf(isSetAmount()).compareTo(other.isSetAmount());
if (lastComparison != 0) {
return lastComparison;
}
@ -434,21 +414,22 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TColumnIncrement(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TColumnIncrement(");
boolean first = true;
sb.append("family:");
@ -495,7 +476,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
}
}
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;
@ -505,13 +486,13 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
}
}
private static class TColumnIncrementStandardSchemeFactory implements SchemeFactory {
private static class TColumnIncrementStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnIncrementStandardScheme getScheme() {
return new TColumnIncrementStandardScheme();
}
}
private static class TColumnIncrementStandardScheme extends StandardScheme<TColumnIncrement> {
private static class TColumnIncrementStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumnIncrement> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnIncrement struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -583,20 +564,20 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
}
private static class TColumnIncrementTupleSchemeFactory implements SchemeFactory {
private static class TColumnIncrementTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnIncrementTupleScheme getScheme() {
return new TColumnIncrementTupleScheme();
}
}
private static class TColumnIncrementTupleScheme extends TupleScheme<TColumnIncrement> {
private static class TColumnIncrementTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumnIncrement> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TColumnIncrement struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.family);
oprot.writeBinary(struct.qualifier);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetAmount()) {
optionals.set(0);
}
@ -608,12 +589,12 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumnIncrement struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
BitSet incoming = iprot.readBitSet(1);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.amount = iprot.readI64();
struct.setAmountIsSet(true);
@ -621,5 +602,8 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
}
}
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();
}
}

View File

@ -1,43 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Represents a single cell and its value.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColumnValue._Fields>, java.io.Serializable, Cloneable, Comparable<TColumnValue> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue");
@ -48,17 +21,14 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
private static final org.apache.thrift.protocol.TField TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("tags", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.BYTE, (short)6);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TColumnValueStandardSchemeFactory());
schemes.put(TupleScheme.class, new TColumnValueTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TColumnValueStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TColumnValueTupleSchemeFactory();
public ByteBuffer family; // required
public ByteBuffer qualifier; // required
public ByteBuffer value; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer family; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer qualifier; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value; // required
public long timestamp; // optional
public ByteBuffer tags; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer tags; // optional
public byte type; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -70,10 +40,10 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
TAGS((short)5, "tags"),
TYPE((short)6, "type");
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);
}
}
@ -81,6 +51,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FAMILY
@ -106,21 +77,22 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -129,7 +101,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -139,9 +111,9 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
private static final int __TYPE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.TAGS,_Fields.TYPE};
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.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED,
@ -154,7 +126,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnValue.class, metaDataMap);
}
@ -162,9 +134,9 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
public TColumnValue(
ByteBuffer family,
ByteBuffer qualifier,
ByteBuffer value)
java.nio.ByteBuffer family,
java.nio.ByteBuffer qualifier,
java.nio.ByteBuffer value)
{
this();
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
@ -214,16 +186,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return family == null ? null : family.array();
}
public ByteBuffer bufferForFamily() {
public java.nio.ByteBuffer bufferForFamily() {
return org.apache.thrift.TBaseHelper.copyBinary(family);
}
public TColumnValue setFamily(byte[] family) {
this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
this.family = family == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(family.clone());
return this;
}
public TColumnValue setFamily(ByteBuffer family) {
public TColumnValue setFamily(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer family) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
@ -248,16 +220,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return qualifier == null ? null : qualifier.array();
}
public ByteBuffer bufferForQualifier() {
public java.nio.ByteBuffer bufferForQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
public TColumnValue setQualifier(byte[] qualifier) {
this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
this.qualifier = qualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(qualifier.clone());
return this;
}
public TColumnValue setQualifier(ByteBuffer qualifier) {
public TColumnValue setQualifier(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer qualifier) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
@ -282,16 +254,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return value == null ? null : value.array();
}
public ByteBuffer bufferForValue() {
public java.nio.ByteBuffer bufferForValue() {
return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public TColumnValue setValue(byte[] value) {
this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
this.value = value == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(value.clone());
return this;
}
public TColumnValue setValue(ByteBuffer value) {
public TColumnValue setValue(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer value) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
@ -322,16 +294,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public byte[] getTags() {
@ -339,16 +311,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return tags == null ? null : tags.array();
}
public ByteBuffer bufferForTags() {
public java.nio.ByteBuffer bufferForTags() {
return org.apache.thrift.TBaseHelper.copyBinary(tags);
}
public TColumnValue setTags(byte[] tags) {
this.tags = tags == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(tags, tags.length));
this.tags = tags == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(tags.clone());
return this;
}
public TColumnValue setTags(ByteBuffer tags) {
public TColumnValue setTags(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer tags) {
this.tags = org.apache.thrift.TBaseHelper.copyBinary(tags);
return this;
}
@ -379,25 +351,29 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
public void unsetType() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TYPE_ISSET_ID);
}
/** Returns true if field type is set (has been assigned a value) and false otherwise */
public boolean isSetType() {
return EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TYPE_ISSET_ID);
}
public void setTypeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TYPE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case FAMILY:
if (value == null) {
unsetFamily();
} else {
setFamily((ByteBuffer)value);
if (value instanceof byte[]) {
setFamily((byte[])value);
} else {
setFamily((java.nio.ByteBuffer)value);
}
}
break;
@ -405,7 +381,11 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
if (value == null) {
unsetQualifier();
} else {
setQualifier((ByteBuffer)value);
if (value instanceof byte[]) {
setQualifier((byte[])value);
} else {
setQualifier((java.nio.ByteBuffer)value);
}
}
break;
@ -413,7 +393,11 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
if (value == null) {
unsetValue();
} else {
setValue((ByteBuffer)value);
if (value instanceof byte[]) {
setValue((byte[])value);
} else {
setValue((java.nio.ByteBuffer)value);
}
}
break;
@ -421,7 +405,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
setTimestamp((java.lang.Long)value);
}
break;
@ -429,7 +413,11 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
if (value == null) {
unsetTags();
} else {
setTags((ByteBuffer)value);
if (value instanceof byte[]) {
setTags((byte[])value);
} else {
setTags((java.nio.ByteBuffer)value);
}
}
break;
@ -437,14 +425,15 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
if (value == null) {
unsetType();
} else {
setType((Byte)value);
setType((java.lang.Byte)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FAMILY:
return getFamily();
@ -465,13 +454,13 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return getType();
}
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) {
@ -488,11 +477,11 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
case TYPE:
return isSetType();
}
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 TColumnValue)
@ -503,6 +492,8 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
public boolean equals(TColumnValue that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_family = true && this.isSetFamily();
boolean that_present_family = true && that.isSetFamily();
@ -563,39 +554,33 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_family = true && (isSetFamily());
list.add(present_family);
if (present_family)
list.add(family);
hashCode = hashCode * 8191 + ((isSetFamily()) ? 131071 : 524287);
if (isSetFamily())
hashCode = hashCode * 8191 + family.hashCode();
boolean present_qualifier = true && (isSetQualifier());
list.add(present_qualifier);
if (present_qualifier)
list.add(qualifier);
hashCode = hashCode * 8191 + ((isSetQualifier()) ? 131071 : 524287);
if (isSetQualifier())
hashCode = hashCode * 8191 + qualifier.hashCode();
boolean present_value = true && (isSetValue());
list.add(present_value);
if (present_value)
list.add(value);
hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
if (isSetValue())
hashCode = hashCode * 8191 + value.hashCode();
boolean present_timestamp = true && (isSetTimestamp());
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
if (isSetTimestamp())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
boolean present_tags = true && (isSetTags());
list.add(present_tags);
if (present_tags)
list.add(tags);
hashCode = hashCode * 8191 + ((isSetTags()) ? 131071 : 524287);
if (isSetTags())
hashCode = hashCode * 8191 + tags.hashCode();
boolean present_type = true && (isSetType());
list.add(present_type);
if (present_type)
list.add(type);
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
if (isSetType())
hashCode = hashCode * 8191 + (int) (type);
return list.hashCode();
return hashCode;
}
@Override
@ -606,7 +591,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
lastComparison = java.lang.Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
@ -616,7 +601,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
lastComparison = java.lang.Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@ -626,7 +611,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@ -636,7 +621,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@ -646,7 +631,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags());
lastComparison = java.lang.Boolean.valueOf(isSetTags()).compareTo(other.isSetTags());
if (lastComparison != 0) {
return lastComparison;
}
@ -656,7 +641,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
@ -669,21 +654,22 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TColumnValue(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TColumnValue(");
boolean first = true;
sb.append("family:");
@ -757,7 +743,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
}
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;
@ -767,13 +753,13 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
}
private static class TColumnValueStandardSchemeFactory implements SchemeFactory {
private static class TColumnValueStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnValueStandardScheme getScheme() {
return new TColumnValueStandardScheme();
}
}
private static class TColumnValueStandardScheme extends StandardScheme<TColumnValue> {
private static class TColumnValueStandardScheme extends org.apache.thrift.scheme.StandardScheme<TColumnValue> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnValue struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -886,21 +872,21 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
private static class TColumnValueTupleSchemeFactory implements SchemeFactory {
private static class TColumnValueTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TColumnValueTupleScheme getScheme() {
return new TColumnValueTupleScheme();
}
}
private static class TColumnValueTupleScheme extends TupleScheme<TColumnValue> {
private static class TColumnValueTupleScheme extends org.apache.thrift.scheme.TupleScheme<TColumnValue> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TColumnValue struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.family);
oprot.writeBinary(struct.qualifier);
oprot.writeBinary(struct.value);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTimestamp()) {
optionals.set(0);
}
@ -924,14 +910,14 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumnValue struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.family = iprot.readBinary();
struct.setFamilyIsSet(true);
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
struct.value = iprot.readBinary();
struct.setValueIsSet(true);
BitSet incoming = iprot.readBitSet(3);
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
@ -947,5 +933,8 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
}
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();
}
}

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,14 +7,11 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Thrift wrapper around
* org.apache.hadoop.hbase.filter.CompareFilter$CompareOp.
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TCompareOp implements org.apache.thrift.TEnum {
LESS(0),
LESS_OR_EQUAL(1),
@ -41,6 +38,7 @@ public enum TCompareOp implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TCompareOp findByValue(int value) {
switch (value) {
case 0:

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,14 +7,11 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Thrift wrapper around
* org.apache.hadoop.hbase.io.compress.Algorithm
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TCompressionAlgorithm implements org.apache.thrift.TEnum {
LZO(0),
GZ(1),
@ -41,6 +38,7 @@ public enum TCompressionAlgorithm implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TCompressionAlgorithm findByValue(int value) {
switch (value) {
case 0:

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,15 +7,12 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Specify Consistency:
* - STRONG means reads only from primary region
* - TIMELINE means reads might return values from secondary region replicas
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TConsistency implements org.apache.thrift.TEnum {
STRONG(1),
TIMELINE(2);
@ -37,6 +34,7 @@ public enum TConsistency implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TConsistency findByValue(int value) {
switch (value) {
case 1:

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,14 +7,11 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Thrift wrapper around
* org.apache.hadoop.hbase.io.encoding.DataBlockEncoding
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TDataBlockEncoding implements org.apache.thrift.TEnum {
/**
* Disable data block encoding.
@ -42,6 +39,7 @@ public enum TDataBlockEncoding implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TDataBlockEncoding findByValue(int value) {
switch (value) {
case 0:

View File

@ -1,39 +1,12 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Used to perform Delete operations on a single row.
*
@ -60,7 +33,7 @@ import org.slf4j.LoggerFactory;
* by changing the durability. If you don't provide durability, it defaults to
* column family's default setting for durability.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields>, java.io.Serializable, Cloneable, Comparable<TDelete> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDelete");
@ -71,26 +44,23 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)6);
private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)7);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TDeleteStandardSchemeFactory());
schemes.put(TupleScheme.class, new TDeleteTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TDeleteStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TDeleteTupleSchemeFactory();
public ByteBuffer row; // required
public List<TColumn> columns; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TColumn> columns; // optional
public long timestamp; // optional
/**
*
* @see TDeleteType
*/
public TDeleteType deleteType; // optional
public Map<ByteBuffer,ByteBuffer> attributes; // optional
public @org.apache.thrift.annotation.Nullable TDeleteType deleteType; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes; // optional
/**
*
* @see TDurability
*/
public TDurability durability; // optional
public @org.apache.thrift.annotation.Nullable TDurability durability; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@ -109,10 +79,10 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
*/
DURABILITY((short)7, "durability");
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);
}
}
@ -120,6 +90,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROW
@ -145,21 +116,22 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -168,7 +140,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -177,9 +149,9 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.ATTRIBUTES,_Fields.DURABILITY};
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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@ -195,7 +167,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.DURABILITY, new org.apache.thrift.meta_data.FieldMetaData("durability", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDurability.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDelete.class, metaDataMap);
}
@ -205,7 +177,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
}
public TDelete(
ByteBuffer row)
java.nio.ByteBuffer row)
{
this();
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
@ -220,7 +192,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetColumns()) {
List<TColumn> __this__columns = new ArrayList<TColumn>(other.columns.size());
java.util.List<TColumn> __this__columns = new java.util.ArrayList<TColumn>(other.columns.size());
for (TColumn other_element : other.columns) {
__this__columns.add(new TColumn(other_element));
}
@ -231,7 +203,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
this.deleteType = other.deleteType;
}
if (other.isSetAttributes()) {
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> __this__attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(other.attributes);
this.attributes = __this__attributes;
}
if (other.isSetDurability()) {
@ -260,16 +232,16 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TDelete setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TDelete setRow(ByteBuffer row) {
public TDelete setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -293,22 +265,24 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return (this.columns == null) ? 0 : this.columns.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TColumn> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(TColumn elem) {
if (this.columns == null) {
this.columns = new ArrayList<TColumn>();
this.columns = new java.util.ArrayList<TColumn>();
}
this.columns.add(elem);
}
public List<TColumn> getColumns() {
@org.apache.thrift.annotation.Nullable
public java.util.List<TColumn> getColumns() {
return this.columns;
}
public TDelete setColumns(List<TColumn> columns) {
public TDelete setColumns(@org.apache.thrift.annotation.Nullable java.util.List<TColumn> columns) {
this.columns = columns;
return this;
}
@ -339,22 +313,23 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
/**
*
* @see TDeleteType
*/
@org.apache.thrift.annotation.Nullable
public TDeleteType getDeleteType() {
return this.deleteType;
}
@ -363,7 +338,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
*
* @see TDeleteType
*/
public TDelete setDeleteType(TDeleteType deleteType) {
public TDelete setDeleteType(@org.apache.thrift.annotation.Nullable TDeleteType deleteType) {
this.deleteType = deleteType;
return this;
}
@ -387,18 +362,19 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return (this.attributes == null) ? 0 : this.attributes.size();
}
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
public void putToAttributes(java.nio.ByteBuffer key, java.nio.ByteBuffer val) {
if (this.attributes == null) {
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
this.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>();
}
this.attributes.put(key, val);
}
public Map<ByteBuffer,ByteBuffer> getAttributes() {
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> getAttributes() {
return this.attributes;
}
public TDelete setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
public TDelete setAttributes(@org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes) {
this.attributes = attributes;
return this;
}
@ -422,6 +398,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
*
* @see TDurability
*/
@org.apache.thrift.annotation.Nullable
public TDurability getDurability() {
return this.durability;
}
@ -430,7 +407,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
*
* @see TDurability
*/
public TDelete setDurability(TDurability durability) {
public TDelete setDurability(@org.apache.thrift.annotation.Nullable TDurability durability) {
this.durability = durability;
return this;
}
@ -450,13 +427,17 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -464,7 +445,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (value == null) {
unsetColumns();
} else {
setColumns((List<TColumn>)value);
setColumns((java.util.List<TColumn>)value);
}
break;
@ -472,7 +453,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
setTimestamp((java.lang.Long)value);
}
break;
@ -488,7 +469,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (value == null) {
unsetAttributes();
} else {
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
setAttributes((java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer>)value);
}
break;
@ -503,7 +484,8 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@ -524,13 +506,13 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return getDurability();
}
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) {
@ -547,11 +529,11 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
case DURABILITY:
return isSetDurability();
}
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 TDelete)
@ -562,6 +544,8 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
public boolean equals(TDelete that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@ -622,39 +606,33 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_columns = true && (isSetColumns());
list.add(present_columns);
if (present_columns)
list.add(columns);
hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
if (isSetColumns())
hashCode = hashCode * 8191 + columns.hashCode();
boolean present_timestamp = true && (isSetTimestamp());
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
if (isSetTimestamp())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
boolean present_deleteType = true && (isSetDeleteType());
list.add(present_deleteType);
if (present_deleteType)
list.add(deleteType.getValue());
hashCode = hashCode * 8191 + ((isSetDeleteType()) ? 131071 : 524287);
if (isSetDeleteType())
hashCode = hashCode * 8191 + deleteType.getValue();
boolean present_attributes = true && (isSetAttributes());
list.add(present_attributes);
if (present_attributes)
list.add(attributes);
hashCode = hashCode * 8191 + ((isSetAttributes()) ? 131071 : 524287);
if (isSetAttributes())
hashCode = hashCode * 8191 + attributes.hashCode();
boolean present_durability = true && (isSetDurability());
list.add(present_durability);
if (present_durability)
list.add(durability.getValue());
hashCode = hashCode * 8191 + ((isSetDurability()) ? 131071 : 524287);
if (isSetDurability())
hashCode = hashCode * 8191 + durability.getValue();
return list.hashCode();
return hashCode;
}
@Override
@ -665,7 +643,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -675,7 +653,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -685,7 +663,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@ -695,7 +673,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDeleteType()).compareTo(other.isSetDeleteType());
lastComparison = java.lang.Boolean.valueOf(isSetDeleteType()).compareTo(other.isSetDeleteType());
if (lastComparison != 0) {
return lastComparison;
}
@ -705,7 +683,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
lastComparison = java.lang.Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
@ -715,7 +693,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
lastComparison = java.lang.Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
@ -728,21 +706,22 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TDelete(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TDelete(");
boolean first = true;
sb.append("row:");
@ -818,7 +797,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._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 {
// 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;
@ -828,13 +807,13 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
}
}
private static class TDeleteStandardSchemeFactory implements SchemeFactory {
private static class TDeleteStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDeleteStandardScheme getScheme() {
return new TDeleteStandardScheme();
}
}
private static class TDeleteStandardScheme extends StandardScheme<TDelete> {
private static class TDeleteStandardScheme extends org.apache.thrift.scheme.StandardScheme<TDelete> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TDelete struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -858,8 +837,8 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
struct.columns = new ArrayList<TColumn>(_list52.size);
TColumn _elem53;
struct.columns = new java.util.ArrayList<TColumn>(_list52.size);
@org.apache.thrift.annotation.Nullable TColumn _elem53;
for (int _i54 = 0; _i54 < _list52.size; ++_i54)
{
_elem53 = new TColumn();
@ -893,9 +872,9 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map55 = iprot.readMapBegin();
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map55.size);
ByteBuffer _key56;
ByteBuffer _val57;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map55.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key56;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val57;
for (int _i58 = 0; _i58 < _map55.size; ++_i58)
{
_key56 = iprot.readBinary();
@ -968,7 +947,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
for (Map.Entry<ByteBuffer, ByteBuffer> _iter60 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter60 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter60.getKey());
oprot.writeBinary(_iter60.getValue());
@ -991,19 +970,19 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
}
private static class TDeleteTupleSchemeFactory implements SchemeFactory {
private static class TDeleteTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDeleteTupleScheme getScheme() {
return new TDeleteTupleScheme();
}
}
private static class TDeleteTupleScheme extends TupleScheme<TDelete> {
private static class TDeleteTupleScheme extends org.apache.thrift.scheme.TupleScheme<TDelete> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.row);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetColumns()) {
optionals.set(0);
}
@ -1038,7 +1017,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
for (Map.Entry<ByteBuffer, ByteBuffer> _iter62 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter62 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter62.getKey());
oprot.writeBinary(_iter62.getValue());
@ -1052,15 +1031,15 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
BitSet incoming = iprot.readBitSet(5);
java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<TColumn>(_list63.size);
TColumn _elem64;
struct.columns = new java.util.ArrayList<TColumn>(_list63.size);
@org.apache.thrift.annotation.Nullable TColumn _elem64;
for (int _i65 = 0; _i65 < _list63.size; ++_i65)
{
_elem64 = new TColumn();
@ -1081,9 +1060,9 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map66 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map66.size);
ByteBuffer _key67;
ByteBuffer _val68;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map66.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key67;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val68;
for (int _i69 = 0; _i69 < _map66.size; ++_i69)
{
_key67 = iprot.readBinary();
@ -1100,5 +1079,8 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._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();
}
}

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,15 +7,12 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Specify type of delete:
* - DELETE_COLUMN means exactly one version will be removed,
* - DELETE_COLUMNS means previous versions will also be removed.
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TDeleteType implements org.apache.thrift.TEnum {
DELETE_COLUMN(0),
DELETE_COLUMNS(1),
@ -39,6 +36,7 @@ public enum TDeleteType implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TDeleteType findByValue(int value) {
switch (value) {
case 0:

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,10 +7,6 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Specify Durability:
* - SKIP_WAL means do not write the Mutation to the WAL.
@ -18,6 +14,7 @@ import org.apache.thrift.TEnum;
* - SYNC_WAL means write the Mutation to the WAL synchronously,
* - FSYNC_WAL means Write the Mutation to the WAL synchronously and force the entries to disk.
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TDurability implements org.apache.thrift.TEnum {
USE_DEFAULT(0),
SKIP_WAL(1),
@ -42,6 +39,7 @@ public enum TDurability implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TDurability findByValue(int value) {
switch (value) {
case 0:

View File

@ -1,40 +1,13 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THRegionInfo._Fields>, java.io.Serializable, Cloneable, Comparable<THRegionInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionInfo");
@ -46,16 +19,13 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
private static final org.apache.thrift.protocol.TField SPLIT_FIELD_DESC = new org.apache.thrift.protocol.TField("split", org.apache.thrift.protocol.TType.BOOL, (short)6);
private static final org.apache.thrift.protocol.TField REPLICA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaId", org.apache.thrift.protocol.TType.I32, (short)7);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new THRegionInfoStandardSchemeFactory());
schemes.put(TupleScheme.class, new THRegionInfoTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new THRegionInfoStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new THRegionInfoTupleSchemeFactory();
public long regionId; // required
public ByteBuffer tableName; // required
public ByteBuffer startKey; // optional
public ByteBuffer endKey; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer tableName; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer startKey; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer endKey; // optional
public boolean offline; // optional
public boolean split; // optional
public int replicaId; // optional
@ -70,10 +40,10 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
SPLIT((short)6, "split"),
REPLICA_ID((short)7, "replicaId");
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);
}
}
@ -81,6 +51,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REGION_ID
@ -108,21 +79,22 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -131,7 +103,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -143,9 +115,9 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
private static final int __REPLICAID_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.START_KEY,_Fields.END_KEY,_Fields.OFFLINE,_Fields.SPLIT,_Fields.REPLICA_ID};
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.REGION_ID, new org.apache.thrift.meta_data.FieldMetaData("regionId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED,
@ -160,7 +132,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.REPLICA_ID, new org.apache.thrift.meta_data.FieldMetaData("replicaId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(THRegionInfo.class, metaDataMap);
}
@ -169,7 +141,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
public THRegionInfo(
long regionId,
ByteBuffer tableName)
java.nio.ByteBuffer tableName)
{
this();
this.regionId = regionId;
@ -227,16 +199,16 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
}
public void unsetRegionId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REGIONID_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REGIONID_ISSET_ID);
}
/** Returns true if field regionId is set (has been assigned a value) and false otherwise */
public boolean isSetRegionId() {
return EncodingUtils.testBit(__isset_bitfield, __REGIONID_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REGIONID_ISSET_ID);
}
public void setRegionIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REGIONID_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REGIONID_ISSET_ID, value);
}
public byte[] getTableName() {
@ -244,16 +216,16 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return tableName == null ? null : tableName.array();
}
public ByteBuffer bufferForTableName() {
public java.nio.ByteBuffer bufferForTableName() {
return org.apache.thrift.TBaseHelper.copyBinary(tableName);
}
public THRegionInfo setTableName(byte[] tableName) {
this.tableName = tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(tableName, tableName.length));
this.tableName = tableName == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(tableName.clone());
return this;
}
public THRegionInfo setTableName(ByteBuffer tableName) {
public THRegionInfo setTableName(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer tableName) {
this.tableName = org.apache.thrift.TBaseHelper.copyBinary(tableName);
return this;
}
@ -278,16 +250,16 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return startKey == null ? null : startKey.array();
}
public ByteBuffer bufferForStartKey() {
public java.nio.ByteBuffer bufferForStartKey() {
return org.apache.thrift.TBaseHelper.copyBinary(startKey);
}
public THRegionInfo setStartKey(byte[] startKey) {
this.startKey = startKey == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(startKey, startKey.length));
this.startKey = startKey == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(startKey.clone());
return this;
}
public THRegionInfo setStartKey(ByteBuffer startKey) {
public THRegionInfo setStartKey(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer startKey) {
this.startKey = org.apache.thrift.TBaseHelper.copyBinary(startKey);
return this;
}
@ -312,16 +284,16 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return endKey == null ? null : endKey.array();
}
public ByteBuffer bufferForEndKey() {
public java.nio.ByteBuffer bufferForEndKey() {
return org.apache.thrift.TBaseHelper.copyBinary(endKey);
}
public THRegionInfo setEndKey(byte[] endKey) {
this.endKey = endKey == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(endKey, endKey.length));
this.endKey = endKey == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(endKey.clone());
return this;
}
public THRegionInfo setEndKey(ByteBuffer endKey) {
public THRegionInfo setEndKey(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer endKey) {
this.endKey = org.apache.thrift.TBaseHelper.copyBinary(endKey);
return this;
}
@ -352,16 +324,16 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
}
public void unsetOffline() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OFFLINE_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OFFLINE_ISSET_ID);
}
/** Returns true if field offline is set (has been assigned a value) and false otherwise */
public boolean isSetOffline() {
return EncodingUtils.testBit(__isset_bitfield, __OFFLINE_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OFFLINE_ISSET_ID);
}
public void setOfflineIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OFFLINE_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OFFLINE_ISSET_ID, value);
}
public boolean isSplit() {
@ -375,16 +347,16 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
}
public void unsetSplit() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPLIT_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SPLIT_ISSET_ID);
}
/** Returns true if field split is set (has been assigned a value) and false otherwise */
public boolean isSetSplit() {
return EncodingUtils.testBit(__isset_bitfield, __SPLIT_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SPLIT_ISSET_ID);
}
public void setSplitIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPLIT_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SPLIT_ISSET_ID, value);
}
public int getReplicaId() {
@ -398,25 +370,25 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
}
public void unsetReplicaId() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REPLICAID_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REPLICAID_ISSET_ID);
}
/** Returns true if field replicaId is set (has been assigned a value) and false otherwise */
public boolean isSetReplicaId() {
return EncodingUtils.testBit(__isset_bitfield, __REPLICAID_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REPLICAID_ISSET_ID);
}
public void setReplicaIdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REPLICAID_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REPLICAID_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case REGION_ID:
if (value == null) {
unsetRegionId();
} else {
setRegionId((Long)value);
setRegionId((java.lang.Long)value);
}
break;
@ -424,7 +396,11 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
if (value == null) {
unsetTableName();
} else {
setTableName((ByteBuffer)value);
if (value instanceof byte[]) {
setTableName((byte[])value);
} else {
setTableName((java.nio.ByteBuffer)value);
}
}
break;
@ -432,7 +408,11 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
if (value == null) {
unsetStartKey();
} else {
setStartKey((ByteBuffer)value);
if (value instanceof byte[]) {
setStartKey((byte[])value);
} else {
setStartKey((java.nio.ByteBuffer)value);
}
}
break;
@ -440,7 +420,11 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
if (value == null) {
unsetEndKey();
} else {
setEndKey((ByteBuffer)value);
if (value instanceof byte[]) {
setEndKey((byte[])value);
} else {
setEndKey((java.nio.ByteBuffer)value);
}
}
break;
@ -448,7 +432,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
if (value == null) {
unsetOffline();
} else {
setOffline((Boolean)value);
setOffline((java.lang.Boolean)value);
}
break;
@ -456,7 +440,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
if (value == null) {
unsetSplit();
} else {
setSplit((Boolean)value);
setSplit((java.lang.Boolean)value);
}
break;
@ -464,14 +448,15 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
if (value == null) {
unsetReplicaId();
} else {
setReplicaId((Integer)value);
setReplicaId((java.lang.Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case REGION_ID:
return getRegionId();
@ -495,13 +480,13 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return getReplicaId();
}
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) {
@ -520,11 +505,11 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
case REPLICA_ID:
return isSetReplicaId();
}
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 THRegionInfo)
@ -535,6 +520,8 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
public boolean equals(THRegionInfo that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_regionId = true;
boolean that_present_regionId = true;
@ -604,44 +591,35 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_regionId = true;
list.add(present_regionId);
if (present_regionId)
list.add(regionId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(regionId);
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
hashCode = hashCode * 8191 + ((isSetTableName()) ? 131071 : 524287);
if (isSetTableName())
hashCode = hashCode * 8191 + tableName.hashCode();
boolean present_startKey = true && (isSetStartKey());
list.add(present_startKey);
if (present_startKey)
list.add(startKey);
hashCode = hashCode * 8191 + ((isSetStartKey()) ? 131071 : 524287);
if (isSetStartKey())
hashCode = hashCode * 8191 + startKey.hashCode();
boolean present_endKey = true && (isSetEndKey());
list.add(present_endKey);
if (present_endKey)
list.add(endKey);
hashCode = hashCode * 8191 + ((isSetEndKey()) ? 131071 : 524287);
if (isSetEndKey())
hashCode = hashCode * 8191 + endKey.hashCode();
boolean present_offline = true && (isSetOffline());
list.add(present_offline);
if (present_offline)
list.add(offline);
hashCode = hashCode * 8191 + ((isSetOffline()) ? 131071 : 524287);
if (isSetOffline())
hashCode = hashCode * 8191 + ((offline) ? 131071 : 524287);
boolean present_split = true && (isSetSplit());
list.add(present_split);
if (present_split)
list.add(split);
hashCode = hashCode * 8191 + ((isSetSplit()) ? 131071 : 524287);
if (isSetSplit())
hashCode = hashCode * 8191 + ((split) ? 131071 : 524287);
boolean present_replicaId = true && (isSetReplicaId());
list.add(present_replicaId);
if (present_replicaId)
list.add(replicaId);
hashCode = hashCode * 8191 + ((isSetReplicaId()) ? 131071 : 524287);
if (isSetReplicaId())
hashCode = hashCode * 8191 + replicaId;
return list.hashCode();
return hashCode;
}
@Override
@ -652,7 +630,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRegionId()).compareTo(other.isSetRegionId());
lastComparison = java.lang.Boolean.valueOf(isSetRegionId()).compareTo(other.isSetRegionId());
if (lastComparison != 0) {
return lastComparison;
}
@ -662,7 +640,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
lastComparison = java.lang.Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
@ -672,7 +650,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartKey()).compareTo(other.isSetStartKey());
lastComparison = java.lang.Boolean.valueOf(isSetStartKey()).compareTo(other.isSetStartKey());
if (lastComparison != 0) {
return lastComparison;
}
@ -682,7 +660,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetEndKey()).compareTo(other.isSetEndKey());
lastComparison = java.lang.Boolean.valueOf(isSetEndKey()).compareTo(other.isSetEndKey());
if (lastComparison != 0) {
return lastComparison;
}
@ -692,7 +670,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOffline()).compareTo(other.isSetOffline());
lastComparison = java.lang.Boolean.valueOf(isSetOffline()).compareTo(other.isSetOffline());
if (lastComparison != 0) {
return lastComparison;
}
@ -702,7 +680,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSplit()).compareTo(other.isSetSplit());
lastComparison = java.lang.Boolean.valueOf(isSetSplit()).compareTo(other.isSetSplit());
if (lastComparison != 0) {
return lastComparison;
}
@ -712,7 +690,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReplicaId()).compareTo(other.isSetReplicaId());
lastComparison = java.lang.Boolean.valueOf(isSetReplicaId()).compareTo(other.isSetReplicaId());
if (lastComparison != 0) {
return lastComparison;
}
@ -725,21 +703,22 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("THRegionInfo(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("THRegionInfo(");
boolean first = true;
sb.append("regionId:");
@ -812,7 +791,7 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
}
}
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;
@ -822,13 +801,13 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
}
}
private static class THRegionInfoStandardSchemeFactory implements SchemeFactory {
private static class THRegionInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public THRegionInfoStandardScheme getScheme() {
return new THRegionInfoStandardScheme();
}
}
private static class THRegionInfoStandardScheme extends StandardScheme<THRegionInfo> {
private static class THRegionInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<THRegionInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, THRegionInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -957,20 +936,20 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
}
private static class THRegionInfoTupleSchemeFactory implements SchemeFactory {
private static class THRegionInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public THRegionInfoTupleScheme getScheme() {
return new THRegionInfoTupleScheme();
}
}
private static class THRegionInfoTupleScheme extends TupleScheme<THRegionInfo> {
private static class THRegionInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<THRegionInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, THRegionInfo struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.regionId);
oprot.writeBinary(struct.tableName);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetStartKey()) {
optionals.set(0);
}
@ -1006,12 +985,12 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, THRegionInfo struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.regionId = iprot.readI64();
struct.setRegionIdIsSet(true);
struct.tableName = iprot.readBinary();
struct.setTableNameIsSet(true);
BitSet incoming = iprot.readBitSet(5);
java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.startKey = iprot.readBinary();
struct.setStartKeyIsSet(true);
@ -1035,5 +1014,8 @@ public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THReg
}
}
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();
}
}

View File

@ -1,64 +1,34 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocation, THRegionLocation._Fields>, java.io.Serializable, Cloneable, Comparable<THRegionLocation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionLocation");
private static final org.apache.thrift.protocol.TField SERVER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("serverName", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField REGION_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("regionInfo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new THRegionLocationStandardSchemeFactory());
schemes.put(TupleScheme.class, new THRegionLocationTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new THRegionLocationStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new THRegionLocationTupleSchemeFactory();
public TServerName serverName; // required
public THRegionInfo regionInfo; // required
public @org.apache.thrift.annotation.Nullable TServerName serverName; // required
public @org.apache.thrift.annotation.Nullable THRegionInfo regionInfo; // 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 {
SERVER_NAME((short)1, "serverName"),
REGION_INFO((short)2, "regionInfo");
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);
}
}
@ -66,6 +36,7 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // SERVER_NAME
@ -83,21 +54,22 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -106,20 +78,20 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
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.SERVER_NAME, new org.apache.thrift.meta_data.FieldMetaData("serverName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TServerName.class)));
tmpMap.put(_Fields.REGION_INFO, new org.apache.thrift.meta_data.FieldMetaData("regionInfo", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THRegionInfo.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(THRegionLocation.class, metaDataMap);
}
@ -157,11 +129,12 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
this.regionInfo = null;
}
@org.apache.thrift.annotation.Nullable
public TServerName getServerName() {
return this.serverName;
}
public THRegionLocation setServerName(TServerName serverName) {
public THRegionLocation setServerName(@org.apache.thrift.annotation.Nullable TServerName serverName) {
this.serverName = serverName;
return this;
}
@ -181,11 +154,12 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
}
}
@org.apache.thrift.annotation.Nullable
public THRegionInfo getRegionInfo() {
return this.regionInfo;
}
public THRegionLocation setRegionInfo(THRegionInfo regionInfo) {
public THRegionLocation setRegionInfo(@org.apache.thrift.annotation.Nullable THRegionInfo regionInfo) {
this.regionInfo = regionInfo;
return this;
}
@ -205,7 +179,7 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SERVER_NAME:
if (value == null) {
@ -226,7 +200,8 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERVER_NAME:
return getServerName();
@ -235,13 +210,13 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
return getRegionInfo();
}
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) {
@ -250,11 +225,11 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
case REGION_INFO:
return isSetRegionInfo();
}
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 THRegionLocation)
@ -265,6 +240,8 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
public boolean equals(THRegionLocation that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_serverName = true && this.isSetServerName();
boolean that_present_serverName = true && that.isSetServerName();
@ -289,19 +266,17 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_serverName = true && (isSetServerName());
list.add(present_serverName);
if (present_serverName)
list.add(serverName);
hashCode = hashCode * 8191 + ((isSetServerName()) ? 131071 : 524287);
if (isSetServerName())
hashCode = hashCode * 8191 + serverName.hashCode();
boolean present_regionInfo = true && (isSetRegionInfo());
list.add(present_regionInfo);
if (present_regionInfo)
list.add(regionInfo);
hashCode = hashCode * 8191 + ((isSetRegionInfo()) ? 131071 : 524287);
if (isSetRegionInfo())
hashCode = hashCode * 8191 + regionInfo.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -312,7 +287,7 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetServerName()).compareTo(other.isSetServerName());
lastComparison = java.lang.Boolean.valueOf(isSetServerName()).compareTo(other.isSetServerName());
if (lastComparison != 0) {
return lastComparison;
}
@ -322,7 +297,7 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRegionInfo()).compareTo(other.isSetRegionInfo());
lastComparison = java.lang.Boolean.valueOf(isSetRegionInfo()).compareTo(other.isSetRegionInfo());
if (lastComparison != 0) {
return lastComparison;
}
@ -335,21 +310,22 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("THRegionLocation(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("THRegionLocation(");
boolean first = true;
sb.append("serverName:");
@ -396,7 +372,7 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
}
}
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) {
@ -404,13 +380,13 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
}
}
private static class THRegionLocationStandardSchemeFactory implements SchemeFactory {
private static class THRegionLocationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public THRegionLocationStandardScheme getScheme() {
return new THRegionLocationStandardScheme();
}
}
private static class THRegionLocationStandardScheme extends StandardScheme<THRegionLocation> {
private static class THRegionLocationStandardScheme extends org.apache.thrift.scheme.StandardScheme<THRegionLocation> {
public void read(org.apache.thrift.protocol.TProtocol iprot, THRegionLocation struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -471,24 +447,24 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
}
private static class THRegionLocationTupleSchemeFactory implements SchemeFactory {
private static class THRegionLocationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public THRegionLocationTupleScheme getScheme() {
return new THRegionLocationTupleScheme();
}
}
private static class THRegionLocationTupleScheme extends TupleScheme<THRegionLocation> {
private static class THRegionLocationTupleScheme extends org.apache.thrift.scheme.TupleScheme<THRegionLocation> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, THRegionLocation struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.serverName.write(oprot);
struct.regionInfo.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, THRegionLocation struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.serverName = new TServerName();
struct.serverName.read(iprot);
struct.setServerNameIsSet(true);
@ -498,5 +474,8 @@ public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocatio
}
}
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();
}
}

View File

@ -1,66 +1,36 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* A TIOError exception signals that an error occurred communicating
* to the HBase master or a HBase region server. Also used to return
* more general HBase error conditions.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
public class TIOError extends TException implements org.apache.thrift.TBase<TIOError, TIOError._Fields>, java.io.Serializable, Cloneable, Comparable<TIOError> {
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TIOError extends org.apache.thrift.TException implements org.apache.thrift.TBase<TIOError, TIOError._Fields>, java.io.Serializable, Cloneable, Comparable<TIOError> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIOError");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 TIOErrorStandardSchemeFactory());
schemes.put(TupleScheme.class, new TIOErrorTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TIOErrorStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TIOErrorTupleSchemeFactory();
public String message; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String message; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MESSAGE((short)1, "message");
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);
}
}
@ -68,6 +38,7 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // MESSAGE
@ -83,21 +54,22 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -106,19 +78,19 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.MESSAGE};
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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TIOError.class, metaDataMap);
}
@ -143,11 +115,12 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
this.message = null;
}
public String getMessage() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getMessage() {
return this.message;
}
public TIOError setMessage(String message) {
public TIOError setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@ -167,43 +140,44 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
} else {
setMessage((String)value);
setMessage((java.lang.String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
}
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 MESSAGE:
return isSetMessage();
}
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 TIOError)
@ -214,6 +188,8 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
public boolean equals(TIOError that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_message = true && this.isSetMessage();
boolean that_present_message = true && that.isSetMessage();
@ -229,14 +205,13 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_message = true && (isSetMessage());
list.add(present_message);
if (present_message)
list.add(message);
hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
if (isSetMessage())
hashCode = hashCode * 8191 + message.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -247,7 +222,7 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
lastComparison = java.lang.Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@ -260,21 +235,22 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TIOError(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TIOError(");
boolean first = true;
if (isSetMessage()) {
@ -303,7 +279,7 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
}
}
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) {
@ -311,13 +287,13 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
}
}
private static class TIOErrorStandardSchemeFactory implements SchemeFactory {
private static class TIOErrorStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIOErrorStandardScheme getScheme() {
return new TIOErrorStandardScheme();
}
}
private static class TIOErrorStandardScheme extends StandardScheme<TIOError> {
private static class TIOErrorStandardScheme extends org.apache.thrift.scheme.StandardScheme<TIOError> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TIOError struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -365,18 +341,18 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
}
private static class TIOErrorTupleSchemeFactory implements SchemeFactory {
private static class TIOErrorTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIOErrorTupleScheme getScheme() {
return new TIOErrorTupleScheme();
}
}
private static class TIOErrorTupleScheme extends TupleScheme<TIOError> {
private static class TIOErrorTupleScheme extends org.apache.thrift.scheme.TupleScheme<TIOError> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TIOError 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.isSetMessage()) {
optionals.set(0);
}
@ -388,8 +364,8 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TIOError 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.message = iprot.readString();
struct.setMessageIsSet(true);
@ -397,5 +373,8 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
}
}
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();
}
}

View File

@ -1,65 +1,35 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* A TIllegalArgument exception indicates an illegal or invalid
* argument was passed into a procedure.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
public class TIllegalArgument extends TException implements org.apache.thrift.TBase<TIllegalArgument, TIllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<TIllegalArgument> {
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TIllegalArgument extends org.apache.thrift.TException implements org.apache.thrift.TBase<TIllegalArgument, TIllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<TIllegalArgument> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIllegalArgument");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", 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 TIllegalArgumentStandardSchemeFactory());
schemes.put(TupleScheme.class, new TIllegalArgumentTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TIllegalArgumentStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TIllegalArgumentTupleSchemeFactory();
public String message; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String message; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MESSAGE((short)1, "message");
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);
}
}
@ -67,6 +37,7 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // MESSAGE
@ -82,21 +53,22 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -105,19 +77,19 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.MESSAGE};
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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TIllegalArgument.class, metaDataMap);
}
@ -142,11 +114,12 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
this.message = null;
}
public String getMessage() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getMessage() {
return this.message;
}
public TIllegalArgument setMessage(String message) {
public TIllegalArgument setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@ -166,43 +139,44 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
} else {
setMessage((String)value);
setMessage((java.lang.String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
}
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 MESSAGE:
return isSetMessage();
}
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 TIllegalArgument)
@ -213,6 +187,8 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
public boolean equals(TIllegalArgument that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_message = true && this.isSetMessage();
boolean that_present_message = true && that.isSetMessage();
@ -228,14 +204,13 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_message = true && (isSetMessage());
list.add(present_message);
if (present_message)
list.add(message);
hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
if (isSetMessage())
hashCode = hashCode * 8191 + message.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -246,7 +221,7 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
lastComparison = java.lang.Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@ -259,21 +234,22 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TIllegalArgument(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TIllegalArgument(");
boolean first = true;
if (isSetMessage()) {
@ -302,7 +278,7 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
}
}
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) {
@ -310,13 +286,13 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
}
}
private static class TIllegalArgumentStandardSchemeFactory implements SchemeFactory {
private static class TIllegalArgumentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIllegalArgumentStandardScheme getScheme() {
return new TIllegalArgumentStandardScheme();
}
}
private static class TIllegalArgumentStandardScheme extends StandardScheme<TIllegalArgument> {
private static class TIllegalArgumentStandardScheme extends org.apache.thrift.scheme.StandardScheme<TIllegalArgument> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TIllegalArgument struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -364,18 +340,18 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
}
private static class TIllegalArgumentTupleSchemeFactory implements SchemeFactory {
private static class TIllegalArgumentTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIllegalArgumentTupleScheme getScheme() {
return new TIllegalArgumentTupleScheme();
}
}
private static class TIllegalArgumentTupleScheme extends TupleScheme<TIllegalArgument> {
private static class TIllegalArgumentTupleScheme extends org.apache.thrift.scheme.TupleScheme<TIllegalArgument> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TIllegalArgument 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.isSetMessage()) {
optionals.set(0);
}
@ -387,8 +363,8 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TIllegalArgument 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.message = iprot.readString();
struct.setMessageIsSet(true);
@ -396,5 +372,8 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
}
}
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();
}
}

View File

@ -1,39 +1,12 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Used to perform Increment operations for a single row.
*
@ -41,7 +14,7 @@ import org.slf4j.LoggerFactory;
* by changing the durability. If you don't provide durability, it defaults to
* column family's default setting for durability.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncrement._Fields>, java.io.Serializable, Cloneable, Comparable<TIncrement> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement");
@ -52,21 +25,18 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
private static final org.apache.thrift.protocol.TField CELL_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("cellVisibility", org.apache.thrift.protocol.TType.STRUCT, (short)6);
private static final org.apache.thrift.protocol.TField RETURN_RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("returnResults", 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 TIncrementStandardSchemeFactory());
schemes.put(TupleScheme.class, new TIncrementTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TIncrementStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TIncrementTupleSchemeFactory();
public ByteBuffer row; // required
public List<TColumnIncrement> columns; // required
public Map<ByteBuffer,ByteBuffer> attributes; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TColumnIncrement> columns; // required
public @org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes; // optional
/**
*
* @see TDurability
*/
public TDurability durability; // optional
public TCellVisibility cellVisibility; // optional
public @org.apache.thrift.annotation.Nullable TDurability durability; // optional
public @org.apache.thrift.annotation.Nullable TCellVisibility cellVisibility; // optional
public boolean returnResults; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@ -82,10 +52,10 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
CELL_VISIBILITY((short)6, "cellVisibility"),
RETURN_RESULTS((short)7, "returnResults");
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);
}
}
@ -93,6 +63,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROW
@ -118,21 +89,22 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -141,7 +113,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -150,9 +122,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
private static final int __RETURNRESULTS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ATTRIBUTES,_Fields.DURABILITY,_Fields.CELL_VISIBILITY,_Fields.RETURN_RESULTS};
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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.REQUIRED,
@ -168,7 +140,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCellVisibility.class)));
tmpMap.put(_Fields.RETURN_RESULTS, new org.apache.thrift.meta_data.FieldMetaData("returnResults", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TIncrement.class, metaDataMap);
}
@ -176,8 +148,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
public TIncrement(
ByteBuffer row,
List<TColumnIncrement> columns)
java.nio.ByteBuffer row,
java.util.List<TColumnIncrement> columns)
{
this();
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
@ -193,14 +165,14 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetColumns()) {
List<TColumnIncrement> __this__columns = new ArrayList<TColumnIncrement>(other.columns.size());
java.util.List<TColumnIncrement> __this__columns = new java.util.ArrayList<TColumnIncrement>(other.columns.size());
for (TColumnIncrement other_element : other.columns) {
__this__columns.add(new TColumnIncrement(other_element));
}
this.columns = __this__columns;
}
if (other.isSetAttributes()) {
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> __this__attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(other.attributes);
this.attributes = __this__attributes;
}
if (other.isSetDurability()) {
@ -232,16 +204,16 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TIncrement setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TIncrement setRow(ByteBuffer row) {
public TIncrement setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -265,22 +237,24 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return (this.columns == null) ? 0 : this.columns.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TColumnIncrement> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(TColumnIncrement elem) {
if (this.columns == null) {
this.columns = new ArrayList<TColumnIncrement>();
this.columns = new java.util.ArrayList<TColumnIncrement>();
}
this.columns.add(elem);
}
public List<TColumnIncrement> getColumns() {
@org.apache.thrift.annotation.Nullable
public java.util.List<TColumnIncrement> getColumns() {
return this.columns;
}
public TIncrement setColumns(List<TColumnIncrement> columns) {
public TIncrement setColumns(@org.apache.thrift.annotation.Nullable java.util.List<TColumnIncrement> columns) {
this.columns = columns;
return this;
}
@ -304,18 +278,19 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return (this.attributes == null) ? 0 : this.attributes.size();
}
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
public void putToAttributes(java.nio.ByteBuffer key, java.nio.ByteBuffer val) {
if (this.attributes == null) {
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
this.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>();
}
this.attributes.put(key, val);
}
public Map<ByteBuffer,ByteBuffer> getAttributes() {
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> getAttributes() {
return this.attributes;
}
public TIncrement setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
public TIncrement setAttributes(@org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes) {
this.attributes = attributes;
return this;
}
@ -339,6 +314,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
*
* @see TDurability
*/
@org.apache.thrift.annotation.Nullable
public TDurability getDurability() {
return this.durability;
}
@ -347,7 +323,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
*
* @see TDurability
*/
public TIncrement setDurability(TDurability durability) {
public TIncrement setDurability(@org.apache.thrift.annotation.Nullable TDurability durability) {
this.durability = durability;
return this;
}
@ -367,11 +343,12 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
@org.apache.thrift.annotation.Nullable
public TCellVisibility getCellVisibility() {
return this.cellVisibility;
}
public TIncrement setCellVisibility(TCellVisibility cellVisibility) {
public TIncrement setCellVisibility(@org.apache.thrift.annotation.Nullable TCellVisibility cellVisibility) {
this.cellVisibility = cellVisibility;
return this;
}
@ -402,25 +379,29 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
public void unsetReturnResults() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
}
/** Returns true if field returnResults is set (has been assigned a value) and false otherwise */
public boolean isSetReturnResults() {
return EncodingUtils.testBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
}
public void setReturnResultsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -428,7 +409,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (value == null) {
unsetColumns();
} else {
setColumns((List<TColumnIncrement>)value);
setColumns((java.util.List<TColumnIncrement>)value);
}
break;
@ -436,7 +417,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (value == null) {
unsetAttributes();
} else {
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
setAttributes((java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer>)value);
}
break;
@ -460,14 +441,15 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (value == null) {
unsetReturnResults();
} else {
setReturnResults((Boolean)value);
setReturnResults((java.lang.Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@ -488,13 +470,13 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return isReturnResults();
}
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) {
@ -511,11 +493,11 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
case RETURN_RESULTS:
return isSetReturnResults();
}
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 TIncrement)
@ -526,6 +508,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
public boolean equals(TIncrement that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@ -586,39 +570,33 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_columns = true && (isSetColumns());
list.add(present_columns);
if (present_columns)
list.add(columns);
hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
if (isSetColumns())
hashCode = hashCode * 8191 + columns.hashCode();
boolean present_attributes = true && (isSetAttributes());
list.add(present_attributes);
if (present_attributes)
list.add(attributes);
hashCode = hashCode * 8191 + ((isSetAttributes()) ? 131071 : 524287);
if (isSetAttributes())
hashCode = hashCode * 8191 + attributes.hashCode();
boolean present_durability = true && (isSetDurability());
list.add(present_durability);
if (present_durability)
list.add(durability.getValue());
hashCode = hashCode * 8191 + ((isSetDurability()) ? 131071 : 524287);
if (isSetDurability())
hashCode = hashCode * 8191 + durability.getValue();
boolean present_cellVisibility = true && (isSetCellVisibility());
list.add(present_cellVisibility);
if (present_cellVisibility)
list.add(cellVisibility);
hashCode = hashCode * 8191 + ((isSetCellVisibility()) ? 131071 : 524287);
if (isSetCellVisibility())
hashCode = hashCode * 8191 + cellVisibility.hashCode();
boolean present_returnResults = true && (isSetReturnResults());
list.add(present_returnResults);
if (present_returnResults)
list.add(returnResults);
hashCode = hashCode * 8191 + ((isSetReturnResults()) ? 131071 : 524287);
if (isSetReturnResults())
hashCode = hashCode * 8191 + ((returnResults) ? 131071 : 524287);
return list.hashCode();
return hashCode;
}
@Override
@ -629,7 +607,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -639,7 +617,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -649,7 +627,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
lastComparison = java.lang.Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
@ -659,7 +637,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
lastComparison = java.lang.Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
@ -669,7 +647,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCellVisibility()).compareTo(other.isSetCellVisibility());
lastComparison = java.lang.Boolean.valueOf(isSetCellVisibility()).compareTo(other.isSetCellVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@ -679,7 +657,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReturnResults()).compareTo(other.isSetReturnResults());
lastComparison = java.lang.Boolean.valueOf(isSetReturnResults()).compareTo(other.isSetReturnResults());
if (lastComparison != 0) {
return lastComparison;
}
@ -692,21 +670,22 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TIncrement(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TIncrement(");
boolean first = true;
sb.append("row:");
@ -786,7 +765,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
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;
@ -796,13 +775,13 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
private static class TIncrementStandardSchemeFactory implements SchemeFactory {
private static class TIncrementStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIncrementStandardScheme getScheme() {
return new TIncrementStandardScheme();
}
}
private static class TIncrementStandardScheme extends StandardScheme<TIncrement> {
private static class TIncrementStandardScheme extends org.apache.thrift.scheme.StandardScheme<TIncrement> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TIncrement struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -826,8 +805,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
struct.columns = new ArrayList<TColumnIncrement>(_list70.size);
TColumnIncrement _elem71;
struct.columns = new java.util.ArrayList<TColumnIncrement>(_list70.size);
@org.apache.thrift.annotation.Nullable TColumnIncrement _elem71;
for (int _i72 = 0; _i72 < _list70.size; ++_i72)
{
_elem71 = new TColumnIncrement();
@ -845,9 +824,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map73 = iprot.readMapBegin();
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map73.size);
ByteBuffer _key74;
ByteBuffer _val75;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map73.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key74;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val75;
for (int _i76 = 0; _i76 < _map73.size; ++_i76)
{
_key74 = iprot.readBinary();
@ -923,7 +902,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
for (Map.Entry<ByteBuffer, ByteBuffer> _iter78 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter78 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter78.getKey());
oprot.writeBinary(_iter78.getValue());
@ -958,17 +937,17 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
private static class TIncrementTupleSchemeFactory implements SchemeFactory {
private static class TIncrementTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIncrementTupleScheme getScheme() {
return new TIncrementTupleScheme();
}
}
private static class TIncrementTupleScheme extends TupleScheme<TIncrement> {
private static class TIncrementTupleScheme extends org.apache.thrift.scheme.TupleScheme<TIncrement> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TIncrement struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.row);
{
oprot.writeI32(struct.columns.size());
@ -977,7 +956,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
_iter79.write(oprot);
}
}
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetAttributes()) {
optionals.set(0);
}
@ -994,7 +973,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
for (Map.Entry<ByteBuffer, ByteBuffer> _iter80 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter80 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter80.getKey());
oprot.writeBinary(_iter80.getValue());
@ -1014,13 +993,13 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TIncrement struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
{
org.apache.thrift.protocol.TList _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<TColumnIncrement>(_list81.size);
TColumnIncrement _elem82;
struct.columns = new java.util.ArrayList<TColumnIncrement>(_list81.size);
@org.apache.thrift.annotation.Nullable TColumnIncrement _elem82;
for (int _i83 = 0; _i83 < _list81.size; ++_i83)
{
_elem82 = new TColumnIncrement();
@ -1029,13 +1008,13 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
struct.setColumnsIsSet(true);
BitSet incoming = iprot.readBitSet(4);
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map84.size);
ByteBuffer _key85;
ByteBuffer _val86;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map84.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key85;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val86;
for (int _i87 = 0; _i87 < _map84.size; ++_i87)
{
_key85 = iprot.readBinary();
@ -1061,5 +1040,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
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();
}
}

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,14 +7,11 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Thrift wrapper around
* org.apache.hadoop.hbase.KeepDeletedCells
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TKeepDeletedCells implements org.apache.thrift.TEnum {
/**
* Deleted Cells are not retained.
@ -52,6 +49,7 @@ public enum TKeepDeletedCells implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TKeepDeletedCells findByValue(int value) {
switch (value) {
case 0:

View File

@ -1,42 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Atomic mutation for the specified row. It can be either Put or Delete.
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fields> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMutation");
private static final org.apache.thrift.protocol.TField PUT_FIELD_DESC = new org.apache.thrift.protocol.TField("put", org.apache.thrift.protocol.TType.STRUCT, (short)1);
@ -47,10 +21,10 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
PUT((short)1, "put"),
DELETE_SINGLE((short)2, "deleteSingle");
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);
}
}
@ -58,6 +32,7 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PUT
@ -75,21 +50,22 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -98,19 +74,19 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
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);
tmpMap.put(_Fields.PUT, new org.apache.thrift.meta_data.FieldMetaData("put", org.apache.thrift.TFieldRequirementType.DEFAULT,
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.PUT, new org.apache.thrift.meta_data.FieldMetaData("put", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPut.class)));
tmpMap.put(_Fields.DELETE_SINGLE, new org.apache.thrift.meta_data.FieldMetaData("deleteSingle", org.apache.thrift.TFieldRequirementType.DEFAULT,
tmpMap.put(_Fields.DELETE_SINGLE, new org.apache.thrift.meta_data.FieldMetaData("deleteSingle", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDelete.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TMutation.class, metaDataMap);
}
@ -118,7 +94,7 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
super();
}
public TMutation(_Fields setField, Object value) {
public TMutation(_Fields setField, java.lang.Object value) {
super(setField, value);
}
@ -143,25 +119,25 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
@Override
protected void checkType(_Fields setField, Object value) throws ClassCastException {
protected void checkType(_Fields setField, java.lang.Object value) throws java.lang.ClassCastException {
switch (setField) {
case PUT:
if (value instanceof TPut) {
break;
}
throw new ClassCastException("Was expecting value of type TPut for field 'put', but got " + value.getClass().getSimpleName());
throw new java.lang.ClassCastException("Was expecting value of type TPut for field 'put', but got " + value.getClass().getSimpleName());
case DELETE_SINGLE:
if (value instanceof TDelete) {
break;
}
throw new ClassCastException("Was expecting value of type TDelete for field 'deleteSingle', but got " + value.getClass().getSimpleName());
throw new java.lang.ClassCastException("Was expecting value of type TDelete for field 'deleteSingle', but got " + value.getClass().getSimpleName());
default:
throw new IllegalArgumentException("Unknown field id " + setField);
throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@Override
protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(field.id);
if (setField != null) {
switch (setField) {
@ -186,7 +162,7 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
return null;
}
default:
throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
@ -206,12 +182,12 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
deleteSingle.write(oprot);
return;
default:
throw new IllegalStateException("Cannot write union with unknown field " + setField_);
throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@Override
protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
_Fields setField = _Fields.findByThriftId(fieldID);
if (setField != null) {
switch (setField) {
@ -226,10 +202,10 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
deleteSingle.read(iprot);
return deleteSingle;
default:
throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
}
} else {
throw new TProtocolException("Couldn't find a field with field id " + fieldID);
throw new org.apache.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID);
}
}
@ -245,7 +221,7 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
deleteSingle.write(oprot);
return;
default:
throw new IllegalStateException("Cannot write union with unknown field " + setField_);
throw new java.lang.IllegalStateException("Cannot write union with unknown field " + setField_);
}
}
@ -257,7 +233,7 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
case DELETE_SINGLE:
return DELETE_SINGLE_FIELD_DESC;
default:
throw new IllegalArgumentException("Unknown field id " + setField);
throw new java.lang.IllegalArgumentException("Unknown field id " + setField);
}
}
@ -271,6 +247,7 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
return _Fields.findByThriftIdOrThrow(id);
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@ -280,12 +257,12 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
if (getSetField() == _Fields.PUT) {
return (TPut)getFieldValue();
} else {
throw new RuntimeException("Cannot get field 'put' because union is currently set to " + getFieldDesc(getSetField()).name);
throw new java.lang.RuntimeException("Cannot get field 'put' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void setPut(TPut value) {
if (value == null) throw new NullPointerException();
if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.PUT;
value_ = value;
}
@ -294,12 +271,12 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
if (getSetField() == _Fields.DELETE_SINGLE) {
return (TDelete)getFieldValue();
} else {
throw new RuntimeException("Cannot get field 'deleteSingle' because union is currently set to " + getFieldDesc(getSetField()).name);
throw new java.lang.RuntimeException("Cannot get field 'deleteSingle' because union is currently set to " + getFieldDesc(getSetField()).name);
}
}
public void setDeleteSingle(TDelete value) {
if (value == null) throw new NullPointerException();
if (value == null) throw new java.lang.NullPointerException();
setField_ = _Fields.DELETE_SINGLE;
value_ = value;
}
@ -314,7 +291,7 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
}
public boolean equals(Object other) {
public boolean equals(java.lang.Object other) {
if (other instanceof TMutation) {
return equals((TMutation)other);
} else {
@ -338,12 +315,12 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>();
list.add(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
list.add(setField.getThriftFieldId());
Object value = getFieldValue();
java.lang.Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
@ -361,7 +338,7 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
}
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) {

View File

@ -1,68 +1,38 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Thrift wrapper around
* org.apache.hadoop.hbase.NamespaceDescriptor
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceDescriptor, TNamespaceDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<TNamespaceDescriptor> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNamespaceDescriptor");
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TNamespaceDescriptorStandardSchemeFactory());
schemes.put(TupleScheme.class, new TNamespaceDescriptorTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TNamespaceDescriptorStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TNamespaceDescriptorTupleSchemeFactory();
public String name; // required
public Map<String,String> configuration; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> configuration; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
NAME((short)1, "name"),
CONFIGURATION((short)2, "configuration");
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);
}
}
@ -70,6 +40,7 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // NAME
@ -87,21 +58,22 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -110,23 +82,23 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.CONFIGURATION};
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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
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(TNamespaceDescriptor.class, metaDataMap);
}
@ -134,7 +106,7 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
}
public TNamespaceDescriptor(
String name)
java.lang.String name)
{
this();
this.name = name;
@ -148,7 +120,7 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
this.name = other.name;
}
if (other.isSetConfiguration()) {
Map<String,String> __this__configuration = new HashMap<String,String>(other.configuration);
java.util.Map<java.lang.String,java.lang.String> __this__configuration = new java.util.HashMap<java.lang.String,java.lang.String>(other.configuration);
this.configuration = __this__configuration;
}
}
@ -163,11 +135,12 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
this.configuration = null;
}
public String getName() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getName() {
return this.name;
}
public TNamespaceDescriptor setName(String name) {
public TNamespaceDescriptor setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
this.name = name;
return this;
}
@ -191,18 +164,19 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
return (this.configuration == null) ? 0 : this.configuration.size();
}
public void putToConfiguration(String key, String val) {
public void putToConfiguration(java.lang.String key, java.lang.String val) {
if (this.configuration == null) {
this.configuration = new HashMap<String,String>();
this.configuration = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.configuration.put(key, val);
}
public Map<String,String> getConfiguration() {
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.String,java.lang.String> getConfiguration() {
return this.configuration;
}
public TNamespaceDescriptor setConfiguration(Map<String,String> configuration) {
public TNamespaceDescriptor setConfiguration(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> configuration) {
this.configuration = configuration;
return this;
}
@ -222,13 +196,13 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unsetName();
} else {
setName((String)value);
setName((java.lang.String)value);
}
break;
@ -236,14 +210,15 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
if (value == null) {
unsetConfiguration();
} else {
setConfiguration((Map<String,String>)value);
setConfiguration((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return getName();
@ -252,13 +227,13 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
return getConfiguration();
}
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) {
@ -267,11 +242,11 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
case CONFIGURATION:
return isSetConfiguration();
}
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 TNamespaceDescriptor)
@ -282,6 +257,8 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
public boolean equals(TNamespaceDescriptor that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
@ -306,19 +283,17 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_name = true && (isSetName());
list.add(present_name);
if (present_name)
list.add(name);
hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
if (isSetName())
hashCode = hashCode * 8191 + name.hashCode();
boolean present_configuration = true && (isSetConfiguration());
list.add(present_configuration);
if (present_configuration)
list.add(configuration);
hashCode = hashCode * 8191 + ((isSetConfiguration()) ? 131071 : 524287);
if (isSetConfiguration())
hashCode = hashCode * 8191 + configuration.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -329,7 +304,7 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@ -339,7 +314,7 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration());
lastComparison = java.lang.Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration());
if (lastComparison != 0) {
return lastComparison;
}
@ -352,21 +327,22 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TNamespaceDescriptor(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TNamespaceDescriptor(");
boolean first = true;
sb.append("name:");
@ -406,7 +382,7 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
}
}
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) {
@ -414,13 +390,13 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
}
}
private static class TNamespaceDescriptorStandardSchemeFactory implements SchemeFactory {
private static class TNamespaceDescriptorStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TNamespaceDescriptorStandardScheme getScheme() {
return new TNamespaceDescriptorStandardScheme();
}
}
private static class TNamespaceDescriptorStandardScheme extends StandardScheme<TNamespaceDescriptor> {
private static class TNamespaceDescriptorStandardScheme extends org.apache.thrift.scheme.StandardScheme<TNamespaceDescriptor> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TNamespaceDescriptor struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -444,9 +420,9 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map180 = iprot.readMapBegin();
struct.configuration = new HashMap<String,String>(2*_map180.size);
String _key181;
String _val182;
struct.configuration = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map180.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key181;
@org.apache.thrift.annotation.Nullable java.lang.String _val182;
for (int _i183 = 0; _i183 < _map180.size; ++_i183)
{
_key181 = iprot.readString();
@ -485,7 +461,7 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size()));
for (Map.Entry<String, String> _iter184 : struct.configuration.entrySet())
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter184 : struct.configuration.entrySet())
{
oprot.writeString(_iter184.getKey());
oprot.writeString(_iter184.getValue());
@ -501,19 +477,19 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
}
private static class TNamespaceDescriptorTupleSchemeFactory implements SchemeFactory {
private static class TNamespaceDescriptorTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TNamespaceDescriptorTupleScheme getScheme() {
return new TNamespaceDescriptorTupleScheme();
}
}
private static class TNamespaceDescriptorTupleScheme extends TupleScheme<TNamespaceDescriptor> {
private static class TNamespaceDescriptorTupleScheme extends org.apache.thrift.scheme.TupleScheme<TNamespaceDescriptor> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TNamespaceDescriptor struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.name);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetConfiguration()) {
optionals.set(0);
}
@ -521,7 +497,7 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
if (struct.isSetConfiguration()) {
{
oprot.writeI32(struct.configuration.size());
for (Map.Entry<String, String> _iter185 : struct.configuration.entrySet())
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter185 : struct.configuration.entrySet())
{
oprot.writeString(_iter185.getKey());
oprot.writeString(_iter185.getValue());
@ -532,16 +508,16 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TNamespaceDescriptor struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.name = iprot.readString();
struct.setNameIsSet(true);
BitSet incoming = iprot.readBitSet(1);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map186 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.configuration = new HashMap<String,String>(2*_map186.size);
String _key187;
String _val188;
struct.configuration = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map186.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key187;
@org.apache.thrift.annotation.Nullable java.lang.String _val188;
for (int _i189 = 0; _i189 < _map186.size; ++_i189)
{
_key187 = iprot.readString();
@ -554,5 +530,8 @@ public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceD
}
}
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();
}
}

View File

@ -1,39 +1,12 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Used to perform Put operations for a single row.
*
@ -46,7 +19,7 @@ import org.slf4j.LoggerFactory;
* by changing the durability. If you don't provide durability, it defaults to
* column family's default setting for durability.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.io.Serializable, Cloneable, Comparable<TPut> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPut");
@ -57,22 +30,19 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField CELL_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("cellVisibility", org.apache.thrift.protocol.TType.STRUCT, (short)7);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TPutStandardSchemeFactory());
schemes.put(TupleScheme.class, new TPutTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPutStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPutTupleSchemeFactory();
public ByteBuffer row; // required
public List<TColumnValue> columnValues; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TColumnValue> columnValues; // required
public long timestamp; // optional
public Map<ByteBuffer,ByteBuffer> attributes; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes; // optional
/**
*
* @see TDurability
*/
public TDurability durability; // optional
public TCellVisibility cellVisibility; // optional
public @org.apache.thrift.annotation.Nullable TDurability durability; // optional
public @org.apache.thrift.annotation.Nullable TCellVisibility cellVisibility; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@ -87,10 +57,10 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
DURABILITY((short)6, "durability"),
CELL_VISIBILITY((short)7, "cellVisibility");
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);
}
}
@ -98,6 +68,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROW
@ -123,21 +94,22 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -146,7 +118,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -155,9 +127,9 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.ATTRIBUTES,_Fields.DURABILITY,_Fields.CELL_VISIBILITY};
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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMN_VALUES, new org.apache.thrift.meta_data.FieldMetaData("columnValues", org.apache.thrift.TFieldRequirementType.REQUIRED,
@ -173,7 +145,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDurability.class)));
tmpMap.put(_Fields.CELL_VISIBILITY, new org.apache.thrift.meta_data.FieldMetaData("cellVisibility", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCellVisibility.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPut.class, metaDataMap);
}
@ -181,8 +153,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
public TPut(
ByteBuffer row,
List<TColumnValue> columnValues)
java.nio.ByteBuffer row,
java.util.List<TColumnValue> columnValues)
{
this();
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
@ -198,7 +170,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetColumnValues()) {
List<TColumnValue> __this__columnValues = new ArrayList<TColumnValue>(other.columnValues.size());
java.util.List<TColumnValue> __this__columnValues = new java.util.ArrayList<TColumnValue>(other.columnValues.size());
for (TColumnValue other_element : other.columnValues) {
__this__columnValues.add(new TColumnValue(other_element));
}
@ -206,7 +178,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
this.timestamp = other.timestamp;
if (other.isSetAttributes()) {
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> __this__attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(other.attributes);
this.attributes = __this__attributes;
}
if (other.isSetDurability()) {
@ -237,16 +209,16 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TPut setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TPut setRow(ByteBuffer row) {
public TPut setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -270,22 +242,24 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return (this.columnValues == null) ? 0 : this.columnValues.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TColumnValue> getColumnValuesIterator() {
return (this.columnValues == null) ? null : this.columnValues.iterator();
}
public void addToColumnValues(TColumnValue elem) {
if (this.columnValues == null) {
this.columnValues = new ArrayList<TColumnValue>();
this.columnValues = new java.util.ArrayList<TColumnValue>();
}
this.columnValues.add(elem);
}
public List<TColumnValue> getColumnValues() {
@org.apache.thrift.annotation.Nullable
public java.util.List<TColumnValue> getColumnValues() {
return this.columnValues;
}
public TPut setColumnValues(List<TColumnValue> columnValues) {
public TPut setColumnValues(@org.apache.thrift.annotation.Nullable java.util.List<TColumnValue> columnValues) {
this.columnValues = columnValues;
return this;
}
@ -316,34 +290,35 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
public void unsetTimestamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public int getAttributesSize() {
return (this.attributes == null) ? 0 : this.attributes.size();
}
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
public void putToAttributes(java.nio.ByteBuffer key, java.nio.ByteBuffer val) {
if (this.attributes == null) {
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
this.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>();
}
this.attributes.put(key, val);
}
public Map<ByteBuffer,ByteBuffer> getAttributes() {
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> getAttributes() {
return this.attributes;
}
public TPut setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
public TPut setAttributes(@org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes) {
this.attributes = attributes;
return this;
}
@ -367,6 +342,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
*
* @see TDurability
*/
@org.apache.thrift.annotation.Nullable
public TDurability getDurability() {
return this.durability;
}
@ -375,7 +351,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
*
* @see TDurability
*/
public TPut setDurability(TDurability durability) {
public TPut setDurability(@org.apache.thrift.annotation.Nullable TDurability durability) {
this.durability = durability;
return this;
}
@ -395,11 +371,12 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
}
@org.apache.thrift.annotation.Nullable
public TCellVisibility getCellVisibility() {
return this.cellVisibility;
}
public TPut setCellVisibility(TCellVisibility cellVisibility) {
public TPut setCellVisibility(@org.apache.thrift.annotation.Nullable TCellVisibility cellVisibility) {
this.cellVisibility = cellVisibility;
return this;
}
@ -419,13 +396,17 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -433,7 +414,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
if (value == null) {
unsetColumnValues();
} else {
setColumnValues((List<TColumnValue>)value);
setColumnValues((java.util.List<TColumnValue>)value);
}
break;
@ -441,7 +422,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
if (value == null) {
unsetTimestamp();
} else {
setTimestamp((Long)value);
setTimestamp((java.lang.Long)value);
}
break;
@ -449,7 +430,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
if (value == null) {
unsetAttributes();
} else {
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
setAttributes((java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer>)value);
}
break;
@ -472,7 +453,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@ -493,13 +475,13 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return getCellVisibility();
}
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) {
@ -516,11 +498,11 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
case CELL_VISIBILITY:
return isSetCellVisibility();
}
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 TPut)
@ -531,6 +513,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
public boolean equals(TPut that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@ -591,39 +575,33 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_columnValues = true && (isSetColumnValues());
list.add(present_columnValues);
if (present_columnValues)
list.add(columnValues);
hashCode = hashCode * 8191 + ((isSetColumnValues()) ? 131071 : 524287);
if (isSetColumnValues())
hashCode = hashCode * 8191 + columnValues.hashCode();
boolean present_timestamp = true && (isSetTimestamp());
list.add(present_timestamp);
if (present_timestamp)
list.add(timestamp);
hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
if (isSetTimestamp())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);
boolean present_attributes = true && (isSetAttributes());
list.add(present_attributes);
if (present_attributes)
list.add(attributes);
hashCode = hashCode * 8191 + ((isSetAttributes()) ? 131071 : 524287);
if (isSetAttributes())
hashCode = hashCode * 8191 + attributes.hashCode();
boolean present_durability = true && (isSetDurability());
list.add(present_durability);
if (present_durability)
list.add(durability.getValue());
hashCode = hashCode * 8191 + ((isSetDurability()) ? 131071 : 524287);
if (isSetDurability())
hashCode = hashCode * 8191 + durability.getValue();
boolean present_cellVisibility = true && (isSetCellVisibility());
list.add(present_cellVisibility);
if (present_cellVisibility)
list.add(cellVisibility);
hashCode = hashCode * 8191 + ((isSetCellVisibility()) ? 131071 : 524287);
if (isSetCellVisibility())
hashCode = hashCode * 8191 + cellVisibility.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -634,7 +612,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -644,7 +622,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumnValues()).compareTo(other.isSetColumnValues());
lastComparison = java.lang.Boolean.valueOf(isSetColumnValues()).compareTo(other.isSetColumnValues());
if (lastComparison != 0) {
return lastComparison;
}
@ -654,7 +632,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
lastComparison = java.lang.Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
@ -664,7 +642,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
lastComparison = java.lang.Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
@ -674,7 +652,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
lastComparison = java.lang.Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
@ -684,7 +662,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCellVisibility()).compareTo(other.isSetCellVisibility());
lastComparison = java.lang.Boolean.valueOf(isSetCellVisibility()).compareTo(other.isSetCellVisibility());
if (lastComparison != 0) {
return lastComparison;
}
@ -697,21 +675,22 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TPut(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TPut(");
boolean first = true;
sb.append("row:");
@ -791,7 +770,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
}
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;
@ -801,13 +780,13 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
}
private static class TPutStandardSchemeFactory implements SchemeFactory {
private static class TPutStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPutStandardScheme getScheme() {
return new TPutStandardScheme();
}
}
private static class TPutStandardScheme extends StandardScheme<TPut> {
private static class TPutStandardScheme extends org.apache.thrift.scheme.StandardScheme<TPut> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TPut struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -831,8 +810,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
struct.columnValues = new ArrayList<TColumnValue>(_list34.size);
TColumnValue _elem35;
struct.columnValues = new java.util.ArrayList<TColumnValue>(_list34.size);
@org.apache.thrift.annotation.Nullable TColumnValue _elem35;
for (int _i36 = 0; _i36 < _list34.size; ++_i36)
{
_elem35 = new TColumnValue();
@ -858,9 +837,9 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map37 = iprot.readMapBegin();
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map37.size);
ByteBuffer _key38;
ByteBuffer _val39;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map37.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key38;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val39;
for (int _i40 = 0; _i40 < _map37.size; ++_i40)
{
_key38 = iprot.readBinary();
@ -933,7 +912,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
for (Map.Entry<ByteBuffer, ByteBuffer> _iter42 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter42 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter42.getKey());
oprot.writeBinary(_iter42.getValue());
@ -963,17 +942,17 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
private static class TPutTupleSchemeFactory implements SchemeFactory {
private static class TPutTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPutTupleScheme getScheme() {
return new TPutTupleScheme();
}
}
private static class TPutTupleScheme extends TupleScheme<TPut> {
private static class TPutTupleScheme extends org.apache.thrift.scheme.TupleScheme<TPut> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TPut struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.row);
{
oprot.writeI32(struct.columnValues.size());
@ -982,7 +961,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
_iter43.write(oprot);
}
}
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTimestamp()) {
optionals.set(0);
}
@ -1002,7 +981,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
for (Map.Entry<ByteBuffer, ByteBuffer> _iter44 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter44 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter44.getKey());
oprot.writeBinary(_iter44.getValue());
@ -1019,13 +998,13 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TPut struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
{
org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columnValues = new ArrayList<TColumnValue>(_list45.size);
TColumnValue _elem46;
struct.columnValues = new java.util.ArrayList<TColumnValue>(_list45.size);
@org.apache.thrift.annotation.Nullable TColumnValue _elem46;
for (int _i47 = 0; _i47 < _list45.size; ++_i47)
{
_elem46 = new TColumnValue();
@ -1034,7 +1013,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
}
struct.setColumnValuesIsSet(true);
BitSet incoming = iprot.readBitSet(4);
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.timestamp = iprot.readI64();
struct.setTimestampIsSet(true);
@ -1042,9 +1021,9 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map48 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map48.size);
ByteBuffer _key49;
ByteBuffer _val50;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map48.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key49;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val50;
for (int _i51 = 0; _i51 < _map48.size; ++_i51)
{
_key49 = iprot.readBinary();
@ -1066,5 +1045,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
}
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();
}
}

View File

@ -1,5 +1,5 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
@ -7,10 +7,7 @@
package org.apache.hadoop.hbase.thrift2.generated;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public enum TReadType implements org.apache.thrift.TEnum {
DEFAULT(1),
STREAM(2),
@ -33,6 +30,7 @@ public enum TReadType implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static TReadType findByValue(int value) {
switch (value) {
case 1:

View File

@ -1,43 +1,16 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* if no Result is found, row and columnValues will not be set.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields>, java.io.Serializable, Cloneable, Comparable<TResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TResult");
@ -46,14 +19,11 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
private static final org.apache.thrift.protocol.TField STALE_FIELD_DESC = new org.apache.thrift.protocol.TField("stale", org.apache.thrift.protocol.TType.BOOL, (short)3);
private static final org.apache.thrift.protocol.TField PARTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("partial", org.apache.thrift.protocol.TType.BOOL, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TResultStandardSchemeFactory());
schemes.put(TupleScheme.class, new TResultTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TResultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TResultTupleSchemeFactory();
public ByteBuffer row; // optional
public List<TColumnValue> columnValues; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<TColumnValue> columnValues; // required
public boolean stale; // optional
public boolean partial; // optional
@ -64,10 +34,10 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
STALE((short)3, "stale"),
PARTIAL((short)4, "partial");
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);
}
}
@ -75,6 +45,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROW
@ -96,21 +67,22 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -119,7 +91,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -129,9 +101,9 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
private static final int __PARTIAL_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ROW,_Fields.STALE,_Fields.PARTIAL};
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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.COLUMN_VALUES, new org.apache.thrift.meta_data.FieldMetaData("columnValues", org.apache.thrift.TFieldRequirementType.REQUIRED,
@ -141,7 +113,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.PARTIAL, new org.apache.thrift.meta_data.FieldMetaData("partial", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TResult.class, metaDataMap);
}
@ -153,7 +125,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
}
public TResult(
List<TColumnValue> columnValues)
java.util.List<TColumnValue> columnValues)
{
this();
this.columnValues = columnValues;
@ -168,7 +140,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetColumnValues()) {
List<TColumnValue> __this__columnValues = new ArrayList<TColumnValue>(other.columnValues.size());
java.util.List<TColumnValue> __this__columnValues = new java.util.ArrayList<TColumnValue>(other.columnValues.size());
for (TColumnValue other_element : other.columnValues) {
__this__columnValues.add(new TColumnValue(other_element));
}
@ -197,16 +169,16 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TResult setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TResult setRow(ByteBuffer row) {
public TResult setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -230,22 +202,24 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return (this.columnValues == null) ? 0 : this.columnValues.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TColumnValue> getColumnValuesIterator() {
return (this.columnValues == null) ? null : this.columnValues.iterator();
}
public void addToColumnValues(TColumnValue elem) {
if (this.columnValues == null) {
this.columnValues = new ArrayList<TColumnValue>();
this.columnValues = new java.util.ArrayList<TColumnValue>();
}
this.columnValues.add(elem);
}
public List<TColumnValue> getColumnValues() {
@org.apache.thrift.annotation.Nullable
public java.util.List<TColumnValue> getColumnValues() {
return this.columnValues;
}
public TResult setColumnValues(List<TColumnValue> columnValues) {
public TResult setColumnValues(@org.apache.thrift.annotation.Nullable java.util.List<TColumnValue> columnValues) {
this.columnValues = columnValues;
return this;
}
@ -276,16 +250,16 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
}
public void unsetStale() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STALE_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STALE_ISSET_ID);
}
/** Returns true if field stale is set (has been assigned a value) and false otherwise */
public boolean isSetStale() {
return EncodingUtils.testBit(__isset_bitfield, __STALE_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STALE_ISSET_ID);
}
public void setStaleIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STALE_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STALE_ISSET_ID, value);
}
public boolean isPartial() {
@ -299,25 +273,29 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
}
public void unsetPartial() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTIAL_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTIAL_ISSET_ID);
}
/** Returns true if field partial is set (has been assigned a value) and false otherwise */
public boolean isSetPartial() {
return EncodingUtils.testBit(__isset_bitfield, __PARTIAL_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTIAL_ISSET_ID);
}
public void setPartialIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTIAL_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTIAL_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -325,7 +303,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
if (value == null) {
unsetColumnValues();
} else {
setColumnValues((List<TColumnValue>)value);
setColumnValues((java.util.List<TColumnValue>)value);
}
break;
@ -333,7 +311,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
if (value == null) {
unsetStale();
} else {
setStale((Boolean)value);
setStale((java.lang.Boolean)value);
}
break;
@ -341,14 +319,15 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
if (value == null) {
unsetPartial();
} else {
setPartial((Boolean)value);
setPartial((java.lang.Boolean)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@ -363,13 +342,13 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return isPartial();
}
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) {
@ -382,11 +361,11 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
case PARTIAL:
return isSetPartial();
}
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 TResult)
@ -397,6 +376,8 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
public boolean equals(TResult that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@ -439,29 +420,25 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_columnValues = true && (isSetColumnValues());
list.add(present_columnValues);
if (present_columnValues)
list.add(columnValues);
hashCode = hashCode * 8191 + ((isSetColumnValues()) ? 131071 : 524287);
if (isSetColumnValues())
hashCode = hashCode * 8191 + columnValues.hashCode();
boolean present_stale = true && (isSetStale());
list.add(present_stale);
if (present_stale)
list.add(stale);
hashCode = hashCode * 8191 + ((isSetStale()) ? 131071 : 524287);
if (isSetStale())
hashCode = hashCode * 8191 + ((stale) ? 131071 : 524287);
boolean present_partial = true && (isSetPartial());
list.add(present_partial);
if (present_partial)
list.add(partial);
hashCode = hashCode * 8191 + ((isSetPartial()) ? 131071 : 524287);
if (isSetPartial())
hashCode = hashCode * 8191 + ((partial) ? 131071 : 524287);
return list.hashCode();
return hashCode;
}
@Override
@ -472,7 +449,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -482,7 +459,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumnValues()).compareTo(other.isSetColumnValues());
lastComparison = java.lang.Boolean.valueOf(isSetColumnValues()).compareTo(other.isSetColumnValues());
if (lastComparison != 0) {
return lastComparison;
}
@ -492,7 +469,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStale()).compareTo(other.isSetStale());
lastComparison = java.lang.Boolean.valueOf(isSetStale()).compareTo(other.isSetStale());
if (lastComparison != 0) {
return lastComparison;
}
@ -502,7 +479,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPartial()).compareTo(other.isSetPartial());
lastComparison = java.lang.Boolean.valueOf(isSetPartial()).compareTo(other.isSetPartial());
if (lastComparison != 0) {
return lastComparison;
}
@ -515,21 +492,22 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TResult(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TResult(");
boolean first = true;
if (isSetRow()) {
@ -581,7 +559,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._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 {
// 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;
@ -591,13 +569,13 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
}
}
private static class TResultStandardSchemeFactory implements SchemeFactory {
private static class TResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TResultStandardScheme getScheme() {
return new TResultStandardScheme();
}
}
private static class TResultStandardScheme extends StandardScheme<TResult> {
private static class TResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -621,8 +599,8 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.columnValues = new ArrayList<TColumnValue>(_list0.size);
TColumnValue _elem1;
struct.columnValues = new java.util.ArrayList<TColumnValue>(_list0.size);
@org.apache.thrift.annotation.Nullable TColumnValue _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new TColumnValue();
@ -702,17 +680,17 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
}
private static class TResultTupleSchemeFactory implements SchemeFactory {
private static class TResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TResultTupleScheme getScheme() {
return new TResultTupleScheme();
}
}
private static class TResultTupleScheme extends TupleScheme<TResult> {
private static class TResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TResult struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
oprot.writeI32(struct.columnValues.size());
for (TColumnValue _iter4 : struct.columnValues)
@ -720,7 +698,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
_iter4.write(oprot);
}
}
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetRow()) {
optionals.set(0);
}
@ -744,11 +722,11 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TResult struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columnValues = new ArrayList<TColumnValue>(_list5.size);
TColumnValue _elem6;
struct.columnValues = new java.util.ArrayList<TColumnValue>(_list5.size);
@org.apache.thrift.annotation.Nullable TColumnValue _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = new TColumnValue();
@ -757,7 +735,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
}
}
struct.setColumnValuesIsSet(true);
BitSet incoming = iprot.readBitSet(3);
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
@ -773,5 +751,8 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._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();
}
}

View File

@ -1,67 +1,37 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* A TRowMutations object is used to apply a number of Mutations to a single row.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRowMutations._Fields>, java.io.Serializable, Cloneable, Comparable<TRowMutations> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowMutations");
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TRowMutationsStandardSchemeFactory());
schemes.put(TupleScheme.class, new TRowMutationsTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TRowMutationsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TRowMutationsTupleSchemeFactory();
public ByteBuffer row; // required
public List<TMutation> mutations; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TMutation> mutations; // 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 {
ROW((short)1, "row"),
MUTATIONS((short)2, "mutations");
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);
}
}
@ -69,6 +39,7 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROW
@ -86,21 +57,22 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -109,21 +81,21 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
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.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", org.apache.thrift.TFieldRequirementType.REQUIRED,
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, TMutation.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRowMutations.class, metaDataMap);
}
@ -131,8 +103,8 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
}
public TRowMutations(
ByteBuffer row,
List<TMutation> mutations)
java.nio.ByteBuffer row,
java.util.List<TMutation> mutations)
{
this();
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
@ -147,7 +119,7 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
if (other.isSetMutations()) {
List<TMutation> __this__mutations = new ArrayList<TMutation>(other.mutations.size());
java.util.List<TMutation> __this__mutations = new java.util.ArrayList<TMutation>(other.mutations.size());
for (TMutation other_element : other.mutations) {
__this__mutations.add(new TMutation(other_element));
}
@ -170,16 +142,16 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
return row == null ? null : row.array();
}
public ByteBuffer bufferForRow() {
public java.nio.ByteBuffer bufferForRow() {
return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TRowMutations setRow(byte[] row) {
this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
this.row = row == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(row.clone());
return this;
}
public TRowMutations setRow(ByteBuffer row) {
public TRowMutations setRow(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer row) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@ -203,22 +175,24 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
return (this.mutations == null) ? 0 : this.mutations.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TMutation> getMutationsIterator() {
return (this.mutations == null) ? null : this.mutations.iterator();
}
public void addToMutations(TMutation elem) {
if (this.mutations == null) {
this.mutations = new ArrayList<TMutation>();
this.mutations = new java.util.ArrayList<TMutation>();
}
this.mutations.add(elem);
}
public List<TMutation> getMutations() {
@org.apache.thrift.annotation.Nullable
public java.util.List<TMutation> getMutations() {
return this.mutations;
}
public TRowMutations setMutations(List<TMutation> mutations) {
public TRowMutations setMutations(@org.apache.thrift.annotation.Nullable java.util.List<TMutation> mutations) {
this.mutations = mutations;
return this;
}
@ -238,13 +212,17 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
} else {
setRow((ByteBuffer)value);
if (value instanceof byte[]) {
setRow((byte[])value);
} else {
setRow((java.nio.ByteBuffer)value);
}
}
break;
@ -252,14 +230,15 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
if (value == null) {
unsetMutations();
} else {
setMutations((List<TMutation>)value);
setMutations((java.util.List<TMutation>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
@ -268,13 +247,13 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
return getMutations();
}
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) {
@ -283,11 +262,11 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
case MUTATIONS:
return isSetMutations();
}
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 TRowMutations)
@ -298,6 +277,8 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
public boolean equals(TRowMutations that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_row = true && this.isSetRow();
boolean that_present_row = true && that.isSetRow();
@ -322,19 +303,17 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_row = true && (isSetRow());
list.add(present_row);
if (present_row)
list.add(row);
hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287);
if (isSetRow())
hashCode = hashCode * 8191 + row.hashCode();
boolean present_mutations = true && (isSetMutations());
list.add(present_mutations);
if (present_mutations)
list.add(mutations);
hashCode = hashCode * 8191 + ((isSetMutations()) ? 131071 : 524287);
if (isSetMutations())
hashCode = hashCode * 8191 + mutations.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -345,7 +324,7 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = java.lang.Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
@ -355,7 +334,7 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMutations()).compareTo(other.isSetMutations());
lastComparison = java.lang.Boolean.valueOf(isSetMutations()).compareTo(other.isSetMutations());
if (lastComparison != 0) {
return lastComparison;
}
@ -368,21 +347,22 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TRowMutations(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TRowMutations(");
boolean first = true;
sb.append("row:");
@ -423,7 +403,7 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@ -431,13 +411,13 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
}
}
private static class TRowMutationsStandardSchemeFactory implements SchemeFactory {
private static class TRowMutationsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRowMutationsStandardScheme getScheme() {
return new TRowMutationsStandardScheme();
}
}
private static class TRowMutationsStandardScheme extends StandardScheme<TRowMutations> {
private static class TRowMutationsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRowMutations> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TRowMutations struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -461,8 +441,8 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list134 = iprot.readListBegin();
struct.mutations = new ArrayList<TMutation>(_list134.size);
TMutation _elem135;
struct.mutations = new java.util.ArrayList<TMutation>(_list134.size);
@org.apache.thrift.annotation.Nullable TMutation _elem135;
for (int _i136 = 0; _i136 < _list134.size; ++_i136)
{
_elem135 = new TMutation();
@ -514,17 +494,17 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
}
private static class TRowMutationsTupleSchemeFactory implements SchemeFactory {
private static class TRowMutationsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRowMutationsTupleScheme getScheme() {
return new TRowMutationsTupleScheme();
}
}
private static class TRowMutationsTupleScheme extends TupleScheme<TRowMutations> {
private static class TRowMutationsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRowMutations> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRowMutations struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.row);
{
oprot.writeI32(struct.mutations.size());
@ -537,13 +517,13 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TRowMutations struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
{
org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.mutations = new ArrayList<TMutation>(_list139.size);
TMutation _elem140;
struct.mutations = new java.util.ArrayList<TMutation>(_list139.size);
@org.apache.thrift.annotation.Nullable TMutation _elem140;
for (int _i141 = 0; _i141 < _list139.size; ++_i141)
{
_elem140 = new TMutation();
@ -555,5 +535,8 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
}
}
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();
}
}

View File

@ -1,40 +1,13 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TServerName implements org.apache.thrift.TBase<TServerName, TServerName._Fields>, java.io.Serializable, Cloneable, Comparable<TServerName> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TServerName");
@ -42,13 +15,10 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField START_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("startCode", org.apache.thrift.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TServerNameStandardSchemeFactory());
schemes.put(TupleScheme.class, new TServerNameTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TServerNameStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TServerNameTupleSchemeFactory();
public String hostName; // required
public @org.apache.thrift.annotation.Nullable java.lang.String hostName; // required
public int port; // optional
public long startCode; // optional
@ -58,10 +28,10 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
PORT((short)2, "port"),
START_CODE((short)3, "startCode");
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);
}
}
@ -69,6 +39,7 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // HOST_NAME
@ -88,21 +59,22 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -111,7 +83,7 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -121,16 +93,16 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
private static final int __STARTCODE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.PORT,_Fields.START_CODE};
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.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.START_CODE, new org.apache.thrift.meta_data.FieldMetaData("startCode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TServerName.class, metaDataMap);
}
@ -138,7 +110,7 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
}
public TServerName(
String hostName)
java.lang.String hostName)
{
this();
this.hostName = hostName;
@ -169,11 +141,12 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
this.startCode = 0;
}
public String getHostName() {
@org.apache.thrift.annotation.Nullable
public java.lang.String getHostName() {
return this.hostName;
}
public TServerName setHostName(String hostName) {
public TServerName setHostName(@org.apache.thrift.annotation.Nullable java.lang.String hostName) {
this.hostName = hostName;
return this;
}
@ -204,16 +177,16 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
}
public void unsetPort() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean isSetPort() {
return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void setPortIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
public long getStartCode() {
@ -227,25 +200,25 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
}
public void unsetStartCode() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTCODE_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTCODE_ISSET_ID);
}
/** Returns true if field startCode is set (has been assigned a value) and false otherwise */
public boolean isSetStartCode() {
return EncodingUtils.testBit(__isset_bitfield, __STARTCODE_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTCODE_ISSET_ID);
}
public void setStartCodeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTCODE_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTCODE_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case HOST_NAME:
if (value == null) {
unsetHostName();
} else {
setHostName((String)value);
setHostName((java.lang.String)value);
}
break;
@ -253,7 +226,7 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
if (value == null) {
unsetPort();
} else {
setPort((Integer)value);
setPort((java.lang.Integer)value);
}
break;
@ -261,14 +234,15 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
if (value == null) {
unsetStartCode();
} else {
setStartCode((Long)value);
setStartCode((java.lang.Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HOST_NAME:
return getHostName();
@ -280,13 +254,13 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
return getStartCode();
}
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) {
@ -297,11 +271,11 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
case START_CODE:
return isSetStartCode();
}
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 TServerName)
@ -312,6 +286,8 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
public boolean equals(TServerName that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_hostName = true && this.isSetHostName();
boolean that_present_hostName = true && that.isSetHostName();
@ -345,24 +321,21 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_hostName = true && (isSetHostName());
list.add(present_hostName);
if (present_hostName)
list.add(hostName);
hashCode = hashCode * 8191 + ((isSetHostName()) ? 131071 : 524287);
if (isSetHostName())
hashCode = hashCode * 8191 + hostName.hashCode();
boolean present_port = true && (isSetPort());
list.add(present_port);
if (present_port)
list.add(port);
hashCode = hashCode * 8191 + ((isSetPort()) ? 131071 : 524287);
if (isSetPort())
hashCode = hashCode * 8191 + port;
boolean present_startCode = true && (isSetStartCode());
list.add(present_startCode);
if (present_startCode)
list.add(startCode);
hashCode = hashCode * 8191 + ((isSetStartCode()) ? 131071 : 524287);
if (isSetStartCode())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startCode);
return list.hashCode();
return hashCode;
}
@Override
@ -373,7 +346,7 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetHostName()).compareTo(other.isSetHostName());
lastComparison = java.lang.Boolean.valueOf(isSetHostName()).compareTo(other.isSetHostName());
if (lastComparison != 0) {
return lastComparison;
}
@ -383,7 +356,7 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
lastComparison = java.lang.Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
if (lastComparison != 0) {
return lastComparison;
}
@ -393,7 +366,7 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartCode()).compareTo(other.isSetStartCode());
lastComparison = java.lang.Boolean.valueOf(isSetStartCode()).compareTo(other.isSetStartCode());
if (lastComparison != 0) {
return lastComparison;
}
@ -406,21 +379,22 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TServerName(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TServerName(");
boolean first = true;
sb.append("hostName:");
@ -462,7 +436,7 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
}
}
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;
@ -472,13 +446,13 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
}
}
private static class TServerNameStandardSchemeFactory implements SchemeFactory {
private static class TServerNameStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TServerNameStandardScheme getScheme() {
return new TServerNameStandardScheme();
}
}
private static class TServerNameStandardScheme extends StandardScheme<TServerName> {
private static class TServerNameStandardScheme extends org.apache.thrift.scheme.StandardScheme<TServerName> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TServerName struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -550,19 +524,19 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
}
private static class TServerNameTupleSchemeFactory implements SchemeFactory {
private static class TServerNameTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TServerNameTupleScheme getScheme() {
return new TServerNameTupleScheme();
}
}
private static class TServerNameTupleScheme extends TupleScheme<TServerName> {
private static class TServerNameTupleScheme extends org.apache.thrift.scheme.TupleScheme<TServerName> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TServerName struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.hostName);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetPort()) {
optionals.set(0);
}
@ -580,10 +554,10 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TServerName struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.hostName = iprot.readString();
struct.setHostNameIsSet(true);
BitSet incoming = iprot.readBitSet(2);
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.port = iprot.readI32();
struct.setPortIsSet(true);
@ -595,5 +569,8 @@ public class TServerName implements org.apache.thrift.TBase<TServerName, TServer
}
}
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();
}
}

View File

@ -1,44 +1,17 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Thrift wrapper around
* org.apache.hadoop.hbase.client.TableDescriptor
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescriptor, TTableDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<TTableDescriptor> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableDescriptor");
@ -47,20 +20,17 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)3);
private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TTableDescriptorStandardSchemeFactory());
schemes.put(TupleScheme.class, new TTableDescriptorTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TTableDescriptorStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TTableDescriptorTupleSchemeFactory();
public TTableName tableName; // required
public List<TColumnFamilyDescriptor> columns; // optional
public Map<ByteBuffer,ByteBuffer> attributes; // optional
public @org.apache.thrift.annotation.Nullable TTableName tableName; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TColumnFamilyDescriptor> columns; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes; // optional
/**
*
* @see TDurability
*/
public TDurability durability; // optional
public @org.apache.thrift.annotation.Nullable TDurability durability; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@ -73,10 +43,10 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
*/
DURABILITY((short)4, "durability");
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);
}
}
@ -84,6 +54,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // TABLE_NAME
@ -105,21 +76,22 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -128,16 +100,16 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.ATTRIBUTES,_Fields.DURABILITY};
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.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class)));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@ -149,7 +121,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.DURABILITY, new org.apache.thrift.meta_data.FieldMetaData("durability", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDurability.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTableDescriptor.class, metaDataMap);
}
@ -171,14 +143,14 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
this.tableName = new TTableName(other.tableName);
}
if (other.isSetColumns()) {
List<TColumnFamilyDescriptor> __this__columns = new ArrayList<TColumnFamilyDescriptor>(other.columns.size());
java.util.List<TColumnFamilyDescriptor> __this__columns = new java.util.ArrayList<TColumnFamilyDescriptor>(other.columns.size());
for (TColumnFamilyDescriptor other_element : other.columns) {
__this__columns.add(new TColumnFamilyDescriptor(other_element));
}
this.columns = __this__columns;
}
if (other.isSetAttributes()) {
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> __this__attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(other.attributes);
this.attributes = __this__attributes;
}
if (other.isSetDurability()) {
@ -198,11 +170,12 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
this.durability = null;
}
@org.apache.thrift.annotation.Nullable
public TTableName getTableName() {
return this.tableName;
}
public TTableDescriptor setTableName(TTableName tableName) {
public TTableDescriptor setTableName(@org.apache.thrift.annotation.Nullable TTableName tableName) {
this.tableName = tableName;
return this;
}
@ -226,22 +199,24 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
return (this.columns == null) ? 0 : this.columns.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TColumnFamilyDescriptor> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
public void addToColumns(TColumnFamilyDescriptor elem) {
if (this.columns == null) {
this.columns = new ArrayList<TColumnFamilyDescriptor>();
this.columns = new java.util.ArrayList<TColumnFamilyDescriptor>();
}
this.columns.add(elem);
}
public List<TColumnFamilyDescriptor> getColumns() {
@org.apache.thrift.annotation.Nullable
public java.util.List<TColumnFamilyDescriptor> getColumns() {
return this.columns;
}
public TTableDescriptor setColumns(List<TColumnFamilyDescriptor> columns) {
public TTableDescriptor setColumns(@org.apache.thrift.annotation.Nullable java.util.List<TColumnFamilyDescriptor> columns) {
this.columns = columns;
return this;
}
@ -265,18 +240,19 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
return (this.attributes == null) ? 0 : this.attributes.size();
}
public void putToAttributes(ByteBuffer key, ByteBuffer val) {
public void putToAttributes(java.nio.ByteBuffer key, java.nio.ByteBuffer val) {
if (this.attributes == null) {
this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
this.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>();
}
this.attributes.put(key, val);
}
public Map<ByteBuffer,ByteBuffer> getAttributes() {
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> getAttributes() {
return this.attributes;
}
public TTableDescriptor setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
public TTableDescriptor setAttributes(@org.apache.thrift.annotation.Nullable java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer> attributes) {
this.attributes = attributes;
return this;
}
@ -300,6 +276,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
*
* @see TDurability
*/
@org.apache.thrift.annotation.Nullable
public TDurability getDurability() {
return this.durability;
}
@ -308,7 +285,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
*
* @see TDurability
*/
public TTableDescriptor setDurability(TDurability durability) {
public TTableDescriptor setDurability(@org.apache.thrift.annotation.Nullable TDurability durability) {
this.durability = durability;
return this;
}
@ -328,7 +305,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TABLE_NAME:
if (value == null) {
@ -342,7 +319,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
if (value == null) {
unsetColumns();
} else {
setColumns((List<TColumnFamilyDescriptor>)value);
setColumns((java.util.List<TColumnFamilyDescriptor>)value);
}
break;
@ -350,7 +327,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
if (value == null) {
unsetAttributes();
} else {
setAttributes((Map<ByteBuffer,ByteBuffer>)value);
setAttributes((java.util.Map<java.nio.ByteBuffer,java.nio.ByteBuffer>)value);
}
break;
@ -365,7 +342,8 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TABLE_NAME:
return getTableName();
@ -380,13 +358,13 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
return getDurability();
}
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) {
@ -399,11 +377,11 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
case DURABILITY:
return isSetDurability();
}
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 TTableDescriptor)
@ -414,6 +392,8 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
public boolean equals(TTableDescriptor that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
@ -456,29 +436,25 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
if (present_tableName)
list.add(tableName);
hashCode = hashCode * 8191 + ((isSetTableName()) ? 131071 : 524287);
if (isSetTableName())
hashCode = hashCode * 8191 + tableName.hashCode();
boolean present_columns = true && (isSetColumns());
list.add(present_columns);
if (present_columns)
list.add(columns);
hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
if (isSetColumns())
hashCode = hashCode * 8191 + columns.hashCode();
boolean present_attributes = true && (isSetAttributes());
list.add(present_attributes);
if (present_attributes)
list.add(attributes);
hashCode = hashCode * 8191 + ((isSetAttributes()) ? 131071 : 524287);
if (isSetAttributes())
hashCode = hashCode * 8191 + attributes.hashCode();
boolean present_durability = true && (isSetDurability());
list.add(present_durability);
if (present_durability)
list.add(durability.getValue());
hashCode = hashCode * 8191 + ((isSetDurability()) ? 131071 : 524287);
if (isSetDurability())
hashCode = hashCode * 8191 + durability.getValue();
return list.hashCode();
return hashCode;
}
@Override
@ -489,7 +465,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
lastComparison = java.lang.Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
@ -499,7 +475,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@ -509,7 +485,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
lastComparison = java.lang.Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
@ -519,7 +495,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
lastComparison = java.lang.Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
@ -532,21 +508,22 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TTableDescriptor(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TTableDescriptor(");
boolean first = true;
sb.append("tableName:");
@ -609,7 +586,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
}
}
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) {
@ -617,13 +594,13 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
}
}
private static class TTableDescriptorStandardSchemeFactory implements SchemeFactory {
private static class TTableDescriptorStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTableDescriptorStandardScheme getScheme() {
return new TTableDescriptorStandardScheme();
}
}
private static class TTableDescriptorStandardScheme extends StandardScheme<TTableDescriptor> {
private static class TTableDescriptorStandardScheme extends org.apache.thrift.scheme.StandardScheme<TTableDescriptor> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TTableDescriptor struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -648,8 +625,8 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list162 = iprot.readListBegin();
struct.columns = new ArrayList<TColumnFamilyDescriptor>(_list162.size);
TColumnFamilyDescriptor _elem163;
struct.columns = new java.util.ArrayList<TColumnFamilyDescriptor>(_list162.size);
@org.apache.thrift.annotation.Nullable TColumnFamilyDescriptor _elem163;
for (int _i164 = 0; _i164 < _list162.size; ++_i164)
{
_elem163 = new TColumnFamilyDescriptor();
@ -667,9 +644,9 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map165 = iprot.readMapBegin();
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map165.size);
ByteBuffer _key166;
ByteBuffer _val167;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map165.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key166;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val167;
for (int _i168 = 0; _i168 < _map165.size; ++_i168)
{
_key166 = iprot.readBinary();
@ -730,7 +707,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
for (Map.Entry<ByteBuffer, ByteBuffer> _iter170 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter170 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter170.getKey());
oprot.writeBinary(_iter170.getValue());
@ -753,19 +730,19 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
}
private static class TTableDescriptorTupleSchemeFactory implements SchemeFactory {
private static class TTableDescriptorTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTableDescriptorTupleScheme getScheme() {
return new TTableDescriptorTupleScheme();
}
}
private static class TTableDescriptorTupleScheme extends TupleScheme<TTableDescriptor> {
private static class TTableDescriptorTupleScheme extends org.apache.thrift.scheme.TupleScheme<TTableDescriptor> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TTableDescriptor struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tableName.write(oprot);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetColumns()) {
optionals.set(0);
}
@ -788,7 +765,7 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
for (Map.Entry<ByteBuffer, ByteBuffer> _iter172 : struct.attributes.entrySet())
for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter172 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter172.getKey());
oprot.writeBinary(_iter172.getValue());
@ -802,16 +779,16 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TTableDescriptor struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tableName = new TTableName();
struct.tableName.read(iprot);
struct.setTableNameIsSet(true);
BitSet incoming = iprot.readBitSet(3);
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list173 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<TColumnFamilyDescriptor>(_list173.size);
TColumnFamilyDescriptor _elem174;
struct.columns = new java.util.ArrayList<TColumnFamilyDescriptor>(_list173.size);
@org.apache.thrift.annotation.Nullable TColumnFamilyDescriptor _elem174;
for (int _i175 = 0; _i175 < _list173.size; ++_i175)
{
_elem174 = new TColumnFamilyDescriptor();
@ -824,9 +801,9 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map176 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map176.size);
ByteBuffer _key177;
ByteBuffer _val178;
struct.attributes = new java.util.HashMap<java.nio.ByteBuffer,java.nio.ByteBuffer>(2*_map176.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _key177;
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _val178;
for (int _i179 = 0; _i179 < _map176.size; ++_i179)
{
_key177 = iprot.readBinary();
@ -843,5 +820,8 @@ public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescripto
}
}
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();
}
}

View File

@ -1,64 +1,34 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Thrift wrapper around
* org.apache.hadoop.hbase.TableName
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TTableName implements org.apache.thrift.TBase<TTableName, TTableName._Fields>, java.io.Serializable, Cloneable, Comparable<TTableName> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableName");
private static final org.apache.thrift.protocol.TField NS_FIELD_DESC = new org.apache.thrift.protocol.TField("ns", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField QUALIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifier", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TTableNameStandardSchemeFactory());
schemes.put(TupleScheme.class, new TTableNameTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TTableNameStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TTableNameTupleSchemeFactory();
/**
* namespace name
*/
public ByteBuffer ns; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer ns; // optional
/**
* tablename
*/
public ByteBuffer qualifier; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer qualifier; // 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 {
@ -71,10 +41,10 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
*/
QUALIFIER((short)2, "qualifier");
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);
}
}
@ -82,6 +52,7 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // NS
@ -99,21 +70,22 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
*/
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) {
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
private final java.lang.String _fieldName;
_Fields(short thriftId, String fieldName) {
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@ -122,21 +94,21 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.NS};
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.NS, new org.apache.thrift.meta_data.FieldMetaData("ns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUALIFIER, new org.apache.thrift.meta_data.FieldMetaData("qualifier", org.apache.thrift.TFieldRequirementType.REQUIRED,
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(TTableName.class, metaDataMap);
}
@ -144,7 +116,7 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
}
public TTableName(
ByteBuffer qualifier)
java.nio.ByteBuffer qualifier)
{
this();
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
@ -180,7 +152,7 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
return ns == null ? null : ns.array();
}
public ByteBuffer bufferForNs() {
public java.nio.ByteBuffer bufferForNs() {
return org.apache.thrift.TBaseHelper.copyBinary(ns);
}
@ -188,11 +160,11 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
* namespace name
*/
public TTableName setNs(byte[] ns) {
this.ns = ns == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(ns, ns.length));
this.ns = ns == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(ns.clone());
return this;
}
public TTableName setNs(ByteBuffer ns) {
public TTableName setNs(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer ns) {
this.ns = org.apache.thrift.TBaseHelper.copyBinary(ns);
return this;
}
@ -220,7 +192,7 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
return qualifier == null ? null : qualifier.array();
}
public ByteBuffer bufferForQualifier() {
public java.nio.ByteBuffer bufferForQualifier() {
return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
@ -228,11 +200,11 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
* tablename
*/
public TTableName setQualifier(byte[] qualifier) {
this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
this.qualifier = qualifier == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(qualifier.clone());
return this;
}
public TTableName setQualifier(ByteBuffer qualifier) {
public TTableName setQualifier(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer qualifier) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
@ -252,13 +224,17 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
}
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NS:
if (value == null) {
unsetNs();
} else {
setNs((ByteBuffer)value);
if (value instanceof byte[]) {
setNs((byte[])value);
} else {
setNs((java.nio.ByteBuffer)value);
}
}
break;
@ -266,14 +242,19 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
if (value == null) {
unsetQualifier();
} else {
setQualifier((ByteBuffer)value);
if (value instanceof byte[]) {
setQualifier((byte[])value);
} else {
setQualifier((java.nio.ByteBuffer)value);
}
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NS:
return getNs();
@ -282,13 +263,13 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
return getQualifier();
}
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) {
@ -297,11 +278,11 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
case QUALIFIER:
return isSetQualifier();
}
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 TTableName)
@ -312,6 +293,8 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
public boolean equals(TTableName that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_ns = true && this.isSetNs();
boolean that_present_ns = true && that.isSetNs();
@ -336,19 +319,17 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_ns = true && (isSetNs());
list.add(present_ns);
if (present_ns)
list.add(ns);
hashCode = hashCode * 8191 + ((isSetNs()) ? 131071 : 524287);
if (isSetNs())
hashCode = hashCode * 8191 + ns.hashCode();
boolean present_qualifier = true && (isSetQualifier());
list.add(present_qualifier);
if (present_qualifier)
list.add(qualifier);
hashCode = hashCode * 8191 + ((isSetQualifier()) ? 131071 : 524287);
if (isSetQualifier())
hashCode = hashCode * 8191 + qualifier.hashCode();
return list.hashCode();
return hashCode;
}
@Override
@ -359,7 +340,7 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetNs()).compareTo(other.isSetNs());
lastComparison = java.lang.Boolean.valueOf(isSetNs()).compareTo(other.isSetNs());
if (lastComparison != 0) {
return lastComparison;
}
@ -369,7 +350,7 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
lastComparison = java.lang.Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
@ -382,21 +363,22 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TTableName(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TTableName(");
boolean first = true;
if (isSetNs()) {
@ -436,7 +418,7 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
}
}
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) {
@ -444,13 +426,13 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
}
}
private static class TTableNameStandardSchemeFactory implements SchemeFactory {
private static class TTableNameStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTableNameStandardScheme getScheme() {
return new TTableNameStandardScheme();
}
}
private static class TTableNameStandardScheme extends StandardScheme<TTableName> {
private static class TTableNameStandardScheme extends org.apache.thrift.scheme.StandardScheme<TTableName> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TTableName struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -511,19 +493,19 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
}
private static class TTableNameTupleSchemeFactory implements SchemeFactory {
private static class TTableNameTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTableNameTupleScheme getScheme() {
return new TTableNameTupleScheme();
}
}
private static class TTableNameTupleScheme extends TupleScheme<TTableName> {
private static class TTableNameTupleScheme extends org.apache.thrift.scheme.TupleScheme<TTableName> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TTableName struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.qualifier);
BitSet optionals = new BitSet();
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetNs()) {
optionals.set(0);
}
@ -535,10 +517,10 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TTableName struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.qualifier = iprot.readBinary();
struct.setQualifierIsSet(true);
BitSet incoming = iprot.readBitSet(1);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ns = iprot.readBinary();
struct.setNsIsSet(true);
@ -546,5 +528,8 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
}
}
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();
}
}

View File

@ -1,51 +1,21 @@
/**
* Autogenerated by Thrift Compiler (0.9.3)
* Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
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"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-01-03")
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-01-27")
public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRange._Fields>, java.io.Serializable, Cloneable, Comparable<TTimeRange> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTimeRange");
private static final org.apache.thrift.protocol.TField MIN_STAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("minStamp", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField MAX_STAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("maxStamp", 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 TTimeRangeStandardSchemeFactory());
schemes.put(TupleScheme.class, new TTimeRangeTupleSchemeFactory());
}
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TTimeRangeStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TTimeRangeTupleSchemeFactory();
public long minStamp; // required
public long maxStamp; // required
@ -55,10 +25,10 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
MIN_STAMP((short)1, "minStamp"),
MAX_STAMP((short)2, "maxStamp");
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);
}
}
@ -66,6 +36,7 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // MIN_STAMP
@ -83,21 +54,22 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
*/
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) {
@org.apache.thrift.annotation.Nullable
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;
}
@ -106,7 +78,7 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
return _thriftId;
}
public String getFieldName() {
public java.lang.String getFieldName() {
return _fieldName;
}
}
@ -115,14 +87,14 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
private static final int __MINSTAMP_ISSET_ID = 0;
private static final int __MAXSTAMP_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.MIN_STAMP, new org.apache.thrift.meta_data.FieldMetaData("minStamp", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.MAX_STAMP, new org.apache.thrift.meta_data.FieldMetaData("maxStamp", org.apache.thrift.TFieldRequirementType.REQUIRED,
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(TTimeRange.class, metaDataMap);
}
@ -172,16 +144,16 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
}
public void unsetMinStamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MINSTAMP_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MINSTAMP_ISSET_ID);
}
/** Returns true if field minStamp is set (has been assigned a value) and false otherwise */
public boolean isSetMinStamp() {
return EncodingUtils.testBit(__isset_bitfield, __MINSTAMP_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MINSTAMP_ISSET_ID);
}
public void setMinStampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MINSTAMP_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MINSTAMP_ISSET_ID, value);
}
public long getMaxStamp() {
@ -195,25 +167,25 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
}
public void unsetMaxStamp() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXSTAMP_ISSET_ID);
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXSTAMP_ISSET_ID);
}
/** Returns true if field maxStamp is set (has been assigned a value) and false otherwise */
public boolean isSetMaxStamp() {
return EncodingUtils.testBit(__isset_bitfield, __MAXSTAMP_ISSET_ID);
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXSTAMP_ISSET_ID);
}
public void setMaxStampIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXSTAMP_ISSET_ID, value);
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXSTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MIN_STAMP:
if (value == null) {
unsetMinStamp();
} else {
setMinStamp((Long)value);
setMinStamp((java.lang.Long)value);
}
break;
@ -221,14 +193,15 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
if (value == null) {
unsetMaxStamp();
} else {
setMaxStamp((Long)value);
setMaxStamp((java.lang.Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MIN_STAMP:
return getMinStamp();
@ -237,13 +210,13 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
return getMaxStamp();
}
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) {
@ -252,11 +225,11 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
case MAX_STAMP:
return isSetMaxStamp();
}
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 TTimeRange)
@ -267,6 +240,8 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
public boolean equals(TTimeRange that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_minStamp = true;
boolean that_present_minStamp = true;
@ -291,19 +266,13 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
int hashCode = 1;
boolean present_minStamp = true;
list.add(present_minStamp);
if (present_minStamp)
list.add(minStamp);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(minStamp);
boolean present_maxStamp = true;
list.add(present_maxStamp);
if (present_maxStamp)
list.add(maxStamp);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(maxStamp);
return list.hashCode();
return hashCode;
}
@Override
@ -314,7 +283,7 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetMinStamp()).compareTo(other.isSetMinStamp());
lastComparison = java.lang.Boolean.valueOf(isSetMinStamp()).compareTo(other.isSetMinStamp());
if (lastComparison != 0) {
return lastComparison;
}
@ -324,7 +293,7 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMaxStamp()).compareTo(other.isSetMaxStamp());
lastComparison = java.lang.Boolean.valueOf(isSetMaxStamp()).compareTo(other.isSetMaxStamp());
if (lastComparison != 0) {
return lastComparison;
}
@ -337,21 +306,22 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
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("TTimeRange(");
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TTimeRange(");
boolean first = true;
sb.append("minStamp:");
@ -380,7 +350,7 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
}
}
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;
@ -390,13 +360,13 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
}
}
private static class TTimeRangeStandardSchemeFactory implements SchemeFactory {
private static class TTimeRangeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTimeRangeStandardScheme getScheme() {
return new TTimeRangeStandardScheme();
}
}
private static class TTimeRangeStandardScheme extends StandardScheme<TTimeRange> {
private static class TTimeRangeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TTimeRange> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TTimeRange struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@ -457,24 +427,24 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
}
private static class TTimeRangeTupleSchemeFactory implements SchemeFactory {
private static class TTimeRangeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTimeRangeTupleScheme getScheme() {
return new TTimeRangeTupleScheme();
}
}
private static class TTimeRangeTupleScheme extends TupleScheme<TTimeRange> {
private static class TTimeRangeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TTimeRange> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TTimeRange struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.minStamp);
oprot.writeI64(struct.maxStamp);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TTimeRange struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.minStamp = iprot.readI64();
struct.setMinStampIsSet(true);
struct.maxStamp = iprot.readI64();
@ -482,5 +452,8 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
}
}
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();
}
}

View File

@ -1446,7 +1446,7 @@
<external.protobuf.version>2.5.0</external.protobuf.version>
<protobuf.plugin.version>0.5.0</protobuf.plugin.version>
<thrift.path>thrift</thrift.path>
<thrift.version>0.9.3</thrift.version>
<thrift.version>0.12.0</thrift.version>
<zookeeper.version>3.4.10</zookeeper.version>
<!-- What ZooKeeper 3.4.x depends on and nothing more -->
<jline.version>0.9.94</jline.version>