-
Notifications
You must be signed in to change notification settings - Fork 282
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
feat: Add S3 rename tool #490
Conversation
S3::Model::CopyObjectOutcome outcome = client.CopyObject(request); | ||
if (!outcome.IsSuccess()) { | ||
const S3::S3Error &err = outcome.GetError(); | ||
std::cerr << "Error: CopyObject: " << |
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.
Use Poco::Logger to print logs
boost::asio::thread_pool thread_pool(threadNum); | ||
for (S3::Model::Object &object: objects) { | ||
// root_prefix/table_uuid/part_uuid/name | ||
String from_key = object.GetKey(); |
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.
The key will have format of prefix/table_uuid/part_uuid/data, can check if table_uuid & part_uuid is a valid uuid here by ReaderHelpers.h:tryReadUUIDText
hi @Alima777 , pls sign the CLA |
Hi, @hustnn , it's signed now. |
This tool is used to delete table_uuid from the key of s3 objects. Only patterns like "root_prefix/table_uuid/part_uuid/key" will be renamed, other objects will keep like before.