use of org.apache.cassandra.service.StorageServiceMBean in project cassandra-mesos-deprecated by mesosphere.
the class BackupManager method backup.
public void backup(@NotNull final String keyspace, @NotNull final String snapshot) throws IOException {
final StorageServiceMBean storageServiceProxy = jmxConnect.getStorageServiceProxy();
LOGGER.info("Creating snapshot of keyspace {}", keyspace);
storageServiceProxy.takeSnapshot(snapshot, keyspace);
LOGGER.info("Copying backup of keyspace {}", keyspace);
copyKeyspaceSnapshot(snapshot, keyspace);
LOGGER.info("Clearing snapshot of keyspace {}", keyspace);
storageServiceProxy.clearSnapshot(snapshot, keyspace);
}
Aggregations