This is an automated email from the ASF dual-hosted git repository. mblow pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 9ac78167dd2424ca78bf0144bd1c5c70610d542e Author: Murtadha Hubail <[email protected]> AuthorDate: Mon Jul 6 21:24:08 2020 +0300 [NO ISSUE][RT] Support External Datasets Rebalance - user model changes: no - storage format changes: no - interface changes: no Details: - Do not attempt to rebalance external datasets files on rebalance since they do not have files on local storage. - Skip dropping external datasets files on rebalance since they have no files on local storage. Change-Id: I71f50ade98c8b798225baf0cb34dd6e70a5e923e Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/7123 Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Murtadha Hubail <[email protected]> Reviewed-by: Ali Alsuliman <[email protected]> --- .../src/main/java/org/apache/asterix/utils/RebalanceUtil.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 483987c..dff0b4a 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 @@ -19,6 +19,7 @@ package org.apache.asterix.utils; import static org.apache.asterix.app.translator.QueryTranslator.abort; +import static org.apache.asterix.common.config.DatasetConfig.DatasetType; import static org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor.DropOption; import java.rmi.RemoteException; @@ -128,7 +129,9 @@ public class RebalanceUtil { sourceDataset.getDatasetName(), sourceDataset.getNodeGroupName(), sourceNodes, targetDataset.getNodeGroupName(), targetNcNames); // Rebalances the source dataset into the target dataset. - rebalance(sourceDataset, targetDataset, metadataProvider, hcc, datasetRebalanceCallback); + if (sourceDataset.getDatasetType() != DatasetType.EXTERNAL) { + rebalance(sourceDataset, targetDataset, metadataProvider, hcc, datasetRebalanceCallback); + } } else { targetDataset = null; // if this the last NC in the cluster, just drop the dataset @@ -351,6 +354,9 @@ public class RebalanceUtil { // Drops dataset files of a given dataset. private static void dropDatasetFiles(Dataset dataset, MetadataProvider metadataProvider, IHyracksClientConnection hcc) throws Exception { + if (dataset.getDatasetType() == DatasetType.EXTERNAL) { + return; + } List<JobSpecification> jobs = new ArrayList<>(); List<Index> indexes = metadataProvider.getDatasetIndexes(dataset.getDataverseName(), dataset.getDatasetName()); for (Index index : indexes) {
