首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用于管理纱线容量队列的API

用于管理纱线容量队列的API
EN

Stack Overflow用户
提问于 2018-01-26 22:03:36
回答 1查看 276关注 0票数 0

我想使用API管理纱线容量队列。我通过curl创建了Hadoop的安全策略:

代码语言:javascript
复制
hadoop_policy()
{
        curl -H "Content-Type: application/json" -u "${ranger_admin}:${ranger_password}" \
        -d "{ \
            \"allowExceptions\": [], \
            \"denyExceptions\": [], \
            \"dataMaskPolicyItems\": [], \
            \"rowFilterPolicyItems\": [], \
            \"denyPolicyItems\": [], \
            \"description\": \"Securite HDFS pour l'utilisateur ${user}\", \
            \"isAuditEnabled\": true, \
            \"isEnabled\": true, \
            \"name\": \"user_${user}\", \
            \"policyItems\": [ \
                { \
                    \"accesses\": [ \
                        { \
                            \"isAllowed\": true, \
                            \"type\": \"read\" \
                        }, \
                        { \
                            \"isAllowed\": true, \
                            \"type\": \"write\" \
                        }, \
                        { \
                            \"isAllowed\": true, \
                            \"type\": \"execute\" \
                        } \
                    ], \
                    \"conditions\": [], \
                    \"delegateAdmin\": false, \
                    \"groups\": [], \
                    \"users\": [\"${user}\"] \
                } \
            ], \
            \"resources\": { \
                \"path\": { \
                    \"isExcludes\": false, \
                    \"isRecursive\": true, \
                    \"values\": [ \
                        \"/user/${user}\",\"/apps/hive/warehouse/${user}_*\" \
                    ] \
                } \
            }, \
            \"service\": \"${ranger_cluster}_hadoop\", \
            \"version\": 1 \
        }" \
        ${ranger_host}/service/public/v2/api/policy/
        if [ $? != 0 ]; then
                sortieErreur "Erreur de creation de la politique ${policyService} pour l'utilisateur ${user}" 1
        fi
}

我有5个队列,我想通过API来管理它们,

EN

回答 1

Stack Overflow用户

发布于 2018-03-07 05:13:18

如果您正在使用Hadoop3和Capacity Scheduler,那么有一个新的alpha-stage API可以更改调度器配置。端点是:

群集RM-URL:端口/ws/v1/

/scheduler-conf

它支持队列的添加、更新和删除,以及常规的配置更新。

Scheduler Configuration Mutation API

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48462872

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档