private static void createAndLoadSecondaryIndexesForTarget(Dataset source, Dataset target, MetadataProvider metadataProvider, IHyracksClientConnection hcc) throws Exception { for (Index index : metadataProvider.getDatasetIndexes(source.getDataverseName(), source.getDatasetName())) { if (!index.isSecondaryIndex()) { continue; } // Creates the secondary index. JobSpecification indexCreationJobSpec = IndexUtil.buildSecondaryIndexCreationJobSpec(target, index, metadataProvider, null); JobUtils.runJob(hcc, indexCreationJobSpec, true); // Loads the secondary index. JobSpecification indexLoadingJobSpec = IndexUtil.buildSecondaryIndexLoadingJobSpec(target, index, metadataProvider, null); JobUtils.runJob(hcc, indexLoadingJobSpec, true); } }
List<String> subFieldName; for (Index index : indexes) { if (!index.isSecondaryIndex() || !index.isOverridingKeyFieldTypes()) { continue;
boolean hasSecondaryIndex = false; for (Index index : datasetIndexes) { if (index.isSecondaryIndex()) { hasSecondaryIndex = true; break;
if (index.isSecondaryIndex()) { jobsToExecute.add( IndexUtil.buildSecondaryIndexCompactJobSpec(ds, index, metadataProvider, sourceLoc));
MetadataManager.INSTANCE.getDatasetIndexes(mdTxnCtx.getValue(), dataverseName, datasetName); for (int j = 0; j < indexes.size(); j++) { if (indexes.get(j).isSecondaryIndex()) { jobsToExecute .add(IndexUtil.buildDropIndexJobSpec(indexes.get(j), metadataProvider, this, sourceLoc));
if (!index.isSecondaryIndex()) { continue;