[NO ISSUE] Fix broken logging in ClusterStateManager
e.g. ...ClusterStateManager [Executor-3:ClusterController] Not refreshing final state %s
Change-Id: I7092fc548b1a07c8beb2693156f0e77dcbf9b602
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2430
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
index 03a6868..7182204 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java
@@ -46,7 +46,6 @@
import org.apache.hyracks.control.common.application.ConfigManagerApplicationConfig;
import org.apache.hyracks.control.common.config.ConfigManager;
import org.apache.hyracks.control.common.controllers.NCConfig;
-import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -128,7 +127,7 @@
metadataNodeActive = active;
if (active) {
metadataPartition.setActiveNodeId(currentMetadataNode);
- LOGGER.info(String.format("Metadata node %s is now active", currentMetadataNode));
+ LOGGER.info("Metadata node {} is now active", currentMetadataNode);
}
notifyAll();
}
@@ -166,7 +165,7 @@
@Override
public synchronized void refreshState() throws HyracksDataException {
if (state == ClusterState.SHUTTING_DOWN) {
- LOGGER.log(Level.INFO, "Not refreshing final state %s", state);
+ LOGGER.info("Not refreshing final state {}", state);
return;
}
resetClusterPartitionConstraint();
@@ -187,8 +186,7 @@
IResourceIdManager resourceIdManager = appCtx.getResourceIdManager();
for (String node : participantNodes) {
if (!resourceIdManager.reported(node)) {
- LOGGER.log(Level.INFO, "Partitions are ready but %s has not yet registered its max resource id...",
- node);
+ LOGGER.info("Partitions are ready but {} has not yet registered its max resource id...", node);
setState(ClusterState.UNUSABLE);
return;
}