class PartitionStep extends AbstractStep {

	private StepExecutionSplitter stepExecutionSplitter;

	private PartitionHandler partitionHandler;

	private StepExecutionAggregator stepExecutionAggregator = new DefaultStepExecutionAggregator();

	/**
	 * A {@link PartitionHandler} which can send out step executions for remote processing
	 * and bring back the results.
	 * @param partitionHandler the {@link PartitionHandler} to set
	 */
	public void setPartitionHandler(PartitionHandler partitionHandler) {
		this.partitionHandler = partitionHandler;
	}

	/**
	 * A {@link StepExecutionAggregator} that can aggregate step executions when they come
	 * back from the handler. Defaults to a {@link DefaultStepExecutionAggregator}.
	 * @param stepExecutionAggregator the {@link StepExecutionAggregator} to set
	 */
	public void setStepExecutionAggregator(StepExecutionAggregator stepExecutionAggregator) {
		this.stepExecutionAggregator = stepExecutionAggregator;
	}

	/**
	 * Public setter for mandatory property {@link StepExecutionSplitter}.
	 * @param stepExecutionSplitter the {@link StepExecutionSplitter} to set
	 */
	public void setStepExecutionSplitter(StepExecutionSplitter stepExecutionSplitter) {
		this.stepExecutionSplitter = stepExecutionSplitter;
	}

	/**
	 * Assert that mandatory properties are set (stepExecutionSplitter, partitionHandler)
	 * and delegate top superclass.
	 *
	 * @see AbstractStep#afterPropertiesSet()
	 */
	@Override
	public void afterPropertiesSet() throws Exception {
		Assert.state(stepExecutionSplitter != null, "StepExecutionSplitter must be provided");
		Assert.state(partitionHandler != null, "PartitionHandler must be provided");
		super.afterPropertiesSet();
	}

	/**
	 * Delegate execution to the {@link PartitionHandler} provided. The
	 * {@link StepExecution} passed in here becomes the parent or manager execution for
	 * the partition, summarising the status on exit of the logical grouping of work
	 * carried out by the {@link PartitionHandler}. The individual step executions and
	 * their input parameters (through {@link ExecutionContext}) for the partition
	 * elements are provided by the {@link StepExecutionSplitter}.
	 * @param stepExecution the manager step execution for the partition
	 *
	 * @see Step#execute(StepExecution)
	 */
	@Override
	protected void doExecute(StepExecution stepExecution) throws Exception {<FILL_FUNCTION_BODY>}

	protected StepExecutionSplitter getStepExecutionSplitter() {
		return stepExecutionSplitter;
	}

	protected PartitionHandler getPartitionHandler() {
		return partitionHandler;
	}

}

		stepExecution.getExecutionContext().put(STEP_TYPE_KEY, this.getClass().getName());

		// Wait for task completion and then aggregate the results
		Collection<StepExecution> executions = partitionHandler.handle(stepExecutionSplitter, stepExecution);
		stepExecution.upgradeStatus(BatchStatus.COMPLETED);
		stepExecutionAggregator.aggregate(stepExecution, executions);

		// If anything failed or had a problem we need to crap out
		if (stepExecution.getStatus().isUnsuccessful()) {
			throw new JobExecutionException("Partition handler returned an unsuccessful step");
		}
	
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void afterPropertiesSet() throws java.lang.Exception,public final void execute(org.springframework.batch.core.StepExecution) throws org.springframework.batch.core.JobInterruptedException, org.springframework.batch.core.UnexpectedJobExecutionException,public java.lang.String getName() ,public int getStartLimit() ,public boolean isAllowStartIfComplete() ,public void registerStepExecutionListener(org.springframework.batch.core.StepExecutionListener) ,public void setAllowStartIfComplete(boolean) ,public void setBeanName(java.lang.String) ,public void setJobRepository(org.springframework.batch.core.repository.JobRepository) ,public void setMeterRegistry(io.micrometer.core.instrument.MeterRegistry) ,public void setName(java.lang.String) ,public void setObservationConvention(org.springframework.batch.core.observability.BatchStepObservationConvention) ,public void setObservationRegistry(io.micrometer.observation.ObservationRegistry) ,public void setStartLimit(int) ,public void setStepExecutionListeners(org.springframework.batch.core.StepExecutionListener[]) ,public java.lang.String toString() <variables>private boolean allowStartIfComplete,private org.springframework.batch.core.repository.JobRepository jobRepository,private static final org.apache.commons.logging.Log logger,private io.micrometer.core.instrument.MeterRegistry meterRegistry,private java.lang.String name,private org.springframework.batch.core.observability.BatchStepObservationConvention observationConvention,private io.micrometer.observation.ObservationRegistry observationRegistry,private int startLimit,private final org.springframework.batch.core.listener.CompositeStepExecutionListener stepExecutionListener