-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-23197 'IllegalArgumentException: Wrong FS' on edits replay when… #740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
96f5b1f
f0cb94f
f1601fd
3a5b242
57ab190
c450862
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,9 +38,11 @@ | |
| import org.apache.hadoop.fs.FileSystem; | ||
| import org.apache.hadoop.fs.Path; | ||
| import org.apache.hadoop.fs.PathFilter; | ||
| import org.apache.hadoop.hbase.HConstants; | ||
| import org.apache.hadoop.hbase.client.RegionInfo; | ||
| import org.apache.hadoop.hbase.regionserver.HStoreFile; | ||
| import org.apache.hadoop.hbase.util.Bytes; | ||
| import org.apache.hadoop.hbase.util.CommonFSUtils; | ||
| import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; | ||
| import org.apache.hadoop.hbase.util.FSUtils; | ||
| import org.apache.hadoop.hbase.util.HFileArchiveUtil; | ||
|
|
@@ -314,9 +316,21 @@ public static void archiveStoreFiles(Configuration conf, FileSystem fs, RegionIn | |
| // build the archive path | ||
| if (regionInfo == null || family == null) throw new IOException( | ||
| "Need to have a region and a family to archive from."); | ||
|
|
||
| Path storeArchiveDir = HFileArchiveUtil.getStoreArchivePath(conf, regionInfo, tableDir, family); | ||
|
|
||
| //NOTE: This extra check is needed for the exceptional scenario where we archive wal edits | ||
| // replayed, when hbase.region.archive.recovered.edits is on. Since WALs may be configured to | ||
| // use different FS than root dir, we need to make sure to pick the proper FS when deciding | ||
| // on the archiving path. | ||
| //1) If no wal dir setting, wals and root dir are on same FS, so good to go with the root dir; | ||
| //2) When we have wal dir set it will only be on different FS if "scheme://authority" is | ||
| // defined on wal path. In this case, if this is a proper store file archiving call, the passed | ||
| // FS scheme will be different from the wal dir one, and you should pick root dir as base. | ||
| String workingDir = conf.get(CommonFSUtils.HBASE_WAL_DIR); | ||
| if(workingDir == null || !workingDir.startsWith(fs.getScheme())){ | ||
|
||
| workingDir = conf.get(HConstants.HBASE_DIR); | ||
| } | ||
| Path rootDir = new Path(workingDir); | ||
|
||
| Path storeArchiveDir = HFileArchiveUtil. | ||
| getStoreArchivePathForRootDir(rootDir, regionInfo, family); | ||
| // make sure we don't archive if we can't and that the archive dir exists | ||
| if (!fs.mkdirs(storeArchiveDir)) { | ||
| throw new IOException("Could not make archive directory (" + storeArchiveDir + ") for store:" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.