@SuppressWarnings("squid:S1181") @Override public void add(ITupleReference tuple) throws HyracksDataException { try { componentBulkLoader.add(tuple); } catch (Throwable th) { opCtx.getIoOperation().setFailure(th); throw th; } }
@SuppressWarnings("squid:S1181") public void delete(ITupleReference tuple) throws HyracksDataException { try { componentBulkLoader.delete(tuple); } catch (Throwable th) { opCtx.getIoOperation().setFailure(th); throw th; } }
public LSMIndexDiskComponentBulkLoader(AbstractLSMIndex lsmIndex, ILSMIndexOperationContext opCtx, float fillFactor, boolean verifyInput, long numElementsHint) throws HyracksDataException { this.lsmIndex = lsmIndex; this.opCtx = opCtx; this.componentBulkLoader = opCtx.getIoOperation().getNewComponent().createBulkLoader(opCtx.getIoOperation(), fillFactor, verifyInput, numElementsHint, false, true, true); }
@Override public void abort() throws HyracksDataException { try { try { componentBulkLoader.abort(); } finally { ioOpCallback.afterFinalize(loadOp); } } finally { ioOpCallback.completed(loadOp); } }
@Override public void forceUpsert(ITupleReference tuple) throws HyracksDataException { ctx.setOperation(IndexOperation.UPSERT); lsmHarness.forceModify(ctx, tuple); }
@Override public boolean tryInsert(ITupleReference tuple) throws HyracksDataException { ctx.setOperation(IndexOperation.INSERT); return lsmHarness.modify(ctx, true, tuple); }
@Override public ILSMIOOperation scheduleFullMerge() throws HyracksDataException { ctx.setOperation(IndexOperation.FULL_MERGE); return lsmHarness.scheduleFullMerge(ctx); }
@Override public void forceUpdateMeta(IValueReference key, IValueReference value) throws HyracksDataException { // a hack because delete only gets the memory component ctx.setOperation(IndexOperation.DELETE); lsmHarness.forceUpdateMeta(ctx, key, value); }
@Override public void updateMeta(IValueReference key, IValueReference value) throws HyracksDataException { ctx.setOperation(IndexOperation.UPSERT); lsmHarness.updateMeta(ctx, key, value); }
@Override public void search(IIndexCursor cursor, ISearchPredicate searchPred) throws HyracksDataException { ctx.setOperation(IndexOperation.SEARCH); lsmHarness.search(ctx, cursor, searchPred); }
@Override public ILSMIOOperation scheduleFlush() throws HyracksDataException { ctx.setOperation(IndexOperation.FLUSH); return lsmHarness.scheduleFlush(ctx); }
@Override public void updateFilter(ITupleReference tuple) throws HyracksDataException { ctx.setOperation(IndexOperation.UPSERT); lsmHarness.updateFilter(ctx, tuple); }
public LSMIndexSearchCursor(ILSMIndexOperationContext opCtx, boolean returnDeletedTuples) { this.opCtx = opCtx; this.returnDeletedTuples = returnDeletedTuples; outputElement = null; needPushElementIntoQueue = false; switchComponentTupleBuilders = new ArrayTupleBuilder[opCtx.getIndex().getNumberOfAllMemoryComponents()]; switchRequest = new boolean[switchComponentTupleBuilders.length]; switchedElements = new PriorityQueueElement[switchComponentTupleBuilders.length]; }
@Override public ILSMIOOperation scheduleMerge(ILSMIndexOperationContext ctx) throws HyracksDataException { ILSMIOOperation operation; synchronized (opTracker) { operation = lsmIndex.createMergeOperation(ctx); } ioScheduler.scheduleOperation(operation); return operation; }
@Override public void forcePhysicalDelete(ITupleReference tuple) throws HyracksDataException { ctx.setOperation(IndexOperation.PHYSICALDELETE); lsmHarness.forceModify(ctx, tuple); }
@Override public void delete(ITupleReference tuple) throws HyracksDataException { ctx.setOperation(IndexOperation.DELETE); lsmHarness.modify(ctx, false, tuple); }
@Override public ILSMIOOperation scheduleFullMerge() throws HyracksDataException { ctx.setOperation(IndexOperation.FULL_MERGE); return lsmHarness.scheduleFullMerge(ctx); }
@Override public void forceUpdateMeta(IValueReference key, IValueReference value) throws HyracksDataException { ctx.setOperation(IndexOperation.UPSERT); lsmHarness.forceUpdateMeta(ctx, key, value); }