Skip to content

Commit fdf054d

Browse files
authored
HBASE-27061 two phase bulkload is broken when SFT is in use. (#4465)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
1 parent 286f6c5 commit fdf054d

File tree

1 file changed

+5
-5
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver

1 file changed

+5
-5
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
359359
private final int rowLockWaitDuration;
360360
static final int DEFAULT_ROWLOCK_WAIT_DURATION = 30000;
361361

362-
private Path regionDir;
362+
private Path regionWalDir;
363363
private FileSystem walFS;
364364

365365
// set to true if the region is restored from snapshot for reading by ClientSideRegionScanner
@@ -2106,11 +2106,11 @@ FileSystem getWalFileSystem() throws IOException {
21062106
* @throws IOException if there is an error getting WALRootDir
21072107
*/
21082108
public Path getWALRegionDir() throws IOException {
2109-
if (regionDir == null) {
2110-
regionDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
2109+
if (regionWalDir == null) {
2110+
regionWalDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
21112111
getRegionInfo().getEncodedName());
21122112
}
2113-
return regionDir;
2113+
return regionWalDir;
21142114
}
21152115

21162116
@Override
@@ -7162,7 +7162,7 @@ public Map<byte[], List<Path>> bulkLoadHFiles(Collection<Pair<byte[], String>> f
71627162
boolean reqTmp = store.storeEngine.requireWritingToTmpDirFirst();
71637163
if (bulkLoadListener != null) {
71647164
finalPath = bulkLoadListener.prepareBulkLoad(familyName, path, copyFile,
7165-
reqTmp ? null : regionDir.toString());
7165+
reqTmp ? null : fs.getRegionDir().toString());
71667166
}
71677167
Pair<Path, Path> pair = null;
71687168
if (reqTmp) {

0 commit comments

Comments
 (0)