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 2466518B33 for ; Sat, 29 Aug 2015 08:15:51 +0000 (UTC) Received: (qmail 61969 invoked by uid 500); 29 Aug 2015 08:15:45 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 61920 invoked by uid 500); 29 Aug 2015 08:15:45 -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 61909 invoked by uid 99); 29 Aug 2015 08:15:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Aug 2015 08:15:45 +0000 Date: Sat, 29 Aug 2015 08:15:45 +0000 (UTC) From: "Tsz Wo Nicholas Sze (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8992) Balancer throws NPE 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-8992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14721012#comment-14721012 ] Tsz Wo Nicholas Sze commented on HDFS-8992: ------------------------------------------- Could you post the stack trace? > Balancer throws NPE > ------------------- > > Key: HDFS-8992 > URL: https://issues.apache.org/jira/browse/HDFS-8992 > Project: Hadoop HDFS > Issue Type: Bug > Components: balancer & mover > Affects Versions: 2.4.1 > Reporter: He Xiaoqiao > > Balancer may throw NPE because the following {{if Statements}} > {code:java|firstline=705} > synchronized (block) { > // update locations > for (String datanodeUuid : blk.getDatanodeUuids()) { > final BalancerDatanode d = datanodeMap.get(datanodeUuid); > if (datanode != null) { // not an unknown datanode > block.addLocation(d); > } > } > } > {code} > Before moving block, Balancer divides into two step to get all DNs info & some blocks of DN from NN. Regarding one DN commission after {{getDatanodeReport}} then {{getBlockList}} and one block's target is above DN just right, It will throw NPE when dispatcher. -- This message was sent by Atlassian JIRA (v6.3.4#6332)