commit | e2a536e986f3966d8dd7598e9f0d8c281e41352e | [log] [tgz] |
---|---|---|
author | Michael Blow <mblow@apache.org> | Thu May 31 14:48:07 2018 -0400 |
committer | Michael Blow <mblow@apache.org> | Fri Jun 01 08:35:03 2018 -0700 |
tree | 96fe21857754912cca5b4c371a06632ad6f85639 | |
parent | eb0fe3082b5c6e8de0cc781cc392ad022f65e67d [diff] |
[NO ISSUE] Improve readability of cluster capacities Output memory portion of cluster capacity as human-readable byte values Change-Id: Ifa9270a3d111540fea6db32cf285c8710ff2aed0 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2674 Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/resource/ClusterCapacity.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/resource/ClusterCapacity.java index 25e3255..712d575 100644 --- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/resource/ClusterCapacity.java +++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/resource/ClusterCapacity.java
@@ -25,6 +25,7 @@ import org.apache.hyracks.api.exceptions.ErrorCode; import org.apache.hyracks.api.exceptions.HyracksException; +import org.apache.hyracks.util.StorageUtil; public class ClusterCapacity implements IClusterCapacity { @@ -118,6 +119,7 @@ @Override public String toString() { - return "(memory: " + aggregatedMemoryByteSize + " bytes, CPU cores: " + aggregatedCores + ")"; + return "(memory: " + StorageUtil.toHumanReadableSize(aggregatedMemoryByteSize) + " bytes, CPU cores: " + + aggregatedCores + ")"; } }