@Override public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, long maxMemory, long maxLatency, int maxWriteThreads) throws TableNotFoundException { return wrapped.createBatchDeleter(tableName, authorizations, numQueryThreads, maxMemory, maxLatency, maxWriteThreads); }
private BatchDeleter createBatchDeleter(final String tableName, final Authorizations authorizations) throws TableNotFoundException { return connector.createBatchDeleter(tableName, authorizations, NUM_THREADS, MAX_MEMORY, MAX_TIME, NUM_THREADS); }
private BatchDeleter createBatchDeleter(final String tableName, final Authorizations authorizations) throws TableNotFoundException { return connector.createBatchDeleter(tableName, authorizations, NUM_THREADS, MAX_MEMORY, MAX_TIME, NUM_THREADS); }
@Override public void clear() { log.trace("Clearing Accumulo cache for table {}.", tableName); try { BatchWriterConfig bwCfg = new BatchWriterConfig(); BatchDeleter deleter = connector.createBatchDeleter(tableName, authorizations, 10, bwCfg); try { deleter.setRanges(Collections.singletonList(new Range())); deleter.delete(); } finally { deleter.close(); } } catch (MutationsRejectedException | TableNotFoundException e) { throw new PersistenceException("Unable to clear Accumulo cache for " + tableName, e); } }
BatchDeleter ibd = env.getConnector().createBatchDeleter(indexTableName, Authorizations.EMPTY, 8, bwc); ibd.setRanges(Collections.singletonList(new Range())); BatchDeleter dbd = env.getConnector().createBatchDeleter(dataTableName, Authorizations.EMPTY, 8, bwc); dbd.setRanges(Collections.singletonList(new Range()));
@Override public void deletePeriodicQueryResults(final String queryId, final long binId) throws PeriodicQueryStorageException { final String tableName = tableNameFactory.makeTableName(ryaInstance, queryId); BatchDeleter deleter = null; try { final Text prefix = getRowPrefix(binId); deleter = accumuloConn.createBatchDeleter(tableName, auths, 1, new BatchWriterConfig()); deleter.setRanges(Collections.singleton(Range.prefix(prefix))); deleter.delete(); } catch (final Exception e) { throw new PeriodicQueryStorageException(e.getMessage()); } finally { try { if(deleter != null) { deleter.close(); } } catch (final Exception e) { throw new PeriodicQueryStorageException(e.getMessage()); } } }
private void removeLocation(String table, String tableNameToModify) throws TableNotFoundException, MutationsRejectedException { String tableIdToModify = getConnector().tableOperations().tableIdMap().get(tableNameToModify); BatchDeleter deleter = getConnector().createBatchDeleter(table, Authorizations.EMPTY, 1, new BatchWriterConfig()); deleter.setRanges( Collections.singleton(new KeyExtent(tableIdToModify, null, null).toMetadataRange())); deleter.fetchColumnFamily(MetadataSchema.TabletsSection.CurrentLocationColumnFamily.NAME); deleter.delete(); deleter.close(); }
protected BatchDeleter getDeleter() { try { return globals.getConfig().getConnector().createBatchDeleter(tableName, globals.getConfig().getAuthorizations(), globals.getConfig().getMaxWriteThreads(), globals.getConfig().getBatchWriterConfig()); } catch (Exception e) { throw new AccumuloGraphException(e); } }
protected BatchDeleter getDeleter() { try { return globals.getConfig().getConnector().createBatchDeleter(tableName, globals.getConfig().getAuthorizations(), globals.getConfig().getMaxWriteThreads(), globals.getConfig().getBatchWriterConfig()); } catch (Exception e) { throw new AccumuloGraphException(e); } }
BatchDeleter deleter = connector.createBatchDeleter(MetadataTable.NAME, Authorizations.EMPTY, 1000, new BatchWriterConfig()); deleter.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME);
@Override public <T extends Element> void dropKeyIndex(String key, Class<T> elementClass) { // TODO Move below to somewhere appropriate. if (elementClass == null) { throw ExceptionFactory.classForElementCannotBeNull(); } globals.getIndexMetadataWrapper().clearKeyMetadataEntry(key, elementClass); String table = null; if (elementClass.equals(Vertex.class)) { table = globals.getConfig().getVertexKeyIndexTableName(); } else { table = globals.getConfig().getEdgeKeyIndexTableName(); } BatchDeleter bd = null; try { bd = globals.getConfig().getConnector().createBatchDeleter(table, globals.getConfig().getAuthorizations(), globals.getConfig().getMaxWriteThreads(), globals.getConfig().getBatchWriterConfig()); bd.setRanges(Collections.singleton(new Range())); bd.fetchColumnFamily(new Text(key)); bd.delete(); } catch (Exception e) { throw new AccumuloGraphException(e); } finally { if (bd != null) bd.close(); } globals.checkedFlush(); }
@Override public <T extends Element> void dropKeyIndex(String key, Class<T> elementClass) { // TODO Move below to somewhere appropriate. if (elementClass == null) { throw ExceptionFactory.classForElementCannotBeNull(); } globals.getIndexMetadataWrapper().clearKeyMetadataEntry(key, elementClass); String table = null; if (elementClass.equals(Vertex.class)) { table = globals.getConfig().getVertexKeyIndexTableName(); } else { table = globals.getConfig().getEdgeKeyIndexTableName(); } BatchDeleter bd = null; try { bd = globals.getConfig().getConnector().createBatchDeleter(table, globals.getConfig().getAuthorizations(), globals.getConfig().getMaxWriteThreads(), globals.getConfig().getBatchWriterConfig()); bd.setRanges(Collections.singleton(new Range())); bd.fetchColumnFamily(new Text(key)); bd.delete(); } catch (Exception e) { throw new AccumuloGraphException(e); } finally { if (bd != null) bd.close(); } globals.checkedFlush(); }