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 B2750187AB for ; Thu, 3 Dec 2015 14:23:17 +0000 (UTC) Received: (qmail 32906 invoked by uid 500); 3 Dec 2015 14:23:11 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 32847 invoked by uid 500); 3 Dec 2015 14:23:11 -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 32808 invoked by uid 99); 3 Dec 2015 14:23:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2015 14:23:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0E6322C1F6C for ; Thu, 3 Dec 2015 14:23:11 +0000 (UTC) Date: Thu, 3 Dec 2015 14:23:11 +0000 (UTC) From: "Junping Du (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-9500) datanodesSoftwareVersions map may counting wrong when rolling upgrade 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-9500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Junping Du updated HDFS-9500: ----------------------------- Target Version/s: 2.7.2, 2.6.4 (was: 2.7.2, 2.6.3) > datanodesSoftwareVersions map may counting wrong when rolling upgrade > --------------------------------------------------------------------- > > Key: HDFS-9500 > URL: https://issues.apache.org/jira/browse/HDFS-9500 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 2.7.1, 2.6.2 > Reporter: Phil Yang > Assignee: Phil Yang > Attachments: 9500-v1.patch > > > While rolling upgrading, namenode's website overview will report there are two versions datanodes in the cluster, for example, 2.6.0 has x nodes and 2.6.2 has y nodes. However, sometimes when I stop a datanode in old version and start a new version one, namenode only increases the number of new version but not decreases the number of old version. So the total number x+y will be larger than the number of datanodes. Even all datanodes are upgraded, there will still have the messages that there are several datanode in old version. And I must run hdfs dfsadmin -refreshNodes to clear this message. > I think this issue is caused by DatanodeManager.registerDatanode. If nodeS in old version is not alive because of shutting down, it will not pass shouldCountVersion, so the number of old version won't be decreased. But this method only judges the status of heartbeat and isAlive at that moment, if namenode has not removed this node which will decrease the version map and this node restarts in the new version, the decrementVersionCount belongs to this node will never be executed. > So the simplest way to fix this is that we always recounting the version map in registerDatanode since it is not a heavy operation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)