[ 
https://issues.apache.org/jira/browse/HDFS-15505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chao Sun updated HDFS-15505:
----------------------------
    Target Version/s: 3.4.0, 3.3.3  (was: 3.4.0, 3.3.2)

> Fix NullPointerException when call getAdditionalDatanode method with null 
> extendedBlock parameter
> -------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-15505
>                 URL: https://issues.apache.org/jira/browse/HDFS-15505
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: dfsclient
>    Affects Versions: 3.0.0, 3.1.0, 3.0.1, 3.0.2, 3.2.0, 3.1.1, 3.0.3, 3.1.2, 
> 3.3.0, 3.2.1, 3.1.3
>            Reporter: hang chen
>            Priority: Major
>
> 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.20.1#820001)

---------------------------------------------------------------------
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