@Override
  public synchronized void registerTask(RuntimeTask task,
                                        ErrorReporter errorReporter) {
    TezCounters tezCounters = task.addAndGetTezCounter(fragmentId);
    FragmentCountersMap.registerCountersForFragment(fragmentId, tezCounters);
    LOG.info("Registered counters for fragment: {} vertexName: {}", fragmentId, task.getVertexName());
    currentCallable = new HeartbeatCallable(completionListener, task, umbilical, pollInterval,
        sendCounterInterval, maxEventsToGet, requestCounter, containerIdStr, initialEvent,
        fragmentRequestId, wmCounters);
    ListenableFuture<Boolean> future = heartbeatExecutor.submit(currentCallable);
    Futures.addCallback(future, new HeartbeatCallback(errorReporter), MoreExecutors.directExecutor());
  }
Register a task to be tracked. Heartbeats will be sent out for this task to fetch events, etc.
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/LlapTaskReporter.java