steveloughran commented on a change in pull request #3289:
URL: https://github.com/apache/hadoop/pull/3289#discussion_r697872320
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/commit/CommitOperations.java
##########
@@ -611,13 +642,43 @@ public void jobCompleted(boolean success) {
}
/**
- * Begin the final commit.
+ * Crate a commit context for a job or task.
+ *
+ * @param context job context
* @param path path for all work.
+ * @param committerThreads thread pool size
* @return the commit context to pass in.
* @throws IOException failure.
*/
- public CommitContext initiateCommitOperation(Path path) throws IOException {
- return new CommitContext(writeOperations.initiateCommitOperation(path));
+ public CommitContext createCommitContext(
+ JobContext context,
+ Path path,
+ int committerThreads) throws IOException {
+ return new CommitContext(this, context,
+ committerThreads, writeOperations.initiateCommitOperation(path)
+ );
+ }
+
+ /**
+ * Create a stub commit context for tests.
+ * There's no job context and the thread pool is
+ * not set up.
Review comment:
nit: it is if a count is passed in.
--
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]