public <T> void startUpdateGuaranteed(TezTaskAttemptID attemptId, NodeInfo assignedNode,
      boolean newState, final OperationCallback<Boolean, T> callback, final T ctx) {
    LlapNodeId nodeId = entityTracker.getNodeIdForTaskAttempt(attemptId);
    if (nodeId == null) {
      if (assignedNode != null) {
        nodeId = LlapNodeId.getInstance(assignedNode.getHost(), assignedNode.getRpcPort());
      }
      LOG.warn("Untracked node for " + attemptId + "; NodeInfo points to " + nodeId);
      if (nodeId == null) {
        callback.setDone(ctx, false); // TODO: danger of stack overflow... needs a retry limit?
        return;
      }
    }
    UpdateFragmentRequestProto request = UpdateFragmentRequestProto.newBuilder()
        .setIsGuaranteed(newState).setFragmentIdentifierString(attemptId.toString())
        .setQueryIdentifier(constructQueryIdentifierProto(
            attemptId.getDAGID().getId())).build();

    communicator.sendUpdateFragment(request, nodeId.getHostname(), nodeId.getPort(),
        new LlapProtocolClientProxy.ExecuteRequestCallback<UpdateFragmentResponseProto>() {
          @Override
          public void setResponse(UpdateFragmentResponseProto response) {
            callback.setDone(ctx, response.getResult());
          }

          @Override
          public void indicateError(Throwable t) {
            LOG.warn("Failed to send update fragment request for {}", attemptId.toString());
            processSendError(t);
            callback.setError(ctx, t);
          }
        });
  }
@param node
@param callback
@return if it was possible to attempt the registration. Sometimes it's
not possible because is a dag is not running
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java