diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java index 027a0bf681e..ad43b45ee1d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java @@ -787,7 +787,7 @@ class FsDatasetImpl implements FsDatasetSpi { datanode.getMetrics().incrRamDiskBlocksReadHits(); } - if(info != null && info.blockDataExists()) { + if (info != null) { return info.getDataInputStream(seekOffset); } else { throw new IOException("No data exists for block " + b);