You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "kcheng.mvp (JIRA)" <ji...@apache.org> on 2018/07/02 08:23:00 UTC

[jira] [Commented] (IGNITE-8376) Add cluster (de)activation events

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

kcheng.mvp commented on IGNITE-8376:
------------------------------------

[~agoncharuk]



After go through the code and found the active/deactive action will finally router to 

 
{code:java}
org.apache.ignite.internal.cluster.IgniteClusterImpl#active(boolean)

    /** {@inheritDoc} */
    @Override public void active(boolean active) {
        guard();

        try {
            ctx.state().changeGlobalState(active, baselineNodes(), false).get();
        }
        catch (IgniteCheckedException e) {
            throw U.convertException(e);
        }
        finally {
            unguard();
        }
    }
{code}

ideally it's the best place to trigger the event, but if we trigger the event here, seems we can not get by which means this event is triggered(api, rest, mbean visitorcommand or auto).

is my understanding correct? Thank you very much!


> 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)