-
Notifications
You must be signed in to change notification settings - Fork 537
HDDS-8049. [snapshot] Support snapshot generation through 'ozone freon'. #8483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Change-Id: I3df34082617971d72934c2a8003f47a7d8a51f8a
for (int dirIndex = 1; dirIndex <= numDirs; dirIndex++) { | ||
String dirName = String.format("dir-%d", dirIndex); | ||
// Append "/" to denote a directory. | ||
bucket.createKey(dirName + "/", 0).close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can use bucket.createDirectory(String dirName) too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Another improvement is to add renames , deletes and modify ops as specified so it would be useful to test snapdiff but perhaps we could do it in another jira.
Change-Id: I658e663d9e24681731278747ce836d787c551353
@Option(names = {"--dirs"}, | ||
description = "Number of directories to create after each snapshot", defaultValue = "5") | ||
private int numDirs; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch @jojochuang. Should we also have an option to generate keys --keys
?
// Snapshot creation: this is a placeholder call. | ||
// Replace this call with the actual snapshot creation method supported in your environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Snapshot creation: this is a placeholder call. | |
// Replace this call with the actual snapshot creation method supported in your environment. | |
// Create snapshot. |
What changes were proposed in this pull request?
HDDS-8049. [snapshot] Support snapshot generation through 'ozone freon'.
Please describe your PR in detail:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8049
How was this patch tested?
TestSnapshotGenerator verifies that the expected number of snapshots are created.
https://github.com/jojochuang/ozone/actions/runs/15123732084