Merge "Fix auto_compaction request strings" from Glauber

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

* 'compact' of git://github.com/glommer/scylla-jmx:
  fix auto_compaction request strings
This commit is contained in:
Pekka Enberg 2017-09-04 08:55:10 +03:00
commit 3233e157cf

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());