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 <wchevreuil@apache.org>
  • Loading branch information
ss77892 committed May 26, 2022
1 parent 286f6c5 commit fdf054d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,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 for reading by ClientSideRegionScanner
Expand Down Expand Up @@ -2106,11 +2106,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 @@ -7162,7 +7162,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 fdf054d

Please sign in to comment.