|
|
Login/Register | Contact Us | 1+ 978-528-4660 |
@SnapshotStatus
@SnapshotStatus
@SnapshotStatus — Lists information about the most recent snapshots created from the current database.
Synopsis
ClientResponse client.callProcedure("@SnapshotStatus")
Description
The @SnapshotStatus system procedure provides information about up to ten of the most recent snapshots performed on the current database. The information provided includes the directory path and prefix for the snapshot, when it occurred and how long it took, as well as whether the snapshot was completed successfully or not.
Note that @SnapshotStatus does not tell you whether the snapshot files still exist, only that the snapshot was performed. You can use the procedure @SnapshotScan to determine what snapshots are available.
Also, the status information is reset each time the database is restarted. In other words, @SnapshotStatus only provides information about the most recent snapshots since the current database instance was started.
Return Values
Returns one VoltTable with a row for every snapshot file in the recent snapshots performed on the cluster.
| Name | Datatype | Description |
|---|---|---|
| TIMESTAMP | BIGINT | The timestamp when the snapshot was initiated (in milliseconds). |
| HOST_ID | INTEGER | Numeric ID for the host node. |
| HOSTNAME | STRING | Server name of the host node. |
| TABLE | STRING | The name of the database table whose data the file contains. |
| PATH | STRING | The directory path where the snapshot file resides. |
| FILENAME | STRING | The file name. |
| NONCE | STRING | The unique identifier for the snapshot. |
| TXNID | BIGINT | The transaction ID of the snapshot. |
| START_TIME | BIGINT | The timestamp when the snapshot began (in milliseconds). |
| END_TIME | BIGINT | The timestamp when the snapshot was completed (in milliseconds). |
| SIZE | BIGINT | The total size, in bytes, of the file. |
| DURATION | BIGINT | The length of time (in milliseconds) it took to complete the snapshot. |
| THROUGHPUT | FLOAT | The average number of bytes per second written to the file during the snapshot process. |
| RESULT | STRING | String value indicating whether the writing of the snapshot file was successful ("SUCCESS") or not ("FAILURE"). |
Example
The following example uses @SnapshotStatus to display information about most recent snapshots performed on the current database.
VoltTable[] results = null;
try {
results = client.callProcedure("@SnapshotStatus").getResults();
}
catch (Exception e) { e.printStackTrace(); }
for (VoltTable t: results) {
System.out.println(t.toString());
}
copyright 2012 VoltDB, Inc.
- Printer-friendly version
- Login or register to post comments
