fix auto_compaction request strings

Column family is not being passed, so the requests fail to reach the
correct endpoint.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
This commit is contained in:
Glauber Costa 2017-08-21 22:50:38 -04:00
parent 631605eff1
commit 2b1ed89ec3

View File

@ -1381,7 +1381,7 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean,
log("disableAutoCompaction(String ks, String... columnFamilies)");
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
APIClient.set_query_param(queryParams, "cf", APIClient.join(columnFamilies));
client.delete("/storage_service/auto_compaction/", queryParams);
client.delete("/storage_service/auto_compaction/" + ks, queryParams);
}
@Override
@ -1390,7 +1390,7 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean,
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
APIClient.set_query_param(queryParams, "cf", APIClient.join(columnFamilies));
try {
client.post("/storage_service/auto_compaction/", queryParams);
client.post("/storage_service/auto_compaction/" + ks, queryParams);
} catch (RuntimeException e) {
// FIXME should throw the right exception
throw new IOException(e.getMessage());