private static int vertexNum(TaskInfo taskInfo) {
    return taskInfo.getAttemptId().getTaskID().getVertexID().getId(); // Sigh...
  }
Should cycle when:
 1. There are available Resources OR
 2. There is a pending task with higher pri than running ones
@param availableHostMap
@return
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java