diff --git a/src/main/java/org/apache/cassandra/service/StorageService.java b/src/main/java/org/apache/cassandra/service/StorageService.java index b40e49b..d6521c6 100644 --- a/src/main/java/org/apache/cassandra/service/StorageService.java +++ b/src/main/java/org/apache/cassandra/service/StorageService.java @@ -735,8 +735,7 @@ public class StorageService extends NotificationBroadcasterSupport */ public Map getOwnership() { log(" getOwnership()"); - // TBD - return c.getMapInetAddressFloatValue(""); + return c.getMapInetAddressFloatValue("/storage_service/ownership/"); } /** @@ -749,8 +748,11 @@ public class StorageService extends NotificationBroadcasterSupport public Map effectiveOwnership(String keyspace) throws IllegalStateException { log(" effectiveOwnership(String keyspace) throws IllegalStateException"); - // TBD - return c.getMapInetAddressFloatValue(""); + try { + return c.getMapInetAddressFloatValue("/storage_service/ownership/" + keyspace); + } catch (Exception e) { + throw new IllegalStateException("Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless"); + } } public List getKeyspaces() {