Return-Path: X-Original-To: apmail-ignite-user-archive@minotaur.apache.org Delivered-To: apmail-ignite-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3FF75197EA for ; Fri, 4 Mar 2016 21:05:42 +0000 (UTC) Received: (qmail 35076 invoked by uid 500); 4 Mar 2016 21:05:42 -0000 Delivered-To: apmail-ignite-user-archive@ignite.apache.org Received: (qmail 35031 invoked by uid 500); 4 Mar 2016 21:05:42 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 35021 invoked by uid 99); 4 Mar 2016 21:05:42 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2016 21:05:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id AB1F71A0040 for ; Fri, 4 Mar 2016 21:05:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.173 X-Spam-Level: ** X-Spam-Status: No, score=2.173 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id NtPwEIrJ3dc3 for ; Fri, 4 Mar 2016 21:05:40 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id 755B65F1EF for ; Fri, 4 Mar 2016 21:05:33 +0000 (UTC) Received: from malf.nabble.com (unknown [162.253.133.59]) by mbob.nabble.com (Postfix) with ESMTP id 751FB2234534 for ; Fri, 4 Mar 2016 12:54:01 -0800 (PST) Date: Fri, 4 Mar 2016 12:49:59 -0800 (PST) From: vkulichenko To: user@ignite.apache.org Message-ID: <1457124599050-3372.post@n6.nabble.com> In-Reply-To: <1457120202874-3370.post@n6.nabble.com> References: <1457120202874-3370.post@n6.nabble.com> Subject: Re: Number of servers and lambdas ? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > > 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.