You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by danny0405 <gi...@git.apache.org> on 2018/05/08 09:19:34 UTC
[GitHub] storm pull request #2647: STORM-3040: Improve scheduler performance
Github user danny0405 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2647#discussion_r186665266
--- Diff: storm-server/src/main/java/org/apache/storm/scheduler/Cluster.java ---
@@ -48,6 +49,9 @@
public class Cluster implements ISchedulingState {
private static final Logger LOG = LoggerFactory.getLogger(Cluster.class);
+ private static final Function<String, Set<WorkerSlot>> MAKE_SET = (x) -> new HashSet<>();
+ private static final Function<String, Map<WorkerSlot, NormalizedResourceRequest>> MAKE_MAP = (x) -> new HashMap<>();
--- End diff --
HashSet is ok for now single daemon scheduling, we may make it thread safe when we want to support parallel scheduling, so can we add a comment about thread safe here?
---