You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Zheng Hu (JIRA)" <ji...@apache.org> on 2019/02/11 06:00:00 UTC
[jira] [Updated] (HBASE-18484) VerifyRep by snapshot does not work
when Yarn / SourceHBase / PeerHBase located in different HDFS clusters
[ https://issues.apache.org/jira/browse/HBASE-18484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zheng Hu updated HBASE-18484:
-----------------------------
Summary: VerifyRep by snapshot does not work when Yarn / SourceHBase / PeerHBase located in different HDFS clusters (was: VerifyRep by snapshot does not work when Yarn / SourceHBase / PeerHBase located in three different HDFS clusters)
> VerifyRep by snapshot does not work when Yarn / SourceHBase / PeerHBase located in different HDFS clusters
> -----------------------------------------------------------------------------------------------------------
>
> Key: HBASE-18484
> URL: https://issues.apache.org/jira/browse/HBASE-18484
> Project: HBase
> Issue Type: Bug
> Components: Replication
> Affects Versions: 2.0.0-alpha-1
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
> Attachments: HBASE-18484.v1.patch, HBASE-18484.v2.patch
>
>
> As HBASE-16466 commented.
> Seems like that when source hbase cluster / peer hbase cluster / yarn cluster locate in three different HDFS cluster , it has one problem.
> when restoring the snapshot into tmpdir , we need to create region by following code (HRegion#createHRegion)
> {code}
> public static HRegion createHRegion(final HRegionInfo info, final Path rootDir,
> final Configuration conf, final TableDescriptor hTableDescriptor,
> final WAL wal, final boolean initialize)
> throws IOException {
> LOG.info("creating HRegion " + info.getTable().getNameAsString()
> + " HTD == " + hTableDescriptor + " RootDir = " + rootDir +
> " Table name == " + info.getTable().getNameAsString());
> FileSystem fs = FileSystem.get(conf); <------------------- Here our code use fs.defaultFs configuration to create region.
> Path tableDir = FSUtils.getTableDir(rootDir, info.getTable());
> HRegionFileSystem.createRegionOnFileSystem(conf, fs, tableDir, info);
> HRegion region = HRegion.newHRegion(tableDir, wal, fs, conf, info, hTableDescriptor, null);
> if (initialize) region.initialize(null);
> return region;
> }
> {code}
> When source cluster & peer cluster locate in two difference file systems , then their fs.defaultFs should be difference, so at least one cluster will fail when restore snapshot into tmpdir . after I added the following fix, it works fine for me.
> {code}
> -FileSystem fs = FileSystem.get(conf);
> +FileSystem fs = rootDir.getFileSystem(conf);
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)