6 Ekim 2022 Perşembe

Hazelcast Jet BatchStage Arayüzü

Giriş
Şu satırı dahil ederiz 
import com.hazelcast.jet.pipeline.BatchStage;
Açıklaması şöyle
Q : Can Hazelcast jet be used for batch based workload?
A : Hazelcast is appropriate for both batch and streaming workloads; if you dig into the Jet API a bit you'll see concepts such as 'BatchStage' and 'StreamStage', or 'BatchSource' and 'StreamSource'. A lot of the API is identical, but in particular the initial ingestion needs to know if it's reading from a batch or stream source, and certain concepts (like sorting) can't be applied to a potentially infinite streaming source.
merge metodu
Şöyle yaparız
Pipeline pipeline = Pipeline.create();

BatchSource<String> leftSource = TestSources.items("the", "quick", "brown", "fox");
BatchSource<String> rightSource = TestSources.items("jumps", "over", "the", "lazy", "dog");

BatchStage<String> left = pipeline.readFrom(leftSource);
BatchStage<String> right = pipeline.readFrom(rightSource);

left.merge(right)
    .writeTo(Sinks.logger());

Hiç yorum yok:

Yorum Gönder

THIRD-PARTY.txt Dosyası

Kullanılan harici kütüphanelerin sürümleri bu dosyada Dosyanın yolu şöyle hazelcast/licenses/THIRD-PARTY.txt