Using deprecated active() and unhelpful message in console

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using deprecated active() and unhelpful message in console

Ilya Kazakov
Hello!

As a new user of Ignite I faced this problem. When cluster started in
INACTIVE state in logs writes uninformative message:

>>> Ignite cluster is not active (limited functionality available). Use
control.(sh|bat) script or IgniteCluster interface to activate.

This message contains two words "active" and does not contain the word
"state".
From this message, users try to use deprecated IgniteCluster.active(boolean
active), but need to use IgniteCluster.state(ClusterState newState)

I propose to change this message. There are two options:
>>> Ignite cluster is in INACTIVE state (limited functionality available).
Use control.(ch|bat) script or IgniteCluster interface to change the state.
or
>>> Ignite cluster is in INACTIVE state (limited functionality available).
Use control.(ch|bat) script or IgniteCluster.state() to change the state.

Also in the class IgniteKernal there are 3 usages of deprecated methods
active() and active(boolean b).
I propose to change
 - each using .active() to .state() != ClusterState.INACTIVE
 - each using .active(boolean b) to .state(b ? ClusterState.ACTIVE :
ClusterState.INACTIVE)

---------------------
Ilya Kazakov
Reply | Threaded
Open this post in threaded view
|

Re: Using deprecated active() and unhelpful message in console

sdarlington
Great observations! Did you open a ticket? Are you interested in contributing a patch?

> On 8 Oct 2020, at 05:41, Ilya Kazakov <[hidden email]> wrote:
>
> Hello!
>
> As a new user of Ignite I faced this problem. When cluster started in
> INACTIVE state in logs writes uninformative message:
>
>>>> Ignite cluster is not active (limited functionality available). Use
> control.(sh|bat) script or IgniteCluster interface to activate.
>
> This message contains two words "active" and does not contain the word
> "state".
> From this message, users try to use deprecated IgniteCluster.active(boolean
> active), but need to use IgniteCluster.state(ClusterState newState)
>
> I propose to change this message. There are two options:
>>>> Ignite cluster is in INACTIVE state (limited functionality available).
> Use control.(ch|bat) script or IgniteCluster interface to change the state.
> or
>>>> Ignite cluster is in INACTIVE state (limited functionality available).
> Use control.(ch|bat) script or IgniteCluster.state() to change the state.
>
> Also in the class IgniteKernal there are 3 usages of deprecated methods
> active() and active(boolean b).
> I propose to change
> - each using .active() to .state() != ClusterState.INACTIVE
> - each using .active(boolean b) to .state(b ? ClusterState.ACTIVE :
> ClusterState.INACTIVE)
>
> ---------------------
> Ilya Kazakov


Reply | Threaded
Open this post in threaded view
|

Re: Using deprecated active() and unhelpful message in console

Vladimir Pligin
Yeah, I suppose a ticket has been filed. I bet it's
https://issues.apache.org/jira/browse/IGNITE-13534.
Anyway the change looks really good, let's go on! Ilya, it's your turn.



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/