diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java index 8e634435eec..d89756e2c30 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java @@ -803,14 +803,35 @@ public class LoadIncrementalHFiles extends Configured implements Tool { *

* Protected for testing. * @return empty list if success, list of items to retry on recoverable failure + * @deprecated as of release 2.3.0. Use {@link BulkLoadHFiles} instead. */ + @Deprecated @VisibleForTesting protected List tryAtomicRegionLoad(final Connection conn, - final TableName tableName, final byte[] first, final Collection lqis, - boolean copyFile) throws IOException { - List toRetry = new ArrayList<>(); + final TableName tableName, final byte[] first, final Collection lqis, + boolean copyFile) throws IOException { ClientServiceCallable serviceCallable = - buildClientServiceCallable(conn, tableName, first, lqis, copyFile); + buildClientServiceCallable(conn, tableName, first, lqis, copyFile); + return tryAtomicRegionLoad(serviceCallable, tableName, first, lqis); + } + + /** + * Attempts to do an atomic load of many hfiles into a region. If it fails, it returns a list of + * hfiles that need to be retried. If it is successful it will return an empty list. + *

+ * NOTE: To maintain row atomicity guarantees, region server callable should succeed atomically + * and fails atomically. + *

+ * Protected for testing. + * @return empty list if success, list of items to retry on recoverable failure + * @deprecated as of release 2.3.0. Use {@link BulkLoadHFiles} instead. + */ + @Deprecated + @VisibleForTesting + protected List tryAtomicRegionLoad(ClientServiceCallable serviceCallable, + final TableName tableName, final byte[] first, final Collection lqis) + throws IOException { + List toRetry = new ArrayList<>(); try { Configuration conf = getConf(); byte[] region = RpcRetryingCallerFactory.instantiate(conf, null). newCaller()