public abstract class AbstractPartitioner extends 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 Map<String,ExecutionContext> |
createPartitions()
Creates the
ExecutionContexts for partitions. |
Configuration |
getConfiguration()
Gets the hadoop configuration.
|
String |
getKeyFileName()
Gets the key for a file name.
|
String |
getKeySplitLength()
Gets the key for split length.
|
String |
getKeySplitLocations()
Gets the key for split locations.
|
String |
getKeySplitStart()
Gets the key for split start.
|
String |
getPartitionBaseIdentifier()
Gets the partition base identifier.
|
Map<String,ExecutionContext> |
partition(int gridSize) |
void |
setConfiguration(Configuration configuration)
Sets the hadoop configuration.
|
void |
setKeyFileName(String keyFileName)
The name of the key for the file name in each
ExecutionContext. |
void |
setKeySplitLength(String keySplitLength)
The name of the key for the file split length in each
ExecutionContext. |
void |
setKeySplitLocations(String keySplitLocations)
The name of the key for the split locations in each
ExecutionContext. |
void |
setKeySplitStart(String keySplitStart)
The name of the key for the file split start in each
ExecutionContext. |
void |
setPartitionBaseIdentifier(String keyPartition)
The name of the base key for identifying partition's
ExecutionContext. |
public Map<String,ExecutionContext> partition(int gridSize)
partition in interface Partitionerpublic void setPartitionBaseIdentifier(String keyPartition)
ExecutionContext.
Defaults to "partition".keyPartition - the value of the keypublic String getPartitionBaseIdentifier()
public void setKeyFileName(String keyFileName)
ExecutionContext.
Defaults to "fileName".keyFileName - the value of the keypublic String getKeyFileName()
public void setKeySplitStart(String keySplitStart)
ExecutionContext.
Defaults to "splitStart".keySplitStart - the value of the keypublic String getKeySplitStart()
public void setKeySplitLength(String keySplitLength)
ExecutionContext.
Defaults to "splitLength".keySplitLength - the value of the keypublic String getKeySplitLength()
public void setKeySplitLocations(String keySplitLocations)
ExecutionContext.
Defaults to "splitLocations".keySplitLocations - the value of the keypublic String getKeySplitLocations()
@Autowired(required=false) public void setConfiguration(Configuration configuration)
configuration - the new hadoop configurationpublic Configuration getConfiguration()
protected abstract Map<String,ExecutionContext> createPartitions()
ExecutionContexts for partitions.ExecutionContexts for partitionsprotected ExecutionContext createExecutionContext(Resource resource, org.springframework.data.hadoop.store.split.Split split) throws IOException
resource - the resourcesplit - the splitIOException - Signals that an I/O exception has occurred.protected ExecutionContext createExecutionContext(Path path, org.springframework.data.hadoop.store.split.Split split) throws IOException
path - the pathsplit - the splitIOException - Signals that an I/O exception has occurred.