kevinrr888 commented on code in PR #5715:
URL: https://github.com/apache/accumulo/pull/5715#discussion_r2190911291
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java:
##########
@@ -1124,6 +1124,13 @@ private Map<String,String>
modifyPropertiesUnwrapped(String tableName,
Throwable cause = ae.getCause();
if (cause instanceof TableNotFoundException) {
throw new TableNotFoundException(null, tableName, null, ae);
+ } else if (cause instanceof ThriftTableOperationException) {
+ var ttoe = (ThriftTableOperationException) cause;
+ if (ttoe.getType() == TableOperationExceptionType.NAMESPACE_NOTFOUND) {
+ throw new TableNotFoundException(tableName, new
NamespaceNotFoundException(ttoe));
+ } else if (ttoe.getType() == TableOperationExceptionType.NOTFOUND) {
+ throw new TableNotFoundException(ttoe);
+ }
Review Comment:
Pushed a new commit 8a50b85b930dd623677850bb233d6d255263f28e
Please see the commit message there.
This pushes handling of ThriftTableOperationException closer to the thrift
code instead of handling in the implementation of the API methods. Not sure how
much better this is, but this avoids:
> The ThriftTableOperationException shouldn't be directly wrapped by
AccumuloException if it's a TNFE
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]