Search in sources :

Example 1 with IndexDropOperatorDescriptor

use of org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor in project asterixdb by apache.

the class AbstractRTreeOperatorTest method destroyPrimaryIndex.

protected void destroyPrimaryIndex() throws Exception {
    JobSpecification spec = new JobSpecification();
    IndexDropOperatorDescriptor primaryDropOp = new IndexDropOperatorDescriptor(spec, primaryHelperFactory);
    PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, primaryDropOp, NC1_ID);
    spec.addRoot(primaryDropOp);
    runTest(spec);
}
Also used : JobSpecification(org.apache.hyracks.api.job.JobSpecification) IndexDropOperatorDescriptor(org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor)

Example 2 with IndexDropOperatorDescriptor

use of org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor in project asterixdb by apache.

the class AbstractRTreeOperatorTest method destroySecondaryIndex.

protected void destroySecondaryIndex() throws Exception {
    JobSpecification spec = new JobSpecification();
    IndexDropOperatorDescriptor secondaryDropOp = new IndexDropOperatorDescriptor(spec, secondaryHelperFactory);
    PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, secondaryDropOp, NC1_ID);
    spec.addRoot(secondaryDropOp);
    runTest(spec);
}
Also used : JobSpecification(org.apache.hyracks.api.job.JobSpecification) IndexDropOperatorDescriptor(org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor)

Example 3 with IndexDropOperatorDescriptor

use of org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor in project asterixdb by apache.

the class DatasetUtil method dropDatasetJobSpec.

public static JobSpecification dropDatasetJobSpec(Dataset dataset, MetadataProvider metadataProvider) throws AlgebricksException, HyracksDataException, RemoteException, ACIDException {
    LOGGER.info("DROP DATASET: " + dataset);
    if (dataset.getDatasetType() == DatasetType.EXTERNAL) {
        return RuntimeUtils.createJobSpecification(metadataProvider.getApplicationContext());
    }
    JobSpecification specPrimary = RuntimeUtils.createJobSpecification(metadataProvider.getApplicationContext());
    Pair<IFileSplitProvider, AlgebricksPartitionConstraint> splitsAndConstraint = metadataProvider.getSplitProviderAndConstraints(dataset);
    IIndexDataflowHelperFactory indexHelperFactory = new IndexDataflowHelperFactory(metadataProvider.getStorageComponentProvider().getStorageManager(), splitsAndConstraint.first);
    IndexDropOperatorDescriptor primaryBtreeDrop = new IndexDropOperatorDescriptor(specPrimary, indexHelperFactory);
    AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(specPrimary, primaryBtreeDrop, splitsAndConstraint.second);
    specPrimary.addRoot(primaryBtreeDrop);
    return specPrimary;
}
Also used : IFileSplitProvider(org.apache.hyracks.dataflow.std.file.IFileSplitProvider) IIndexDataflowHelperFactory(org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory) AlgebricksPartitionConstraint(org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint) JobSpecification(org.apache.hyracks.api.job.JobSpecification) IIndexDataflowHelperFactory(org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory) IndexDataflowHelperFactory(org.apache.hyracks.storage.am.common.dataflow.IndexDataflowHelperFactory) IndexDropOperatorDescriptor(org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor)

Example 4 with IndexDropOperatorDescriptor

use of org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor in project asterixdb by apache.

the class SecondaryTreeIndexOperationsHelper method buildDropJobSpec.

@Override
public JobSpecification buildDropJobSpec() throws AlgebricksException {
    JobSpecification spec = RuntimeUtils.createJobSpecification(metadataProvider.getApplicationContext());
    Pair<IFileSplitProvider, AlgebricksPartitionConstraint> splitsAndConstraint = metadataProvider.getSplitProviderAndConstraints(dataset, index.getIndexName());
    IIndexDataflowHelperFactory dataflowHelperFactory = new IndexDataflowHelperFactory(metadataProvider.getStorageComponentProvider().getStorageManager(), splitsAndConstraint.first);
    // The index drop operation should be persistent regardless of temp datasets or permanent dataset.
    IndexDropOperatorDescriptor btreeDrop = new IndexDropOperatorDescriptor(spec, dataflowHelperFactory);
    AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, btreeDrop, splitsAndConstraint.second);
    spec.addRoot(btreeDrop);
    return spec;
}
Also used : IFileSplitProvider(org.apache.hyracks.dataflow.std.file.IFileSplitProvider) IIndexDataflowHelperFactory(org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory) AlgebricksPartitionConstraint(org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint) JobSpecification(org.apache.hyracks.api.job.JobSpecification) IIndexDataflowHelperFactory(org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory) IndexDataflowHelperFactory(org.apache.hyracks.storage.am.common.dataflow.IndexDataflowHelperFactory) IndexDropOperatorDescriptor(org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor)

Example 5 with IndexDropOperatorDescriptor

use of org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor in project asterixdb by apache.

the class AbstractBTreeOperatorTest method destroyPrimaryIndex.

protected void destroyPrimaryIndex() throws Exception {
    JobSpecification spec = new JobSpecification();
    IndexDropOperatorDescriptor primaryDropOp = new IndexDropOperatorDescriptor(spec, primaryHelperFactory);
    PartitionConstraintHelper.addAbsoluteLocationConstraint(spec, primaryDropOp, NC1_ID);
    spec.addRoot(primaryDropOp);
    runTest(spec);
}
Also used : JobSpecification(org.apache.hyracks.api.job.JobSpecification) IndexDropOperatorDescriptor(org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor)

Aggregations

JobSpecification (org.apache.hyracks.api.job.JobSpecification)8 IndexDropOperatorDescriptor (org.apache.hyracks.storage.am.common.dataflow.IndexDropOperatorDescriptor)8 AlgebricksPartitionConstraint (org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint)4 IFileSplitProvider (org.apache.hyracks.dataflow.std.file.IFileSplitProvider)4 IIndexDataflowHelperFactory (org.apache.hyracks.storage.am.common.dataflow.IIndexDataflowHelperFactory)4 IndexDataflowHelperFactory (org.apache.hyracks.storage.am.common.dataflow.IndexDataflowHelperFactory)4 AMutableString (org.apache.asterix.om.base.AMutableString)1 AString (org.apache.asterix.om.base.AString)1