public class StaticPartitionHandler extends AbstractPartitionHandler
PartitionHandler
which does
partitioning based on static grid size.Constructor and Description |
---|
StaticPartitionHandler()
Instantiates a new static partition handler.
|
StaticPartitionHandler(BatchYarnAppmaster batchAppmaster)
Instantiates a new static partition handler.
|
StaticPartitionHandler(BatchYarnAppmaster batchAppmaster,
int gridSize)
Instantiates a new static partition handler.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<org.springframework.batch.core.StepExecution> |
createSplits(org.springframework.batch.core.partition.StepExecutionSplitter stepSplitter,
org.springframework.batch.core.StepExecution stepExecution)
Creates the splits.
|
void |
setGridSize(int gridSize)
Passed to the
StepExecutionSplitter in the
AbstractPartitionHandler.handle(StepExecutionSplitter, StepExecution) method, instructing
it how many StepExecution instances are required, ideally. |
createRequestData, getKeySplitLocations, getStepName, handle, setBatchAppmaster, setKeySplitLocations, setStepName, setYarnAppmaster, waitCompleteState
public StaticPartitionHandler()
public StaticPartitionHandler(BatchYarnAppmaster batchAppmaster)
batchAppmaster
- the batch appmasterpublic StaticPartitionHandler(BatchYarnAppmaster batchAppmaster, int gridSize)
batchAppmaster
- the batch appmastergridSize
- the grid sizeprotected java.util.Set<org.springframework.batch.core.StepExecution> createSplits(org.springframework.batch.core.partition.StepExecutionSplitter stepSplitter, org.springframework.batch.core.StepExecution stepExecution) throws java.lang.Exception
AbstractPartitionHandler
createSplits
in class AbstractPartitionHandler
stepSplitter
- the step splitterstepExecution
- the step executionjava.lang.Exception
- the exceptionpublic void setGridSize(int gridSize)
StepExecutionSplitter
in the
AbstractPartitionHandler.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.gridSize
- the number of step executions that will be created