@Override public Throwable getFailure() { return ioOp.getFailure(); }
@Override public Throwable getFailure() { return opCtx.getIoOperation().getFailure(); }
private void after(ILSMIOOperation operation) { if (operation.getIOOpertionType() == LSMIOOperationType.FLUSH) { synchronized (runningFlushOperations) { runningFlushOperations.remove(operation.getIndexIdentifier()); if (operation.getStatus() == LSMIOOperationStatus.FAILURE) { failedGroups.putIfAbsent(operation.getIndexIdentifier(), operation.getFailure()); } operation.complete(); runningFlushOperations.notifyAll(); } } else { operation.complete(); } }
private void doAfterExecute(ILSMIOOperation executedOp, Throwable t) throws HyracksDataException { final boolean failed = (t != null) || (executedOp.getStatus() == LSMIOOperationStatus.FAILURE); if (failed) { fail(executedOp, t != null ? t : executedOp.getFailure()); } if (!failed || executedOp.getIOOpertionType() != LSMIOOperationType.FLUSH) { executedOp.complete(); // destroy if merge or successful flush } if (executedOp.getIOOpertionType() == LSMIOOperationType.FLUSH) { String id = executedOp.getIndexIdentifier(); synchronized (this) { runningFlushOperations.remove(id); if (waitingFlushOperations.containsKey(id)) { ILSMIOOperation op = waitingFlushOperations.get(id).poll(); if (op != null) { scheduler.scheduleOperation(op); } else { waitingFlushOperations.remove(id); } } } } }
private void run(ILSMIOOperation operation) { try { operation.call(); } catch (Throwable th) { // NOSONAR Must catch all LOGGER.log(Level.ERROR, "IO Operation failed", th); operation.setStatus(LSMIOOperationStatus.FAILURE); operation.setFailure(th); } if (operation.getStatus() == LSMIOOperationStatus.FAILURE) { failureCallback.operationFailed(operation, operation.getFailure()); } }
@SuppressWarnings("squid:S1181") @Override public void addBulkLoadedComponent(ILSMIOOperation ioOperation) throws HyracksDataException { ILSMDiskComponent c = ioOperation.getNewComponent(); try { c.markAsValid(lsmIndex.isDurable(), ioOperation); } catch (Throwable th) { ioOperation.setFailure(th); } if (ioOperation.hasFailed()) { throw HyracksDataException.create(ioOperation.getFailure()); } synchronized (opTracker) { lsmIndex.addDiskComponent(c); if (replicationEnabled) { componentsToBeReplicated.clear(); componentsToBeReplicated.add(c); triggerReplication(componentsToBeReplicated, LSMOperationType.LOAD); } mergePolicy.diskComponentAdded(lsmIndex, false); } }
throw HyracksDataException.create(flush.getFailure());
@SuppressWarnings("squid:S1181") @Override public void addBulkLoadedComponent(ILSMIOOperation ioOperation) throws HyracksDataException { ILSMDiskComponent c = ioOperation.getNewComponent(); try { c.markAsValid(lsmIndex.isDurable(), ioOperation); } catch (Throwable th) { ioOperation.setFailure(th); } if (ioOperation.hasFailed()) { throw HyracksDataException.create(ioOperation.getFailure()); } synchronized (opTracker) { lsmIndex.addDiskComponent(c); if (replicationEnabled) { componentsToBeReplicated.clear(); componentsToBeReplicated.add(c); triggerReplication(componentsToBeReplicated, LSMOperationType.LOAD); } // Enter the component enterComponent(c); mergePolicy.diskComponentAdded(lsmIndex, false); } }
throw HyracksDataException.create(ioOperation.getFailure()); throw HyracksDataException.create(ioOperation.getFailure());
private void flush(OrderedIndexTestContext ctx) throws HyracksDataException, InterruptedException { ILSMIOOperation flush = scheduleFlush(ctx); flush.sync(); if (flush.getStatus() == LSMIOOperationStatus.FAILURE) { throw HyracksDataException.create(flush.getFailure()); } }
op.sync(); if (op.getStatus() == LSMIOOperationStatus.FAILURE) { throw HyracksDataException.create(op.getFailure());
flush.sync(); if (flush.getStatus() == LSMIOOperationStatus.FAILURE) { throw HyracksDataException.create(flush.getFailure());
flush.sync(); if (flush.getStatus() == LSMIOOperationStatus.FAILURE) { throw HyracksDataException.create(flush.getFailure());
merge.sync(); if (merge.getStatus() == LSMIOOperationStatus.FAILURE) { throw HyracksDataException.create(merge.getFailure());
flush.sync(); if (flush.getStatus() == LSMIOOperationStatus.FAILURE) { throw HyracksDataException.create(flush.getFailure());