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

Contributed by Krzysztof Adamski.

Change-Id: I2746aabcfeb0fbb138a80b02c4d5bbf2a8cf75da
This commit is contained in:
Steve Loughran 2021-04-25 18:33:55 +01:00
parent fb71e6c91e
commit 8308aab658
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -673,7 +673,7 @@ public void testBulkCommitFiles() throws Throwable {
Path subdir = new Path(destDir, "subdir"); Path subdir = new Path(destDir, "subdir");
// file 2 // file 2
Path destFile2 = new Path(subdir, "file2"); Path destFile2 = new Path(subdir, "file2");
Path destFile3 = new Path(subdir, "file3"); Path destFile3 = new Path(subdir, "file3 with space");
List<Path> destinations = Lists.newArrayList(destFile1, destFile2, List<Path> destinations = Lists.newArrayList(destFile1, destFile2,
destFile3); destFile3);
List<SinglePendingCommit> commits = new ArrayList<>(3); List<SinglePendingCommit> commits = new ArrayList<>(3);