gbloisi-openaire opened a new pull request, #8990:
URL: https://github.com/apache/hadoop/pull/8990

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'HADOOP-17799. Your PR title ...'.
       3. The "Build" check on your PR mirrors CI that runs in your own fork. 
Enable GitHub Actions in your fork before your first push: 
https://github.com/apache/hadoop/blob/trunk/.github/pr-build-check.md
   -->
   
   ### Description of PR
   Add the option fs.s3a.committer.magic.tmp.path. When it is set, the magic 
committer keeps its job and job attempt directories, including the per-task 
.pendingset files, under that path (e.g. on HDFS) rather than under the 
destination in S3. Task commit and job commit then save, list and read 
.pendingset files without any S3 requests. If the option is unset, these 
directories stay under the destination.
   
   Task output is still written under the __magic path of the destination, as 
the S3A filesystem needs that path to turn writes into delayed multipart 
uploads. To keep the per-file .pending data out of S3 as well, also set 
fs.s3a.committer.magic.track.commits.in.memory.enabled.
   
   MagicS3GuardCommitter:
   * Get the filesystem of the job directories from their path, as 
getDestinationFS() only accepts S3A.
   * Create the job attempt directory in setupJob(), so that job commit can 
list it when no task has saved anything there. This was previously created 
implicitly by task output under the same path in S3.
   * Clean up the magic directory under the destination as well as the job 
directory in the configured path.
   * Skip the S3 create and delete of the task attempt directory when commits 
are tracked in memory, as nothing is saved there.
   
   AbstractS3ACommitter:
   * Add prepareTaskAttemptPath() as an extension point for task setup.
   * Remove the abstract getTempTaskAttemptPath(), now only defined by 
MagicS3GuardCommitter, and the unsupported override in StagingCommitter.
   * Make jobSetup protected.
   
   ### How was this patch tested?
   ITestMagicCommitProtocol now runs with and without the new option, using a 
local filesystem directory as the cluster filesystem. It adds a test that the 
.pendingset files are saved in the job attempt directory and not in S3. Run 
against LocalStack S3 and not yet against AWS S3 or HDFS.
   Tested in production cluster against an S3 service backed up by CEPH and 
fs.s3a.committer.magic.tmp.path pointing to a local hdfs folder.
   
   ### For code changes:
   
   - [x] Does the title of this PR start with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [x] Object storage: Have the integration tests been executed and the 
endpoint
         declared according to the connector-specific documentation? *Note: 
Automated CI
         testing doesn't cover all cases so manual testing with cloud storage 
is still
         required.*
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   ### AI Tooling
   
   If an AI tool was used:
   
   - [x] The PR includes the phrase "Contains content generated by <tool>"
         where <tool> is the name of the AI tool used.
   - [x] My use of AI contributions follows the ASF legal policy
         https://www.apache.org/legal/generative-tooling.html
   
   Contains content generated by Claude Code Opus 5.5.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to