You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/03/06 03:36:28 UTC

[GitHub] [hadoop] ajfabbri commented on a change in pull request #1679: HDFS-13934. Multipart uploaders to be created through FileSystem/FileContext.

ajfabbri commented on a change in pull request #1679: HDFS-13934. Multipart uploaders to be created through FileSystem/FileContext.
URL: https://github.com/apache/hadoop/pull/1679#discussion_r388676922
 
 

 ##########
 File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/FileSystemMultipartUploader.java
 ##########
 @@ -106,17 +165,30 @@ private PathHandle getPathHandle(Path filePath) throws IOException {
 
   private long totalPartsLen(List<Path> partHandles) throws IOException {
     long totalLen = 0;
-    for (Path p: partHandles) {
+    for (Path p : partHandles) {
       totalLen += fs.getFileStatus(p).getLen();
     }
     return totalLen;
   }
 
   @Override
-  @SuppressWarnings("deprecation") // rename w/ OVERWRITE
-  public PathHandle complete(Path filePath, Map<Integer, PartHandle> handleMap,
+  public CompletableFuture<PathHandle> complete(
+      UploadHandle uploadId,
+      Path filePath,
+      Map<Integer, PartHandle> handleMap) throws IOException {
+
+    checkPath(filePath);
+    return FutureIOSupport.eval(() ->
+        innerComplete(filePath, handleMap, uploadId));
+  }
+
+  public PathHandle innerComplete(
+      Path filePath,
+      Map<Integer, PartHandle> handleMap,
       UploadHandle multipartUploadId) throws IOException {
 
+    checkPath(filePath);
 
 Review comment:
   The caller already did this.

----------------------------------------------------------------
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:
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