You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "hang chen (Jira)" <ji...@apache.org> on 2020/07/31 15:06:00 UTC
[jira] [Created] (HDFS-15505) Fix NullPointerException when call
getAdditionalDatanode with null extendedBlock
hang chen created HDFS-15505:
--------------------------------
Summary: Fix NullPointerException when call getAdditionalDatanode with null extendedBlock
Key: HDFS-15505
URL: https://issues.apache.org/jira/browse/HDFS-15505
Project: Hadoop HDFS
Issue Type: Bug
Components: dfsclient
Affects Versions: 3.1.3, 3.2.1, 3.3.0, 3.1.2, 3.0.3, 3.1.1, 3.2.0, 3.0.2, 3.0.1, 3.1.0, 3.0.0
Reporter: hang chen
Fix For: 3.3.1, 3.4.0
When client call getAdditionalDatanode method, it will initialize GetAdditionalDatanodeRequestProto and send RPC request to Router/namenode. However, if we call getAdditionalDatanode method with null extendedBlock parameter, it will set GetAdditionalDatanodeRequestProto's blk field with null, which will cause NullPointerException. The code show as follow.
{code:java}
// code placeholder
GetAdditionalDatanodeRequestProto req = GetAdditionalDatanodeRequestProto
.newBuilder()
.setSrc(src)
.setFileId(fileId)
.setBlk(PBHelperClient.convert(blk))
.addAllExistings(PBHelperClient.convert(existings))
.addAllExistingStorageUuids(Arrays.asList(existingStorageIDs))
.addAllExcludes(PBHelperClient.convert(excludes))
.setNumAdditionalNodes(numAdditionalNodes)
.setClientName(clientName)
.build();{code}
--
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