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

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

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


##########
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:
   Thanks for your suggestion. I add class `HdfsStorageAvailabilityChecker`.



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