[ https://issues.apache.org/jira/browse/HDFS-7884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352826#comment-14352826 ]
Brahma Reddy Battula commented on HDFS-7884: -------------------------------------------- Thanks a lot for your detailed analysis, I also feel same.. Cause : Reader is trying to read using the old block Id But the original block's gs was modified after appending. When client is latest and DN have old GS, then only throw exception. Othercase it should support read according to code.Here we missed the case when DN is having the lastest GS and client is having the old GS..( GS will not be checked while getting the replica and initializing the BlockSender)..Hence we need handle.. > NullPointerException in BlockSender > ----------------------------------- > > Key: HDFS-7884 > URL: https://issues.apache.org/jira/browse/HDFS-7884 > Project: Hadoop HDFS > Issue Type: Bug > Components: datanode > Reporter: Tsz Wo Nicholas Sze > Assignee: Brahma Reddy Battula > Priority: Blocker > Attachments: HDFS-7884.patch, > org.apache.hadoop.hdfs.TestAppendSnapshotTruncate-output.txt > > > {noformat} > java.lang.NullPointerException > at > org.apache.hadoop.hdfs.server.datanode.BlockSender.<init>(BlockSender.java:264) > at > org.apache.hadoop.hdfs.server.datanode.DataXceiver.readBlock(DataXceiver.java:506) > at > org.apache.hadoop.hdfs.protocol.datatransfer.Receiver.opReadBlock(Receiver.java:116) > at > org.apache.hadoop.hdfs.protocol.datatransfer.Receiver.processOp(Receiver.java:71) > at > org.apache.hadoop.hdfs.server.datanode.DataXceiver.run(DataXceiver.java:249) > at java.lang.Thread.run(Thread.java:745) > {noformat} > BlockSender.java:264 is shown below > {code} > this.volumeRef = datanode.data.getVolume(block).obtainReference(); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)