Edwin de Jong created HADOOP-20109:
--------------------------------------

             Summary: S3A: Read the parts of a multipart upload in progress
                 Key: HADOOP-20109
                 URL: https://issues.apache.org/jira/browse/HADOOP-20109
             Project: Hadoop Common
          Issue Type: New Feature
          Components: fs/s3
    Affects Versions: 3.6.0
            Reporter: Edwin de Jong


S3 added a GetPart API on 2026-11-29. It lets us read the parts of a multipart 
upload that have already been uploaded, while the upload is still in progress.

Today S3A cannot see such data. An object written with a multipart upload only 
exists once the upload completes, so a reader of a long upload has to wait 
until the end.

I propose two additions to S3A:

# Open one part as a stream. {{openFile()}} gets two new options, 
{{fs.s3a.openfile.upload.id}} and {{fs.s3a.openfile.part.number}}. With both 
set, the {{FSDataInputStream}} it opens reads that one part with {{GetPart}}. 
The stream supports {{seek()}} and ends at the end of the part.
# List the parts of an upload. A new method {{S3AFileSystem.listParts(path, 
uploadId, partNumberMarker)}} returns the parts uploaded so far.

One question for the maintainers. {{S3AFileSystem.listUploads()}} is annotated 
{{@InterfaceAudience.Private}}, and I gave {{listParts()}} the same annotation. 
An application that wants to follow uploads, such as a Spark streaming source 
(SPARK-62591), can then open a part through the public {{openFile()}} API, but 
it has no public method to find the uploads and their parts. Should the two 
methods become {{LimitedPrivate}} or {{Public}}, or is there a better place for 
them?

This depends on the SDK upgrade in HADOOP-NNNNN, because the current SDK 
(2.35.4) does not have GetPart.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to