Initially i started three grid nodes and i am having over 200 jobs in my java program. I have shared all the jobs to the grid nodes. Once if i run the application one more node will be introduced through eclipse and it is also participating in the execution of jobs. This means one node is executing 50 jobs in parallel. When all the nodes are executing their jobs i have started another node that time and planned to share some jobs to this node which are in incomplete state.
How can we do that....
To migrate jobs that are in mid-execution you need to make your jobs listen for topology events and react by stopping some job (in the split) and migrating them using combination of checkpoint & custom failover SPIs.
It's more than a few lines of code and rather advance use case. I would look at making jobs shorter in duration and/or less in "size" to better utilize changing topology.