You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2021/11/01 20:12:00 UTC

[helix] branch master updated: Fix log format in instanceValidationUtil (#1894)

This is an automated email from the ASF dual-hosted git repository.

jxue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git


The following commit(s) were added to refs/heads/master by this push:
     new 1654113  Fix log format in instanceValidationUtil (#1894)
1654113 is described below

commit 1654113b01bbe15ed7219f719c8fde1c0351f724
Author: xyuanlu <xy...@gmail.com>
AuthorDate: Mon Nov 1 13:11:51 2021 -0700

    Fix log format in instanceValidationUtil (#1894)
    
    * fix log format in instanceValidationUtil
---
 .../main/java/org/apache/helix/util/InstanceValidationUtil.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/helix-core/src/main/java/org/apache/helix/util/InstanceValidationUtil.java b/helix-core/src/main/java/org/apache/helix/util/InstanceValidationUtil.java
index 58eae8a..5939e19 100644
--- a/helix-core/src/main/java/org/apache/helix/util/InstanceValidationUtil.java
+++ b/helix-core/src/main/java/org/apache/helix/util/InstanceValidationUtil.java
@@ -170,7 +170,7 @@ public class InstanceValidationUtil {
     }
     if (!clusterConfig.isPersistIntermediateAssignment()) {
       _logger.error(
-          "Cluster config %s is not turned on, which is required for instance stability check.",
+          "Cluster config {} is not turned on, which is required for instance stability check.",
           ClusterConfig.ClusterConfigProperty.PERSIST_INTERMEDIATE_ASSIGNMENT.toString());
       return false;
     }
@@ -202,7 +202,7 @@ public class InstanceValidationUtil {
         CurrentState currentState = dataAccessor.getProperty(key);
         if (currentState != null
             && currentState.getPartitionStateMap().containsValue(HelixDefinedState.ERROR.name())) {
-          _logger.warn(String.format("The instance %s has error partitions on it.", instanceName));
+          _logger.warn("The instance {} has error partitions on it.", instanceName);
           return true;
         }
       }
@@ -357,8 +357,8 @@ public class InstanceValidationUtil {
       // Get the minActiveReplicas constraint for the resource
       int minActiveReplicas = externalView.getMinActiveReplicas();
       if (minActiveReplicas == -1) {
-        _logger.warn("Resource " + resourceName
-            + " is missing minActiveReplica field. Skip the sibling check");
+        _logger.warn("Resource {} is missing minActiveReplica field. Skip the sibling check",
+            resourceName);
         continue;
       }
       String stateModeDef = externalView.getStateModelDefRef();