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

Brahma Reddy Battula commented on HDFS-11890:
---------------------------------------------

[~surendrasingh] thanks for reporting and working on this.

can we've one common method for this..? may be like below..?

{code}
 DatanodeID getDatanodeID() throws IOException {
      BPOfferService bpos = datanode.getBPOfferService(bpid);
      if (bpos == null) {
        throw new IOException("No block pool offer service for bpid="
            + bpid);
      }
      return new DatanodeID(bpos.bpRegistration);
    }
{code}

> Handle NPE in BlockRecoveryWorker when DN is getting shoutdown.
> ---------------------------------------------------------------
>
>                 Key: HDFS-11890
>                 URL: https://issues.apache.org/jira/browse/HDFS-11890
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 2.7.2
>            Reporter: Surendra Singh Lilhore
>            Assignee: Surendra Singh Lilhore
>         Attachments: HDFS-11890-001.patch
>
>
> {code}
> Exception in thread 
> "org.apache.hadoop.hdfs.server.datanode.BlockRecoveryWorker$1@1c03e6ae" 
> java.lang.NullPointerException
>       at 
> org.apache.hadoop.hdfs.server.datanode.BlockRecoveryWorker$RecoveryTaskContiguous.recover(BlockRecoveryWorker.java:131)
>       at 
> org.apache.hadoop.hdfs.server.datanode.BlockRecoveryWorker$1.run(BlockRecoveryWorker.java:596)
>       at java.lang.Thread.run(Thread.java:748)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to