public abstract class AbstractSplitter extends java.lang.Object implements Splitter
Splitter implementations.| Constructor and Description | 
|---|
| AbstractSplitter()Instantiates a new abstract splitter. | 
| AbstractSplitter(org.apache.hadoop.conf.Configuration configuration)Instantiates a new abstract splitter. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
public AbstractSplitter()
public AbstractSplitter(org.apache.hadoop.conf.Configuration configuration)
configuration - the configurationpublic 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.public org.apache.hadoop.conf.Configuration getConfiguration()
@Autowired(required=false) public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration - the new configurationprotected long computeSplitSize(long blockSize,
                    long minSize,
                    long maxSize)
blockSize - the block sizeminSize - the min sizemaxSize - the max sizeprotected int getBlockIndex(org.apache.hadoop.fs.BlockLocation[] blocks,
                long offset)
blocks - the blk locationsoffset - the offsetjava.lang.IllegalArgumentException - if offset is outside of blocksprotected Split buildSplit(long start, long length, java.lang.String[] hosts)
start - the startlength - the lengthhosts - the hosts