-
Notifications
You must be signed in to change notification settings - Fork 490
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
Add arg builder to listIncompleteUpload API #937
Conversation
2530011
to
9242386
Compare
api/src/main/java/io/minio/ListIncompleteUploadsBucketArgs.java
Outdated
Show resolved
Hide resolved
1d5df85
to
5d270bc
Compare
dc4684e
to
6808bb8
Compare
api/src/main/java/io/minio/ListIncompleteUploadsBucketArgs.java
Outdated
Show resolved
Hide resolved
877dff7
to
7363336
Compare
package io.minio; | ||
|
||
/** Argument class of @see #listIncompleteUploads(ListIncompleteUploadsArgs args). */ | ||
public class ListIncompleteUploadsArgs extends BucketArgs { |
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.
Could you add all parameters like listObjects()
? Similarly you could check reusing/modifying existing objectIterator
class to accommodate this listing as well.
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.
IMO this not feasible as there are two different API's expecting different query parameters.
List Incomplete upload : https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
GET /?uploads&Delimiter=Delimiter&EncodingType=EncodingType&KeyMarker=KeyMarker&MaxUploads=MaxUploads&Prefix=Prefix&UploadIdMarker=UploadIdMarker HTTP/1.1
Host: Bucket.s3.amazonaws.com
List Objects : https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
GET /?list-type=2&ContinuationToken=ContinuationToken&Delimiter=Delimiter&EncodingType=EncodingType&FetchOwner=FetchOwner&MaxKeys=MaxKeys&Prefix=Prefix&StartAfter=StartAfter HTTP/1.1
Host: Bucket.s3.amazonaws.com
x-amz-request-payer: RequestPayer
As far as using object Iterator is concerned it implements Iterator of Item type, (ObjectIterator implements Iterator<Result<Item>> )
while list incompleteUpload needs Iterator of type Upload Iterator<Result<Upload>>
. Item and Upload the the different response classes for these api.
IMO listObjects
and listIncompleteObjects
being separate is correct.
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
dc02069
to
517aa48
Compare
517aa48
to
32d7d65
Compare
32d7d65
to
9862e92
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.
Couple of minor comments apart from some other comments which have already been added by Bala.
4cd989b
to
7bb2361
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.
LGTM
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
Add arg builder to listIncompleteUpload