Skip to content

Commit

Permalink
HBASE-27061 two phase bulkload is broken when SFT is in use. (#4465)
Browse files Browse the repository at this point in the history
Signed-off-by: Wellington Chevreuil <[email protected]>
  • Loading branch information
ss77892 authored and wchevreuil committed May 26, 2022
1 parent 20aaa1e commit c9fc396
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
private final int rowLockWaitDuration;
static final int DEFAULT_ROWLOCK_WAIT_DURATION = 30000;

private Path regionDir;
private Path regionWalDir;
private FileSystem walFS;

// set to true if the region is restored from snapshot
Expand Down Expand Up @@ -2051,11 +2051,11 @@ FileSystem getWalFileSystem() throws IOException {
* @throws IOException if there is an error getting WALRootDir
*/
public Path getWALRegionDir() throws IOException {
if (regionDir == null) {
regionDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
if (regionWalDir == null) {
regionWalDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
getRegionInfo().getEncodedName());
}
return regionDir;
return regionWalDir;
}

@Override
Expand Down Expand Up @@ -6813,7 +6813,7 @@ public Map<byte[], List<Path>> bulkLoadHFiles(Collection<Pair<byte[], String>> f
boolean reqTmp = store.storeEngine.requireWritingToTmpDirFirst();
if (bulkLoadListener != null) {
finalPath = bulkLoadListener.prepareBulkLoad(familyName, path, copyFile,
reqTmp ? null : regionDir.toString());
reqTmp ? null : fs.getRegionDir().toString());
}
Pair<Path, Path> pair = null;
if (reqTmp) {
Expand Down

0 comments on commit c9fc396

Please sign in to comment.