HBASE-12279 Generated thrift files were generated with the wrong parameters (Niels Basjes)

This commit is contained in:
Andrew Purtell 2014-11-07 16:19:42 -08:00
parent fb1af86ee1
commit 5ffa457940
32 changed files with 2824 additions and 434 deletions

View File

@ -6,6 +6,7 @@
*/
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;
@ -229,7 +230,14 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
@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();
}
public int compareTo(AlreadyExists other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -317,7 +318,19 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, Bat
@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_mutations = true && (isSetMutations());
builder.append(present_mutations);
if (present_mutations)
builder.append(mutations);
return builder.toHashCode();
}
public int compareTo(BatchMutation other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -732,7 +733,54 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_name = true && (isSetName());
builder.append(present_name);
if (present_name)
builder.append(name);
boolean present_maxVersions = true;
builder.append(present_maxVersions);
if (present_maxVersions)
builder.append(maxVersions);
boolean present_compression = true && (isSetCompression());
builder.append(present_compression);
if (present_compression)
builder.append(compression);
boolean present_inMemory = true;
builder.append(present_inMemory);
if (present_inMemory)
builder.append(inMemory);
boolean present_bloomFilterType = true && (isSetBloomFilterType());
builder.append(present_bloomFilterType);
if (present_bloomFilterType)
builder.append(bloomFilterType);
boolean present_bloomFilterVectorSize = true;
builder.append(present_bloomFilterVectorSize);
if (present_bloomFilterVectorSize)
builder.append(bloomFilterVectorSize);
boolean present_bloomFilterNbHashes = true;
builder.append(present_bloomFilterNbHashes);
if (present_bloomFilterNbHashes)
builder.append(bloomFilterNbHashes);
boolean present_blockCacheEnabled = true;
builder.append(present_blockCacheEnabled);
if (present_blockCacheEnabled)
builder.append(blockCacheEnabled);
boolean present_timeToLive = true;
builder.append(present_timeToLive);
if (present_timeToLive)
builder.append(timeToLive);
return builder.toHashCode();
}
public int compareTo(ColumnDescriptor other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -230,7 +231,14 @@ public class IOError extends TException implements org.apache.thrift.TBase<IOErr
@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();
}
public int compareTo(IOError other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -229,7 +230,14 @@ public class IllegalArgument extends TException implements org.apache.thrift.TBa
@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();
}
public int compareTo(IllegalArgument other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -431,7 +432,29 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
@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);
return builder.toHashCode();
}
public int compareTo(Mutation other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -465,7 +466,29 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_table = true && (isSetTable());
builder.append(present_table);
if (present_table)
builder.append(table);
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);
boolean present_values = true && (isSetValues());
builder.append(present_values);
if (present_values)
builder.append(values);
return builder.toHashCode();
}
public int compareTo(TAppend other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -302,7 +303,19 @@ public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, jav
@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();
}
public int compareTo(TCell other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -297,7 +298,19 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_columnName = true && (isSetColumnName());
builder.append(present_columnName);
if (present_columnName)
builder.append(columnName);
boolean present_cell = true && (isSetCell());
builder.append(present_cell);
if (present_cell)
builder.append(cell);
return builder.toHashCode();
}
public int compareTo(TColumn other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -438,7 +439,29 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_table = true && (isSetTable());
builder.append(present_table);
if (present_table)
builder.append(table);
boolean present_row = true && (isSetRow());
builder.append(present_row);
if (present_row)
builder.append(row);
boolean present_column = true && (isSetColumn());
builder.append(present_column);
if (present_column)
builder.append(column);
boolean present_ammount = true;
builder.append(present_ammount);
if (present_ammount)
builder.append(ammount);
return builder.toHashCode();
}
public int compareTo(TIncrement other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -624,7 +625,44 @@ public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegion
@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();
}
public int compareTo(TRegionInfo other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -398,7 +399,24 @@ public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResul
@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);
boolean present_sortedColumns = true && (isSetSortedColumns());
builder.append(present_sortedColumns);
if (present_sortedColumns)
builder.append(sortedColumns);
return builder.toHashCode();
}
public int compareTo(TRowResult other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -725,7 +726,54 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
@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_batchSize = true && (isSetBatchSize());
builder.append(present_batchSize);
if (present_batchSize)
builder.append(batchSize);
boolean present_sortColumns = true && (isSetSortColumns());
builder.append(present_sortColumns);
if (present_sortColumns)
builder.append(sortColumns);
boolean present_reversed = true && (isSetReversed());
builder.append(present_reversed);
if (present_reversed)
builder.append(reversed);
return builder.toHashCode();
}
public int compareTo(TScan other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -530,7 +531,34 @@ public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields
@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);
boolean present_attributes = true && (isSetAttributes());
builder.append(present_attributes);
if (present_attributes)
builder.append(attributes);
boolean present_durability = true && (isSetDurability());
builder.append(present_durability);
if (present_durability)
builder.append(durability.getValue());
boolean present_cellVisibility = true && (isSetCellVisibility());
builder.append(present_cellVisibility);
if (present_cellVisibility)
builder.append(cellVisibility);
return builder.toHashCode();
}
public int compareTo(TAppend other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -239,7 +240,14 @@ public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, T
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_labels = true && (isSetLabels());
builder.append(present_labels);
if (present_labels)
builder.append(labels);
return builder.toHashCode();
}
public int compareTo(TAuthorization other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -219,7 +220,14 @@ public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility,
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_expression = true && (isSetExpression());
builder.append(present_expression);
if (present_expression)
builder.append(expression);
return builder.toHashCode();
}
public int compareTo(TCellVisibility other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -368,7 +369,24 @@ public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_family = true && (isSetFamily());
builder.append(present_family);
if (present_family)
builder.append(family);
boolean present_qualifier = true && (isSetQualifier());
builder.append(present_qualifier);
if (present_qualifier)
builder.append(qualifier);
boolean present_timestamp = true && (isSetTimestamp());
builder.append(present_timestamp);
if (present_timestamp)
builder.append(timestamp);
return builder.toHashCode();
}
public int compareTo(TColumn other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -370,7 +371,24 @@ public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncremen
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_family = true && (isSetFamily());
builder.append(present_family);
if (present_family)
builder.append(family);
boolean present_qualifier = true && (isSetQualifier());
builder.append(present_qualifier);
if (present_qualifier)
builder.append(qualifier);
boolean present_amount = true && (isSetAmount());
builder.append(present_amount);
if (present_amount)
builder.append(amount);
return builder.toHashCode();
}
public int compareTo(TColumnIncrement other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -506,7 +507,34 @@ public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColu
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_family = true && (isSetFamily());
builder.append(present_family);
if (present_family)
builder.append(family);
boolean present_qualifier = true && (isSetQualifier());
builder.append(present_qualifier);
if (present_qualifier)
builder.append(qualifier);
boolean present_value = true && (isSetValue());
builder.append(present_value);
if (present_value)
builder.append(value);
boolean present_timestamp = true && (isSetTimestamp());
builder.append(present_timestamp);
if (present_timestamp)
builder.append(timestamp);
boolean present_tags = true && (isSetTags());
builder.append(present_tags);
if (present_tags)
builder.append(tags);
return builder.toHashCode();
}
public int compareTo(TColumnValue other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -631,7 +632,39 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
@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);
boolean present_timestamp = true && (isSetTimestamp());
builder.append(present_timestamp);
if (present_timestamp)
builder.append(timestamp);
boolean present_deleteType = true && (isSetDeleteType());
builder.append(present_deleteType);
if (present_deleteType)
builder.append(deleteType.getValue());
boolean present_attributes = true && (isSetAttributes());
builder.append(present_attributes);
if (present_attributes)
builder.append(attributes);
boolean present_durability = true && (isSetDurability());
builder.append(present_durability);
if (present_durability)
builder.append(durability.getValue());
return builder.toHashCode();
}
public int compareTo(TDelete other) {
@ -834,14 +867,14 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
case 2: // COLUMNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
struct.columns = new ArrayList<TColumn>(_list44.size);
for (int _i45 = 0; _i45 < _list44.size; ++_i45)
org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
struct.columns = new ArrayList<TColumn>(_list52.size);
for (int _i53 = 0; _i53 < _list52.size; ++_i53)
{
TColumn _elem46; // optional
_elem46 = new TColumn();
_elem46.read(iprot);
struct.columns.add(_elem46);
TColumn _elem54; // required
_elem54 = new TColumn();
_elem54.read(iprot);
struct.columns.add(_elem54);
}
iprot.readListEnd();
}
@ -869,15 +902,15 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
case 6: // ATTRIBUTES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map47 = iprot.readMapBegin();
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map47.size);
for (int _i48 = 0; _i48 < _map47.size; ++_i48)
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 _key49; // required
ByteBuffer _val50; // required
_key49 = iprot.readBinary();
_val50 = iprot.readBinary();
struct.attributes.put(_key49, _val50);
ByteBuffer _key57; // required
ByteBuffer _val58; // required
_key57 = iprot.readBinary();
_val58 = iprot.readBinary();
struct.attributes.put(_key57, _val58);
}
iprot.readMapEnd();
}
@ -919,9 +952,9 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
for (TColumn _iter51 : struct.columns)
for (TColumn _iter59 : struct.columns)
{
_iter51.write(oprot);
_iter59.write(oprot);
}
oprot.writeListEnd();
}
@ -945,10 +978,10 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
for (Map.Entry<ByteBuffer, ByteBuffer> _iter52 : struct.attributes.entrySet())
for (Map.Entry<ByteBuffer, ByteBuffer> _iter60 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter52.getKey());
oprot.writeBinary(_iter52.getValue());
oprot.writeBinary(_iter60.getKey());
oprot.writeBinary(_iter60.getValue());
}
oprot.writeMapEnd();
}
@ -1000,9 +1033,9 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
for (TColumn _iter53 : struct.columns)
for (TColumn _iter61 : struct.columns)
{
_iter53.write(oprot);
_iter61.write(oprot);
}
}
}
@ -1015,10 +1048,10 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
for (Map.Entry<ByteBuffer, ByteBuffer> _iter54 : struct.attributes.entrySet())
for (Map.Entry<ByteBuffer, ByteBuffer> _iter62 : struct.attributes.entrySet())
{
oprot.writeBinary(_iter54.getKey());
oprot.writeBinary(_iter54.getValue());
oprot.writeBinary(_iter62.getKey());
oprot.writeBinary(_iter62.getValue());
}
}
}
@ -1035,14 +1068,14 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.columns = new ArrayList<TColumn>(_list55.size);
for (int _i56 = 0; _i56 < _list55.size; ++_i56)
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 _elem57; // optional
_elem57 = new TColumn();
_elem57.read(iprot);
struct.columns.add(_elem57);
TColumn _elem65; // required
_elem65 = new TColumn();
_elem65.read(iprot);
struct.columns.add(_elem65);
}
}
struct.setColumnsIsSet(true);
@ -1057,15 +1090,15 @@ public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map58 = 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*_map58.size);
for (int _i59 = 0; _i59 < _map58.size; ++_i59)
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 _key60; // required
ByteBuffer _val61; // required
_key60 = iprot.readBinary();
_val61 = iprot.readBinary();
struct.attributes.put(_key60, _val61);
ByteBuffer _key68; // required
ByteBuffer _val69; // required
_key68 = iprot.readBinary();
_val69 = iprot.readBinary();
struct.attributes.put(_key68, _val69);
}
}
struct.setAttributesIsSet(true);

View File

@ -1,11 +1,12 @@
/**
* Autogenerated by Thrift Compiler (0.9.1)
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@ -15,8 +16,6 @@ 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;
@ -45,7 +44,7 @@ import org.slf4j.LoggerFactory;
* If you specify a time range and a timestamp the range is ignored.
* Timestamps on TColumns are ignored.
*/
public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.io.Serializable, Cloneable, Comparable<TGet> {
public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGet");
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);
@ -202,7 +201,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
;
}
if (other.isSetColumns()) {
List<TColumn> __this__columns = new ArrayList<TColumn>(other.columns.size());
List<TColumn> __this__columns = new ArrayList<TColumn>();
for (TColumn other_element : other.columns) {
__this__columns.add(new TColumn(other_element));
}
@ -218,7 +217,20 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
;
}
if (other.isSetAttributes()) {
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
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);
}
this.attributes = __this__attributes;
}
if (other.isSetAuthorizations()) {
@ -696,93 +708,135 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
@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);
boolean present_timestamp = true && (isSetTimestamp());
builder.append(present_timestamp);
if (present_timestamp)
builder.append(timestamp);
boolean present_timeRange = true && (isSetTimeRange());
builder.append(present_timeRange);
if (present_timeRange)
builder.append(timeRange);
boolean present_maxVersions = true && (isSetMaxVersions());
builder.append(present_maxVersions);
if (present_maxVersions)
builder.append(maxVersions);
boolean present_filterString = true && (isSetFilterString());
builder.append(present_filterString);
if (present_filterString)
builder.append(filterString);
boolean present_attributes = true && (isSetAttributes());
builder.append(present_attributes);
if (present_attributes)
builder.append(attributes);
boolean present_authorizations = true && (isSetAuthorizations());
builder.append(present_authorizations);
if (present_authorizations)
builder.append(authorizations);
return builder.toHashCode();
}
@Override
public int compareTo(TGet other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
TGet typedOther = (TGet)other;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(other.isSetTimeRange());
lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(typedOther.isSetTimeRange());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeRange()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, other.timeRange);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, typedOther.timeRange);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(other.isSetMaxVersions());
lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMaxVersions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, other.maxVersions);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(other.isSetFilterString());
lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(typedOther.isSetFilterString());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFilterString()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, other.filterString);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAttributes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(typedOther.isSetAuthorizations());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthorizations()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authorizations, other.authorizations);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authorizations, typedOther.authorizations);
if (lastComparison != 0) {
return lastComparison;
}
@ -945,7 +999,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
struct.columns = new ArrayList<TColumn>(_list16.size);
for (int _i17 = 0; _i17 < _list16.size; ++_i17)
{
TColumn _elem18;
TColumn _elem18; // required
_elem18 = new TColumn();
_elem18.read(iprot);
struct.columns.add(_elem18);
@ -997,8 +1051,8 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map19.size);
for (int _i20 = 0; _i20 < _map19.size; ++_i20)
{
ByteBuffer _key21;
ByteBuffer _val22;
ByteBuffer _key21; // required
ByteBuffer _val22; // required
_key21 = iprot.readBinary();
_val22 = iprot.readBinary();
struct.attributes.put(_key21, _val22);
@ -1188,7 +1242,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
struct.columns = new ArrayList<TColumn>(_list27.size);
for (int _i28 = 0; _i28 < _list27.size; ++_i28)
{
TColumn _elem29;
TColumn _elem29; // required
_elem29 = new TColumn();
_elem29.read(iprot);
struct.columns.add(_elem29);
@ -1219,8 +1273,8 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.i
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map30.size);
for (int _i31 = 0; _i31 < _map30.size; ++_i31)
{
ByteBuffer _key32;
ByteBuffer _val33;
ByteBuffer _key32; // required
ByteBuffer _val33; // required
_key32 = iprot.readBinary();
_val33 = iprot.readBinary();
struct.attributes.put(_key32, _val33);

View File

@ -6,6 +6,7 @@
*/
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;
@ -224,7 +225,14 @@ public class TIOError extends TException implements org.apache.thrift.TBase<TIOE
@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();
}
public int compareTo(TIOError other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -223,7 +224,14 @@ public class TIllegalArgument extends TException implements org.apache.thrift.TB
@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();
}
public int compareTo(TIllegalArgument other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -537,7 +538,34 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
@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);
boolean present_attributes = true && (isSetAttributes());
builder.append(present_attributes);
if (present_attributes)
builder.append(attributes);
boolean present_durability = true && (isSetDurability());
builder.append(present_durability);
if (present_durability)
builder.append(durability.getValue());
boolean present_cellVisibility = true && (isSetCellVisibility());
builder.append(present_cellVisibility);
if (present_cellVisibility)
builder.append(cellVisibility);
return builder.toHashCode();
}
public int compareTo(TIncrement other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -331,14 +332,22 @@ public class TMutation extends org.apache.thrift.TUnion<TMutation, TMutation._Fi
}
/**
* If you'd like this to perform more respectably, use the hashcode generator option.
*/
@Override
public int hashCode() {
return 0;
HashCodeBuilder hcb = new HashCodeBuilder();
hcb.append(this.getClass().getName());
org.apache.thrift.TFieldIdEnum setField = getSetField();
if (setField != null) {
hcb.append(setField.getThriftFieldId());
Object value = getFieldValue();
if (value instanceof org.apache.thrift.TEnum) {
hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue());
} else {
hcb.append(value);
}
}
return hcb.toHashCode();
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));

View File

@ -1,11 +1,12 @@
/**
* Autogenerated by Thrift Compiler (0.9.1)
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@ -15,8 +16,6 @@ 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;
@ -44,7 +43,7 @@ import org.slf4j.LoggerFactory;
* by changing the durability. If you don't provide durability, it defaults to
* column family's default setting for durability.
*/
public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.io.Serializable, Cloneable, Comparable<TPut> {
public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPut");
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);
@ -196,7 +195,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
;
}
if (other.isSetColumnValues()) {
List<TColumnValue> __this__columnValues = new ArrayList<TColumnValue>(other.columnValues.size());
List<TColumnValue> __this__columnValues = new ArrayList<TColumnValue>();
for (TColumnValue other_element : other.columnValues) {
__this__columnValues.add(new TColumnValue(other_element));
}
@ -204,7 +203,20 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
}
this.timestamp = other.timestamp;
if (other.isSetAttributes()) {
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
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);
}
this.attributes = __this__attributes;
}
if (other.isSetDurability()) {
@ -589,73 +601,105 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
@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_columnValues = true && (isSetColumnValues());
builder.append(present_columnValues);
if (present_columnValues)
builder.append(columnValues);
boolean present_timestamp = true && (isSetTimestamp());
builder.append(present_timestamp);
if (present_timestamp)
builder.append(timestamp);
boolean present_attributes = true && (isSetAttributes());
builder.append(present_attributes);
if (present_attributes)
builder.append(attributes);
boolean present_durability = true && (isSetDurability());
builder.append(present_durability);
if (present_durability)
builder.append(durability.getValue());
boolean present_cellVisibility = true && (isSetCellVisibility());
builder.append(present_cellVisibility);
if (present_cellVisibility)
builder.append(cellVisibility);
return builder.toHashCode();
}
@Override
public int compareTo(TPut other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
TPut typedOther = (TPut)other;
lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumnValues()).compareTo(other.isSetColumnValues());
lastComparison = Boolean.valueOf(isSetColumnValues()).compareTo(typedOther.isSetColumnValues());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnValues()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnValues, other.columnValues);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnValues, typedOther.columnValues);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAttributes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
lastComparison = Boolean.valueOf(isSetDurability()).compareTo(typedOther.isSetDurability());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDurability()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, other.durability);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, typedOther.durability);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCellVisibility()).compareTo(other.isSetCellVisibility());
lastComparison = Boolean.valueOf(isSetCellVisibility()).compareTo(typedOther.isSetCellVisibility());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCellVisibility()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cellVisibility, other.cellVisibility);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cellVisibility, typedOther.cellVisibility);
if (lastComparison != 0) {
return lastComparison;
}
@ -800,7 +844,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
struct.columnValues = new ArrayList<TColumnValue>(_list34.size);
for (int _i35 = 0; _i35 < _list34.size; ++_i35)
{
TColumnValue _elem36;
TColumnValue _elem36; // required
_elem36 = new TColumnValue();
_elem36.read(iprot);
struct.columnValues.add(_elem36);
@ -827,8 +871,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map37.size);
for (int _i38 = 0; _i38 < _map37.size; ++_i38)
{
ByteBuffer _key39;
ByteBuffer _val40;
ByteBuffer _key39; // required
ByteBuffer _val40; // required
_key39 = iprot.readBinary();
_val40 = iprot.readBinary();
struct.attributes.put(_key39, _val40);
@ -993,7 +1037,7 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
struct.columnValues = new ArrayList<TColumnValue>(_list45.size);
for (int _i46 = 0; _i46 < _list45.size; ++_i46)
{
TColumnValue _elem47;
TColumnValue _elem47; // required
_elem47 = new TColumnValue();
_elem47.read(iprot);
struct.columnValues.add(_elem47);
@ -1011,8 +1055,8 @@ public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.i
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map48.size);
for (int _i49 = 0; _i49 < _map48.size; ++_i49)
{
ByteBuffer _key50;
ByteBuffer _val51;
ByteBuffer _key50; // required
ByteBuffer _val51; // required
_key50 = iprot.readBinary();
_val51 = iprot.readBinary();
struct.attributes.put(_key50, _val51);

View File

@ -6,6 +6,7 @@
*/
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;
@ -317,7 +318,19 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
@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_columnValues = true && (isSetColumnValues());
builder.append(present_columnValues);
if (present_columnValues)
builder.append(columnValues);
return builder.toHashCode();
}
public int compareTo(TResult other) {

View File

@ -6,6 +6,7 @@
*/
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;
@ -318,7 +319,19 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
@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_mutations = true && (isSetMutations());
builder.append(present_mutations);
if (present_mutations)
builder.append(mutations);
return builder.toHashCode();
}
public int compareTo(TRowMutations other) {
@ -444,14 +457,14 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
case 2: // MUTATIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list98 = iprot.readListBegin();
struct.mutations = new ArrayList<TMutation>(_list98.size);
for (int _i99 = 0; _i99 < _list98.size; ++_i99)
org.apache.thrift.protocol.TList _list124 = iprot.readListBegin();
struct.mutations = new ArrayList<TMutation>(_list124.size);
for (int _i125 = 0; _i125 < _list124.size; ++_i125)
{
TMutation _elem100; // optional
_elem100 = new TMutation();
_elem100.read(iprot);
struct.mutations.add(_elem100);
TMutation _elem126; // required
_elem126 = new TMutation();
_elem126.read(iprot);
struct.mutations.add(_elem126);
}
iprot.readListEnd();
}
@ -484,9 +497,9 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size()));
for (TMutation _iter101 : struct.mutations)
for (TMutation _iter127 : struct.mutations)
{
_iter101.write(oprot);
_iter127.write(oprot);
}
oprot.writeListEnd();
}
@ -512,9 +525,9 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
oprot.writeBinary(struct.row);
{
oprot.writeI32(struct.mutations.size());
for (TMutation _iter102 : struct.mutations)
for (TMutation _iter128 : struct.mutations)
{
_iter102.write(oprot);
_iter128.write(oprot);
}
}
}
@ -525,14 +538,14 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
{
org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.mutations = new ArrayList<TMutation>(_list103.size);
for (int _i104 = 0; _i104 < _list103.size; ++_i104)
org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.mutations = new ArrayList<TMutation>(_list129.size);
for (int _i130 = 0; _i130 < _list129.size; ++_i130)
{
TMutation _elem105; // optional
_elem105 = new TMutation();
_elem105.read(iprot);
struct.mutations.add(_elem105);
TMutation _elem131; // required
_elem131 = new TMutation();
_elem131.read(iprot);
struct.mutations.add(_elem131);
}
}
struct.setMutationsIsSet(true);

View File

@ -1,11 +1,12 @@
/**
* Autogenerated by Thrift Compiler (0.9.1)
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hbase.thrift2.generated;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
@ -15,8 +16,6 @@ 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;
@ -36,7 +35,7 @@ import org.slf4j.LoggerFactory;
* Any timestamps in the columns are ignored, use timeRange to select by timestamp.
* Max versions defaults to 1.
*/
public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable, Cloneable, Comparable<TScan> {
public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable, Cloneable {
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);
@ -215,7 +214,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
;
}
if (other.isSetColumns()) {
List<TColumn> __this__columns = new ArrayList<TColumn>(other.columns.size());
List<TColumn> __this__columns = new ArrayList<TColumn>();
for (TColumn other_element : other.columns) {
__this__columns.add(new TColumn(other_element));
}
@ -232,7 +231,20 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
}
this.batchSize = other.batchSize;
if (other.isSetAttributes()) {
Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
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);
}
this.attributes = __this__attributes;
}
if (other.isSetAuthorizations()) {
@ -862,123 +874,180 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
@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_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_maxVersions = true && (isSetMaxVersions());
builder.append(present_maxVersions);
if (present_maxVersions)
builder.append(maxVersions);
boolean present_timeRange = true && (isSetTimeRange());
builder.append(present_timeRange);
if (present_timeRange)
builder.append(timeRange);
boolean present_filterString = true && (isSetFilterString());
builder.append(present_filterString);
if (present_filterString)
builder.append(filterString);
boolean present_batchSize = true && (isSetBatchSize());
builder.append(present_batchSize);
if (present_batchSize)
builder.append(batchSize);
boolean present_attributes = true && (isSetAttributes());
builder.append(present_attributes);
if (present_attributes)
builder.append(attributes);
boolean present_authorizations = true && (isSetAuthorizations());
builder.append(present_authorizations);
if (present_authorizations)
builder.append(authorizations);
boolean present_reversed = true && (isSetReversed());
builder.append(present_reversed);
if (present_reversed)
builder.append(reversed);
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(other.isSetStartRow());
lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, other.startRow);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(other.isSetStopRow());
lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStopRow()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, other.stopRow);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, typedOther.stopRow);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumns()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCaching()).compareTo(other.isSetCaching());
lastComparison = Boolean.valueOf(isSetCaching()).compareTo(typedOther.isSetCaching());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCaching()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.caching, other.caching);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.caching, typedOther.caching);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(other.isSetMaxVersions());
lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMaxVersions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, other.maxVersions);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(other.isSetTimeRange());
lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(typedOther.isSetTimeRange());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeRange()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, other.timeRange);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, typedOther.timeRange);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(other.isSetFilterString());
lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(typedOther.isSetFilterString());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFilterString()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, other.filterString);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetBatchSize()).compareTo(other.isSetBatchSize());
lastComparison = Boolean.valueOf(isSetBatchSize()).compareTo(typedOther.isSetBatchSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBatchSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchSize, other.batchSize);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchSize, typedOther.batchSize);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAttributes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(typedOther.isSetAuthorizations());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAuthorizations()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authorizations, other.authorizations);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authorizations, typedOther.authorizations);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReversed()).compareTo(other.isSetReversed());
lastComparison = Boolean.valueOf(isSetReversed()).compareTo(typedOther.isSetReversed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReversed()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reversed, other.reversed);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reversed, typedOther.reversed);
if (lastComparison != 0) {
return lastComparison;
}
@ -1170,7 +1239,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
struct.columns = new ArrayList<TColumn>(_list106.size);
for (int _i107 = 0; _i107 < _list106.size; ++_i107)
{
TColumn _elem108;
TColumn _elem108; // required
_elem108 = new TColumn();
_elem108.read(iprot);
struct.columns.add(_elem108);
@ -1230,8 +1299,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map109.size);
for (int _i110 = 0; _i110 < _map109.size; ++_i110)
{
ByteBuffer _key111;
ByteBuffer _val112;
ByteBuffer _key111; // required
ByteBuffer _val112; // required
_key111 = iprot.readBinary();
_val112 = iprot.readBinary();
struct.attributes.put(_key111, _val112);
@ -1477,7 +1546,7 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
struct.columns = new ArrayList<TColumn>(_list117.size);
for (int _i118 = 0; _i118 < _list117.size; ++_i118)
{
TColumn _elem119;
TColumn _elem119; // required
_elem119 = new TColumn();
_elem119.read(iprot);
struct.columns.add(_elem119);
@ -1512,8 +1581,8 @@ public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, jav
struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map120.size);
for (int _i121 = 0; _i121 < _map120.size; ++_i121)
{
ByteBuffer _key122;
ByteBuffer _val123;
ByteBuffer _key122; // required
ByteBuffer _val123; // required
_key122 = iprot.readBinary();
_val123 = iprot.readBinary();
struct.attributes.put(_key122, _val123);

View File

@ -6,6 +6,7 @@
*/
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;
@ -286,7 +287,19 @@ public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRang
@Override
public int hashCode() {
return 0;
HashCodeBuilder builder = new HashCodeBuilder();
boolean present_minStamp = true;
builder.append(present_minStamp);
if (present_minStamp)
builder.append(minStamp);
boolean present_maxStamp = true;
builder.append(present_maxStamp);
if (present_maxStamp)
builder.append(maxStamp);
return builder.toHashCode();
}
public int compareTo(TTimeRange other) {