【原】Storm调度器

Storm入门教程

1. Storm基础

Storm

Storm主要特点

Storm基本概念

Storm调度器

Pluggable scheduler(可插拔调度器)

Isolation scheduler(隔离调度器)

Storm配置

Guaranteeing Message Processing(消息处理保障机制)

Daemon Fault Tolerance(守护线程容错机制)

理解Storm拓扑的并行

Tutorial

Local模式

在生产环境中运行Topologies



Storm调度器

Storm有4中内置调度器:DefaultSchedulerIsolationSchedulerMultitenantSchedulerResourceAwareScheduler.

Pluggable scheduler(可插拔调度器)

Storm中可以实现自己的调度器来替代默认的给worker分配executor的调度器。
可以在stom.yaml文件中的“storm.scheduler”选项中配置且自定义的调度器必须实现IScheduler接口。

Isolation scheduler(隔离调度器)

隔离调度器使得多个topologies共享集群资源更加容易和安全。隔离调度器让你指定那个topologies 应该隔离,也就是说隔离的topologies 运行在集群中的特定的机器中,该机器上没有其它运行的topologies 。这些隔离的topologies 具有高优先级别,所以如果和非隔离的topologies竞争资源,资源将会分配给隔离的topologies;如果必须给隔离topologies分配资源,那么将会从非隔离的topologies中获取资源。一旦所有的隔离topologies所需资源得到满足,那么集群中剩下的机器将会被非隔离的topologies共享。
配置隔离调度器:
1)在Nimbus配置选项“storm.scheduler”赋值"org.apache.storm.scheduler.IsolationScheduler"。
2)在"isolation.scheduler.machines"选项中指定每个topology 分配多少台机器。这个配置是一个map集合。如下:
isolation.scheduler.machines:
"my-topology": 8
"tiny-topology": 1
"some-other-topology": 3
提交到集群中的topologies 如果没有出现上上述map中,那么将不会被隔离。注意:该配置只能通过集群的管理员分配
这种隔离调度器解决了多租户问题,通过在多个topologies 完全隔离,避免了topologies 的资源竞争问题。

posted @ 2016-10-29 14:39  一路向前走  阅读(1432)  评论(0编辑  收藏  举报