You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/02/03 00:51:35 UTC

[GitHub] [druid] loquisgon commented on a change in pull request #10837: Add log message when local input's filter does not match any files

loquisgon commented on a change in pull request #10837:
URL: https://github.com/apache/druid/pull/10837#discussion_r569033666



##########
File path: core/src/main/java/org/apache/druid/data/input/impl/LocalInputSource.java
##########
@@ -151,6 +154,16 @@ public int estimateNumSplits(InputFormat inputFormat, @Nullable SplitHintSpec sp
             )
         );
       }
+      Iterator<File> fileIterator = FileUtils.iterateFiles(
+          baseDir.getAbsoluteFile(),
+          fileFilter,
+          TrueFileFilter.INSTANCE
+      );
+      if (!fileIterator.hasNext()) {
+        // base dir & filter are guaranteed to be non-null here
+        // (by construction and non-null check of baseDir a few lines above):
+        log.info("Local inputSource filter [%s] for base dir [%s] did not match any files", filter, baseDir);
+      }
       return FileUtils.iterateFiles(

Review comment:
       Forgot to re-use fileIterator here, I will fix this.




----------------------------------------------------------------
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@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org