rdblue commented on a change in pull request #1442: HADOOP-16570. S3A 
committers encounter scale issues
URL: https://github.com/apache/hadoop/pull/1442#discussion_r330148743
 
 

 ##########
 File path: 
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/commit/AbstractS3ACommitter.java
 ##########
 @@ -390,22 +402,25 @@ protected void maybeCreateSuccessMarker(JobContext 
context,
   }
 
   /**
-   * Base job setup deletes the success marker.
-   * TODO: Do we need this?
+   * Base job setup (optionally) deletes the success marker and
+   * always creates the destination directory.
+   * When objects are committed that dest dir marker will inevitably
+   * be deleted; creating it now ensures there is something at the end
+   * while the job is in progress -and if nothing is created, that
+   * it is still there.
    * @param context context
    * @throws IOException IO failure
    */
-/*
 
   @Override
   public void setupJob(JobContext context) throws IOException {
-    if (createJobMarker) {
-      try (DurationInfo d = new DurationInfo("Deleting _SUCCESS marker")) {
+    try (DurationInfo d = new DurationInfo(LOG, "preparing destination")) {
+      if (createJobMarker){
         commitOperations.deleteSuccessMarker(getOutputPath());
       }
+      getDestFS().mkdirs(getOutputPath());
 
 Review comment:
   This seems unrelated. Why is it necessary to create the output path here?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to