Search code examples
hazelcast-jet

How to get job at new node of hazelcast jet cluster


Can anybody say how new jet cluster instance should start job?

Use case 1:

  1. start jet cluster by 3 node
  2. submit job to cluster
  3. all 3 nodes start job and process data

Use case 2:

  1. start 4th node
  2. 4th node do nothing because it's no new submit job command

How new cluster instance should start jobs, that already started at another nodes?


Solution

  • The feature you ask for is planned for Jet 0.5, which is planned for the end of September 2017.

    In Jet 0.4 you have to cancel the current job and start it anew, however you'll lose processor state. Also note that the job is not cancelled by cancelling the client which submitted the job, you have to use:

    Future<Void> future = jetInstance.newJob().execute();
    // some time later
    future.cancel();