You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Ilya Kazakov <ka...@gmail.com> on 2020/10/08 04:41:42 UTC

Using deprecated active() and unhelpful message in console

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

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

Posted by Vladimir Pligin <vo...@yandex.ru>.
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/

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

Posted by Stephen Darlington <st...@gridgain.com>.
Great observations! Did you open a ticket? Are you interested in contributing a patch?

> On 8 Oct 2020, at 05:41, Ilya Kazakov <ka...@gmail.com> 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