-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47939/
-----------------------------------------------------------

(Updated May 27, 2016, 2:03 a.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


Changes
-------

Added loggiong for Blueprint Strategy used.


Bugs: AMBARI-16919
    https://issues.apache.org/jira/browse/AMBARI-16919


Repository: ambari


Description (updated)
-------

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".

------
        "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"
          }
        },
----------


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

------
        "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"
          }
        },
------

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"].


- Also, added loggiong for Blueprint Strategy used.


Diffs (updated)
-----

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
 4e404bc 
  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
44407ca 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 01064a6 

Diff: https://reviews.apache.org/r/47939/diff/


Testing
-------

Added the Python UT.
- Python UT passes.


Thanks,

Swapan Shridhar

Reply via email to