hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-19351 Deprecated is missing in Table implementations
Date Tue, 28 Nov 2017 19:17:43 GMT
Repository: hbase
Updated Branches:
  refs/heads/master b75510284 -> b5a01685f


HBASE-19351 Deprecated is missing in Table implementations

Signed-off-by: Michael Stack <stack@apache.org>


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

Branch: refs/heads/master
Commit: b5a01685f4aff0d97ec53a6eca26bd37dd9d9037
Parents: b755102
Author: Peter Somogyi <psomogyi@cloudera.com>
Authored: Mon Nov 27 17:09:56 2017 +0100
Committer: Michael Stack <stack@apache.org>
Committed: Tue Nov 28 11:17:35 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/client/HTable.java  |  8 ++++++--
 .../hadoop/hbase/rest/client/RemoteHTable.java       | 15 ++++++++++++---
 .../hadoop/hbase/regionserver/RegionAsTable.java     |  7 +++++++
 .../TestRegionServerReadRequestMetrics.java          |  5 +++--
 4 files changed, 28 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b5a01685/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
index 61d955f..6030f86 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
@@ -233,6 +233,7 @@ public class HTable implements Table {
    * {@inheritDoc}
    */
   @Override
+  @Deprecated
   public HTableDescriptor getTableDescriptor() throws IOException {
     HTableDescriptor htd = HBaseAdmin.getHTableDescriptor(tableName, connection, rpcCallerFactory,
       rpcControllerFactory, operationTimeoutMs, readRpcTimeoutMs);
@@ -745,7 +746,7 @@ public class HTable implements Table {
       final byte [] family, final byte [] qualifier, final byte [] value,
       final Put put)
   throws IOException {
-    return checkAndPut(row, family, qualifier, CompareOp.EQUAL, value, put);
+    return checkAndPut(row, family, qualifier, CompareOperator.EQUAL, value, put);
   }
 
   private boolean doCheckAndPut(final byte [] row, final byte [] family,
@@ -773,6 +774,7 @@ public class HTable implements Table {
    * {@inheritDoc}
    */
   @Override
+  @Deprecated
   public boolean checkAndPut(final byte [] row, final byte [] family,
       final byte [] qualifier, final CompareOp compareOp, final byte [] value,
       final Put put)
@@ -799,7 +801,7 @@ public class HTable implements Table {
   @Override
   public boolean checkAndDelete(final byte [] row, final byte [] family, final byte [] qualifier,
       final byte [] value, final Delete delete) throws IOException {
-    return checkAndDelete(row, family, qualifier, CompareOp.EQUAL, value, delete);
+    return checkAndDelete(row, family, qualifier, CompareOperator.EQUAL, value, delete);
   }
 
   private boolean doCheckAndDelete(final byte [] row, final byte [] family,
@@ -845,6 +847,7 @@ public class HTable implements Table {
    * {@inheritDoc}
    */
   @Override
+  @Deprecated
   public boolean checkAndDelete(final byte [] row, final byte [] family,
       final byte [] qualifier, final CompareOp compareOp, final byte [] value,
       final Delete delete)
@@ -919,6 +922,7 @@ public class HTable implements Table {
    * {@inheritDoc}
    */
   @Override
+  @Deprecated
   public boolean checkAndMutate(final byte [] row, final byte [] family, final byte [] qualifier,
     final CompareOp compareOp, final byte [] value, final RowMutations rm)
   throws IOException {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b5a01685/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
index 1eaaa65..39eb0a9 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
@@ -251,6 +251,7 @@ public class RemoteHTable implements Table {
   }
 
   @Override
+  @Deprecated
   public HTableDescriptor getTableDescriptor() throws IOException {
     StringBuilder sb = new StringBuilder();
     sb.append('/');
@@ -702,6 +703,7 @@ public class RemoteHTable implements Table {
   }
 
   @Override
+  @Deprecated
   public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
       CompareOp compareOp, byte[] value, Put put) throws IOException {
     throw new IOException("checkAndPut for non-equal comparison not implemented");
@@ -752,6 +754,7 @@ public class RemoteHTable implements Table {
   }
 
   @Override
+  @Deprecated
   public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
       CompareOp compareOp, byte[] value, Delete delete) throws IOException {
     throw new IOException("checkAndDelete for non-equal comparison not implemented");
@@ -835,17 +838,21 @@ public class RemoteHTable implements Table {
     throw new UnsupportedOperationException("batchCoprocessorService not implemented");
   }
 
-  @Override public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
+  @Override
+  @Deprecated
+  public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
       CompareOp compareOp, byte[] value, RowMutations rm) throws IOException {
     throw new UnsupportedOperationException("checkAndMutate not implemented");
   }
 
-  @Override public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
-                                          CompareOperator compareOp, byte[] value, RowMutations
rm) throws IOException {
+  @Override
+  public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier,
+      CompareOperator compareOp, byte[] value, RowMutations rm) throws IOException {
     throw new UnsupportedOperationException("checkAndMutate not implemented");
   }
 
   @Override
+  @Deprecated
   public void setOperationTimeout(int operationTimeout) {
     throw new UnsupportedOperationException();
   }
@@ -885,6 +892,7 @@ public class RemoteHTable implements Table {
   }
 
   @Override
+  @Deprecated
   public void setReadRpcTimeout(int readRpcTimeout) {
     throw new UnsupportedOperationException();
   }
@@ -901,6 +909,7 @@ public class RemoteHTable implements Table {
   }
 
   @Override
+  @Deprecated
   public void setWriteRpcTimeout(int writeRpcTimeout) {
     throw new UnsupportedOperationException();
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b5a01685/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
index 440ba71..0f1d4cd 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/RegionAsTable.java
@@ -84,6 +84,7 @@ public class RegionAsTable implements Table {
   }
 
   @Override
+  @Deprecated
   public HTableDescriptor getTableDescriptor() throws IOException {
     return new HTableDescriptor(this.region.getTableDescriptor());
   }
@@ -219,6 +220,7 @@ public class RegionAsTable implements Table {
   }
 
   @Override
+  @Deprecated
   public boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier, CompareOp compareOp,
       byte[] value, Put put)
   throws IOException {
@@ -250,6 +252,7 @@ public class RegionAsTable implements Table {
   }
 
   @Override
+  @Deprecated
   public boolean checkAndDelete(byte[] row, byte[] family, byte[] qualifier,
       CompareOp compareOp, byte[] value, Delete delete)
   throws IOException {
@@ -333,6 +336,7 @@ public class RegionAsTable implements Table {
   }
 
   @Override
+  @Deprecated
   public boolean checkAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareOp compareOp,
       byte[] value, RowMutations mutation)
   throws IOException {
@@ -348,6 +352,7 @@ public class RegionAsTable implements Table {
   }
 
   @Override
+  @Deprecated
   public void setOperationTimeout(int operationTimeout) {
     throw new UnsupportedOperationException();
   }
@@ -370,6 +375,7 @@ public class RegionAsTable implements Table {
   }
 
   @Override
+  @Deprecated
   public void setWriteRpcTimeout(int writeRpcTimeout) {throw new UnsupportedOperationException();
}
 
   @Override
@@ -378,6 +384,7 @@ public class RegionAsTable implements Table {
   }
 
   @Override
+  @Deprecated
   public void setReadRpcTimeout(int readRpcTimeout) {throw new UnsupportedOperationException();
}
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/b5a01685/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReadRequestMetrics.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReadRequestMetrics.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReadRequestMetrics.java
index 7227183..1bfd999 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReadRequestMetrics.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerReadRequestMetrics.java
@@ -22,6 +22,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.ClusterStatus.Option;
+import org.apache.hadoop.hbase.CompareOperator;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.RegionLoad;
 import org.apache.hadoop.hbase.ServerLoad;
@@ -300,7 +301,7 @@ public class TestRegionServerReadRequestMetrics {
     put = new Put(ROW1);
     put.addColumn(CF1, COL2, VAL2);
     boolean checkAndPut =
-      table.checkAndPut(ROW1, CF1, COL2, CompareFilter.CompareOp.EQUAL, VAL2, put);
+      table.checkAndPut(ROW1, CF1, COL2, CompareOperator.EQUAL, VAL2, put);
     resultCount = checkAndPut ? 1 : 0;
     testReadRequests(resultCount, 1, 0);
 
@@ -317,7 +318,7 @@ public class TestRegionServerReadRequestMetrics {
     RowMutations rm = new RowMutations(ROW1);
     rm.add(put);
     boolean checkAndMutate =
-      table.checkAndMutate(ROW1, CF1, COL1, CompareFilter.CompareOp.EQUAL, VAL1, rm);
+      table.checkAndMutate(ROW1, CF1, COL1, CompareOperator.EQUAL, VAL1, rm);
     resultCount = checkAndMutate ? 1 : 0;
     testReadRequests(resultCount, 1, 0);
   }


Mime
View raw message