use of com.hazelcast.jet.pipeline.Sinks in project hazelcast-jet-reference-manual by hazelcast.
the class ImdgConnectors method s4.
static void s4() {
// tag::s4[]
Pipeline pipeline = Pipeline.create();
pipeline.drawFrom(Sources.<String, Long>map("inMap")).drainTo(Sinks.<Entry<String, Long>, String, Long>mapWithUpdating("outMap", Entry::getKey, (oldV, item) -> (oldV != null ? oldV : 0L) + item.getValue()));
// end::s4[]
}
Aggregations