TEZ-1512. VertexImpl.getTask(int) can be CPU intensive when lots of tasks are present in the vertex