August 2017
Beginner to intermediate
284 pages
6h 51m
English
Storm provides an API to set the number of worker processes, number of executors, and number of tasks at the code level. The following section shows how we can configure parallelism at the code level.
We can set the number of worker processes at the code level by using the setNumWorkers method of the org.apache.storm.Config class. Here is the code snippet to show these settings in practice:
Config conf = new Config(); conf.setNumWorkers(3);
In the previous chapter, we configured the number of workers as three. Storm will assign the three workers for the SampleStormTopology and SampleStormClusterTopology topology.
We can set the number of executors at the code level by passing the parallelism_hint
Read now
Unlock full access