|
Spring for Apache Hadoop | ||||||||
| 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(org.apache.hadoop.conf.Configuration configuration)
Instantiates a new abstract splitter. |
|
| Method Summary | |
|---|---|
protected Split |
buildSplit(long start,
long length,
java.lang.String[] hosts)
Builds the split. |
protected long |
computeSplitSize(long blockSize,
long minSize,
long maxSize)
Compute split size. |
protected int |
getBlockIndex(org.apache.hadoop.fs.BlockLocation[] blocks,
long offset)
Gets the block index. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the hadoop configuration. |
abstract java.util.List<Split> |
getSplits(org.apache.hadoop.fs.Path path)
Gets the input splits for a Path. |
void |
setConfiguration(org.apache.hadoop.conf.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(org.apache.hadoop.conf.Configuration configuration)
configuration - the configuration| Method Detail |
|---|
public abstract java.util.List<Split> getSplits(org.apache.hadoop.fs.Path path)
throws java.io.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
java.io.IOException - Signals that an I/O exception has occurred.public org.apache.hadoop.conf.Configuration getConfiguration()
@Autowired(required=false) public void setConfiguration(org.apache.hadoop.conf.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(org.apache.hadoop.fs.BlockLocation[] blocks,
long offset)
blocks - the blk locationsoffset - the offset
java.lang.IllegalArgumentException - if offset is outside of blocks
protected Split buildSplit(long start,
long length,
java.lang.String[] hosts)
start - the startlength - the lengthhosts - the hosts
|
Spring for Apache Hadoop | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||