Murtadha Hubail has submitted this change and it was merged. Change subject: [NO ISSUE][CLUS] Exclude Pending Removal Nodes From Location ......................................................................
[NO ISSUE][CLUS] Exclude Pending Removal Nodes From Location - user model changes: no - storage format changes: no - interface changes: no Details: - Exclude pending removel nodes from cluster locations to prevent new jobs from using them as compute locations. - Add additional logging for dataset rebalance. Change-Id: I0c9904b229aa086615a3a8bbdfaf44d51f1e1757 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2523 Reviewed-by: Michael Blow <[email protected]> Integration-Tests: Michael Blow <[email protected]> Tested-by: Michael Blow <[email protected]> --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/RebalanceUtil.java M asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/utils/ClusterStateManager.java 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Anon. E. Moose #1000171: Michael Blow: Looks good to me, approved; Verified; Verified diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/RebalanceUtil.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/RebalanceUtil.java index 7bb917f..702b6b4 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/RebalanceUtil.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/utils/RebalanceUtil.java @@ -124,6 +124,9 @@ // The target dataset for rebalance. targetDataset = sourceDataset.getTargetDatasetForRebalance(nodeGroupName); + LOGGER.info("Rebalancing dataset {} from node group {} with nodes {} to node group {} with nodes {}", + sourceDataset.getDatasetName(), sourceDataset.getNodeGroupName(), sourceNodes, + targetDataset.getNodeGroupName(), targetNcNames); // Rebalances the source dataset into the target dataset. rebalance(sourceDataset, targetDataset, metadataProvider, hcc, datasetRebalanceCallback); } else { @@ -158,6 +161,7 @@ // the source dataset. runMetadataTransaction(metadataProvider, () -> dropSourceDataset(sourceDataset, metadataProvider, hcc)); }); + LOGGER.info("Dataset {} rebalance completed successfully", datasetName); } @FunctionalInterface @@ -238,6 +242,8 @@ (ActiveNotificationHandler) appCtx.getActiveNotificationHandler(); IMetadataLockManager lockManager = appCtx.getMetadataLockManager(); lockManager.upgradeDatasetLockToWrite(metadataProvider.getLocks(), DatasetUtil.getFullyQualifiedName(source)); + LOGGER.info("Updating dataset {} node group from {} to {}", source.getDatasetName(), source.getNodeGroupName(), + target.getNodeGroupName()); try { // Updates the dataset entry in the metadata storage MetadataManager.INSTANCE.updateDataset(mdTxnCtx, target); @@ -248,6 +254,7 @@ } } MetadataManager.INSTANCE.commitTransaction(mdTxnCtx); + LOGGER.info("dataset {} node group updated to {}", target.getDatasetName(), target.getNodeGroupName()); } finally { lockManager.downgradeDatasetLockToExclusiveModify(metadataProvider.getLocks(), DatasetUtil.getFullyQualifiedName(target)); 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 7182204..73d6705 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 @@ -280,6 +280,7 @@ clusterActiveLocations.add(p.getActiveNodeId()); } } + clusterActiveLocations.removeAll(pendingRemoval); clusterPartitionConstraint = new AlgebricksAbsolutePartitionConstraint(clusterActiveLocations.toArray(new String[] {})); } -- To view, visit https://asterix-gerrit.ics.uci.edu/2523 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c9904b229aa086615a3a8bbdfaf44d51f1e1757 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: release-0.9.4-pre-rc Gerrit-Owner: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]>
