From 55510d32bf09a4a3cdeabac6f5825dde648260f7 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 4bb70f8a410..05527e323dd 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);