From 9aa1cb408e358e1036690c5430f93d460fe02ca1 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Tue, 8 Apr 2014 10:44:50 -0600 Subject: [PATCH] Fix format string for DiskThresholdDecider reroute explanation --- .../routing/allocation/decider/DiskThresholdDecider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java b/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java index d928524aec6..c9183692206 100644 --- a/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java +++ b/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java @@ -186,7 +186,7 @@ public class DiskThresholdDecider extends AllocationDecider { logger.debug("Less than the required {}% free disk threshold ({}% free) on node [{}], preventing allocation", freeDiskThresholdLow, freeDiskPercentage, node.nodeId()); } - return allocation.decision(Decision.NO, NAME, "less than required [%d%%] free disk on node, free: [%d%%]", + return allocation.decision(Decision.NO, NAME, "less than required [%s%%] free disk on node, free: [%s%%]", freeDiskThresholdLow, freeDiskThresholdLow); } @@ -204,7 +204,7 @@ public class DiskThresholdDecider extends AllocationDecider { if (freeSpaceAfterShard < freeDiskThresholdHigh) { logger.warn("After allocating, node [{}] would have less than the required {}% free disk threshold ({}% free), preventing allocation", node.nodeId(), freeDiskThresholdHigh, freeSpaceAfterShard); - return allocation.decision(Decision.NO, NAME, "after allocation less than required [%d%%] free disk on node, free: [%d%%]", + return allocation.decision(Decision.NO, NAME, "after allocation less than required [%s%%] free disk on node, free: [%s%%]", freeDiskThresholdLow, freeSpaceAfterShard); } @@ -266,7 +266,7 @@ public class DiskThresholdDecider extends AllocationDecider { logger.debug("Less than the required {}% free disk threshold ({}% free) on node {}, shard cannot remain", freeDiskThresholdHigh, freeDiskPercentage, node.nodeId()); } - return allocation.decision(Decision.NO, NAME, "after allocation less than required [%d%%] free disk on node, free: [%d%%]", + return allocation.decision(Decision.NO, NAME, "after allocation less than required [%s%%] free disk on node, free: [%s%%]", freeDiskThresholdHigh, freeDiskPercentage); }