Github user agresch commented on a diff in the pull request: https://github.com/apache/storm/pull/2630#discussion_r180803721 --- Diff: storm-server/src/main/java/org/apache/storm/scheduler/resource/ResourceAwareScheduler.java --- @@ -60,15 +122,33 @@ public void prepare(Map<String, Object> conf) { configLoader = ConfigLoaderFactoryService.createConfigLoader(conf); maxSchedulingAttempts = ObjectReader.getInt( conf.get(DaemonConfig.RESOURCE_AWARE_SCHEDULER_MAX_TOPOLOGY_SCHEDULING_ATTEMPTS), 5); + schedulingBackgroundTimeoutSeconds = ObjectReader.getInt( + conf.get(DaemonConfig.SCHEDULING_TIMEOUT_SECONDS_PER_TOPOLOGY), 600); + schedulingForegroundTimeoutSeconds = ObjectReader.getInt( + conf.get(DaemonConfig.SCHEDULING_FOREGROUND_TIMEOUT_SECONDS_PER_TOPOLOGY), 10); + background = + Executors.newCachedThreadPool(r -> new Thread(r, "RAS_WORKER_" + THREAD_COUNTER.getAndIncrement())); } @Override public Map<String, Map<String, Double>> config() { - return (Map) getUserResourcePools(); + return getUserResourcePools(); } @Override public void schedule(Topologies topologies, Cluster cluster) { + //Cancel any pending scheduling attempts for a topology that is no longer running. --- End diff -- call cancelAllPendingClusterStateChanged()? Rename it to cancelAllPending() or something?
---