use of io.pravega.segmentstore.contracts.ContainerException in project pravega by pravega.
the class RecoveryProcessor method recoverOperation.
protected void recoverOperation(DataFrameRecord<Operation> dataFrameRecord, OperationMetadataUpdater metadataUpdater) throws DataCorruptionException {
// Update Metadata Sequence Number.
Operation operation = dataFrameRecord.getItem();
metadataUpdater.setOperationSequenceNumber(operation.getSequenceNumber());
// Update the metadata with the information from the Operation.
try {
log.debug("{} Recovering {}.", this.traceObjectId, operation);
metadataUpdater.preProcessOperation(operation);
metadataUpdater.acceptOperation(operation);
} catch (StreamSegmentException | ContainerException ex) {
// Metadata update failures should not happen during recovery.
throw new DataCorruptionException(String.format("Unable to update metadata for Log Operation '%s'.", operation), ex);
}
// Update in-memory structures.
this.stateUpdater.process(operation);
}
Aggregations