hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [4/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:34 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/4ff5a464/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
index 39a5015..5d47508 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
@@ -1,5 +1,5 @@
 /**
- * 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

http://git-wip-us.apache.org/repos/asf/hbase/blob/4ff5a464/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java
index 042b70b..c1144f3 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java
@@ -1,5 +1,5 @@
 /**
- * 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

http://git-wip-us.apache.org/repos/asf/hbase/blob/4ff5a464/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
index 7e93341..9ed1799 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
@@ -1,12 +1,11 @@
 /**
- * Autogenerated by Thrift Compiler (0.9.0)
+ * Autogenerated by Thrift Compiler (0.9.3)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
 package org.apache.hadoop.hbase.thrift2.generated;
 
-import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.protocol.TProtocolException;
 import org.apache.thrift.EncodingUtils;
 import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -28,9 +29,11 @@ import java.util.Collections;
 import java.util.BitSet;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
+import javax.annotation.Generated;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
 /**
  * Used to perform Get operations on a single row.
  * 
@@ -44,7 +47,8 @@ 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 {
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-22")
+public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.io.Serializable,
Cloneable, Comparable<TGet> {
   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);
@@ -154,7 +158,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
   private static final int __TIMESTAMP_ISSET_ID = 0;
   private static final int __MAXVERSIONS_ISSET_ID = 1;
   private byte __isset_bitfield = 0;
-  private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES,_Fields.AUTHORIZATIONS};
+  private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES,_Fields.AUTHORIZATIONS};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -188,7 +192,7 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
     ByteBuffer row)
   {
     this();
-    this.row = row;
+    this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
   }
 
   /**
@@ -198,10 +202,9 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
     __isset_bitfield = other.__isset_bitfield;
     if (other.isSetRow()) {
       this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
-;
     }
     if (other.isSetColumns()) {
-      List<TColumn> __this__columns = new ArrayList<TColumn>();
+      List<TColumn> __this__columns = new ArrayList<TColumn>(other.columns.size());
       for (TColumn other_element : other.columns) {
         __this__columns.add(new TColumn(other_element));
       }
@@ -214,23 +217,9 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
     this.maxVersions = other.maxVersions;
     if (other.isSetFilterString()) {
       this.filterString = org.apache.thrift.TBaseHelper.copyBinary(other.filterString);
-;
     }
     if (other.isSetAttributes()) {
-      Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
-      for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet())
{
-
-        ByteBuffer other_element_key = other_element.getKey();
-        ByteBuffer other_element_value = other_element.getValue();
-
-        ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
-;
-
-        ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
-;
-
-        __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
-      }
+      Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
       this.attributes = __this__attributes;
     }
     if (other.isSetAuthorizations()) {
@@ -262,16 +251,16 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
   }
 
   public ByteBuffer bufferForRow() {
-    return row;
+    return org.apache.thrift.TBaseHelper.copyBinary(row);
   }
 
   public TGet 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 TGet setRow(ByteBuffer row) {
-    this.row = row;
+    this.row = org.apache.thrift.TBaseHelper.copyBinary(row);
     return this;
   }
 
@@ -405,16 +394,16 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
   }
 
   public ByteBuffer bufferForFilterString() {
-    return filterString;
+    return org.apache.thrift.TBaseHelper.copyBinary(filterString);
   }
 
   public TGet setFilterString(byte[] filterString) {
-    setFilterString(filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(filterString));
+    this.filterString = filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(filterString,
filterString.length));
     return this;
   }
 
   public TGet setFilterString(ByteBuffer filterString) {
-    this.filterString = filterString;
+    this.filterString = org.apache.thrift.TBaseHelper.copyBinary(filterString);
     return this;
   }
 
@@ -570,13 +559,13 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
       return getColumns();
 
     case TIMESTAMP:
-      return Long.valueOf(getTimestamp());
+      return getTimestamp();
 
     case TIME_RANGE:
       return getTimeRange();
 
     case MAX_VERSIONS:
-      return Integer.valueOf(getMaxVersions());
+      return getMaxVersions();
 
     case FILTER_STRING:
       return getFilterString();
@@ -708,135 +697,135 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
 
   @Override
   public int hashCode() {
-    HashCodeBuilder builder = new HashCodeBuilder();
+    List<Object> list = new ArrayList<Object>();
 
     boolean present_row = true && (isSetRow());
-    builder.append(present_row);
+    list.add(present_row);
     if (present_row)
-      builder.append(row);
+      list.add(row);
 
     boolean present_columns = true && (isSetColumns());
-    builder.append(present_columns);
+    list.add(present_columns);
     if (present_columns)
-      builder.append(columns);
+      list.add(columns);
 
     boolean present_timestamp = true && (isSetTimestamp());
-    builder.append(present_timestamp);
+    list.add(present_timestamp);
     if (present_timestamp)
-      builder.append(timestamp);
+      list.add(timestamp);
 
     boolean present_timeRange = true && (isSetTimeRange());
-    builder.append(present_timeRange);
+    list.add(present_timeRange);
     if (present_timeRange)
-      builder.append(timeRange);
+      list.add(timeRange);
 
     boolean present_maxVersions = true && (isSetMaxVersions());
-    builder.append(present_maxVersions);
+    list.add(present_maxVersions);
     if (present_maxVersions)
-      builder.append(maxVersions);
+      list.add(maxVersions);
 
     boolean present_filterString = true && (isSetFilterString());
-    builder.append(present_filterString);
+    list.add(present_filterString);
     if (present_filterString)
-      builder.append(filterString);
+      list.add(filterString);
 
     boolean present_attributes = true && (isSetAttributes());
-    builder.append(present_attributes);
+    list.add(present_attributes);
     if (present_attributes)
-      builder.append(attributes);
+      list.add(attributes);
 
     boolean present_authorizations = true && (isSetAuthorizations());
-    builder.append(present_authorizations);
+    list.add(present_authorizations);
     if (present_authorizations)
-      builder.append(authorizations);
+      list.add(authorizations);
 
-    return builder.toHashCode();
+    return list.hashCode();
   }
 
+  @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(typedOther.isSetRow());
+    lastComparison = Boolean.valueOf(isSetRow()).compareTo(other.isSetRow());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetRow()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, other.row);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
+    lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetColumns()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
+    lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetTimestamp()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(typedOther.isSetTimeRange());
+    lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(other.isSetTimeRange());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetTimeRange()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, typedOther.timeRange);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, other.timeRange);
       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(isSetFilterString()).compareTo(typedOther.isSetFilterString());
+    lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(other.isSetFilterString());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetFilterString()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, other.filterString);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
+    lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetAttributes()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(typedOther.isSetAuthorizations());
+    lastComparison = Boolean.valueOf(isSetAuthorizations()).compareTo(other.isSetAuthorizations());
     if (lastComparison != 0) {
       return lastComparison;
     }
     if (isSetAuthorizations()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authorizations, typedOther.authorizations);
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authorizations, other.authorizations);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -997,12 +986,12 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
               {
                 org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
                 struct.columns = new ArrayList<TColumn>(_list16.size);
-                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+                TColumn _elem17;
+                for (int _i18 = 0; _i18 < _list16.size; ++_i18)
                 {
-                  TColumn _elem18; // required
-                  _elem18 = new TColumn();
-                  _elem18.read(iprot);
-                  struct.columns.add(_elem18);
+                  _elem17 = new TColumn();
+                  _elem17.read(iprot);
+                  struct.columns.add(_elem17);
                 }
                 iprot.readListEnd();
               }
@@ -1049,13 +1038,13 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
               {
                 org.apache.thrift.protocol.TMap _map19 = iprot.readMapBegin();
                 struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map19.size);
-                for (int _i20 = 0; _i20 < _map19.size; ++_i20)
+                ByteBuffer _key20;
+                ByteBuffer _val21;
+                for (int _i22 = 0; _i22 < _map19.size; ++_i22)
                 {
-                  ByteBuffer _key21; // required
-                  ByteBuffer _val22; // required
-                  _key21 = iprot.readBinary();
-                  _val22 = iprot.readBinary();
-                  struct.attributes.put(_key21, _val22);
+                  _key20 = iprot.readBinary();
+                  _val21 = iprot.readBinary();
+                  struct.attributes.put(_key20, _val21);
                 }
                 iprot.readMapEnd();
               }
@@ -1240,12 +1229,12 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
         {
           org.apache.thrift.protocol.TList _list27 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
iprot.readI32());
           struct.columns = new ArrayList<TColumn>(_list27.size);
-          for (int _i28 = 0; _i28 < _list27.size; ++_i28)
+          TColumn _elem28;
+          for (int _i29 = 0; _i29 < _list27.size; ++_i29)
           {
-            TColumn _elem29; // required
-            _elem29 = new TColumn();
-            _elem29.read(iprot);
-            struct.columns.add(_elem29);
+            _elem28 = new TColumn();
+            _elem28.read(iprot);
+            struct.columns.add(_elem28);
           }
         }
         struct.setColumnsIsSet(true);
@@ -1271,13 +1260,13 @@ public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>,
java.i
         {
           org.apache.thrift.protocol.TMap _map30 = 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*_map30.size);
-          for (int _i31 = 0; _i31 < _map30.size; ++_i31)
+          ByteBuffer _key31;
+          ByteBuffer _val32;
+          for (int _i33 = 0; _i33 < _map30.size; ++_i33)
           {
-            ByteBuffer _key32; // required
-            ByteBuffer _val33; // required
-            _key32 = iprot.readBinary();
-            _val33 = iprot.readBinary();
-            struct.attributes.put(_key32, _val33);
+            _key31 = iprot.readBinary();
+            _val32 = iprot.readBinary();
+            struct.attributes.put(_key31, _val32);
           }
         }
         struct.setAttributesIsSet(true);


Mime
View raw message