code: public boolean matchesAssignment(WorkerHeartbeat whb, Map<Integer, LocalAssignment> assignedTasks) {
          boolean isMatch = true;
          LocalAssignment localAssignment = assignedTasks.get(whb.getPort());
          if (localAssignment == null) {
              LOG.debug("Following worker has been removed, port=" + whb.getPort() + ", assignedTasks=" + assignedTasks);
              isMatch = false;
          } else if (!whb.getTopologyId().equals(localAssignment.getTopologyId())) {
              // topology id not equal
              LOG.info("topology id not equal whb=" + whb.getTopologyId() + ",localAssignment=" + localAssignment.getTopologyId());
              isMatch = false;
          }/*
            * else if (!(whb.getTaskIds().equals(localAssignment.getTaskIds()))) { // task-id isn't equal LOG.info("task-id isn't equal whb=" + whb.getTaskIds() +
            * ",localAssignment=" + localAssignment.getTaskIds()); isMatch = false; }
            */
  
          return isMatch;
      }
docs: check whether the worker heartbeat is allowed in the assignedTasks
  
  @param whb           WorkerHeartbeat
  @param assignedTasks assigned tasks
  @return if true, the assignments(LS-LOCAL-ASSIGNMENTS) match with worker heartbeat, false otherwise