diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java index 42fd07ba85..6a572487e1 100644 --- a/src/java/org/apache/cassandra/service/StorageService.java +++ b/src/java/org/apache/cassandra/service/StorageService.java @@ -1543,6 +1543,11 @@ public class StorageService implements IEndpointStateChangeSubscriber, StorageSe * @param key - key for which we need to find the endpoint return value - * the endpoint responsible for this key */ + public List getNaturalEndpoints(String table, byte[] key) + { + return getNaturalEndpoints(table, partitioner.getToken(ByteBuffer.wrap(key))); + } + public List getNaturalEndpoints(String table, ByteBuffer key) { return getNaturalEndpoints(table, partitioner.getToken(key)); diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java b/src/java/org/apache/cassandra/service/StorageServiceMBean.java index c37969b2db..cc992bb5c1 100644 --- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java +++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java @@ -133,6 +133,7 @@ public interface StorageServiceMBean * @param key - key for which we need to find the endpoint return value - * the endpoint responsible for this key */ + public List getNaturalEndpoints(String table, byte[] key); public List getNaturalEndpoints(String table, ByteBuffer key); /** diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java index 8e9740946c..86084261d4 100644 --- a/src/java/org/apache/cassandra/tools/NodeProbe.java +++ b/src/java/org/apache/cassandra/tools/NodeProbe.java @@ -443,7 +443,7 @@ public class NodeProbe public List getEndpoints(String keyspace, String key) { // FIXME: string key - return ssProxy.getNaturalEndpoints(keyspace, ByteBuffer.wrap(key.getBytes(UTF_8))); + return ssProxy.getNaturalEndpoints(keyspace, key.getBytes(UTF_8)); } public Set getStreamDestinations()