Also, I would add IGNITE-12225
<https://issues.apache.org/jira/browse/IGNITE-12225> ticket to 2.8 release
scope.

вт, 24 сент. 2019 г. в 16:18, Sergey Antonov <antonovserge...@gmail.com>:

> Hi, Igniters!
>
> We have 3 cluster states at the moment: inactive, active, read-only.
>
> For getting current cluster state and changing them IgniteCluster has
> methods:
>
>    - boolean active(), void active(boolean active) - for cluster
>    activation/deactivation
>    - boolean readOnly(), void readOnly(boolean readOnly) - for
>    enabling/disabling read-only mode.
>
> Also we have control.sh commans for changing cluster state:
>
>    - --activate
>    - --deactivate
>    - --read-only-on
>    - --read-only-off
>
> For me current API looks unuseful. My proposal:
>
>    1. Create enum ClusterState with values ACTIVE, INACTIVE, READ-ONLY.
>    2. Add methods to IgniteCluster:
>       - ClusterState state() returns current cluster state
>       - void state(ClusterState newState) changes cluster state to
>       newState state
>    3. Mark as deprecated the following methods in IgniteCluster: boolean
>    active(), void active(boolean active),
>    4. Add new command to control.sh: control.sh --set-state
>    (ACTIVE|INACTIVE|READ-ONLY)
>    5. Add warn message that command is depricated in control.sh.
>    Commands: --activate, --deactivate, --read-only-on, --read-only-off
>
>
> I created ticket [1] in Jira for it.
>
> What do you think about my proposal?
>
> [1] https://issues.apache.org/jira/browse/IGNITE-12225
> --
> BR, Sergey Antonov
>


-- 
BR, Sergey Antonov

Reply via email to