有没有办法在C ++中获取Ignite节点的分区?
我想在分区上并行化扫描查询。
与Java类似的东西:
ignite.compute(ignite.cluster().forDataNodes("myCache"))
.broadcast(new IgniteCallable<Void>() {
@IgniteInstanceResource
private Ignite ignite0;
@Override public Void call() throws Exception {
ClusterNode localNode = ignite0.cluster().localNode();
// get partitions
int[] parts = ignite0.affinity("myCache").primaryPartitions(localNode);
partList.parallelStream().forEach(p -> {
ScanQuery<Integer, Record> qry = new ScanQuery().setLocal(true).setPartition(p);
// query over the partition.
...
}
}
答案 0 :(得分:1)
Ignite C ++中还没有Cluster API,但有一些Compute API。您可以跟踪故障单[1]以获取Cluster API的更新。