/** Clears a snapshot of the indicated key space with the given name. * * @param name The name of the snapshot. * @param keySpace The name of the key space. * @throws IOException If an error occurs clearing the snapshot. */ public void clearSnapshot(String name, String keySpace) throws IOException { getProbe().clearSnapshot(name, keySpace); }
/** * Clears a snapshot for the given key spaces. * * @param name The name of the snap shot. * @param keySpaces The key spaces to clear. If empty, all key spaces are * cleared * @throws IOException If the clear fails. */ public void clearSnapShot(String name, String... keySpaces) throws IOException { getProbe().clearSnapshot(name, keySpaces); }
@Override public void execute(NodeProbe probe) { StringBuilder sb = new StringBuilder(); sb.append("Requested clearing snapshot(s) for "); if (keyspaces.isEmpty()) sb.append("[all keyspaces]"); else sb.append("[").append(join(keyspaces, ", ")).append("]"); if (!snapshotName.isEmpty()) sb.append(" with snapshot name [").append(snapshotName).append("]"); System.out.println(sb.toString()); try { probe.clearSnapshot(snapshotName, toArray(keyspaces, String.class)); } catch (IOException e) { throw new RuntimeException("Error during clearing snapshots", e); } } }
@Override public void execute(NodeProbe probe) { StringBuilder sb = new StringBuilder(); sb.append("Requested clearing snapshot(s) for "); if (keyspaces.isEmpty()) sb.append("[all keyspaces]"); else sb.append("[").append(join(keyspaces, ", ")).append("]"); if (!snapshotName.isEmpty()) sb.append(" with snapshot name [").append(snapshotName).append("]"); System.out.println(sb.toString()); try { probe.clearSnapshot(snapshotName, toArray(keyspaces, String.class)); } catch (IOException e) { throw new RuntimeException("Error during clearing snapshots", e); } } }
@Override public void execute(NodeProbe probe) { StringBuilder sb = new StringBuilder(); sb.append("Requested clearing snapshot(s) for "); if (keyspaces.isEmpty()) sb.append("[all keyspaces]"); else sb.append("[").append(join(keyspaces, ", ")).append("]"); if (!snapshotName.isEmpty()) sb.append(" with snapshot name [").append(snapshotName).append("]"); System.out.println(sb.toString()); try { probe.clearSnapshot(snapshotName, toArray(keyspaces, String.class)); } catch (IOException e) { throw new RuntimeException("Error during clearing snapshots", e); } } }
@Override public void execute(NodeProbe probe) { StringBuilder sb = new StringBuilder(); sb.append("Requested clearing snapshot(s) for "); if (keyspaces.isEmpty()) sb.append("[all keyspaces]"); else sb.append("[").append(join(keyspaces, ", ")).append("]"); if (!snapshotName.isEmpty()) sb.append(" with snapshot name [").append(snapshotName).append("]"); System.out.println(sb.toString()); try { probe.clearSnapshot(snapshotName, toArray(keyspaces, String.class)); } catch (IOException e) { throw new RuntimeException("Error during clearing snapshots", e); } } }