public class StaticDatasetsFinderForTesting extends Object implements IterableDatasetFinder<Dataset>
DatasetsFinder that returns a predefined set of Datasets for testing.| Constructor and Description |
|---|
StaticDatasetsFinderForTesting() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.fs.Path |
commonDatasetRoot() |
List<Dataset> |
findDatasets()
Find all
Datasets in the file system. |
Iterator<Dataset> |
getDatasetsIterator() |
java.util.stream.Stream<Dataset> |
getDatasetsStream(int desiredCharacteristics,
Comparator<Dataset> suggestedOrder)
Get a stream of
Datasets found. |
public List<Dataset> findDatasets() throws IOException
DatasetsFinderDatasets in the file system.findDatasets in interface DatasetsFinder<Dataset>Datasets in the file system.IOExceptionpublic org.apache.hadoop.fs.Path commonDatasetRoot()
commonDatasetRoot in interface DatasetsFinder<Dataset>Datasets root paths returned by this finder.public Iterator<Dataset> getDatasetsIterator() throws IOException
getDatasetsIterator in interface IterableDatasetFinder<Dataset>Iterator over the Datasets found.IOExceptionpublic java.util.stream.Stream<Dataset> getDatasetsStream(int desiredCharacteristics, Comparator<Dataset> suggestedOrder) throws IOException
IterableDatasetFinderDatasets found.getDatasetsStream in interface IterableDatasetFinder<Dataset>desiredCharacteristics - desired Spliterator characteristics of this stream. The returned
stream need not satisfy these characteristics, this argument merely implies that the
caller will run optimally when those characteristics are present, allowing pushdown of
those characteristics. For example Spliterator.SORTED can sometimes
be pushed down at a cost, so the DatasetsFinder would only push it down if it is valuable
for the caller.suggestedOrder - suggested order of the datasets in the stream. Implementation may or may not return the entries
in that order. If the entries are in that order, implementation should ensure the spliterator
is annotated as such.Datasets found.IOException