[ 
https://issues.apache.org/jira/browse/AMBARI-16919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Swapan Shridhar updated AMBARI-16919:
-------------------------------------
    Description: 
AMBARI-16888 handled the scenario when capacity-scheduler is passed in as 
dictionary and 
services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
 set as value = "null".

{code}
        "capacity-scheduler" : {
          "properties" : {
            "capacity-scheduler" : "null",
            "yarn.scheduler.capacity.root.accessible-node-labels" : "*",
            "yarn.scheduler.capacity.maximum-am-resource-percent" : "1",
            "yarn.scheduler.capacity.root.acl_administer_queue" : "*",
            "yarn.scheduler.capacity.queue-mappings-override.enable" : 'false',
            "yarn.scheduler.capacity.root.default.capacity" : "100",
            "yarn.scheduler.capacity.root.default.user-limit-factor" : "1",
            "yarn.scheduler.capacity.root.queues" : "default",
            "yarn.scheduler.capacity.root.capacity" : "100",
            "yarn.scheduler.capacity.root.default.acl_submit_applications" : 
"*",
            "yarn.scheduler.capacity.root.default.maximum-capacity" : "100",
            "yarn.scheduler.capacity.node-locality-delay" : "40",
            "yarn.scheduler.capacity.maximum-applications" : "10000",
            "yarn.scheduler.capacity.root.default.state" : "RUNNING"
          }
        },
{code}

But. there can be another scenario where passed-in 'capacity-scheduler' is like 
:

{code}
        "capacity-scheduler" : {
          "properties" : {
            "capacity-scheduler" : null,
            "yarn.scheduler.capacity.root.accessible-node-labels" : "*",
            "yarn.scheduler.capacity.maximum-am-resource-percent" : "1",
            "yarn.scheduler.capacity.root.acl_administer_queue" : "*",
            "yarn.scheduler.capacity.queue-mappings-override.enable" : 'false',
            "yarn.scheduler.capacity.root.default.capacity" : "100",
            "yarn.scheduler.capacity.root.default.user-limit-factor" : "1",
            "yarn.scheduler.capacity.root.queues" : "default",
            "yarn.scheduler.capacity.root.capacity" : "100",
            "yarn.scheduler.capacity.root.default.acl_submit_applications" : 
"*",
            "yarn.scheduler.capacity.root.default.maximum-capacity" : "100",
            "yarn.scheduler.capacity.node-locality-delay" : "40",
            "yarn.scheduler.capacity.maximum-applications" : "10000",
            "yarn.scheduler.capacity.root.default.state" : "RUNNING"
          }
        },
{code}


Here, 
services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
 is itself 'null'. 

We get into reading capacity-scheduler configs as key-value only if we dont 
find configs passed in as single '\n' string at level 
services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]:
 

  was:
AMBARI-16888 handled the scenario when capacity-scheduler is passed in as 
dictionary and 
services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
 set as value = "null".

{code}
        "capacity-scheduler" : {
          "properties" : {
            "capacity-scheduler" : "null",
            "yarn.scheduler.capacity.root.accessible-node-labels" : "*",
            "yarn.scheduler.capacity.maximum-am-resource-percent" : "1",
            "yarn.scheduler.capacity.root.acl_administer_queue" : "*",
            "yarn.scheduler.capacity.queue-mappings-override.enable" : 'false',
            "yarn.scheduler.capacity.root.default.capacity" : "100",
            "yarn.scheduler.capacity.root.default.user-limit-factor" : "1",
            "yarn.scheduler.capacity.root.queues" : "default",
            "yarn.scheduler.capacity.root.capacity" : "100",
            "yarn.scheduler.capacity.root.default.acl_submit_applications" : 
"*",
            "yarn.scheduler.capacity.root.default.maximum-capacity" : "100",
            "yarn.scheduler.capacity.node-locality-delay" : "40",
            "yarn.scheduler.capacity.maximum-applications" : "10000",
            "yarn.scheduler.capacity.root.default.state" : "RUNNING"
          }
        },
{code}

But. there can be another scenario where passed-in 'capacity-scheduler' is like 
:

{code}
        "capacity-scheduler" : {
          "properties" : {
            "capacity-scheduler" : null,
            "yarn.scheduler.capacity.root.accessible-node-labels" : "*",
            "yarn.scheduler.capacity.maximum-am-resource-percent" : "1",
            "yarn.scheduler.capacity.root.acl_administer_queue" : "*",
            "yarn.scheduler.capacity.queue-mappings-override.enable" : 'false',
            "yarn.scheduler.capacity.root.default.capacity" : "100",
            "yarn.scheduler.capacity.root.default.user-limit-factor" : "1",
            "yarn.scheduler.capacity.root.queues" : "default",
            "yarn.scheduler.capacity.root.capacity" : "100",
            "yarn.scheduler.capacity.root.default.acl_submit_applications" : 
"*",
            "yarn.scheduler.capacity.root.default.maximum-capacity" : "100",
            "yarn.scheduler.capacity.node-locality-delay" : "40",
            "yarn.scheduler.capacity.maximum-applications" : "10000",
            "yarn.scheduler.capacity.root.default.state" : "RUNNING"
          }
        },
{code}


Here, 
services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
 is itself 'null'. 

We get into reading capacity-scheduler configs as key-value only if we dont 
find configs passed in as singl e'\n' string at level 
services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]:
 


> Handle the scenario when 'capacity-scheduler' is passed-in as dictionary to 
> Stack Advisor and 
> services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
>  is null.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-16919
>                 URL: https://issues.apache.org/jira/browse/AMBARI-16919
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.4.0
>            Reporter: Swapan Shridhar
>            Assignee: Swapan Shridhar
>            Priority: Blocker
>             Fix For: 2.4.0
>
>
> AMBARI-16888 handled the scenario when capacity-scheduler is passed in as 
> dictionary and 
> services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
>  set as value = "null".
> {code}
>         "capacity-scheduler" : {
>           "properties" : {
>             "capacity-scheduler" : "null",
>             "yarn.scheduler.capacity.root.accessible-node-labels" : "*",
>             "yarn.scheduler.capacity.maximum-am-resource-percent" : "1",
>             "yarn.scheduler.capacity.root.acl_administer_queue" : "*",
>             "yarn.scheduler.capacity.queue-mappings-override.enable" : 
> 'false',
>             "yarn.scheduler.capacity.root.default.capacity" : "100",
>             "yarn.scheduler.capacity.root.default.user-limit-factor" : "1",
>             "yarn.scheduler.capacity.root.queues" : "default",
>             "yarn.scheduler.capacity.root.capacity" : "100",
>             "yarn.scheduler.capacity.root.default.acl_submit_applications" : 
> "*",
>             "yarn.scheduler.capacity.root.default.maximum-capacity" : "100",
>             "yarn.scheduler.capacity.node-locality-delay" : "40",
>             "yarn.scheduler.capacity.maximum-applications" : "10000",
>             "yarn.scheduler.capacity.root.default.state" : "RUNNING"
>           }
>         },
> {code}
> But. there can be another scenario where passed-in 'capacity-scheduler' is 
> like :
> {code}
>         "capacity-scheduler" : {
>           "properties" : {
>             "capacity-scheduler" : null,
>             "yarn.scheduler.capacity.root.accessible-node-labels" : "*",
>             "yarn.scheduler.capacity.maximum-am-resource-percent" : "1",
>             "yarn.scheduler.capacity.root.acl_administer_queue" : "*",
>             "yarn.scheduler.capacity.queue-mappings-override.enable" : 
> 'false',
>             "yarn.scheduler.capacity.root.default.capacity" : "100",
>             "yarn.scheduler.capacity.root.default.user-limit-factor" : "1",
>             "yarn.scheduler.capacity.root.queues" : "default",
>             "yarn.scheduler.capacity.root.capacity" : "100",
>             "yarn.scheduler.capacity.root.default.acl_submit_applications" : 
> "*",
>             "yarn.scheduler.capacity.root.default.maximum-capacity" : "100",
>             "yarn.scheduler.capacity.node-locality-delay" : "40",
>             "yarn.scheduler.capacity.maximum-applications" : "10000",
>             "yarn.scheduler.capacity.root.default.state" : "RUNNING"
>           }
>         },
> {code}
> Here, 
> services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]
>  is itself 'null'. 
> We get into reading capacity-scheduler configs as key-value only if we dont 
> find configs passed in as single '\n' string at level 
> services['configurations']["capacity-scheduler"]["properties"]["capacity-scheduler"]:
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to