walterddr commented on code in PR #9265:
URL: https://github.com/apache/pinot/pull/9265#discussion_r952943580


##########
pinot-spi/src/test/java/org/apache/pinot/spi/ingestion/batch/IngestionJobLauncherTest.java:
##########
@@ -48,6 +48,7 @@ public void testIngestionJobLauncherWithTemplate() {
         null, context, _defaultEnvironmentValues);
     Assert.assertEquals(spec.getInputDirURI(), 
"file:///path/to/input/2020/05/06");
     Assert.assertEquals(spec.getOutputDirURI(), 
"file:///path/to/output/2020/05/06");
+    Assert.assertFalse(spec.isSearchRecursively());

Review Comment:
   make a comment explicitly saying this is set to false in yaml config 
explicitly



##########
pinot-common/src/main/java/org/apache/pinot/common/segment/generation/SegmentGenerationUtils.java:
##########
@@ -229,4 +233,63 @@ private static String fetchUrl(URL url, String authToken)
     }
     return IOUtils.toString(connection.getInputStream(), 
StandardCharsets.UTF_8);
   }
+
+
+  /**
+   * Find matching files from root directory specified in fileUri.
+   * If includePattern and excludePattern are not null, get all the files that 
match includePattern and exclude files
+   * that match excludePattern.
+   * If
+   *
+   * @param pinotFs root directly fs
+   * @param fileUri root directly uri
+   * @param includePattern optional glob patterns for files to include
+   * @param excludePattern optional glob patterns for files to exclude
+   * @param searchRecrusively if ture, search files recursively from directory 
specified in fileUri
+   * @return list of matching files.
+   * @throws IOException on IO failure for list files in root directory.
+   * @throws URISyntaxException for matching file URIs
+   * @throws RuntimeException if there is no matching file.
+   */
+  public static List<String> listMatchedFilesWithRecursiveOption(PinotFS 
pinotFs, URI fileUri, String includePattern,

Review Comment:
   nice refactoring. this avoids duplicate code in many ingestion job runners



##########
pinot-spi/src/test/java/org/apache/pinot/spi/ingestion/batch/IngestionJobLauncherTest.java:
##########
@@ -56,6 +57,8 @@ public void 
testIngestionJobLauncherWithUnicodeCharForMultivalueFieldDelimiter()
         
GroovyTemplateUtils.class.getClassLoader().getResource("ingestion_job_spec_unicode.yaml").getFile(),
 null,
         null, null);
     Assert.assertEquals("\ufff0", 
spec.getRecordReaderSpec().getConfigs().get("multiValueDelimiter"));
+    // searchRecursively is set to false by default.
+    Assert.assertTrue(spec.isSearchRecursively());

Review Comment:
   the comment doesn't match code



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to