mcvsubbu commented on code in PR #9245:
URL: https://github.com/apache/pinot/pull/9245#discussion_r949709164


##########
pinot-spi/src/main/java/org/apache/pinot/spi/filesystem/PinotFS.java:
##########
@@ -144,6 +143,22 @@ boolean exists(URI fileUri)
   long length(URI fileUri)
       throws IOException;
 
+  /**
+   * Lists all the files and directories at the location provided.
+   * Lists recursively if {@code inputFilePattern} starts with "glob:**".
+   * Throws IOException if this abstract pathname is not valid, or if an I/O 
error occurs.
+   * @param fileUri location of file
+   * @return an array of strings that contains file paths
+   * @throws IOException on IO failure. See specific implementation
+   */
+  default String[] listFilesWithPattern(URI fileUri, String inputFilePattern)

Review Comment:
   +1, the default implementation should  be to throw an exception asking if 
you have permission from your mom doing this :) We have already fielded one 
security issue in this regard.
   
   Also, the API comments should clearly indicate that this is a potential 
security hole, and its usage is unsafe.



-- 
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-unsubscr...@pinot.apache.org

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


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

Reply via email to