kevinrr888 commented on code in PR #5433:
URL: https://github.com/apache/accumulo/pull/5433#discussion_r2018803754
##########
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:
Did some more digging. The difference in Exceptions is where they are
thrown, if validated in thrift (`FateServiceHandler`) will get the
`AccumuloException`. So can move this validation from `TableOperationsImpl` to
`FateServiceHandler`, where most of the table validation is done.
As for what ops are/aren't acceptable on system tables, in 2.1, can
`online/offline` any table that's not the ROOT table, can `deleteRows` of any
table that's not the METADATA table, and can `bulkImportv2` any table that's
not the ROOT table. The other ops like `delete`, `create`, etc. ensure that
it's not a built in table (which is just META and ROOT in 2.1, I believe)
These were the 3 that stood out as weird to me. Seems like these should be
all system tables, not just META or ROOT.
--
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]