StorageService: getTokens should return the tokens of the current node

StorageService.getTokens should return only the tokens of the current
node, not all the tokens.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1454240935-21903-1-git-send-email-amnon@scylladb.com>
This commit is contained in:
Amnon Heiman 2016-01-31 13:48:55 +02:00 committed by Pekka Enberg
parent 6692f5a3c0
commit 691f86983b

View File

@ -45,6 +45,7 @@ import org.apache.cassandra.repair.RepairParallelism;
import org.apache.cassandra.streaming.StreamManager; import org.apache.cassandra.streaming.StreamManager;
import com.scylladb.jmx.api.APIClient; import com.scylladb.jmx.api.APIClient;
import com.scylladb.jmx.api.APIConfig;
import com.scylladb.jmx.utils.FileUtils; import com.scylladb.jmx.utils.FileUtils;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
@ -155,7 +156,7 @@ public class StorageService extends NotificationBroadcasterSupport
*/ */
public List<String> getTokens() { public List<String> getTokens() {
log(" getTokens()"); log(" getTokens()");
return c.getListStrValue("/storage_service/tokens/"); return c.getListStrValue("/storage_service/tokens/" + APIConfig.getAddress());
} }
/** /**