@Override
                public void onFailure(Throwable t) {
                  QueryIdentifier currentQueryIdentifier = amNodeInfo.getQueryIdentifier();
                  amNodeInfo.setAmFailed(true);
                  LOG.warn("Heartbeat failed to AM {}. Marking query as failed. query={}",
                    amNodeInfo.amNodeId, currentQueryIdentifier, t);
                  queryFailedHandler.queryFailed(currentQueryIdentifier);
                }
Responsible for communicating with various AMs.
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/AMReporter.java