hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [8/8] hbase git commit: HBASE-14172 Upgrade existing thrift binding using thrift 0.9.3 compiler. (Josh Elser)
Date Mon, 23 Nov 2015 19:51:38 GMT
HBASE-14172 Upgrade existing thrift binding using thrift 0.9.3 compiler. (Josh Elser)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4ff5a464
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4ff5a464
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4ff5a464

Branch: refs/heads/branch-1
Commit: 4ff5a46439588df2fb72470624a63aef19a7dc5d
Parents: 221ae58
Author: Enis Soztutar <enis@apache.org>
Authored: Mon Nov 23 11:50:39 2015 -0800
Committer: Enis Soztutar <enis@apache.org>
Committed: Mon Nov 23 11:51:16 2015 -0800

----------------------------------------------------------------------
 hbase-thrift/pom.xml                            |    4 +-
 .../hadoop/hbase/thrift/ThriftServerRunner.java |    8 +-
 .../hbase/thrift/generated/AlreadyExists.java   |   24 +-
 .../hbase/thrift/generated/BatchMutation.java   |   64 +-
 .../thrift/generated/ColumnDescriptor.java      |  110 +-
 .../hadoop/hbase/thrift/generated/Hbase.java    | 8107 ++++++++++++------
 .../hadoop/hbase/thrift/generated/IOError.java  |   24 +-
 .../hbase/thrift/generated/IllegalArgument.java |   24 +-
 .../hadoop/hbase/thrift/generated/Mutation.java |   72 +-
 .../hadoop/hbase/thrift/generated/TAppend.java  |  108 +-
 .../hadoop/hbase/thrift/generated/TCell.java    |   44 +-
 .../hadoop/hbase/thrift/generated/TColumn.java  |   42 +-
 .../hbase/thrift/generated/TIncrement.java      |   80 +-
 .../hbase/thrift/generated/TRegionInfo.java     |  118 +-
 .../hbase/thrift/generated/TRowResult.java      |  104 +-
 .../hadoop/hbase/thrift/generated/TScan.java    |  144 +-
 .../hadoop/hbase/thrift2/ThriftServer.java      |    5 +-
 .../hadoop/hbase/thrift2/generated/TAppend.java |  132 +-
 .../hbase/thrift2/generated/TAuthorization.java |   47 +-
 .../thrift2/generated/TCellVisibility.java      |   26 +-
 .../hadoop/hbase/thrift2/generated/TColumn.java |   60 +-
 .../thrift2/generated/TColumnIncrement.java     |   62 +-
 .../hbase/thrift2/generated/TColumnValue.java   |   94 +-
 .../hadoop/hbase/thrift2/generated/TDelete.java |  146 +-
 .../hbase/thrift2/generated/TDeleteType.java    |    2 +-
 .../hbase/thrift2/generated/TDurability.java    |    2 +-
 .../hadoop/hbase/thrift2/generated/TGet.java    |  163 +-
 .../hbase/thrift2/generated/THBaseService.java  | 2508 ++++--
 .../hbase/thrift2/generated/THRegionInfo.java   |  105 +-
 .../thrift2/generated/THRegionLocation.java     |   32 +-
 .../hbase/thrift2/generated/TIOError.java       |   26 +-
 .../thrift2/generated/TIllegalArgument.java     |   26 +-
 .../hbase/thrift2/generated/TIncrement.java     |  132 +-
 .../hbase/thrift2/generated/TMutation.java      |   20 +-
 .../hadoop/hbase/thrift2/generated/TPut.java    |  142 +-
 .../hadoop/hbase/thrift2/generated/TResult.java |   63 +-
 .../hbase/thrift2/generated/TRowMutations.java  |   63 +-
 .../hadoop/hbase/thrift2/generated/TScan.java   |  196 +-
 .../hbase/thrift2/generated/TServerName.java    |   46 +-
 .../hbase/thrift2/generated/TTimeRange.java     |   36 +-
 pom.xml                                         |    2 +-
 41 files changed, 8486 insertions(+), 4727 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4ff5a464/hbase-thrift/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-thrift/pom.xml b/hbase-thrift/pom.xml
index f2e6cd6..85c201f 100644
--- a/hbase-thrift/pom.xml
+++ b/hbase-thrift/pom.xml
@@ -407,12 +407,12 @@
                     <requireProperty>
                       <property>thrift.version</property>
                       <message>"The Thrift version must be specified."</message>
-                      <regex>0\.9\.2</regex>
+                      <regex>0\.9\.3</regex>
                       <regexMessage>
 -
 -
 [FATAL] ==========================================================================================
-[FATAL] HBase Thrift requires the thrift generator version 0.9.2.
+[FATAL] HBase Thrift requires the thrift generator version 0.9.3.
 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
 [FATAL] ==========================================================================================
 -

http://git-wip-us.apache.org/repos/asf/hbase/blob/4ff5a464/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
index 29fb513..b29baa1 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
@@ -539,7 +539,7 @@ public class ThriftServerRunner implements Runnable {
         CallQueue callQueue =
             new CallQueue(new LinkedBlockingQueue<Call>(), metrics);
         ExecutorService executorService = createExecutor(
-            callQueue, serverArgs.getWorkerThreads());
+            callQueue, serverArgs.getMinWorkerThreads(), serverArgs.getMaxWorkerThreads());
         serverArgs.executorService(executorService)
                   .processor(processor)
                   .transportFactory(transportFactory)
@@ -551,7 +551,7 @@ public class ThriftServerRunner implements Runnable {
         CallQueue callQueue =
             new CallQueue(new LinkedBlockingQueue<Call>(), metrics);
         ExecutorService executorService = createExecutor(
-            callQueue, serverArgs.getWorkerThreads());
+            callQueue, serverArgs.getWorkerThreads(), serverArgs.getWorkerThreads());
         serverArgs.executorService(executorService)
                   .processor(processor)
                   .transportFactory(transportFactory)
@@ -597,11 +597,11 @@ public class ThriftServerRunner implements Runnable {
   }
 
   ExecutorService createExecutor(BlockingQueue<Runnable> callQueue,
-                                 int workerThreads) {
+                                 int minWorkers, int maxWorkers) {
     ThreadFactoryBuilder tfb = new ThreadFactoryBuilder();
     tfb.setDaemon(true);
     tfb.setNameFormat("thrift-worker-%d");
-    return new ThreadPoolExecutor(workerThreads, workerThreads,
+    return new ThreadPoolExecutor(minWorkers, maxWorkers,
             Long.MAX_VALUE, TimeUnit.SECONDS, callQueue, tfb.build());
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/4ff5a464/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
index 091a42b..ba5952e 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.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,14 +29,17 @@ 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"})
 /**
  * An AlreadyExists exceptions signals that a table with the specified
  * name already exists
  */
-public class AlreadyExists extends TException implements org.apache.thrift.TBase<AlreadyExists,
AlreadyExists._Fields>, java.io.Serializable, Cloneable {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-22")
+public class AlreadyExists extends TException implements org.apache.thrift.TBase<AlreadyExists,
AlreadyExists._Fields>, java.io.Serializable, Cloneable, Comparable<AlreadyExists>
{
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExists");
 
   private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message",
org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -230,30 +234,30 @@ public class AlreadyExists extends TException implements org.apache.thrift.TBase
 
   @Override
   public int hashCode() {
-    HashCodeBuilder builder = new HashCodeBuilder();
+    List<Object> list = new ArrayList<Object>();
 
     boolean present_message = true && (isSetMessage());
-    builder.append(present_message);
+    list.add(present_message);
     if (present_message)
-      builder.append(message);
+      list.add(message);
 
-    return builder.toHashCode();
+    return list.hashCode();
   }
 
+  @Override
   public int compareTo(AlreadyExists other) {
     if (!getClass().equals(other.getClass())) {
       return getClass().getName().compareTo(other.getClass().getName());
     }
 
     int lastComparison = 0;
-    AlreadyExists typedOther = (AlreadyExists)other;
 
-    lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());
+    lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetMessage()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message);
       if (lastComparison != 0) {
         return lastComparison;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/4ff5a464/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
index fd038b3..718b694 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.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 BatchMutation object is used to apply a number of Mutations to a single row.
  */
-public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, BatchMutation._Fields>,
java.io.Serializable, Cloneable {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-22")
+public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, BatchMutation._Fields>,
java.io.Serializable, Cloneable, Comparable<BatchMutation> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchMutation");
 
   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 BatchMutation implements org.apache.thrift.TBase<BatchMutation,
Bat
     List<Mutation> mutations)
   {
     this();
-    this.row = row;
+    this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
     this.mutations = mutations;
   }
 
@@ -143,7 +147,7 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation,
Bat
       this.row = other.row;
     }
     if (other.isSetMutations()) {
-      List<Mutation> __this__mutations = new ArrayList<Mutation>();
+      List<Mutation> __this__mutations = new ArrayList<Mutation>(other.mutations.size());
       for (Mutation other_element : other.mutations) {
         __this__mutations.add(new Mutation(other_element));
       }
@@ -167,16 +171,16 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation,
Bat
   }
 
   public ByteBuffer bufferForRow() {
-    return row;
+    return org.apache.thrift.TBaseHelper.copyBinary(row);
   }
 
   public BatchMutation 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 BatchMutation setRow(ByteBuffer row) {
-    this.row = row;
+    this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
     return this;
   }
 
@@ -318,45 +322,45 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation,
Bat
 
   @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_mutations = true && (isSetMutations());
-    builder.append(present_mutations);
+    list.add(present_mutations);
     if (present_mutations)
-      builder.append(mutations);
+      list.add(mutations);
 
-    return builder.toHashCode();
+    return list.hashCode();
   }
 
+  @Override
   public int compareTo(BatchMutation other) {
     if (!getClass().equals(other.getClass())) {
       return getClass().getName().compareTo(other.getClass().getName());
     }
 
     int lastComparison = 0;
-    BatchMutation typedOther = (BatchMutation)other;
 
-    lastComparison = Boolean.valueOf(isSetRow()).compareTo(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(isSetMutations()).compareTo(typedOther.isSetMutations());
+    lastComparison = Boolean.valueOf(isSetMutations()).compareTo(other.isSetMutations());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetMutations()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, typedOther.mutations);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, other.mutations);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -385,7 +389,7 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation,
Bat
     if (this.row == null) {
       sb.append("null");
     } else {
-      sb.append(this.row);
+      org.apache.thrift.TBaseHelper.toString(this.row, sb);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -452,12 +456,12 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation,
Bat
               {
                 org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                 struct.mutations = new ArrayList<Mutation>(_list0.size);
-                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+                Mutation _elem1;
+                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                 {
-                  Mutation _elem2; // required
-                  _elem2 = new Mutation();
-                  _elem2.read(iprot);
-                  struct.mutations.add(_elem2);
+                  _elem1 = new Mutation();
+                  _elem1.read(iprot);
+                  struct.mutations.add(_elem1);
                 }
                 iprot.readListEnd();
               }
@@ -549,12 +553,12 @@ public class BatchMutation implements org.apache.thrift.TBase<BatchMutation,
Bat
         {
           org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
           struct.mutations = new ArrayList<Mutation>(_list5.size);
-          for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+          Mutation _elem6;
+          for (int _i7 = 0; _i7 < _list5.size; ++_i7)
           {
-            Mutation _elem7; // required
-            _elem7 = new Mutation();
-            _elem7.read(iprot);
-            struct.mutations.add(_elem7);
+            _elem6 = new Mutation();
+            _elem6.read(iprot);
+            struct.mutations.add(_elem6);
           }
         }
         struct.setMutationsIsSet(true);

http://git-wip-us.apache.org/repos/asf/hbase/blob/4ff5a464/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
index fe018be..4790625 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.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,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"})
 /**
  * An HColumnDescriptor contains information about a column family
  * such as the number of versions, compression settings, etc. It is
  * used as input when creating a table or adding a column.
  */
-public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescriptor, ColumnDescriptor._Fields>,
java.io.Serializable, Cloneable {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-22")
+public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescriptor, ColumnDescriptor._Fields>,
java.io.Serializable, Cloneable, Comparable<ColumnDescriptor> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnDescriptor");
 
   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name",
org.apache.thrift.protocol.TType.STRING, (short)1);
@@ -211,7 +215,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
     int timeToLive)
   {
     this();
-    this.name = name;
+    this.name = org.apache.thrift.TBaseHelper.copyBinary(name);
     this.maxVersions = maxVersions;
     setMaxVersionsIsSet(true);
     this.compression = compression;
@@ -281,16 +285,16 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
   }
 
   public ByteBuffer bufferForName() {
-    return name;
+    return org.apache.thrift.TBaseHelper.copyBinary(name);
   }
 
   public ColumnDescriptor setName(byte[] name) {
-    setName(name == null ? (ByteBuffer)null : ByteBuffer.wrap(name));
+    this.name = name == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(name, name.length));
     return this;
   }
 
   public ColumnDescriptor setName(ByteBuffer name) {
-    this.name = name;
+    this.name = org.apache.thrift.TBaseHelper.copyBinary(name);
     return this;
   }
 
@@ -578,28 +582,28 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
       return getName();
 
     case MAX_VERSIONS:
-      return Integer.valueOf(getMaxVersions());
+      return getMaxVersions();
 
     case COMPRESSION:
       return getCompression();
 
     case IN_MEMORY:
-      return Boolean.valueOf(isInMemory());
+      return isInMemory();
 
     case BLOOM_FILTER_TYPE:
       return getBloomFilterType();
 
     case BLOOM_FILTER_VECTOR_SIZE:
-      return Integer.valueOf(getBloomFilterVectorSize());
+      return getBloomFilterVectorSize();
 
     case BLOOM_FILTER_NB_HASHES:
-      return Integer.valueOf(getBloomFilterNbHashes());
+      return getBloomFilterNbHashes();
 
     case BLOCK_CACHE_ENABLED:
-      return Boolean.valueOf(isBlockCacheEnabled());
+      return isBlockCacheEnabled();
 
     case TIME_TO_LIVE:
-      return Integer.valueOf(getTimeToLive());
+      return getTimeToLive();
 
     }
     throw new IllegalStateException();
@@ -733,150 +737,150 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
 
   @Override
   public int hashCode() {
-    HashCodeBuilder builder = new HashCodeBuilder();
+    List<Object> list = new ArrayList<Object>();
 
     boolean present_name = true && (isSetName());
-    builder.append(present_name);
+    list.add(present_name);
     if (present_name)
-      builder.append(name);
+      list.add(name);
 
     boolean present_maxVersions = true;
-    builder.append(present_maxVersions);
+    list.add(present_maxVersions);
     if (present_maxVersions)
-      builder.append(maxVersions);
+      list.add(maxVersions);
 
     boolean present_compression = true && (isSetCompression());
-    builder.append(present_compression);
+    list.add(present_compression);
     if (present_compression)
-      builder.append(compression);
+      list.add(compression);
 
     boolean present_inMemory = true;
-    builder.append(present_inMemory);
+    list.add(present_inMemory);
     if (present_inMemory)
-      builder.append(inMemory);
+      list.add(inMemory);
 
     boolean present_bloomFilterType = true && (isSetBloomFilterType());
-    builder.append(present_bloomFilterType);
+    list.add(present_bloomFilterType);
     if (present_bloomFilterType)
-      builder.append(bloomFilterType);
+      list.add(bloomFilterType);
 
     boolean present_bloomFilterVectorSize = true;
-    builder.append(present_bloomFilterVectorSize);
+    list.add(present_bloomFilterVectorSize);
     if (present_bloomFilterVectorSize)
-      builder.append(bloomFilterVectorSize);
+      list.add(bloomFilterVectorSize);
 
     boolean present_bloomFilterNbHashes = true;
-    builder.append(present_bloomFilterNbHashes);
+    list.add(present_bloomFilterNbHashes);
     if (present_bloomFilterNbHashes)
-      builder.append(bloomFilterNbHashes);
+      list.add(bloomFilterNbHashes);
 
     boolean present_blockCacheEnabled = true;
-    builder.append(present_blockCacheEnabled);
+    list.add(present_blockCacheEnabled);
     if (present_blockCacheEnabled)
-      builder.append(blockCacheEnabled);
+      list.add(blockCacheEnabled);
 
     boolean present_timeToLive = true;
-    builder.append(present_timeToLive);
+    list.add(present_timeToLive);
     if (present_timeToLive)
-      builder.append(timeToLive);
+      list.add(timeToLive);
 
-    return builder.toHashCode();
+    return list.hashCode();
   }
 
+  @Override
   public int compareTo(ColumnDescriptor other) {
     if (!getClass().equals(other.getClass())) {
       return getClass().getName().compareTo(other.getClass().getName());
     }
 
     int lastComparison = 0;
-    ColumnDescriptor typedOther = (ColumnDescriptor)other;
 
-    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions());
+    lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(other.isSetMaxVersions());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetMaxVersions()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, other.maxVersions);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetCompression()).compareTo(typedOther.isSetCompression());
+    lastComparison = Boolean.valueOf(isSetCompression()).compareTo(other.isSetCompression());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetCompression()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compression, typedOther.compression);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compression, other.compression);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(typedOther.isSetInMemory());
+    lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(other.isSetInMemory());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetInMemory()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inMemory, typedOther.inMemory);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inMemory, other.inMemory);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetBloomFilterType()).compareTo(typedOther.isSetBloomFilterType());
+    lastComparison = Boolean.valueOf(isSetBloomFilterType()).compareTo(other.isSetBloomFilterType());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetBloomFilterType()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterType, typedOther.bloomFilterType);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterType, other.bloomFilterType);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(typedOther.isSetBloomFilterVectorSize());
+    lastComparison = Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(other.isSetBloomFilterVectorSize());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetBloomFilterVectorSize()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterVectorSize,
typedOther.bloomFilterVectorSize);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterVectorSize,
other.bloomFilterVectorSize);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(typedOther.isSetBloomFilterNbHashes());
+    lastComparison = Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(other.isSetBloomFilterNbHashes());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetBloomFilterNbHashes()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterNbHashes,
typedOther.bloomFilterNbHashes);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterNbHashes,
other.bloomFilterNbHashes);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(typedOther.isSetBlockCacheEnabled());
+    lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(other.isSetBlockCacheEnabled());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetBlockCacheEnabled()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockCacheEnabled, typedOther.blockCacheEnabled);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockCacheEnabled, other.blockCacheEnabled);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(typedOther.isSetTimeToLive());
+    lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(other.isSetTimeToLive());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetTimeToLive()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeToLive, typedOther.timeToLive);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeToLive, other.timeToLive);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -905,7 +909,7 @@ public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescripto
     if (this.name == null) {
       sb.append("null");
     } else {
-      sb.append(this.name);
+      org.apache.thrift.TBaseHelper.toString(this.name, sb);
     }
     first = false;
     if (!first) sb.append(", ");


Mime
View raw message