Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 33FF2200CAE for ; Tue, 6 Jun 2017 20:43:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 30DCF160BD4; Tue, 6 Jun 2017 18:43:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 803C0160BC6 for ; Tue, 6 Jun 2017 20:43:23 +0200 (CEST) Received: (qmail 91091 invoked by uid 500); 6 Jun 2017 18:43:22 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 91028 invoked by uid 99); 6 Jun 2017 18:43:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2017 18:43:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 0FCC8C1380 for ; Tue, 6 Jun 2017 18:43:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id cR50p0GVZq7p for ; Tue, 6 Jun 2017 18:43:21 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 7B4E95F640 for ; Tue, 6 Jun 2017 18:43:20 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BC875E0D57 for ; Tue, 6 Jun 2017 18:43:19 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 8606E21E0F for ; Tue, 6 Jun 2017 18:43:18 +0000 (UTC) Date: Tue, 6 Jun 2017 18:43:18 +0000 (UTC) From: "Hanisha Koneru (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-11932) BPServiceActor thread name is not correctly set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 06 Jun 2017 18:43:24 -0000 [ https://issues.apache.org/jira/browse/HDFS-11932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16039445#comment-16039445 ] Hanisha Koneru commented on HDFS-11932: --------------------------------------- The thread name is already being set with NamespaceInfo included in _BPServiceActor#connectToNNAndHandshake_. {code} /* set thread name again to include NamespaceInfo when it's available. */ this.bpThread.setName(formatThreadName("heartbeating", nnAddr)); {code} So setting it again after this function is called would be redundant. {code} connectToNNAndHandshake(); Thread.currentThread().setName( formatThreadName("heartbeating", nnAddr)); {code} We can just not set the thread name during initialization to avoid the warning message. > BPServiceActor thread name is not correctly set > ----------------------------------------------- > > Key: HDFS-11932 > URL: https://issues.apache.org/jira/browse/HDFS-11932 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs > Reporter: Chen Liang > Assignee: Chen Liang > Attachments: HDFS-11932.001.patch > > > When running unit tests (e.g. TestJMXGet), we often get this following exception, although the tests still passed: > {code} > WARN datanode.DataNode (BPOfferService.java:getBlockPoolId(192)) - Block pool ID needed, but service not yet registered with NN > java.lang.Exception: trace > at org.apache.hadoop.hdfs.server.datanode.BPOfferService.getBlockPoolId(BPOfferService.java:192) at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.formatThreadName(BPServiceActor.java:556) at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.start(BPServiceActor.java:544) at > ... > {code} > It seems that, although this does not affect normal operations, this is causing the thread name of BPServiceActor not correctly set as desired. More specifically,: > {code} > bpThread = new Thread(this, formatThreadName("heartbeating", nnAddr)); > bpThread.setDaemon(true); // needed for JUnit testing > bpThread.start(); > {code} > The first line tries to call formatThreadName to get format a thread name, and formatThreadName is reading the value of BPOfferService#bpNSInfo. However this value is set only after the thread started (the third line above). So we get exception in the first line for reading non-existing value. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org