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

ASF GitHub Bot commented on HDFS-17462:
---------------------------------------

fannaihao commented on PR #6722:
URL: https://github.com/apache/hadoop/pull/6722#issuecomment-2054796201

   @ayushtkn Thanks for the comment! I will add tests for this.
   Yes, I also think it's better to have a direct way to get the block pool id 
of an empty file then verify, but I failed to find such methods..
   I checked `getFileInfo`, seems it does not return info about block pool id? 
If I miss something, please let me know.
   The `expectedBlockPoolId` thing is somehow indirect, but it works right..




> NPE in Router concat when trg is an empty file.
> -----------------------------------------------
>
>                 Key: HDFS-17462
>                 URL: https://issues.apache.org/jira/browse/HDFS-17462
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.10.2, 3.3.6
>            Reporter: NaihaoFan
>            Priority: Minor
>              Labels: pull-request-available
>
> When trg of Router concat is an empty file, it will trigger NPE in Router, 
> and the concat will fail, example:
> This is because when trg is an empty file, NameNode will return 
> lastLocatedBlock as null in the response of getBlockLocations. And Router 
> will not check null of lastLocatedBlock returned, instead Router will use it 
> to get block pool id directly.
> Trg of concat is an empty file should be allowed in router since this case is 
> supported by concat of NameNode.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to