From 899c4802fc10edffa8797a6f62ef1ccbd6870df4 Mon Sep 17 00:00:00 2001 From: litao Date: Wed, 10 Nov 2021 18:16:45 +0800 Subject: [PATCH] HDFS-16298. Improve error msg for BlockMissingException (#3615) Reviewed-by: Hui Fei (cherry picked from commit ea65fc26d80db478f7e49749065c69da7e241bf0) --- .../src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java index f17f944d38d..0fca494a550 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java @@ -1106,7 +1106,7 @@ public class DFSInputStream extends FSInputStream String description = "Could not obtain block: " + blockInfo; DFSClient.LOG.warn(description + errMsg + ". Throwing a BlockMissingException"); - throw new BlockMissingException(src, description, + throw new BlockMissingException(src, description + errMsg, block.getStartOffset()); }