String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
if (!master.security.canOnlineOfflineTable(c, tableId, op, namespaceId))
throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
master.fate.seedTransaction(opid, new TraceRepo<Master>(new ChangeTableState(tableId, tableOp)), autoCleanup);
break;
}
case TABLE_OFFLINE: {
TableOperation tableOp = TableOperation.OFFLINE;
final String tableId = validateTableIdArgument(arguments.get(0), tableOp, Tables.NOT_ROOT_ID);
String namespaceId = Tables.getNamespaceId(master.getInstance(), tableId);
if (!master.security.canOnlineOfflineTable(c, tableId, op, namespaceId))
throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
master.fate.seedTransaction(opid, new TraceRepo<Master>(new ChangeTableState(tableId, tableOp)), autoCleanup);
break;
}
case TABLE_MERGE: {
TableOperation tableOp = TableOperation.MERGE;
String tableName = validateTableNameArgument(arguments.get(0), tableOp, null);