Search in sources :

Example 1 with AbstractTreeIndexBulkLoader

use of org.apache.hyracks.storage.am.common.impls.AbstractTreeIndex.AbstractTreeIndexBulkLoader in project asterixdb by apache.

the class AbstractLSMDiskComponentBulkLoader method delete.

@Override
public void delete(ITupleReference tuple) throws HyracksDataException {
    ILSMTreeTupleWriter tupleWriter = (ILSMTreeTupleWriter) ((AbstractTreeIndexBulkLoader) indexBulkLoader).getLeafFrame().getTupleWriter();
    tupleWriter.setAntimatter(true);
    try {
        ITupleReference t;
        if (indexTuple != null) {
            indexTuple.reset(tuple);
            t = indexTuple;
        } else {
            t = tuple;
        }
        indexBulkLoader.add(t);
        updateFilter(tuple);
    } catch (Exception e) {
        cleanupArtifacts();
        throw e;
    } finally {
        tupleWriter.setAntimatter(false);
    }
    if (isEmptyComponent) {
        isEmptyComponent = false;
    }
}
Also used : ITupleReference(org.apache.hyracks.dataflow.common.data.accessors.ITupleReference) AbstractTreeIndexBulkLoader(org.apache.hyracks.storage.am.common.impls.AbstractTreeIndex.AbstractTreeIndexBulkLoader) HyracksDataException(org.apache.hyracks.api.exceptions.HyracksDataException) ILSMTreeTupleWriter(org.apache.hyracks.storage.am.lsm.common.api.ILSMTreeTupleWriter)

Aggregations

HyracksDataException (org.apache.hyracks.api.exceptions.HyracksDataException)1 ITupleReference (org.apache.hyracks.dataflow.common.data.accessors.ITupleReference)1 AbstractTreeIndexBulkLoader (org.apache.hyracks.storage.am.common.impls.AbstractTreeIndex.AbstractTreeIndexBulkLoader)1 ILSMTreeTupleWriter (org.apache.hyracks.storage.am.lsm.common.api.ILSMTreeTupleWriter)1