|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.store.split.AbstractSplitter org.springframework.data.hadoop.store.split.SlopBlockSplitter
public class SlopBlockSplitter
A SlopBlockSplitter
is a Splitter
which
roughly splitting at least on block boundaries allowing
last block to be combined with previous if its size is
too small. Behaviour of how big this last block overflow
can be is controlled by a slop factor.
Default slop factor is 1.1 which allows last block to overflow by 10%.
Field Summary | |
---|---|
protected static double |
DEFAULT_SPLIT_SLOP
|
Constructor Summary | |
---|---|
SlopBlockSplitter()
Instantiates a new slop block splitter. |
|
SlopBlockSplitter(org.apache.hadoop.conf.Configuration configuration)
Instantiates a new slop block splitter. |
|
SlopBlockSplitter(org.apache.hadoop.conf.Configuration configuration,
long minSplitSize,
long maxSplitSize)
Instantiates a new slop block splitter. |
|
SlopBlockSplitter(org.apache.hadoop.conf.Configuration configuration,
long minSplitSize,
long maxSplitSize,
double slop)
Instantiates a new slop block splitter. |
Method Summary | |
---|---|
long |
getMaxSplitSize()
Gets the maximum split size. |
long |
getMinSplitSize()
Gets the minimum split size. |
java.util.List<Split> |
getSplits(org.apache.hadoop.fs.Path path)
Gets the input splits for a Path . |
void |
setMaxSplitSize(long maxSplitSize)
Sets the maximum split size. |
void |
setMinSplitSize(long minSplitSize)
Sets the minimum split size. |
void |
setSlop(double slop)
Sets the slop factor. |
Methods inherited from class org.springframework.data.hadoop.store.split.AbstractSplitter |
---|
buildSplit, computeSplitSize, getBlockIndex, getConfiguration, setConfiguration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final double DEFAULT_SPLIT_SLOP
Constructor Detail |
---|
public SlopBlockSplitter()
public SlopBlockSplitter(org.apache.hadoop.conf.Configuration configuration)
configuration
- the configurationpublic SlopBlockSplitter(org.apache.hadoop.conf.Configuration configuration, long minSplitSize, long maxSplitSize)
configuration
- the configurationminSplitSize
- the min split sizemaxSplitSize
- the max split sizepublic SlopBlockSplitter(org.apache.hadoop.conf.Configuration configuration, long minSplitSize, long maxSplitSize, double slop)
configuration
- the configurationminSplitSize
- the min split sizemaxSplitSize
- the max split sizeslop
- the slop factorMethod Detail |
---|
public java.util.List<Split> getSplits(org.apache.hadoop.fs.Path path) throws java.io.IOException
Splitter
Path
. 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 Splitter
getSplits
in class AbstractSplitter
path
- the path
java.io.IOException
- Signals that an I/O exception has occurred.public long getMinSplitSize()
public void setMinSplitSize(long minSplitSize)
minSplitSize
- the new minimum split sizepublic long getMaxSplitSize()
public void setMaxSplitSize(long maxSplitSize)
maxSplitSize
- the new maximum split sizepublic void setSlop(double slop)
slop
- the new slop factor
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |