void updateLlapServiceInstance(LlapServiceInstance serviceInstance, int numSchedulableTasksConf) {
      this.serviceInstance = serviceInstance;

      int numVcores = serviceInstance.getResource().getVirtualCores();
      int memoryPerInstance = serviceInstance.getResource().getMemory();
      int memoryPerExecutor = (int)(memoryPerInstance / (double) numVcores);
      resourcePerExecutor = Resource.newInstance(memoryPerExecutor, 1);

      int oldNumSchedulableTasks = numSchedulableTasks;
      if (numSchedulableTasksConf == 0) {
        int pendingQueueuCapacity = 0;
        String pendingQueueCapacityString = serviceInstance.getProperties()
                .get(LlapRegistryService.LLAP_DAEMON_TASK_SCHEDULER_ENABLED_WAIT_QUEUE_SIZE);
        if (pendingQueueCapacityString == null) {
          pendingQueueCapacityString = serviceInstance.getProperties()
                  .get(ConfVars.LLAP_DAEMON_TASK_SCHEDULER_WAIT_QUEUE_SIZE.varname);
        }
        LOG.info("Setting up node: {} with available capacity={}, pendingQueueSize={}, memory={}",
                serviceInstance, serviceInstance.getResource().getVirtualCores(),
                pendingQueueCapacityString, serviceInstance.getResource().getMemory());
        if (pendingQueueCapacityString != null) {
          pendingQueueuCapacity = Integer.parseInt(pendingQueueCapacityString);
        }
        this.numSchedulableTasks = numVcores + pendingQueueuCapacity;
      } else {
        this.numSchedulableTasks = numSchedulableTasksConf;
        LOG.info("Setting up node: " + serviceInstance + " with schedulableCapacity=" + this.numSchedulableTasks);
      }
      if (metrics != null) {
        metrics.incrSchedulableTasksCount(numSchedulableTasks - oldNumSchedulableTasks);
      }
      shortStringBase = setupShortStringBase();
    }
Create a NodeInfo bound to a service instance
 @param serviceInstance         the associated serviceInstance
@param blacklistConf           blacklist configuration
@param clock                   clock to use to obtain timing information
@param numSchedulableTasksConf number of schedulable tasks on the node. 0 represents auto
                               detect based on the serviceInstance, -1 indicates indicates
@param metrics
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java