logo

<queue name="bdp_jmart_ad">
        <minResources>6881280 mb,3200vcores</minResources>
        <maxResources>6881280 mb,3200vcores</maxResources>
        <maxRunningApps>300</maxRunningApps>
        <aclSubmitApps>jd_ad</aclSubmitApps>
        <aclAdministerApps>jd_ad</aclAdministerApps>
        <weight>1.0</weight>
        <schedulingPolicy>fair</schedulingPolicy>
    </queue>
    <user name="jd_ad">
        <maxRunningApps>300</maxRunningApps>
    </user> 

shell处理xml,可以考虑xml工具,这里给一个shell版本,抽取queue和user,排在一行 ```

grep -E “queue|user” c.xml|grep name|awk -F= ‘{print $2}’|sed ’s/“//g;s/>//g’|awk ‘{if (NR%2) print $0; else print “hdfs://ns1/user/“$0;}’ |sed ‘$!N;s/\n/ /’

bdp_jmart_ad hdfs://ns1/user/jd_ad ```

0 回复
需要 登录 后方可回复, 如果你还没有账号你可以 注册 一个帐号。