You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by el...@apache.org on 2019/04/03 20:50:39 UTC
[hbase] branch master updated: HBASE-21688 Address WAL filesystem
issues
This is an automated email from the ASF dual-hosted git repository.
elserj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new a3110af HBASE-21688 Address WAL filesystem issues
a3110af is described below
commit a3110afcdaef60b7672bef4a1aaabb0ee7744305
Author: Vladimir Rodionov <vr...@apache.org>
AuthorDate: Wed Feb 20 16:09:35 2019 -0800
HBASE-21688 Address WAL filesystem issues
Signed-off-by: Josh Elser <el...@apache.org>
---
.../main/java/org/apache/hadoop/hbase/master/MasterWalManager.java | 3 +--
.../main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java
index 8fdcb17..14be195 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java
@@ -189,8 +189,7 @@ public class MasterWalManager {
*/
public FileStatus[] getWALDirPaths(final PathFilter filter) throws IOException {
Path walDirPath = new Path(CommonFSUtils.getWALRootDir(conf), HConstants.HREGION_LOGDIR_NAME);
- FileStatus[] walDirForServerNames = FSUtils.listStatus(
- CommonFSUtils.getWALFileSystem(conf), walDirPath, filter);
+ FileStatus[] walDirForServerNames = FSUtils.listStatus(fs, walDirPath, filter);
return walDirForServerNames == null? new FileStatus[0]: walDirForServerNames;
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java
index 1f24548..8741c1c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java
@@ -432,7 +432,7 @@ public abstract class AbstractFSWALProvider<T extends AbstractFSWAL<?>> implemen
* @throws IOException exception
*/
public static Path getArchivedLogPath(Path path, Configuration conf) throws IOException {
- Path rootDir = FSUtils.getRootDir(conf);
+ Path rootDir = FSUtils.getWALRootDir(conf);
Path oldLogDir = new Path(rootDir, HConstants.HREGION_OLDLOGDIR_NAME);
if (conf.getBoolean(SEPARATE_OLDLOGDIR, DEFAULT_SEPARATE_OLDLOGDIR)) {
ServerName serverName = getServerNameFromWALDirectoryName(path);
@@ -443,7 +443,7 @@ public abstract class AbstractFSWALProvider<T extends AbstractFSWAL<?>> implemen
oldLogDir = new Path(oldLogDir, serverName.getServerName());
}
Path archivedLogLocation = new Path(oldLogDir, path.getName());
- final FileSystem fs = FSUtils.getCurrentFileSystem(conf);
+ final FileSystem fs = FSUtils.getWALFileSystem(conf);
if (fs.exists(archivedLogLocation)) {
LOG.info("Log " + path + " was moved to " + archivedLogLocation);