Github user agresch commented on a diff in the pull request:
https://github.com/apache/storm/pull/2881#discussion_r228287568
--- Diff:
storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerState.java ---
@@ -622,22 +624,26 @@ public boolean areAllConnectionsReady() {
return this.autoCredentials;
}
- private List<List<Long>> readWorkerExecutors(IStormClusterState
stormClusterState, String topologyId, String assignmentId,
+ private List<List<Long>> readWorkerExecutors(IStormClusterState
stormClusterState,
+ String topologyId, String
assignmentId,
int port) {
LOG.info("Reading assignments");
List<List<Long>> executorsAssignedToThisWorker = new ArrayList<>();
executorsAssignedToThisWorker.add(Constants.SYSTEM_EXECUTOR_ID);
- Map<List<Long>, NodeInfo> executorToNodePort =
getLocalAssignment(conf, stormClusterState,
topologyId).get_executor_node_port();
+ Map<List<Long>, NodeInfo> executorToNodePort =
+ getLocalAssignment(conf, stormClusterState,
topologyId).get_executor_node_port();
for (Map.Entry<List<Long>, NodeInfo> entry :
executorToNodePort.entrySet()) {
NodeInfo nodeInfo = entry.getValue();
- if (nodeInfo.get_node().equals(assignmentId) &&
nodeInfo.get_port().iterator().next() == port) {
+ if (nodeInfo.get_node().startsWith(assignmentId) &&
nodeInfo.get_port().iterator().next() == port) {
--- End diff --
Started a new / non-resolved conversation.....
Can we have assignment id = supervisor1 and another assignment id =
supervisor11 that would cause aliasing?
Instead of startsWith, can we use some known delimiter to grab up to and
make sure that matches exactly?
---