public class SimplePartitionableDatasetForTesting extends Object implements PartitionableDataset<SimpleDatasetPartitionForTesting>
PartitionableDataset that just returns a predefined set of SimpleDatasetPartitionForTesting used for testing.PartitionableDataset.DatasetPartition| Constructor and Description |
|---|
SimplePartitionableDatasetForTesting(String urn,
List<SimpleDatasetPartitionForTesting> partitions) |
| Modifier and Type | Method and Description |
|---|---|
String |
datasetURN()
URN for this dataset.
|
java.util.stream.Stream<SimpleDatasetPartitionForTesting> |
getPartitions(int desiredCharacteristics,
Comparator<SimpleDatasetPartitionForTesting> suggestedOrder)
Get a stream of partitions.
|
public SimplePartitionableDatasetForTesting(String urn, List<SimpleDatasetPartitionForTesting> partitions)
public String datasetURN()
DatasetdatasetURN in interface Datasetpublic java.util.stream.Stream<SimpleDatasetPartitionForTesting> getPartitions(int desiredCharacteristics, Comparator<SimpleDatasetPartitionForTesting> suggestedOrder) throws IOException
PartitionableDatasetgetPartitions in interface PartitionableDataset<SimpleDatasetPartitionForTesting>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 Dataset would only push it down if it is valuable
for the caller.suggestedOrder - suggested order of the partitions 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.Stream over PartitionableDataset.DatasetPartitions in this dataset.IOException