HBASE-1360 move up to Thrift 0.2.0

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@901398 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-01-20 22:04:37 +00:00
parent fb6ed7f687
commit a8092ffc36
14 changed files with 13501 additions and 4812 deletions

View File

@ -179,6 +179,7 @@ Release 0.21.0 - Unreleased
(Kay Kay via Stack)
HBASE-2139 findbugs task in build.xml (Kay Kay via Stack)
HBASE-2147 run zookeeper in the same jvm as master during non-distributed mode
HBASE-1360 move up to Thrift 0.2.0 (Kay Kay and Lars Francke via Stack)
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

BIN
lib/libthrift-0.2.0.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -17,31 +15,86 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.thrift.generated;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.meta_data.FieldMetaData;
import org.apache.thrift.meta_data.FieldValueMetaData;
import org.apache.thrift.protocol.*;
import java.util.*;
/**
* An AlreadyExists exceptions signals that a table with the specified
* name already exists
*/
public class AlreadyExists extends Exception implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class AlreadyExists extends Exception implements TBase<AlreadyExists._Fields>, java.io.Serializable, Cloneable, Comparable<AlreadyExists> {
private static final TStruct STRUCT_DESC = new TStruct("AlreadyExists");
private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
public String message;
public static final int MESSAGE = 1;
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
MESSAGE((short)1, "message");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
}});
@ -68,7 +121,11 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa
}
}
@Override
public AlreadyExists deepCopy() {
return new AlreadyExists(this);
}
@Deprecated
public AlreadyExists clone() {
return new AlreadyExists(this);
}
@ -77,15 +134,16 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa
return this.message;
}
public void setMessage(String message) {
public AlreadyExists setMessage(String message) {
this.message = message;
return this;
}
public void unsetMessage() {
this.message = null;
}
// Returns true if field message is set (has been asigned a value) and false otherwise
/** Returns true if field message is set (has been asigned a value) and false otherwise */
public boolean isSetMessage() {
return this.message != null;
}
@ -96,8 +154,8 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa
}
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
@ -106,29 +164,37 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case MESSAGE:
return isSetMessage();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -158,6 +224,32 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_message = true && (isSetMessage());
builder.append(present_message);
if (present_message)
builder.append(message);
return builder.toHashCode();
}
public int compareTo(AlreadyExists other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
AlreadyExists typedOther = (AlreadyExists)other;
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(message, typedOther.message);
if (lastComparison != 0) {
return lastComparison;
}
return 0;
}
@ -170,24 +262,24 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case MESSAGE:
if (field.type == TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case MESSAGE:
if (field.type == TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -208,6 +300,7 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa
@Override
public String toString() {
StringBuilder sb = new StringBuilder("AlreadyExists(");
boolean first = true;
sb.append("message:");
if (this.message == null) {
@ -215,13 +308,13 @@ public class AlreadyExists extends Exception implements TBase, java.io.Serializa
} else {
sb.append(this.message);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -19,13 +17,21 @@
*/
package org.apache.hadoop.hbase.thrift.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
@ -33,21 +39,77 @@ import org.apache.thrift.protocol.*;
/**
* A BatchMutation object is used to apply a number of Mutations to a single row.
*/
public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class BatchMutation implements TBase<BatchMutation._Fields>, java.io.Serializable, Cloneable, Comparable<BatchMutation> {
private static final TStruct STRUCT_DESC = new TStruct("BatchMutation");
private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)1);
private static final TField MUTATIONS_FIELD_DESC = new TField("mutations", TType.LIST, (short)2);
public byte[] row;
public static final int ROW = 1;
public List<Mutation> mutations;
public static final int MUTATIONS = 2;
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT,
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
ROW((short)1, "row"),
MUTATIONS((short)2, "mutations");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT,
put(_Fields.MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT,
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, Mutation.class))));
}});
@ -84,7 +146,11 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
}
}
@Override
public BatchMutation deepCopy() {
return new BatchMutation(this);
}
@Deprecated
public BatchMutation clone() {
return new BatchMutation(this);
}
@ -93,15 +159,16 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
return this.row;
}
public void setRow(byte[] row) {
public BatchMutation setRow(byte[] row) {
this.row = row;
return this;
}
public void unsetRow() {
this.row = null;
}
// Returns true if field row is set (has been asigned a value) and false otherwise
/** Returns true if field row is set (has been asigned a value) and false otherwise */
public boolean isSetRow() {
return this.row != null;
}
@ -131,15 +198,16 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
return this.mutations;
}
public void setMutations(List<Mutation> mutations) {
public BatchMutation setMutations(List<Mutation> mutations) {
this.mutations = mutations;
return this;
}
public void unsetMutations() {
this.mutations = null;
}
// Returns true if field mutations is set (has been asigned a value) and false otherwise
/** Returns true if field mutations is set (has been asigned a value) and false otherwise */
public boolean isSetMutations() {
return this.mutations != null;
}
@ -150,8 +218,8 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
}
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
@ -168,34 +236,42 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
case MUTATIONS:
return getMutations();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case ROW:
return isSetRow();
case MUTATIONS:
return isSetMutations();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -234,6 +310,45 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_row = true && (isSetRow());
builder.append(present_row);
if (present_row)
builder.append(row);
boolean present_mutations = true && (isSetMutations());
builder.append(present_mutations);
if (present_mutations)
builder.append(mutations);
return builder.toHashCode();
}
public int compareTo(BatchMutation other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
BatchMutation typedOther = (BatchMutation)other;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetMutations()).compareTo(isSetMutations());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(mutations, typedOther.mutations);
if (lastComparison != 0) {
return lastComparison;
}
return 0;
}
@ -246,42 +361,42 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case ROW:
if (field.type == TType.STRING) {
this.row = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case MUTATIONS:
if (field.type == TType.LIST) {
{
TList _list0 = iprot.readListBegin();
this.mutations = new ArrayList<Mutation>(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
Mutation _elem2;
_elem2 = new Mutation();
_elem2.read(iprot);
this.mutations.add(_elem2);
}
iprot.readListEnd();
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case ROW:
if (field.type == TType.STRING) {
this.row = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
break;
case MUTATIONS:
if (field.type == TType.LIST) {
{
TList _list0 = iprot.readListBegin();
this.mutations = new ArrayList<Mutation>(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
Mutation _elem2;
_elem2 = new Mutation();
_elem2.read(iprot);
this.mutations.add(_elem2);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -299,7 +414,8 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.mutations.size()));
for (Mutation _iter3 : this.mutations) {
for (Mutation _iter3 : this.mutations)
{
_iter3.write(oprot);
}
oprot.writeListEnd();
@ -319,7 +435,7 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
if (this.row == null) {
sb.append("null");
} else {
sb.append(Bytes.toStringBinary(this.row));
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
@ -336,7 +452,6 @@ public class BatchMutation implements TBase, java.io.Serializable, Cloneable {
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -19,11 +17,21 @@
*/
package org.apache.hadoop.hbase.thrift.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
@ -33,9 +41,9 @@ import org.apache.thrift.protocol.*;
* such as the number of versions, compression settings, etc. It is
* used as input when creating a table or adding a column.
*/
public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class ColumnDescriptor implements TBase<ColumnDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnDescriptor> {
private static final TStruct STRUCT_DESC = new TStruct("ColumnDescriptor");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
private static final TField MAX_VERSIONS_FIELD_DESC = new TField("maxVersions", TType.I32, (short)2);
private static final TField COMPRESSION_FIELD_DESC = new TField("compression", TType.STRING, (short)3);
@ -47,53 +55,105 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
private static final TField TIME_TO_LIVE_FIELD_DESC = new TField("timeToLive", TType.I32, (short)9);
public byte[] name;
public static final int NAME = 1;
public int maxVersions;
public static final int MAXVERSIONS = 2;
public String compression;
public static final int COMPRESSION = 3;
public boolean inMemory;
public static final int INMEMORY = 4;
public String bloomFilterType;
public static final int BLOOMFILTERTYPE = 5;
public int bloomFilterVectorSize;
public static final int BLOOMFILTERVECTORSIZE = 6;
public int bloomFilterNbHashes;
public static final int BLOOMFILTERNBHASHES = 7;
public boolean blockCacheEnabled;
public static final int BLOCKCACHEENABLED = 8;
public int timeToLive;
public static final int TIMETOLIVE = 9;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
private static final long serialVersionUID = 1L;
public boolean maxVersions = false;
public boolean inMemory = false;
public boolean bloomFilterVectorSize = false;
public boolean bloomFilterNbHashes = false;
public boolean blockCacheEnabled = false;
public boolean timeToLive = false;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
NAME((short)1, "name"),
MAX_VERSIONS((short)2, "maxVersions"),
COMPRESSION((short)3, "compression"),
IN_MEMORY((short)4, "inMemory"),
BLOOM_FILTER_TYPE((short)5, "bloomFilterType"),
BLOOM_FILTER_VECTOR_SIZE((short)6, "bloomFilterVectorSize"),
BLOOM_FILTER_NB_HASHES((short)7, "bloomFilterNbHashes"),
BLOCK_CACHE_ENABLED((short)8, "blockCacheEnabled"),
TIME_TO_LIVE((short)9, "timeToLive");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
// isset id assignments
private static final int __MAXVERSIONS_ISSET_ID = 0;
private static final int __INMEMORY_ISSET_ID = 1;
private static final int __BLOOMFILTERVECTORSIZE_ISSET_ID = 2;
private static final int __BLOOMFILTERNBHASHES_ISSET_ID = 3;
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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(MAXVERSIONS, new FieldMetaData("maxVersions", TFieldRequirementType.DEFAULT,
put(_Fields.MAX_VERSIONS, new FieldMetaData("maxVersions", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
put(COMPRESSION, new FieldMetaData("compression", TFieldRequirementType.DEFAULT,
put(_Fields.COMPRESSION, new FieldMetaData("compression", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(INMEMORY, new FieldMetaData("inMemory", TFieldRequirementType.DEFAULT,
put(_Fields.IN_MEMORY, new FieldMetaData("inMemory", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
put(BLOOMFILTERTYPE, new FieldMetaData("bloomFilterType", TFieldRequirementType.DEFAULT,
put(_Fields.BLOOM_FILTER_TYPE, new FieldMetaData("bloomFilterType", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(BLOOMFILTERVECTORSIZE, new FieldMetaData("bloomFilterVectorSize", TFieldRequirementType.DEFAULT,
put(_Fields.BLOOM_FILTER_VECTOR_SIZE, new FieldMetaData("bloomFilterVectorSize", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
put(BLOOMFILTERNBHASHES, new FieldMetaData("bloomFilterNbHashes", TFieldRequirementType.DEFAULT,
put(_Fields.BLOOM_FILTER_NB_HASHES, new FieldMetaData("bloomFilterNbHashes", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
put(BLOCKCACHEENABLED, new FieldMetaData("blockCacheEnabled", TFieldRequirementType.DEFAULT,
put(_Fields.BLOCK_CACHE_ENABLED, new FieldMetaData("blockCacheEnabled", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
put(TIMETOLIVE, new FieldMetaData("timeToLive", TFieldRequirementType.DEFAULT,
put(_Fields.TIME_TO_LIVE, new FieldMetaData("timeToLive", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
}});
@ -134,49 +194,49 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
this();
this.name = name;
this.maxVersions = maxVersions;
this.__isset.maxVersions = true;
setMaxVersionsIsSet(true);
this.compression = compression;
this.inMemory = inMemory;
this.__isset.inMemory = true;
setInMemoryIsSet(true);
this.bloomFilterType = bloomFilterType;
this.bloomFilterVectorSize = bloomFilterVectorSize;
this.__isset.bloomFilterVectorSize = true;
setBloomFilterVectorSizeIsSet(true);
this.bloomFilterNbHashes = bloomFilterNbHashes;
this.__isset.bloomFilterNbHashes = true;
setBloomFilterNbHashesIsSet(true);
this.blockCacheEnabled = blockCacheEnabled;
this.__isset.blockCacheEnabled = true;
setBlockCacheEnabledIsSet(true);
this.timeToLive = timeToLive;
this.__isset.timeToLive = true;
setTimeToLiveIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ColumnDescriptor(ColumnDescriptor other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetName()) {
this.name = other.name;
}
__isset.maxVersions = other.__isset.maxVersions;
this.maxVersions = other.maxVersions;
if (other.isSetCompression()) {
this.compression = other.compression;
}
__isset.inMemory = other.__isset.inMemory;
this.inMemory = other.inMemory;
if (other.isSetBloomFilterType()) {
this.bloomFilterType = other.bloomFilterType;
}
__isset.bloomFilterVectorSize = other.__isset.bloomFilterVectorSize;
this.bloomFilterVectorSize = other.bloomFilterVectorSize;
__isset.bloomFilterNbHashes = other.__isset.bloomFilterNbHashes;
this.bloomFilterNbHashes = other.bloomFilterNbHashes;
__isset.blockCacheEnabled = other.__isset.blockCacheEnabled;
this.blockCacheEnabled = other.blockCacheEnabled;
__isset.timeToLive = other.__isset.timeToLive;
this.timeToLive = other.timeToLive;
}
@Override
public ColumnDescriptor deepCopy() {
return new ColumnDescriptor(this);
}
@Deprecated
public ColumnDescriptor clone() {
return new ColumnDescriptor(this);
}
@ -185,15 +245,16 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
return this.name;
}
public void setName(byte[] name) {
public ColumnDescriptor setName(byte[] name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
// Returns true if field name is set (has been asigned a value) and false otherwise
/** Returns true if field name is set (has been asigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
@ -208,37 +269,39 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
return this.maxVersions;
}
public void setMaxVersions(int maxVersions) {
public ColumnDescriptor setMaxVersions(int maxVersions) {
this.maxVersions = maxVersions;
this.__isset.maxVersions = true;
setMaxVersionsIsSet(true);
return this;
}
public void unsetMaxVersions() {
this.__isset.maxVersions = false;
__isset_bit_vector.clear(__MAXVERSIONS_ISSET_ID);
}
// Returns true if field maxVersions is set (has been asigned a value) and false otherwise
/** Returns true if field maxVersions is set (has been asigned a value) and false otherwise */
public boolean isSetMaxVersions() {
return this.__isset.maxVersions;
return __isset_bit_vector.get(__MAXVERSIONS_ISSET_ID);
}
public void setMaxVersionsIsSet(boolean value) {
this.__isset.maxVersions = value;
__isset_bit_vector.set(__MAXVERSIONS_ISSET_ID, value);
}
public String getCompression() {
return this.compression;
}
public void setCompression(String compression) {
public ColumnDescriptor setCompression(String compression) {
this.compression = compression;
return this;
}
public void unsetCompression() {
this.compression = null;
}
// Returns true if field compression is set (has been asigned a value) and false otherwise
/** Returns true if field compression is set (has been asigned a value) and false otherwise */
public boolean isSetCompression() {
return this.compression != null;
}
@ -253,37 +316,39 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
return this.inMemory;
}
public void setInMemory(boolean inMemory) {
public ColumnDescriptor setInMemory(boolean inMemory) {
this.inMemory = inMemory;
this.__isset.inMemory = true;
setInMemoryIsSet(true);
return this;
}
public void unsetInMemory() {
this.__isset.inMemory = false;
__isset_bit_vector.clear(__INMEMORY_ISSET_ID);
}
// Returns true if field inMemory is set (has been asigned a value) and false otherwise
/** Returns true if field inMemory is set (has been asigned a value) and false otherwise */
public boolean isSetInMemory() {
return this.__isset.inMemory;
return __isset_bit_vector.get(__INMEMORY_ISSET_ID);
}
public void setInMemoryIsSet(boolean value) {
this.__isset.inMemory = value;
__isset_bit_vector.set(__INMEMORY_ISSET_ID, value);
}
public String getBloomFilterType() {
return this.bloomFilterType;
}
public void setBloomFilterType(String bloomFilterType) {
public ColumnDescriptor setBloomFilterType(String bloomFilterType) {
this.bloomFilterType = bloomFilterType;
return this;
}
public void unsetBloomFilterType() {
this.bloomFilterType = null;
}
// Returns true if field bloomFilterType is set (has been asigned a value) and false otherwise
/** Returns true if field bloomFilterType is set (has been asigned a value) and false otherwise */
public boolean isSetBloomFilterType() {
return this.bloomFilterType != null;
}
@ -298,92 +363,96 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
return this.bloomFilterVectorSize;
}
public void setBloomFilterVectorSize(int bloomFilterVectorSize) {
public ColumnDescriptor setBloomFilterVectorSize(int bloomFilterVectorSize) {
this.bloomFilterVectorSize = bloomFilterVectorSize;
this.__isset.bloomFilterVectorSize = true;
setBloomFilterVectorSizeIsSet(true);
return this;
}
public void unsetBloomFilterVectorSize() {
this.__isset.bloomFilterVectorSize = false;
__isset_bit_vector.clear(__BLOOMFILTERVECTORSIZE_ISSET_ID);
}
// Returns true if field bloomFilterVectorSize is set (has been asigned a value) and false otherwise
/** Returns true if field bloomFilterVectorSize is set (has been asigned a value) and false otherwise */
public boolean isSetBloomFilterVectorSize() {
return this.__isset.bloomFilterVectorSize;
return __isset_bit_vector.get(__BLOOMFILTERVECTORSIZE_ISSET_ID);
}
public void setBloomFilterVectorSizeIsSet(boolean value) {
this.__isset.bloomFilterVectorSize = value;
__isset_bit_vector.set(__BLOOMFILTERVECTORSIZE_ISSET_ID, value);
}
public int getBloomFilterNbHashes() {
return this.bloomFilterNbHashes;
}
public void setBloomFilterNbHashes(int bloomFilterNbHashes) {
public ColumnDescriptor setBloomFilterNbHashes(int bloomFilterNbHashes) {
this.bloomFilterNbHashes = bloomFilterNbHashes;
this.__isset.bloomFilterNbHashes = true;
setBloomFilterNbHashesIsSet(true);
return this;
}
public void unsetBloomFilterNbHashes() {
this.__isset.bloomFilterNbHashes = false;
__isset_bit_vector.clear(__BLOOMFILTERNBHASHES_ISSET_ID);
}
// Returns true if field bloomFilterNbHashes is set (has been asigned a value) and false otherwise
/** Returns true if field bloomFilterNbHashes is set (has been asigned a value) and false otherwise */
public boolean isSetBloomFilterNbHashes() {
return this.__isset.bloomFilterNbHashes;
return __isset_bit_vector.get(__BLOOMFILTERNBHASHES_ISSET_ID);
}
public void setBloomFilterNbHashesIsSet(boolean value) {
this.__isset.bloomFilterNbHashes = value;
__isset_bit_vector.set(__BLOOMFILTERNBHASHES_ISSET_ID, value);
}
public boolean isBlockCacheEnabled() {
return this.blockCacheEnabled;
}
public void setBlockCacheEnabled(boolean blockCacheEnabled) {
public ColumnDescriptor setBlockCacheEnabled(boolean blockCacheEnabled) {
this.blockCacheEnabled = blockCacheEnabled;
this.__isset.blockCacheEnabled = true;
setBlockCacheEnabledIsSet(true);
return this;
}
public void unsetBlockCacheEnabled() {
this.__isset.blockCacheEnabled = false;
__isset_bit_vector.clear(__BLOCKCACHEENABLED_ISSET_ID);
}
// Returns true if field blockCacheEnabled is set (has been asigned a value) and false otherwise
/** Returns true if field blockCacheEnabled is set (has been asigned a value) and false otherwise */
public boolean isSetBlockCacheEnabled() {
return this.__isset.blockCacheEnabled;
return __isset_bit_vector.get(__BLOCKCACHEENABLED_ISSET_ID);
}
public void setBlockCacheEnabledIsSet(boolean value) {
this.__isset.blockCacheEnabled = value;
__isset_bit_vector.set(__BLOCKCACHEENABLED_ISSET_ID, value);
}
public int getTimeToLive() {
return this.timeToLive;
}
public void setTimeToLive(int timeToLive) {
public ColumnDescriptor setTimeToLive(int timeToLive) {
this.timeToLive = timeToLive;
this.__isset.timeToLive = true;
setTimeToLiveIsSet(true);
return this;
}
public void unsetTimeToLive() {
this.__isset.timeToLive = false;
__isset_bit_vector.clear(__TIMETOLIVE_ISSET_ID);
}
// Returns true if field timeToLive is set (has been asigned a value) and false otherwise
/** Returns true if field timeToLive is set (has been asigned a value) and false otherwise */
public boolean isSetTimeToLive() {
return this.__isset.timeToLive;
return __isset_bit_vector.get(__TIMETOLIVE_ISSET_ID);
}
public void setTimeToLiveIsSet(boolean value) {
this.__isset.timeToLive = value;
__isset_bit_vector.set(__TIMETOLIVE_ISSET_ID, value);
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case NAME:
if (value == null) {
unsetName();
@ -392,7 +461,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
}
break;
case MAXVERSIONS:
case MAX_VERSIONS:
if (value == null) {
unsetMaxVersions();
} else {
@ -408,7 +477,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
}
break;
case INMEMORY:
case IN_MEMORY:
if (value == null) {
unsetInMemory();
} else {
@ -416,7 +485,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
}
break;
case BLOOMFILTERTYPE:
case BLOOM_FILTER_TYPE:
if (value == null) {
unsetBloomFilterType();
} else {
@ -424,7 +493,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
}
break;
case BLOOMFILTERVECTORSIZE:
case BLOOM_FILTER_VECTOR_SIZE:
if (value == null) {
unsetBloomFilterVectorSize();
} else {
@ -432,7 +501,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
}
break;
case BLOOMFILTERNBHASHES:
case BLOOM_FILTER_NB_HASHES:
if (value == null) {
unsetBloomFilterNbHashes();
} else {
@ -440,7 +509,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
}
break;
case BLOCKCACHEENABLED:
case BLOCK_CACHE_ENABLED:
if (value == null) {
unsetBlockCacheEnabled();
} else {
@ -448,7 +517,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
}
break;
case TIMETOLIVE:
case TIME_TO_LIVE:
if (value == null) {
unsetTimeToLive();
} else {
@ -456,69 +525,77 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return getName();
case MAXVERSIONS:
return Integer.valueOf(getMaxVersions());
case MAX_VERSIONS:
return new Integer(getMaxVersions());
case COMPRESSION:
return getCompression();
case INMEMORY:
return Boolean.valueOf(isInMemory());
case IN_MEMORY:
return new Boolean(isInMemory());
case BLOOMFILTERTYPE:
case BLOOM_FILTER_TYPE:
return getBloomFilterType();
case BLOOMFILTERVECTORSIZE:
return Integer.valueOf(getBloomFilterVectorSize());
case BLOOM_FILTER_VECTOR_SIZE:
return new Integer(getBloomFilterVectorSize());
case BLOOMFILTERNBHASHES:
return Integer.valueOf(getBloomFilterNbHashes());
case BLOOM_FILTER_NB_HASHES:
return new Integer(getBloomFilterNbHashes());
case BLOCKCACHEENABLED:
return Boolean.valueOf(isBlockCacheEnabled());
case BLOCK_CACHE_ENABLED:
return new Boolean(isBlockCacheEnabled());
case TIMETOLIVE:
return Integer.valueOf(getTimeToLive());
case TIME_TO_LIVE:
return new Integer(getTimeToLive());
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case NAME:
return isSetName();
case MAXVERSIONS:
case MAX_VERSIONS:
return isSetMaxVersions();
case COMPRESSION:
return isSetCompression();
case INMEMORY:
case IN_MEMORY:
return isSetInMemory();
case BLOOMFILTERTYPE:
case BLOOM_FILTER_TYPE:
return isSetBloomFilterType();
case BLOOMFILTERVECTORSIZE:
case BLOOM_FILTER_VECTOR_SIZE:
return isSetBloomFilterVectorSize();
case BLOOMFILTERNBHASHES:
case BLOOM_FILTER_NB_HASHES:
return isSetBloomFilterNbHashes();
case BLOCKCACHEENABLED:
case BLOCK_CACHE_ENABLED:
return isSetBlockCacheEnabled();
case TIMETOLIVE:
case TIME_TO_LIVE:
return isSetTimeToLive();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -620,6 +697,136 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_name = true && (isSetName());
builder.append(present_name);
if (present_name)
builder.append(name);
boolean present_maxVersions = true;
builder.append(present_maxVersions);
if (present_maxVersions)
builder.append(maxVersions);
boolean present_compression = true && (isSetCompression());
builder.append(present_compression);
if (present_compression)
builder.append(compression);
boolean present_inMemory = true;
builder.append(present_inMemory);
if (present_inMemory)
builder.append(inMemory);
boolean present_bloomFilterType = true && (isSetBloomFilterType());
builder.append(present_bloomFilterType);
if (present_bloomFilterType)
builder.append(bloomFilterType);
boolean present_bloomFilterVectorSize = true;
builder.append(present_bloomFilterVectorSize);
if (present_bloomFilterVectorSize)
builder.append(bloomFilterVectorSize);
boolean present_bloomFilterNbHashes = true;
builder.append(present_bloomFilterNbHashes);
if (present_bloomFilterNbHashes)
builder.append(bloomFilterNbHashes);
boolean present_blockCacheEnabled = true;
builder.append(present_blockCacheEnabled);
if (present_blockCacheEnabled)
builder.append(blockCacheEnabled);
boolean present_timeToLive = true;
builder.append(present_timeToLive);
if (present_timeToLive)
builder.append(timeToLive);
return builder.toHashCode();
}
public int compareTo(ColumnDescriptor other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
ColumnDescriptor typedOther = (ColumnDescriptor)other;
lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(isSetMaxVersions());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(maxVersions, typedOther.maxVersions);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetCompression()).compareTo(isSetCompression());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(compression, typedOther.compression);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(isSetInMemory());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(inMemory, typedOther.inMemory);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetBloomFilterType()).compareTo(isSetBloomFilterType());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(bloomFilterType, typedOther.bloomFilterType);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(isSetBloomFilterVectorSize());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(bloomFilterVectorSize, typedOther.bloomFilterVectorSize);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(isSetBloomFilterNbHashes());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(bloomFilterNbHashes, typedOther.bloomFilterNbHashes);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(isSetBlockCacheEnabled());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(blockCacheEnabled, typedOther.blockCacheEnabled);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(isSetTimeToLive());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(timeToLive, typedOther.timeToLive);
if (lastComparison != 0) {
return lastComparison;
}
return 0;
}
@ -632,86 +839,86 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case NAME:
if (field.type == TType.STRING) {
this.name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case MAXVERSIONS:
if (field.type == TType.I32) {
this.maxVersions = iprot.readI32();
this.__isset.maxVersions = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case COMPRESSION:
if (field.type == TType.STRING) {
this.compression = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case INMEMORY:
if (field.type == TType.BOOL) {
this.inMemory = iprot.readBool();
this.__isset.inMemory = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BLOOMFILTERTYPE:
if (field.type == TType.STRING) {
this.bloomFilterType = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BLOOMFILTERVECTORSIZE:
if (field.type == TType.I32) {
this.bloomFilterVectorSize = iprot.readI32();
this.__isset.bloomFilterVectorSize = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BLOOMFILTERNBHASHES:
if (field.type == TType.I32) {
this.bloomFilterNbHashes = iprot.readI32();
this.__isset.bloomFilterNbHashes = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BLOCKCACHEENABLED:
if (field.type == TType.BOOL) {
this.blockCacheEnabled = iprot.readBool();
this.__isset.blockCacheEnabled = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TIMETOLIVE:
if (field.type == TType.I32) {
this.timeToLive = iprot.readI32();
this.__isset.timeToLive = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case NAME:
if (field.type == TType.STRING) {
this.name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case MAX_VERSIONS:
if (field.type == TType.I32) {
this.maxVersions = iprot.readI32();
setMaxVersionsIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case COMPRESSION:
if (field.type == TType.STRING) {
this.compression = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case IN_MEMORY:
if (field.type == TType.BOOL) {
this.inMemory = iprot.readBool();
setInMemoryIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BLOOM_FILTER_TYPE:
if (field.type == TType.STRING) {
this.bloomFilterType = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BLOOM_FILTER_VECTOR_SIZE:
if (field.type == TType.I32) {
this.bloomFilterVectorSize = iprot.readI32();
setBloomFilterVectorSizeIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BLOOM_FILTER_NB_HASHES:
if (field.type == TType.I32) {
this.bloomFilterNbHashes = iprot.readI32();
setBloomFilterNbHashesIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BLOCK_CACHE_ENABLED:
if (field.type == TType.BOOL) {
this.blockCacheEnabled = iprot.readBool();
setBlockCacheEnabledIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TIME_TO_LIVE:
if (field.type == TType.I32) {
this.timeToLive = iprot.readI32();
setTimeToLiveIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -766,7 +973,7 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
if (this.name == null) {
sb.append("null");
} else {
sb.append(Bytes.toString(this.name));
sb.append(this.name);
}
first = false;
if (!first) sb.append(", ");
@ -815,7 +1022,6 @@ public class ColumnDescriptor implements TBase, java.io.Serializable, Cloneable
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -19,9 +17,20 @@
*/
package org.apache.hadoop.hbase.thrift.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
@ -32,16 +41,72 @@ import org.apache.thrift.protocol.*;
* to the Hbase master or an Hbase region server. Also used to return
* more general Hbase error conditions.
*/
public class IOError extends Exception implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class IOError extends Exception implements TBase<IOError._Fields>, java.io.Serializable, Cloneable, Comparable<IOError> {
private static final TStruct STRUCT_DESC = new TStruct("IOError");
private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
public String message;
public static final int MESSAGE = 1;
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
MESSAGE((short)1, "message");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
}});
@ -68,7 +133,11 @@ public class IOError extends Exception implements TBase, java.io.Serializable, C
}
}
@Override
public IOError deepCopy() {
return new IOError(this);
}
@Deprecated
public IOError clone() {
return new IOError(this);
}
@ -77,15 +146,16 @@ public class IOError extends Exception implements TBase, java.io.Serializable, C
return this.message;
}
public void setMessage(String message) {
public IOError setMessage(String message) {
this.message = message;
return this;
}
public void unsetMessage() {
this.message = null;
}
// Returns true if field message is set (has been asigned a value) and false otherwise
/** Returns true if field message is set (has been asigned a value) and false otherwise */
public boolean isSetMessage() {
return this.message != null;
}
@ -96,8 +166,8 @@ public class IOError extends Exception implements TBase, java.io.Serializable, C
}
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
@ -106,29 +176,37 @@ public class IOError extends Exception implements TBase, java.io.Serializable, C
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case MESSAGE:
return isSetMessage();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -158,6 +236,32 @@ public class IOError extends Exception implements TBase, java.io.Serializable, C
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_message = true && (isSetMessage());
builder.append(present_message);
if (present_message)
builder.append(message);
return builder.toHashCode();
}
public int compareTo(IOError other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
IOError typedOther = (IOError)other;
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(message, typedOther.message);
if (lastComparison != 0) {
return lastComparison;
}
return 0;
}
@ -170,24 +274,24 @@ public class IOError extends Exception implements TBase, java.io.Serializable, C
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case MESSAGE:
if (field.type == TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case MESSAGE:
if (field.type == TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -208,6 +312,7 @@ public class IOError extends Exception implements TBase, java.io.Serializable, C
@Override
public String toString() {
StringBuilder sb = new StringBuilder("IOError(");
boolean first = true;
sb.append("message:");
if (this.message == null) {
@ -215,13 +320,13 @@ public class IOError extends Exception implements TBase, java.io.Serializable, C
} else {
sb.append(this.message);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -19,9 +17,20 @@
*/
package org.apache.hadoop.hbase.thrift.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
@ -31,16 +40,72 @@ import org.apache.thrift.protocol.*;
* An IllegalArgument exception indicates an illegal or invalid
* argument was passed into a procedure.
*/
public class IllegalArgument extends Exception implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class IllegalArgument extends Exception implements TBase<IllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<IllegalArgument> {
private static final TStruct STRUCT_DESC = new TStruct("IllegalArgument");
private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
public String message;
public static final int MESSAGE = 1;
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
MESSAGE((short)1, "message");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
}});
@ -67,7 +132,11 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali
}
}
@Override
public IllegalArgument deepCopy() {
return new IllegalArgument(this);
}
@Deprecated
public IllegalArgument clone() {
return new IllegalArgument(this);
}
@ -76,15 +145,16 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali
return this.message;
}
public void setMessage(String message) {
public IllegalArgument setMessage(String message) {
this.message = message;
return this;
}
public void unsetMessage() {
this.message = null;
}
// Returns true if field message is set (has been asigned a value) and false otherwise
/** Returns true if field message is set (has been asigned a value) and false otherwise */
public boolean isSetMessage() {
return this.message != null;
}
@ -95,8 +165,8 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali
}
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
@ -105,29 +175,37 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case MESSAGE:
return isSetMessage();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -157,6 +235,32 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_message = true && (isSetMessage());
builder.append(present_message);
if (present_message)
builder.append(message);
return builder.toHashCode();
}
public int compareTo(IllegalArgument other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
IllegalArgument typedOther = (IllegalArgument)other;
lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(message, typedOther.message);
if (lastComparison != 0) {
return lastComparison;
}
return 0;
}
@ -169,24 +273,24 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case MESSAGE:
if (field.type == TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case MESSAGE:
if (field.type == TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -207,6 +311,7 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali
@Override
public String toString() {
StringBuilder sb = new StringBuilder("IllegalArgument(");
boolean first = true;
sb.append("message:");
if (this.message == null) {
@ -214,13 +319,13 @@ public class IllegalArgument extends Exception implements TBase, java.io.Seriali
} else {
sb.append(this.message);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -19,11 +17,21 @@
*/
package org.apache.hadoop.hbase.thrift.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
@ -31,32 +39,84 @@ import org.apache.thrift.protocol.*;
/**
* A Mutation object is used to either update or delete a column-value.
*/
public class Mutation implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class Mutation implements TBase<Mutation._Fields>, java.io.Serializable, Cloneable, Comparable<Mutation> {
private static final TStruct STRUCT_DESC = new TStruct("Mutation");
private static final TField IS_DELETE_FIELD_DESC = new TField("isDelete", TType.BOOL, (short)1);
private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)2);
private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)3);
public boolean isDelete;
public static final int ISDELETE = 1;
public byte[] column;
public static final int COLUMN = 2;
public byte[] value;
public static final int VALUE = 3;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
private static final long serialVersionUID = 1L;
public boolean isDelete = false;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
IS_DELETE((short)1, "isDelete"),
COLUMN((short)2, "column"),
VALUE((short)3, "value");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(ISDELETE, new FieldMetaData("isDelete", TFieldRequirementType.DEFAULT,
// isset id assignments
private static final int __ISDELETE_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.IS_DELETE, new FieldMetaData("isDelete", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT,
put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT,
put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
}});
@ -76,7 +136,7 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
{
this();
this.isDelete = isDelete;
this.__isset.isDelete = true;
setIsDeleteIsSet(true);
this.column = column;
this.value = value;
}
@ -85,7 +145,8 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
* Performs a deep copy on <i>other</i>.
*/
public Mutation(Mutation other) {
__isset.isDelete = other.__isset.isDelete;
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.isDelete = other.isDelete;
if (other.isSetColumn()) {
this.column = other.column;
@ -95,7 +156,11 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
}
}
@Override
public Mutation deepCopy() {
return new Mutation(this);
}
@Deprecated
public Mutation clone() {
return new Mutation(this);
}
@ -104,37 +169,39 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
return this.isDelete;
}
public void setIsDelete(boolean isDelete) {
public Mutation setIsDelete(boolean isDelete) {
this.isDelete = isDelete;
this.__isset.isDelete = true;
setIsDeleteIsSet(true);
return this;
}
public void unsetIsDelete() {
this.__isset.isDelete = false;
__isset_bit_vector.clear(__ISDELETE_ISSET_ID);
}
// Returns true if field isDelete is set (has been asigned a value) and false otherwise
/** Returns true if field isDelete is set (has been asigned a value) and false otherwise */
public boolean isSetIsDelete() {
return this.__isset.isDelete;
return __isset_bit_vector.get(__ISDELETE_ISSET_ID);
}
public void setIsDeleteIsSet(boolean value) {
this.__isset.isDelete = value;
__isset_bit_vector.set(__ISDELETE_ISSET_ID, value);
}
public byte[] getColumn() {
return this.column;
}
public void setColumn(byte[] column) {
public Mutation setColumn(byte[] column) {
this.column = column;
return this;
}
public void unsetColumn() {
this.column = null;
}
// Returns true if field column is set (has been asigned a value) and false otherwise
/** Returns true if field column is set (has been asigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
@ -149,15 +216,16 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
return this.value;
}
public void setValue(byte[] value) {
public Mutation setValue(byte[] value) {
this.value = value;
return this;
}
public void unsetValue() {
this.value = null;
}
// Returns true if field value is set (has been asigned a value) and false otherwise
/** Returns true if field value is set (has been asigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
@ -168,9 +236,9 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
}
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case ISDELETE:
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case IS_DELETE:
if (value == null) {
unsetIsDelete();
} else {
@ -194,15 +262,17 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
case ISDELETE:
return Boolean.valueOf(isIsDelete());
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case IS_DELETE:
return new Boolean(isIsDelete());
case COLUMN:
return getColumn();
@ -210,23 +280,29 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
case VALUE:
return getValue();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
case ISDELETE:
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case IS_DELETE:
return isSetIsDelete();
case COLUMN:
return isSetColumn();
case VALUE:
return isSetValue();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -274,6 +350,58 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_isDelete = true;
builder.append(present_isDelete);
if (present_isDelete)
builder.append(isDelete);
boolean present_column = true && (isSetColumn());
builder.append(present_column);
if (present_column)
builder.append(column);
boolean present_value = true && (isSetValue());
builder.append(present_value);
if (present_value)
builder.append(value);
return builder.toHashCode();
}
public int compareTo(Mutation other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
Mutation typedOther = (Mutation)other;
lastComparison = Boolean.valueOf(isSetIsDelete()).compareTo(isSetIsDelete());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(isDelete, typedOther.isDelete);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetColumn()).compareTo(isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(column, typedOther.column);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetValue()).compareTo(isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(value, typedOther.value);
if (lastComparison != 0) {
return lastComparison;
}
return 0;
}
@ -286,39 +414,39 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case ISDELETE:
if (field.type == TType.BOOL) {
this.isDelete = iprot.readBool();
this.__isset.isDelete = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case COLUMN:
if (field.type == TType.STRING) {
this.column = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case VALUE:
if (field.type == TType.STRING) {
this.value = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case IS_DELETE:
if (field.type == TType.BOOL) {
this.isDelete = iprot.readBool();
setIsDeleteIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case COLUMN:
if (field.type == TType.STRING) {
this.column = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case VALUE:
if (field.type == TType.STRING) {
this.value = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -357,7 +485,7 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
if (this.column == null) {
sb.append("null");
} else {
sb.append(Bytes.toStringBinary(this.column));
sb.append(this.column);
}
first = false;
if (!first) sb.append(", ");
@ -365,7 +493,7 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
if (this.value == null) {
sb.append("null");
} else {
sb.append(Bytes.toStringBinary(this.value));
sb.append(this.value);
}
first = false;
sb.append(")");
@ -374,7 +502,6 @@ public class Mutation implements TBase, java.io.Serializable, Cloneable {
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -19,11 +17,21 @@
*/
package org.apache.hadoop.hbase.thrift.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
@ -34,27 +42,79 @@ import org.apache.thrift.protocol.*;
* the timestamp of a cell to a first-class value, making it easy to take
* note of temporal data. Cell is used all the way from HStore up to HTable.
*/
public class TCell implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class TCell implements TBase<TCell._Fields>, java.io.Serializable, Cloneable, Comparable<TCell> {
private static final TStruct STRUCT_DESC = new TStruct("TCell");
private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)1);
private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
public byte[] value;
public static final int VALUE = 1;
public long timestamp;
public static final int TIMESTAMP = 2;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
private static final long serialVersionUID = 1L;
public boolean timestamp = false;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
VALUE((short)1, "value"),
TIMESTAMP((short)2, "timestamp");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT,
// isset id assignments
private static final int __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT,
put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
}});
@ -72,21 +132,26 @@ public class TCell implements TBase, java.io.Serializable, Cloneable {
this();
this.value = value;
this.timestamp = timestamp;
this.__isset.timestamp = true;
setTimestampIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TCell(TCell other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetValue()) {
this.value = other.value;
}
__isset.timestamp = other.__isset.timestamp;
this.timestamp = other.timestamp;
}
@Override
public TCell deepCopy() {
return new TCell(this);
}
@Deprecated
public TCell clone() {
return new TCell(this);
}
@ -95,15 +160,16 @@ public class TCell implements TBase, java.io.Serializable, Cloneable {
return this.value;
}
public void setValue(byte[] value) {
public TCell setValue(byte[] value) {
this.value = value;
return this;
}
public void unsetValue() {
this.value = null;
}
// Returns true if field value is set (has been asigned a value) and false otherwise
/** Returns true if field value is set (has been asigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
@ -118,26 +184,27 @@ public class TCell implements TBase, java.io.Serializable, Cloneable {
return this.timestamp;
}
public void setTimestamp(long timestamp) {
public TCell setTimestamp(long timestamp) {
this.timestamp = timestamp;
this.__isset.timestamp = true;
setTimestampIsSet(true);
return this;
}
public void unsetTimestamp() {
this.__isset.timestamp = false;
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
// Returns true if field timestamp is set (has been asigned a value) and false otherwise
/** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
public boolean isSetTimestamp() {
return this.__isset.timestamp;
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
this.__isset.timestamp = value;
__isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case VALUE:
if (value == null) {
unsetValue();
@ -154,34 +221,42 @@ public class TCell implements TBase, java.io.Serializable, Cloneable {
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case VALUE:
return getValue();
case TIMESTAMP:
return getTimestamp();
return new Long(getTimestamp());
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case VALUE:
return isSetValue();
case TIMESTAMP:
return isSetTimestamp();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -220,6 +295,45 @@ public class TCell implements TBase, java.io.Serializable, Cloneable {
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_value = true && (isSetValue());
builder.append(present_value);
if (present_value)
builder.append(value);
boolean present_timestamp = true;
builder.append(present_timestamp);
if (present_timestamp)
builder.append(timestamp);
return builder.toHashCode();
}
public int compareTo(TCell other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
TCell typedOther = (TCell)other;
lastComparison = Boolean.valueOf(isSetValue()).compareTo(isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(value, typedOther.value);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
return 0;
}
@ -232,32 +346,32 @@ public class TCell implements TBase, java.io.Serializable, Cloneable {
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case VALUE:
if (field.type == TType.STRING) {
this.value = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TIMESTAMP:
if (field.type == TType.I64) {
this.timestamp = iprot.readI64();
this.__isset.timestamp = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case VALUE:
if (field.type == TType.STRING) {
this.value = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TIMESTAMP:
if (field.type == TType.I64) {
this.timestamp = iprot.readI64();
setTimestampIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -287,7 +401,7 @@ public class TCell implements TBase, java.io.Serializable, Cloneable {
if (this.value == null) {
sb.append("null");
} else {
sb.append(Bytes.toStringBinary(this.value));
sb.append(this.value);
}
first = false;
if (!first) sb.append(", ");
@ -300,7 +414,6 @@ public class TCell implements TBase, java.io.Serializable, Cloneable {
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -19,11 +17,21 @@
*/
package org.apache.hadoop.hbase.thrift.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
@ -31,9 +39,9 @@ import org.apache.thrift.protocol.*;
/**
* A TRegionInfo contains information about an HTable region.
*/
public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class TRegionInfo implements TBase<TRegionInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TRegionInfo> {
private static final TStruct STRUCT_DESC = new TStruct("TRegionInfo");
private static final TField START_KEY_FIELD_DESC = new TField("startKey", TType.STRING, (short)1);
private static final TField END_KEY_FIELD_DESC = new TField("endKey", TType.STRING, (short)2);
private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)3);
@ -41,33 +49,85 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
private static final TField VERSION_FIELD_DESC = new TField("version", TType.BYTE, (short)5);
public byte[] startKey;
public static final int STARTKEY = 1;
public byte[] endKey;
public static final int ENDKEY = 2;
public long id;
public static final int ID = 3;
public byte[] name;
public static final int NAME = 4;
public byte version;
public static final int VERSION = 5;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
private static final long serialVersionUID = 1L;
public boolean id = false;
public boolean version = false;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
START_KEY((short)1, "startKey"),
END_KEY((short)2, "endKey"),
ID((short)3, "id"),
NAME((short)4, "name"),
VERSION((short)5, "version");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(STARTKEY, new FieldMetaData("startKey", TFieldRequirementType.DEFAULT,
// isset id assignments
private static final int __ID_ISSET_ID = 0;
private static final int __VERSION_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.START_KEY, new FieldMetaData("startKey", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(ENDKEY, new FieldMetaData("endKey", TFieldRequirementType.DEFAULT,
put(_Fields.END_KEY, new FieldMetaData("endKey", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT,
put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(VERSION, new FieldMetaData("version", TFieldRequirementType.DEFAULT,
put(_Fields.VERSION, new FieldMetaData("version", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BYTE)));
}});
@ -89,32 +149,36 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
this.startKey = startKey;
this.endKey = endKey;
this.id = id;
this.__isset.id = true;
setIdIsSet(true);
this.name = name;
this.version = version;
this.__isset.version = true;
setVersionIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TRegionInfo(TRegionInfo other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
if (other.isSetStartKey()) {
this.startKey = other.startKey;
}
if (other.isSetEndKey()) {
this.endKey = other.endKey;
}
__isset.id = other.__isset.id;
this.id = other.id;
if (other.isSetName()) {
this.name = other.name;
}
__isset.version = other.__isset.version;
this.version = other.version;
}
@Override
public TRegionInfo deepCopy() {
return new TRegionInfo(this);
}
@Deprecated
public TRegionInfo clone() {
return new TRegionInfo(this);
}
@ -123,15 +187,16 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
return this.startKey;
}
public void setStartKey(byte[] startKey) {
public TRegionInfo setStartKey(byte[] startKey) {
this.startKey = startKey;
return this;
}
public void unsetStartKey() {
this.startKey = null;
}
// Returns true if field startKey is set (has been asigned a value) and false otherwise
/** Returns true if field startKey is set (has been asigned a value) and false otherwise */
public boolean isSetStartKey() {
return this.startKey != null;
}
@ -146,15 +211,16 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
return this.endKey;
}
public void setEndKey(byte[] endKey) {
public TRegionInfo setEndKey(byte[] endKey) {
this.endKey = endKey;
return this;
}
public void unsetEndKey() {
this.endKey = null;
}
// Returns true if field endKey is set (has been asigned a value) and false otherwise
/** Returns true if field endKey is set (has been asigned a value) and false otherwise */
public boolean isSetEndKey() {
return this.endKey != null;
}
@ -169,37 +235,39 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
return this.id;
}
public void setId(long id) {
public TRegionInfo setId(long id) {
this.id = id;
this.__isset.id = true;
setIdIsSet(true);
return this;
}
public void unsetId() {
this.__isset.id = false;
__isset_bit_vector.clear(__ID_ISSET_ID);
}
// Returns true if field id is set (has been asigned a value) and false otherwise
/** Returns true if field id is set (has been asigned a value) and false otherwise */
public boolean isSetId() {
return this.__isset.id;
return __isset_bit_vector.get(__ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
this.__isset.id = value;
__isset_bit_vector.set(__ID_ISSET_ID, value);
}
public byte[] getName() {
return this.name;
}
public void setName(byte[] name) {
public TRegionInfo setName(byte[] name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
// Returns true if field name is set (has been asigned a value) and false otherwise
/** Returns true if field name is set (has been asigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
@ -214,27 +282,28 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
return this.version;
}
public void setVersion(byte version) {
public TRegionInfo setVersion(byte version) {
this.version = version;
this.__isset.version = true;
setVersionIsSet(true);
return this;
}
public void unsetVersion() {
this.__isset.version = false;
__isset_bit_vector.clear(__VERSION_ISSET_ID);
}
// Returns true if field version is set (has been asigned a value) and false otherwise
/** Returns true if field version is set (has been asigned a value) and false otherwise */
public boolean isSetVersion() {
return this.__isset.version;
return __isset_bit_vector.get(__VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
this.__isset.version = value;
__isset_bit_vector.set(__VERSION_ISSET_ID, value);
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case STARTKEY:
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case START_KEY:
if (value == null) {
unsetStartKey();
} else {
@ -242,7 +311,7 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
}
break;
case ENDKEY:
case END_KEY:
if (value == null) {
unsetEndKey();
} else {
@ -274,39 +343,44 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
case STARTKEY:
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case START_KEY:
return getStartKey();
case ENDKEY:
case END_KEY:
return getEndKey();
case ID:
return getId();
return new Long(getId());
case NAME:
return getName();
case VERSION:
return getVersion();
return new Byte(getVersion());
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
case STARTKEY:
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case START_KEY:
return isSetStartKey();
case ENDKEY:
case END_KEY:
return isSetEndKey();
case ID:
return isSetId();
@ -314,9 +388,12 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
return isSetName();
case VERSION:
return isSetVersion();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -382,6 +459,84 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_startKey = true && (isSetStartKey());
builder.append(present_startKey);
if (present_startKey)
builder.append(startKey);
boolean present_endKey = true && (isSetEndKey());
builder.append(present_endKey);
if (present_endKey)
builder.append(endKey);
boolean present_id = true;
builder.append(present_id);
if (present_id)
builder.append(id);
boolean present_name = true && (isSetName());
builder.append(present_name);
if (present_name)
builder.append(name);
boolean present_version = true;
builder.append(present_version);
if (present_version)
builder.append(version);
return builder.toHashCode();
}
public int compareTo(TRegionInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
TRegionInfo typedOther = (TRegionInfo)other;
lastComparison = Boolean.valueOf(isSetStartKey()).compareTo(isSetStartKey());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(startKey, typedOther.startKey);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetEndKey()).compareTo(isSetEndKey());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(endKey, typedOther.endKey);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(id, typedOther.id);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetName()).compareTo(isSetName());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = Boolean.valueOf(isSetVersion()).compareTo(isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
lastComparison = TBaseHelper.compareTo(version, typedOther.version);
if (lastComparison != 0) {
return lastComparison;
}
return 0;
}
@ -394,54 +549,54 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case STARTKEY:
if (field.type == TType.STRING) {
this.startKey = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case ENDKEY:
if (field.type == TType.STRING) {
this.endKey = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case ID:
if (field.type == TType.I64) {
this.id = iprot.readI64();
this.__isset.id = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case NAME:
if (field.type == TType.STRING) {
this.name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case VERSION:
if (field.type == TType.BYTE) {
this.version = iprot.readByte();
this.__isset.version = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case START_KEY:
if (field.type == TType.STRING) {
this.startKey = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case END_KEY:
if (field.type == TType.STRING) {
this.endKey = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case ID:
if (field.type == TType.I64) {
this.id = iprot.readI64();
setIdIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case NAME:
if (field.type == TType.STRING) {
this.name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case VERSION:
if (field.type == TType.BYTE) {
this.version = iprot.readByte();
setVersionIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -484,7 +639,7 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
if (this.startKey == null) {
sb.append("null");
} else {
sb.append(Bytes.toStringBinary(this.startKey));
sb.append(this.startKey);
}
first = false;
if (!first) sb.append(", ");
@ -492,7 +647,7 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
if (this.endKey == null) {
sb.append("null");
} else {
sb.append(Bytes.toStringBinary(this.endKey));
sb.append(this.endKey);
}
first = false;
if (!first) sb.append(", ");
@ -504,7 +659,7 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
if (this.name == null) {
sb.append("null");
} else {
sb.append(Bytes.toStringBinary(this.name));
sb.append(this.name);
}
first = false;
if (!first) sb.append(", ");
@ -517,7 +672,6 @@ public class TRegionInfo implements TBase, java.io.Serializable, Cloneable {
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

View File

@ -1,6 +1,4 @@
/*
* Copyright 2009 The Apache Software Foundation
*
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -19,11 +17,21 @@
*/
package org.apache.hadoop.hbase.thrift.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
@ -31,21 +39,77 @@ import org.apache.thrift.protocol.*;
/**
* Holds row name and then a map of columns to cells.
*/
public class TRowResult implements TBase, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 1L;
public class TRowResult implements TBase<TRowResult._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("TRowResult");
private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)1);
private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.MAP, (short)2);
public byte[] row;
public static final int ROW = 1;
public Map<byte[],TCell> columns;
public static final int COLUMNS = 2;
public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
put(ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT,
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
ROW((short)1, "row"),
COLUMNS((short)2, "columns");
private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byId.put((int)field._thriftId, field);
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
return byId.get(fieldId);
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT,
put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT,
new MapMetaData(TType.MAP,
new FieldValueMetaData(TType.STRING),
new StructMetaData(TType.STRUCT, TCell.class))));
@ -91,7 +155,11 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
}
}
@Override
public TRowResult deepCopy() {
return new TRowResult(this);
}
@Deprecated
public TRowResult clone() {
return new TRowResult(this);
}
@ -100,15 +168,16 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
return this.row;
}
public void setRow(byte[] row) {
public TRowResult setRow(byte[] row) {
this.row = row;
return this;
}
public void unsetRow() {
this.row = null;
}
// Returns true if field row is set (has been asigned a value) and false otherwise
/** Returns true if field row is set (has been asigned a value) and false otherwise */
public boolean isSetRow() {
return this.row != null;
}
@ -134,15 +203,16 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
return this.columns;
}
public void setColumns(Map<byte[],TCell> columns) {
public TRowResult setColumns(Map<byte[],TCell> columns) {
this.columns = columns;
return this;
}
public void unsetColumns() {
this.columns = null;
}
// Returns true if field columns is set (has been asigned a value) and false otherwise
/** Returns true if field columns is set (has been asigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
@ -153,8 +223,8 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
}
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ROW:
if (value == null) {
unsetRow();
@ -171,34 +241,42 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
}
break;
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
}
public Object getFieldValue(int fieldID) {
switch (fieldID) {
public void setFieldValue(int fieldID, Object value) {
setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ROW:
return getRow();
case COLUMNS:
return getColumns();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
public Object getFieldValue(int fieldId) {
return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
public boolean isSet(_Fields field) {
switch (field) {
case ROW:
return isSetRow();
case COLUMNS:
return isSetColumns();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
throw new IllegalStateException();
}
public boolean isSet(int fieldID) {
return isSet(_Fields.findByThriftIdOrThrow(fieldID));
}
@Override
@ -237,7 +315,19 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_row = true && (isSetRow());
builder.append(present_row);
if (present_row)
builder.append(row);
boolean present_columns = true && (isSetColumns());
builder.append(present_columns);
if (present_columns)
builder.append(columns);
return builder.toHashCode();
}
public void read(TProtocol iprot) throws TException {
@ -249,44 +339,44 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case ROW:
if (field.type == TType.STRING) {
this.row = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case COLUMNS:
if (field.type == TType.MAP) {
{
TMap _map4 = iprot.readMapBegin();
this.columns = new HashMap<byte[],TCell>(2*_map4.size);
for (int _i5 = 0; _i5 < _map4.size; ++_i5)
{
byte[] _key6;
TCell _val7;
_key6 = iprot.readBinary();
_val7 = new TCell();
_val7.read(iprot);
this.columns.put(_key6, _val7);
}
iprot.readMapEnd();
_Fields fieldId = _Fields.findByThriftId(field.id);
if (fieldId == null) {
TProtocolUtil.skip(iprot, field.type);
} else {
switch (fieldId) {
case ROW:
if (field.type == TType.STRING) {
this.row = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
break;
case COLUMNS:
if (field.type == TType.MAP) {
{
TMap _map4 = iprot.readMapBegin();
this.columns = new HashMap<byte[],TCell>(2*_map4.size);
for (int _i5 = 0; _i5 < _map4.size; ++_i5)
{
byte[] _key6;
TCell _val7;
_key6 = iprot.readBinary();
_val7 = new TCell();
_val7.read(iprot);
this.columns.put(_key6, _val7);
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
}
iprot.readFieldEnd();
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}
@ -304,7 +394,8 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.columns.size()));
for (Map.Entry<byte[], TCell> _iter8 : this.columns.entrySet()) {
for (Map.Entry<byte[], TCell> _iter8 : this.columns.entrySet())
{
oprot.writeBinary(_iter8.getKey());
_iter8.getValue().write(oprot);
}
@ -325,7 +416,7 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
if (this.row == null) {
sb.append("null");
} else {
sb.append(Bytes.toStringBinary(this.row));
sb.append(this.row);
}
first = false;
if (!first) sb.append(", ");
@ -342,7 +433,6 @@ public class TRowResult implements TBase, java.io.Serializable, Cloneable {
public void validate() throws TException {
// check for required fields
// check that fields of type enum have valid values
}
}

View File

@ -20,28 +20,23 @@
<head />
<body bgcolor="white">
Provides an HBase <a href="http://developers.facebook.com/thrift/">Thrift</a>
Provides an HBase <a href="http://incubator.apache.org/thrift/">Thrift</a>
service.
This directory contains a Thrift interface definition file for an Hbase RPC
service and a Java server implementation.
<h2><a name="whatisthrift">What is Thrift?</a></h2>
<p>"Thrift is a software framework for scalable cross-language services
development. It combines a powerful software stack with a code generation
engine to build services that work efficiently and seamlessly between C++,
Java, Python, PHP, and Ruby. Thrift was developed at Facebook, and we are now
releasing it as open source." For additional information, see
http://developers.facebook.com/thrift/. Facebook has announced their intent
to migrate Thrift into Apache Incubator.
</p>
<p><blockquote>"Thrift is a software framework for scalable cross-language services development.
It combines a software stack with a code generation engine to build services
that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby,
Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml."</blockquote></p>
<h2><a name="description">Description</a></h2>
<p>The <a href="generated/Hbase.Iface.html">Hbase API</a> is defined in the
file Hbase.thrift. A server-side implementation of the API is in
<code>org.apache.hadoop.hbase.thrift.ThriftServer</code>. The generated interfaces,
<code>org.apache.hadoop.hbase.thrift.ThriftServer</code>. The generated interfaces,
types, and RPC utility files are checked into SVN under the
<code>org.apache.hadoop.hbase.thrift.generated</code> directory.
@ -49,16 +44,15 @@ types, and RPC utility files are checked into SVN under the
<p>The files were generated by running the commands:
<pre>
thrift -strict --gen java Hbase.thrift
thrift -strict --gen java:hashcode Hbase.thrift
mv gen-java/org/apache/hadoop/hbase/thrift/generated .
rm -rf gen-java
</pre>
</p>
<p>The 'thrift' binary is the Thrift compiler, and it is distributed as a part
of
the Thrift package. Additionally, specific language runtime libraries are a
part of the Thrift package. A version of the Java runtime is checked into SVN
of the Thrift package. Additionally, specific language runtime libraries are a
part of the Thrift package. A version of the Java runtime is checked into SVN
under the hbase/lib directory.
</p>