scylla-jmx: implement forceRepairRangeAsync
Fix the stubbed implementation of forceRepairRangeAsync() which is used, for example, when the "--start-token"/"--end-token" options are passed to "nodetool repair". forceRepairRangeAsync() works similarly to the existing forceRepairAsync() just sending the additional start/end tokens as two new options to the REST API. Unlike the parallel Cassandra code, we don't do any fancy processing on these tokens to intersect them with the node's token ranges - we'll do this intersection in the C++ code, where the repair is actually done. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <1455808238-25692-1-git-send-email-nyh@scylladb.com>
This commit is contained in:
parent
ea0c593a75
commit
15ad444c40
@ -1310,9 +1310,20 @@ public class StorageService extends NotificationBroadcasterSupport
|
||||
String keyspaceName, int parallelismDegree,
|
||||
Collection<String> dataCenters, Collection<String> hosts,
|
||||
boolean fullRepair, String... columnFamilies) {
|
||||
// TODO Auto-generated method stub
|
||||
log(" forceRepairRangeAsync(beginToken, endToken, keyspaceName, parallelismDegree, dataCenters, hosts, fullRepair, columnFamilies)");
|
||||
return c.getIntValue("");
|
||||
Map<String, String> options = new HashMap<String, String>();
|
||||
Joiner commas = Joiner.on(",");
|
||||
options.put("parallelism", Integer.toString(parallelismDegree));
|
||||
if (dataCenters != null) {
|
||||
options.put("dataCenters", commas.join(dataCenters));
|
||||
}
|
||||
if (hosts != null) {
|
||||
options.put("hosts", commas.join(hosts));
|
||||
}
|
||||
options.put("incremental", Boolean.toString(!fullRepair));
|
||||
options.put("startToken", beginToken);
|
||||
options.put("endToken", endToken);
|
||||
return repairAsync(keyspaceName, options);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user