Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF8261877B for ; Thu, 30 Apr 2015 21:52:50 +0000 (UTC) Received: (qmail 82146 invoked by uid 500); 30 Apr 2015 21:52:49 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 82092 invoked by uid 500); 30 Apr 2015 21:52:49 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 82080 invoked by uid 99); 30 Apr 2015 21:52:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 21:52:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.191.145.13 which is an MX secondary for user@zookeeper.apache.org) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2015 21:52:44 +0000 Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id BB14824BC9 for ; Thu, 30 Apr 2015 21:52:24 +0000 (UTC) Received: by pdbqd1 with SMTP id qd1so73259854pdb.2 for ; Thu, 30 Apr 2015 14:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=w8KSijELplMNrzaETZtyxp2XHF9xvrHPhRw1gJyNDJk=; b=X9zoyrqRs1xzZR6N12kmc3Mi/DHgZN+Nj7u39ce6FhHREnY7OYW6PKN1fS4u9+ecQr TvPI5qRo2W0mlo7yzDEwmJRj+3yjKlTJTQIq1eofDrC4Cocid1Ne7xfmyc8d0Q2l2Er9 7YkziEz5bzEW9ULujLZd8ESSlEbiRfYCIF8NKSfTTSWqvnGkZzJft9/rxrLt0RU4MvQi +T2edpki7/NxJSJt+euY3XWTKV+YGWd3IZ6f4JGvkois+rMTUy2XJ+NL9UYK7ZPFMamO T1uiZGZIA4o3/u2f+tCvbzD0lrsU45oSOBw8oChtp1u3Dym8OVVfs5/R/VLOjdnOJusb e+nw== MIME-Version: 1.0 X-Received: by 10.68.204.36 with SMTP id kv4mr11845663pbc.37.1430430699347; Thu, 30 Apr 2015 14:51:39 -0700 (PDT) Received: by 10.70.65.41 with HTTP; Thu, 30 Apr 2015 14:51:39 -0700 (PDT) In-Reply-To: References: Date: Thu, 30 Apr 2015 14:51:39 -0700 Message-ID: Subject: Re: Is zkfc (zookeeper failover controller) a Hadoop-only thing or something more general to Zookeeper? From: Richard Sharpe To: user@zookeeper.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Apr 30, 2015 at 2:04 PM, Chris Nauroth w= rote: > Hello Richard, > > The "hdfs zkfc" command used as part of HDFS HA is a Hadoop-specific > solution that implements an additional layer of logic on top of a > ZooKeeper distributed lock. The additional logic relates to transitionin= g > NameNode processes between active and standby state, and fencing of an ol= d > active NameNode in case it still believes itself to be active due to a > network partition or other malfunction. The code for this resides in the > Hadoop project, not ZooKeeper. It is considered a private implementation > detail of Hadoop, not a stable public API, so I recommend against writing > code that relies on those classes. It might still be interesting to read > the code as inspiration for your own implementation though. If you're > interested, take a look at the following spots in the Hadoop source tree: > > hadoop-hdfs-project/hadoop-hdfs/src/main/java//org/apache/hadoop/hdfs/too= ls > /DFSZKFailoverController.java > hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/serv= er > /namenode/ha/ > hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ Thanks for that info ... --=20 Regards, Richard Sharpe (=E4=BD=95=E4=BB=A5=E8=A7=A3=E6=86=82=EF=BC=9F=E5=94=AF=E6=9C=89=E6=9D=9C= =E5=BA=B7=E3=80=82--=E6=9B=B9=E6=93=8D)