HBASE-5246 Regenerate code with thrift 0.8.0 (Scott Chen)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1234445 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fc8d2fe645
commit
da0f65de98
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -29,6 +36,12 @@ public class AlreadyExists extends Exception implements org.apache.thrift.TBase<
|
|||
|
||||
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());
|
||||
}
|
||||
|
||||
public String message; // required
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
|
@ -90,7 +103,6 @@ public class AlreadyExists extends Exception implements org.apache.thrift.TBase<
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
|
||||
public static final 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);
|
||||
|
@ -243,44 +255,11 @@ public class AlreadyExists extends Exception implements org.apache.thrift.TBase<
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // MESSAGE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.message = iprot.readString();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.message != null) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(this.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -319,5 +298,89 @@ public class AlreadyExists extends Exception implements org.apache.thrift.TBase<
|
|||
}
|
||||
}
|
||||
|
||||
private static class AlreadyExistsStandardSchemeFactory implements SchemeFactory {
|
||||
public AlreadyExistsStandardScheme getScheme() {
|
||||
return new AlreadyExistsStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class AlreadyExistsStandardScheme extends StandardScheme<AlreadyExists> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, AlreadyExists struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // MESSAGE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, AlreadyExists struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.message != null) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(struct.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class AlreadyExistsTupleSchemeFactory implements SchemeFactory {
|
||||
public AlreadyExistsTupleScheme getScheme() {
|
||||
return new AlreadyExistsTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class AlreadyExistsTupleScheme extends 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();
|
||||
if (struct.isSetMessage()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetMessage()) {
|
||||
oprot.writeString(struct.message);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -29,6 +36,12 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
|
|||
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());
|
||||
}
|
||||
|
||||
public ByteBuffer row; // required
|
||||
public List<Mutation> mutations; // required
|
||||
|
||||
|
@ -94,7 +107,6 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
|
||||
public static final 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);
|
||||
|
@ -341,74 +353,11 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.row = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // MUTATIONS
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
|
||||
this.mutations = new ArrayList<Mutation>(_list0.size);
|
||||
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
|
||||
{
|
||||
Mutation _elem2; // required
|
||||
_elem2 = new Mutation();
|
||||
_elem2.read(iprot);
|
||||
this.mutations.add(_elem2);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.mutations != null) {
|
||||
oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.mutations.size()));
|
||||
for (Mutation _iter3 : this.mutations)
|
||||
{
|
||||
_iter3.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -455,5 +404,146 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
|
|||
}
|
||||
}
|
||||
|
||||
private static class BatchMutationStandardSchemeFactory implements SchemeFactory {
|
||||
public BatchMutationStandardScheme getScheme() {
|
||||
return new BatchMutationStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class BatchMutationStandardScheme extends StandardScheme<BatchMutation> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, BatchMutation struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // MUTATIONS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
|
||||
struct.mutations = new ArrayList<Mutation>(_list0.size);
|
||||
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
|
||||
{
|
||||
Mutation _elem2; // required
|
||||
_elem2 = new Mutation();
|
||||
_elem2.read(iprot);
|
||||
struct.mutations.add(_elem2);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
struct.setMutationsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, BatchMutation struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.mutations != null) {
|
||||
oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size()));
|
||||
for (Mutation _iter3 : struct.mutations)
|
||||
{
|
||||
_iter3.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class BatchMutationTupleSchemeFactory implements SchemeFactory {
|
||||
public BatchMutationTupleScheme getScheme() {
|
||||
return new BatchMutationTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class BatchMutationTupleScheme extends 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();
|
||||
if (struct.isSetRow()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetMutations()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 2);
|
||||
if (struct.isSetRow()) {
|
||||
oprot.writeBinary(struct.row);
|
||||
}
|
||||
if (struct.isSetMutations()) {
|
||||
{
|
||||
oprot.writeI32(struct.mutations.size());
|
||||
for (Mutation _iter4 : struct.mutations)
|
||||
{
|
||||
_iter4.write(oprot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
}
|
||||
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);
|
||||
for (int _i6 = 0; _i6 < _list5.size; ++_i6)
|
||||
{
|
||||
Mutation _elem7; // required
|
||||
_elem7 = new Mutation();
|
||||
_elem7.read(iprot);
|
||||
struct.mutations.add(_elem7);
|
||||
}
|
||||
}
|
||||
struct.setMutationsIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -38,6 +45,12 @@ 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());
|
||||
}
|
||||
|
||||
public ByteBuffer name; // required
|
||||
public int maxVersions; // required
|
||||
public String compression; // required
|
||||
|
@ -138,7 +151,6 @@ 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 BitSet __isset_bit_vector = new BitSet(6);
|
||||
|
||||
public static final 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);
|
||||
|
@ -827,134 +839,11 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // NAME
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.name = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // MAX_VERSIONS
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.maxVersions = iprot.readI32();
|
||||
setMaxVersionsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // COMPRESSION
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.compression = iprot.readString();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // IN_MEMORY
|
||||
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
this.inMemory = iprot.readBool();
|
||||
setInMemoryIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 5: // BLOOM_FILTER_TYPE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.bloomFilterType = iprot.readString();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 6: // BLOOM_FILTER_VECTOR_SIZE
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.bloomFilterVectorSize = iprot.readI32();
|
||||
setBloomFilterVectorSizeIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 7: // BLOOM_FILTER_NB_HASHES
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.bloomFilterNbHashes = iprot.readI32();
|
||||
setBloomFilterNbHashesIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 8: // BLOCK_CACHE_ENABLED
|
||||
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
this.blockCacheEnabled = iprot.readBool();
|
||||
setBlockCacheEnabledIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 9: // TIME_TO_LIVE
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.timeToLive = iprot.readI32();
|
||||
setTimeToLiveIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.name != null) {
|
||||
oprot.writeFieldBegin(NAME_FIELD_DESC);
|
||||
oprot.writeBinary(this.name);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
|
||||
oprot.writeI32(this.maxVersions);
|
||||
oprot.writeFieldEnd();
|
||||
if (this.compression != null) {
|
||||
oprot.writeFieldBegin(COMPRESSION_FIELD_DESC);
|
||||
oprot.writeString(this.compression);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(IN_MEMORY_FIELD_DESC);
|
||||
oprot.writeBool(this.inMemory);
|
||||
oprot.writeFieldEnd();
|
||||
if (this.bloomFilterType != null) {
|
||||
oprot.writeFieldBegin(BLOOM_FILTER_TYPE_FIELD_DESC);
|
||||
oprot.writeString(this.bloomFilterType);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC);
|
||||
oprot.writeI32(this.bloomFilterVectorSize);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(BLOOM_FILTER_NB_HASHES_FIELD_DESC);
|
||||
oprot.writeI32(this.bloomFilterNbHashes);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(BLOCK_CACHE_ENABLED_FIELD_DESC);
|
||||
oprot.writeBool(this.blockCacheEnabled);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(TIME_TO_LIVE_FIELD_DESC);
|
||||
oprot.writeI32(this.timeToLive);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1035,5 +924,261 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
|
|||
}
|
||||
}
|
||||
|
||||
private static class ColumnDescriptorStandardSchemeFactory implements SchemeFactory {
|
||||
public ColumnDescriptorStandardScheme getScheme() {
|
||||
return new ColumnDescriptorStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class ColumnDescriptorStandardScheme extends StandardScheme<ColumnDescriptor> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnDescriptor struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // NAME
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.name = iprot.readBinary();
|
||||
struct.setNameIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // MAX_VERSIONS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.maxVersions = iprot.readI32();
|
||||
struct.setMaxVersionsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // COMPRESSION
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.compression = iprot.readString();
|
||||
struct.setCompressionIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // IN_MEMORY
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
struct.inMemory = iprot.readBool();
|
||||
struct.setInMemoryIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 5: // BLOOM_FILTER_TYPE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.bloomFilterType = iprot.readString();
|
||||
struct.setBloomFilterTypeIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 6: // BLOOM_FILTER_VECTOR_SIZE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.bloomFilterVectorSize = iprot.readI32();
|
||||
struct.setBloomFilterVectorSizeIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 7: // BLOOM_FILTER_NB_HASHES
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.bloomFilterNbHashes = iprot.readI32();
|
||||
struct.setBloomFilterNbHashesIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 8: // BLOCK_CACHE_ENABLED
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
struct.blockCacheEnabled = iprot.readBool();
|
||||
struct.setBlockCacheEnabledIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 9: // TIME_TO_LIVE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.timeToLive = iprot.readI32();
|
||||
struct.setTimeToLiveIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnDescriptor struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.name != null) {
|
||||
oprot.writeFieldBegin(NAME_FIELD_DESC);
|
||||
oprot.writeBinary(struct.name);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
|
||||
oprot.writeI32(struct.maxVersions);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.compression != null) {
|
||||
oprot.writeFieldBegin(COMPRESSION_FIELD_DESC);
|
||||
oprot.writeString(struct.compression);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(IN_MEMORY_FIELD_DESC);
|
||||
oprot.writeBool(struct.inMemory);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.bloomFilterType != null) {
|
||||
oprot.writeFieldBegin(BLOOM_FILTER_TYPE_FIELD_DESC);
|
||||
oprot.writeString(struct.bloomFilterType);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC);
|
||||
oprot.writeI32(struct.bloomFilterVectorSize);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(BLOOM_FILTER_NB_HASHES_FIELD_DESC);
|
||||
oprot.writeI32(struct.bloomFilterNbHashes);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(BLOCK_CACHE_ENABLED_FIELD_DESC);
|
||||
oprot.writeBool(struct.blockCacheEnabled);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(TIME_TO_LIVE_FIELD_DESC);
|
||||
oprot.writeI32(struct.timeToLive);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class ColumnDescriptorTupleSchemeFactory implements SchemeFactory {
|
||||
public ColumnDescriptorTupleScheme getScheme() {
|
||||
return new ColumnDescriptorTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class ColumnDescriptorTupleScheme extends 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();
|
||||
if (struct.isSetName()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetMaxVersions()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetCompression()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
if (struct.isSetInMemory()) {
|
||||
optionals.set(3);
|
||||
}
|
||||
if (struct.isSetBloomFilterType()) {
|
||||
optionals.set(4);
|
||||
}
|
||||
if (struct.isSetBloomFilterVectorSize()) {
|
||||
optionals.set(5);
|
||||
}
|
||||
if (struct.isSetBloomFilterNbHashes()) {
|
||||
optionals.set(6);
|
||||
}
|
||||
if (struct.isSetBlockCacheEnabled()) {
|
||||
optionals.set(7);
|
||||
}
|
||||
if (struct.isSetTimeToLive()) {
|
||||
optionals.set(8);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 9);
|
||||
if (struct.isSetName()) {
|
||||
oprot.writeBinary(struct.name);
|
||||
}
|
||||
if (struct.isSetMaxVersions()) {
|
||||
oprot.writeI32(struct.maxVersions);
|
||||
}
|
||||
if (struct.isSetCompression()) {
|
||||
oprot.writeString(struct.compression);
|
||||
}
|
||||
if (struct.isSetInMemory()) {
|
||||
oprot.writeBool(struct.inMemory);
|
||||
}
|
||||
if (struct.isSetBloomFilterType()) {
|
||||
oprot.writeString(struct.bloomFilterType);
|
||||
}
|
||||
if (struct.isSetBloomFilterVectorSize()) {
|
||||
oprot.writeI32(struct.bloomFilterVectorSize);
|
||||
}
|
||||
if (struct.isSetBloomFilterNbHashes()) {
|
||||
oprot.writeI32(struct.bloomFilterNbHashes);
|
||||
}
|
||||
if (struct.isSetBlockCacheEnabled()) {
|
||||
oprot.writeBool(struct.blockCacheEnabled);
|
||||
}
|
||||
if (struct.isSetTimeToLive()) {
|
||||
oprot.writeI32(struct.timeToLive);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.name = iprot.readBinary();
|
||||
struct.setNameIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.maxVersions = iprot.readI32();
|
||||
struct.setMaxVersionsIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.compression = iprot.readString();
|
||||
struct.setCompressionIsSet(true);
|
||||
}
|
||||
if (incoming.get(3)) {
|
||||
struct.inMemory = iprot.readBool();
|
||||
struct.setInMemoryIsSet(true);
|
||||
}
|
||||
if (incoming.get(4)) {
|
||||
struct.bloomFilterType = iprot.readString();
|
||||
struct.setBloomFilterTypeIsSet(true);
|
||||
}
|
||||
if (incoming.get(5)) {
|
||||
struct.bloomFilterVectorSize = iprot.readI32();
|
||||
struct.setBloomFilterVectorSizeIsSet(true);
|
||||
}
|
||||
if (incoming.get(6)) {
|
||||
struct.bloomFilterNbHashes = iprot.readI32();
|
||||
struct.setBloomFilterNbHashesIsSet(true);
|
||||
}
|
||||
if (incoming.get(7)) {
|
||||
struct.blockCacheEnabled = iprot.readBool();
|
||||
struct.setBlockCacheEnabledIsSet(true);
|
||||
}
|
||||
if (incoming.get(8)) {
|
||||
struct.timeToLive = iprot.readI32();
|
||||
struct.setTimeToLiveIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -30,6 +37,12 @@ public class IOError extends Exception implements org.apache.thrift.TBase<IOErro
|
|||
|
||||
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());
|
||||
}
|
||||
|
||||
public String message; // required
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
|
@ -91,7 +104,6 @@ public class IOError extends Exception implements org.apache.thrift.TBase<IOErro
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
|
||||
public static final 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);
|
||||
|
@ -244,44 +256,11 @@ public class IOError extends Exception implements org.apache.thrift.TBase<IOErro
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // MESSAGE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.message = iprot.readString();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.message != null) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(this.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -320,5 +299,89 @@ public class IOError extends Exception implements org.apache.thrift.TBase<IOErro
|
|||
}
|
||||
}
|
||||
|
||||
private static class IOErrorStandardSchemeFactory implements SchemeFactory {
|
||||
public IOErrorStandardScheme getScheme() {
|
||||
return new IOErrorStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class IOErrorStandardScheme extends StandardScheme<IOError> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, IOError struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // MESSAGE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, IOError struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.message != null) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(struct.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class IOErrorTupleSchemeFactory implements SchemeFactory {
|
||||
public IOErrorTupleScheme getScheme() {
|
||||
return new IOErrorTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class IOErrorTupleScheme extends 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();
|
||||
if (struct.isSetMessage()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetMessage()) {
|
||||
oprot.writeString(struct.message);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -29,6 +36,12 @@ public class IllegalArgument extends Exception implements org.apache.thrift.TBas
|
|||
|
||||
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());
|
||||
}
|
||||
|
||||
public String message; // required
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
|
@ -90,7 +103,6 @@ public class IllegalArgument extends Exception implements org.apache.thrift.TBas
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
|
||||
public static final 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);
|
||||
|
@ -243,44 +255,11 @@ public class IllegalArgument extends Exception implements org.apache.thrift.TBas
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // MESSAGE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.message = iprot.readString();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.message != null) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(this.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -319,5 +298,89 @@ public class IllegalArgument extends Exception implements org.apache.thrift.TBas
|
|||
}
|
||||
}
|
||||
|
||||
private static class IllegalArgumentStandardSchemeFactory implements SchemeFactory {
|
||||
public IllegalArgumentStandardScheme getScheme() {
|
||||
return new IllegalArgumentStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class IllegalArgumentStandardScheme extends StandardScheme<IllegalArgument> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, IllegalArgument struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // MESSAGE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, IllegalArgument struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.message != null) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(struct.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class IllegalArgumentTupleSchemeFactory implements SchemeFactory {
|
||||
public IllegalArgumentTupleScheme getScheme() {
|
||||
return new IllegalArgumentTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class IllegalArgumentTupleScheme extends 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();
|
||||
if (struct.isSetMessage()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetMessage()) {
|
||||
oprot.writeString(struct.message);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -30,6 +37,12 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
|
|||
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)2);
|
||||
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 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());
|
||||
}
|
||||
|
||||
public boolean isDelete; // required
|
||||
public ByteBuffer column; // required
|
||||
public ByteBuffer value; // required
|
||||
|
@ -101,7 +114,6 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
|
|||
// isset id assignments
|
||||
private static final int __ISDELETE_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
|
||||
public static final 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);
|
||||
|
@ -405,67 +417,11 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // IS_DELETE
|
||||
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
this.isDelete = iprot.readBool();
|
||||
setIsDeleteIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMN
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.column = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // VALUE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.value = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldBegin(IS_DELETE_FIELD_DESC);
|
||||
oprot.writeBool(this.isDelete);
|
||||
oprot.writeFieldEnd();
|
||||
if (this.column != null) {
|
||||
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
|
||||
oprot.writeBinary(this.column);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.value != null) {
|
||||
oprot.writeFieldBegin(VALUE_FIELD_DESC);
|
||||
oprot.writeBinary(this.value);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -518,5 +474,133 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
|
|||
}
|
||||
}
|
||||
|
||||
private static class MutationStandardSchemeFactory implements SchemeFactory {
|
||||
public MutationStandardScheme getScheme() {
|
||||
return new MutationStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class MutationStandardScheme extends StandardScheme<Mutation> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, Mutation struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // IS_DELETE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
struct.isDelete = iprot.readBool();
|
||||
struct.setIsDeleteIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMN
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.column = iprot.readBinary();
|
||||
struct.setColumnIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // VALUE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.value = iprot.readBinary();
|
||||
struct.setValueIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, Mutation struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldBegin(IS_DELETE_FIELD_DESC);
|
||||
oprot.writeBool(struct.isDelete);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.column != null) {
|
||||
oprot.writeFieldBegin(COLUMN_FIELD_DESC);
|
||||
oprot.writeBinary(struct.column);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.value != null) {
|
||||
oprot.writeFieldBegin(VALUE_FIELD_DESC);
|
||||
oprot.writeBinary(struct.value);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class MutationTupleSchemeFactory implements SchemeFactory {
|
||||
public MutationTupleScheme getScheme() {
|
||||
return new MutationTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class MutationTupleScheme extends 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();
|
||||
if (struct.isSetIsDelete()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetColumn()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetValue()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 3);
|
||||
if (struct.isSetIsDelete()) {
|
||||
oprot.writeBool(struct.isDelete);
|
||||
}
|
||||
if (struct.isSetColumn()) {
|
||||
oprot.writeBinary(struct.column);
|
||||
}
|
||||
if (struct.isSetValue()) {
|
||||
oprot.writeBinary(struct.value);
|
||||
}
|
||||
}
|
||||
|
||||
@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(3);
|
||||
if (incoming.get(0)) {
|
||||
struct.isDelete = iprot.readBool();
|
||||
struct.setIsDeleteIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.column = iprot.readBinary();
|
||||
struct.setColumnIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.value = iprot.readBinary();
|
||||
struct.setValueIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -32,6 +39,12 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
|
|||
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());
|
||||
}
|
||||
|
||||
public ByteBuffer value; // required
|
||||
public long timestamp; // required
|
||||
|
||||
|
@ -99,7 +112,6 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
|
|||
// isset id assignments
|
||||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
|
||||
public static final 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);
|
||||
|
@ -327,55 +339,11 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // VALUE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.value = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // TIMESTAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.timestamp = iprot.readI64();
|
||||
setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.value != null) {
|
||||
oprot.writeFieldBegin(VALUE_FIELD_DESC);
|
||||
oprot.writeBinary(this.value);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -420,5 +388,110 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
|
|||
}
|
||||
}
|
||||
|
||||
private static class TCellStandardSchemeFactory implements SchemeFactory {
|
||||
public TCellStandardScheme getScheme() {
|
||||
return new TCellStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TCellStandardScheme extends StandardScheme<TCell> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TCell struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // VALUE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.value = iprot.readBinary();
|
||||
struct.setValueIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // TIMESTAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TCell struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.value != null) {
|
||||
oprot.writeFieldBegin(VALUE_FIELD_DESC);
|
||||
oprot.writeBinary(struct.value);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TCellTupleSchemeFactory implements SchemeFactory {
|
||||
public TCellTupleScheme getScheme() {
|
||||
return new TCellTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TCellTupleScheme extends 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();
|
||||
if (struct.isSetValue()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 2);
|
||||
if (struct.isSetValue()) {
|
||||
oprot.writeBinary(struct.value);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeI64(struct.timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.value = iprot.readBinary();
|
||||
struct.setValueIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -34,6 +41,12 @@ 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());
|
||||
}
|
||||
|
||||
public ByteBuffer startKey; // required
|
||||
public ByteBuffer endKey; // required
|
||||
public long id; // required
|
||||
|
@ -123,7 +136,6 @@ 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 BitSet __isset_bit_vector = new BitSet(3);
|
||||
|
||||
public static final 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);
|
||||
|
@ -699,113 +711,11 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // START_KEY
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.startKey = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // END_KEY
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.endKey = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // ID
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.id = iprot.readI64();
|
||||
setIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // NAME
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.name = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 5: // VERSION
|
||||
if (field.type == org.apache.thrift.protocol.TType.BYTE) {
|
||||
this.version = iprot.readByte();
|
||||
setVersionIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 6: // SERVER_NAME
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.serverName = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 7: // PORT
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.port = iprot.readI32();
|
||||
setPortIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.startKey != null) {
|
||||
oprot.writeFieldBegin(START_KEY_FIELD_DESC);
|
||||
oprot.writeBinary(this.startKey);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.endKey != null) {
|
||||
oprot.writeFieldBegin(END_KEY_FIELD_DESC);
|
||||
oprot.writeBinary(this.endKey);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(ID_FIELD_DESC);
|
||||
oprot.writeI64(this.id);
|
||||
oprot.writeFieldEnd();
|
||||
if (this.name != null) {
|
||||
oprot.writeFieldBegin(NAME_FIELD_DESC);
|
||||
oprot.writeBinary(this.name);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(VERSION_FIELD_DESC);
|
||||
oprot.writeByte(this.version);
|
||||
oprot.writeFieldEnd();
|
||||
if (this.serverName != null) {
|
||||
oprot.writeFieldBegin(SERVER_NAME_FIELD_DESC);
|
||||
oprot.writeBinary(this.serverName);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(PORT_FIELD_DESC);
|
||||
oprot.writeI32(this.port);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -882,5 +792,221 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
|
|||
}
|
||||
}
|
||||
|
||||
private static class TRegionInfoStandardSchemeFactory implements SchemeFactory {
|
||||
public TRegionInfoStandardScheme getScheme() {
|
||||
return new TRegionInfoStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TRegionInfoStandardScheme extends StandardScheme<TRegionInfo> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TRegionInfo struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // START_KEY
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.startKey = iprot.readBinary();
|
||||
struct.setStartKeyIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // END_KEY
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.endKey = iprot.readBinary();
|
||||
struct.setEndKeyIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // ID
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.id = iprot.readI64();
|
||||
struct.setIdIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // NAME
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.name = iprot.readBinary();
|
||||
struct.setNameIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 5: // VERSION
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
|
||||
struct.version = iprot.readByte();
|
||||
struct.setVersionIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 6: // SERVER_NAME
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.serverName = iprot.readBinary();
|
||||
struct.setServerNameIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 7: // PORT
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.port = iprot.readI32();
|
||||
struct.setPortIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TRegionInfo struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.startKey != null) {
|
||||
oprot.writeFieldBegin(START_KEY_FIELD_DESC);
|
||||
oprot.writeBinary(struct.startKey);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.endKey != null) {
|
||||
oprot.writeFieldBegin(END_KEY_FIELD_DESC);
|
||||
oprot.writeBinary(struct.endKey);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(ID_FIELD_DESC);
|
||||
oprot.writeI64(struct.id);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.name != null) {
|
||||
oprot.writeFieldBegin(NAME_FIELD_DESC);
|
||||
oprot.writeBinary(struct.name);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(VERSION_FIELD_DESC);
|
||||
oprot.writeByte(struct.version);
|
||||
oprot.writeFieldEnd();
|
||||
if (struct.serverName != null) {
|
||||
oprot.writeFieldBegin(SERVER_NAME_FIELD_DESC);
|
||||
oprot.writeBinary(struct.serverName);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldBegin(PORT_FIELD_DESC);
|
||||
oprot.writeI32(struct.port);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TRegionInfoTupleSchemeFactory implements SchemeFactory {
|
||||
public TRegionInfoTupleScheme getScheme() {
|
||||
return new TRegionInfoTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TRegionInfoTupleScheme extends 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();
|
||||
if (struct.isSetStartKey()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetEndKey()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetId()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
if (struct.isSetName()) {
|
||||
optionals.set(3);
|
||||
}
|
||||
if (struct.isSetVersion()) {
|
||||
optionals.set(4);
|
||||
}
|
||||
if (struct.isSetServerName()) {
|
||||
optionals.set(5);
|
||||
}
|
||||
if (struct.isSetPort()) {
|
||||
optionals.set(6);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 7);
|
||||
if (struct.isSetStartKey()) {
|
||||
oprot.writeBinary(struct.startKey);
|
||||
}
|
||||
if (struct.isSetEndKey()) {
|
||||
oprot.writeBinary(struct.endKey);
|
||||
}
|
||||
if (struct.isSetId()) {
|
||||
oprot.writeI64(struct.id);
|
||||
}
|
||||
if (struct.isSetName()) {
|
||||
oprot.writeBinary(struct.name);
|
||||
}
|
||||
if (struct.isSetVersion()) {
|
||||
oprot.writeByte(struct.version);
|
||||
}
|
||||
if (struct.isSetServerName()) {
|
||||
oprot.writeBinary(struct.serverName);
|
||||
}
|
||||
if (struct.isSetPort()) {
|
||||
oprot.writeI32(struct.port);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.startKey = iprot.readBinary();
|
||||
struct.setStartKeyIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.endKey = iprot.readBinary();
|
||||
struct.setEndKeyIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.id = iprot.readI64();
|
||||
struct.setIdIsSet(true);
|
||||
}
|
||||
if (incoming.get(3)) {
|
||||
struct.name = iprot.readBinary();
|
||||
struct.setNameIsSet(true);
|
||||
}
|
||||
if (incoming.get(4)) {
|
||||
struct.version = iprot.readByte();
|
||||
struct.setVersionIsSet(true);
|
||||
}
|
||||
if (incoming.get(5)) {
|
||||
struct.serverName = iprot.readBinary();
|
||||
struct.setServerNameIsSet(true);
|
||||
}
|
||||
if (incoming.get(6)) {
|
||||
struct.port = iprot.readI32();
|
||||
struct.setPortIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -29,6 +36,12 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
|
|||
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 COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", 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 TRowResultStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new TRowResultTupleSchemeFactory());
|
||||
}
|
||||
|
||||
public ByteBuffer row; // required
|
||||
public Map<ByteBuffer,TCell> columns; // required
|
||||
|
||||
|
@ -94,7 +107,6 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
|
||||
public static final 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);
|
||||
|
@ -346,77 +358,11 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.row = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMNS
|
||||
if (field.type == org.apache.thrift.protocol.TType.MAP) {
|
||||
{
|
||||
org.apache.thrift.protocol.TMap _map4 = iprot.readMapBegin();
|
||||
this.columns = new HashMap<ByteBuffer,TCell>(2*_map4.size);
|
||||
for (int _i5 = 0; _i5 < _map4.size; ++_i5)
|
||||
{
|
||||
ByteBuffer _key6; // required
|
||||
TCell _val7; // required
|
||||
_key6 = iprot.readBinary();
|
||||
_val7 = new TCell();
|
||||
_val7.read(iprot);
|
||||
this.columns.put(_key6, _val7);
|
||||
}
|
||||
iprot.readMapEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.columns != null) {
|
||||
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, this.columns.size()));
|
||||
for (Map.Entry<ByteBuffer, TCell> _iter8 : this.columns.entrySet())
|
||||
{
|
||||
oprot.writeBinary(_iter8.getKey());
|
||||
_iter8.getValue().write(oprot);
|
||||
}
|
||||
oprot.writeMapEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -463,5 +409,152 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
|
|||
}
|
||||
}
|
||||
|
||||
private static class TRowResultStandardSchemeFactory implements SchemeFactory {
|
||||
public TRowResultStandardScheme getScheme() {
|
||||
return new TRowResultStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TRowResultStandardScheme extends StandardScheme<TRowResult> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TRowResult struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMNS
|
||||
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);
|
||||
for (int _i9 = 0; _i9 < _map8.size; ++_i9)
|
||||
{
|
||||
ByteBuffer _key10; // required
|
||||
TCell _val11; // optional
|
||||
_key10 = iprot.readBinary();
|
||||
_val11 = new TCell();
|
||||
_val11.read(iprot);
|
||||
struct.columns.put(_key10, _val11);
|
||||
}
|
||||
iprot.readMapEnd();
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TRowResult struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.columns != null) {
|
||||
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> _iter12 : struct.columns.entrySet())
|
||||
{
|
||||
oprot.writeBinary(_iter12.getKey());
|
||||
_iter12.getValue().write(oprot);
|
||||
}
|
||||
oprot.writeMapEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TRowResultTupleSchemeFactory implements SchemeFactory {
|
||||
public TRowResultTupleScheme getScheme() {
|
||||
return new TRowResultTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TRowResultTupleScheme extends 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();
|
||||
if (struct.isSetRow()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetColumns()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 2);
|
||||
if (struct.isSetRow()) {
|
||||
oprot.writeBinary(struct.row);
|
||||
}
|
||||
if (struct.isSetColumns()) {
|
||||
{
|
||||
oprot.writeI32(struct.columns.size());
|
||||
for (Map.Entry<ByteBuffer, TCell> _iter13 : struct.columns.entrySet())
|
||||
{
|
||||
oprot.writeBinary(_iter13.getKey());
|
||||
_iter13.getValue().write(oprot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@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(2);
|
||||
if (incoming.get(0)) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
{
|
||||
org.apache.thrift.protocol.TMap _map14 = 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*_map14.size);
|
||||
for (int _i15 = 0; _i15 < _map14.size; ++_i15)
|
||||
{
|
||||
ByteBuffer _key16; // required
|
||||
TCell _val17; // optional
|
||||
_key16 = iprot.readBinary();
|
||||
_val17 = new TCell();
|
||||
_val17.read(iprot);
|
||||
struct.columns.put(_key16, _val17);
|
||||
}
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -33,12 +40,18 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
|||
private static final org.apache.thrift.protocol.TField CACHING_FIELD_DESC = new org.apache.thrift.protocol.TField("caching", org.apache.thrift.protocol.TType.I32, (short)5);
|
||||
private static final org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)6);
|
||||
|
||||
public ByteBuffer startRow; // required
|
||||
public ByteBuffer stopRow; // required
|
||||
public long timestamp; // required
|
||||
public List<ByteBuffer> columns; // required
|
||||
public int caching; // required
|
||||
public ByteBuffer filterString; // required
|
||||
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());
|
||||
}
|
||||
|
||||
public ByteBuffer startRow; // optional
|
||||
public ByteBuffer stopRow; // optional
|
||||
public long timestamp; // optional
|
||||
public List<ByteBuffer> columns; // optional
|
||||
public int caching; // optional
|
||||
public ByteBuffer filterString; // 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 {
|
||||
|
@ -117,7 +130,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
|||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||
private static final int __CACHING_ISSET_ID = 1;
|
||||
private BitSet __isset_bit_vector = new BitSet(2);
|
||||
|
||||
private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.TIMESTAMP,_Fields.COLUMNS,_Fields.CACHING,_Fields.FILTER_STRING};
|
||||
public static final 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);
|
||||
|
@ -621,131 +634,11 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // START_ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.startRow = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // STOP_ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.stopRow = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.timestamp = iprot.readI64();
|
||||
setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // COLUMNS
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list9 = iprot.readListBegin();
|
||||
this.columns = new ArrayList<ByteBuffer>(_list9.size);
|
||||
for (int _i10 = 0; _i10 < _list9.size; ++_i10)
|
||||
{
|
||||
ByteBuffer _elem11; // required
|
||||
_elem11 = iprot.readBinary();
|
||||
this.columns.add(_elem11);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 5: // CACHING
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.caching = iprot.readI32();
|
||||
setCachingIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 6: // FILTER_STRING
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.filterString = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.startRow != null) {
|
||||
if (isSetStartRow()) {
|
||||
oprot.writeFieldBegin(START_ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.startRow);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (this.stopRow != null) {
|
||||
if (isSetStopRow()) {
|
||||
oprot.writeFieldBegin(STOP_ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.stopRow);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.columns != null) {
|
||||
if (isSetColumns()) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.columns.size()));
|
||||
for (ByteBuffer _iter12 : this.columns)
|
||||
{
|
||||
oprot.writeBinary(_iter12);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (isSetCaching()) {
|
||||
oprot.writeFieldBegin(CACHING_FIELD_DESC);
|
||||
oprot.writeI32(this.caching);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.filterString != null) {
|
||||
if (isSetFilterString()) {
|
||||
oprot.writeFieldBegin(FILTER_STRING_FIELD_DESC);
|
||||
oprot.writeBinary(this.filterString);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -830,5 +723,244 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
|||
}
|
||||
}
|
||||
|
||||
private static class TScanStandardSchemeFactory implements SchemeFactory {
|
||||
public TScanStandardScheme getScheme() {
|
||||
return new TScanStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TScanStandardScheme extends StandardScheme<TScan> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TScan struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // START_ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.startRow = iprot.readBinary();
|
||||
struct.setStartRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // STOP_ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.stopRow = iprot.readBinary();
|
||||
struct.setStopRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // COLUMNS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list18 = iprot.readListBegin();
|
||||
struct.columns = new ArrayList<ByteBuffer>(_list18.size);
|
||||
for (int _i19 = 0; _i19 < _list18.size; ++_i19)
|
||||
{
|
||||
ByteBuffer _elem20; // required
|
||||
_elem20 = iprot.readBinary();
|
||||
struct.columns.add(_elem20);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 5: // CACHING
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.caching = iprot.readI32();
|
||||
struct.setCachingIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 6: // FILTER_STRING
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.filterString = iprot.readBinary();
|
||||
struct.setFilterStringIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TScan struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.startRow != null) {
|
||||
if (struct.isSetStartRow()) {
|
||||
oprot.writeFieldBegin(START_ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.startRow);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.stopRow != null) {
|
||||
if (struct.isSetStopRow()) {
|
||||
oprot.writeFieldBegin(STOP_ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.stopRow);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.columns != null) {
|
||||
if (struct.isSetColumns()) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
|
||||
for (ByteBuffer _iter21 : struct.columns)
|
||||
{
|
||||
oprot.writeBinary(_iter21);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetCaching()) {
|
||||
oprot.writeFieldBegin(CACHING_FIELD_DESC);
|
||||
oprot.writeI32(struct.caching);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.filterString != null) {
|
||||
if (struct.isSetFilterString()) {
|
||||
oprot.writeFieldBegin(FILTER_STRING_FIELD_DESC);
|
||||
oprot.writeBinary(struct.filterString);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TScanTupleSchemeFactory implements SchemeFactory {
|
||||
public TScanTupleScheme getScheme() {
|
||||
return new TScanTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TScanTupleScheme extends 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();
|
||||
if (struct.isSetStartRow()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetStopRow()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
if (struct.isSetColumns()) {
|
||||
optionals.set(3);
|
||||
}
|
||||
if (struct.isSetCaching()) {
|
||||
optionals.set(4);
|
||||
}
|
||||
if (struct.isSetFilterString()) {
|
||||
optionals.set(5);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 6);
|
||||
if (struct.isSetStartRow()) {
|
||||
oprot.writeBinary(struct.startRow);
|
||||
}
|
||||
if (struct.isSetStopRow()) {
|
||||
oprot.writeBinary(struct.stopRow);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeI64(struct.timestamp);
|
||||
}
|
||||
if (struct.isSetColumns()) {
|
||||
{
|
||||
oprot.writeI32(struct.columns.size());
|
||||
for (ByteBuffer _iter22 : struct.columns)
|
||||
{
|
||||
oprot.writeBinary(_iter22);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (struct.isSetCaching()) {
|
||||
oprot.writeI32(struct.caching);
|
||||
}
|
||||
if (struct.isSetFilterString()) {
|
||||
oprot.writeBinary(struct.filterString);
|
||||
}
|
||||
}
|
||||
|
||||
@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(6);
|
||||
if (incoming.get(0)) {
|
||||
struct.startRow = iprot.readBinary();
|
||||
struct.setStartRowIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.stopRow = iprot.readBinary();
|
||||
struct.setStopRowIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
}
|
||||
if (incoming.get(3)) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
|
||||
struct.columns = new ArrayList<ByteBuffer>(_list23.size);
|
||||
for (int _i24 = 0; _i24 < _list23.size; ++_i24)
|
||||
{
|
||||
ByteBuffer _elem25; // required
|
||||
_elem25 = iprot.readBinary();
|
||||
struct.columns.add(_elem25);
|
||||
}
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
}
|
||||
if (incoming.get(4)) {
|
||||
struct.caching = iprot.readI32();
|
||||
struct.setCachingIsSet(true);
|
||||
}
|
||||
if (incoming.get(5)) {
|
||||
struct.filterString = iprot.readBinary();
|
||||
struct.setFilterStringIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -32,9 +39,15 @@ 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());
|
||||
}
|
||||
|
||||
public ByteBuffer family; // required
|
||||
public ByteBuffer qualifier; // required
|
||||
public long timestamp; // required
|
||||
public ByteBuffer qualifier; // optional
|
||||
public long timestamp; // 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 {
|
||||
|
@ -103,7 +116,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
|
|||
// isset id assignments
|
||||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
|
||||
private _Fields optionals[] = {_Fields.QUALIFIER,_Fields.TIMESTAMP};
|
||||
public static final 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);
|
||||
|
@ -402,71 +415,11 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // FAMILY
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.family = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // QUALIFIER
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.qualifier = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.timestamp = iprot.readI64();
|
||||
setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.family != null) {
|
||||
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
|
||||
oprot.writeBinary(this.family);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.qualifier != null) {
|
||||
if (isSetQualifier()) {
|
||||
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
|
||||
oprot.writeBinary(this.qualifier);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -526,5 +479,130 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
|
|||
}
|
||||
}
|
||||
|
||||
private static class TColumnStandardSchemeFactory implements SchemeFactory {
|
||||
public TColumnStandardScheme getScheme() {
|
||||
return new TColumnStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TColumnStandardScheme extends StandardScheme<TColumn> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TColumn struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // FAMILY
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.family = iprot.readBinary();
|
||||
struct.setFamilyIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // QUALIFIER
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.qualifier = iprot.readBinary();
|
||||
struct.setQualifierIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TColumn struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.family != null) {
|
||||
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
|
||||
oprot.writeBinary(struct.family);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.qualifier != null) {
|
||||
if (struct.isSetQualifier()) {
|
||||
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
|
||||
oprot.writeBinary(struct.qualifier);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TColumnTupleSchemeFactory implements SchemeFactory {
|
||||
public TColumnTupleScheme getScheme() {
|
||||
return new TColumnTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TColumnTupleScheme extends TupleScheme<TColumn> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
oprot.writeBinary(struct.family);
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetQualifier()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 2);
|
||||
if (struct.isSetQualifier()) {
|
||||
oprot.writeBinary(struct.qualifier);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeI64(struct.timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
struct.family = iprot.readBinary();
|
||||
struct.setFamilyIsSet(true);
|
||||
BitSet incoming = iprot.readBitSet(2);
|
||||
if (incoming.get(0)) {
|
||||
struct.qualifier = iprot.readBinary();
|
||||
struct.setQualifierIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -30,9 +37,15 @@ 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());
|
||||
}
|
||||
|
||||
public ByteBuffer family; // required
|
||||
public ByteBuffer qualifier; // required
|
||||
public long amount; // required
|
||||
public long amount; // 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 {
|
||||
|
@ -101,7 +114,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
|
|||
// isset id assignments
|
||||
private static final int __AMOUNT_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
|
||||
private _Fields optionals[] = {_Fields.AMOUNT};
|
||||
public static final 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);
|
||||
|
@ -404,69 +417,11 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // FAMILY
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.family = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // QUALIFIER
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.qualifier = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // AMOUNT
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.amount = iprot.readI64();
|
||||
setAmountIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.family != null) {
|
||||
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
|
||||
oprot.writeBinary(this.family);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.qualifier != null) {
|
||||
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
|
||||
oprot.writeBinary(this.qualifier);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (isSetAmount()) {
|
||||
oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
|
||||
oprot.writeI64(this.amount);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -527,5 +482,121 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
|
|||
}
|
||||
}
|
||||
|
||||
private static class TColumnIncrementStandardSchemeFactory implements SchemeFactory {
|
||||
public TColumnIncrementStandardScheme getScheme() {
|
||||
return new TColumnIncrementStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TColumnIncrementStandardScheme extends StandardScheme<TColumnIncrement> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnIncrement struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // FAMILY
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.family = iprot.readBinary();
|
||||
struct.setFamilyIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // QUALIFIER
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.qualifier = iprot.readBinary();
|
||||
struct.setQualifierIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // AMOUNT
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.amount = iprot.readI64();
|
||||
struct.setAmountIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TColumnIncrement struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.family != null) {
|
||||
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
|
||||
oprot.writeBinary(struct.family);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.qualifier != null) {
|
||||
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
|
||||
oprot.writeBinary(struct.qualifier);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.isSetAmount()) {
|
||||
oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
|
||||
oprot.writeI64(struct.amount);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TColumnIncrementTupleSchemeFactory implements SchemeFactory {
|
||||
public TColumnIncrementTupleScheme getScheme() {
|
||||
return new TColumnIncrementTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TColumnIncrementTupleScheme extends TupleScheme<TColumnIncrement> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TColumnIncrement struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
oprot.writeBinary(struct.family);
|
||||
oprot.writeBinary(struct.qualifier);
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetAmount()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetAmount()) {
|
||||
oprot.writeI64(struct.amount);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, TColumnIncrement struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
struct.family = iprot.readBinary();
|
||||
struct.setFamilyIsSet(true);
|
||||
struct.qualifier = iprot.readBinary();
|
||||
struct.setQualifierIsSet(true);
|
||||
BitSet incoming = iprot.readBitSet(1);
|
||||
if (incoming.get(0)) {
|
||||
struct.amount = iprot.readI64();
|
||||
struct.setAmountIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -31,10 +38,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
|
|||
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 TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", 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 TColumnValueStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new TColumnValueTupleSchemeFactory());
|
||||
}
|
||||
|
||||
public ByteBuffer family; // required
|
||||
public ByteBuffer qualifier; // required
|
||||
public ByteBuffer value; // required
|
||||
public long timestamp; // required
|
||||
public long timestamp; // 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 {
|
||||
|
@ -106,7 +119,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
|
|||
// isset id assignments
|
||||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
|
||||
private _Fields optionals[] = {_Fields.TIMESTAMP};
|
||||
public static final 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);
|
||||
|
@ -482,81 +495,11 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // FAMILY
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.family = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // QUALIFIER
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.qualifier = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // VALUE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.value = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // TIMESTAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.timestamp = iprot.readI64();
|
||||
setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.family != null) {
|
||||
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
|
||||
oprot.writeBinary(this.family);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.qualifier != null) {
|
||||
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
|
||||
oprot.writeBinary(this.qualifier);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.value != null) {
|
||||
oprot.writeFieldBegin(VALUE_FIELD_DESC);
|
||||
oprot.writeBinary(this.value);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -628,5 +571,137 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
|
|||
}
|
||||
}
|
||||
|
||||
private static class TColumnValueStandardSchemeFactory implements SchemeFactory {
|
||||
public TColumnValueStandardScheme getScheme() {
|
||||
return new TColumnValueStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TColumnValueStandardScheme extends StandardScheme<TColumnValue> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnValue struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // FAMILY
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.family = iprot.readBinary();
|
||||
struct.setFamilyIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // QUALIFIER
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.qualifier = iprot.readBinary();
|
||||
struct.setQualifierIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // VALUE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.value = iprot.readBinary();
|
||||
struct.setValueIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // TIMESTAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TColumnValue struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.family != null) {
|
||||
oprot.writeFieldBegin(FAMILY_FIELD_DESC);
|
||||
oprot.writeBinary(struct.family);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.qualifier != null) {
|
||||
oprot.writeFieldBegin(QUALIFIER_FIELD_DESC);
|
||||
oprot.writeBinary(struct.qualifier);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.value != null) {
|
||||
oprot.writeFieldBegin(VALUE_FIELD_DESC);
|
||||
oprot.writeBinary(struct.value);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TColumnValueTupleSchemeFactory implements SchemeFactory {
|
||||
public TColumnValueTupleScheme getScheme() {
|
||||
return new TColumnValueTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TColumnValueTupleScheme extends TupleScheme<TColumnValue> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TColumnValue struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
oprot.writeBinary(struct.family);
|
||||
oprot.writeBinary(struct.qualifier);
|
||||
oprot.writeBinary(struct.value);
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetTimestamp()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeI64(struct.timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, TColumnValue struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (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(1);
|
||||
if (incoming.get(0)) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -51,14 +58,20 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
|||
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 org.apache.thrift.protocol.TField DELETE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteType", 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 TDeleteStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new TDeleteTupleSchemeFactory());
|
||||
}
|
||||
|
||||
public ByteBuffer row; // required
|
||||
public List<TColumn> columns; // required
|
||||
public long timestamp; // required
|
||||
public List<TColumn> columns; // optional
|
||||
public long timestamp; // optional
|
||||
/**
|
||||
*
|
||||
* @see TDeleteType
|
||||
*/
|
||||
public TDeleteType deleteType; // required
|
||||
public TDeleteType deleteType; // 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 {
|
||||
|
@ -134,7 +147,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
|||
// isset id assignments
|
||||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
|
||||
private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE};
|
||||
public static final 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);
|
||||
|
@ -515,103 +528,11 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.row = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMNS
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
|
||||
this.columns = new ArrayList<TColumn>(_list12.size);
|
||||
for (int _i13 = 0; _i13 < _list12.size; ++_i13)
|
||||
{
|
||||
TColumn _elem14; // required
|
||||
_elem14 = new TColumn();
|
||||
_elem14.read(iprot);
|
||||
this.columns.add(_elem14);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.timestamp = iprot.readI64();
|
||||
setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // DELETE_TYPE
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.deleteType = TDeleteType.findByValue(iprot.readI32());
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.columns != null) {
|
||||
if (isSetColumns()) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
|
||||
for (TColumn _iter15 : this.columns)
|
||||
{
|
||||
_iter15.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.deleteType != null) {
|
||||
if (isSetDeleteType()) {
|
||||
oprot.writeFieldBegin(DELETE_TYPE_FIELD_DESC);
|
||||
oprot.writeI32(this.deleteType.getValue());
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -681,5 +602,189 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
|
|||
}
|
||||
}
|
||||
|
||||
private static class TDeleteStandardSchemeFactory implements SchemeFactory {
|
||||
public TDeleteStandardScheme getScheme() {
|
||||
return new TDeleteStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TDeleteStandardScheme extends StandardScheme<TDelete> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TDelete struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMNS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
|
||||
struct.columns = new ArrayList<TColumn>(_list24.size);
|
||||
for (int _i25 = 0; _i25 < _list24.size; ++_i25)
|
||||
{
|
||||
TColumn _elem26; // required
|
||||
_elem26 = new TColumn();
|
||||
_elem26.read(iprot);
|
||||
struct.columns.add(_elem26);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // DELETE_TYPE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.deleteType = TDeleteType.findByValue(iprot.readI32());
|
||||
struct.setDeleteTypeIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TDelete struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.columns != null) {
|
||||
if (struct.isSetColumns()) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
||||
for (TColumn _iter27 : struct.columns)
|
||||
{
|
||||
_iter27.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.deleteType != null) {
|
||||
if (struct.isSetDeleteType()) {
|
||||
oprot.writeFieldBegin(DELETE_TYPE_FIELD_DESC);
|
||||
oprot.writeI32(struct.deleteType.getValue());
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TDeleteTupleSchemeFactory implements SchemeFactory {
|
||||
public TDeleteTupleScheme getScheme() {
|
||||
return new TDeleteTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TDeleteTupleScheme extends TupleScheme<TDelete> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
oprot.writeBinary(struct.row);
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetColumns()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetDeleteType()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 3);
|
||||
if (struct.isSetColumns()) {
|
||||
{
|
||||
oprot.writeI32(struct.columns.size());
|
||||
for (TColumn _iter28 : struct.columns)
|
||||
{
|
||||
_iter28.write(oprot);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeI64(struct.timestamp);
|
||||
}
|
||||
if (struct.isSetDeleteType()) {
|
||||
oprot.writeI32(struct.deleteType.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
BitSet incoming = iprot.readBitSet(3);
|
||||
if (incoming.get(0)) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||
struct.columns = new ArrayList<TColumn>(_list29.size);
|
||||
for (int _i30 = 0; _i30 < _list29.size; ++_i30)
|
||||
{
|
||||
TColumn _elem31; // required
|
||||
_elem31 = new TColumn();
|
||||
_elem31.read(iprot);
|
||||
struct.columns.add(_elem31);
|
||||
}
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.deleteType = TDeleteType.findByValue(iprot.readI32());
|
||||
struct.setDeleteTypeIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.0)
|
||||
*
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* @generated
|
||||
*/
|
||||
package org.apache.hadoop.hbase.thrift2.generated;
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -44,11 +51,17 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
|||
private static final org.apache.thrift.protocol.TField TIME_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeRange", org.apache.thrift.protocol.TType.STRUCT, (short)4);
|
||||
private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)5);
|
||||
|
||||
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
|
||||
static {
|
||||
schemes.put(StandardScheme.class, new TGetStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new TGetTupleSchemeFactory());
|
||||
}
|
||||
|
||||
public ByteBuffer row; // required
|
||||
public List<TColumn> columns; // required
|
||||
public long timestamp; // required
|
||||
public TTimeRange timeRange; // required
|
||||
public int maxVersions; // required
|
||||
public List<TColumn> columns; // optional
|
||||
public long timestamp; // optional
|
||||
public TTimeRange timeRange; // optional
|
||||
public int maxVersions; // 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 {
|
||||
|
@ -124,7 +137,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
|||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||
private static final int __MAXVERSIONS_ISSET_ID = 1;
|
||||
private BitSet __isset_bit_vector = new BitSet(2);
|
||||
|
||||
private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS};
|
||||
public static final 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);
|
||||
|
@ -554,117 +567,11 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.row = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMNS
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
|
||||
this.columns = new ArrayList<TColumn>(_list4.size);
|
||||
for (int _i5 = 0; _i5 < _list4.size; ++_i5)
|
||||
{
|
||||
TColumn _elem6; // required
|
||||
_elem6 = new TColumn();
|
||||
_elem6.read(iprot);
|
||||
this.columns.add(_elem6);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.timestamp = iprot.readI64();
|
||||
setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // TIME_RANGE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
||||
this.timeRange = new TTimeRange();
|
||||
this.timeRange.read(iprot);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 5: // MAX_VERSIONS
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.maxVersions = iprot.readI32();
|
||||
setMaxVersionsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.columns != null) {
|
||||
if (isSetColumns()) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
|
||||
for (TColumn _iter7 : this.columns)
|
||||
{
|
||||
_iter7.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.timeRange != null) {
|
||||
if (isSetTimeRange()) {
|
||||
oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
|
||||
this.timeRange.write(oprot);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (isSetMaxVersions()) {
|
||||
oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
|
||||
oprot.writeI32(this.maxVersions);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -740,5 +647,214 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
|
|||
}
|
||||
}
|
||||
|
||||
private static class TGetStandardSchemeFactory implements SchemeFactory {
|
||||
public TGetStandardScheme getScheme() {
|
||||
return new TGetStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TGetStandardScheme extends StandardScheme<TGet> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TGet struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMNS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
|
||||
struct.columns = new ArrayList<TColumn>(_list8.size);
|
||||
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
|
||||
{
|
||||
TColumn _elem10; // required
|
||||
_elem10 = new TColumn();
|
||||
_elem10.read(iprot);
|
||||
struct.columns.add(_elem10);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // TIME_RANGE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
|
||||
struct.timeRange = new TTimeRange();
|
||||
struct.timeRange.read(iprot);
|
||||
struct.setTimeRangeIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 5: // MAX_VERSIONS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.maxVersions = iprot.readI32();
|
||||
struct.setMaxVersionsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TGet struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.columns != null) {
|
||||
if (struct.isSetColumns()) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
||||
for (TColumn _iter11 : struct.columns)
|
||||
{
|
||||
_iter11.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.timeRange != null) {
|
||||
if (struct.isSetTimeRange()) {
|
||||
oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
|
||||
struct.timeRange.write(oprot);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetMaxVersions()) {
|
||||
oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
|
||||
oprot.writeI32(struct.maxVersions);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TGetTupleSchemeFactory implements SchemeFactory {
|
||||
public TGetTupleScheme getScheme() {
|
||||
return new TGetTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TGetTupleScheme extends TupleScheme<TGet> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TGet struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
oprot.writeBinary(struct.row);
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetColumns()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetTimeRange()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
if (struct.isSetMaxVersions()) {
|
||||
optionals.set(3);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 4);
|
||||
if (struct.isSetColumns()) {
|
||||
{
|
||||
oprot.writeI32(struct.columns.size());
|
||||
for (TColumn _iter12 : struct.columns)
|
||||
{
|
||||
_iter12.write(oprot);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeI64(struct.timestamp);
|
||||
}
|
||||
if (struct.isSetTimeRange()) {
|
||||
struct.timeRange.write(oprot);
|
||||
}
|
||||
if (struct.isSetMaxVersions()) {
|
||||
oprot.writeI32(struct.maxVersions);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, TGet struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
BitSet incoming = iprot.readBitSet(4);
|
||||
if (incoming.get(0)) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||
struct.columns = new ArrayList<TColumn>(_list13.size);
|
||||
for (int _i14 = 0; _i14 < _list13.size; ++_i14)
|
||||
{
|
||||
TColumn _elem15; // required
|
||||
_elem15 = new TColumn();
|
||||
_elem15.read(iprot);
|
||||
struct.columns.add(_elem15);
|
||||
}
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
struct.timeRange = new TTimeRange();
|
||||
struct.timeRange.read(iprot);
|
||||
struct.setTimeRangeIsSet(true);
|
||||
}
|
||||
if (incoming.get(3)) {
|
||||
struct.maxVersions = iprot.readI32();
|
||||
struct.setMaxVersionsIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -30,7 +37,13 @@ public class TIOError extends Exception implements org.apache.thrift.TBase<TIOEr
|
|||
|
||||
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);
|
||||
|
||||
public String message; // required
|
||||
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());
|
||||
}
|
||||
|
||||
public 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 {
|
||||
|
@ -91,7 +104,7 @@ public class TIOError extends Exception implements org.apache.thrift.TBase<TIOEr
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
|
||||
private _Fields optionals[] = {_Fields.MESSAGE};
|
||||
public static final 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);
|
||||
|
@ -237,46 +250,11 @@ public class TIOError extends Exception implements org.apache.thrift.TBase<TIOEr
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // MESSAGE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.message = iprot.readString();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.message != null) {
|
||||
if (isSetMessage()) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(this.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -317,5 +295,91 @@ public class TIOError extends Exception implements org.apache.thrift.TBase<TIOEr
|
|||
}
|
||||
}
|
||||
|
||||
private static class TIOErrorStandardSchemeFactory implements SchemeFactory {
|
||||
public TIOErrorStandardScheme getScheme() {
|
||||
return new TIOErrorStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TIOErrorStandardScheme extends StandardScheme<TIOError> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TIOError struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // MESSAGE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TIOError struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.message != null) {
|
||||
if (struct.isSetMessage()) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(struct.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TIOErrorTupleSchemeFactory implements SchemeFactory {
|
||||
public TIOErrorTupleScheme getScheme() {
|
||||
return new TIOErrorTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TIOErrorTupleScheme extends 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();
|
||||
if (struct.isSetMessage()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetMessage()) {
|
||||
oprot.writeString(struct.message);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -29,7 +36,13 @@ public class TIllegalArgument extends Exception implements org.apache.thrift.TBa
|
|||
|
||||
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);
|
||||
|
||||
public String message; // required
|
||||
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());
|
||||
}
|
||||
|
||||
public 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 {
|
||||
|
@ -90,7 +103,7 @@ public class TIllegalArgument extends Exception implements org.apache.thrift.TBa
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
|
||||
private _Fields optionals[] = {_Fields.MESSAGE};
|
||||
public static final 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);
|
||||
|
@ -236,46 +249,11 @@ public class TIllegalArgument extends Exception implements org.apache.thrift.TBa
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // MESSAGE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.message = iprot.readString();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.message != null) {
|
||||
if (isSetMessage()) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(this.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -316,5 +294,91 @@ public class TIllegalArgument extends Exception implements org.apache.thrift.TBa
|
|||
}
|
||||
}
|
||||
|
||||
private static class TIllegalArgumentStandardSchemeFactory implements SchemeFactory {
|
||||
public TIllegalArgumentStandardScheme getScheme() {
|
||||
return new TIllegalArgumentStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TIllegalArgumentStandardScheme extends StandardScheme<TIllegalArgument> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TIllegalArgument struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // MESSAGE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TIllegalArgument struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.message != null) {
|
||||
if (struct.isSetMessage()) {
|
||||
oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
|
||||
oprot.writeString(struct.message);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TIllegalArgumentTupleSchemeFactory implements SchemeFactory {
|
||||
public TIllegalArgumentTupleScheme getScheme() {
|
||||
return new TIllegalArgumentTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TIllegalArgumentTupleScheme extends 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();
|
||||
if (struct.isSetMessage()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetMessage()) {
|
||||
oprot.writeString(struct.message);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
if (incoming.get(0)) {
|
||||
struct.message = iprot.readString();
|
||||
struct.setMessageIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -33,9 +40,15 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
|||
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)2);
|
||||
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)3);
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
public ByteBuffer row; // required
|
||||
public List<TColumnIncrement> columns; // required
|
||||
public boolean writeToWal; // required
|
||||
public boolean writeToWal; // 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 {
|
||||
|
@ -104,7 +117,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
|||
// isset id assignments
|
||||
private static final int __WRITETOWAL_ISSET_ID = 0;
|
||||
private BitSet __isset_bit_vector = new BitSet(1);
|
||||
|
||||
private _Fields optionals[] = {_Fields.WRITE_TO_WAL};
|
||||
public static final 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);
|
||||
|
@ -416,87 +429,11 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.row = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMNS
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
|
||||
this.columns = new ArrayList<TColumnIncrement>(_list16.size);
|
||||
for (int _i17 = 0; _i17 < _list16.size; ++_i17)
|
||||
{
|
||||
TColumnIncrement _elem18; // required
|
||||
_elem18 = new TColumnIncrement();
|
||||
_elem18.read(iprot);
|
||||
this.columns.add(_elem18);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // WRITE_TO_WAL
|
||||
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
this.writeToWal = iprot.readBool();
|
||||
setWriteToWalIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.columns != null) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
|
||||
for (TColumnIncrement _iter19 : this.columns)
|
||||
{
|
||||
_iter19.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (isSetWriteToWal()) {
|
||||
oprot.writeFieldBegin(WRITE_TO_WAL_FIELD_DESC);
|
||||
oprot.writeBool(this.writeToWal);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -557,5 +494,155 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
|
|||
}
|
||||
}
|
||||
|
||||
private static class TIncrementStandardSchemeFactory implements SchemeFactory {
|
||||
public TIncrementStandardScheme getScheme() {
|
||||
return new TIncrementStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TIncrementStandardScheme extends StandardScheme<TIncrement> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TIncrement struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMNS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
|
||||
struct.columns = new ArrayList<TColumnIncrement>(_list32.size);
|
||||
for (int _i33 = 0; _i33 < _list32.size; ++_i33)
|
||||
{
|
||||
TColumnIncrement _elem34; // required
|
||||
_elem34 = new TColumnIncrement();
|
||||
_elem34.read(iprot);
|
||||
struct.columns.add(_elem34);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // WRITE_TO_WAL
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
struct.writeToWal = iprot.readBool();
|
||||
struct.setWriteToWalIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TIncrement struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.columns != null) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
||||
for (TColumnIncrement _iter35 : struct.columns)
|
||||
{
|
||||
_iter35.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.isSetWriteToWal()) {
|
||||
oprot.writeFieldBegin(WRITE_TO_WAL_FIELD_DESC);
|
||||
oprot.writeBool(struct.writeToWal);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TIncrementTupleSchemeFactory implements SchemeFactory {
|
||||
public TIncrementTupleScheme getScheme() {
|
||||
return new TIncrementTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TIncrementTupleScheme extends TupleScheme<TIncrement> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TIncrement struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
oprot.writeBinary(struct.row);
|
||||
{
|
||||
oprot.writeI32(struct.columns.size());
|
||||
for (TColumnIncrement _iter36 : struct.columns)
|
||||
{
|
||||
_iter36.write(oprot);
|
||||
}
|
||||
}
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetWriteToWal()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetWriteToWal()) {
|
||||
oprot.writeBool(struct.writeToWal);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, TIncrement struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||
struct.columns = new ArrayList<TColumnIncrement>(_list37.size);
|
||||
for (int _i38 = 0; _i38 < _list37.size; ++_i38)
|
||||
{
|
||||
TColumnIncrement _elem39; // required
|
||||
_elem39 = new TColumnIncrement();
|
||||
_elem39.read(iprot);
|
||||
struct.columns.add(_elem39);
|
||||
}
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
BitSet incoming = iprot.readBitSet(1);
|
||||
if (incoming.get(0)) {
|
||||
struct.writeToWal = iprot.readBool();
|
||||
struct.setWriteToWalIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -39,10 +46,16 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
|||
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 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 TPutStandardSchemeFactory());
|
||||
schemes.put(TupleScheme.class, new TPutTupleSchemeFactory());
|
||||
}
|
||||
|
||||
public ByteBuffer row; // required
|
||||
public List<TColumnValue> columnValues; // required
|
||||
public long timestamp; // required
|
||||
public boolean writeToWal; // required
|
||||
public long timestamp; // optional
|
||||
public boolean writeToWal; // 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 {
|
||||
|
@ -115,7 +128,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
|||
private static final int __TIMESTAMP_ISSET_ID = 0;
|
||||
private static final int __WRITETOWAL_ISSET_ID = 1;
|
||||
private BitSet __isset_bit_vector = new BitSet(2);
|
||||
|
||||
private _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.WRITE_TO_WAL};
|
||||
public static final 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);
|
||||
|
@ -487,100 +500,11 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.row = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMN_VALUES
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
|
||||
this.columnValues = new ArrayList<TColumnValue>(_list8.size);
|
||||
for (int _i9 = 0; _i9 < _list8.size; ++_i9)
|
||||
{
|
||||
TColumnValue _elem10; // required
|
||||
_elem10 = new TColumnValue();
|
||||
_elem10.read(iprot);
|
||||
this.columnValues.add(_elem10);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.timestamp = iprot.readI64();
|
||||
setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // WRITE_TO_WAL
|
||||
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
this.writeToWal = iprot.readBool();
|
||||
setWriteToWalIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.columnValues != null) {
|
||||
oprot.writeFieldBegin(COLUMN_VALUES_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columnValues.size()));
|
||||
for (TColumnValue _iter11 : this.columnValues)
|
||||
{
|
||||
_iter11.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (isSetWriteToWal()) {
|
||||
oprot.writeFieldBegin(WRITE_TO_WAL_FIELD_DESC);
|
||||
oprot.writeBool(this.writeToWal);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -647,5 +571,178 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
|
|||
}
|
||||
}
|
||||
|
||||
private static class TPutStandardSchemeFactory implements SchemeFactory {
|
||||
public TPutStandardScheme getScheme() {
|
||||
return new TPutStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TPutStandardScheme extends StandardScheme<TPut> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TPut struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMN_VALUES
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
|
||||
struct.columnValues = new ArrayList<TColumnValue>(_list16.size);
|
||||
for (int _i17 = 0; _i17 < _list16.size; ++_i17)
|
||||
{
|
||||
TColumnValue _elem18; // required
|
||||
_elem18 = new TColumnValue();
|
||||
_elem18.read(iprot);
|
||||
struct.columnValues.add(_elem18);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
struct.setColumnValuesIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // TIMESTAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // WRITE_TO_WAL
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
|
||||
struct.writeToWal = iprot.readBool();
|
||||
struct.setWriteToWalIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TPut struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.row != null) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.columnValues != null) {
|
||||
oprot.writeFieldBegin(COLUMN_VALUES_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columnValues.size()));
|
||||
for (TColumnValue _iter19 : struct.columnValues)
|
||||
{
|
||||
_iter19.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.timestamp);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.isSetWriteToWal()) {
|
||||
oprot.writeFieldBegin(WRITE_TO_WAL_FIELD_DESC);
|
||||
oprot.writeBool(struct.writeToWal);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TPutTupleSchemeFactory implements SchemeFactory {
|
||||
public TPutTupleScheme getScheme() {
|
||||
return new TPutTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TPutTupleScheme extends TupleScheme<TPut> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TPut struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
oprot.writeBinary(struct.row);
|
||||
{
|
||||
oprot.writeI32(struct.columnValues.size());
|
||||
for (TColumnValue _iter20 : struct.columnValues)
|
||||
{
|
||||
_iter20.write(oprot);
|
||||
}
|
||||
}
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetTimestamp()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetWriteToWal()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 2);
|
||||
if (struct.isSetTimestamp()) {
|
||||
oprot.writeI64(struct.timestamp);
|
||||
}
|
||||
if (struct.isSetWriteToWal()) {
|
||||
oprot.writeBool(struct.writeToWal);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(org.apache.thrift.protocol.TProtocol prot, TPut struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol iprot = (TTupleProtocol) prot;
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||
struct.columnValues = new ArrayList<TColumnValue>(_list21.size);
|
||||
for (int _i22 = 0; _i22 < _list21.size; ++_i22)
|
||||
{
|
||||
TColumnValue _elem23; // required
|
||||
_elem23 = new TColumnValue();
|
||||
_elem23.read(iprot);
|
||||
struct.columnValues.add(_elem23);
|
||||
}
|
||||
}
|
||||
struct.setColumnValuesIsSet(true);
|
||||
BitSet incoming = iprot.readBitSet(2);
|
||||
if (incoming.get(0)) {
|
||||
struct.timestamp = iprot.readI64();
|
||||
struct.setTimestampIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.writeToWal = iprot.readBool();
|
||||
struct.setWriteToWalIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -29,7 +36,13 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
|
|||
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 COLUMN_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnValues", org.apache.thrift.protocol.TType.LIST, (short)2);
|
||||
|
||||
public ByteBuffer row; // required
|
||||
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());
|
||||
}
|
||||
|
||||
public ByteBuffer row; // optional
|
||||
public List<TColumnValue> columnValues; // required
|
||||
|
||||
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
|
||||
|
@ -94,7 +107,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
|
|||
}
|
||||
|
||||
// isset id assignments
|
||||
|
||||
private _Fields optionals[] = {_Fields.ROW};
|
||||
public static final 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);
|
||||
|
@ -340,76 +353,11 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.row = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMN_VALUES
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
|
||||
this.columnValues = new ArrayList<TColumnValue>(_list0.size);
|
||||
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
|
||||
{
|
||||
TColumnValue _elem2; // required
|
||||
_elem2 = new TColumnValue();
|
||||
_elem2.read(iprot);
|
||||
this.columnValues.add(_elem2);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.row != null) {
|
||||
if (isSetRow()) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (this.columnValues != null) {
|
||||
oprot.writeFieldBegin(COLUMN_VALUES_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columnValues.size()));
|
||||
for (TColumnValue _iter3 : this.columnValues)
|
||||
{
|
||||
_iter3.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -461,5 +409,141 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
|
|||
}
|
||||
}
|
||||
|
||||
private static class TResultStandardSchemeFactory implements SchemeFactory {
|
||||
public TResultStandardScheme getScheme() {
|
||||
return new TResultStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TResultStandardScheme extends StandardScheme<TResult> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TResult struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // COLUMN_VALUES
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
|
||||
struct.columnValues = new ArrayList<TColumnValue>(_list0.size);
|
||||
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
|
||||
{
|
||||
TColumnValue _elem2; // required
|
||||
_elem2 = new TColumnValue();
|
||||
_elem2.read(iprot);
|
||||
struct.columnValues.add(_elem2);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
struct.setColumnValuesIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TResult struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.row != null) {
|
||||
if (struct.isSetRow()) {
|
||||
oprot.writeFieldBegin(ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.row);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.columnValues != null) {
|
||||
oprot.writeFieldBegin(COLUMN_VALUES_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columnValues.size()));
|
||||
for (TColumnValue _iter3 : struct.columnValues)
|
||||
{
|
||||
_iter3.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TResultTupleSchemeFactory implements SchemeFactory {
|
||||
public TResultTupleScheme getScheme() {
|
||||
return new TResultTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TResultTupleScheme extends TupleScheme<TResult> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TResult struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (TTupleProtocol) prot;
|
||||
{
|
||||
oprot.writeI32(struct.columnValues.size());
|
||||
for (TColumnValue _iter4 : struct.columnValues)
|
||||
{
|
||||
_iter4.write(oprot);
|
||||
}
|
||||
}
|
||||
BitSet optionals = new BitSet();
|
||||
if (struct.isSetRow()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 1);
|
||||
if (struct.isSetRow()) {
|
||||
oprot.writeBinary(struct.row);
|
||||
}
|
||||
}
|
||||
|
||||
@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.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||
struct.columnValues = new ArrayList<TColumnValue>(_list5.size);
|
||||
for (int _i6 = 0; _i6 < _list5.size; ++_i6)
|
||||
{
|
||||
TColumnValue _elem7; // required
|
||||
_elem7 = new TColumnValue();
|
||||
_elem7.read(iprot);
|
||||
struct.columnValues.add(_elem7);
|
||||
}
|
||||
}
|
||||
struct.setColumnValuesIsSet(true);
|
||||
BitSet incoming = iprot.readBitSet(1);
|
||||
if (incoming.get(0)) {
|
||||
struct.row = iprot.readBinary();
|
||||
struct.setRowIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -34,12 +41,18 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
|||
private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)5);
|
||||
private static final org.apache.thrift.protocol.TField TIME_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeRange", org.apache.thrift.protocol.TType.STRUCT, (short)6);
|
||||
|
||||
public ByteBuffer startRow; // required
|
||||
public ByteBuffer stopRow; // required
|
||||
public List<TColumn> columns; // required
|
||||
public int caching; // required
|
||||
public int maxVersions; // required
|
||||
public TTimeRange timeRange; // required
|
||||
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());
|
||||
}
|
||||
|
||||
public ByteBuffer startRow; // optional
|
||||
public ByteBuffer stopRow; // optional
|
||||
public List<TColumn> columns; // optional
|
||||
public int caching; // optional
|
||||
public int maxVersions; // optional
|
||||
public TTimeRange timeRange; // 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 {
|
||||
|
@ -118,7 +131,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
|||
private static final int __CACHING_ISSET_ID = 0;
|
||||
private static final int __MAXVERSIONS_ISSET_ID = 1;
|
||||
private BitSet __isset_bit_vector = new BitSet(2);
|
||||
|
||||
private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.COLUMNS,_Fields.CACHING,_Fields.MAX_VERSIONS,_Fields.TIME_RANGE};
|
||||
public static final 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);
|
||||
|
@ -616,133 +629,11 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // START_ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.startRow = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // STOP_ROW
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
this.stopRow = iprot.readBinary();
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 3: // COLUMNS
|
||||
if (field.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
|
||||
this.columns = new ArrayList<TColumn>(_list20.size);
|
||||
for (int _i21 = 0; _i21 < _list20.size; ++_i21)
|
||||
{
|
||||
TColumn _elem22; // required
|
||||
_elem22 = new TColumn();
|
||||
_elem22.read(iprot);
|
||||
this.columns.add(_elem22);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 4: // CACHING
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.caching = iprot.readI32();
|
||||
setCachingIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 5: // MAX_VERSIONS
|
||||
if (field.type == org.apache.thrift.protocol.TType.I32) {
|
||||
this.maxVersions = iprot.readI32();
|
||||
setMaxVersionsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 6: // TIME_RANGE
|
||||
if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
|
||||
this.timeRange = new TTimeRange();
|
||||
this.timeRange.read(iprot);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (this.startRow != null) {
|
||||
if (isSetStartRow()) {
|
||||
oprot.writeFieldBegin(START_ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.startRow);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (this.stopRow != null) {
|
||||
if (isSetStopRow()) {
|
||||
oprot.writeFieldBegin(STOP_ROW_FIELD_DESC);
|
||||
oprot.writeBinary(this.stopRow);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (this.columns != null) {
|
||||
if (isSetColumns()) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
|
||||
for (TColumn _iter23 : this.columns)
|
||||
{
|
||||
_iter23.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (isSetCaching()) {
|
||||
oprot.writeFieldBegin(CACHING_FIELD_DESC);
|
||||
oprot.writeI32(this.caching);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (isSetMaxVersions()) {
|
||||
oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
|
||||
oprot.writeI32(this.maxVersions);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (this.timeRange != null) {
|
||||
if (isSetTimeRange()) {
|
||||
oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
|
||||
this.timeRange.write(oprot);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -827,5 +718,248 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
|
|||
}
|
||||
}
|
||||
|
||||
private static class TScanStandardSchemeFactory implements SchemeFactory {
|
||||
public TScanStandardScheme getScheme() {
|
||||
return new TScanStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TScanStandardScheme extends StandardScheme<TScan> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TScan struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // START_ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.startRow = iprot.readBinary();
|
||||
struct.setStartRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // STOP_ROW
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
|
||||
struct.stopRow = iprot.readBinary();
|
||||
struct.setStopRowIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 3: // COLUMNS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
|
||||
struct.columns = new ArrayList<TColumn>(_list40.size);
|
||||
for (int _i41 = 0; _i41 < _list40.size; ++_i41)
|
||||
{
|
||||
TColumn _elem42; // required
|
||||
_elem42 = new TColumn();
|
||||
_elem42.read(iprot);
|
||||
struct.columns.add(_elem42);
|
||||
}
|
||||
iprot.readListEnd();
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 4: // CACHING
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.caching = iprot.readI32();
|
||||
struct.setCachingIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 5: // MAX_VERSIONS
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
|
||||
struct.maxVersions = iprot.readI32();
|
||||
struct.setMaxVersionsIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 6: // TIME_RANGE
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
|
||||
struct.timeRange = new TTimeRange();
|
||||
struct.timeRange.read(iprot);
|
||||
struct.setTimeRangeIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TScan struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
if (struct.startRow != null) {
|
||||
if (struct.isSetStartRow()) {
|
||||
oprot.writeFieldBegin(START_ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.startRow);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.stopRow != null) {
|
||||
if (struct.isSetStopRow()) {
|
||||
oprot.writeFieldBegin(STOP_ROW_FIELD_DESC);
|
||||
oprot.writeBinary(struct.stopRow);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.columns != null) {
|
||||
if (struct.isSetColumns()) {
|
||||
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
|
||||
{
|
||||
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
|
||||
for (TColumn _iter43 : struct.columns)
|
||||
{
|
||||
_iter43.write(oprot);
|
||||
}
|
||||
oprot.writeListEnd();
|
||||
}
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
if (struct.isSetCaching()) {
|
||||
oprot.writeFieldBegin(CACHING_FIELD_DESC);
|
||||
oprot.writeI32(struct.caching);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.isSetMaxVersions()) {
|
||||
oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
|
||||
oprot.writeI32(struct.maxVersions);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
if (struct.timeRange != null) {
|
||||
if (struct.isSetTimeRange()) {
|
||||
oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
|
||||
struct.timeRange.write(oprot);
|
||||
oprot.writeFieldEnd();
|
||||
}
|
||||
}
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TScanTupleSchemeFactory implements SchemeFactory {
|
||||
public TScanTupleScheme getScheme() {
|
||||
return new TScanTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TScanTupleScheme extends 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();
|
||||
if (struct.isSetStartRow()) {
|
||||
optionals.set(0);
|
||||
}
|
||||
if (struct.isSetStopRow()) {
|
||||
optionals.set(1);
|
||||
}
|
||||
if (struct.isSetColumns()) {
|
||||
optionals.set(2);
|
||||
}
|
||||
if (struct.isSetCaching()) {
|
||||
optionals.set(3);
|
||||
}
|
||||
if (struct.isSetMaxVersions()) {
|
||||
optionals.set(4);
|
||||
}
|
||||
if (struct.isSetTimeRange()) {
|
||||
optionals.set(5);
|
||||
}
|
||||
oprot.writeBitSet(optionals, 6);
|
||||
if (struct.isSetStartRow()) {
|
||||
oprot.writeBinary(struct.startRow);
|
||||
}
|
||||
if (struct.isSetStopRow()) {
|
||||
oprot.writeBinary(struct.stopRow);
|
||||
}
|
||||
if (struct.isSetColumns()) {
|
||||
{
|
||||
oprot.writeI32(struct.columns.size());
|
||||
for (TColumn _iter44 : struct.columns)
|
||||
{
|
||||
_iter44.write(oprot);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (struct.isSetCaching()) {
|
||||
oprot.writeI32(struct.caching);
|
||||
}
|
||||
if (struct.isSetMaxVersions()) {
|
||||
oprot.writeI32(struct.maxVersions);
|
||||
}
|
||||
if (struct.isSetTimeRange()) {
|
||||
struct.timeRange.write(oprot);
|
||||
}
|
||||
}
|
||||
|
||||
@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(6);
|
||||
if (incoming.get(0)) {
|
||||
struct.startRow = iprot.readBinary();
|
||||
struct.setStartRowIsSet(true);
|
||||
}
|
||||
if (incoming.get(1)) {
|
||||
struct.stopRow = iprot.readBinary();
|
||||
struct.setStopRowIsSet(true);
|
||||
}
|
||||
if (incoming.get(2)) {
|
||||
{
|
||||
org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
|
||||
struct.columns = new ArrayList<TColumn>(_list45.size);
|
||||
for (int _i46 = 0; _i46 < _list45.size; ++_i46)
|
||||
{
|
||||
TColumn _elem47; // required
|
||||
_elem47 = new TColumn();
|
||||
_elem47.read(iprot);
|
||||
struct.columns.add(_elem47);
|
||||
}
|
||||
}
|
||||
struct.setColumnsIsSet(true);
|
||||
}
|
||||
if (incoming.get(3)) {
|
||||
struct.caching = iprot.readI32();
|
||||
struct.setCachingIsSet(true);
|
||||
}
|
||||
if (incoming.get(4)) {
|
||||
struct.maxVersions = iprot.readI32();
|
||||
struct.setMaxVersionsIsSet(true);
|
||||
}
|
||||
if (incoming.get(5)) {
|
||||
struct.timeRange = new TTimeRange();
|
||||
struct.timeRange.read(iprot);
|
||||
struct.setTimeRangeIsSet(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.7.0)
|
||||
* Autogenerated by Thrift Compiler (0.8.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 java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
@ -26,6 +33,12 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
|
|||
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());
|
||||
}
|
||||
|
||||
public long minStamp; // required
|
||||
public long maxStamp; // required
|
||||
|
||||
|
@ -94,7 +107,6 @@ 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 BitSet __isset_bit_vector = new BitSet(2);
|
||||
|
||||
public static final 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);
|
||||
|
@ -311,60 +323,11 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
|
|||
}
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField field;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
field = iprot.readFieldBegin();
|
||||
if (field.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (field.id) {
|
||||
case 1: // MIN_STAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.minStamp = iprot.readI64();
|
||||
setMinStampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
case 2: // MAX_STAMP
|
||||
if (field.type == org.apache.thrift.protocol.TType.I64) {
|
||||
this.maxStamp = iprot.readI64();
|
||||
setMaxStampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
if (!isSetMinStamp()) {
|
||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'minStamp' was not found in serialized data! Struct: " + toString());
|
||||
}
|
||||
if (!isSetMaxStamp()) {
|
||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxStamp' was not found in serialized data! Struct: " + toString());
|
||||
}
|
||||
validate();
|
||||
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
|
||||
validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldBegin(MIN_STAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.minStamp);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(MAX_STAMP_FIELD_DESC);
|
||||
oprot.writeI64(this.maxStamp);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -407,5 +370,97 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
|
|||
}
|
||||
}
|
||||
|
||||
private static class TTimeRangeStandardSchemeFactory implements SchemeFactory {
|
||||
public TTimeRangeStandardScheme getScheme() {
|
||||
return new TTimeRangeStandardScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TTimeRangeStandardScheme extends StandardScheme<TTimeRange> {
|
||||
|
||||
public void read(org.apache.thrift.protocol.TProtocol iprot, TTimeRange struct) throws org.apache.thrift.TException {
|
||||
org.apache.thrift.protocol.TField schemeField;
|
||||
iprot.readStructBegin();
|
||||
while (true)
|
||||
{
|
||||
schemeField = iprot.readFieldBegin();
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
|
||||
break;
|
||||
}
|
||||
switch (schemeField.id) {
|
||||
case 1: // MIN_STAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.minStamp = iprot.readI64();
|
||||
struct.setMinStampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
case 2: // MAX_STAMP
|
||||
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
|
||||
struct.maxStamp = iprot.readI64();
|
||||
struct.setMaxStampIsSet(true);
|
||||
} else {
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
|
||||
}
|
||||
iprot.readFieldEnd();
|
||||
}
|
||||
iprot.readStructEnd();
|
||||
|
||||
// check for required fields of primitive type, which can't be checked in the validate method
|
||||
if (!struct.isSetMinStamp()) {
|
||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'minStamp' was not found in serialized data! Struct: " + toString());
|
||||
}
|
||||
if (!struct.isSetMaxStamp()) {
|
||||
throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxStamp' was not found in serialized data! Struct: " + toString());
|
||||
}
|
||||
struct.validate();
|
||||
}
|
||||
|
||||
public void write(org.apache.thrift.protocol.TProtocol oprot, TTimeRange struct) throws org.apache.thrift.TException {
|
||||
struct.validate();
|
||||
|
||||
oprot.writeStructBegin(STRUCT_DESC);
|
||||
oprot.writeFieldBegin(MIN_STAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.minStamp);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldBegin(MAX_STAMP_FIELD_DESC);
|
||||
oprot.writeI64(struct.maxStamp);
|
||||
oprot.writeFieldEnd();
|
||||
oprot.writeFieldStop();
|
||||
oprot.writeStructEnd();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class TTimeRangeTupleSchemeFactory implements SchemeFactory {
|
||||
public TTimeRangeTupleScheme getScheme() {
|
||||
return new TTimeRangeTupleScheme();
|
||||
}
|
||||
}
|
||||
|
||||
private static class TTimeRangeTupleScheme extends TupleScheme<TTimeRange> {
|
||||
|
||||
@Override
|
||||
public void write(org.apache.thrift.protocol.TProtocol prot, TTimeRange struct) throws org.apache.thrift.TException {
|
||||
TTupleProtocol oprot = (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;
|
||||
struct.minStamp = iprot.readI64();
|
||||
struct.setMinStampIsSet(true);
|
||||
struct.maxStamp = iprot.readI64();
|
||||
struct.setMaxStampIsSet(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue