#!/bin/bash

FILE_PATH="/opt/module/datasophon/hadoop-3.3.3/etc/hadoop/capacity-scheduler.xml"
SWITCH_FILE_PATH="/opt/module/datasophon/hadoop-3.3.3/etc/hadoop/capacity-scheduler-switch.xml"

# 切换yarn队列资源分配占比
cp ${FILE_PATH} ${FILE_PATH}.tmp
cp ${SWITCH_FILE_PATH} ${FILE_PATH}
cp ${FILE_PATH}.tmp ${SWITCH_FILE_PATH}

yarn rmadmin -refreshQueues
echo "yarn队列配置切换完成"
