wiki:ComputeStartExample1

Version 3 (modified by george, 14 years ago) (diff)

--

Job Manager Example1

The Job Manager logic is rather straightforward and can be easily adjusted for use in a specific cluster or server. After a job object is received by Job Manager, it is registered in the database and passed to the Worker nodes for execution.

This code example sends all jobs to one Resident Worker on the cluster for execution. For this the local node should excluded from the grid topology in the GridStarter

GridBasicTopologySpi topSpi = new GridBasicTopologySpi();

// Exclude local node from topology.
topSpi.setLocalNode(false);

// Configure your own topology SPI.
cfg.setTopologySpi(topSpi);