HBASE-27061 two phase bulkload is broken when SFT is in use. (#4465)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
This commit is contained in:
parent
286f6c5af4
commit
fdf054de2c
|
@ -359,7 +359,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
||||||
private final int rowLockWaitDuration;
|
private final int rowLockWaitDuration;
|
||||||
static final int DEFAULT_ROWLOCK_WAIT_DURATION = 30000;
|
static final int DEFAULT_ROWLOCK_WAIT_DURATION = 30000;
|
||||||
|
|
||||||
private Path regionDir;
|
private Path regionWalDir;
|
||||||
private FileSystem walFS;
|
private FileSystem walFS;
|
||||||
|
|
||||||
// set to true if the region is restored from snapshot for reading by ClientSideRegionScanner
|
// set to true if the region is restored from snapshot for reading by ClientSideRegionScanner
|
||||||
|
@ -2106,11 +2106,11 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
||||||
* @throws IOException if there is an error getting WALRootDir
|
* @throws IOException if there is an error getting WALRootDir
|
||||||
*/
|
*/
|
||||||
public Path getWALRegionDir() throws IOException {
|
public Path getWALRegionDir() throws IOException {
|
||||||
if (regionDir == null) {
|
if (regionWalDir == null) {
|
||||||
regionDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
|
regionWalDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
|
||||||
getRegionInfo().getEncodedName());
|
getRegionInfo().getEncodedName());
|
||||||
}
|
}
|
||||||
return regionDir;
|
return regionWalDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -7162,7 +7162,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
||||||
boolean reqTmp = store.storeEngine.requireWritingToTmpDirFirst();
|
boolean reqTmp = store.storeEngine.requireWritingToTmpDirFirst();
|
||||||
if (bulkLoadListener != null) {
|
if (bulkLoadListener != null) {
|
||||||
finalPath = bulkLoadListener.prepareBulkLoad(familyName, path, copyFile,
|
finalPath = bulkLoadListener.prepareBulkLoad(familyName, path, copyFile,
|
||||||
reqTmp ? null : regionDir.toString());
|
reqTmp ? null : fs.getRegionDir().toString());
|
||||||
}
|
}
|
||||||
Pair<Path, Path> pair = null;
|
Pair<Path, Path> pair = null;
|
||||||
if (reqTmp) {
|
if (reqTmp) {
|
||||||
|
|
Loading…
Reference in New Issue