在hortonworks数据平台上从容量调度器切换到公平调度器

ff29svar  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(498)

我的组织目前正在使用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.scheduler.fair.allocation.file 属性。
现在在Ambari,虽然有可能改变 yarn.resourcemanager.scheduler.class 属性,并添加新的自定义属性 yarn.scheduler.fair.allocation.file ,我找不到让ambari读fair-scheduler.xml而不是capacity-scheduler.xml的方法。
所以我的问题是;我如何通过ambari切换到展会日程安排?一定有个简单的方法,对吧?
capacity-scheduler.xml中的属性

n3h0vuf2

n3h0vuf21#

在rm节点上,将yarn.scheduler.fair.allocation.file设置为fair-scheduler.xml的完整路径(或在ambari下的自定义yarn站点中)

tail -n 1000 /var/log/hadoop-yarn/yarn/hadoop-yarn-resourcemanager-master.log | grep "fair-scheduler.xml"

重新启动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

适用于hdp3.1.1,也可能适用于3.0.0

相关问题