From c1a476c49281e4b7fde8f9638918bcebcbde25e3 Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Sun, 29 Sep 2019 09:26:40 +0800 Subject: [PATCH] HBASE-23087 Remove the deprecated bulkload method in AsyncClusterConnection (#670) Signed-off-by: Wellington Chevreuil --- .../hbase/client/AsyncClusterConnection.java | 30 +++++-------------- .../client/AsyncClusterConnectionImpl.java | 8 ----- .../client/DummyAsyncClusterConnection.java | 4 +-- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnection.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnection.java index 4b4d68fc2a9..5c57817f5a7 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnection.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnection.java @@ -75,22 +75,11 @@ public interface AsyncClusterConnection extends AsyncConnection { CompletableFuture prepareBulkLoad(TableName tableName); /** - * @deprecated Use bulkLoad(TableName tableName, List> familyPaths, - * byte[] row, boolean assignSeqNum, Token userToken, String bulkToken, - * boolean copyFiles, List clusterIds) - */ - @Deprecated - CompletableFuture bulkLoad(TableName tableName, List> familyPaths, - byte[] row, boolean assignSeqNum, Token userToken, String bulkToken, boolean copyFiles); - - /** - * Securely bulk load a list of HFiles, passing additional list of clusters ids tracking - * clusters where the given bulk load has already been processed - * (important for bulk loading replication). - * - * Defined as default here to avoid breaking callers who rely on the bulkLoad version that - * does not expect additional clusterIds param. - * + * Securely bulk load a list of HFiles, passing additional list of clusters ids tracking clusters + * where the given bulk load has already been processed (important for bulk loading replication). + *

+ * Defined as default here to avoid breaking callers who rely on the bulkLoad version that does + * not expect additional clusterIds param. * @param tableName the target table * @param familyPaths hdfs path for the the table family dirs containg files to be loaded * @param row row key @@ -99,13 +88,10 @@ public interface AsyncClusterConnection extends AsyncConnection { * @param bulkToken bulk load token * @param copyFiles flag for copying the loaded hfiles * @param clusterIds list of cluster ids where the given bulk load has already been processed. - * @return */ - default CompletableFuture bulkLoad(TableName tableName, List> familyPaths, byte[] row, boolean assignSeqNum, Token userToken, String bulkToken, - boolean copyFiles, List clusterIds) { - return null; - } + CompletableFuture bulkLoad(TableName tableName, List> familyPaths, + byte[] row, boolean assignSeqNum, Token userToken, String bulkToken, boolean copyFiles, + List clusterIds); /** * Clean up after finishing bulk load, no matter success or not. diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnectionImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnectionImpl.java index f1677708536..746c3b81f07 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnectionImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/client/AsyncClusterConnectionImpl.java @@ -106,14 +106,6 @@ class AsyncClusterConnectionImpl extends AsyncConnectionImpl implements AsyncClu .call(); } - @Override - public CompletableFuture bulkLoad(TableName tableName, - List> familyPaths, byte[] row, boolean assignSeqNum, Token userToken, - String bulkToken, boolean copyFiles) { - return bulkLoad(tableName, familyPaths, row, assignSeqNum, - userToken, bulkToken, copyFiles, null); - } - @Override public CompletableFuture bulkLoad(TableName tableName, List> familyPaths, byte[] row, boolean assignSeqNum, Token userToken, diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/DummyAsyncClusterConnection.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/DummyAsyncClusterConnection.java index 95afa64ac00..5a344578c9c 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/DummyAsyncClusterConnection.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/DummyAsyncClusterConnection.java @@ -143,8 +143,8 @@ public class DummyAsyncClusterConnection implements AsyncClusterConnection { @Override public CompletableFuture bulkLoad(TableName tableName, - List> familyPaths, byte[] row, boolean assignSeqNum, Token userToken, - String bulkToken, boolean copyFiles) { + List> familyPaths, byte[] row, boolean assignSeqNum, Token userToken, + String bulkToken, boolean copyFiles, List clusterIds) { return null; }