Skip to content

Why there is a partNumber in GetObjectRequest? #662

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

Closed
crusader-mike opened this issue Sep 14, 2017 · 6 comments
Closed

Why there is a partNumber in GetObjectRequest? #662

crusader-mike opened this issue Sep 14, 2017 · 6 comments
Labels
guidance Question that needs advice or information.

Comments

@crusader-mike
Copy link

It seems that you can specify partNumber in GetObject request. What is the associated semantic -- can I download object piece-by-piece using this?

@marcomagdy
Copy link
Contributor

Yes, you can.

@crusader-mike
Copy link
Author

So, which byte range GetObjectRequest with partNumber =5 will retrieve? Where can I get such information (along with total number of parts)? I can't find anything in documentation...

@marcomagdy
Copy link
Contributor

This applies for multi-part uploads only. Specifically, multipart uploads that have neither completed nor aborted.
Essentially, this allows you to download a part of an object you're uploading via multi-part upload.

See http://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html

@crusader-mike
Copy link
Author

I see... Thank you.

Is there any way to implement multi-part download (that is download different parts of the same object in parallel) besides using GetObject with byte ranges?

@marcomagdy
Copy link
Contributor

I don't think so. Range-get is the only way I'm aware of.

@justnance justnance added guidance Question that needs advice or information. and removed question labels Apr 19, 2019
@vlovich
Copy link

vlovich commented Mar 25, 2022

To anyone else coming across this link, the explanation doesn't seem correct. AFAICT there's no way to access the contents of an in-progress upload. This should be pretty clear because the GetObject API does not take in an upload ID. So if a part number were referring to an incomplete/not aborted uploaded, which upload would that be? There could be several in flight at one time after all.

The part number in GetObject actually corresponds to the byte range of a published multipart upload. So if you published parts 1(10MB), 2(10MB), and 3(3MB) and ask for part 2, you'll get the byte range [10MB, 20MB).

What's not clear to me is what happens if you upload parts 1 3 & 7 and then ask for part 3. Do you get back part #3 that you uploaded or the third consecutive part contained within the file (i.e. part 7 in the upload). It's not hard to test but I'm lazy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

5 participants