Search in sources :

Example 1 with AccumuloSingleIDRetriever

use of uk.gov.gchq.gaffer.accumulostore.retriever.impl.AccumuloSingleIDRetriever in project Gaffer by gchq.

the class GetAdjacentEntitySeedsHandler method doOperation.

public CloseableIterable<EntitySeed> doOperation(final GetAdjacentEntitySeeds operation, final User user, final AccumuloStore store) throws OperationException {
    operation.addOption(AccumuloStoreConstants.OPERATION_RETURN_MATCHED_SEEDS_AS_EDGE_SOURCE, "true");
    final AccumuloRetriever<?> edgeRetriever;
    try {
        operation.setIncludeEntities(false);
        if (IncludeEdgeType.NONE == operation.getIncludeEdges()) {
            operation.setIncludeEdges(IncludeEdgeType.ALL);
        }
        final IteratorSettingFactory iteratorFactory = store.getKeyPackage().getIteratorFactory();
        edgeRetriever = new AccumuloSingleIDRetriever(store, operation, user, iteratorFactory.getElementPreAggregationFilterIteratorSetting(operation.getView(), store), iteratorFactory.getElementPostAggregationFilterIteratorSetting(operation.getView(), store), iteratorFactory.getEdgeEntityDirectionFilterIteratorSetting(operation), iteratorFactory.getQueryTimeAggregatorIteratorSetting(operation.getView(), store));
    } catch (IteratorSettingException | StoreException e) {
        throw new OperationException(e.getMessage(), e);
    }
    return new ExtractDestinationEntitySeed(edgeRetriever);
}
Also used : IteratorSettingFactory(uk.gov.gchq.gaffer.accumulostore.key.IteratorSettingFactory) IteratorSettingException(uk.gov.gchq.gaffer.accumulostore.key.exception.IteratorSettingException) AccumuloSingleIDRetriever(uk.gov.gchq.gaffer.accumulostore.retriever.impl.AccumuloSingleIDRetriever) OperationException(uk.gov.gchq.gaffer.operation.OperationException) StoreException(uk.gov.gchq.gaffer.store.StoreException)

Aggregations

IteratorSettingFactory (uk.gov.gchq.gaffer.accumulostore.key.IteratorSettingFactory)1 IteratorSettingException (uk.gov.gchq.gaffer.accumulostore.key.exception.IteratorSettingException)1 AccumuloSingleIDRetriever (uk.gov.gchq.gaffer.accumulostore.retriever.impl.AccumuloSingleIDRetriever)1 OperationException (uk.gov.gchq.gaffer.operation.OperationException)1 StoreException (uk.gov.gchq.gaffer.store.StoreException)1