private void registerAndAddNode(NodeInfo node, LlapServiceInstance serviceInstance) {
    if (communicator != null) {
      boolean registered = communicator
          .registerDag(node, new RegisterDagCallback(node, serviceInstance));
      if (!registered) {
        addNode(node, serviceInstance);
      }
    } else {
      addNode(node, serviceInstance);
    }
  }
@param request the list of preferred hosts. null implies any host
@return
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java