class FixedCountScheduler implements StageScheduler {

    @Override
    public ScheduleResult schedule()
    {
        OptionalInt totalPartitions = OptionalInt.of(partitionToNode.size());
        List<RemoteTask> newTasks = IntStream.range(0, partitionToNode.size())
                .mapToObj(partition -> taskScheduler.scheduleTask(partitionToNode.get(partition), partition, totalPartitions))
                .filter(Optional::isPresent)
                .map(Optional::get)
                .collect(toImmutableList());

        return new ScheduleResult(true, newTasks, 0);
    }

    public  FixedCountScheduler(SqlStageExecution stage, List<InternalNode> partitionToNode);
    @VisibleForTesting public  FixedCountScheduler(TaskScheduler taskScheduler, List<InternalNode> partitionToNode);

}