Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.0.3
-
None
-
None
-
None
Description
JD Cryans found this issue: it seems like, if you open a file for read immediately after it's been created by the writer, after a block has been allocated, but before the block is created on the DNs, then you can end up with the following NPE:
java.lang.NullPointerException
at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.updateBlockInfo(DFSClient.java:1885)
at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.openInfo(DFSClient.java:1858)
at org.apache.hadoop.hdfs.DFSClient$DFSInputStream.<init>(DFSClient.java:1834)
at org.apache.hadoop.hdfs.DFSClient.open(DFSClient.java:578)
at org.apache.hadoop.hdfs.DistributedFileSystem.open(DistributedFileSystem.java:154)
This seems to be because getBlockInfo returns a null block when the DN doesn't yet have the replica. The client should probably either fall back to a different replica or treat it as zero-length.
Attachments
Issue Links
- is related to
-
HBASE-8096 [replication] NPE while replicating a log that is acquiring a new block from HDFS
- Closed