How can I query only the data held by ignite data nodes?
I've used it like this, but I've confirmed that the CompletedTaskCount of
the GridQueryExecutor of other nodes goes up.
ignite.compute().affinityRun(cacheName, 1, () -> {
Ignite ignite = Ignition.ignite();
IgniteCache cache = ignite.cache(cacheName);
SqlFieldsQuery query = new
SqlFieldsQuery("select path, sum(count) from
CacheTable group by path").setLocal(true);
long queryStartTimeMillis =
System.currentTimeMillis();
List all = cache.query(query).getAll();
});
I think that when I query like above, Compute Task is delivered to the node
that is in charge of 1 partition key and queries about the partitions that
it is responsible for. However, the CompletedTaskCount of the
GridQueryExecutor on all nodes has been increased. :(
ignite.compute().affinityRun(cacheName, 1, () -> {
Ignite ignite = Ignition.ignite();
IgniteCache cache = ignite.cache(cacheName);
SqlFieldsQuery query = new
SqlFieldsQuery("select path, sum(count) from
CacheTable group by path").setPartitions(1);
long queryStartTimeMillis =
System.currentTimeMillis();
List all = cache.query(query).getAll();
});
when I query like above, Only the node in charge of the partition has
confirmed that the CompletedTaskCount of the GridQueryExecutor increases.
How can I force the Data node to query with its own data?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/