From hdfs-dev-return-40850-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Jan 13 08:16:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9BDAD18064E for ; Mon, 13 Jan 2020 09:16:03 +0100 (CET) Received: (qmail 35566 invoked by uid 500); 13 Jan 2020 08:16:01 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 35541 invoked by uid 99); 13 Jan 2020 08:16:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jan 2020 08:16:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9B3A9E0114 for ; Mon, 13 Jan 2020 08:16:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 0A7CF7800F2 for ; Mon, 13 Jan 2020 08:16:00 +0000 (UTC) Date: Mon, 13 Jan 2020 08:16:00 +0000 (UTC) From: "wangzhixiang (Jira)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-15115) Namenode crash caused by NPE in BlockPlacementPolicyDefault when dynamically change logger to debug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 wangzhixiang created HDFS-15115: ----------------------------------- Summary: Namenode crash caused by NPE in BlockPlacementPolicyD= efault when dynamically change logger to debug Key: HDFS-15115 URL: https://issues.apache.org/jira/browse/HDFS-15115 Project: Hadoop HDFS Issue Type: Bug Reporter: wangzhixiang Attachments: 0001-fix-up-the-Namenode-crash-bug-caused-by-dynamica= lly-.patch To get debug info, we dynamically change the logger of BlockPlacementPolicy= Default to=C2=A0debug when namenode is running. However, the Namenode crash= s. From the log, we find some NPE in=C2=A0BlockPlacementPolicyDefault.choos= eRandom. Because=C2=A0*StringBuilder builder*=C2=A0will be used 4 times in = BlockPlacementPolicyDefault.chooseRandom method. While the *builder* only= =C2=A0initializes in the first time of this method. If we=C2=A0change the l= ogger of BlockPlacementPolicyDefault to=C2=A0debug after the part, the=C2= =A0*builder* in remaining part is *NULL* and cause *NPE* -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org