问题
I have an app where i have created Jet instance and pipeline job to aggregate result of an streaming data. I am running multiple instances of such app. The problem i am facing is since there are 2 instaces it is running 2 pipeline job and hence the result is computed twice and incorrect but it figures out that both jet instance are part of the same cluster.
Does jet pipeline do not check the pipeline job and if same just consider it as one just like kafka stream does it with its topology?
回答1:
Job submission in Jet 0.7 is to the entire cluster. If you submit the same Pipeline/DAG twice, the job will execute twice.
The upcoming version adds newJobIfAbsent()
method: if the job has a name, it will only submit the job unless there's an active job with equal name. If there is a job with equal name already, it will return Job
handle to the already existing job.
来源:https://stackoverflow.com/questions/54350398/hazelcast-jet-pipeline-created-on-an-app-with-multiple-instace-causing-problem