ctubbsii commented on code in PR #5433:
URL: https://github.com/apache/accumulo/pull/5433#discussion_r2019365780


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java:
##########
@@ -1511,15 +1511,13 @@ private void changeTableState(String tableName, boolean 
wait, TableState newStat
     switch (newState) {
       case OFFLINE:
         op = TFateOperation.TABLE_OFFLINE;
-        if (tableName.equals(AccumuloTable.METADATA.tableName())
-            || tableName.equals(AccumuloTable.ROOT.tableName())) {
-          throw new AccumuloException("Cannot set table to offline state");
-        }
+        NOT_BUILTIN_TABLE.validate(tableName);

Review Comment:
   In this case, we'd use the validator to catch the exception and suppress 
it... I'm not sure we should be replacing `if` statements with `try-catch` 
blocks, generally. It seems it would be more useful to have a general 
`isSystemNamespace?` method for tables.



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to