You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2015/11/19 04:14:59 UTC
[5/8] hbase git commit: HBASE-14172 Upgrade existing thrift binding
using thrift 0.9.2 compiler.(Josh Elser)
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
index 5f5cdc7..1262df0 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
@@ -1,12 +1,11 @@
/**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
*
* 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.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ 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;
@@ -28,13 +29,16 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* 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 {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+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);
@@ -152,7 +156,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
private static final int __SORTCOLUMNS_ISSET_ID = 3;
private static final int __REVERSED_ISSET_ID = 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.BATCH_SIZE,_Fields.SORT_COLUMNS,_Fields.REVERSED};
+ private static final _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.TIMESTAMP,_Fields.COLUMNS,_Fields.CACHING,_Fields.FILTER_STRING,_Fields.BATCH_SIZE,_Fields.SORT_COLUMNS,_Fields.REVERSED};
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);
@@ -195,7 +199,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
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);
}
@@ -238,16 +242,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public ByteBuffer bufferForStartRow() {
- return startRow;
+ return org.apache.thrift.TBaseHelper.copyBinary(startRow);
}
public TScan setStartRow(byte[] startRow) {
- setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow));
+ this.startRow = startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(startRow, startRow.length));
return this;
}
public TScan setStartRow(ByteBuffer startRow) {
- this.startRow = startRow;
+ this.startRow = org.apache.thrift.TBaseHelper.copyBinary(startRow);
return this;
}
@@ -272,16 +276,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public ByteBuffer bufferForStopRow() {
- return stopRow;
+ return org.apache.thrift.TBaseHelper.copyBinary(stopRow);
}
public TScan setStopRow(byte[] stopRow) {
- setStopRow(stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(stopRow));
+ this.stopRow = stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(stopRow, stopRow.length));
return this;
}
public TScan setStopRow(ByteBuffer stopRow) {
- this.stopRow = stopRow;
+ this.stopRow = org.apache.thrift.TBaseHelper.copyBinary(stopRow);
return this;
}
@@ -391,16 +395,16 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
public ByteBuffer bufferForFilterString() {
- return filterString;
+ return org.apache.thrift.TBaseHelper.copyBinary(filterString);
}
public TScan setFilterString(byte[] filterString) {
- setFilterString(filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(filterString));
+ this.filterString = filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(filterString, filterString.length));
return this;
}
public TScan setFilterString(ByteBuffer filterString) {
- this.filterString = filterString;
+ this.filterString = org.apache.thrift.TBaseHelper.copyBinary(filterString);
return this;
}
@@ -574,25 +578,25 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
return getStopRow();
case TIMESTAMP:
- return Long.valueOf(getTimestamp());
+ return getTimestamp();
case COLUMNS:
return getColumns();
case CACHING:
- return Integer.valueOf(getCaching());
+ return getCaching();
case FILTER_STRING:
return getFilterString();
case BATCH_SIZE:
- return Integer.valueOf(getBatchSize());
+ return getBatchSize();
case SORT_COLUMNS:
- return Boolean.valueOf(isSortColumns());
+ return isSortColumns();
case REVERSED:
- return Boolean.valueOf(isReversed());
+ return isReversed();
}
throw new IllegalStateException();
@@ -726,150 +730,150 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_startRow = true && (isSetStartRow());
- builder.append(present_startRow);
+ list.add(present_startRow);
if (present_startRow)
- builder.append(startRow);
+ list.add(startRow);
boolean present_stopRow = true && (isSetStopRow());
- builder.append(present_stopRow);
+ list.add(present_stopRow);
if (present_stopRow)
- builder.append(stopRow);
+ list.add(stopRow);
boolean present_timestamp = true && (isSetTimestamp());
- builder.append(present_timestamp);
+ list.add(present_timestamp);
if (present_timestamp)
- builder.append(timestamp);
+ list.add(timestamp);
boolean present_columns = true && (isSetColumns());
- builder.append(present_columns);
+ list.add(present_columns);
if (present_columns)
- builder.append(columns);
+ list.add(columns);
boolean present_caching = true && (isSetCaching());
- builder.append(present_caching);
+ list.add(present_caching);
if (present_caching)
- builder.append(caching);
+ list.add(caching);
boolean present_filterString = true && (isSetFilterString());
- builder.append(present_filterString);
+ list.add(present_filterString);
if (present_filterString)
- builder.append(filterString);
+ list.add(filterString);
boolean present_batchSize = true && (isSetBatchSize());
- builder.append(present_batchSize);
+ list.add(present_batchSize);
if (present_batchSize)
- builder.append(batchSize);
+ list.add(batchSize);
boolean present_sortColumns = true && (isSetSortColumns());
- builder.append(present_sortColumns);
+ list.add(present_sortColumns);
if (present_sortColumns)
- builder.append(sortColumns);
+ list.add(sortColumns);
boolean present_reversed = true && (isSetReversed());
- builder.append(present_reversed);
+ list.add(present_reversed);
if (present_reversed)
- builder.append(reversed);
+ list.add(reversed);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @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(isSetBatchSize()).compareTo(typedOther.isSetBatchSize());
+ lastComparison = Boolean.valueOf(isSetBatchSize()).compareTo(other.isSetBatchSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBatchSize()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchSize, typedOther.batchSize);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchSize, other.batchSize);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSortColumns()).compareTo(typedOther.isSetSortColumns());
+ lastComparison = Boolean.valueOf(isSetSortColumns()).compareTo(other.isSetSortColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSortColumns()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sortColumns, typedOther.sortColumns);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sortColumns, other.sortColumns);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetReversed()).compareTo(typedOther.isSetReversed());
+ lastComparison = Boolean.valueOf(isSetReversed()).compareTo(other.isSetReversed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReversed()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reversed, typedOther.reversed);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reversed, other.reversed);
if (lastComparison != 0) {
return lastComparison;
}
@@ -899,7 +903,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (this.startRow == null) {
sb.append("null");
} else {
- sb.append(this.startRow);
+ org.apache.thrift.TBaseHelper.toString(this.startRow, sb);
}
first = false;
}
@@ -909,7 +913,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (this.stopRow == null) {
sb.append("null");
} else {
- sb.append(this.stopRow);
+ org.apache.thrift.TBaseHelper.toString(this.stopRow, sb);
}
first = false;
}
@@ -925,7 +929,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (this.columns == null) {
sb.append("null");
} else {
- sb.append(this.columns);
+ org.apache.thrift.TBaseHelper.toString(this.columns, sb);
}
first = false;
}
@@ -941,7 +945,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
if (this.filterString == null) {
sb.append("null");
} else {
- sb.append(this.filterString);
+ org.apache.thrift.TBaseHelper.toString(this.filterString, sb);
}
first = false;
}
@@ -1037,11 +1041,11 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
{
org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
struct.columns = new ArrayList<ByteBuffer>(_list26.size);
- for (int _i27 = 0; _i27 < _list26.size; ++_i27)
+ ByteBuffer _elem27;
+ for (int _i28 = 0; _i28 < _list26.size; ++_i28)
{
- ByteBuffer _elem28; // required
- _elem28 = iprot.readBinary();
- struct.columns.add(_elem28);
+ _elem27 = iprot.readBinary();
+ struct.columns.add(_elem27);
}
iprot.readListEnd();
}
@@ -1266,11 +1270,11 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
{
org.apache.thrift.protocol.TList _list31 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<ByteBuffer>(_list31.size);
- for (int _i32 = 0; _i32 < _list31.size; ++_i32)
+ ByteBuffer _elem32;
+ for (int _i33 = 0; _i33 < _list31.size; ++_i33)
{
- ByteBuffer _elem33; // required
- _elem33 = iprot.readBinary();
- struct.columns.add(_elem33);
+ _elem32 = iprot.readBinary();
+ struct.columns.add(_elem32);
}
}
struct.setColumnsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
index b5e17ef..a5c7275 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java
@@ -245,10 +245,11 @@ public class ThriftServer extends Configured implements Tool {
log.info("starting HBase HsHA Thrift server on " + inetSocketAddress.toString());
THsHaServer.Args serverArgs = new THsHaServer.Args(serverTransport);
if (workerThreads > 0) {
- serverArgs.workerThreads(workerThreads);
+ // Could support the min & max threads, avoiding to preserve existing functionality.
+ serverArgs.minWorkerThreads(workerThreads).maxWorkerThreads(workerThreads);
}
ExecutorService executorService = createExecutor(
- serverArgs.getWorkerThreads(), metrics);
+ workerThreads, metrics);
serverArgs.executorService(executorService);
serverArgs.processor(processor);
serverArgs.transportFactory(transportFactory);
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
index 49d0e75..ad631ce 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
@@ -1,12 +1,11 @@
/**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ 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;
@@ -28,10 +29,13 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields>, java.io.Serializable, Cloneable {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields>, java.io.Serializable, Cloneable, Comparable<TAppend> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend");
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);
@@ -131,7 +135,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
// isset id assignments
- private _Fields optionals[] = {_Fields.ATTRIBUTES,_Fields.DURABILITY,_Fields.CELL_VISIBILITY};
+ private static final _Fields optionals[] = {_Fields.ATTRIBUTES,_Fields.DURABILITY,_Fields.CELL_VISIBILITY};
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);
@@ -160,7 +164,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
List<TColumnValue> columns)
{
this();
- this.row = row;
+ this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
this.columns = columns;
}
@@ -170,30 +174,16 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
public TAppend(TAppend other) {
if (other.isSetRow()) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
-;
}
if (other.isSetColumns()) {
- List<TColumnValue> __this__columns = new ArrayList<TColumnValue>();
+ List<TColumnValue> __this__columns = new ArrayList<TColumnValue>(other.columns.size());
for (TColumnValue other_element : other.columns) {
__this__columns.add(new TColumnValue(other_element));
}
this.columns = __this__columns;
}
if (other.isSetAttributes()) {
- Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
- for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
-
- ByteBuffer other_element_key = other_element.getKey();
- ByteBuffer other_element_value = other_element.getValue();
-
- ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
-;
-
- ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
-;
-
- __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
- }
+ Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
this.attributes = __this__attributes;
}
if (other.isSetDurability()) {
@@ -223,16 +213,16 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
}
public ByteBuffer bufferForRow() {
- return row;
+ return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TAppend setRow(byte[] row) {
- setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
+ this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
return this;
}
public TAppend setRow(ByteBuffer row) {
- this.row = row;
+ this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@@ -531,90 +521,90 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_row = true && (isSetRow());
- builder.append(present_row);
+ list.add(present_row);
if (present_row)
- builder.append(row);
+ list.add(row);
boolean present_columns = true && (isSetColumns());
- builder.append(present_columns);
+ list.add(present_columns);
if (present_columns)
- builder.append(columns);
+ list.add(columns);
boolean present_attributes = true && (isSetAttributes());
- builder.append(present_attributes);
+ list.add(present_attributes);
if (present_attributes)
- builder.append(attributes);
+ list.add(attributes);
boolean present_durability = true && (isSetDurability());
- builder.append(present_durability);
+ list.add(present_durability);
if (present_durability)
- builder.append(durability.getValue());
+ list.add(durability.getValue());
boolean present_cellVisibility = true && (isSetCellVisibility());
- builder.append(present_cellVisibility);
+ list.add(present_cellVisibility);
if (present_cellVisibility)
- builder.append(cellVisibility);
+ list.add(cellVisibility);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(TAppend other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TAppend typedOther = (TAppend)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;
}
}
- lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
+ lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAttributes()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDurability()).compareTo(typedOther.isSetDurability());
+ lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDurability()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, typedOther.durability);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, other.durability);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCellVisibility()).compareTo(typedOther.isSetCellVisibility());
+ lastComparison = Boolean.valueOf(isSetCellVisibility()).compareTo(other.isSetCellVisibility());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCellVisibility()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cellVisibility, typedOther.cellVisibility);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cellVisibility, other.cellVisibility);
if (lastComparison != 0) {
return lastComparison;
}
@@ -749,12 +739,12 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
{
org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
struct.columns = new ArrayList<TColumnValue>(_list88.size);
- for (int _i89 = 0; _i89 < _list88.size; ++_i89)
+ TColumnValue _elem89;
+ for (int _i90 = 0; _i90 < _list88.size; ++_i90)
{
- TColumnValue _elem90; // required
- _elem90 = new TColumnValue();
- _elem90.read(iprot);
- struct.columns.add(_elem90);
+ _elem89 = new TColumnValue();
+ _elem89.read(iprot);
+ struct.columns.add(_elem89);
}
iprot.readListEnd();
}
@@ -768,13 +758,13 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
{
org.apache.thrift.protocol.TMap _map91 = iprot.readMapBegin();
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map91.size);
- for (int _i92 = 0; _i92 < _map91.size; ++_i92)
+ ByteBuffer _key92;
+ ByteBuffer _val93;
+ for (int _i94 = 0; _i94 < _map91.size; ++_i94)
{
- ByteBuffer _key93; // required
- ByteBuffer _val94; // required
- _key93 = iprot.readBinary();
- _val94 = iprot.readBinary();
- struct.attributes.put(_key93, _val94);
+ _key92 = iprot.readBinary();
+ _val93 = iprot.readBinary();
+ struct.attributes.put(_key92, _val93);
}
iprot.readMapEnd();
}
@@ -785,7 +775,7 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
break;
case 4: // DURABILITY
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.durability = TDurability.findByValue(iprot.readI32());
+ struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32());
struct.setDurabilityIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -923,12 +913,12 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
{
org.apache.thrift.protocol.TList _list99 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<TColumnValue>(_list99.size);
- for (int _i100 = 0; _i100 < _list99.size; ++_i100)
+ TColumnValue _elem100;
+ for (int _i101 = 0; _i101 < _list99.size; ++_i101)
{
- TColumnValue _elem101; // required
- _elem101 = new TColumnValue();
- _elem101.read(iprot);
- struct.columns.add(_elem101);
+ _elem100 = new TColumnValue();
+ _elem100.read(iprot);
+ struct.columns.add(_elem100);
}
}
struct.setColumnsIsSet(true);
@@ -937,19 +927,19 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
{
org.apache.thrift.protocol.TMap _map102 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map102.size);
- for (int _i103 = 0; _i103 < _map102.size; ++_i103)
+ ByteBuffer _key103;
+ ByteBuffer _val104;
+ for (int _i105 = 0; _i105 < _map102.size; ++_i105)
{
- ByteBuffer _key104; // required
- ByteBuffer _val105; // required
- _key104 = iprot.readBinary();
- _val105 = iprot.readBinary();
- struct.attributes.put(_key104, _val105);
+ _key103 = iprot.readBinary();
+ _val104 = iprot.readBinary();
+ struct.attributes.put(_key103, _val104);
}
}
struct.setAttributesIsSet(true);
}
if (incoming.get(1)) {
- struct.durability = TDurability.findByValue(iprot.readI32());
+ struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32());
struct.setDurabilityIsSet(true);
}
if (incoming.get(2)) {
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
index f217f87..d448cdd 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
@@ -1,12 +1,11 @@
/**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ 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;
@@ -28,10 +29,13 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, TAuthorization._Fields>, java.io.Serializable, Cloneable {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, TAuthorization._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthorization> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthorization");
private static final org.apache.thrift.protocol.TField LABELS_FIELD_DESC = new org.apache.thrift.protocol.TField("labels", org.apache.thrift.protocol.TType.LIST, (short)1);
@@ -103,7 +107,7 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
}
// isset id assignments
- private _Fields optionals[] = {_Fields.LABELS};
+ private static final _Fields optionals[] = {_Fields.LABELS};
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);
@@ -122,10 +126,7 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
*/
public TAuthorization(TAuthorization other) {
if (other.isSetLabels()) {
- List<String> __this__labels = new ArrayList<String>();
- for (String other_element : other.labels) {
- __this__labels.add(other_element);
- }
+ List<String> __this__labels = new ArrayList<String>(other.labels);
this.labels = __this__labels;
}
}
@@ -240,30 +241,30 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_labels = true && (isSetLabels());
- builder.append(present_labels);
+ list.add(present_labels);
if (present_labels)
- builder.append(labels);
+ list.add(labels);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(TAuthorization other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TAuthorization typedOther = (TAuthorization)other;
- lastComparison = Boolean.valueOf(isSetLabels()).compareTo(typedOther.isSetLabels());
+ lastComparison = Boolean.valueOf(isSetLabels()).compareTo(other.isSetLabels());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLabels()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.labels, typedOther.labels);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.labels, other.labels);
if (lastComparison != 0) {
return lastComparison;
}
@@ -345,11 +346,11 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
struct.labels = new ArrayList<String>(_list8.size);
- for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+ String _elem9;
+ for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
- String _elem10; // required
- _elem10 = iprot.readString();
- struct.labels.add(_elem10);
+ _elem9 = iprot.readString();
+ struct.labels.add(_elem9);
}
iprot.readListEnd();
}
@@ -428,11 +429,11 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.labels = new ArrayList<String>(_list13.size);
- for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+ String _elem14;
+ for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
- String _elem15; // required
- _elem15 = iprot.readString();
- struct.labels.add(_elem15);
+ _elem14 = iprot.readString();
+ struct.labels.add(_elem14);
}
}
struct.setLabelsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
index 59c7ef7..3ad4f6a 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
@@ -1,12 +1,11 @@
/**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ 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;
@@ -28,10 +29,13 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility, TCellVisibility._Fields>, java.io.Serializable, Cloneable {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility, TCellVisibility._Fields>, java.io.Serializable, Cloneable, Comparable<TCellVisibility> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCellVisibility");
private static final org.apache.thrift.protocol.TField EXPRESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("expression", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -103,7 +107,7 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
}
// isset id assignments
- private _Fields optionals[] = {_Fields.EXPRESSION};
+ private static final _Fields optionals[] = {_Fields.EXPRESSION};
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);
@@ -220,30 +224,30 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_expression = true && (isSetExpression());
- builder.append(present_expression);
+ list.add(present_expression);
if (present_expression)
- builder.append(expression);
+ list.add(expression);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(TCellVisibility other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TCellVisibility typedOther = (TCellVisibility)other;
- lastComparison = Boolean.valueOf(isSetExpression()).compareTo(typedOther.isSetExpression());
+ lastComparison = Boolean.valueOf(isSetExpression()).compareTo(other.isSetExpression());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpression()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expression, typedOther.expression);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expression, other.expression);
if (lastComparison != 0) {
return lastComparison;
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
index fbf08e3..0fe7791 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
@@ -1,12 +1,11 @@
/**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ 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;
@@ -28,15 +29,18 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* Addresses a single cell or multiple cells
* in a HBase table by column family and optionally
* a column qualifier and timestamp
*/
-public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields>, java.io.Serializable, Cloneable {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields>, java.io.Serializable, Cloneable, Comparable<TColumn> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn");
private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -120,7 +124,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
// isset id assignments
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.QUALIFIER,_Fields.TIMESTAMP};
+ private static final _Fields optionals[] = {_Fields.QUALIFIER,_Fields.TIMESTAMP};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -141,7 +145,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
ByteBuffer family)
{
this();
- this.family = family;
+ this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
}
/**
@@ -151,11 +155,9 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
__isset_bitfield = other.__isset_bitfield;
if (other.isSetFamily()) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family);
-;
}
if (other.isSetQualifier()) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier);
-;
}
this.timestamp = other.timestamp;
}
@@ -178,16 +180,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
public ByteBuffer bufferForFamily() {
- return family;
+ return org.apache.thrift.TBaseHelper.copyBinary(family);
}
public TColumn setFamily(byte[] family) {
- setFamily(family == null ? (ByteBuffer)null : ByteBuffer.wrap(family));
+ this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
return this;
}
public TColumn setFamily(ByteBuffer family) {
- this.family = family;
+ this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
@@ -212,16 +214,16 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
}
public ByteBuffer bufferForQualifier() {
- return qualifier;
+ return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
public TColumn setQualifier(byte[] qualifier) {
- setQualifier(qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(qualifier));
+ this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
return this;
}
public TColumn setQualifier(ByteBuffer qualifier) {
- this.qualifier = qualifier;
+ this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
@@ -301,7 +303,7 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
return getQualifier();
case TIMESTAMP:
- return Long.valueOf(getTimestamp());
+ return getTimestamp();
}
throw new IllegalStateException();
@@ -369,60 +371,60 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_family = true && (isSetFamily());
- builder.append(present_family);
+ list.add(present_family);
if (present_family)
- builder.append(family);
+ list.add(family);
boolean present_qualifier = true && (isSetQualifier());
- builder.append(present_qualifier);
+ list.add(present_qualifier);
if (present_qualifier)
- builder.append(qualifier);
+ list.add(qualifier);
boolean present_timestamp = true && (isSetTimestamp());
- builder.append(present_timestamp);
+ list.add(present_timestamp);
if (present_timestamp)
- builder.append(timestamp);
+ list.add(timestamp);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(TColumn other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TColumn typedOther = (TColumn)other;
- lastComparison = Boolean.valueOf(isSetFamily()).compareTo(typedOther.isSetFamily());
+ lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFamily()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, typedOther.family);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(typedOther.isSetQualifier());
+ lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQualifier()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, typedOther.qualifier);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier);
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;
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
index 0a2833b..9bdbf97 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
@@ -1,12 +1,11 @@
/**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ 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;
@@ -28,13 +29,16 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* Represents a single cell and the amount to increment it by
*/
-public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncrement, TColumnIncrement._Fields>, java.io.Serializable, Cloneable {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncrement, TColumnIncrement._Fields>, java.io.Serializable, Cloneable, Comparable<TColumnIncrement> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnIncrement");
private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -118,7 +122,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
// isset id assignments
private static final int __AMOUNT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.AMOUNT};
+ private static final _Fields optionals[] = {_Fields.AMOUNT};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -142,8 +146,8 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
ByteBuffer qualifier)
{
this();
- this.family = family;
- this.qualifier = qualifier;
+ this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
+ this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
/**
@@ -153,11 +157,9 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
__isset_bitfield = other.__isset_bitfield;
if (other.isSetFamily()) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family);
-;
}
if (other.isSetQualifier()) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier);
-;
}
this.amount = other.amount;
}
@@ -180,16 +182,16 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
}
public ByteBuffer bufferForFamily() {
- return family;
+ return org.apache.thrift.TBaseHelper.copyBinary(family);
}
public TColumnIncrement setFamily(byte[] family) {
- setFamily(family == null ? (ByteBuffer)null : ByteBuffer.wrap(family));
+ this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
return this;
}
public TColumnIncrement setFamily(ByteBuffer family) {
- this.family = family;
+ this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
@@ -214,16 +216,16 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
}
public ByteBuffer bufferForQualifier() {
- return qualifier;
+ return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
public TColumnIncrement setQualifier(byte[] qualifier) {
- setQualifier(qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(qualifier));
+ this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
return this;
}
public TColumnIncrement setQualifier(ByteBuffer qualifier) {
- this.qualifier = qualifier;
+ this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
@@ -303,7 +305,7 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
return getQualifier();
case AMOUNT:
- return Long.valueOf(getAmount());
+ return getAmount();
}
throw new IllegalStateException();
@@ -371,60 +373,60 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_family = true && (isSetFamily());
- builder.append(present_family);
+ list.add(present_family);
if (present_family)
- builder.append(family);
+ list.add(family);
boolean present_qualifier = true && (isSetQualifier());
- builder.append(present_qualifier);
+ list.add(present_qualifier);
if (present_qualifier)
- builder.append(qualifier);
+ list.add(qualifier);
boolean present_amount = true && (isSetAmount());
- builder.append(present_amount);
+ list.add(present_amount);
if (present_amount)
- builder.append(amount);
+ list.add(amount);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(TColumnIncrement other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TColumnIncrement typedOther = (TColumnIncrement)other;
- lastComparison = Boolean.valueOf(isSetFamily()).compareTo(typedOther.isSetFamily());
+ lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFamily()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, typedOther.family);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(typedOther.isSetQualifier());
+ lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQualifier()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, typedOther.qualifier);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
+ lastComparison = Boolean.valueOf(isSetAmount()).compareTo(other.isSetAmount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAmount()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, other.amount);
if (lastComparison != 0) {
return lastComparison;
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
index d1cca13..e5cbe56 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
@@ -1,12 +1,11 @@
/**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ 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;
@@ -28,13 +29,16 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* Represents a single cell and its value.
*/
-public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColumnValue._Fields>, java.io.Serializable, Cloneable {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColumnValue._Fields>, java.io.Serializable, Cloneable, Comparable<TColumnValue> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue");
private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -128,7 +132,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
// isset id assignments
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.TAGS};
+ private static final _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.TAGS};
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);
@@ -155,9 +159,9 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
ByteBuffer value)
{
this();
- this.family = family;
- this.qualifier = qualifier;
- this.value = value;
+ this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
+ this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
+ this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
}
/**
@@ -167,20 +171,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
__isset_bitfield = other.__isset_bitfield;
if (other.isSetFamily()) {
this.family = org.apache.thrift.TBaseHelper.copyBinary(other.family);
-;
}
if (other.isSetQualifier()) {
this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier);
-;
}
if (other.isSetValue()) {
this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value);
-;
}
this.timestamp = other.timestamp;
if (other.isSetTags()) {
this.tags = org.apache.thrift.TBaseHelper.copyBinary(other.tags);
-;
}
}
@@ -204,16 +204,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
public ByteBuffer bufferForFamily() {
- return family;
+ return org.apache.thrift.TBaseHelper.copyBinary(family);
}
public TColumnValue setFamily(byte[] family) {
- setFamily(family == null ? (ByteBuffer)null : ByteBuffer.wrap(family));
+ this.family = family == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(family, family.length));
return this;
}
public TColumnValue setFamily(ByteBuffer family) {
- this.family = family;
+ this.family = org.apache.thrift.TBaseHelper.copyBinary(family);
return this;
}
@@ -238,16 +238,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
public ByteBuffer bufferForQualifier() {
- return qualifier;
+ return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
public TColumnValue setQualifier(byte[] qualifier) {
- setQualifier(qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(qualifier));
+ this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
return this;
}
public TColumnValue setQualifier(ByteBuffer qualifier) {
- this.qualifier = qualifier;
+ this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(qualifier);
return this;
}
@@ -272,16 +272,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
public ByteBuffer bufferForValue() {
- return value;
+ return org.apache.thrift.TBaseHelper.copyBinary(value);
}
public TColumnValue setValue(byte[] value) {
- setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value));
+ this.value = value == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(value, value.length));
return this;
}
public TColumnValue setValue(ByteBuffer value) {
- this.value = value;
+ this.value = org.apache.thrift.TBaseHelper.copyBinary(value);
return this;
}
@@ -329,16 +329,16 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
}
public ByteBuffer bufferForTags() {
- return tags;
+ return org.apache.thrift.TBaseHelper.copyBinary(tags);
}
public TColumnValue setTags(byte[] tags) {
- setTags(tags == null ? (ByteBuffer)null : ByteBuffer.wrap(tags));
+ this.tags = tags == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(tags, tags.length));
return this;
}
public TColumnValue setTags(ByteBuffer tags) {
- this.tags = tags;
+ this.tags = org.apache.thrift.TBaseHelper.copyBinary(tags);
return this;
}
@@ -414,7 +414,7 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
return getValue();
case TIMESTAMP:
- return Long.valueOf(getTimestamp());
+ return getTimestamp();
case TAGS:
return getTags();
@@ -507,90 +507,90 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_family = true && (isSetFamily());
- builder.append(present_family);
+ list.add(present_family);
if (present_family)
- builder.append(family);
+ list.add(family);
boolean present_qualifier = true && (isSetQualifier());
- builder.append(present_qualifier);
+ list.add(present_qualifier);
if (present_qualifier)
- builder.append(qualifier);
+ list.add(qualifier);
boolean present_value = true && (isSetValue());
- builder.append(present_value);
+ list.add(present_value);
if (present_value)
- builder.append(value);
+ list.add(value);
boolean present_timestamp = true && (isSetTimestamp());
- builder.append(present_timestamp);
+ list.add(present_timestamp);
if (present_timestamp)
- builder.append(timestamp);
+ list.add(timestamp);
boolean present_tags = true && (isSetTags());
- builder.append(present_tags);
+ list.add(present_tags);
if (present_tags)
- builder.append(tags);
+ list.add(tags);
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(TColumnValue other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TColumnValue typedOther = (TColumnValue)other;
- lastComparison = Boolean.valueOf(isSetFamily()).compareTo(typedOther.isSetFamily());
+ lastComparison = Boolean.valueOf(isSetFamily()).compareTo(other.isSetFamily());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFamily()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, typedOther.family);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, other.family);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(typedOther.isSetQualifier());
+ lastComparison = Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQualifier()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, typedOther.qualifier);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier);
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(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(isSetTags()).compareTo(typedOther.isSetTags());
+ lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTags()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, typedOther.tags);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, other.tags);
if (lastComparison != 0) {
return lastComparison;
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/3aa3fae1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
index a4d7777..5a42d8a 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
@@ -1,12 +1,11 @@
/**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
-import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ 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;
@@ -28,9 +29,11 @@ import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* Used to perform Delete operations on a single row.
*
@@ -57,7 +60,8 @@ import org.slf4j.LoggerFactory;
* by changing the durability. If you don't provide durability, it defaults to
* column family's default setting for durability.
*/
-public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields>, java.io.Serializable, Cloneable {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields>, java.io.Serializable, Cloneable, Comparable<TDelete> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDelete");
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);
@@ -172,7 +176,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
// isset id assignments
private static final int __TIMESTAMP_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.ATTRIBUTES,_Fields.DURABILITY};
+ private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.ATTRIBUTES,_Fields.DURABILITY};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -204,7 +208,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
ByteBuffer row)
{
this();
- this.row = row;
+ this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
}
/**
@@ -214,10 +218,9 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
__isset_bitfield = other.__isset_bitfield;
if (other.isSetRow()) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
-;
}
if (other.isSetColumns()) {
- List<TColumn> __this__columns = new ArrayList<TColumn>();
+ List<TColumn> __this__columns = new ArrayList<TColumn>(other.columns.size());
for (TColumn other_element : other.columns) {
__this__columns.add(new TColumn(other_element));
}
@@ -228,20 +231,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
this.deleteType = other.deleteType;
}
if (other.isSetAttributes()) {
- Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
- for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
-
- ByteBuffer other_element_key = other_element.getKey();
- ByteBuffer other_element_value = other_element.getValue();
-
- ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
-;
-
- ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
-;
-
- __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
- }
+ Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
this.attributes = __this__attributes;
}
if (other.isSetDurability()) {
@@ -271,16 +261,16 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
}
public ByteBuffer bufferForRow() {
- return row;
+ return org.apache.thrift.TBaseHelper.copyBinary(row);
}
public TDelete setRow(byte[] row) {
- setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
+ this.row = row == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(row, row.length));
return this;
}
public TDelete setRow(ByteBuffer row) {
- this.row = row;
+ this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
return this;
}
@@ -522,7 +512,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
return getColumns();
case TIMESTAMP:
- return Long.valueOf(getTimestamp());
+ return getTimestamp();
case DELETE_TYPE:
return getDeleteType();
@@ -632,105 +622,105 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
@Override
public int hashCode() {
- HashCodeBuilder builder = new HashCodeBuilder();
+ List<Object> list = new ArrayList<Object>();
boolean present_row = true && (isSetRow());
- builder.append(present_row);
+ list.add(present_row);
if (present_row)
- builder.append(row);
+ list.add(row);
boolean present_columns = true && (isSetColumns());
- builder.append(present_columns);
+ list.add(present_columns);
if (present_columns)
- builder.append(columns);
+ list.add(columns);
boolean present_timestamp = true && (isSetTimestamp());
- builder.append(present_timestamp);
+ list.add(present_timestamp);
if (present_timestamp)
- builder.append(timestamp);
+ list.add(timestamp);
boolean present_deleteType = true && (isSetDeleteType());
- builder.append(present_deleteType);
+ list.add(present_deleteType);
if (present_deleteType)
- builder.append(deleteType.getValue());
+ list.add(deleteType.getValue());
boolean present_attributes = true && (isSetAttributes());
- builder.append(present_attributes);
+ list.add(present_attributes);
if (present_attributes)
- builder.append(attributes);
+ list.add(attributes);
boolean present_durability = true && (isSetDurability());
- builder.append(present_durability);
+ list.add(present_durability);
if (present_durability)
- builder.append(durability.getValue());
+ list.add(durability.getValue());
- return builder.toHashCode();
+ return list.hashCode();
}
+ @Override
public int compareTo(TDelete other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- TDelete typedOther = (TDelete)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;
}
}
- 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(isSetDeleteType()).compareTo(typedOther.isSetDeleteType());
+ lastComparison = Boolean.valueOf(isSetDeleteType()).compareTo(other.isSetDeleteType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeleteType()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteType, typedOther.deleteType);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteType, other.deleteType);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
+ lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAttributes()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDurability()).compareTo(typedOther.isSetDurability());
+ lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDurability()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, typedOther.durability);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, other.durability);
if (lastComparison != 0) {
return lastComparison;
}
@@ -869,12 +859,12 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
{
org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
struct.columns = new ArrayList<TColumn>(_list52.size);
- for (int _i53 = 0; _i53 < _list52.size; ++_i53)
+ TColumn _elem53;
+ for (int _i54 = 0; _i54 < _list52.size; ++_i54)
{
- TColumn _elem54; // required
- _elem54 = new TColumn();
- _elem54.read(iprot);
- struct.columns.add(_elem54);
+ _elem53 = new TColumn();
+ _elem53.read(iprot);
+ struct.columns.add(_elem53);
}
iprot.readListEnd();
}
@@ -893,7 +883,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
break;
case 4: // DELETE_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.deleteType = TDeleteType.findByValue(iprot.readI32());
+ struct.deleteType = org.apache.hadoop.hbase.thrift2.generated.TDeleteType.findByValue(iprot.readI32());
struct.setDeleteTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -904,13 +894,13 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
{
org.apache.thrift.protocol.TMap _map55 = iprot.readMapBegin();
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map55.size);
- for (int _i56 = 0; _i56 < _map55.size; ++_i56)
+ ByteBuffer _key56;
+ ByteBuffer _val57;
+ for (int _i58 = 0; _i58 < _map55.size; ++_i58)
{
- ByteBuffer _key57; // required
- ByteBuffer _val58; // required
- _key57 = iprot.readBinary();
- _val58 = iprot.readBinary();
- struct.attributes.put(_key57, _val58);
+ _key56 = iprot.readBinary();
+ _val57 = iprot.readBinary();
+ struct.attributes.put(_key56, _val57);
}
iprot.readMapEnd();
}
@@ -921,7 +911,7 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
break;
case 7: // DURABILITY
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.durability = TDurability.findByValue(iprot.readI32());
+ struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32());
struct.setDurabilityIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -1070,12 +1060,12 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
{
org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<TColumn>(_list63.size);
- for (int _i64 = 0; _i64 < _list63.size; ++_i64)
+ TColumn _elem64;
+ for (int _i65 = 0; _i65 < _list63.size; ++_i65)
{
- TColumn _elem65; // required
- _elem65 = new TColumn();
- _elem65.read(iprot);
- struct.columns.add(_elem65);
+ _elem64 = new TColumn();
+ _elem64.read(iprot);
+ struct.columns.add(_elem64);
}
}
struct.setColumnsIsSet(true);
@@ -1085,26 +1075,26 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
struct.setTimestampIsSet(true);
}
if (incoming.get(2)) {
- struct.deleteType = TDeleteType.findByValue(iprot.readI32());
+ struct.deleteType = org.apache.hadoop.hbase.thrift2.generated.TDeleteType.findByValue(iprot.readI32());
struct.setDeleteTypeIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map66 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map66.size);
- for (int _i67 = 0; _i67 < _map66.size; ++_i67)
+ ByteBuffer _key67;
+ ByteBuffer _val68;
+ for (int _i69 = 0; _i69 < _map66.size; ++_i69)
{
- ByteBuffer _key68; // required
- ByteBuffer _val69; // required
- _key68 = iprot.readBinary();
- _val69 = iprot.readBinary();
- struct.attributes.put(_key68, _val69);
+ _key67 = iprot.readBinary();
+ _val68 = iprot.readBinary();
+ struct.attributes.put(_key67, _val68);
}
}
struct.setAttributesIsSet(true);
}
if (incoming.get(4)) {
- struct.durability = TDurability.findByValue(iprot.readI32());
+ struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32());
struct.setDurabilityIsSet(true);
}
}