Mit dem Cloud Bigtable HBase-Client für Java können beide Methoden eine RetriesExhaustedWithDetailsException auslösen. Diese Ausnahme wird ausgelöst, wenn mindestens ein Batch-Vorgang aus beliebigem Grund nicht möglich ist (beispielsweise bei fehlgeschlagener Verbindung). Sie enthält eine Liste fehlgeschlagener Anfragen mit Details über die Ausnahme, die das Scheitern des Befehls ausgelöst hat.
Eine Ausnahme der Art RetriesExhaustedWithDetailsException allein sagt nichts darüber aus, warum eine Anfrage fehlgeschlagen ist. Sie müssen RetriesExhaustedWithDetailsException#getCauses() aufrufen, um die detaillierten Ausnahmen für jede fehlgeschlagene Anfrage abzurufen. Für die Fehlerdiagnose ist es hilfreich, wenn Sie die Informationen über die einzelnen Ausnahmen protokollieren:
try {
mutator.mutate(mutationList);
} catch (RetriesExhaustedWithDetailsException e) {
for (Throwable cause : e.getCauses()) {
cause.printStackTrace();
}
throw e;
}
Eine Ausnahme kann auch auftreten, wenn Sie flush oder close aufrufen.
Es gilt dieselbe Fehlerbehandlung.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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."]]],[]]