Search in sources :

Example 1 with RemoteQuery

use of org.infinispan.avro.hotrod.RemoteQuery 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;
}
Also used : ArrayList(java.util.ArrayList) QueryBuilder(org.infinispan.avro.hotrod.QueryBuilder) RemoteQuery(org.infinispan.avro.hotrod.RemoteQuery) PartitionQuery(org.apache.gora.query.PartitionQuery)

Aggregations

ArrayList (java.util.ArrayList)1 PartitionQuery (org.apache.gora.query.PartitionQuery)1 QueryBuilder (org.infinispan.avro.hotrod.QueryBuilder)1 RemoteQuery (org.infinispan.avro.hotrod.RemoteQuery)1