From bd9e2826fece981b1851ba26cd33ec4b35334317 Mon Sep 17 00:00:00 2001 From: Surendra Singh Lilhore Date: Wed, 13 Feb 2019 23:41:27 +0530 Subject: [PATCH] HDFS-14263. Remove unnecessary block file exists check from FsDatasetImpl#getBlockInputStream(). Contributed by Surendra Singh Lilhore (cherry picked from commit 29b411d5f065f177de05a69d2822836209f813c6) --- .../hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);