Skip to content

Commit 16d8cab

Browse files
committed
added clear snapshot method.
1 parent 0546484 commit 16d8cab

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

utils.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ func CreateNewSnapshot(snapshotTag string) (string, error) {
6969
return snapshotName, nil
7070
}
7171

72+
func ClearSnapshot(snapshotName string) error {
73+
result := SystemCall("nodetool", "clearsnapshot", snapshotName)
74+
if result.StatusCode != 0 {
75+
return errors.New("Clearing snapshot failed")
76+
}
77+
78+
return nil
79+
}
80+
7281
func prettyPrint(in ...interface{}) {
7382
pretty.Println(in)
7483
}

0 commit comments

Comments
 (0)