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 02c1fef commit 50dd961
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,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 @@ -2052,11 +2052,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 @@ -6814,7 +6814,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 50dd961

Please sign in to comment.