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);
}
Aggregations