-
Notifications
You must be signed in to change notification settings - Fork 38
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
Rechunker script #686
Rechunker script #686
Conversation
|
||
def wrapped_loader(): | ||
"""Wrapped loader for changing the target_size_mb""" | ||
while True: | ||
try: | ||
# pylint: disable=cell-var-from-loop | ||
data = next(loader) | ||
# Update target chunk size for re-chunking | ||
data.target_size_mb = md['chunk_target_size_mb'] | ||
except StopIteration: | ||
return | ||
yield data |
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.
Apparently this was a bug that I did not notice before - you could only rechunk until the chunk default target mb size
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.
Looks good. I added some small comments. I have not tired it myself, I trust your tests results you are reporting here.
Thanks Daniel for the review! |
What is the problem / what does the code in this PR do
Simple script to rechunk a file to rechunk / recompenses a source folder to another folder.
Example
An example of re-chunking a given folder several times with different compressors.
Gives: