You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2018/06/01 19:20:01 UTC

[2/3] asterixdb git commit: [NO ISSUE] Improve readability of cluster capacities

[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 <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/e2a536e9
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/e2a536e9
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/e2a536e9

Branch: refs/heads/master
Commit: e2a536e986f3966d8dd7598e9f0d8c281e41352e
Parents: eb0fe30
Author: Michael Blow <mb...@apache.org>
Authored: Thu May 31 14:48:07 2018 -0400
Committer: Michael Blow <mb...@apache.org>
Committed: Fri Jun 1 08:35:03 2018 -0700

----------------------------------------------------------------------
 .../org/apache/hyracks/api/job/resource/ClusterCapacity.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e2a536e9/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/job/resource/ClusterCapacity.java
----------------------------------------------------------------------
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 java.util.Objects;
 
 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 @@ public class ClusterCapacity implements IClusterCapacity {
 
     @Override
     public String toString() {
-        return "(memory: " + aggregatedMemoryByteSize + " bytes, CPU cores: " + aggregatedCores + ")";
+        return "(memory: " + StorageUtil.toHumanReadableSize(aggregatedMemoryByteSize) + " bytes, CPU cores: "
+                + aggregatedCores + ")";
     }
 }