November 2018
Beginner to intermediate
260 pages
6h 12m
English
The compute grid's apply method receives a job argument and passes it to the closure at the time of execution. In the call or run methods, you can't pass any job argument. The apply method accepts two arguments: IgniteClosure<R,T> and argument<T>. In this section, we are going to create a closure to calculate the sum of a list of numbers. We'll pass a closure and a list of integers to the apply method. The following are the steps:
IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setPeerClassLoadingEnabled(true); try (Ignite ignite = Ignition.start(cfg)) { IgniteCompute compute = ignite.compute(); List<Integer> numbersToAdd = Arrays.asList(2, 3, ...Read now
Unlock full access