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 1CA0710AE7 for ; Wed, 10 Jul 2013 18:03:58 +0000 (UTC) Received: (qmail 57035 invoked by uid 500); 10 Jul 2013 18:03:57 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 56505 invoked by uid 500); 10 Jul 2013 18:03:50 -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 56012 invoked by uid 99); 10 Jul 2013 18:03:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 18:03:49 +0000 Date: Wed, 10 Jul 2013 18:03:49 +0000 (UTC) From: "Chris Nauroth (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Moved] (HDFS-4975) Branch-1-win TestReplicationPolicy failed caused by stale data node handling 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-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Nauroth moved HADOOP-9714 to HDFS-4975: --------------------------------------------- Fix Version/s: (was: 1-win) 1-win Affects Version/s: (was: 1-win) 1-win Key: HDFS-4975 (was: HADOOP-9714) Project: Hadoop HDFS (was: Hadoop Common) > Branch-1-win TestReplicationPolicy failed caused by stale data node handling > ---------------------------------------------------------------------------- > > Key: HDFS-4975 > URL: https://issues.apache.org/jira/browse/HDFS-4975 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 1-win > Reporter: Xi Fang > Assignee: Xi Fang > Fix For: 1-win > > Attachments: HADOOP-9714.1.patch > > > TestReplicationPolicy failed on > * testChooseTargetWithMoreThanAvailableNodes() > * testChooseTargetWithStaleNodes() > * testChooseTargetWithHalfStaleNodes() > The root of cause of testChooseTargetWithMoreThanAvailableNodes failing is the following: > In BlockPlacementPolicyDefault#chooseTarget() > {code} > chooseRandom(numOfReplicas, NodeBase.ROOT, excludedNodes, > blocksize, maxNodesPerRack, results); > } catch (NotEnoughReplicasException e) { > FSNamesystem.LOG.warn("Not able to place enough replicas, still in need of " + numOfReplicas); > {code} > However, numOfReplicas is passed into chooseRandom() as int (primitive type in java) by value. The updating operation for numOfReplicas in chooseRandom() will not change the value in chooseTarget(). > The root cause for testChooseTargetWithStaleNodes() and testChooseTargetWithHalfStaleNodes() is the current BlockPlacementPolicyDefault#chooseTarget() doesn't check if a node is stale. -- 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