bipinprasad commented on a change in pull request #3249: [STORM-3624] Fix race 
condition when loading scheduler configs
URL: https://github.com/apache/storm/pull/3249#discussion_r409813913
 
 

 ##########
 File path: 
storm-server/src/main/java/org/apache/storm/scheduler/multitenant/MultitenantScheduler.java
 ##########
 @@ -30,20 +32,22 @@
     private static final Logger LOG = 
LoggerFactory.getLogger(MultitenantScheduler.class);
     protected IConfigLoader configLoader;
     private Map<String, Object> conf;
+    private SchedulerConfigCache<Map<String, Number>> schedulerConfigCache;
 
     @Override
     public void prepare(Map<String, Object> conf, StormMetricsRegistry 
metricsRegistry) {
         this.conf = conf;
         configLoader = ConfigLoaderFactoryService.createConfigLoader(conf);
-
+        schedulerConfigCache = new SchedulerConfigCache<>(conf, 
this::loadConfig);
 
 Review comment:
   Since SchedulerConfigCache is now just a wrapper around loadConfig() method, 
can the class be removed and loadConfig() be called directly at the beginning 
of schedule?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to