You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2013/11/28 19:13:42 UTC
svn commit: r1546436 [3/3] - in /hbase/branches/0.89-fb: ./
src/main/java/org/apache/hadoop/hbase/
src/main/java/org/apache/hadoop/hbase/thrift/generated/
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java?rev=1546436&r1=1546435&r2=1546436&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java Thu Nov 28 18:13:41 2013
@@ -1,17 +1,23 @@
/**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -32,7 +38,7 @@ import org.slf4j.LoggerFactory;
* to the Hbase master or an Hbase region server. Also used to return
* more general Hbase error conditions.
*/
-public class IOError extends java.io.IOException implements org.apache.thrift.TBase<IOError, IOError._Fields>, java.io.Serializable, Cloneable {
+public class IOError extends TException implements org.apache.thrift.TBase<IOError, IOError._Fields>, java.io.Serializable, Cloneable, Comparable<IOError> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IOError");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -115,7 +121,7 @@ public class IOError extends java.io.IOE
// isset id assignments
private static final int __BACKOFFTIMEMILLIS_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
+ private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -148,8 +154,7 @@ public class IOError extends java.io.IOE
* Performs a deep copy on <i>other</i>.
*/
public IOError(IOError other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.isSetMessage()) {
this.message = other.message;
}
@@ -206,16 +211,16 @@ public class IOError extends java.io.IOE
}
public void unsetBackoffTimeMillis() {
- __isset_bit_vector.clear(__BACKOFFTIMEMILLIS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BACKOFFTIMEMILLIS_ISSET_ID);
}
/** Returns true if field backoffTimeMillis is set (has been assigned a value) and false otherwise */
public boolean isSetBackoffTimeMillis() {
- return __isset_bit_vector.get(__BACKOFFTIMEMILLIS_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __BACKOFFTIMEMILLIS_ISSET_ID);
}
public void setBackoffTimeMillisIsSet(boolean value) {
- __isset_bit_vector.set(__BACKOFFTIMEMILLIS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BACKOFFTIMEMILLIS_ISSET_ID, value);
}
public String getExceptionClass() {
@@ -348,43 +353,60 @@ public class IOError extends java.io.IOE
@Override
public int hashCode() {
- return 0;
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_message = true && (isSetMessage());
+ builder.append(present_message);
+ if (present_message)
+ builder.append(message);
+
+ boolean present_backoffTimeMillis = true;
+ builder.append(present_backoffTimeMillis);
+ if (present_backoffTimeMillis)
+ builder.append(backoffTimeMillis);
+
+ boolean present_exceptionClass = true && (isSetExceptionClass());
+ builder.append(present_exceptionClass);
+ if (present_exceptionClass)
+ builder.append(exceptionClass);
+
+ return builder.toHashCode();
}
+ @Override
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(typedOther.isSetMessage());
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBackoffTimeMillis()).compareTo(typedOther.isSetBackoffTimeMillis());
+ lastComparison = Boolean.valueOf(isSetBackoffTimeMillis()).compareTo(other.isSetBackoffTimeMillis());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBackoffTimeMillis()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.backoffTimeMillis, typedOther.backoffTimeMillis);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.backoffTimeMillis, other.backoffTimeMillis);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExceptionClass()).compareTo(typedOther.isSetExceptionClass());
+ lastComparison = Boolean.valueOf(isSetExceptionClass()).compareTo(other.isSetExceptionClass());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExceptionClass()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exceptionClass, typedOther.exceptionClass);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exceptionClass, other.exceptionClass);
if (lastComparison != 0) {
return lastComparison;
}
@@ -434,6 +456,7 @@ public class IOError extends java.io.IOE
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -447,7 +470,7 @@ public class IOError extends java.io.IOE
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bit_vector = new BitSet(1);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java?rev=1546436&r1=1546435&r2=1546436&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java Thu Nov 28 18:13:41 2013
@@ -1,17 +1,23 @@
/**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -31,7 +37,7 @@ import org.slf4j.LoggerFactory;
* An IllegalArgument exception indicates an illegal or invalid
* argument was passed into a procedure.
*/
-public class IllegalArgument extends Exception implements org.apache.thrift.TBase<IllegalArgument, IllegalArgument._Fields>, java.io.Serializable, Cloneable {
+public class IllegalArgument extends TException implements org.apache.thrift.TBase<IllegalArgument, IllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<IllegalArgument> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IllegalArgument");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -226,23 +232,30 @@ public class IllegalArgument extends Exc
@Override
public int hashCode() {
- return 0;
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_message = true && (isSetMessage());
+ builder.append(present_message);
+ if (present_message)
+ builder.append(message);
+
+ return builder.toHashCode();
}
+ @Override
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(typedOther.isSetMessage());
+ lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMessage()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
if (lastComparison != 0) {
return lastComparison;
}
@@ -280,6 +293,7 @@ public class IllegalArgument extends Exc
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java?rev=1546436&r1=1546435&r2=1546436&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java Thu Nov 28 18:13:41 2013
@@ -1,17 +1,23 @@
/**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -31,7 +37,7 @@ import org.slf4j.LoggerFactory;
* A Mutation object is used to either update or delete a column-value.
* If LATEST_TIMESTAMP is used, the server will select timestamp automatically.
*/
-public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fields>, java.io.Serializable, Cloneable {
+public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fields>, java.io.Serializable, Cloneable, Comparable<Mutation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Mutation");
private static final org.apache.thrift.protocol.TField IS_DELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("isDelete", org.apache.thrift.protocol.TType.BOOL, (short)1);
@@ -126,7 +132,7 @@ public class Mutation implements org.apa
private static final int __ISDELETE_ISSET_ID = 0;
private static final int __WRITETOWAL_ISSET_ID = 1;
private static final int __TIMESTAMP_ISSET_ID = 2;
- private BitSet __isset_bit_vector = new BitSet(3);
+ private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -175,8 +181,7 @@ public class Mutation implements org.apa
* Performs a deep copy on <i>other</i>.
*/
public Mutation(Mutation other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
this.isDelete = other.isDelete;
if (other.isSetColumn()) {
this.column = other.column;
@@ -215,16 +220,16 @@ public class Mutation implements org.apa
}
public void unsetIsDelete() {
- __isset_bit_vector.clear(__ISDELETE_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDELETE_ISSET_ID);
}
/** Returns true if field isDelete is set (has been assigned a value) and false otherwise */
public boolean isSetIsDelete() {
- return __isset_bit_vector.get(__ISDELETE_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __ISDELETE_ISSET_ID);
}
public void setIsDeleteIsSet(boolean value) {
- __isset_bit_vector.set(__ISDELETE_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDELETE_ISSET_ID, value);
}
public byte[] getColumn() {
@@ -306,16 +311,16 @@ public class Mutation implements org.apa
}
public void unsetWriteToWAL() {
- __isset_bit_vector.clear(__WRITETOWAL_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITETOWAL_ISSET_ID);
}
/** Returns true if field writeToWAL is set (has been assigned a value) and false otherwise */
public boolean isSetWriteToWAL() {
- return __isset_bit_vector.get(__WRITETOWAL_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __WRITETOWAL_ISSET_ID);
}
public void setWriteToWALIsSet(boolean value) {
- __isset_bit_vector.set(__WRITETOWAL_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITETOWAL_ISSET_ID, value);
}
public long getTimestamp() {
@@ -329,16 +334,16 @@ public class Mutation implements org.apa
}
public void unsetTimestamp() {
- __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
- return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
- __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
@@ -491,63 +496,90 @@ public class Mutation implements org.apa
@Override
public int hashCode() {
- return 0;
+ 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);
+
+ boolean present_writeToWAL = true;
+ builder.append(present_writeToWAL);
+ if (present_writeToWAL)
+ builder.append(writeToWAL);
+
+ boolean present_timestamp = true;
+ builder.append(present_timestamp);
+ if (present_timestamp)
+ builder.append(timestamp);
+
+ return builder.toHashCode();
}
+ @Override
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(typedOther.isSetIsDelete());
+ lastComparison = Boolean.valueOf(isSetIsDelete()).compareTo(other.isSetIsDelete());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsDelete()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDelete, typedOther.isDelete);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDelete, other.isDelete);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
+ lastComparison = Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumn()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, other.column);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
+ lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetWriteToWAL()).compareTo(typedOther.isSetWriteToWAL());
+ lastComparison = Boolean.valueOf(isSetWriteToWAL()).compareTo(other.isSetWriteToWAL());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWriteToWAL()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeToWAL, typedOther.writeToWAL);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeToWAL, other.writeToWAL);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
+ lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
@@ -605,6 +637,7 @@ public class Mutation implements org.apa
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -618,7 +651,7 @@ public class Mutation implements org.apa
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bit_vector = new BitSet(1);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java?rev=1546436&r1=1546435&r2=1546436&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java Thu Nov 28 18:13:41 2013
@@ -1,17 +1,23 @@
/**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -33,7 +39,7 @@ import org.slf4j.LoggerFactory;
* 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 org.apache.thrift.TBase<TCell, TCell._Fields>, java.io.Serializable, Cloneable {
+public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, java.io.Serializable, Cloneable, Comparable<TCell> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCell");
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -111,7 +117,7 @@ public class TCell implements org.apache
// isset id assignments
private static final int __TIMESTAMP_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
+ private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -140,8 +146,7 @@ public class TCell implements org.apache
* Performs a deep copy on <i>other</i>.
*/
public TCell(TCell other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.isSetValue()) {
this.value = other.value;
}
@@ -204,16 +209,16 @@ public class TCell implements org.apache
}
public void unsetTimestamp() {
- __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
- return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
- __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
@@ -300,33 +305,45 @@ public class TCell implements org.apache
@Override
public int hashCode() {
- return 0;
+ 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();
}
+ @Override
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(typedOther.isSetValue());
+ lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValue()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
+ lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
@@ -368,6 +385,7 @@ public class TCell implements org.apache
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -381,7 +399,7 @@ public class TCell implements org.apache
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bit_vector = new BitSet(1);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java?rev=1546436&r1=1546435&r2=1546436&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java Thu Nov 28 18:13:41 2013
@@ -1,17 +1,23 @@
/**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -30,7 +36,7 @@ import org.slf4j.LoggerFactory;
/**
* A TRegionInfo contains information about an HTable region.
*/
-public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegionInfo._Fields>, java.io.Serializable, Cloneable {
+public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegionInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TRegionInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRegionInfo");
private static final org.apache.thrift.protocol.TField START_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("startKey", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -135,7 +141,7 @@ public class TRegionInfo implements org.
private static final int __ID_ISSET_ID = 0;
private static final int __VERSION_ISSET_ID = 1;
private static final int __PORT_ISSET_ID = 2;
- private BitSet __isset_bit_vector = new BitSet(3);
+ private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -186,8 +192,7 @@ public class TRegionInfo implements org.
* Performs a deep copy on <i>other</i>.
*/
public TRegionInfo(TRegionInfo other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.isSetStartKey()) {
this.startKey = other.startKey;
}
@@ -302,16 +307,16 @@ public class TRegionInfo implements org.
}
public void unsetId() {
- __isset_bit_vector.clear(__ID_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
- return __isset_bit_vector.get(__ID_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
- __isset_bit_vector.set(__ID_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
}
public byte[] getName() {
@@ -359,16 +364,16 @@ public class TRegionInfo implements org.
}
public void unsetVersion() {
- __isset_bit_vector.clear(__VERSION_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
- return __isset_bit_vector.get(__VERSION_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
- __isset_bit_vector.set(__VERSION_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
public byte[] getServerName() {
@@ -416,16 +421,16 @@ public class TRegionInfo implements org.
}
public void unsetPort() {
- __isset_bit_vector.clear(__PORT_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean isSetPort() {
- return __isset_bit_vector.get(__PORT_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void setPortIsSet(boolean value) {
- __isset_bit_vector.set(__PORT_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
@@ -622,83 +627,120 @@ public class TRegionInfo implements org.
@Override
public int hashCode() {
- return 0;
+ 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);
+
+ boolean present_serverName = true && (isSetServerName());
+ builder.append(present_serverName);
+ if (present_serverName)
+ builder.append(serverName);
+
+ boolean present_port = true;
+ builder.append(present_port);
+ if (present_port)
+ builder.append(port);
+
+ return builder.toHashCode();
}
+ @Override
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(typedOther.isSetStartKey());
+ lastComparison = Boolean.valueOf(isSetStartKey()).compareTo(other.isSetStartKey());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startKey, typedOther.startKey);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startKey, other.startKey);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEndKey()).compareTo(typedOther.isSetEndKey());
+ lastComparison = Boolean.valueOf(isSetEndKey()).compareTo(other.isSetEndKey());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEndKey()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endKey, typedOther.endKey);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endKey, other.endKey);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
+ lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVersion()).compareTo(typedOther.isSetVersion());
+ lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersion()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, typedOther.version);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerName()).compareTo(typedOther.isSetServerName());
+ lastComparison = Boolean.valueOf(isSetServerName()).compareTo(other.isSetServerName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetServerName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverName, typedOther.serverName);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverName, other.serverName);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPort()).compareTo(typedOther.isSetPort());
+ lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPort()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
if (lastComparison != 0) {
return lastComparison;
}
@@ -772,6 +814,7 @@ public class TRegionInfo implements org.
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -785,7 +828,7 @@ public class TRegionInfo implements org.
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bit_vector = new BitSet(1);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java?rev=1546436&r1=1546435&r2=1546436&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java Thu Nov 28 18:13:41 2013
@@ -1,17 +1,23 @@
/**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -30,7 +36,7 @@ import org.slf4j.LoggerFactory;
/**
* Holds row name and then a map of columns to cells.
*/
-public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResult._Fields>, java.io.Serializable, Cloneable {
+public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResult._Fields>, java.io.Serializable, Cloneable, Comparable<TRowResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowResult");
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -140,7 +146,7 @@ public class TRowResult implements org.a
this.row = other.row;
}
if (other.isSetColumns()) {
- Map<ByteBuffer,TCell> __this__columns = new HashMap<ByteBuffer,TCell>();
+ Map<ByteBuffer,TCell> __this__columns = new HashMap<ByteBuffer,TCell>(other.columns.size());
for (Map.Entry<ByteBuffer, TCell> other_element : other.columns.entrySet()) {
ByteBuffer other_element_key = other_element.getKey();
@@ -319,33 +325,45 @@ public class TRowResult implements org.a
@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();
}
+ @Override
public int compareTo(TRowResult other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TRowResult typedOther = (TRowResult)other;
- lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
+ lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
+ lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns);
if (lastComparison != 0) {
return lastComparison;
}
@@ -391,6 +409,7 @@ public class TRowResult implements org.a
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -442,8 +461,8 @@ public class TRowResult implements org.a
struct.columns = new HashMap<ByteBuffer,TCell>(2*_map8.size);
for (int _i9 = 0; _i9 < _map8.size; ++_i9)
{
- ByteBuffer _key10; // required
- TCell _val11; // optional
+ ByteBuffer _key10;
+ TCell _val11;
_key10 = iprot.readBinary();
_val11 = new TCell();
_val11.read(iprot);
@@ -543,8 +562,8 @@ public class TRowResult implements org.a
struct.columns = new HashMap<ByteBuffer,TCell>(2*_map14.size);
for (int _i15 = 0; _i15 < _map14.size; ++_i15)
{
- ByteBuffer _key16; // required
- TCell _val17; // optional
+ ByteBuffer _key16;
+ TCell _val17;
_key16 = iprot.readBinary();
_val17 = new TCell();
_val17.read(iprot);
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java?rev=1546436&r1=1546435&r2=1546436&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java Thu Nov 28 18:13:41 2013
@@ -1,17 +1,23 @@
/**
- * Autogenerated by Thrift Compiler (0.8.0)
+ * Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift.generated;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -30,7 +36,7 @@ import org.slf4j.LoggerFactory;
/**
* A Scan object is used to specify scanner parameters when opening a scanner.
*/
-public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable, Cloneable {
+public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable, Cloneable, Comparable<TScan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan");
private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -141,7 +147,7 @@ public class TScan implements org.apache
private static final int __CACHING_ISSET_ID = 1;
private static final int __CACHINGBLOCKSENABLED_ISSET_ID = 2;
private static final int __BATCHLIMIT_ISSET_ID = 3;
- private BitSet __isset_bit_vector = new BitSet(4);
+ private byte __isset_bitfield = 0;
private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.TIMESTAMP,_Fields.COLUMNS,_Fields.CACHING,_Fields.FILTER_STRING,_Fields.CACHING_BLOCKS_ENABLED,_Fields.BATCH_LIMIT};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
@@ -174,8 +180,7 @@ public class TScan implements org.apache
* Performs a deep copy on <i>other</i>.
*/
public TScan(TScan other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.isSetStartRow()) {
this.startRow = other.startRow;
}
@@ -184,7 +189,7 @@ public class TScan implements org.apache
}
this.timestamp = other.timestamp;
if (other.isSetColumns()) {
- List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>();
+ List<ByteBuffer> __this__columns = new ArrayList<ByteBuffer>(other.columns.size());
for (ByteBuffer other_element : other.columns) {
__this__columns.add(other_element);
}
@@ -297,16 +302,16 @@ public class TScan implements org.apache
}
public void unsetTimestamp() {
- __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
- return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
}
public void setTimestampIsSet(boolean value) {
- __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
}
public int getColumnsSize() {
@@ -359,16 +364,16 @@ public class TScan implements org.apache
}
public void unsetCaching() {
- __isset_bit_vector.clear(__CACHING_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHING_ISSET_ID);
}
/** Returns true if field caching is set (has been assigned a value) and false otherwise */
public boolean isSetCaching() {
- return __isset_bit_vector.get(__CACHING_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __CACHING_ISSET_ID);
}
public void setCachingIsSet(boolean value) {
- __isset_bit_vector.set(__CACHING_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHING_ISSET_ID, value);
}
public byte[] getFilterString() {
@@ -416,16 +421,16 @@ public class TScan implements org.apache
}
public void unsetCachingBlocksEnabled() {
- __isset_bit_vector.clear(__CACHINGBLOCKSENABLED_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHINGBLOCKSENABLED_ISSET_ID);
}
/** Returns true if field cachingBlocksEnabled is set (has been assigned a value) and false otherwise */
public boolean isSetCachingBlocksEnabled() {
- return __isset_bit_vector.get(__CACHINGBLOCKSENABLED_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __CACHINGBLOCKSENABLED_ISSET_ID);
}
public void setCachingBlocksEnabledIsSet(boolean value) {
- __isset_bit_vector.set(__CACHINGBLOCKSENABLED_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHINGBLOCKSENABLED_ISSET_ID, value);
}
public int getBatchLimit() {
@@ -439,16 +444,16 @@ public class TScan implements org.apache
}
public void unsetBatchLimit() {
- __isset_bit_vector.clear(__BATCHLIMIT_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BATCHLIMIT_ISSET_ID);
}
/** Returns true if field batchLimit is set (has been assigned a value) and false otherwise */
public boolean isSetBatchLimit() {
- return __isset_bit_vector.get(__BATCHLIMIT_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __BATCHLIMIT_ISSET_ID);
}
public void setBatchLimitIsSet(boolean value) {
- __isset_bit_vector.set(__BATCHLIMIT_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BATCHLIMIT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
@@ -667,93 +672,135 @@ public class TScan implements org.apache
@Override
public int hashCode() {
- return 0;
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_startRow = true && (isSetStartRow());
+ builder.append(present_startRow);
+ if (present_startRow)
+ builder.append(startRow);
+
+ boolean present_stopRow = true && (isSetStopRow());
+ builder.append(present_stopRow);
+ if (present_stopRow)
+ builder.append(stopRow);
+
+ boolean present_timestamp = true && (isSetTimestamp());
+ builder.append(present_timestamp);
+ if (present_timestamp)
+ builder.append(timestamp);
+
+ boolean present_columns = true && (isSetColumns());
+ builder.append(present_columns);
+ if (present_columns)
+ builder.append(columns);
+
+ boolean present_caching = true && (isSetCaching());
+ builder.append(present_caching);
+ if (present_caching)
+ builder.append(caching);
+
+ boolean present_filterString = true && (isSetFilterString());
+ builder.append(present_filterString);
+ if (present_filterString)
+ builder.append(filterString);
+
+ boolean present_cachingBlocksEnabled = true && (isSetCachingBlocksEnabled());
+ builder.append(present_cachingBlocksEnabled);
+ if (present_cachingBlocksEnabled)
+ builder.append(cachingBlocksEnabled);
+
+ boolean present_batchLimit = true && (isSetBatchLimit());
+ builder.append(present_batchLimit);
+ if (present_batchLimit)
+ builder.append(batchLimit);
+
+ return builder.toHashCode();
}
+ @Override
public int compareTo(TScan other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TScan typedOther = (TScan)other;
- lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow());
+ lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(other.isSetStartRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartRow()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, other.startRow);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow());
+ lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(other.isSetStopRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStopRow()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, typedOther.stopRow);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, other.stopRow);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
+ lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
+ lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCaching()).compareTo(typedOther.isSetCaching());
+ lastComparison = Boolean.valueOf(isSetCaching()).compareTo(other.isSetCaching());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCaching()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.caching, typedOther.caching);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.caching, other.caching);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(typedOther.isSetFilterString());
+ lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(other.isSetFilterString());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFilterString()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, other.filterString);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCachingBlocksEnabled()).compareTo(typedOther.isSetCachingBlocksEnabled());
+ lastComparison = Boolean.valueOf(isSetCachingBlocksEnabled()).compareTo(other.isSetCachingBlocksEnabled());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCachingBlocksEnabled()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cachingBlocksEnabled, typedOther.cachingBlocksEnabled);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cachingBlocksEnabled, other.cachingBlocksEnabled);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBatchLimit()).compareTo(typedOther.isSetBatchLimit());
+ lastComparison = Boolean.valueOf(isSetBatchLimit()).compareTo(other.isSetBatchLimit());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBatchLimit()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchLimit, typedOther.batchLimit);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchLimit, other.batchLimit);
if (lastComparison != 0) {
return lastComparison;
}
@@ -847,6 +894,7 @@ public class TScan implements org.apache
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -860,7 +908,7 @@ public class TScan implements org.apache
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bit_vector = new BitSet(1);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
@@ -916,7 +964,7 @@ public class TScan implements org.apache
struct.columns = new ArrayList<ByteBuffer>(_list18.size);
for (int _i19 = 0; _i19 < _list18.size; ++_i19)
{
- ByteBuffer _elem20; // required
+ ByteBuffer _elem20;
_elem20 = iprot.readBinary();
struct.columns.add(_elem20);
}
@@ -1126,7 +1174,7 @@ public class TScan implements org.apache
struct.columns = new ArrayList<ByteBuffer>(_list23.size);
for (int _i24 = 0; _i24 < _list23.size; ++_i24)
{
- ByteBuffer _elem25; // required
+ ByteBuffer _elem25;
_elem25 = iprot.readBinary();
struct.columns.add(_elem25);
}