Hello Mike Percy, Kudu Jenkins, Grant Henke,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/13405
to look at the new patch set (#4).
Change subject: [backup] Add a tool to clean up old backups
......................................................................
[backup] Add a tool to clean up old backups
This adds a tool that cleans up old backups. Eligibility for cleanup is
a property of the backup path, not the actual backup. There are two
conditions:
1. The path is not the restore path.
2. Every backup on the path is older than the expiration age, which the
tool allows users to express in days. The default is 30 days.
If a path satisfies both conditions, the tool will delete its backups,
from most recent to least recent. This way, if the tool terminates
mid-delete, the next run of the tool can pick up where the previous one
left off. However, a backup on the restore path will not be deleted,
even if it lies on a path that is expired.
The tool has a dry run mode, a verbose mode, and a table name filter. It
does not normally output anything on success.
There are a couple of situations not currently handled by this tool:
1. Failed backups with no metadata.
2. Backup paths with no full backup at the beginning.
This is because the backup graph abstraction doesn't presently handle
these cases in a way the tool can use. The tool can be further improved
after a follow up to enhance the backup graph.
Change-Id: I4a4c4dde10ec3c3c9b2233ee2f7b13c46e963e39
---
M java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/BackupIO.scala
A
java/kudu-backup-tools/src/main/scala/org/apache/kudu/backup/KuduBackupCleaner.scala
M
java/kudu-backup-tools/src/test/scala/org/apache/kudu/backup/TestKuduBackupCLI.scala
A
java/kudu-backup-tools/src/test/scala/org/apache/kudu/backup/TestKuduBackupCleaner.scala
A java/kudu-backup-tools/src/test/scala/org/apache/kudu/backup/TestUtils.scala
M java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduBackup.scala
M java/kudu-backup/src/test/scala/org/apache/kudu/backup/TestKuduBackup.scala
7 files changed, 330 insertions(+), 30 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/05/13405/4
--
To view, visit http://gerrit.cloudera.org:8080/13405
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4a4c4dde10ec3c3c9b2233ee2f7b13c46e963e39
Gerrit-Change-Number: 13405
Gerrit-PatchSet: 4
Gerrit-Owner: Will Berkeley <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Will Berkeley <[email protected]>