调度
资源感应调度器
默认配置文件defaults.yaml
Resource_Aware_Scheduler_overview
调度器
- EventScheduler:将系统中的可用资源均匀地分配给需要资源的topology,其实也不是绝对均匀,后续会详细说明
- DefaultScheduler:和EvenetScheduler差不多,只不过会先将其它topology不需要的资源重新收集起来,再进行EventScheduler
- IsolationScheduler:用户可定义这个topology的机器资源,storm分配的时候会优先分配这些topology,以保证分配给该topology的机器只为这一个topology服务
- Pluggable Schedule 可插拔式的任务分配器,编写自己的task分配算法
- 资源感知调度
- Pluggable Schedule
实现IScheduler
接口
public interface IScheduler {
void prepare(Map conf);
/**
* Set assignments for the topologies which needs scheduling. The new assignments is available
* through `cluster.getAssignments()`
*
*@param topologies all the topologies in the cluster, some of them need schedule. Topologies object here
* only contain static information about topologies. Information like assignments, slots are all in
* the `cluste