You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/07/24 23:58:33 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1289: Improve exception javadoc in TableOperations

ctubbsii commented on a change in pull request #1289: Improve exception javadoc in TableOperations
URL: https://github.com/apache/accumulo/pull/1289#discussion_r307067772
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/clientImpl/ReplicationOperationsImpl.java
 ##########
 @@ -113,8 +114,20 @@ public void drain(final String tableName, final Set<String> wals)
   protected boolean getMasterDrain(final TInfo tinfo, final TCredentials rpcCreds,
       final String tableName, final Set<String> wals)
       throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-    return MasterClient.execute(context,
-        client -> client.drainReplicationTable(tinfo, rpcCreds, tableName, wals));
+    boolean result;
+    try {
+      result = MasterClient.execute(context,
+          client -> client.drainReplicationTable(tinfo, rpcCreds, tableName, wals));
+    } catch (ThriftTableOperationException e) {
+      switch (e.getType()) {
+        case NAMESPACE_NOTFOUND:
 
 Review comment:
   Oh, I see. Yeah, I guess it's ugly, but I'm not sure what's better right now.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services