@Override public void end() throws HyracksDataException { try { ioOpCallback.afterOperation(loadOp); componentBulkLoader.end(); if (component.getComponentSize() > 0) { if (isTransaction) { // Since this is a transaction component, validate and // deactivate. it could later be added or deleted try { component.markAsValid(durable, loadOp); } finally { ioOpCallback.afterFinalize(loadOp); } component.deactivate(); } else { ioOpCallback.afterFinalize(loadOp); getHarness().addBulkLoadedComponent(loadOp); } } } finally { ioOpCallback.completed(loadOp); } }
private void presistComponentToDisk() throws HyracksDataException { try { lsmIndex.getIOOperationCallback().afterOperation(opCtx.getIoOperation()); componentBulkLoader.end(); } catch (Throwable th) { // NOSONAR Must not call afterFinalize without setting failure fail(th); throw th; } finally { lsmIndex.getIOOperationCallback().afterFinalize(opCtx.getIoOperation()); } if (opCtx.getIoOperation().getStatus() == LSMIOOperationStatus.SUCCESS && opCtx.getIoOperation().getNewComponent().getComponentSize() > 0) { lsmIndex.getHarness().addBulkLoadedComponent(opCtx.getIoOperation()); } }