Con el cliente de HBase de Cloud Bigtable para Java, ambos métodos pueden arrojar una RetriesExhaustedWithDetailsException. Se arroja esta excepción cuando una o más de las operaciones por lotes fallan por algún motivo (por ejemplo, porque falló la conexión). Contiene una lista de solicitudes fallidas, junto con detalles sobre la excepción que causó la falla de cada solicitud.
Por sí misma, una RetriesExhaustedWithDetailsException no indica por qué falló una solicitud. Debes llamar a RetriesExhaustedWithDetailsException#getCauses() para recuperar las excepciones detalladas de cada solicitud fallida. Luego, puedes registrar información sobre cada una de las excepciones detalladas, lo que te ayudará a diagnosticar la falla:
try {
mutator.mutate(mutationList);
} catch (RetriesExhaustedWithDetailsException e) {
for (Throwable cause : e.getCauses()) {
cause.printStackTrace();
}
throw e;
}
También se puede generar una excepción cuando llamas a flush o close.
Se aplica el mismo manejo de errores.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eThe HBase API allows batch operations through \u003ccode\u003eTable#batch\u003c/code\u003e and \u003ccode\u003eBufferedMutator#mutate\u003c/code\u003e, both of which can throw a \u003ccode\u003eRetriesExhaustedWithDetailsException\u003c/code\u003e if one or more operations fail.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eRetriesExhaustedWithDetailsException\u003c/code\u003e alone doesn't specify the cause of failure; \u003ccode\u003eRetriesExhaustedWithDetailsException#getCauses()\u003c/code\u003e must be called to retrieve detailed exceptions for each failed request.\u003c/p\u003e\n"],["\u003cp\u003eExceptions during batch operations can be handled by iterating through the detailed exceptions provided by \u003ccode\u003egetCauses()\u003c/code\u003e to diagnose the failure.\u003c/p\u003e\n"],["\u003cp\u003eThe same exception handling process applies to errors that occur when calling \u003ccode\u003eflush\u003c/code\u003e or \u003ccode\u003eclose\u003c/code\u003e methods in batch operations.\u003c/p\u003e\n"]]],[],null,["Handle batch exceptions\n\nThe HBase API provides two ways to send multiple operations as a batch:\n\n- [`Table#batch(List, Object[])`](https://hbase.apache.org/2.5/apidocs/org/apache/hadoop/hbase/client/Table.html#batch-java.util.List-java.lang.Object:A-) combines multiple gets and mutations into a single batch.\n- [`BufferedMutator#mutate(List\u003c? extends Mutation\u003e mutations)`](https://hbase.apache.org/2.5/apidocs/org/apache/hadoop/hbase/client/BufferedMutator.html#mutate-java.util.List-) combines multiple mutations into a batch or series of batches.\n\nWith the Cloud Bigtable HBase client for Java, both of these methods can throw\na [`RetriesExhaustedWithDetailsException`](https://hbase.apache.org/2.5/apidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html). This exception is thrown\nwhen one or more of the batch operations fail for any reason (for example,\nbecause the connection failed). It contains a list of failed requests, along\nwith details about the exception that caused each request to fail.\n\nBy itself, a `RetriesExhaustedWithDetailsException` does not tell you why a\nrequest failed. You must call\n[`RetriesExhaustedWithDetailsException#getCauses()`](https://hbase.apache.org/2.5/apidocs/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.html#getCauses--) to retrieve the\ndetailed exceptions for each failed request. You can then log information about\neach of the detailed exceptions, which will help you diagnose the failure: \n\n try {\n mutator.mutate(mutationList);\n } catch (RetriesExhaustedWithDetailsException e) {\n for (Throwable cause : e.getCauses()) {\n cause.printStackTrace();\n }\n throw e;\n }\n\nAn exception can also be thrown when you call\n[`flush`](https://hbase.apache.org/2.5/devapidocs/org/apache/hadoop/hbase/procedure/flush/package-summary.html)\nor [`close`](https://hbase.apache.org/2.5/apidocs/org/apache/hadoop/hbase/client/Connection.html#close--).\nThe same error handling applies."]]