@Test public void removeAccumuloNamespaceTables() { Set<String> tables = new HashSet<>(Arrays.asList(MetadataTable.NAME, RootTable.NAME, "a1", "a2")); DeleteTableCommand cmd = new DeleteTableCommand(); cmd.pruneTables(tables); assertEquals(new HashSet<>(Arrays.asList("a1", "a2")), tables); }
@Override protected void pruneTables(Set<String> tables) { Iterator<String> tableNames = tables.iterator(); while (tableNames.hasNext()) { String table = tableNames.next(); Pair<String,String> qualifiedName = Tables.qualify(table); if (Namespace.ACCUMULO.name().equals(qualifiedName.getFirst())) { log.trace("Removing table from deletion set: {}", table); tableNames.remove(); } } }
DeleteTableCommand extends TableOperation { @Override protected void pruneTables(Set<String> tables) { Iterator<String> tableNames = tables.iterator(); while (tableNames.hasNext()) { String table = tableNames.next(); Pair<String,String> qualifiedName = Tables.qualify(table); if (Namespace.ACCUMULO.name().equals(qualifiedName.getFirst())) { log.trace("Removing table from deletion set: {}", table); tableNames.remove(); } } } }
DeleteTableCommand extends TableOperation { @Override protected void pruneTables(Set<String> tables) { Iterator<String> tableNames = tables.iterator(); while (tableNames.hasNext()) { String table = tableNames.next(); Pair<String,String> qualifiedName = Tables.qualify(table); if (Namespace.ACCUMULO.name().equals(qualifiedName.getFirst())) { log.trace("Removing table from deletion set: {}", table); tableNames.remove(); } } }  }
DeleteTableCommand extends TableOperation { @Override protected void pruneTables(Set<String> tables) { Iterator<String> tableNames = tables.iterator(); while (tableNames.hasNext()) { String table = tableNames.next(); Pair<String,String> qualifiedName = Tables.qualify(table); if (Namespace.ACCUMULO.name().equals(qualifiedName.getFirst())) { log.trace("Removing table from deletion set: {}", table); tableNames.remove(); } } }  @Override int execute(final String fullCommand, final CommandLine cl, final Shell shellState); @Override String description(); @Override Options getOptions(); }
DeleteTableCommand extends TableOperation { @Override protected void pruneTables(Set<String> tables) { Iterator<String> tableNames = tables.iterator(); while (tableNames.hasNext()) { String table = tableNames.next(); Pair<String,String> qualifiedName = Tables.qualify(table); if (Namespace.ACCUMULO.name().equals(qualifiedName.getFirst())) { log.trace("Removing table from deletion set: {}", table); tableNames.remove(); } } }  @Override int execute(final String fullCommand, final CommandLine cl, final Shell shellState); @Override String description(); @Override Options getOptions();  }