HDFS-14263. Remove unnecessary block file exists check from FsDatasetImpl#getBlockInputStream(). Contributed by Surendra Singh Lilhore

This commit is contained in:
Surendra Singh Lilhore 2019-02-13 23:41:27 +05:30
parent 35d4f32b32
commit 29b411d5f0

View File

@ -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);