Skip to content

Commit 50dd961

Browse files
ss77892wchevreuil
authored andcommitted
HBASE-27061 two phase bulkload is broken when SFT is in use. (#4465)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
1 parent 02c1fef commit 50dd961

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
@@ -354,7 +354,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
354354
private final int rowLockWaitDuration;
355355
static final int DEFAULT_ROWLOCK_WAIT_DURATION = 30000;
356356

357-
private Path regionDir;
357+
private Path regionWalDir;
358358
private FileSystem walFS;
359359

360360
// set to true if the region is restored from snapshot
@@ -2052,11 +2052,11 @@ FileSystem getWalFileSystem() throws IOException {
20522052
* @throws IOException if there is an error getting WALRootDir
20532053
*/
20542054
public Path getWALRegionDir() throws IOException {
2055-
if (regionDir == null) {
2056-
regionDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
2055+
if (regionWalDir == null) {
2056+
regionWalDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
20572057
getRegionInfo().getEncodedName());
20582058
}
2059-
return regionDir;
2059+
return regionWalDir;
20602060
}
20612061

20622062
@Override
@@ -6814,7 +6814,7 @@ public Map<byte[], List<Path>> bulkLoadHFiles(Collection<Pair<byte[], String>> f
68146814
boolean reqTmp = store.storeEngine.requireWritingToTmpDirFirst();
68156815
if (bulkLoadListener != null) {
68166816
finalPath = bulkLoadListener.prepareBulkLoad(familyName, path, copyFile,
6817-
reqTmp ? null : regionDir.toString());
6817+
reqTmp ? null : fs.getRegionDir().toString());
68186818
}
68196819
Pair<Path, Path> pair = null;
68206820
if (reqTmp) {

0 commit comments

Comments
 (0)