[ https://issues.apache.org/jira/browse/HDFS-17462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
NaihaoFan updated HDFS-17462: ----------------------------- Description: 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. was: When trg of Router concat is an empty file, it will trigger NPE in Router, and the concat will fail, example: !https://msasg.visualstudio.com/b9b38275-a912-4222-a7b7-0b8b968719c0/_apis/git/repositories/39259a38-581f-4d2a-9dfd-4f4660702c00/pullRequests/4614947/attachments/image%20%284%29.png|width=980,height=229! 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. > 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 > > 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org