Ethanlm commented on a change in pull request #3320:
URL: https://github.com/apache/storm/pull/3320#discussion_r465756938
##########
File path: storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerState.java
##########
@@ -717,11 +719,19 @@ private Assignment getLocalAssignment(IStormClusterState
stormClusterState, Stri
IWaitStrategy backPressureWaitStrategy =
IWaitStrategy.createBackPressureWaitStrategy(topologyConf);
Map<List<Long>, JCQueue> receiveQueueMap = new HashMap<>();
+
for (List<Long> executor : executors) {
List<Integer> taskIds = StormCommon.executorIdToTasks(executor);
+ int taskId = taskIds.get(0);
+ String compId;
+ if (taskId == -1) {
Review comment:
I would use `SYSTEM_TASK_ID` instead of `-1`
##########
File path: storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerState.java
##########
@@ -186,6 +186,9 @@ public WorkerState(Map<String, Object> conf,
this.isWorkerActive = new CountDownLatch(1);
this.isTopologyActive = new AtomicBoolean(false);
this.stormComponentToDebug = new AtomicReference<>();
+ this.topology = ConfigUtils.readSupervisorTopology(conf, topologyId,
AdvancedFSOps.make(conf));
+ this.taskToComponent = StormCommon.stormTaskInfo(topology,
topologyConf);
+ // mkReceiveQueueMap relies on taskToComponent which relies on
topology above
Review comment:
I would change `mkReceiveQueueMap` method to include `taskToComponent`
parameter to make this relationship more obvious
----------------------------------------------------------------
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:
[email protected]