diff --git a/src/main/java/org/apache/cassandra/service/StorageService.java b/src/main/java/org/apache/cassandra/service/StorageService.java index 9f84ffc..cfed575 100644 --- a/src/main/java/org/apache/cassandra/service/StorageService.java +++ b/src/main/java/org/apache/cassandra/service/StorageService.java @@ -366,15 +366,20 @@ public class StorageService extends NotificationBroadcasterSupport /** Human-readable load value. Keys are IP addresses. */ public Map getLoadMap() { log(" getLoadMap()"); - Map load = c.getMapStrValue("/storage_service/load_map"); + Map load = getLoadMapAsDouble(); Map map = new HashMap<>(); - for (Map.Entry entry : load.entrySet()) + for (Map.Entry entry : load.entrySet()) { - map.put(entry.getKey(), FileUtils.stringifyFileSize(Double.parseDouble(entry.getValue()))); + map.put(entry.getKey(), FileUtils.stringifyFileSize(entry.getValue())); } return map; } + public Map getLoadMapAsDouble() { + log(" getLoadMapAsDouble()"); + return c.getMapStringDouble("/storage_service/load_map"); + } + /** * Return the generation value for this node. *