Interface QuerySplitter (2.8.0)

public interface QuerySplitter

Provides the ability to split a query into multiple shards.

Methods

getSplits(Query query, PartitionId partition, int numSplits, Datastore datastore)

public abstract List<Query> getSplits(Query query, PartitionId partition, int numSplits, Datastore datastore)

Returns a list of sharded 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.

Parameters
NameDescription
queryQuery

the query to split.

partitionPartitionId

the partition the query is running in.

numSplitsint

the desired number of splits.

datastoreDatastore

the datastore to run on.

Returns
TypeDescription
List<Query>
Exceptions
TypeDescription
DatastoreException

if there was a datastore error while generating query splits.