removeNode: support ignoreNodes options
Refs scylladb/scylla-tools-java#225 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Closes #178
This commit is contained in:
parent
26a6919714
commit
2c43d99aa5
@ -991,13 +991,21 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean,
|
|||||||
* the host id to remove
|
* the host id to remove
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void removeNode(String hostIdString) {
|
public void removeNode(String hostIdString, String ignoreNodes) {
|
||||||
log(" removeNode(String token)");
|
log(" removeNode(String token, String ignoreNodes)");
|
||||||
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
||||||
APIClient.set_query_param(queryParams, "host_id", hostIdString);
|
APIClient.set_query_param(queryParams, "host_id", hostIdString);
|
||||||
|
if (ignoreNodes != null) {
|
||||||
|
APIClient.set_query_param(queryParams, "ignore_nodes", ignoreNodes);
|
||||||
|
}
|
||||||
client.post("/storage_service/remove_node", queryParams);
|
client.post("/storage_service/remove_node", queryParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeNode(String hostIdString) {
|
||||||
|
String ignoreNodes = null;
|
||||||
|
removeNode(hostIdString, ignoreNodes);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the status of a token removal.
|
* Get the status of a token removal.
|
||||||
*/
|
*/
|
||||||
|
@ -514,8 +514,11 @@ public interface StorageServiceMBean extends NotificationEmitter {
|
|||||||
* removeToken removes token (and all data associated with enpoint that had
|
* removeToken removes token (and all data associated with enpoint that had
|
||||||
* it) from the ring
|
* it) from the ring
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public void removeNode(String token);
|
public void removeNode(String token);
|
||||||
|
|
||||||
|
public void removeNode(String token, String ignoreNodes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the status of a token removal.
|
* Get the status of a token removal.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user