Table.ID getTableId(String tableName) throws TableNotFoundException { Table.ID tableId = Tables.getTableId(this, tableName); if (Tables.getTableState(this, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(this, tableId)); return tableId; }
throw new TableDeletedException(tableId.canonicalID()); else if (Tables.getTableState(context, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(context, tableId));
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 new TableDeletedException(tableId.canonicalID()); if (Tables.getTableState(context, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(context, tableId));
else if (Tables.getTableState(context, tableId) == TableState.OFFLINE) throw new TableOfflineException( Tables.getTableOfflineMsg(context, entry.getKey()));
log.debug("TableOfflineException occurred in background thread. Throwing new exception", excep); throw new TableOfflineException(Tables.getTableOfflineMsg(context, tableId)); } else if (excep instanceof AccumuloSecurityException) {
throw new TableDeletedException(tableIdStr); if (Tables.getTableState(client, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(client, tableId)); binnedRanges.clear(); log.warn("Unable to locate bins for specified ranges. Retrying.");
throw new TableDeletedException(tableIdStr); if (Tables.getTableState(client, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(client, tableId)); binnedRanges.clear(); log.warn("Unable to locate bins for specified ranges. Retrying.");
throw new TableNotFoundException(tableId.canonicalID(), tableName, null); if (Tables.getTableState(context, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(context, tableId));
else if (Tables.getTableState(context, scanState.tableId) == TableState.OFFLINE) throw new TableOfflineException( Tables.getTableOfflineMsg(context, scanState.tableId));
throw new TableNotFoundException(tableId.canonicalID(), tableName, null); else if (Tables.getTableState(context, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(context, tableId)); continue;
case OFFLINE: throw new TableOfflineException( Tables.getTableOfflineMsg(context, Tables.getTableId(context, tableOrNamespaceName))); default: throw new AccumuloException(e.description, e);
@Override public List<Summary> retrieve() throws AccumuloException, AccumuloSecurityException, TableNotFoundException { Table.ID tableId = Tables.getTableId(context, tableName); if (Tables.getTableState(context, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(context, tableId)); TRowRange range = new TRowRange(TextUtil.getByteBuffer(startRow), TextUtil.getByteBuffer(endRow)); TSummaryRequest request = new TSummaryRequest(tableId.canonicalID(), range, summariesToFetch, summarizerClassRegex); if (flush) { _flush(tableId, startRow, endRow, true); } TSummaries ret = ServerClient.execute(context, new TabletClientService.Client.Factory(), client -> { TSummaries tsr = client.startGetSummaries(Tracer.traceInfo(), context.rpcCreds(), request); while (!tsr.finished) { tsr = client.contiuneGetSummaries(Tracer.traceInfo(), tsr.sessionId); } return tsr; }); return new SummaryCollection(ret).getSummaries(); }
throw new TableDeletedException(tableIdStr); if (Tables.getTableState(clientContext, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(clientContext, tableId)); binnedRanges.clear(); log.warn("Unable to locate bins for specified ranges. Retrying.");
throw new TableDeletedException(tableIdStr); if (Tables.getTableState(context, tableId) == TableState.OFFLINE) throw new TableOfflineException(Tables.getTableOfflineMsg(context, tableId)); binnedRanges.clear(); log.warn("Unable to locate bins for specified ranges. Retrying.");