|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.hadoop.store.split.AbstractSplitter
public abstract class AbstractSplitter
A base class for Splitter implementations.
| Constructor Summary | |
|---|---|
AbstractSplitter()
Instantiates a new abstract splitter. |
|
AbstractSplitter(Configuration configuration)
Instantiates a new abstract splitter. |
|
| Method Summary | |
|---|---|
protected Split |
buildSplit(long start,
long length,
String[] hosts)
Builds the split. |
protected long |
computeSplitSize(long blockSize,
long minSize,
long maxSize)
Compute split size. |
protected int |
getBlockIndex(BlockLocation[] blocks,
long offset)
Gets the block index. |
Configuration |
getConfiguration()
Gets the hadoop configuration. |
abstract List<Split> |
getSplits(Path path)
Gets the input splits for a Path. |
void |
setConfiguration(Configuration configuration)
Sets the configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractSplitter()
public AbstractSplitter(Configuration configuration)
configuration - the configuration| Method Detail |
|---|
public abstract List<Split> getSplits(Path path)
throws IOException
SplitterPath. A path needs to
be a resource which can be split into a list of splits. Actual
implementation will define if split is enforced to be a single
file or a collection of files.
getSplits in interface Splitterpath - the path
IOException - Signals that an I/O exception has occurred.public Configuration getConfiguration()
@Autowired(required=false) public void setConfiguration(Configuration configuration)
configuration - the new configuration
protected long computeSplitSize(long blockSize,
long minSize,
long maxSize)
blockSize - the block sizeminSize - the min sizemaxSize - the max size
protected int getBlockIndex(BlockLocation[] blocks,
long offset)
blocks - the blk locationsoffset - the offset
IllegalArgumentException - if offset is outside of blocks
protected Split buildSplit(long start,
long length,
String[] hosts)
start - the startlength - the lengthhosts - the hosts
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||