public abstract class AbstractPartitioner extends java.lang.Object implements Partitioner
Partitioner.| Constructor and Description |
|---|
AbstractPartitioner() |
| Modifier and Type | Method and Description |
|---|---|
protected ExecutionContext |
createExecutionContext(Path path,
org.springframework.data.hadoop.store.split.Split split)
Creates the execution context.
|
protected ExecutionContext |
createExecutionContext(Resource resource,
org.springframework.data.hadoop.store.split.Split split)
Creates the execution context.
|
protected abstract java.util.Map<java.lang.String,ExecutionContext> |
createPartitions()
Creates the
ExecutionContexts for partitions. |
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,ExecutionContext> |
partition(int gridSize) |
void |
setConfiguration(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. |
public java.util.Map<java.lang.String,ExecutionContext> partition(int gridSize)
partition in interface 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(Configuration configuration)
configuration - the new hadoop configurationpublic Configuration getConfiguration()
protected abstract java.util.Map<java.lang.String,ExecutionContext> createPartitions()
ExecutionContexts for partitions.ExecutionContexts for partitionsprotected ExecutionContext createExecutionContext(Resource resource, org.springframework.data.hadoop.store.split.Split split) throws java.io.IOException
resource - the resourcesplit - the splitjava.io.IOException - Signals that an I/O exception has occurred.protected ExecutionContext createExecutionContext(Path path, org.springframework.data.hadoop.store.split.Split split) throws java.io.IOException
path - the pathsplit - the splitjava.io.IOException - Signals that an I/O exception has occurred.