在 Hortonworks 数据平台上从容量调度程序切换到公平调度程序

Soh*_*ham 5 hadoop hadoop-yarn hortonworks-data-platform ambari

我的组织目前正在使用 Hortonworks HDP 来管理我们的 Hadoop 集群。默认的 YARN 调度程序是容量调度程序。我想切换到公平调度程序。我对 HDP 完全陌生。

在没有集群管理套件的情况下,这将通过编辑yarn-site.xml并将yarn.resourcemanager.scheduler.class属性更改为org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler 并创建一个额外的fair-scheduler.xml文件来指定此处提到的队列配置,然后将 YARN 引用到该文件中通过yarn.scheduler.fair.allocation.fileyarn-site.xml 中设置属性来配置。

现在在 Ambari 中,虽然可以yarn.resourcemanager.scheduler.class通过 UI更改属性并添加新的自定义属性yarn.scheduler.fair.allocation.file,但我无法(出于上帝的爱)找到一种方法让 ambari 读取fair-scheduler.xml而不是容量调度程序。 xml

所以我的问题是;我如何通过 Ambari 切换到公平调度程序?一定有一个简单的方法,对吧?

capacity-scheduler.xml 中的属性

Kév*_*lay 2

在 RM 节点上,使用fair-scheduler.xml 的完整路径(或在 ambari 下的自定义纱线站点中)设置yarn.scheduler.fair.allocation.file

tail -n 1000 /var/log/hadoop-yarn/yarn/hadoop-yarn-resourcemanager-master.log | grep "fair-scheduler.xml"
Run Code Online (Sandbox Code Playgroud)

重新启动 ResourceManager 后,您应该看到它正在加载您的文件:

2019-02-19 15:49:26,358 INFO  fair.AllocationFileLoaderService (AllocationFileLoaderService.java:reloadAllocations(230)) - Loading allocation file file:/usr/hdp/current/hadoop-client/conf/fair-scheduler.xml
Run Code Online (Sandbox Code Playgroud)

适用于 Hdp 3.1.1,也可能适用于 3.0.0