You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2018/06/08 02:20:23 UTC
[bookkeeper] branch master updated: Issue #1498: Log
messages/exception text in DiskChecker shows 'used
threshold' situations
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 6d13b8e Issue #1498: Log messages/exception text in DiskChecker shows 'used <threshold' in 'used > threshold' situations
6d13b8e is described below
commit 6d13b8e90fa89b46cb847b0928c0a24dcd3ef2ea
Author: Andrey Yegorov <ay...@salesforce.com>
AuthorDate: Thu Jun 7 19:20:11 2018 -0700
Issue #1498: Log messages/exception text in DiskChecker shows 'used <threshold' in 'used > threshold' situations
(bug W-3812505)
Descriptions of the changes in this PR:
Fixed log/exception text.
### Motivation
Reduced confusion when debugging an issue/going through the logs.
### Changes
replaced '<' with '>'
Master Issue: #1498
Author: Andrey Yegorov <ay...@salesforce.com>
Reviewers: Jia Zhai <None>, Sijie Guo <si...@apache.org>
This closes #1499 from dlg99/fix/diskchecker-log, closes #1498
---
.../src/main/java/org/apache/bookkeeper/util/DiskChecker.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/DiskChecker.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/DiskChecker.java
index b0c7ea6..f03d475 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/DiskChecker.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/DiskChecker.java
@@ -153,17 +153,17 @@ public class DiskChecker {
float free = (float) usableSpace / (float) totalSpace;
float used = 1f - free;
if (used > diskUsageThreshold) {
- LOG.error("Space left on device {} : {}, Used space fraction: {} < threshold {}.",
+ LOG.error("Space left on device {} : {}, Used space fraction: {} > threshold {}.",
dir, usableSpace, used, diskUsageThreshold);
throw new DiskOutOfSpaceException("Space left on device "
- + usableSpace + " Used space fraction:" + used + " < threshold " + diskUsageThreshold, used);
+ + usableSpace + " Used space fraction:" + used + " > threshold " + diskUsageThreshold, used);
}
// Warn should be triggered only if disk usage threshold doesn't trigger first.
if (used > diskUsageWarnThreshold) {
- LOG.warn("Space left on device {} : {}, Used space fraction: {} < WarnThreshold {}.",
+ LOG.warn("Space left on device {} : {}, Used space fraction: {} > WarnThreshold {}.",
dir, usableSpace, used, diskUsageThreshold);
throw new DiskWarnThresholdException("Space left on device:"
- + usableSpace + " Used space fraction:" + used + " < WarnThreshold:" + diskUsageWarnThreshold,
+ + usableSpace + " Used space fraction:" + used + " > WarnThreshold:" + diskUsageWarnThreshold,
used);
}
return used;
--
To stop receiving notification emails like this one, please contact
sijie@apache.org.