Search in sources :

Example 1 with StreamKafkaP

use of com.hazelcast.jet.kafka.impl.StreamKafkaP in project hazelcast by hazelcast.

the class RowProjectorProcessorSupplier method get.

@Nonnull
@Override
public Collection<? extends Processor> get(int count) {
    List<Processor> processors = new ArrayList<>(count);
    for (int i = 0; i < count; i++) {
        KvRowProjector projector = projectorSupplier.get(evalContext, extractors);
        Processor processor = new StreamKafkaP<>(properties, singletonList(topic), record -> projector.project(record.key(), record.value()), eventTimePolicy);
        processors.add(processor);
    }
    return processors;
}
Also used : KvRowProjector(com.hazelcast.jet.sql.impl.connector.keyvalue.KvRowProjector) Processor(com.hazelcast.jet.core.Processor) StreamKafkaP(com.hazelcast.jet.kafka.impl.StreamKafkaP) ArrayList(java.util.ArrayList) Nonnull(javax.annotation.Nonnull)

Aggregations

Processor (com.hazelcast.jet.core.Processor)1 StreamKafkaP (com.hazelcast.jet.kafka.impl.StreamKafkaP)1 KvRowProjector (com.hazelcast.jet.sql.impl.connector.keyvalue.KvRowProjector)1 ArrayList (java.util.ArrayList)1 Nonnull (javax.annotation.Nonnull)1