Search in sources :

Example 6 with PartitionQuery

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;
}
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

PartitionQuery (org.apache.gora.query.PartitionQuery)6 ArrayList (java.util.ArrayList)3 IOException (java.io.IOException)2 PartitionQueryImpl (org.apache.gora.query.impl.PartitionQueryImpl)2 InputSplit (org.apache.hadoop.mapreduce.InputSplit)2 Member (com.hazelcast.core.Member)1 Partition (com.hazelcast.core.Partition)1 InetAddress (java.net.InetAddress)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 ConcurrentSkipListSet (java.util.concurrent.ConcurrentSkipListSet)1 AccumuloException (org.apache.accumulo.core.client.AccumuloException)1 AccumuloSecurityException (org.apache.accumulo.core.client.AccumuloSecurityException)1 TableDeletedException (org.apache.accumulo.core.client.TableDeletedException)1 TableNotFoundException (org.apache.accumulo.core.client.TableNotFoundException)1 TableOfflineException (org.apache.accumulo.core.client.TableOfflineException)1 ClientContext (org.apache.accumulo.core.client.impl.ClientContext)1 TabletLocator (org.apache.accumulo.core.client.impl.TabletLocator)1 MockConnector (org.apache.accumulo.core.client.mock.MockConnector)1