HDFS-14263. Remove unnecessary block file exists check from FsDatasetImpl#getBlockInputStream(). Contributed by Surendra Singh Lilhore
This commit is contained in:
parent
35d4f32b32
commit
29b411d5f0
@ -787,7 +787,7 @@ public InputStream getBlockInputStream(ExtendedBlock b,
|
|||||||
datanode.getMetrics().incrRamDiskBlocksReadHits();
|
datanode.getMetrics().incrRamDiskBlocksReadHits();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(info != null && info.blockDataExists()) {
|
if (info != null) {
|
||||||
return info.getDataInputStream(seekOffset);
|
return info.getDataInputStream(seekOffset);
|
||||||
} else {
|
} else {
|
||||||
throw new IOException("No data exists for block " + b);
|
throw new IOException("No data exists for block " + b);
|
||||||
|
Loading…
Reference in New Issue
Block a user