Hi,

Can you please properly subscribe to the mailing list so that the community
receives email notifications? Here is the instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1


limabean wrote
> I have a question about lambdas and Ignite servers.
> Running one of the lambda example from the Ignite tutorials:
> 
>           String a[] = new String[]{"abc","klm","xyz","pqr"};
>           List lst = Arrays.asList(a);
>           ............
> 
>            while (true)
>             {
>                 Collection
> <Integer>
>  coll = compute.apply(
>                         (String w) -> {
>                             System.out.println("Executing word: " + w);
>                             return w.length();
>                         }, lst);
> 
> 
>                 int sum = coll.stream().mapToInt(i -> i).sum();
>                 System.out.println("Sum is: " + sum);
> 
>                 Thread.sleep(2000);
>             }
> 
> causes 4 servers to be started - one for each word in the string array
> passed in.
> 
> I already had a cluster of 2 servers running and then the program running
> the code pasted above starts a 3rd server.  I expected one of the servers
> to handle 2 words, similar to the "fault tolerance" demo where shutting
> down 1 server causes work to be shifted between the remaining servers.
> 
> Instead, what happens is a fourth server is started for the 4th word:
> 
> [13:55:58] Topology snapshot [ver=26, servers=4, clients=0, CPUs=8,
> heap=9.1GB]
> 
> Is this expected and could someone explain why the initial start up
> scenario 
> behaves this way instead of the way the  "fault tolerant" scenario is
> handled 
> with respect to how words are handed to servers ?
> 
> Thank you,

A node (either server or client) can be started only if you explicitly
execute ignite.sh script or call Ignition.start() within the application.
Nodes are never started automatically for the closure execution. Can you
double-check your code?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Number-of-servers-and-lambdas-tp3370p3372.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to