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 2022/08/02 19:08:40 UTC

[GitHub] [druid] gianm commented on a diff in pull request #12816: Tidy up construction of the Guice Injectors

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


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/HadoopTask.java:
##########
@@ -48,13 +49,11 @@
 public abstract class HadoopTask extends AbstractBatchIndexTask
 {
   private static final Logger log = new Logger(HadoopTask.class);
-  private static final ExtensionsConfig EXTENSIONS_CONFIG;
-
-  static final Injector INJECTOR = GuiceInjectors.makeStartupInjector();
 
-  static {
-    EXTENSIONS_CONFIG = INJECTOR.getInstance(ExtensionsConfig.class);
-  }
+  // Note: static variables mean that this task cannot run in a shared JVM,

Review Comment:
   Yeah, the HadoopTask is done in a weird way. But I was asking if anything bad happens due to sharing the statics between different tasks. The comment makes it sound like something will break, but I can't tell what it is.



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