Skip to content

Commit

Permalink
Fix format string for DiskThresholdDecider reroute explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
dakrone committed Apr 9, 2014
1 parent 960d353 commit 9aa1cb4
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -186,7 +186,7 @@ public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, Routing
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);
}

Expand All @@ -204,7 +204,7 @@ public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, Routing
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);
}

Expand Down Expand Up @@ -266,7 +266,7 @@ public Decision canRemain(ShardRouting shardRouting, RoutingNode node, RoutingAl
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);
}

Expand Down

0 comments on commit 9aa1cb4

Please sign in to comment.