Skip to content

Commit

Permalink
HBASE-24221 addendum to restore public interface on LoadIncrementalHF…
Browse files Browse the repository at this point in the history
…iles

Signed-off-by: niuyulin <nyl353@163.com>
Signed-off-by: Wellington Ramos Chevreuil <wchevreuil@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
  • Loading branch information
ndimiduk committed Jun 26, 2020
1 parent 50d1a79 commit a499eae
Showing 1 changed file with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -803,14 +803,35 @@ CacheConfig.DISABLED, true, getConf())) {
* <p>
* 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<LoadQueueItem> tryAtomicRegionLoad(final Connection conn,
final TableName tableName, final byte[] first, final Collection<LoadQueueItem> lqis,
boolean copyFile) throws IOException {
List<LoadQueueItem> toRetry = new ArrayList<>();
final TableName tableName, final byte[] first, final Collection<LoadQueueItem> lqis,
boolean copyFile) throws IOException {
ClientServiceCallable<byte[]> 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.
* <p>
* NOTE: To maintain row atomicity guarantees, region server callable should succeed atomically
* and fails atomically.
* <p>
* 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<LoadQueueItem> tryAtomicRegionLoad(ClientServiceCallable<byte[]> serviceCallable,
final TableName tableName, final byte[] first, final Collection<LoadQueueItem> lqis)
throws IOException {
List<LoadQueueItem> toRetry = new ArrayList<>();
try {
Configuration conf = getConf();
byte[] region = RpcRetryingCallerFactory.instantiate(conf, null).<byte[]> newCaller()
Expand Down

0 comments on commit a499eae

Please sign in to comment.