From 51950f149ecc0b6f03849865031b12cdb5eecd5d Mon Sep 17 00:00:00 2001 From: Bharat Viswanadham Date: Tue, 19 Feb 2019 17:01:07 -0800 Subject: [PATCH] Logging stale datanode information. Contributed by Karthik Palanisamy. --- .../hadoop/hdfs/server/blockmanagement/HeartbeatManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/HeartbeatManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/HeartbeatManager.java index d2c279f8b4a..46444bc9b26 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/HeartbeatManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/HeartbeatManager.java @@ -379,6 +379,9 @@ class HeartbeatManager implements DatanodeStatistics { dead = d; } if (d.isStale(dm.getStaleInterval())) { + LOG.warn(String.format("Stale datanode {}." + + " No heartbeat received since last {} milliseconds"), + d.getName(), dm.getStaleInterval()); numOfStaleNodes++; } DatanodeStorageInfo[] storageInfos = d.getStorageInfos();