Search in sources :

Example 1 with WriteFailedException

use of io.pravega.controller.task.Stream.WriteFailedException in project pravega by pravega.

the class CommitEventProcessor method writeEvent.

private CompletableFuture<Void> writeEvent(CommitEvent event) {
    UUID txnId = event.getTxid();
    log.debug("Transaction {}, pushing back CommitEvent to commitStream", txnId);
    return this.getSelfWriter().write(event).handleAsync((v, e) -> {
        if (e == null) {
            log.debug("Transaction {}, sent request to commitStream", txnId);
            return null;
        } else {
            Throwable realException = Exceptions.unwrap(e);
            log.warn("Transaction {}, failed sending event to commitStream. Exception: {} Retrying...", txnId, realException.getClass().getSimpleName());
            throw new WriteFailedException(realException);
        }
    }, executor);
}
Also used : UUID(java.util.UUID) WriteFailedException(io.pravega.controller.task.Stream.WriteFailedException)

Aggregations

WriteFailedException (io.pravega.controller.task.Stream.WriteFailedException)1 UUID (java.util.UUID)1