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