Michael Blow has submitted this change and it was merged. Change subject: Minor cleanup, no PENDING on cluster state refresh ......................................................................
Minor cleanup, no PENDING on cluster state refresh Change-Id: I34221471f9aafa4ae970b2f44f80577ebb8bbba7 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1803 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> BAD: Jenkins <[email protected]> Reviewed-by: Yingyi Bu <[email protected]> Integration-Tests: Jenkins <[email protected]> --- M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Yingyi Bu: Looks good to me, approved Jenkins: Verified; No violations found; No violations found; Verified 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 64ef5c2..37b3cc2 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 @@ -164,17 +164,18 @@ } } - setState(ClusterState.PENDING); - LOGGER.info("Cluster is now " + state); - // if all storage partitions are active as well as the metadata node, then the cluster is active if (metadataNodeActive) { + if (state != ClusterState.ACTIVE) { + setState(ClusterState.PENDING); + } appCtx.getMetadataBootstrap().init(); setState(ClusterState.ACTIVE); - LOGGER.info("Cluster is now " + state); notifyAll(); // start global recovery appCtx.getGlobalRecoveryManager().startGlobalRecovery(appCtx); + } else { + setState(ClusterState.PENDING); } } @@ -377,7 +378,7 @@ public synchronized void deregisterNodePartitions(String nodeId) { ClusterPartition [] nodePartitions = node2PartitionsMap.remove(nodeId); if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Deegistering node partitions for node " + nodeId + ": " + Arrays.toString(nodePartitions)); + LOGGER.info("Deregistering node partitions for node " + nodeId + ": " + Arrays.toString(nodePartitions)); } for (ClusterPartition nodePartition : nodePartitions) { clusterPartitions.remove(nodePartition.getPartitionId()); -- To view, visit https://asterix-gerrit.ics.uci.edu/1803 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34221471f9aafa4ae970b2f44f80577ebb8bbba7 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael Blow <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]>
