public void setIterator(String table, IteratorSetting setting) { try { // Remove any existing iterator settings of the same name, if applicable Map<String, EnumSet<IteratorScope>> iterators = connector.tableOperations().listIterators(table); if (iterators.containsKey(setting.getName())) { connector.tableOperations().removeIterator(table, setting.getName(), iterators.get(setting.getName())); } connector.tableOperations().attachIterator(table, setting); } catch (AccumuloSecurityException | AccumuloException e) { throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Failed to set iterator on table " + table, e); } catch (TableNotFoundException e) { throw new PrestoException(ACCUMULO_TABLE_DNE, "Failed to set iterator, table does not exist", e); } }
} else if (tables) { shellState.getAccumuloClient().tableOperations() .removeIterator(OptUtil.getTableOpt(cl, shellState), name, scopes); } else { throw new IllegalArgumentException("No table or namespace specified");
public void RemoveIterator(String table, IteratorSetting itset) throws AccumuloSecurityException, AccumuloException, TableNotFoundException { // try { connector.tableOperations().removeIterator(table, itset.getName(), EnumSet.allOf(IteratorUtil.IteratorScope.class)); // } catch (AccumuloSecurityException | AccumuloException | TableNotFoundException e) { // log.error("Problem removing iterator "+itset+" from table "+table, e); // } }
public void removeIterator(String tableName, String name, EnumSet<IteratorUtil.IteratorScope> scopes) throws D4mException { TableOperations tops = this.connector.tableOperations(); try { tops.removeIterator(tableName, name, scopes); } catch (AccumuloSecurityException | AccumuloException | TableNotFoundException e) { log.warn("",e); throw new D4mException(e); } }
private void removeAgeOffIterators(Connector con, String tableName) throws Exception { Map<String, EnumSet<IteratorScope>> iters = con.tableOperations().listIterators(tableName); for (String name : iters.keySet()) { if (name.startsWith("ageoff")) { con.tableOperations().removeIterator(tableName, name, AGEOFF_SCOPES); } } }
} else if (tables) { shellState.getConnector().tableOperations() .removeIterator(OptUtil.getTableOpt(cl, shellState), name, scopes); } else { throw new IllegalArgumentException("No table or namespace specified");
@Override public void removeIterator(ByteBuffer login, String tableName, String iterName, Set<org.apache.accumulo.proxy.thrift.IteratorScope> scopes) throws org.apache.accumulo.proxy.thrift.AccumuloException, org.apache.accumulo.proxy.thrift.AccumuloSecurityException, org.apache.accumulo.proxy.thrift.TableNotFoundException, TException { try { getConnector(login).tableOperations().removeIterator(tableName, iterName, getIteratorScopes(scopes)); } catch (Exception e) { handleExceptionTNF(e); } }
/** * This method takes a store and the name of an iterator to be * removed. * * @param store the accumulo store * @param iteratorName the name of the iterator update * @throws StoreException if any issues occur when updating the iterator */ public static void removeIterator(final AccumuloStore store, final String iteratorName) throws StoreException { try { if (store.getConnection().tableOperations().listIterators(store.getTableName()).containsKey(iteratorName)) { store.getConnection() .tableOperations() .removeIterator(store.getTableName(), iteratorName, EnumSet.of(IteratorScope.majc, IteratorScope.minc, IteratorScope.scan)); } } catch (final AccumuloSecurityException | AccumuloException | TableNotFoundException | StoreException e) { throw new StoreException("Unable remove iterator with Name: " + iteratorName, e); } }
tops.removeIterator(tableName, iteratorConfig.getIteratorName(), existingScopes); exists = false;
c.tableOperations().removeIterator(tableName, BadIterator.class.getSimpleName(), EnumSet.of(IteratorScope.minc));
IteratorUtil.IteratorScope.scan); if (existingSetting == null || !existingSetting.equals(ageoffConfig)) { connector.tableOperations().removeIterator(tableName, AgeOffFilter.class.getSimpleName(), EnumSet.allOf(IteratorUtil.IteratorScope.class)); try { connector.tableOperations().attachIterator(tableName, ageoffConfig, EnumSet.allOf(IteratorUtil.IteratorScope.class));
connector.tableOperations().removeIterator(tmp1, plusCombiner.getName(), EnumSet.allOf(IteratorUtil.IteratorScope.class)); } catch (AccumuloException | AccumuloSecurityException e) { log.error("problem while removing " + plusCombiner + " from "+tmp1, e);
connector.tableOperations().removeIterator(tableName, "vers", iteratorScopes);
break; case 26: ops.removeIterator(tableName, "a", EnumSet.of(IteratorScope.scan)); fail(); break;