StorageService: Fix scrub() variant API wiring
The 'nodetool scrub' command ends up calling the variant that is not wired up to the Scylla API which causes the following error to be printed out to the user: [penberg@nero scylla-tools-java]$ ./bin/nodetool scrub error: For input string: "" -- StackTrace -- java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:592) at java.lang.Integer.parseInt(Integer.java:615) at com.scylladb.jmx.api.APIClient.getIntValue(APIClient.java:216) at com.scylladb.jmx.api.APIClient.getIntValue(APIClient.java:220) at org.apache.cassandra.service.StorageService.scrub(StorageService.java:1291) Fix the problem by implementing the said scrub() variant. Message-Id: <1458035736-26349-1-git-send-email-penberg@scylladb.com>
This commit is contained in:
parent
c4d8d7087e
commit
2cd5a5f048
@ -549,6 +549,15 @@ public class StorageService extends NotificationBroadcasterSupport
|
|||||||
String keyspaceName, String... columnFamilies) throws IOException,
|
String keyspaceName, String... columnFamilies) throws IOException,
|
||||||
ExecutionException, InterruptedException {
|
ExecutionException, InterruptedException {
|
||||||
log(" scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException");
|
log(" scrub(boolean disableSnapshot, boolean skipCorrupted, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException");
|
||||||
|
return scrub(disableSnapshot, skipCorrupted, true, keyspaceName, columnFamilies);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int scrub(boolean disableSnapshot, boolean skipCorrupted,
|
||||||
|
boolean checkData, String keyspaceName, String... columnFamilies)
|
||||||
|
throws IOException, ExecutionException,
|
||||||
|
InterruptedException {
|
||||||
|
log(" scrub(boolean disableSnapshot, boolean skipCorrupted, bool checkData, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException");
|
||||||
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
||||||
APIClient.set_bool_query_param(queryParams, "disable_snapshot",
|
APIClient.set_bool_query_param(queryParams, "disable_snapshot",
|
||||||
disableSnapshot);
|
disableSnapshot);
|
||||||
@ -1281,16 +1290,6 @@ public class StorageService extends NotificationBroadcasterSupport
|
|||||||
log(" takeMultipleColumnFamilySnapshot");
|
log(" takeMultipleColumnFamilySnapshot");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int scrub(boolean disableSnapshot, boolean skipCorrupted,
|
|
||||||
boolean checkData, String keyspaceName, String... columnFamilies)
|
|
||||||
throws IOException, ExecutionException,
|
|
||||||
InterruptedException {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
log(" scrub()");
|
|
||||||
return c.getIntValue("");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int forceRepairAsync(String keyspace, int parallelismDegree,
|
public int forceRepairAsync(String keyspace, int parallelismDegree,
|
||||||
Collection<String> dataCenters, Collection<String> hosts,
|
Collection<String> dataCenters, Collection<String> hosts,
|
||||||
|
Loading…
Reference in New Issue
Block a user