Skip to content

Commit

Permalink
HBASE-27061 two phase bulkload is broken when SFT is in use.
Browse files Browse the repository at this point in the history
  • Loading branch information
ss77892 committed May 26, 2022
1 parent cd45cad commit 98cc234
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,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 @@ -2147,11 +2147,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 @@ -7255,7 +7255,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 98cc234

Please sign in to comment.