@Override protected ILSMIOOperation createMergeOperation(AbstractLSMIndexOperationContext opCtx, LSMComponentFileReferences mergeFileRefs, ILSMIOOperationCallback callback) { boolean returnDeletedTuples = false; ILSMIndexAccessor accessor = createAccessor(opCtx); List<ILSMComponent> mergingComponents = opCtx.getComponentHolder(); if (mergingComponents.get(mergingComponents.size() - 1) != diskComponents.get(diskComponents.size() - 1)) { returnDeletedTuples = true; } LSMBTreeRangeSearchCursor cursor = new LSMBTreeRangeSearchCursor(opCtx, returnDeletedTuples); return new LSMBTreeMergeOperation(accessor, cursor, mergeFileRefs.getInsertIndexFileReference(), mergeFileRefs.getBloomFilterFileReference(), callback, getIndexIdentifier()); } }
@Override protected ILSMIOOperation createMergeOperation(AbstractLSMIndexOperationContext opCtx, LSMComponentFileReferences mergeFileRefs, ILSMIOOperationCallback callback) throws HyracksDataException { boolean returnDeletedTuples = false; List<ILSMComponent> mergingComponents = opCtx.getComponentHolder(); if (mergingComponents.get(mergingComponents.size() - 1) != diskComponents.get(diskComponents.size() - 1)) { returnDeletedTuples = true; } LSMRTreeWithAntiMatterTuplesSearchCursor cursor = new LSMRTreeWithAntiMatterTuplesSearchCursor(opCtx, returnDeletedTuples); ILSMIndexAccessor accessor = new LSMTreeIndexAccessor(getHarness(), opCtx, cursorFactory); return new LSMRTreeMergeOperation(accessor, cursor, mergeFileRefs.getInsertIndexFileReference(), null, null, callback, getIndexIdentifier()); } }
mergeCtx.getComponentHolder().addAll(mergingComponents); propagateMap(ctx, mergeCtx); mergingComponents.stream().forEach(mergeCtx.getComponentsToBeMerged()::add);