use of org.apache.apex.malhar.lib.window.impl.InMemoryWindowedStorage in project apex-malhar by apache.
the class AbstractWindowedOperatorBenchmarkApp method createWindowedOperator.
protected O createWindowedOperator(Configuration conf) {
SpillableStateStore store = createStore(conf);
try {
O windowedOperator = this.windowedOperatorClass.newInstance();
SpillableComplexComponentImpl sccImpl = new SpillableComplexComponentImpl(store);
windowedOperator.addComponent("SpillableComplexComponent", sccImpl);
windowedOperator.setDataStorage(createDataStorage(sccImpl));
windowedOperator.setRetractionStorage(createRetractionStorage(sccImpl));
windowedOperator.setWindowStateStorage(new InMemoryWindowedStorage());
setUpdatedKeyStorage(windowedOperator, conf, sccImpl);
windowedOperator.setAccumulation(createAccumulation());
windowedOperator.setAllowedLateness(Duration.millis(ALLOWED_LATENESS));
windowedOperator.setWindowOption(new WindowOption.TimeWindows(Duration.standardMinutes(1)));
// accumulating mode
windowedOperator.setTriggerOption(TriggerOption.AtWatermark().withEarlyFiringsAtEvery(Duration.standardSeconds(1)).accumulatingFiredPanes().firingOnlyUpdatedPanes());
windowedOperator.setFixedWatermark(30000);
return windowedOperator;
} catch (Exception e) {
throw Throwables.propagate(e);
}
}
Aggregations