public class CassandraOperations extends java.lang.Object implements ICassandraOperations
Modifier and Type | Method and Description |
---|---|
void |
clearSnapshot(java.lang.String snapshotTag)
Clear the snapshot tag from disk.
|
void |
forceKeyspaceCompaction(java.lang.String keyspaceName,
java.lang.String... columnfamilies) |
void |
forceKeyspaceFlush(java.lang.String keyspaceName) |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getColumnfamilies() |
java.util.List<java.lang.String> |
getKeyspaces()
Get all the keyspaces existing on this node.
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
gossipInfo() |
void |
takeSnapshot(java.lang.String snapshotName)
This method neds to be synchronized.
|
public void takeSnapshot(java.lang.String snapshotName) throws java.lang.Exception
ICassandraOperations
takeSnapshot
in interface ICassandraOperations
snapshotName
- Name of the snapshot on disk. This snapshotName should be UNIQUE among
all the snapshots. Try to append UUID to snapshotName to ensure uniqueness. This is to
ensure a) Snapshot fails if name are not unique. b) You might take snapshots which are
not "part" of same snapshot. e.g. Any leftovers from previous operation. c) Once snapshot
fails, this will clean the failed snapshot.java.lang.Exception
- in case of error while taking a snapshot by Cassandra.public void clearSnapshot(java.lang.String snapshotTag) throws java.lang.Exception
ICassandraOperations
clearSnapshot
in interface ICassandraOperations
snapshotTag
- Name of the snapshot to be removed.java.lang.Exception
- in case of error while clearing a snapshot.public java.util.List<java.lang.String> getKeyspaces() throws java.lang.Exception
ICassandraOperations
getKeyspaces
in interface ICassandraOperations
java.lang.Exception
- in case of reaching to JMX endpoint.public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getColumnfamilies() throws java.lang.Exception
getColumnfamilies
in interface ICassandraOperations
java.lang.Exception
public void forceKeyspaceCompaction(java.lang.String keyspaceName, java.lang.String... columnfamilies) throws java.lang.Exception
forceKeyspaceCompaction
in interface ICassandraOperations
java.lang.Exception
public void forceKeyspaceFlush(java.lang.String keyspaceName) throws java.lang.Exception
forceKeyspaceFlush
in interface ICassandraOperations
java.lang.Exception
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> gossipInfo() throws java.lang.Exception
gossipInfo
in interface ICassandraOperations
java.lang.Exception