[ 
https://issues.apache.org/jira/browse/HDFS-11947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16042460#comment-16042460
 ] 

Weiwei Yang commented on HDFS-11947:
------------------------------------

I could easily reproduce this

{code}
Configuration conf = new HdfsConfiguration();
conf.set(DFSConfigKeys.DFS_NAMENODE_LIFELINE_RPC_ADDRESS_KEY, "localhost:0");
try (MiniDFSCluster cluster = new 
MiniDFSCluster.Builder(conf).numDataNodes(3).build()) {
      cluster.waitActive();
}
{code}

Lifeline thread is started before 

{noformat}
017-06-08 17:29:05,902 [main] WARN  datanode.DataNode 
(BPOfferService.java:getBlockPoolId(193)) - Block pool ID needed, but service 
not yet registered with NN, trace:
java.lang.Exception at 
org.apache.hadoop.hdfs.server.datanode.BPOfferService.getBlockPoolId(BPOfferService.java:193)
{noformat}

This is because lifeline thread was started before the DN-NN handshake, while 
NamespaceInfo is not yet available. Uploaded a simple patch to fix this. Please 
kindly review.

> When constructing a thread name, BPOfferService may print a bogus warning 
> message 
> ----------------------------------------------------------------------------------
>
>                 Key: HDFS-11947
>                 URL: https://issues.apache.org/jira/browse/HDFS-11947
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Weiwei Yang
>            Priority: Minor
>
> HDFS-11558 tries to get Block pool ID for constructing thread names.  When 
> the service is not yet registered with NN, it prints the bogus warning "Block 
> pool ID needed, but service not yet registered with NN" with stack trace.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to