scylla-jmx: use ":", not "=", to build options list

Scylla's repair REST API (see scylla/api/storage_service.cc) takes all
repair options as one "options" string. The options are separated by ",",
and for each option, the name and value are separated by ":". The existing
code wrongly used "=" instead of ":", so this patch fixes it.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This commit is contained in:
Nadav Har'El 2015-12-28 14:58:43 +02:00 committed by Pekka Enberg
parent 4f275cc44b
commit f8b4dfed38

View File

@ -660,14 +660,15 @@ public class StorageService extends NotificationBroadcasterSupport
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
String opts = "";
for (String op : options.keySet()) {
// Scylla splits options on "," (between options) and ":" (between
// name and value): See scylla/api/storage_service.cc.
if (!opts.equals("")) {
opts = opts + ",";
}
opts = opts + op + "=" + options.get(op);
opts = opts + op + ":" + options.get(op);
}
APIClient.set_query_param(queryParams, "options", opts);
int cmd = c.postInt("/storage_service/repair_async/" + keyspace,
queryParams);
int cmd = c.postInt("/storage_service/repair_async/" + keyspace, queryParams);
waitAndNotifyRepair(cmd, keyspace, getRepairMessage(cmd, keyspace, 1, RepairParallelism.SEQUENTIAL, true));
return cmd;
}