public void forceKeyspaceCleanup(PrintStream out, int jobs, String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException { if (forceKeyspaceCleanup(jobs, keyspaceName, columnFamilies) != 0) { failed = true; out.println("Aborted cleaning up atleast one column family in keyspace "+keyspaceName+", check server logs for more information."); } }
public void forceKeyspaceCleanup(PrintStream out, int jobs, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException { checkJobs(out, jobs); switch (forceKeyspaceCleanup(jobs, keyspaceName, tableNames)) { case 1: failed = true; out.println("Aborted cleaning up at least one table in keyspace "+keyspaceName+", check server logs for more information."); break; case 2: failed = true; out.println("Failed marking some sstables compacting in keyspace "+keyspaceName+", check server logs for more information"); break; } }
public void forceKeyspaceCleanup(PrintStream out, int jobs, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException { checkJobs(out, jobs); switch (forceKeyspaceCleanup(jobs, keyspaceName, tableNames)) { case 1: failed = true; out.println("Aborted cleaning up at least one table in keyspace "+keyspaceName+", check server logs for more information."); break; case 2: failed = true; out.println("Failed marking some sstables compacting in keyspace "+keyspaceName+", check server logs for more information"); break; } }
public void forceKeyspaceCleanup(PrintStream out, int jobs, String keyspaceName, String... tableNames) throws IOException, ExecutionException, InterruptedException { checkJobs(out, jobs); switch (forceKeyspaceCleanup(jobs, keyspaceName, tableNames)) { case 1: failed = true; out.println("Aborted cleaning up at least one table in keyspace "+keyspaceName+", check server logs for more information."); break; case 2: failed = true; out.println("Failed marking some sstables compacting in keyspace "+keyspaceName+", check server logs for more information"); break; } }
/** * Cleans the deleted keys and keys that no longer belong to the node for * the indicated key space and column families. * * @param keySpace The key space to cleanup. * @param columnFamilies A list of the column families to clean. If * empty, all column families are cleaned. * @throws InterruptedException If the task is interrupted. * @throws ExecutionException If execution fails. * @throws IOException If an IOException occurs communicating with the * process. */ public void cleanup(String keySpace, List<String> columnFamilies) throws InterruptedException, ExecutionException, IOException { if (columnFamilies.isEmpty()) { getProbe().forceKeyspaceCleanup(0, keySpace); } else { String[] families = new String[columnFamilies.size()]; families = columnFamilies.toArray(families); getProbe().forceKeyspaceCleanup(0, keySpace, families); } }
@Override public void execute(NodeProbe probe) { List<String> keyspaces = parseOptionalKeyspace(args, probe); String[] cfnames = parseOptionalColumnFamilies(args); for (String keyspace : keyspaces) { if (Keyspace.SYSTEM_KS.equals(keyspace)) continue; try { probe.forceKeyspaceCleanup(System.out, jobs, keyspace, cfnames); } catch (Exception e) { throw new RuntimeException("Error occurred during cleanup", e); } } } }
@Override public void execute(NodeProbe probe) { List<String> keyspaces = parseOptionalKeyspace(args, probe, KeyspaceSet.NON_LOCAL_STRATEGY); String[] tableNames = parseOptionalTables(args); for (String keyspace : keyspaces) { if (SchemaConstants.isLocalSystemKeyspace(keyspace)) continue; try { probe.forceKeyspaceCleanup(System.out, jobs, keyspace, tableNames); } catch (Exception e) { throw new RuntimeException("Error occurred during cleanup", e); } } } }
@Override public void execute(NodeProbe probe) { List<String> keyspaces = parseOptionalKeyspace(args, probe, KeyspaceSet.NON_LOCAL_STRATEGY); String[] tableNames = parseOptionalTables(args); for (String keyspace : keyspaces) { if (SchemaConstants.isLocalSystemKeyspace(keyspace)) continue; try { probe.forceKeyspaceCleanup(System.out, jobs, keyspace, tableNames); } catch (Exception e) { throw new RuntimeException("Error occurred during cleanup", e); } } } }
@Override public void execute(NodeProbe probe) { List<String> keyspaces = parseOptionalKeyspace(args, probe, KeyspaceSet.NON_LOCAL_STRATEGY); String[] tableNames = parseOptionalTables(args); for (String keyspace : keyspaces) { if (SchemaConstants.isLocalSystemKeyspace(keyspace)) continue; try { probe.forceKeyspaceCleanup(System.out, jobs, keyspace, tableNames); } catch (Exception e) { throw new RuntimeException("Error occurred during cleanup", e); } } } }