use of uk.gov.gchq.gaffer.accumulostore.utils.IteratorSettingBuilder in project Gaffer by gchq.
the class AbstractCoreKeyIteratorSettingsFactory method getRowIDAggregatorIteratorSetting.
@Override
public IteratorSetting getRowIDAggregatorIteratorSetting(final AccumuloStore store, final String columnFamily) throws IteratorSettingException {
if (!store.getSchema().isAggregationEnabled()) {
LOGGER.debug("Returning null from getRowIDAggregatorIteratorSetting as store.getSchema().isAggregationEnabled() = {}", store.getSchema().isAggregationEnabled());
return null;
}
final IteratorSetting is = new IteratorSettingBuilder(AccumuloStoreConstants.ROW_ID_AGGREGATOR_ITERATOR_PRIORITY, AccumuloStoreConstants.ROW_ID_AGGREGATOR_ITERATOR_NAME, RowIDAggregator.class).combinerColumnFamilies(store.getSchema().getAggregatedGroups()).columnFamily(columnFamily).schema(store.getSchema()).keyConverter(store.getKeyPackage().getKeyConverter()).build();
LOGGER.debug("Creating IteratorSetting for iterator class {} with priority = {}, " + "combinerColumnFamilies = {}, columnFamily = {}, " + "schema = {}, view = {}, keyConverter = {}", RowIDAggregator.class.getName(), AccumuloStoreConstants.ROW_ID_AGGREGATOR_ITERATOR_PRIORITY, store.getSchema().getAggregatedGroups(), columnFamily, store.getSchema(), store.getKeyPackage().getKeyConverter());
return is;
}
use of uk.gov.gchq.gaffer.accumulostore.utils.IteratorSettingBuilder in project Gaffer by gchq.
the class AbstractCoreKeyIteratorSettingsFactory method getAggregatorIteratorSetting.
@Override
public IteratorSetting getAggregatorIteratorSetting(final AccumuloStore store) throws IteratorSettingException {
final IteratorSetting is = new IteratorSettingBuilder(AccumuloStoreConstants.AGGREGATOR_ITERATOR_PRIORITY, AccumuloStoreConstants.AGGREGATOR_ITERATOR_NAME, AggregatorIterator.class).combinerColumnFamilies(store.getSchema().getAggregatedGroups()).schema(store.getSchema()).keyConverter(store.getKeyPackage().getKeyConverter()).build();
LOGGER.debug("Creating IteratorSetting for iterator class {} with priority = {}, " + "combinerColumnFamilies = {}, schema = {}, keyConverter = {}", AggregatorIterator.class.getName(), AccumuloStoreConstants.AGGREGATOR_ITERATOR_PRIORITY, store.getSchema().getAggregatedGroups(), store.getSchema(), store.getKeyPackage().getKeyConverter());
return is;
}
use of uk.gov.gchq.gaffer.accumulostore.utils.IteratorSettingBuilder in project Gaffer by gchq.
the class AbstractCoreKeyIteratorSettingsFactory method getValidatorIteratorSetting.
@Override
public IteratorSetting getValidatorIteratorSetting(final AccumuloStore store) {
if (!store.getSchema().hasValidation()) {
LOGGER.debug("Returning null from getValidatorIteratorSetting as store.getSchema().hasValidation() = {}", store.getSchema().hasValidation());
return null;
}
final IteratorSetting is = new IteratorSettingBuilder(AccumuloStoreConstants.VALIDATOR_ITERATOR_PRIORITY, AccumuloStoreConstants.VALIDATOR_ITERATOR_NAME, ValidatorFilter.class).schema(store.getSchema()).keyConverter(store.getKeyPackage().getKeyConverter()).build();
LOGGER.debug("Creating IteratorSetting for iterator class {} with priority = {}, " + "schema = {}, keyConverter = {}", ValidatorFilter.class.getName(), AccumuloStoreConstants.VALIDATOR_ITERATOR_PRIORITY, store.getSchema(), store.getKeyPackage().getKeyConverter());
return is;
}
use of uk.gov.gchq.gaffer.accumulostore.utils.IteratorSettingBuilder in project Gaffer by gchq.
the class ClassicIteratorSettingsFactory method getEdgeEntityDirectionFilterIteratorSetting.
@Override
public IteratorSetting getEdgeEntityDirectionFilterIteratorSetting(final GraphFilters operation) {
final boolean includeEntities = operation.getView().hasEntities();
final boolean includeEdges = operation.getView().hasEdges();
final DirectedType directedType = operation.getDirectedType();
final IncludeIncomingOutgoingType inOutType;
if (operation instanceof SeededGraphFilters) {
inOutType = ((SeededGraphFilters) operation).getIncludeIncomingOutGoing();
} else {
inOutType = IncludeIncomingOutgoingType.OUTGOING;
}
final boolean deduplicateUndirectedEdges = operation instanceof GetAllElements;
if ((null == inOutType || inOutType == IncludeIncomingOutgoingType.EITHER) && includeEdges && (DirectedType.isEither(directedType)) && !deduplicateUndirectedEdges) {
LOGGER.debug("Returning null from getEdgeEntityDirectionFilterIteratorSetting (" + "inOutType = {}, includeEdges = {}, directedType = {}, deduplicateUndirectedEdges = {})", inOutType, includeEdges, directedType, deduplicateUndirectedEdges);
return null;
}
final IteratorSetting is = new IteratorSettingBuilder(AccumuloStoreConstants.EDGE_ENTITY_DIRECTED_UNDIRECTED_INCOMING_OUTGOING_FILTER_ITERATOR_PRIORITY, AccumuloStoreConstants.EDGE_ENTITY_DIRECTED_UNDIRECTED_INCOMING_OUTGOING_FILTER_ITERATOR_NAME, EDGE_DIRECTED_UNDIRECTED_FILTER).includeIncomingOutgoing(inOutType).directedType(directedType).includeEdges(includeEdges).includeEntities(includeEntities).deduplicateUndirectedEdges(deduplicateUndirectedEdges).build();
LOGGER.debug("Creating IteratorSetting for iterator class {} with " + "priority = {}, includeIncomingOutgoing = {}, directedType = {}, " + "includeEdges = {}, includeEntities = {}, deduplicateUndirectedEdges = {}", EDGE_DIRECTED_UNDIRECTED_FILTER, AccumuloStoreConstants.EDGE_ENTITY_DIRECTED_UNDIRECTED_INCOMING_OUTGOING_FILTER_ITERATOR_PRIORITY, inOutType, directedType, includeEdges, includeEntities, deduplicateUndirectedEdges);
return is;
}
Aggregations