public class SplitterPartitionHandler extends AbstractPartitionHandler
PartitionHandler
which does
partitioning based on number of input files from HDFS.Constructor and Description |
---|
SplitterPartitionHandler()
Instantiates a new splitter partition handler.
|
SplitterPartitionHandler(AbstractBatchAppmaster batchAppmaster)
Instantiates a new splitter partition handler.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<org.springframework.batch.core.StepExecution,ContainerRequestHint> |
createRequestData(java.util.Set<org.springframework.batch.core.StepExecution> stepExecutions)
Subclass may override this method to assign a specific
ContainerRequestHint to
a StepExecution . |
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.
|
getKeySplitLocations, getStepName, handle, setBatchAppmaster, setKeySplitLocations, setStepName, setYarnAppmaster, waitCompleteState
public SplitterPartitionHandler()
public SplitterPartitionHandler(AbstractBatchAppmaster batchAppmaster)
batchAppmaster
- the batch appmasterprotected 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 exceptionprotected java.util.Map<org.springframework.batch.core.StepExecution,ContainerRequestHint> createRequestData(java.util.Set<org.springframework.batch.core.StepExecution> stepExecutions) throws java.lang.Exception
AbstractPartitionHandler
ContainerRequestHint
to
a StepExecution
. This would be needed in cases where step should be executed
in a specific host or rack considering data locality.
Default implementation returns an empty map.
createRequestData
in class AbstractPartitionHandler
stepExecutions
- Set of step executionsjava.lang.Exception
- If error occurred