Improving disk usage log message

Improving the warning message for a percent disk usage check so it is
more clear what the original limit was set to and what the current
limit is being set to.
This commit is contained in:
Christopher L. Shannon (cshannon) 2015-10-14 11:35:18 +00:00
parent b5bfe2707b
commit af09b4586b
1 changed files with 5 additions and 3 deletions

View File

@ -2057,10 +2057,12 @@ public class BrokerService implements Service {
} else if (storeLimit > totalUsableSpace) {
if (percentLimit > 0) {
LOG.warn(storeName + " limit has been set to "
+ percentLimit + "% (" + storeLimit / oneMeg + " mb)"
+ percentLimit + "% (" + bytePercentLimit / oneMeg + " mb)"
+ " of the partition size but there is not enough usable space."
+ " Only " + totalUsableSpace * 100 / totalSpace + "% (" + totalUsableSpace / oneMeg + " mb)"
+ " is available");
+ " The current store limit (which may have been adjusted by a"
+ " previous usage limit check) is set to (" + storeLimit / oneMeg + " mb)"
+ " but only " + totalUsableSpace * 100 / totalSpace + "% (" + totalUsableSpace / oneMeg + " mb)"
+ " is available - resetting limit");
}
LOG.warn(storeName + " limit is " + storeLimit / oneMeg +