Search in sources :

Example 1 with Sinks

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[]
}
Also used : EventJournalCacheEvent(com.hazelcast.cache.journal.EventJournalCacheEvent) JetConfig(com.hazelcast.jet.config.JetConfig) StreamStage(com.hazelcast.jet.pipeline.StreamStage) Person(datamodel.Person) JetInstance(com.hazelcast.jet.JetInstance) DistributedFunctions(com.hazelcast.jet.function.DistributedFunctions) Pipeline(com.hazelcast.jet.pipeline.Pipeline) Sinks(com.hazelcast.jet.pipeline.Sinks) IListJet(com.hazelcast.jet.IListJet) EntryBackupProcessor(com.hazelcast.map.EntryBackupProcessor) ArrayList(java.util.ArrayList) BatchStage(com.hazelcast.jet.pipeline.BatchStage) Sources(com.hazelcast.jet.pipeline.Sources) EntryProcessor(com.hazelcast.map.EntryProcessor) Entry(java.util.Map.Entry) START_FROM_CURRENT(com.hazelcast.jet.pipeline.JournalInitialPosition.START_FROM_CURRENT) ClientConfig(com.hazelcast.client.config.ClientConfig) IList(com.hazelcast.core.IList) Jet(com.hazelcast.jet.Jet) DistributedFunction(com.hazelcast.jet.function.DistributedFunction) EventJournalMapEvent(com.hazelcast.map.journal.EventJournalMapEvent) Pipeline(com.hazelcast.jet.pipeline.Pipeline)

Aggregations

EventJournalCacheEvent (com.hazelcast.cache.journal.EventJournalCacheEvent)1 ClientConfig (com.hazelcast.client.config.ClientConfig)1 IList (com.hazelcast.core.IList)1 IListJet (com.hazelcast.jet.IListJet)1 Jet (com.hazelcast.jet.Jet)1 JetInstance (com.hazelcast.jet.JetInstance)1 JetConfig (com.hazelcast.jet.config.JetConfig)1 DistributedFunction (com.hazelcast.jet.function.DistributedFunction)1 DistributedFunctions (com.hazelcast.jet.function.DistributedFunctions)1 BatchStage (com.hazelcast.jet.pipeline.BatchStage)1 START_FROM_CURRENT (com.hazelcast.jet.pipeline.JournalInitialPosition.START_FROM_CURRENT)1 Pipeline (com.hazelcast.jet.pipeline.Pipeline)1 Sinks (com.hazelcast.jet.pipeline.Sinks)1 Sources (com.hazelcast.jet.pipeline.Sources)1 StreamStage (com.hazelcast.jet.pipeline.StreamStage)1 EntryBackupProcessor (com.hazelcast.map.EntryBackupProcessor)1 EntryProcessor (com.hazelcast.map.EntryProcessor)1 EventJournalMapEvent (com.hazelcast.map.journal.EventJournalMapEvent)1 Person (datamodel.Person)1 ArrayList (java.util.ArrayList)1