public void registerTaskSubmittedToNode(
        TezTaskAttemptID taskAttemptID, String uniqueNodeId) {
      synchronized (attemptToNodeMap) {
        if (attemptToNodeMap.containsKey(taskAttemptID)) {
          // Register only if the attempt is known. In case an unregister call
          // came in before the register call.
          String prev = uniqueNodeMap.putIfAbsent(taskAttemptID, uniqueNodeId);
          if (prev != null) {
            LOG.warn("Replaced the unique node mapping for task from " + prev +
                " to " + uniqueNodeId);
          }
        }
      }
    }
Track the association between known containers and taskAttempts, along with the nodes they are assigned to.
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java