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

Dmitriy Govorukhin edited comment on IGNITE-8376 at 7/6/18 12:02 PM:
---------------------------------------------------------------------

[~kuaw26] I do not think that we should have API like this, 
{code}
/** return number of already activated/deactivated nodes */
int cluster.activeStateProgress();
{code}

It will be better сreate additional events, 
(EVT_NODE_ACTIVATE,EVT_NODE_DEACTIVATE,EVT_NODE_ACTIVATING, 
EVT_NODE_DEACTIVATING).
Then we can track cluster state, with per-node granularity. I guess it will be 
a more flexible approach.
No need to query the status of each node, just listen to events.



was (Author: dmitriygovorukhin):
[~kuaw26] I do not think that we should have API like this, 
{code}
/** return number of already activated/deactivated nodes */
int cluster.activeStateProgress();
{code}

It will be better if create additional events, 
(EVT_NODE_ACTIVATE,EVT_NODE_DEACTIVATE,EVT_NODE_ACTIVATING, 
EVT_NODE_DEACTIVATING).
Then we can track cluster state, with per-node granularity. I guess it will be 
a more flexible approach.
No need to query the status of each node, just listen to events.


> Add cluster (de)activation events
> ---------------------------------
>
>                 Key: IGNITE-8376
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8376
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Alexey Goncharuk
>            Assignee: kcheng.mvp
>            Priority: Major
>              Labels: newbie
>             Fix For: 2.7
>
>
> Currently, we do not have any way to detect that a cluster got activated, 
> which results in busy-loops polling {{cluster().active()}}.
> I suggest to add new events, {{EVT_CLUSTER_ACTIVATED}}, 
> {{EVT_CLUSTER_DEACTIVATED}}, {{EVT_CLUSTER_ACTIVATION_FAILED}} which will be 
> fired when corresponding steps are completed. The event should contain, if 
> possible, information about the activation source (public API or 
> auto-activation), topology version on which activation was performed. The 
> fail event should contain information about the cause of the failure. If 
> needed, a new class for this event should be introduced.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to