You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/10/12 04:27:21 UTC

[GitHub] [ignite] aries-3 opened a new pull request #8347: IGNITE-13534 fixing of "using deprecated active() and uninformative message in console"

aries-3 opened a new pull request #8347:
URL: https://github.com/apache/ignite/pull/8347


    - uninformative messages corrected
    - each using .active() changed to .state() != ClusterState.INACTIVE
    - each using .active(boolean b) changed to .state(b ? ClusterState.ACTIVE :
   ClusterState.INACTIVE)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] alamar commented on a change in pull request #8347: IGNITE-13534 fixing of "using deprecated active() and uninformative message in console"

Posted by GitBox <gi...@apache.org>.
alamar commented on a change in pull request #8347:
URL: https://github.com/apache/ignite/pull/8347#discussion_r506409792



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
##########
@@ -3795,7 +3795,7 @@ private void checkNearCacheStarted(IgniteCacheProxy<?, ?> cache) throws IgniteCh
 
     /** {@inheritDoc} */
     @Override public void active(boolean active) {
-        cluster().active(active);
+        cluster().state(active ? ClusterState.ACTIVE : ClusterState.INACTIVE);

Review comment:
       Let's withhold this change.  Both Ignite.active() and IgniteCluster.active() are deprecated. So it's OK for one to map to the former. If there's a warning inside IgniteCluster.active(), it's even better that way.

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
##########
@@ -4490,7 +4490,7 @@ private void registerMetrics() {
         reg.register("longJVMPauseLastEvents", this::getLongJVMPauseLastEvents, Map.class,
             LONG_JVM_PAUSE_LAST_EVENTS_DESC);
 
-        reg.register("active", () -> ctx.state().clusterState().active()/*this::active*/, Boolean.class,
+        reg.register("active", () -> ctx.state().clusterState().state() != ClusterState.INACTIVE, Boolean.class,

Review comment:
       Can we do ctx.state().clusterState().state().active() here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] asfgit closed pull request #8347: IGNITE-13534 fixing of "using deprecated active() and uninformative message in console"

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #8347:
URL: https://github.com/apache/ignite/pull/8347


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org