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 61d955f7f4c..6030f860732 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 { 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 1eaaa65b838..39eb0a9b156 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(); } 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 440ba713373..0f1d4cd24a7 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 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 7227183edc1..1bfd9990c12 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); }