gpt4 book ai didi

c++ - 在 Ignite 节点上获取本地分区

转载 作者:行者123 更新时间:2023-11-28 04:55:46 25 4
gpt4 key购买 nike

有没有办法在 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.
...
}
}

最佳答案

Ignite C++ 中还没有 Cluster API,尽管有一些 Compute API。您可以跟踪工单 [1] 以了解 Cluster API 的更新。

[1] - https://issues.apache.org/jira/browse/IGNITE-5708

关于c++ - 在 Ignite 节点上获取本地分区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47151171/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com