public class StaticBlockSplitter extends SlopBlockSplitter
StaticBlockSplitter
is a Splitter
handling
splits as relative of block sizes allowing to furthern split
blocks on a smaller chunks.
Having zero blocks means a split happens on a full block sizes, furthermore using a splits sizes higher than zero simply means how many times block is split. One simple means two splits for a block, two means three splits for a block, etc.
DEFAULT_SPLIT_SLOP
Constructor and Description |
---|
StaticBlockSplitter()
Instantiates a new static block splitter.
|
StaticBlockSplitter(org.apache.hadoop.conf.Configuration configuration)
Instantiates a new static block splitter.
|
StaticBlockSplitter(org.apache.hadoop.conf.Configuration configuration,
int splits)
Instantiates a new static block splitter.
|
Modifier and Type | Method and Description |
---|---|
protected long |
computeSplitSize(long blockSize,
long minSize,
long maxSize)
Compute split size.
|
void |
setSplits(int splits)
Sets the splits count.
|
getMaxSplitSize, getMinSplitSize, getSplits, setMaxSplitSize, setMinSplitSize, setSlop
buildSplit, getBlockIndex, getConfiguration, setConfiguration
public StaticBlockSplitter()
public StaticBlockSplitter(org.apache.hadoop.conf.Configuration configuration)
configuration
- the configurationpublic StaticBlockSplitter(org.apache.hadoop.conf.Configuration configuration, int splits)
configuration
- the configurationsplits
- the splitsprotected long computeSplitSize(long blockSize, long minSize, long maxSize)
AbstractSplitter
computeSplitSize
in class AbstractSplitter
blockSize
- the block sizeminSize
- the min sizemaxSize
- the max sizepublic void setSplits(int splits)
splits
- the new splits count