2017-11-07 5 views
0

IgniteノードのパーティションをC++で取得する方法はありますか?
私はパーティション上でスキャンクエリを並列化したいと思います。 Javaでこれに類似 何か:いくつかのCompute APIがあるがIgniteノードのローカルパーティションの取得

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

答えて

関連する問題