checkArgument(initialHashPartitions > 0, "initialHashPartitions must be greater than 0");
checkArgument(maxPendingSplitsPerNode > 0, "maxPendingSplitsPerNode must be greater than 0");
checkNotNull(executor, "executor is null");
this.stageId = new StageId(queryId, String.valueOf(nextStageId.getAndIncrement()));
try (SetThreadName setThreadName = new SetThreadName("Stage-%s", stageId)) {
this.parent = parent;
this.location = locationFactory.createStageLocation(stageId);
this.fragment = plan.getFragment();
this.outputReceivers = plan.getOutputReceivers();
this.dataSource = plan.getDataSource();