|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.batch.partition.AbstractPartitioner
public abstract class AbstractPartitioner
Base class providing share functionality for batch Partitioner.
| Constructor Summary | |
|---|---|
AbstractPartitioner()
|
|
| Method Summary | |
|---|---|
protected org.springframework.batch.item.ExecutionContext |
createExecutionContext(org.apache.hadoop.fs.Path path,
Split split)
Creates the execution context. |
protected org.springframework.batch.item.ExecutionContext |
createExecutionContext(org.springframework.core.io.Resource resource,
Split split)
Creates the execution context. |
protected abstract java.util.Map<java.lang.String,org.springframework.batch.item.ExecutionContext> |
createPartitions()
Creates the ExecutionContexts for partitions. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the hadoop configuration. |
java.lang.String |
getKeyFileName()
Gets the key for a file name. |
java.lang.String |
getKeySplitLength()
Gets the key for split length. |
java.lang.String |
getKeySplitLocations()
Gets the key for split locations. |
java.lang.String |
getKeySplitStart()
Gets the key for split start. |
java.lang.String |
getPartitionBaseIdentifier()
Gets the partition base identifier. |
java.util.Map<java.lang.String,org.springframework.batch.item.ExecutionContext> |
partition(int gridSize)
|
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the hadoop configuration. |
void |
setKeyFileName(java.lang.String keyFileName)
The name of the key for the file name in each ExecutionContext. |
void |
setKeySplitLength(java.lang.String keySplitLength)
The name of the key for the file split length in each ExecutionContext. |
void |
setKeySplitLocations(java.lang.String keySplitLocations)
The name of the key for the split locations in each ExecutionContext. |
void |
setKeySplitStart(java.lang.String keySplitStart)
The name of the key for the file split start in each ExecutionContext. |
void |
setPartitionBaseIdentifier(java.lang.String keyPartition)
The name of the base key for identifying partition's ExecutionContext. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPartitioner()
| Method Detail |
|---|
public java.util.Map<java.lang.String,org.springframework.batch.item.ExecutionContext> partition(int gridSize)
partition in interface org.springframework.batch.core.partition.support.Partitionerpublic void setPartitionBaseIdentifier(java.lang.String keyPartition)
ExecutionContext.
Defaults to "partition".
keyPartition - the value of the keypublic java.lang.String getPartitionBaseIdentifier()
public void setKeyFileName(java.lang.String keyFileName)
ExecutionContext.
Defaults to "fileName".
keyFileName - the value of the keypublic java.lang.String getKeyFileName()
public void setKeySplitStart(java.lang.String keySplitStart)
ExecutionContext.
Defaults to "splitStart".
keySplitStart - the value of the keypublic java.lang.String getKeySplitStart()
public void setKeySplitLength(java.lang.String keySplitLength)
ExecutionContext.
Defaults to "splitLength".
keySplitLength - the value of the keypublic java.lang.String getKeySplitLength()
public void setKeySplitLocations(java.lang.String keySplitLocations)
ExecutionContext.
Defaults to "splitLocations".
keySplitLocations - the value of the keypublic java.lang.String getKeySplitLocations()
@Autowired(required=false) public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration - the new hadoop configurationpublic org.apache.hadoop.conf.Configuration getConfiguration()
protected abstract java.util.Map<java.lang.String,org.springframework.batch.item.ExecutionContext> createPartitions()
ExecutionContexts for partitions.
ExecutionContexts for partitions
protected org.springframework.batch.item.ExecutionContext createExecutionContext(org.springframework.core.io.Resource resource,
Split split)
throws java.io.IOException
resource - the resourcesplit - the split
java.io.IOException - Signals that an I/O exception has occurred.
protected org.springframework.batch.item.ExecutionContext createExecutionContext(org.apache.hadoop.fs.Path path,
Split split)
throws java.io.IOException
path - the pathsplit - the split
java.io.IOException - Signals that an I/O exception has occurred.
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||