use of com.hazelcast.jet.core.Processor.Context in project hazelcast-jet by hazelcast.
the class SlidingWindowP_failoverTest method init.
private void init(ProcessingGuarantee guarantee) {
SlidingWindowPolicy wDef = SlidingWindowPolicy.tumblingWinPolicy(1);
AggregateOperation1<Object, LongAccumulator, Long> aggrOp = counting();
p = new SlidingWindowP<>(singletonList(entryKey()), singletonList((DistributedToLongFunction<Entry<?, Long>>) Entry::getValue), wDef, aggrOp, TimestampedEntry::new, true);
Outbox outbox = new TestOutbox(128);
Context context = new TestProcessorContext().setProcessingGuarantee(guarantee);
p.init(outbox, context);
}
use of com.hazelcast.jet.core.Processor.Context in project hazelcast-jet by hazelcast.
the class StreamFilesPTest method initializeProcessor.
private void initializeProcessor(String glob) {
if (glob == null) {
glob = "*";
}
processor = new StreamFilesP(workDir.getAbsolutePath(), UTF_8, glob, 1, 0, Util::entry);
outbox = new TestOutbox(1);
Context ctx = new TestProcessorContext().setLogger(Logger.getLogger(StreamFilesP.class));
processor.init(outbox, ctx);
}
use of com.hazelcast.jet.core.Processor.Context in project hazelcast by hazelcast.
the class StreamFilesPTest method initializeProcessor.
private void initializeProcessor(String glob) throws Exception {
if (glob == null) {
glob = "*";
}
processor = new StreamFilesP<>(workDir.getAbsolutePath(), UTF_8, glob, false, Util::entry);
outbox = new TestOutbox(1);
Context ctx = new TestProcessorContext().setLogger(Logger.getLogger(StreamFilesP.class));
processor.init(outbox, ctx);
}
Aggregations