Şu satırı dahil ederiz
import com.hazelcast.jet.JetService;
Kalıtım şöyle
JetService
JetInstance
AbstractJetInstance
JetInstanceImpl : Member-side JetInstance implementation
JetClientInstanceImpl : Client-side JetInstance implementation
BootstrappedJetProxy
getJob metodu - String
İsmi belirtilen iş varsa Job döndürür.
new Job(...) ve newLightJob(...) çağrıları arasında fark var. Açıklaması şöyle
newJob metodu - Pipeline + JobConfigRegular jobscreated via JetService#newJob(..). These use MasterContextLight jobscreated via JetService#newLightJob(..). These use LightMasterContext. Light jobs less overhead but have some limitations (no custom resources upload) and they are used for all SQL queries.
JobConfig nesnes alır
Örnek
Şöyle yaparız
HazelcastInstance hazelcastInstance = ... Pipeline pipeline = Pipeline.create() .readFrom(TestSources.items("22578")) .writeTo(Sinks.logger()) .getPipeline(); JobConfig jobConfig = new JobConfig(); jobConfig.setName("job22578"); TimeUnit.SECONDS.sleep(5L); System.out.println("Launching " + jobConfig.getName()); Job job = hazelcastInstance.getJet().newJob(pipeline, jobConfig); System.out.println("Launched " + jobConfig.getName() + "," + job.getStatus() + "," + job); TimeUnit.HOURS.sleep(1L); hazelcastInstance.shutdown();
Hiç yorum yok:
Yorum Gönder