Reputation: 290
I have used Spring Cloud Data Flow to control some batch jobs. In SCDF, after I defined some tasks, they were launched as jobs with running status. When I tried to stop a particular job, It did not stop immediately. I have found that the job was still running until it finished it's current step.
For example, My job 'ABC' has 2 steps A and B. In SCDF, I stop job 'ABC" when step A is being executed and job 'ABC' is still running until step A is completed and it do not implement step B.
So, Are there any ways to stop a Job immediately from Spring Cloud Data Flow?
Upvotes: 0
Views: 727
Reputation: 4179
From the Spring Cloud Data Flow, the batch job stop
operation is delegated to the Spring Batch API. This means there is nothing Spring Cloud Data Flow offers to stop a batch job immediately as it needs to be handled by the Spring Batch or the job implementation itself.
When a batch job stop
request is sent for a Batch Job execution (if it is running), the current step execution is set with the flag terminateOnly
to true
which means the step execution is ready to be stopped based on the underlying step execution implementation.
Upvotes: 1