Skip to content

Commit 9b413cf

Browse files
authored
HBASE-22590 Remove the deprecated methods in Table interface (#309)
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com> Signed-off-by: Guanghao <zghao@apache.org>
1 parent ed30909 commit 9b413cf

29 files changed

Lines changed: 351 additions & 1019 deletions

File tree

hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupMerge.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public void TestIncBackupMergeRestore() throws Exception {
116116
tablesRestoreIncMultiple, tablesMapIncMultiple, true));
117117

118118
Table hTable = conn.getTable(table1_restore);
119-
LOG.debug("After incremental restore: " + hTable.getTableDescriptor());
119+
LOG.debug("After incremental restore: " + hTable.getDescriptor());
120120
int countRows = TEST_UTIL.countRows(hTable, famName);
121121
LOG.debug("f1 has " + countRows + " rows");
122122
Assert.assertEquals(NB_ROWS_IN_BATCH + 2 * ADD_ROWS, countRows);

hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public void TestIncBackupMergeRestore() throws Exception {
334334
tablesRestoreIncMultiple, tablesMapIncMultiple, true));
335335

336336
Table hTable = conn.getTable(table1_restore);
337-
LOG.debug("After incremental restore: " + hTable.getTableDescriptor());
337+
LOG.debug("After incremental restore: " + hTable.getDescriptor());
338338
LOG.debug("f1 has " + TEST_UTIL.countRows(hTable, famName) + " rows");
339339
Assert.assertEquals(TEST_UTIL.countRows(hTable, famName), NB_ROWS_IN_BATCH + 2 * ADD_ROWS);
340340

hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -659,22 +659,6 @@ protected Long rpcCall() throws Exception {
659659
callWithRetries(callable, this.operationTimeoutMs);
660660
}
661661

662-
@Override
663-
@Deprecated
664-
public boolean checkAndPut(final byte [] row, final byte [] family, final byte [] qualifier,
665-
final byte [] value, final Put put) throws IOException {
666-
return doCheckAndPut(row, family, qualifier, CompareOperator.EQUAL.name(), value, null, put);
667-
}
668-
669-
@Override
670-
@Deprecated
671-
public boolean checkAndPut(final byte [] row, final byte [] family, final byte [] qualifier,
672-
final CompareOperator op, final byte [] value, final Put put) throws IOException {
673-
// The name of the operators in CompareOperator are intentionally those of the
674-
// operators in the filter's CompareOp enum.
675-
return doCheckAndPut(row, family, qualifier, op.name(), value, null, put);
676-
}
677-
678662
private boolean doCheckAndPut(final byte[] row, final byte[] family, final byte[] qualifier,
679663
final String opName, final byte[] value, final TimeRange timeRange, final Put put)
680664
throws IOException {
@@ -695,21 +679,6 @@ protected Boolean rpcCall() throws Exception {
695679
.callWithRetries(callable, this.operationTimeoutMs);
696680
}
697681

698-
@Override
699-
@Deprecated
700-
public boolean checkAndDelete(final byte[] row, final byte[] family, final byte[] qualifier,
701-
final byte[] value, final Delete delete) throws IOException {
702-
return doCheckAndDelete(row, family, qualifier, CompareOperator.EQUAL.name(), value, null,
703-
delete);
704-
}
705-
706-
@Override
707-
@Deprecated
708-
public boolean checkAndDelete(final byte[] row, final byte[] family, final byte[] qualifier,
709-
final CompareOperator op, final byte[] value, final Delete delete) throws IOException {
710-
return doCheckAndDelete(row, family, qualifier, op.name(), value, null, delete);
711-
}
712-
713682
private boolean doCheckAndDelete(final byte[] row, final byte[] family, final byte[] qualifier,
714683
final String opName, final byte[] value, final TimeRange timeRange, final Delete delete)
715684
throws IOException {
@@ -801,13 +770,6 @@ protected MultiResponse rpcCall() throws Exception {
801770
return ((Result)results[0]).getExists();
802771
}
803772

804-
@Override
805-
@Deprecated
806-
public boolean checkAndMutate(final byte [] row, final byte [] family, final byte [] qualifier,
807-
final CompareOperator op, final byte [] value, final RowMutations rm) throws IOException {
808-
return doCheckAndMutate(row, family, qualifier, op.name(), value, null, rm);
809-
}
810-
811773
@Override
812774
public boolean exists(final Get get) throws IOException {
813775
Result r = get(get, true);
@@ -981,70 +943,21 @@ public long getRpcTimeout(TimeUnit unit) {
981943
return unit.convert(rpcTimeoutMs, TimeUnit.MILLISECONDS);
982944
}
983945

984-
@Override
985-
@Deprecated
986-
public int getRpcTimeout() {
987-
return rpcTimeoutMs;
988-
}
989-
990-
@Override
991-
@Deprecated
992-
public void setRpcTimeout(int rpcTimeout) {
993-
setReadRpcTimeout(rpcTimeout);
994-
setWriteRpcTimeout(rpcTimeout);
995-
}
996-
997946
@Override
998947
public long getReadRpcTimeout(TimeUnit unit) {
999948
return unit.convert(readRpcTimeoutMs, TimeUnit.MILLISECONDS);
1000949
}
1001950

1002-
@Override
1003-
@Deprecated
1004-
public int getReadRpcTimeout() {
1005-
return readRpcTimeoutMs;
1006-
}
1007-
1008-
@Override
1009-
@Deprecated
1010-
public void setReadRpcTimeout(int readRpcTimeout) {
1011-
this.readRpcTimeoutMs = readRpcTimeout;
1012-
}
1013-
1014951
@Override
1015952
public long getWriteRpcTimeout(TimeUnit unit) {
1016953
return unit.convert(writeRpcTimeoutMs, TimeUnit.MILLISECONDS);
1017954
}
1018955

1019-
@Override
1020-
@Deprecated
1021-
public int getWriteRpcTimeout() {
1022-
return writeRpcTimeoutMs;
1023-
}
1024-
1025-
@Override
1026-
@Deprecated
1027-
public void setWriteRpcTimeout(int writeRpcTimeout) {
1028-
this.writeRpcTimeoutMs = writeRpcTimeout;
1029-
}
1030-
1031956
@Override
1032957
public long getOperationTimeout(TimeUnit unit) {
1033958
return unit.convert(operationTimeoutMs, TimeUnit.MILLISECONDS);
1034959
}
1035960

1036-
@Override
1037-
@Deprecated
1038-
public int getOperationTimeout() {
1039-
return operationTimeoutMs;
1040-
}
1041-
1042-
@Override
1043-
@Deprecated
1044-
public void setOperationTimeout(int operationTimeout) {
1045-
this.operationTimeoutMs = operationTimeout;
1046-
}
1047-
1048961
@Override
1049962
public String toString() {
1050963
return tableName + ";" + connection;

0 commit comments

Comments
 (0)