public void unregisterTask(String amLocation, int port, QueryIdentifier queryIdentifier, TezTaskAttemptID ta) {

    if (LOG.isTraceEnabled()) {
      LOG.trace("Un-registering for heartbeat: {}, attempt={}", (amLocation + ":" + port), ta);
    }
    AMNodeInfo amNodeInfo;
    synchronized (knownAppMasters) {
      amNodeInfo = getAMNodeInfo(amLocation, port, queryIdentifier);
      if (amNodeInfo == null) {
        LOG.info(("Ignoring duplicate unregisterRequest for am at: " + amLocation + ":" + port));
      } else {
        amNodeInfo.removeTaskAttempt(ta);
      }
      // Not removing this here. Will be removed when taken off the queue and discovered to have 0
      // pending tasks.
    }
  }
Responsible for communicating with various AMs.
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/AMReporter.java