Yarn 配置文件fair-scheduler.xml含义

例如:

<?xml version="1.0"?>
<allocations>
<!-- users max running apps  -->
<userMaxAppsDefault>30</userMaxAppsDefault>
<!-- 定义队列  -->
<queue name="root">
	<!-- 最小使用资源:512Mb内存,4个处理器核心 -->
	<minResources>512mb,4vcores</minResources>
	<!-- 最大使用资源:10G内存,100个处理器核心 -->
	<maxResources>102400mb,100vcores</maxResources>
	<!-- 最大可同时运行的app数量:100-->
	<maxRunningApps>100</maxRunningApps>
	
	<!-- weight:资源池权重 -->
	<weight>1.0</weight>
	
	<!-- 调度模式:fair-scheduler -->
	<schedulingMode>fair</schedulingMode>

	<!-- 允许提交任务的用户名和组,格式为:用户名 用户组 -->
	<!-- 当有多个用户时候,格式为:用户名1,用户名2      用户名1所属组,用户名2所属组 -->
	<aclSubmitApps> </aclSubmitApps>

	<!-- 允许管理任务的用户名和组,格式同上 -->
	<aclAdministerApps> </aclAdministerApps>

	<queue name="default">
		<minResources>512mb,4vcores</minResources>
		<maxResources>30720mb,30vcores</maxResources>
		<maxRunningApps>100</maxRunningApps>
		<schedulingMode>fair</schedulingMode>
		<weight>1.0</weight>
		<!--  所有的任务如果不指定任务队列,都提交到default队列里面来 -->
		<aclSubmitApps>*</aclSubmitApps>
	</queue>
	
	<queue name="hadoop">
		<minResources>512mb,4vcores</minResources>
		<maxResources>20480mb,20vcores</maxResources>
		<maxRunningApps>100</maxRunningApps>
		<schedulingMode>fair</schedulingMode>
		<weight>2.0</weight>
		<aclSubmitApps>hadoop hadoop</aclSubmitApps>
		<aclAdministerApps>hadoop hadoop</aclAdministerApps>
	</queue>

	<queue name="develop">
		<minResources>512mb,4vcores</minResources>
		<maxResources>20480mb,20vcores</maxResources>
		<maxRunningApps>100</maxRunningApps>
		<schedulingMode>fair</schedulingMode>
		<weight>1</weight>
		<aclSubmitApps>develop develop</aclSubmitApps>
		<aclAdministerApps>develop develop</aclAdministerApps>
	</queue>

	<queue name="test1">
		<minResources>512mb,4vcores</minResources>
		<maxResources>20480mb,20vcores</maxResources>
		<maxRunningApps>100</maxRunningApps>
		<schedulingMode>fair</schedulingMode>
		<weight>1.5</weight>
		<aclSubmitApps>test1,hadoop,develop test1</aclSubmitApps>
		<aclAdministerApps>test1 group_businessC,supergroup</aclAdministerApps>
	</queue>
</queue>
</allocations>

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐