use of org.apache.hyracks.storage.am.common.api.ITwoPCIndexBulkLoader in project asterixdb by apache.
the class ExternalIndexBulkModifyOperatorNodePushable method open.
// We override this method to do two things
// when creating the bulkLoader, it creates a transaction bulk loader
// It uses the bulkLoader to insert delete tuples for the deleted files
@Override
public void open() throws HyracksDataException {
accessor = new FrameTupleAccessor(recDesc);
indexHelper.open();
index = indexHelper.getIndexInstance();
try {
writer.open();
// Transactional BulkLoader
bulkLoader = ((ITwoPCIndex) index).createTransactionBulkLoader(fillFactor, verifyInput, deletedFiles.length);
// Delete files
for (int i = 0; i < deletedFiles.length; i++) {
fileNumber.setValue(deletedFiles[i]);
FilesIndexDescription.getBuddyBTreeTupleFromFileNumber(deleteTuple, buddyBTreeTupleBuilder, fileNumber);
((ITwoPCIndexBulkLoader) bulkLoader).delete(deleteTuple);
}
} catch (Throwable e) {
throw new HyracksDataException(e);
}
}
Aggregations