@Override public ILSMDiskComponent createBulkLoadTarget() throws HyracksDataException { LSMComponentFileReferences componentFileRefs = fileManager.getRelFlushFileReference(); return createDiskComponent(bulkLoadComponentFactory, componentFileRefs.getInsertIndexFileReference(), componentFileRefs.getDeleteIndexFileReference(), componentFileRefs.getBloomFilterFileReference(), true); }
@Override public ILSMIOOperation createFlushOperation(ILSMIndexOperationContext ctx) throws HyracksDataException { ILSMMemoryComponent flushingComponent = getCurrentMemoryComponent(); if (flushingComponent.getWriterCount() > 0) { throw new IllegalStateException( "createFlushOperation is called on a component with writers: " + flushingComponent); } // take care of the flush cycling ILSMIOOperation flushOp = TracedIOOperation.wrap(createFlushOperation(createOpContext(NoOpIndexAccessParameters.INSTANCE), fileManager.getRelFlushFileReference(), ioOpCallback), tracer); // Changing the flush status should *always* precede changing the mutable component. flushingComponent.schedule(LSMIOOperationType.FLUSH); numScheduledFlushes++; changeFlushStatusForCurrentMutableCompoent(false); changeMutableComponent(); ILSMIndexAccessor accessor = flushOp.getAccessor(); ILSMIndexOperationContext flushCtx = accessor.getOpContext(); flushCtx.setOperation(ctx.getOperation()); // Could be component delete flushCtx.getComponentHolder().add(flushingComponent); flushCtx.setIoOperation(flushOp); propagateMap(ctx, flushCtx); ioOpCallback.scheduled(flushOp); return flushOp; }
public IIndexBulkLoader createBulkLoader(float fillLevel, boolean verifyInput, long numElementsHint, Map<String, Object> parameters) throws HyracksDataException { AbstractLSMIndexOperationContext opCtx = createOpContext(NoOpIndexAccessParameters.INSTANCE); opCtx.setParameters(parameters); LSMComponentFileReferences componentFileRefs = fileManager.getRelFlushFileReference(); LoadOperation loadOp = new LoadOperation(componentFileRefs, ioOpCallback, getIndexIdentifier(), parameters); loadOp.setNewComponent(createDiskComponent(bulkLoadComponentFactory, componentFileRefs.getInsertIndexFileReference(), componentFileRefs.getDeleteIndexFileReference(), componentFileRefs.getBloomFilterFileReference(), true)); ioOpCallback.scheduled(loadOp); opCtx.setIoOperation(loadOp); return new LSMIndexDiskComponentBulkLoader(this, opCtx, fillLevel, verifyInput, numElementsHint); }
public LSMTwoPCBTreeBulkLoader(float fillFactor, boolean verifyInput, long numElementsHint, boolean isTransaction, Map<String, Object> parameters) throws HyracksDataException { this.isTransaction = isTransaction; // Create the appropriate target LSMComponentFileReferences componentFileRefs; if (isTransaction) { try { componentFileRefs = fileManager.getNewTransactionFileReference(); } catch (IOException e) { throw HyracksDataException.create(e); } component = createDiskComponent(transactionComponentFactory, componentFileRefs.getInsertIndexFileReference(), null, componentFileRefs.getBloomFilterFileReference(), true); } else { componentFileRefs = fileManager.getRelFlushFileReference(); component = createDiskComponent(bulkLoadComponentFactory, componentFileRefs.getInsertIndexFileReference(), componentFileRefs.getDeleteIndexFileReference(), componentFileRefs.getBloomFilterFileReference(), true); } loadOp = new LoadOperation(componentFileRefs, ioOpCallback, getIndexIdentifier(), parameters); loadOp.setNewComponent(component); ioOpCallback.scheduled(loadOp); ioOpCallback.beforeOperation(loadOp); componentBulkLoader = component.createBulkLoader(loadOp, fillFactor, verifyInput, numElementsHint, false, true, true); }
ILSMIndexFileManager primaryFileManager = (ILSMIndexFileManager) fileManagerField.get(primaryLsmBtree); final ResourceReference primaryRef = ResourceReference .of(primaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager primaryCheckpointManager = getIndexCheckpointManagerProvider().get(primaryRef); IndexCheckpoint latestPrimaryCheckpoint = primaryCheckpointManager.getLatest(); ILSMIndexFileManager secondaryFileManager = (ILSMIndexFileManager) fileManagerField.get(secondaryLsmBtree); final ResourceReference secondaryRef = ResourceReference.of( secondaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager secondaryCheckpointManager = getIndexCheckpointManagerProvider().get(secondaryRef); IndexCheckpoint latestSecondaryCheckpoint = secondaryCheckpointManager.getLatest();
public LSMTwoPCRTreeBulkLoader(float fillFactor, boolean verifyInput, long numElementsHint, boolean isTransaction, Map<String, Object> parameters) throws HyracksDataException { this.isTransaction = isTransaction; // Create the appropriate target LSMComponentFileReferences componentFileRefs; if (isTransaction) { try { componentFileRefs = fileManager.getNewTransactionFileReference(); } catch (IOException e) { throw HyracksDataException.create(e); } component = createDiskComponent(componentFactory, componentFileRefs.getInsertIndexFileReference(), componentFileRefs.getDeleteIndexFileReference(), componentFileRefs.getBloomFilterFileReference(), true); } else { componentFileRefs = fileManager.getRelFlushFileReference(); component = createDiskComponent(bulkLoadComponentFactory, componentFileRefs.getInsertIndexFileReference(), componentFileRefs.getDeleteIndexFileReference(), componentFileRefs.getBloomFilterFileReference(), true); } loadOp = new LoadOperation(componentFileRefs, ioOpCallback, getIndexIdentifier(), parameters); loadOp.setNewComponent(component); ioOpCallback.scheduled(loadOp); ioOpCallback.beforeOperation(loadOp); componentBulkLoader = component.createBulkLoader(loadOp, fillFactor, verifyInput, numElementsHint, false, true, false); }
public LSMTwoPCBTreeWithBuddyBulkLoader(float fillFactor, boolean verifyInput, long numElementsHint, boolean isTransaction, Map<String, Object> parameters) throws HyracksDataException { this.isTransaction = isTransaction; // Create the appropriate target LSMComponentFileReferences componentFileRefs; if (isTransaction) { try { componentFileRefs = fileManager.getNewTransactionFileReference(); } catch (IOException e) { throw HyracksDataException.create(e); } component = createDiskComponent(bulkLoadComponentFactory, componentFileRefs.getInsertIndexFileReference(), componentFileRefs.getDeleteIndexFileReference(), componentFileRefs.getBloomFilterFileReference(), true); } else { componentFileRefs = fileManager.getRelFlushFileReference(); component = createDiskComponent(bulkLoadComponentFactory, componentFileRefs.getInsertIndexFileReference(), componentFileRefs.getDeleteIndexFileReference(), componentFileRefs.getBloomFilterFileReference(), true); } loadOp = new LoadOperation(componentFileRefs, ioOpCallback, getIndexIdentifier(), parameters); loadOp.setNewComponent(component); ioOpCallback.scheduled(loadOp); ioOpCallback.beforeOperation(loadOp); componentBulkLoader = component.createBulkLoader(loadOp, fillFactor, verifyInput, numElementsHint, false, true, false); }
ILSMIndexFileManager primaryFileManager = (ILSMIndexFileManager) fileManagerField.get(primaryLsmBtree); final ResourceReference primaryRef = ResourceReference .of(primaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager primaryCheckpointManager = getIndexCheckpointManagerProvider().get(primaryRef); secondaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager secondaryCheckpointManager = getIndexCheckpointManagerProvider().get(secondaryRef); IndexCheckpoint latestPrimaryCheckpoint = primaryCheckpointManager.getLatest();
ILSMIndexFileManager primaryFileManager = (ILSMIndexFileManager) fileManagerField.get(primaryLsmBtree); final ResourceReference primaryRef = ResourceReference .of(primaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager primaryCheckpointManager = getIndexCheckpointManagerProvider().get(primaryRef); IndexCheckpoint latestPrimaryCheckpoint = primaryCheckpointManager.getLatest(); ILSMIndexFileManager secondaryFileManager = (ILSMIndexFileManager) fileManagerField.get(secondaryLsmBtree); final ResourceReference secondaryRef = ResourceReference.of( secondaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager secondaryCheckpointManager = getIndexCheckpointManagerProvider().get(secondaryRef); IndexCheckpoint latestSecondaryCheckpoint = secondaryCheckpointManager.getLatest();
ILSMIndexFileManager primaryFileManager = (ILSMIndexFileManager) fileManagerField.get(primaryLsmBtree); final ResourceReference primaryRef = ResourceReference .of(primaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager primaryCheckpointManager = getIndexCheckpointManagerProvider().get(primaryRef); IndexCheckpoint latestPrimaryCheckpoint = primaryCheckpointManager.getLatest(); ILSMIndexFileManager secondaryFileManager = (ILSMIndexFileManager) fileManagerField.get(secondaryLsmBtree); final ResourceReference secondaryRef = ResourceReference.of( secondaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager secondaryCheckpointManager = getIndexCheckpointManagerProvider().get(secondaryRef); IndexCheckpoint latestSecondaryCheckpoint = secondaryCheckpointManager.getLatest();
ILSMIndexFileManager primaryFileManager = (ILSMIndexFileManager) fileManagerField.get(primaryLsmBtree); final ResourceReference primaryRef = ResourceReference .of(primaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager primaryCheckpointManager = getIndexCheckpointManagerProvider().get(primaryRef); IndexCheckpoint latestPrimaryCheckpoint = primaryCheckpointManager.getLatest(); ILSMIndexFileManager secondaryFileManager = (ILSMIndexFileManager) fileManagerField.get(secondaryLsmBtree); final ResourceReference secondaryRef = ResourceReference.of( secondaryFileManager.getRelFlushFileReference().getInsertIndexFileReference().getAbsolutePath()); IIndexCheckpointManager secondaryCheckpointManager = getIndexCheckpointManagerProvider().get(secondaryRef); IndexCheckpoint latestSecondaryCheckpoint = secondaryCheckpointManager.getLatest();