GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing docs.voltdb.com — @SnapshotDelete Documentation@SnapshotDelete@SnapshotDelete — Deletes one or more native snapshots. Synopsis@SnapshotDelete String[] directory-paths, String[] Unique-IDs DescriptionThe @SnapshotDelete system procedure deletes native snapshots from the database cluster. This is a cluster-wide operation and a single invocation will remove the snapshot files from all of the nodes. The procedure takes two parameters: a String array of directory paths and a String array of unique IDs (prefixes). The two arrays are read as a series of value pairs, so that the first element of the directory path array and the first element of the unique ID array will be used to identify the first snapshot to delete. The second element of each array will identify the second snapshot to delete. And so on. @SnapshotDelete can delete native format snapshots only. The procedure cannot delete CSV format snapshots. Return ValuesReturns one VoltTable with a row for every snapshot file affected by the operation.
ExampleThe following example uses @SnapshotScan to identify all of the snapshots in the directory
try {
results = client.callProcedure("@SnapshotScan",
"/tmp/voltdb/backup/").getResults();
}
catch (Exception e) { e.printStackTrace(); }
VoltTable table = results[0];
int numofsnapshots = table.getRowCount();
int i = 0;
if (numofsnapshots > 0) {
String[] paths = new String[numofsnapshots];
String[] nonces = new String[numofsnapshots];
for (i=0;i<numofsnapshots;i++) { paths[i] = "/etc/voltdb/backup/"; }
table.resetRowPosition();
i = 0;
while (table.advanceRow()) {
nonces[i] = table.getString("NONCE");
i++;
}
try {
client.callProcedure("@SnapshotDelete",paths,nonces);
}
catch (Exception e) { e.printStackTrace(); }
}
| ||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |