private void addAggregationIterator(final AccumuloStore accumuloStore, final Configuration conf) throws IteratorSettingException { if (accumuloStore.getSchema().isAggregationEnabled()) { // Add aggregator iterator to table for all scopes LOGGER.info("Adding aggregator iterator"); final IteratorSetting itrSetting = accumuloStore .getKeyPackage().getIteratorFactory().getAggregatorIteratorSetting(accumuloStore); InputConfigurator.addIterator(AccumuloInputFormat.class, conf, itrSetting); } else { LOGGER.info("Not adding aggregator iterator as aggregation is not enabled"); } }
@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; }
/** * This should be used if a gaffer version upgrade causes the aggregator * iterator to be removed from a table * * @param store the accumulo store * @param iteratorName the iterator name * @throws StoreException if any issues occur adding an aggregator iterator */ public static void addIterator(final AccumuloStore store, final String iteratorName) throws StoreException { if ((!AccumuloStoreConstants.VALIDATOR_ITERATOR_NAME.equals(iteratorName) || store.getProperties().getEnableValidatorIterator()) && (store.getSchema().isAggregationEnabled())) { try { addIterator(store, store.getKeyPackage() .getIteratorFactory() .getIteratorSetting(store, iteratorName)); } catch (final IteratorSettingException e) { throw new StoreException(e.getMessage(), e); } } }
public boolean queryTimeAggregatorRequired(final View view, final AccumuloStore store) { Schema schema = store.getSchema(); if (!schema.isAggregationEnabled()) { return false;
connector.tableOperations().removeIterator(tableName, "vers", iteratorScopes); if (store.getSchema().isAggregationEnabled()) {
private static void validateTable(final AccumuloStore store, final String tableName, final Connector connector) throws StoreException { final IteratorSetting requiredAggItrSetting; if (store.getSchema().isAggregationEnabled()) { try { requiredAggItrSetting = store.getKeyPackage().getIteratorFactory().getAggregatorIteratorSetting(store);