Search in sources :

Example 1 with RuleProcessorRuntime

use of com.hortonworks.streamline.streams.runtime.processor.RuleProcessorRuntime in project streamline by hortonworks.

the class WindowRulesBolt method prepare.

@Override
public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {
    super.prepare(stormConf, context, collector);
    if (this.rulesProcessor == null) {
        throw new RuntimeException("rulesProcessor cannot be null");
    }
    ruleProcessorRuntime = new RuleProcessorRuntime(rulesProcessor, scriptType);
    Map<String, Object> config = Collections.emptyMap();
    ruleProcessorRuntime.initialize(config);
}
Also used : RuleProcessorRuntime(com.hortonworks.streamline.streams.runtime.processor.RuleProcessorRuntime)

Example 2 with RuleProcessorRuntime

use of com.hortonworks.streamline.streams.runtime.processor.RuleProcessorRuntime in project streamline by hortonworks.

the class RulesBolt method prepare.

@Override
public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {
    super.prepare(stormConf, context, collector);
    if (this.rulesProcessor == null) {
        throw new RuntimeException("rulesProcessor cannot be null");
    }
    ruleProcessorRuntime = new RuleProcessorRuntime(rulesProcessor, scriptType);
    Map<String, Object> config = Collections.emptyMap();
    if (stormConf != null) {
        config = new HashMap<>();
        config.put(Constants.CATALOG_ROOT_URL, stormConf.get(Constants.CATALOG_ROOT_URL));
        config.put(Constants.LOCAL_FILES_PATH, stormConf.get(Constants.LOCAL_FILES_PATH));
    }
    ruleProcessorRuntime.initialize(config);
}
Also used : RuleProcessorRuntime(com.hortonworks.streamline.streams.runtime.processor.RuleProcessorRuntime)

Aggregations

RuleProcessorRuntime (com.hortonworks.streamline.streams.runtime.processor.RuleProcessorRuntime)2