[ 
https://issues.apache.org/jira/browse/IGNITE-1018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15344087#comment-15344087
 ] 

Andrey Velichko commented on IGNITE-1018:
-----------------------------------------

Ignite\modules\core\src\main\java\org\apache\ignite\internal\cluster\IgniteClusterImpl.java
public <K, V> ConcurrentMap<K, V> nodeLocalMap() {
удалил блокировку guard() / unguard()
 
ignite\examples\src\main\java\org\apache\ignite\examples\misc\lifecycle\LifecycleExample.java
Добавил в пример счетчик событий

 +             IgniteCluster cluster = ignite.cluster();
 +             ConcurrentMap map = cluster.nodeLocalMap();
 +             Integer val = (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 like 
> all others. But this is just a local concurrent map which is already 
> available 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 them to 
> node local map before node is started.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to