-
Notifications
You must be signed in to change notification settings - Fork 85
feat: First Pass Implementation of UploadMany #1922
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
Conversation
|
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
3f4b29e to
53a17bd
Compare
53a17bd to
992943e
Compare
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.
Generally lgtm; just had a couple questions
| public @NonNull UploadJob uploadFiles(List<Path> files, ParallelUploadConfig opts) { | ||
| List<Future<UploadResult>> uploadTasks = new ArrayList<>(); | ||
| for (Path file : files) { | ||
| if (Files.isDirectory(file)) throw new IllegalStateException("Directories are not supported"); |
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.
just to clarify -- we plan to support Directory upload in the future?
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 idea is that the api will just accept file paths but we will "support" directories in the samples by showing the customers how to generate that list themselves from a directory.
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.
Are we planning to have TransferManagerUtils be public to consumers? If so, should we consider a method like TransferManagerUtils.getFileListForDirectory(Path directory) that does it for you?
| return uploadWithoutChunking(); | ||
| } | ||
|
|
||
| private UploadResult uploadWithoutChunking() throws IOException { |
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.
Once we support MPU, it would be great if we could determine how (single shot vs resumable vs MPU) to upload based on the object 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.
yes, I think this is the goal. also throughput based. If we are uploading super fast no sense in spending the overhead to split the work.
b97db6d to
e4540a9
Compare
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.