public interface QuerySplitter
| Modifier and Type | Method and Description |
|---|---|
List<com.google.datastore.v1.Query> |
getSplits(com.google.datastore.v1.Query query,
com.google.datastore.v1.PartitionId partition,
int numSplits,
Datastore datastore)
Returns a list of sharded
Querys for the given query. |
List<com.google.datastore.v1.Query> getSplits(com.google.datastore.v1.Query query, com.google.datastore.v1.PartitionId partition, int numSplits, Datastore datastore) throws DatastoreException
Querys for the given query.
This will create up to the desired number of splits, however it may return less splits if the desired number of splits is unavailable. This will happen if the number of split points provided by the underlying Datastore is less than the desired number, which will occur if the number of results for the query is too small.
query - the query to split.partition - the partition the query is running in.numSplits - the desired number of splits.datastore - the datastore to run on.DatastoreException - if there was a datastore error while generating query splits.IllegalArgumentException - if the given query or numSplits was invalid.Copyright © 2017. All rights reserved.