/** * Overrides default behavior of aggregation with the one programmed in script * * @param scripting script definition */ public void initCustomAggregation(Scripting scripting) { ScriptEngineManager factory = new ScriptEngineManager(); scriptEngine = factory.getEngineByName(scripting.getLanguage()); Preconditions.checkNotNull( scriptEngine, "ScriptEngine for language {} was not found.", scripting.getLanguage()); script = scripting.getScript(); LOG.debug("Next script will be used for custom aggregation: {}", script); }