Con il client Cloud Bigtable HBase per Java, entrambi i metodi possono generare un RetriesExhaustedWithDetailsException. Questa eccezione viene lanciata quando una o più operazioni batch non riescono per qualsiasi motivo (ad esempio, a causa di un errore di connessione). Contiene un elenco di richieste non riuscite, insieme ai dettagli dell'eccezione che ha causato il fallimento di ogni richiesta.
Un codice RetriesExhaustedWithDetailsException da solo non indica il motivo per cui una richiesta non è andata a buon fine. Devi chiamare
RetriesExhaustedWithDetailsException#getCauses() per recuperare le
eccezioni dettagliate per ogni richiesta non riuscita. Puoi quindi registrare informazioni su ciascuna delle eccezioni dettagliate, che ti aiuteranno a diagnosticare l'errore:
try {
mutator.mutate(mutationList);
} catch (RetriesExhaustedWithDetailsException e) {
for (Throwable cause : e.getCauses()) {
cause.printStackTrace();
}
throw e;
}
Un'eccezione può essere generata anche quando chiami
flush
o close.
Si applica la stessa gestione degli errori.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-03-06 UTC."],[[["The HBase API allows batch operations through `Table#batch` and `BufferedMutator#mutate`, both of which can throw a `RetriesExhaustedWithDetailsException` if one or more operations fail."],["A `RetriesExhaustedWithDetailsException` alone doesn't specify the cause of failure; `RetriesExhaustedWithDetailsException#getCauses()` must be called to retrieve detailed exceptions for each failed request."],["Exceptions during batch operations can be handled by iterating through the detailed exceptions provided by `getCauses()` to diagnose the failure."],["The same exception handling process applies to errors that occur when calling `flush` or `close` methods in batch operations."]]],[]]