private void updateAuthorizationFailures(Map<KeyExtent,SecurityErrorCode> authorizationFailures) { if (authorizationFailures.size() > 0) { // was a table deleted? HashSet<Table.ID> tableIds = new HashSet<>(); for (KeyExtent ke : authorizationFailures.keySet()) tableIds.add(ke.getTableId()); Tables.clearCache(context); for (Table.ID tableId : tableIds) if (!Tables.exists(context, tableId)) throw new TableDeletedException(tableId.canonicalID()); synchronized (this) { somethingFailed = true; mergeAuthorizationFailures(this.authorizationFailures, authorizationFailures); this.notifyAll(); } } }
if (conf == null && Tables.exists(context, tableId)) { conf = new TableConfiguration(context, tableId, getNamespaceConfigurationForTable(tableId)); ConfigSanityCheck.validate(conf);
if (!Tables.exists(context, tableId)) throw new TableDeletedException(tableId.canonicalID()); else if (Tables.getTableState(context, tableId) == TableState.OFFLINE)
private void queue(List<QCMutation> mutations) { List<QCMutation> failures = new ArrayList<>(); Map<String,TabletServerMutations<QCMutation>> binnedMutations = new HashMap<>(); try { locator.binMutations(context, mutations, binnedMutations, failures); if (failures.size() == mutations.size()) if (!Tables.exists(context, tableId)) throw new TableDeletedException(tableId.canonicalID()); else if (Tables.getTableState(context, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(context, tableId)); } catch (Exception e) { for (QCMutation qcm : mutations) qcm.queueResult(new Result(e, qcm, null)); // do not want to queue anything that was put in before binMutations() failed failures.clear(); binnedMutations.clear(); } if (failures.size() > 0) queueRetry(failures, null); for (Entry<String,TabletServerMutations<QCMutation>> entry : binnedMutations.entrySet()) { queue(entry.getKey(), entry.getValue()); } }
throw ase; } catch (Exception e) { if (!Tables.exists(context, tableId)) { throw new TableNotFoundException(tableId.canonicalID(), tableName, null);
if (!Tables.exists(context, tableId)) throw new TableDeletedException(tableId.canonicalID()); if (Tables.getTableState(context, tableId) == TableState.OFFLINE)
if (!Tables.exists(context, tableId)) fatalException = new TableDeletedException(tableId.canonicalID()); else
if (!Tables.exists(context, entry.getKey())) throw new TableDeletedException(entry.getKey().canonicalID()); else if (Tables.getTableState(context, tableId) == TableState.OFFLINE)
if (!Tables.exists(client, tableId)) throw new TableDeletedException(tableIdStr); if (Tables.getTableState(client, tableId) == TableState.OFFLINE)
if (!Tables.exists(client, tableId)) throw new TableDeletedException(tableIdStr); if (Tables.getTableState(client, tableId) == TableState.OFFLINE)
if (!Tables.exists(context, tableId)) throw new TableNotFoundException(tableId.canonicalID(), tableName, null); if (Tables.getTableState(context, tableId) == TableState.OFFLINE)
if (!Tables.exists(context, scanState.tableId)) throw new TableDeletedException(scanState.tableId.canonicalID()); else if (Tables.getTableState(context, scanState.tableId) == TableState.OFFLINE) } catch (AccumuloSecurityException e) { Tables.clearCache(context); if (!Tables.exists(context, scanState.tableId)) throw new TableDeletedException(scanState.tableId.canonicalID()); e.setTableInfo(Tables.getPrintableTableInfoFromId(context, scanState.tableId));
if (!Tables.exists(context, tableId)) throw new TableNotFoundException(tableId.canonicalID(), tableName, null); else if (Tables.getTableState(context, tableId) == TableState.OFFLINE) } catch (ThriftSecurityException e) { Tables.clearCache(context); if (!Tables.exists(context, tableId)) throw new TableNotFoundException(tableId.canonicalID(), tableName, null); throw new AccumuloSecurityException(e.user, e.code, e);
if (tabletCount == 0 && !Tables.exists(master.getContext(), tableId)) throw new AcceptableThriftTableOperationException(tableId.canonicalID(), null, TableOperation.COMPACT, TableOperationExceptionType.NOTFOUND, null);
if (tabletCount == 0 && !Tables.exists(master.getContext(), tableId)) throw new ThriftTableOperationException(tableId.canonicalID(), null, TableOperation.FLUSH, TableOperationExceptionType.NOTFOUND, null);
TableState currentState = Tables.getTableState(context, tableId); if (currentState != expectedState) { if (!Tables.exists(context, tableId)) throw new TableDeletedException(tableId.canonicalID()); if (currentState == TableState.DELETING)
if (!Tables.exists(clientContext, tableId)) throw new TableDeletedException(tableIdStr); if (Tables.getTableState(clientContext, tableId) == TableState.OFFLINE)
if (!Tables.exists(context, tableId)) throw new TableDeletedException(tableIdStr); if (Tables.getTableState(context, tableId) == TableState.OFFLINE)