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 2020/08/18 17:27:51 UTC

[GitHub] [incubator-pinot] kishoreg commented on a change in pull request #5890: Fix gcsFS copyToLocal to precreate local destination directory

kishoreg commented on a change in pull request #5890:
URL: https://github.com/apache/incubator-pinot/pull/5890#discussion_r472362632



##########
File path: pinot-plugins/pinot-file-system/pinot-gcs/src/main/java/org/apache/pinot/plugin/filesystem/GcsPinotFS.java
##########
@@ -325,6 +326,7 @@ public long length(URI fileUri) throws IOException {
   @Override
   public void copyToLocalFile(URI srcUri, File dstFile) throws Exception {
     LOGGER.info("Copy {} to local {}", srcUri, dstFile.getAbsolutePath());
+    FileUtils.forceMkdir(dstFile.getParentFile());

Review comment:
       should we check the existence before creating? will forceMkdir throw an exception if the directory exists?




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

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