partitionIndex = i;
}
AbstractRunner<StepContextImpl> runner1;
StepContextImpl stepContext1 = batchContext.clone();
Step step1 = stepContext1.getStep();
PropertyResolver resolver = new PropertyResolver();
if (partitionIndex >= 0 && partitionIndex < partitionProperties.length) {
resolver.setPartitionPlanProperties(partitionProperties[partitionIndex]);
//associate this chunk represeted by this StepExecutionImpl with this partition properties index. If this
//partition fails or is stopped, the restart process can select this partition properties.
stepContext1.getStepExecution().addPartitionPropertiesIndex(partitionIndex);
}
resolver.setResolvePartitionPlanProperties(true);
resolver.resolve(step1);
if (isRestart && !isOverride) {
List<Serializable> partitionPersistentUserData = stepExecution.getPartitionPersistentUserData();
if (partitionPersistentUserData != null) {
stepContext1.setPersistentUserData(partitionPersistentUserData.get(i));
}
List<Serializable> partitionReaderCheckpointInfo = stepExecution.getPartitionReaderCheckpointInfo();
if (partitionReaderCheckpointInfo != null) {
stepContext1.getStepExecution().setReaderCheckpointInfo(partitionReaderCheckpointInfo.get(i));
}
List<Serializable> partitionWriterCheckpointInfo = stepExecution.getPartitionWriterCheckpointInfo();
if (partitionWriterCheckpointInfo != null) {
stepContext1.getStepExecution().setWriterCheckpointInfo(partitionWriterCheckpointInfo.get(i));
}
}
if (isRestart && isOverride && reducer != null) {
reducer.rollbackPartitionedStep();
}
Chunk ch = step1.getChunk();
if (ch == null) {
runner1 = new BatchletRunner(stepContext1, enclosingRunner, this, step1.getBatchlet());
} else {
runner1 = new ChunkRunner(stepContext1, enclosingRunner, this, ch);
}
if (i >= numOfThreads) {
completedPartitionThreads.take();