You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "lei w (Jira)" <ji...@apache.org> on 2021/07/02 07:19:00 UTC

[jira] [Commented] (HDFS-16097) Datanode receives ipc requests will throw NPE when datanode quickly restart

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

lei w commented on HDFS-16097:
------------------------------

Thanks [~hexiaoqiao] for your comment. I did not look for the consequences of the client encountering this kind of request. But judging from the code logic, if the DataNode performs block recovery, the block recovery task will fail and if the client calls the getReplicaVisibleLength() method in the ClientDataNodeProtocol, the client should exit directly. 

> Datanode receives ipc requests will throw NPE when datanode quickly restart 
> ----------------------------------------------------------------------------
>
>                 Key: HDFS-16097
>                 URL: https://issues.apache.org/jira/browse/HDFS-16097
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>         Environment: 
>            Reporter: lei w
>            Assignee: lei w
>            Priority: Major
>         Attachments: HDFS-16097.001.patch
>
>
> Datanode receives ipc requests will throw NPE when datanode quickly restart. This is because when DN is reStarted, BlockPool is first registered with blockPoolManager and then fsdataset is initialized. When BlockPool is registered to blockPoolManager without initializing fsdataset,  DataNode receives an IPC request will throw NPE, because it will call related methods provided by fsdataset. The stack exception is as follows:
> {code:java}
> java.lang.NullPointerException
>         at org.apache.hadoop.hdfs.server.datanode.DataNode.initReplicaRecovery(DataNode.java:3468)
>         at org.apache.hadoop.hdfs.protocolPB.InterDatanodeProtocolServerSideTranslatorPB.initReplicaRecovery(InterDatanodeProtocolServerSideTranslatorPB.java:55)
>         at org.apache.hadoop.hdfs.protocol.proto.InterDatanodeProtocolProtos$InterDatanodeProtocolService$2.callBlockingMethod(InterDatanodeProtocolProtos.java:3105)
>         at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:523)
>         at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:991)
>         at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:916)
>         at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:862)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:422)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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