You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "gianm (via GitHub)" <gi...@apache.org> on 2023/05/24 01:51:35 UTC

[GitHub] [druid] gianm commented on a diff in pull request #14276: fix hdfs initialization issue

gianm commented on code in PR #14276:
URL: https://github.com/apache/druid/pull/14276#discussion_r1203291921


##########
extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsStorageDruidModule.java:
##########
@@ -91,7 +92,15 @@ public void configure(Binder binder)
     ClassLoader currCtxCl = Thread.currentThread().getContextClassLoader();
     try {
       Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-      FileSystem.get(conf);
+      FileSystem fs = FileSystem.get(conf);
+
+      // If cache is enabled, need to check the FileSystem object by access hdfs because FileSystem object will be used later, like in push stage.
+      // If FileSystem is invalid, the peon task should stop immediately.
+      // See https://github.com/apache/druid/pull/14276
+      boolean disableCache = conf.getBoolean("fs.hdfs.impl.disable.cache", false);

Review Comment:
   This is going to do the verification at binding time. IMO, ideally it would happen at start time, so we can separate binding errors from runtime errors. Would it work to move this validation into a start handler?
   
   You can use a technique similar to `HdfsStorageAuthentication`, which does kerberos authentication at start time.



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

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