You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/09/19 20:49:40 UTC

[GitHub] [pinot] jackjlli commented on a diff in pull request #9426: Allow spaces in input file paths

jackjlli commented on code in PR #9426:
URL: https://github.com/apache/pinot/pull/9426#discussion_r974676100


##########
pinot-common/src/main/java/org/apache/pinot/common/segment/generation/SegmentGenerationUtils.java:
##########
@@ -162,7 +163,7 @@ public static URI getRelativeOutputPath(URI baseInputDir, URI inputFile, URI out
         "Unable to extract out the relative path for input file '" + inputFile + "', based on base input path: "
             + baseInputDir);
     String outputDirStr = outputDir.toString();
-    outputDir = !outputDirStr.endsWith("/") ? URI.create(outputDirStr.concat("/")) : outputDir;
+    outputDir = !outputDirStr.endsWith("/") ? URI.create(sanitizeURIString(outputDirStr.concat("/"))) : outputDir;

Review Comment:
   nit: should we invoke `sanitizeURIString()` method in Line 165 instead?



##########
pinot-common/src/main/java/org/apache/pinot/common/segment/generation/SegmentGenerationUtils.java:
##########
@@ -275,11 +287,11 @@ public static List<String> listMatchedFilesWithRecursiveOption(PinotFS pinotFs,
           continue;
         }
       }
-      if (!pinotFs.isDirectory(new URI(file))) {
+      if (!pinotFs.isDirectory(new URI(sanitizeURIString(file)))) {

Review Comment:
   nit: should we invoke `sanitizeURIString()` method right after Line 279?



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

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org