alibaba / jstorm

Enterprise Stream Process Engine
http://jstorm.io
Apache License 2.0
3.92k stars 1.8k forks source link

Not clear about how to use User Defined Scheduler #665

Open Chenfengldw opened 5 years ago

Chenfengldw commented 5 years ago

In the document: http://jstorm.io/ProgrammingGuide/AdvancedUsage/UserDefined/Scheduler.html

It shows many settings and also a demo code, but in which file to write these settings?

The code: WorkerAssignment worker = new WorkerAssignment(); worker.addComponent(String compenentName, Integer num); //Add a task on this worker worker.setHostName(String hostName); //force this worker on one machine worker.setJvm(String jvm); //this can be skipped, set jvm parameters of this worker worker.setMem(long mem); //this can be skipped, set the worker's memory size worker.setCpu(int slotNum);

Where should I put them? Shall I put them in the topology code?

I am really confused by the document