-
- All Known Implementing Classes:
CompressionSplitIterator,SingleSplitIterator
public interface SplitIteratorA forward-only iterator over data splits with associated locality information. The provided locality information can be used to help decide how to assign splits to cluster nodes for processing.- See Also:
DataSplit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>getLocalityInfo()Get the list of machines for which access to the current split is local.DataSplitgetSplit()Get the current split in the iterated set.booleannext()Advance to the next data split in the iterated set.
-
-
-
Method Detail
-
next
boolean next() throws IOExceptionAdvance to the next data split in the iterated set.- Returns:
trueif there is another split, otherwisefalse.- Throws:
IOException
-
getSplit
DataSplit getSplit()
Get the current split in the iterated set.- Returns:
- the split currently selected
-
getLocalityInfo
List<String> getLocalityInfo()
Get the list of machines for which access to the current split is local. An empty list indicates the split is local to no node (or all nodes).- Returns:
- the machines where the currently selected split is local. If the split is local to no machine (or to all), this list is empty.
-
-