@Override
          public void indicateError(Throwable t) {

            // Re-attempts are left upto the RPC layer. If there's a failure reported after this,
            // mark all attempts running on this node as KILLED. The node itself cannot be killed from
            // here, that's only possible via the scheduler.
            // The assumption is that if there's a failure to communicate with the node - it will
            // eventually timeout - and no more tasks will be allocated on it.

            LOG.error("Failed to send state update to node: {}, Killing all attempts running on "
                + "node. Attempted StateUpdate={}", nodeId, request, t);
            processSendError(t);
            BiMap<ContainerId, TezTaskAttemptID> biMap =
                entityTracker.getContainerAttemptMapForNode(nodeId);
            if (biMap != null) {
              synchronized (biMap) {
                for (Map.Entry<ContainerId, TezTaskAttemptID> entry : biMap.entrySet()) {
                  LOG.info(
                      "Sending a kill for attempt {}, due to a communication failure while sending a finishable state update",
                      entry.getValue());
                  getContext().taskKilled(entry.getValue(), TaskAttemptEndReason.NODE_FAILED,
                      "Failed to send finishable state update to node " + nodeId);
                }
              }
            }
          }
This is a best effort action in case of an invalid LLAP_TOKEN. The communicator (LlapProtocolClientProxy) periodically
refreshes tokens, but there is a relatively small time window (compared to the whole token maxLifetime),
when the token is cancelled and it's not yet fetched from daemons. By the time we detect this problem, the current
task attempt is already failed, but usually there are at least 3 task attempts before failing the task and dag, therefore
fetching an LLAP_TOKEN synchronously here definitely solves the invalid token problem (as the next task attempt will use it).
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java