t.s.tao
t.s.tao

Reputation: 61

Parallel job execution by setting job module count in Spring XD?

Since besides stream module, Spring-XD slap support to set module count number for batch jobs. For example, module.myjob.count=3. What will happen if the job is deployed in this way?

  1. Will the job be deployed on 3 different containers?
  2. Will the 3 copies of deployment execute in parallel? Does each copy execute independently without any interaction or extra orchestration (say, with a master)?
  3. Can I assign different job parameters for each of the copy? How can I do it in Spring-XD?

Thanks in advance, T.S.Tao

Upvotes: 1

Views: 328

Answers (1)

Gary Russell
Gary Russell

Reputation: 174719

  1. Yes.
  2. Yes; unless you create a partitioned job in which case all instances participate in the job partition executions, with one instance controlling the overall job execution.
  3. The instances will compete for work; in general job launches will be round-robin distributed; there is no way to control which instance gets a launch request; to do that you would have to deploy different job definitions and target their deployments for specific container groups.

Upvotes: 1

Related Questions