use of org.apache.gora.query.PartitionQuery in project gora by apache.
the class InfinispanQuery method split.
public List<PartitionQuery<K, T>> split() {
LOG.debug("split()");
if (!isBuilt())
build();
List<PartitionQuery<K, T>> splits = new ArrayList<>();
QueryBuilder qb = ((InfinispanStore<K, T>) dataStore).getClient().getQueryBuilder();
Collection<RemoteQuery> Queries = qb.split(this.q);
for (RemoteQuery Query : Queries) {
InfinispanQuery<K, T> split = (InfinispanQuery<K, T>) this.clone();
split.q = Query;
split.location = Query.getLocation();
splits.add(split);
}
LOG.trace(splits.toString());
return splits;
}
Aggregations