HDFS-14624. When decommissioning a node, log remaining blocks to replicate periodically. Contributed by Stephen O'Donnell.

This commit is contained in:
Inigo Goiri 2019-07-11 08:55:44 -07:00
parent 5043840b1d
commit 5747f6cff5
1 changed files with 7 additions and 5 deletions

View File

@ -506,8 +506,10 @@ public class DatanodeAdminManager {
namesystem.writeUnlock(); namesystem.writeUnlock();
} }
if (numBlocksChecked + numNodesChecked > 0) { if (numBlocksChecked + numNodesChecked > 0) {
LOG.info("Checked {} blocks and {} nodes this tick", numBlocksChecked, LOG.info("Checked {} blocks and {} nodes this tick. {} nodes are now " +
numNodesChecked); "in maintenance or transitioning state. {} nodes pending.",
numBlocksChecked, numNodesChecked, outOfServiceNodeBlocks.size(),
pendingNodes.size());
} }
} }
@ -598,14 +600,14 @@ public class DatanodeAdminManager {
LOG.debug("Node {} is sufficiently replicated and healthy, " LOG.debug("Node {} is sufficiently replicated and healthy, "
+ "marked as {}.", dn, dn.getAdminState()); + "marked as {}.", dn, dn.getAdminState());
} else { } else {
LOG.debug("Node {} {} healthy." LOG.info("Node {} {} healthy."
+ " It needs to replicate {} more blocks." + " It needs to replicate {} more blocks."
+ " {} is still in progress.", dn, + " {} is still in progress.", dn,
isHealthy ? "is": "isn't", blocks.size(), dn.getAdminState()); isHealthy ? "is": "isn't", blocks.size(), dn.getAdminState());
} }
} else { } else {
LOG.debug("Node {} still has {} blocks to replicate " LOG.info("Node {} still has {} blocks to replicate "
+ "before it is a candidate to finish {}.", + "before it is a candidate to finish {}.",
dn, blocks.size(), dn.getAdminState()); dn, blocks.size(), dn.getAdminState());
} }
} catch (Exception e) { } catch (Exception e) {