public interface QuerySplitter
Modifier and Type | Method and Description |
---|---|
List<DatastoreV1.Query> |
getSplits(DatastoreV1.Query query,
int numSplits,
Datastore datastore)
Returns a list of sharded
DatastoreV1.Query s for the given query. |
List<DatastoreV1.Query> getSplits(DatastoreV1.Query query, int numSplits, Datastore datastore) throws DatastoreException
DatastoreV1.Query
s 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.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 © 2013. All Rights Reserved.