> As mentioned in job scheduling documentation, collisionAPI will take care of > job scheduling when jobs arrive at destination node. Lets say I use > PriorityQueueCollisionSpi and send three jobs with priorities 5, 7 and 10 to > one node, then that node will execute job with priority 10 first then job > with priority 7 and then 5.
In fact, no. Assuming there are no other compute jobs, it will probably run all three jobs together. You can think of CollisionSPI answering the question “if I have a spare thread to execute some code, which job should I execute next?" If the jobs are dependent on one another, you can use compute tasks (https://ignite.apache.org/docs/latest/distributed-computing/map-reduce <https://ignite.apache.org/docs/latest/distributed-computing/map-reduce>). > Basically, no matter how these jobs are distributed across the cluster they > should be executed based on priority. Can this be achieved using > CollisionAPI? That would be very inefficient. You’d potentially have lots of wasted capacity and there’s a high risk of starvation. So there’s no out-of-the-box way to do that. You could manage it from the client side or write your own load balancing / collision algorithms. They’re both SPIs so it can be done. Regards, Stephen
