Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 64A18200CEC for ; Mon, 31 Jul 2017 09:39:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 630F81648C8; Mon, 31 Jul 2017 07:39:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A80C51648C6 for ; Mon, 31 Jul 2017 09:39:04 +0200 (CEST) Received: (qmail 84410 invoked by uid 500); 31 Jul 2017 07:39:03 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 84099 invoked by uid 99); 31 Jul 2017 07:39:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2017 07:39:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2A944180415 for ; Mon, 31 Jul 2017 07:39:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 6i3CTI-z2_jp for ; Mon, 31 Jul 2017 07:39:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9187E5FAC9 for ; Mon, 31 Jul 2017 07:39:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D5F18E0237 for ; Mon, 31 Jul 2017 07:39:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 8A1FB2464A for ; Mon, 31 Jul 2017 07:39:00 +0000 (UTC) Date: Mon, 31 Jul 2017 07:39:00 +0000 (UTC) From: "Zheng Hu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-18484) VerifyRep by snapshot does not work when Yarn / SourceHBase / PeerHBase located in three different clusters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 31 Jul 2017 07:39:05 -0000 [ 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 three different clusters (was: VerifyRep by snapshot does not work when Yarn / SourceHBase / PeerHBase located in three different cluster ) > VerifyRep by snapshot does not work when Yarn / SourceHBase / PeerHBase located in three different 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 > > 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 (v6.4.14#64029)