Skip to content

Commit

Permalink
HBASE-22590 Remove the deprecated methods in Table interface (#309)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com>
Signed-off-by: Guanghao <zghao@apache.org>
  • Loading branch information
Apache9 authored Jun 17, 2019
1 parent ed30909 commit 9b413cf
Show file tree
Hide file tree
Showing 29 changed files with 351 additions and 1,019 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void TestIncBackupMergeRestore() throws Exception {
tablesRestoreIncMultiple, tablesMapIncMultiple, true));

Table hTable = conn.getTable(table1_restore);
LOG.debug("After incremental restore: " + hTable.getTableDescriptor());
LOG.debug("After incremental restore: " + hTable.getDescriptor());
int countRows = TEST_UTIL.countRows(hTable, famName);
LOG.debug("f1 has " + countRows + " rows");
Assert.assertEquals(NB_ROWS_IN_BATCH + 2 * ADD_ROWS, countRows);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public void TestIncBackupMergeRestore() throws Exception {
tablesRestoreIncMultiple, tablesMapIncMultiple, true));

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,22 +659,6 @@ protected Long rpcCall() throws Exception {
callWithRetries(callable, this.operationTimeoutMs);
}

@Override
@Deprecated
public boolean checkAndPut(final byte [] row, final byte [] family, final byte [] qualifier,
final byte [] value, final Put put) throws IOException {
return doCheckAndPut(row, family, qualifier, CompareOperator.EQUAL.name(), value, null, put);
}

@Override
@Deprecated
public boolean checkAndPut(final byte [] row, final byte [] family, final byte [] qualifier,
final CompareOperator op, final byte [] value, final Put put) throws IOException {
// The name of the operators in CompareOperator are intentionally those of the
// operators in the filter's CompareOp enum.
return doCheckAndPut(row, family, qualifier, op.name(), value, null, put);
}

private boolean doCheckAndPut(final byte[] row, final byte[] family, final byte[] qualifier,
final String opName, final byte[] value, final TimeRange timeRange, final Put put)
throws IOException {
Expand All @@ -695,21 +679,6 @@ protected Boolean rpcCall() throws Exception {
.callWithRetries(callable, this.operationTimeoutMs);
}

@Override
@Deprecated
public boolean checkAndDelete(final byte[] row, final byte[] family, final byte[] qualifier,
final byte[] value, final Delete delete) throws IOException {
return doCheckAndDelete(row, family, qualifier, CompareOperator.EQUAL.name(), value, null,
delete);
}

@Override
@Deprecated
public boolean checkAndDelete(final byte[] row, final byte[] family, final byte[] qualifier,
final CompareOperator op, final byte[] value, final Delete delete) throws IOException {
return doCheckAndDelete(row, family, qualifier, op.name(), value, null, delete);
}

private boolean doCheckAndDelete(final byte[] row, final byte[] family, final byte[] qualifier,
final String opName, final byte[] value, final TimeRange timeRange, final Delete delete)
throws IOException {
Expand Down Expand Up @@ -801,13 +770,6 @@ protected MultiResponse rpcCall() throws Exception {
return ((Result)results[0]).getExists();
}

@Override
@Deprecated
public boolean checkAndMutate(final byte [] row, final byte [] family, final byte [] qualifier,
final CompareOperator op, final byte [] value, final RowMutations rm) throws IOException {
return doCheckAndMutate(row, family, qualifier, op.name(), value, null, rm);
}

@Override
public boolean exists(final Get get) throws IOException {
Result r = get(get, true);
Expand Down Expand Up @@ -981,70 +943,21 @@ public long getRpcTimeout(TimeUnit unit) {
return unit.convert(rpcTimeoutMs, TimeUnit.MILLISECONDS);
}

@Override
@Deprecated
public int getRpcTimeout() {
return rpcTimeoutMs;
}

@Override
@Deprecated
public void setRpcTimeout(int rpcTimeout) {
setReadRpcTimeout(rpcTimeout);
setWriteRpcTimeout(rpcTimeout);
}

@Override
public long getReadRpcTimeout(TimeUnit unit) {
return unit.convert(readRpcTimeoutMs, TimeUnit.MILLISECONDS);
}

@Override
@Deprecated
public int getReadRpcTimeout() {
return readRpcTimeoutMs;
}

@Override
@Deprecated
public void setReadRpcTimeout(int readRpcTimeout) {
this.readRpcTimeoutMs = readRpcTimeout;
}

@Override
public long getWriteRpcTimeout(TimeUnit unit) {
return unit.convert(writeRpcTimeoutMs, TimeUnit.MILLISECONDS);
}

@Override
@Deprecated
public int getWriteRpcTimeout() {
return writeRpcTimeoutMs;
}

@Override
@Deprecated
public void setWriteRpcTimeout(int writeRpcTimeout) {
this.writeRpcTimeoutMs = writeRpcTimeout;
}

@Override
public long getOperationTimeout(TimeUnit unit) {
return unit.convert(operationTimeoutMs, TimeUnit.MILLISECONDS);
}

@Override
@Deprecated
public int getOperationTimeout() {
return operationTimeoutMs;
}

@Override
@Deprecated
public void setOperationTimeout(int operationTimeout) {
this.operationTimeoutMs = operationTimeout;
}

@Override
public String toString() {
return tableName + ";" + connection;
Expand Down
Loading

0 comments on commit 9b413cf

Please sign in to comment.