@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); setLossyness(options); }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); if (options.containsKey(RADIX_OPTION)) radix = Integer.parseInt(options.get(RADIX_OPTION)); else radix = 10; }
@Override public void init(Map<String, String> options, IteratorEnvironment env) throws IOException { origOptions = options; super.init(options, env); combiner.init(null, options, env); }
@Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); setLossyness(options); }
/** The Combiner SKVI init. Calls the ApplyOp/MultiplyOp/EWiseOp init from here. * Marked final for safety. */ @Override public final void init(SortedKeyValueIterator<Key, Value> source, Map<String, String> options, IteratorEnvironment env) throws IOException { Map<String,String> notCombinerOpts = new HashMap<>(), combinerOpts = new HashMap<>(); for (Map.Entry<String, String> entry : options.entrySet()) { String k = entry.getKey(), v = entry.getValue(); switch (k) { case FIXED_VALUE: log.warn("KeyTwoScalar ignores fixed values when used as a Combiner"); break; case ALL_OPTION: case COLUMNS_OPTION: combinerOpts.put(k,v); break; default: notCombinerOpts.put(k, v); break; } } init(notCombinerOpts, env); // Call the ApplyOp init. super.init(source, combinerOpts, env); // Setup Combiner parent. }
@Override public void init(final SortedKeyValueIterator<Key, Value> source, final Map<String, String> options, final IteratorEnvironment env) throws IOException { super.init(source, options, env); try { schema = Schema.fromJson(options.get(AccumuloStoreConstants.SCHEMA).getBytes(CommonConstants.UTF_8)); } catch (final UnsupportedEncodingException e) { throw new SchemaException("Unable to deserialise the schema from json", e); } LOGGER.debug("Initialising AggregatorIterator with schema {}", schema); final String elementConverterClass = options.get(AccumuloStoreConstants.ACCUMULO_ELEMENT_CONVERTER_CLASS); try { elementConverter = Class .forName(elementConverterClass) .asSubclass(AccumuloElementConverter.class) .getConstructor(Schema.class) .newInstance(schema); LOGGER.debug("Creating AccumuloElementConverter of class {}", elementConverterClass); } catch (final ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { throw new AggregationException("Failed to create element converter of the class name provided (" + elementConverterClass + ")", e); } }
myCombiner = mapping.getObject(CustomColumnToClassMapping.ALL_CF_KEY); options.put("all", "true"); myCombiner.init(null, options, null);
agg.init(null, clazzOptions.getKey(), new IteratorEnvironment() { @Override public AccumuloConfiguration getConfig() {