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

Alejandro Fernandez updated AMBARI-19809:
-----------------------------------------
    Status: Patch Available  (was: Open)

> HDP 3.0 TP - failed to deploy YARN configs because yarn-site creates 
> conflicts since should not belong to MAPREDUCE2
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-19809
>                 URL: https://issues.apache.org/jira/browse/AMBARI-19809
>             Project: Ambari
>          Issue Type: Bug
>          Components: stacks
>    Affects Versions: 3.0.0
>            Reporter: Alejandro Fernandez
>            Assignee: Alejandro Fernandez
>             Fix For: 3.0.0
>
>         Attachments: AMBARI-19809.patch
>
>
> STR:
> * Install Ambari trunk
> * Install HDP 3.0, e.g., centos6: 
> http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/3.x/BUILDS/3.0.0.0-30
> * Select ZK, HDFS, YARN
> * During deployment, will see the following error in the ambari-server log
> {noformat}
> 26 Jan 2017 20:01:48,119 ERROR [ambari-client-thread-26] ClusterImpl:2662 - 
> Updating configs for multiple services by a single API request isn't 
> supported. Conflicting services YARN and MAPREDUCE2 for yarn-site, config 
> version not created for YARN
> {noformat}
> This is likely due to changes I introduced in YARN's Service Advisor by 
> splitting it up into YARN and MAPREDUCE classes.
> ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
> has YARNServiceAdvisor, MAPREDUCE2ServiceAdvisor
> Ideally, we can keep those 2 classes, but let's also explore 
> ClusterImpl.java's applyConfigs() method.
> {code}
>   ServiceConfigVersionResponse applyConfigs(Set<Config> configs, String user, 
> String serviceConfigVersionNote) {
>     String serviceName = null;
>     for (Config config : configs) {
>       for (Entry<String, String> entry : serviceConfigTypes.entries()) {
>         if (StringUtils.equals(entry.getValue(), config.getType())) {
>           if (serviceName == null) {
>             serviceName = entry.getKey();
>             break;
>           } else if (!serviceName.equals(entry.getKey())) {
>             String error = String.format("Updating configs for multiple 
> services by a " +
>                 "single API request isn't supported. Conflicting services %s 
> and %s for %s",
>                                          serviceName, entry.getKey(), 
> config.getType());
>             IllegalArgumentException exception = new 
> IllegalArgumentException(error);
>             LOG.error(error + ", config version not created for {}", 
> serviceName);
>             throw exception;
>           } else {
>             break;
>           }
>         }
>       }
>     }
>    ...
> {code}
> This is because yarn-site is marked right now as belonging to both YARN and 
> MAPREDUCE2, which is incorrect since it should not belong to MAPREDUCE2.
> The fix update the HDP 3.0 service definition for MAPREDUCE2 to use the 
> correct configuration directory.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to