org.springframework.yarn.batch.partition
Class StaticBatchPartitionHandler
java.lang.Object
org.springframework.yarn.batch.partition.AbstractBatchPartitionHandler
org.springframework.yarn.batch.partition.StaticBatchPartitionHandler
- All Implemented Interfaces:
- org.springframework.batch.core.partition.PartitionHandler
public class StaticBatchPartitionHandler
- extends AbstractBatchPartitionHandler
Implementation of Spring Batch PartitionHandler
which does
partitioning based on static grid size.
- Author:
- Janne Valkealahti
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticBatchPartitionHandler
public StaticBatchPartitionHandler(AbstractBatchAppmaster batchAppmaster)
- Instantiates a new static batch partition handler.
- Parameters:
batchAppmaster
- the batch appmaster
StaticBatchPartitionHandler
public StaticBatchPartitionHandler(AbstractBatchAppmaster batchAppmaster,
int gridSize)
- Instantiates a new static batch partition handler.
- Parameters:
batchAppmaster
- the batch appmastergridSize
- the grid size
setGridSize
public void setGridSize(int gridSize)
- Passed to the
StepExecutionSplitter
in the
AbstractBatchPartitionHandler.handle(StepExecutionSplitter, StepExecution)
method, instructing
it how many StepExecution
instances are required, ideally. The
StepExecutionSplitter
is allowed to ignore the grid size in the
case of a restart, since the input data partitions must be preserved.
- Parameters:
gridSize
- the number of step executions that will be created
createStepExecutionSplits
protected java.util.Set<org.springframework.batch.core.StepExecution> createStepExecutionSplits(org.springframework.batch.core.partition.StepExecutionSplitter stepSplitter,
org.springframework.batch.core.StepExecution stepExecution)
throws java.lang.Exception
- Specified by:
createStepExecutionSplits
in class AbstractBatchPartitionHandler
- Throws:
java.lang.Exception