private String getTableName(Table.ID tableId) { try { return Tables.getTableName(context, tableId); } catch (TableNotFoundException e) { return "Unknown Table with ID " + tableId; } }
public static String getPrintableTableInfoFromId(ClientContext context, Table.ID tableId) { String tableName = null; try { tableName = getTableName(context, tableId); } catch (TableNotFoundException e) { // handled in the string formatting } return tableName == null ? String.format("?(ID:%s)", tableId.canonicalID()) : String.format("%s(ID:%s)", tableName, tableId.canonicalID()); }
public static String getTableOfflineMsg(ClientContext context, Table.ID tableId) { if (tableId == null) return "Table <unknown table> is offline"; try { String tableName = Tables.getTableName(context, tableId); return "Table " + tableName + " (" + tableId.canonicalID() + ") is offline"; } catch (TableNotFoundException e) { return "Table <unknown table> (" + tableId.canonicalID() + ") is offline"; } }
/** * Returns participating tservers template * * @param tableID * Table ID for participating tservers * @return Participating tservers model */ @GET @Path("tables/{tableID}") @Template(name = "/default.ftl") public Map<String,Object> getTables( @PathParam("tableID") @NotNull @Pattern(regexp = ALPHA_NUM_REGEX_TABLE_ID) String tableID) throws TableNotFoundException { String tableName = Tables.getTableName(Monitor.getContext(), Table.ID.of(tableID)); Map<String,Object> model = getModel(); model.put("title", "Table Status"); model.put("template", "table.ftl"); model.put("js", "table.js"); model.put("tableID", tableID); model.put("table", tableName); return model; }
@Override public String getTable() throws TableNotFoundException { return Tables.getTableName(context, new KeyExtent(tac.getExtent()).getTableId()); }
ActiveScanImpl(ClientContext context, org.apache.accumulo.core.tabletserver.thrift.ActiveScan activeScan) throws TableNotFoundException { this.scanId = activeScan.scanId; this.client = activeScan.client; this.user = activeScan.user; this.age = activeScan.age; this.idle = activeScan.idleTime; this.tableName = Tables.getTableName(context, Table.ID.of(activeScan.tableId)); this.type = ScanType.valueOf(activeScan.getType().name()); this.state = ScanState.valueOf(activeScan.state.name()); this.extent = new KeyExtent(activeScan.extent); this.authorizations = new Authorizations(activeScan.authorizations); this.columns = new ArrayList<>(activeScan.columns.size()); for (TColumn tcolumn : activeScan.columns) this.columns.add(new Column(tcolumn)); this.ssiList = new ArrayList<>(); for (IterInfo ii : activeScan.ssiList) { this.ssiList.add(ii.iterName + "=" + ii.priority + "," + ii.className); } this.ssio = activeScan.ssio; }
cl.getOptionValue(optNamespace.getOpt())); for (Table.ID tableId : Namespaces.getTableIds(shellState.getContext(), namespaceId)) { tableSet.add(Tables.getTableName(shellState.getContext(), tableId));
tableName = Tables.getTableName(tabletServer.getContext(), tableId); } catch (TableNotFoundException e) { log.error("Could not find table with id {}", tableId);
@Override public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException, NamespaceNotFoundException, NamespaceExistsException { String old = cl.getArgs()[0]; String newer = cl.getArgs()[1]; boolean resetContext = false; Table.ID currentTableId = null; if (!(shellState.getTableName() == null) && !shellState.getTableName().isEmpty()) { Namespace.ID namespaceId = Namespaces.getNamespaceId(shellState.getContext(), old); List<Table.ID> tableIds = Namespaces.getTableIds(shellState.getContext(), namespaceId); currentTableId = Tables.getTableId(shellState.getContext(), shellState.getTableName()); resetContext = tableIds.contains(currentTableId); } shellState.getAccumuloClient().namespaceOperations().rename(old, newer); if (resetContext) { shellState.setTableName(Tables.getTableName(shellState.getContext(), currentTableId)); } return 0; }
String tableName = Tables.getTableName(context, tableId); AccumuloConfiguration acuTableConf = new ConfigurationCopy( context.tableOperations().getProperties(tableName));
String tableName = Tables.getTableName(master.getContext(), tableId); canBulkImport = master.security.canBulkImport(c, tableId, tableName, dir, null, namespaceId);