public void awaitTotalTaskAllocations(int numTasks) throws InterruptedException {
      while (true) {
        signalSchedulerRun();
        awaitSchedulerRun();
        if (ts.dagStats.getNumTotalAllocations() == numTasks) {
          break;
        }
      }
    }
@param timeoutMs
@return false if the time elapsed
@throws InterruptedException
llap-tez/src/test/org/apache/hadoop/hive/llap/tezplugins/TestLlapTaskSchedulerService.java