You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by "Konstantin Boudnik (JIRA)" <ji...@apache.org> on 2015/03/13 19:30:39 UTC

[jira] [Comment Edited] (BIGTOP-1689) puppet: Allow merging arbitrary site configuration

    [ https://issues.apache.org/jira/browse/BIGTOP-1689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14360876#comment-14360876 ] 

Konstantin Boudnik edited comment on BIGTOP-1689 at 3/13/15 6:30 PM:
---------------------------------------------------------------------

bq. I have to admit, I do not know if the Hadoop XML configuration file syntax actually requires each setting to be given only once or if it supports a parse order for overriding the same setting within the same file.
Hadoop configuration code is quite suboptimal to say politely. The short answer: it is *probably* using the last definition it finds. But AFAIK no one would guarantee not to change in the next sub.minor release or something.

So, I agree with Rob - if we can guarantee generation of clean configs - we'd be better off.


was (Author: cos):
bq. I have to admit, I do not know if the Hadoop XML configuration file syntax actually requires each setting to be given only once or if it supports a parse order for overriding the same setting within the same file.
Hadoop configuration code is quite suboptimal to say politely. The short answer: it is *probably* using the last definition it finds. But AFAIK no one would guarantee not to change in the next sub.minor release or something.

> puppet: Allow merging arbitrary site configuration
> --------------------------------------------------
>
>                 Key: BIGTOP-1689
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1689
>             Project: Bigtop
>          Issue Type: Improvement
>          Components: deployment
>    Affects Versions: 0.8.0
>            Reporter: Peter Slawski
>            Assignee: Peter Slawski
>             Fix For: 0.9.0
>
>         Attachments: BIGTOP-1689.1.patch
>
>
> Puppet should be flexible in allowing arbitrary configuration name value pairs to be merged into a given site.xml file that was generated from a template.
> For example, the following could be included in site.yaml which would add a configuration entry for hadoop.tmp.dir in core-site.xml:
> {code}
> hadoop::common_hdfs::hadoop_core_site_overrides:
>   "hadoop.tmp.dir": "/mnt/var/lib/hadoop/tmp"
> {code}
> This could be implemented as a puppet custom-function taking in the output of template:
> {code}
>     file {
>       "/etc/hadoop/conf/core-site.xml":
>         content => merge_site(template('hadoop/core-site.xml'),  $hadoop_core_site_overrides)
>         require => [Package["hadoop"]],
>     }
> {code}
> Perhaps another approach would be to have site.xml templates be created from a single map of name value pairs. The merge would happen before the file content is generated from the template.



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