void unregisterTaskAttempt(TezTaskAttemptID attemptId) {
      uniqueNodeMap.remove(attemptId);
      LlapNodeId llapNodeId;
      synchronized (attemptToNodeMap) {
        llapNodeId = attemptToNodeMap.remove(attemptId);
        if (llapNodeId == null) {
          // Possible since either container / task can be unregistered.
          return;
        }
      }

      BiMap<ContainerId, TezTaskAttemptID> bMap = nodeMap.get(llapNodeId);
      ContainerId matched = null;
      if (bMap != null) {
        synchronized(bMap) {
          matched = bMap.inverse().remove(attemptId);
        }
        if (bMap.isEmpty()) {
          nodeMap.remove(llapNodeId);
        }
      }

      // Remove the container mapping
      if (matched != null) {
        containerToNodeMap.remove(matched);
      }

    }
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