use of org.apache.hadoop.hbase.client.RetriesExhaustedException.ThrowableWithExtraContext in project hbase by apache.
the class AsyncBatchRpcRetryingCaller method failOne.
private void failOne(Action action, int tries, Throwable error, long currentTime, String extras) {
CompletableFuture<T> future = action2Future.get(action);
if (future.isDone()) {
return;
}
ThrowableWithExtraContext errorWithCtx = new ThrowableWithExtraContext(error, currentTime, extras);
List<ThrowableWithExtraContext> errors = removeErrors(action);
if (errors == null) {
errors = Collections.singletonList(errorWithCtx);
} else {
errors.add(errorWithCtx);
}
future.completeExceptionally(new RetriesExhaustedException(tries - 1, errors));
}
use of org.apache.hadoop.hbase.client.RetriesExhaustedException.ThrowableWithExtraContext in project hbase by apache.
the class AsyncBatchRpcRetryingCaller method addError.
private void addError(Action action, Throwable error, ServerName serverName) {
List<ThrowableWithExtraContext> errors;
synchronized (action2Errors) {
errors = action2Errors.computeIfAbsent(action, k -> new ArrayList<>());
}
errors.add(new ThrowableWithExtraContext(error, EnvironmentEdgeManager.currentTime(), getExtraContextForError(serverName)));
}
Aggregations