November 2018
Beginner to intermediate
260 pages
6h 12m
English
You can send computations to the oldest or youngest node. The following code snippet sends computations to the oldest and youngest nodes:
package com.packt;import org.apache.ignite.Ignite;import org.apache.ignite.IgniteCluster;import org.apache.ignite.IgniteCompute;import org.apache.ignite.Ignition;import org.apache.ignite.cluster.ClusterGroup;import org.apache.ignite.configuration.IgniteConfiguration;public class OldestAndNewest { public static void main(String[] args) { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setPeerClassLoadingEnabled(true); try (Ignite ignite = Ignition.start(cfg)) { IgniteCluster cluster = ignite.cluster(); //Get the oldest node ClusterGroup forOldest = cluster.forOldest(); //Get ...Read now
Unlock full access