hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] apache-yetus commented on a change in pull request #515: HADOOP-16134 001- initial design of a WriteOperationsContext
Date Fri, 22 Feb 2019 12:01:09 GMT
apache-yetus commented on a change in pull request #515: HADOOP-16134 001- initial design of
a WriteOperationsContext
URL: https://github.com/apache/hadoop/pull/515#discussion_r259314362
 
 

 ##########
 File path: hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
 ##########
 @@ -974,17 +974,39 @@ public FSDataOutputStream create(Path f, FsPermission permission,
     return new FSDataOutputStream(
         new S3ABlockOutputStream(this,
             destKey,
-            new SemaphoredDelegatingExecutor(boundedThreadPool,
-                blockOutputActiveBlocks, true),
-            progress,
+            createWriteOpContext(status, progress,
+                S3AWriteOpContext.DeleteParentPolicy.bulk),
             partSize,
             blockFactory,
-            instrumentation.newOutputStreamStatistics(statistics),
-            getWriteOperationHelper(),
             putTracker),
         null);
   }
 
+  /**
+   * Create the write operation context.
+   * @param status optional filesystem.
+   * @param progress optional progress callback.
+   * @param deleteParentPolicy
+   * @return the instance.
+   */
+  public S3AWriteOpContext createWriteOpContext(
+      final FileStatus status,
+      final Progressable progress,
+      S3AWriteOpContext.DeleteParentPolicy deleteParentPolicy) {
+    return new S3AWriteOpContext(
+        hasMetadataStore(),
+        invoker,
+        statistics,
+        instrumentation,
+        status,
+        deleteParentPolicy,
+        new SemaphoredDelegatingExecutor(boundedThreadPool,
+            blockOutputActiveBlocks, true),
+        progress,
+        instrumentation.newOutputStreamStatistics(statistics),
+        getWriteOperationHelper());
+  }
+  
 
 Review comment:
   whitespace:end of line
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message