Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 94556200B27 for ; Wed, 22 Jun 2016 12:29:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 93282160A35; Wed, 22 Jun 2016 10:29:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DAA4F160A2E for ; Wed, 22 Jun 2016 12:29:58 +0200 (CEST) Received: (qmail 83820 invoked by uid 500); 22 Jun 2016 10:29:58 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 83809 invoked by uid 99); 22 Jun 2016 10:29:57 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2016 10:29:57 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D10692C033A for ; Wed, 22 Jun 2016 10:29:57 +0000 (UTC) Date: Wed, 22 Jun 2016 10:29:57 +0000 (UTC) From: "Andrey Velichko (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-1018) Node local map is not available when LifecycleEventType.BEFORE_NODE_START is processed in lifecycle bean MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 22 Jun 2016 10:29:59 -0000 [ https://issues.apache.org/jira/browse/IGNITE-1018?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D153= 44087#comment-15344087 ]=20 Andrey Velichko commented on IGNITE-1018: ----------------------------------------- Ignite\modules\core\src\main\java\org\apache\ignite\internal\cluster\Ignite= ClusterImpl.java public ConcurrentMap nodeLocalMap() { =D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB =D0=B1=D0=BB=D0=BE=D0=BA=D0=B8=D1=80= =D0=BE=D0=B2=D0=BA=D1=83 guard() / unguard() =20 ignite\examples\src\main\java\org\apache\ignite\examples\misc\lifecycle\Lif= ecycleExample.java =D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB =D0=B2 =D0=BF=D1=80=D0=B8=D0=BC= =D0=B5=D1=80 =D1=81=D1=87=D0=B5=D1=82=D1=87=D0=B8=D0=BA =D1=81=D0=BE=D0=B1= =D1=8B=D1=82=D0=B8=D0=B9 + IgniteCluster cluster =3D ignite.cluster(); + ConcurrentMap map =3D cluster.nodeLocalMap(); + Integer val =3D (Integer)map.getOrDefault(evt, 0); + map.put(evt, val + 1); // event counter > Node local map is not available when LifecycleEventType.BEFORE_NODE_START= is processed in lifecycle bean > -------------------------------------------------------------------------= ------------------------------- > > Key: IGNITE-1018 > URL: https://issues.apache.org/jira/browse/IGNITE-1018 > Project: Ignite > Issue Type: Bug > Components: general > Affects Versions: sprint-4 > Reporter: Valentin Kulichenko > Assignee: Andrey Velichko > Labels: Usability, newbie > > Currently {{IgniteCluster.nodeLocalMap()}} method is guarded by gateway l= ike all others. But this is just a local concurrent map which is already av= ailable at the moment LifecycleEventType.BEFORE_NODE_START is processed, so= I think it will be good to make it available in lifecycle bean. > This can be useful if user needs to initialize some resources and put the= m to node local map before node is started. -- This message was sent by Atlassian JIRA (v6.3.4#6332)