If you catch the MutationRejectedException you can get the violations.  
Something like:

}  catch (MutationsRejectedException mex) {
   log.warn("Failed to update reference for table: " + tableName);
   log.warn("Constraint violations: {}", mex.getConstraintViolationSummaries());
   throw new IllegalStateException("Failed to process table: " + tableName, 
mex);
}

Ed Coleman

From: Josef Roehrl <josef.roe...@fuseforward.com.INVALID>
Date: Monday, October 23, 2023 at 7:40 AM
To: dev@accumulo.apache.org <dev@accumulo.apache.org>
Subject: Re: MutationsRejectedException
Hi Logan,

If there was a constraint violation portion of the exception (the exception was 
not truncated), did that not provide enough info?

Could you post the exception? That always helps 🙂

Josef Roehrl​
FuseForward | Senior Architect - Professional Services
[https://fuseforward.atlassian.net/wiki/download/attachments/512327681/image001.png?version=1&modificationDate=1537397840684&cacheVersion=1&api=v2]

Website<https://fuseforward.com/?utm_source=Email%20Signature&utm_medium=email%20signature&utm_campaign=email%20signature>
 | 
Newsletter<https://fuseforward.com/subscribe-to-our-newsletter/?utm_source=Email%20Signature&utm_medium=Email%20Signature&utm_campaign=Email%20Signature>
 | Twitter<https://twitter.com/fuseforward> | 
LinkedIn<https://www.linkedin.com/company/fuseforward/?originalSubdomain=ca>

________________________________
From: Logan Jones <lo...@codescratch.com>
Sent: Friday, October 20, 2023 6:51 PM
To: dev@accumulo.apache.org <dev@accumulo.apache.org>
Subject: MutationsRejectedException

Hello everyone:

When a BatchWriter receives a MutationsRejectedException, is there any way
to tell exactly what mutations failed? As far as I can tell, this
information does not seem to be available on the exception. Is this true?

Thanks in advance,

- Logan

Reply via email to