Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 74F03DAB4 for ; Mon, 29 Oct 2012 23:52:13 +0000 (UTC) Received: (qmail 80421 invoked by uid 500); 29 Oct 2012 23:52:13 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 80385 invoked by uid 500); 29 Oct 2012 23:52:13 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 80376 invoked by uid 99); 29 Oct 2012 23:52:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2012 23:52:13 +0000 Date: Mon, 29 Oct 2012 23:52:13 +0000 (UTC) From: "Aaron T. Myers (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <170359604.41868.1351554733265.JavaMail.jiratomcat@arcas> In-Reply-To: <1087802406.39331.1338901523424.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HDFS-3507) DFS#isInSafeMode needs to execute only on Active NameNode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-3507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486516#comment-13486516 ] Aaron T. Myers commented on HDFS-3507: -------------------------------------- The latest patch looks pretty good to me. We can address the larger points about setting the service's vs just a single NN's safemode value, and changing the ClientProtocol to have an actual isInSafeMode/getSafeMode operation in separate JIRA(s). One comment on the patch: I don't think this will actually affect the correctness of the patch, but this code makes me a little wary, since as we've discussed a setSafeMode operation is not in fact necessarily a write: {code} + OperationCategory opCategory = OperationCategory.UNCHECKED; + if (isChecked) { + opCategory = OperationCategory.WRITE; + } {code} I think better would be something like this: {code} + OperationCategory opCategory = OperationCategory.UNCHECKED; + if (isChecked) { + if (action == SafeModeAction.SAFEMODE_GET) { + opCategory = OperationCategory.READ; + } else { + opCategory = OperationCategory.WRITE + } + } {code} This should be in line with the behavior that an eventual split of setSafeMode/getSafeMode operations would implement. How does that sound? > DFS#isInSafeMode needs to execute only on Active NameNode > --------------------------------------------------------- > > Key: HDFS-3507 > URL: https://issues.apache.org/jira/browse/HDFS-3507 > Project: Hadoop HDFS > Issue Type: Bug > Components: ha > Affects Versions: 2.0.0-alpha, 3.0.0 > Reporter: Vinay > Assignee: Vinay > Priority: Critical > Attachments: HDFS-3507.patch, HDFS-3507.patch > > > Currently DFS#isInSafeMode is not Checking for the NN state. It can be executed on any of the NNs. > But HBase will use this API to check for the NN safemode before starting up its service. > If first NN configured is in standby then DFS#isInSafeMode will check standby NNs safemode but hbase want state of Active NN. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira