Job Scheduling
Control how jobs are scheduled for processing on each node by configuring the CollisionSpi with FIFO or priority ordering.
When jobs arrive at the destination node, they are submitted to a thread pool and scheduled for execution in random order. However, you can change job ordering by configuring CollisionSpi. The CollisionSpi interface provides a way to control how jobs are scheduled for processing on each node.
GridGain provides several implementations of the CollisionSpi interface:
FifoQueueCollisionSpi— simple FIFO ordering in multiple threads. This implementation is used by default;PriorityQueueCollisionSpi— priority ordering;JobStealingFailoverSpi— use this implementation to enable job stealing.
To enable a specific collision spi, change the IgniteConfiguration.collisionSpi property.
FIFO Ordering
FifoQueueCollisionSpi provides FIFO ordering of jobs as they arrive. The jobs are executed in multiple threads. The number of threads is controlled by the parallelJobsNumber parameter. The default value equals 2 times the number of processor cores.
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="collisionSpi">
<bean class="org.apache.ignite.spi.collision.fifoqueue.FifoQueueCollisionSpi">
<!-- Execute one job at a time. -->
<property name="parallelJobsNumber" value="1"/>
</bean>
</property>
</bean>FifoQueueCollisionSpi colSpi = new FifoQueueCollisionSpi();
// Execute jobs sequentially, one at a time,
// by setting parallel job number to 1.
colSpi.setParallelJobsNumber(1);
IgniteConfiguration cfg = new IgniteConfiguration();
// Override default collision SPI.
cfg.setCollisionSpi(colSpi);
// Start a node.
Ignite ignite = Ignition.start(cfg);unsupported
Priority Ordering
Use PriorityQueueCollisionSpi to assign priorities to individual jobs, so that jobs with higher priority are executed ahead of lower priority jobs. You can also specify the number of threads to process jobs.
unsupported
unsupported
Changing Specific Task Priority
Task priorities are set in the task session via the grid.task.priority attribute. To change it, the tasks class must have the @ComputeTaskSessionFullSupport` annotation. If no priority is assigned to a task, the default priority of 0 is used.
{% tabs %} {% tab title="Java" %}
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

