Browse Source

HADOOP-17112. S3A committers can't handle whitespace in paths. (#2953)

Contributed by Krzysztof Adamski.

(cherry picked from commit 88a550bc3a73dbbbfb35e2ef29d9c34ad059d1a8)

 Conflicts:
	hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/ITestCommitOperations.java

(cherry picked from commit adfd767225b6d65e40d3511a32dbf72649041d94)
Steve Loughran 4 years ago
parent
commit
a8f08410d4

+ 1 - 1
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/commit/CommitOperations.java

@@ -431,7 +431,7 @@ public class CommitOperations {
     if (!localFile.isFile()) {
       throw new FileNotFoundException("Not a file: " + localFile);
     }
-    String destURI = destPath.toString();
+    String destURI = destPath.toUri().toString();
     String destKey = fs.pathToKey(destPath);
     String uploadId = null;