From 5d9cbca31e056e3d274b7be5c8d855e910c6d343 Mon Sep 17 00:00:00 2001 From: Surendra Singh Lilhore Date: Sun, 29 Dec 2019 11:15:54 +0530 Subject: [PATCH] HDFS-15074. DataNode.DataTransfer thread should catch all the expception and log it. Contributed by hemanthboyina. --- .../java/org/apache/hadoop/hdfs/server/datanode/DataNode.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java index 0344c1a8b0f..7bb72dfd4a1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java @@ -2594,6 +2594,8 @@ public class DataNode extends ReconfigurableBase handleBadBlock(b, ie, false); LOG.warn("{}:Failed to transfer {} to {} got", bpReg, b, targets[0], ie); + } catch (Throwable t) { + LOG.error("Failed to transfer block " + b, t); } finally { decrementXmitsInProgress(); IOUtils.closeStream(blockSender);