[
https://issues.apache.org/jira/browse/HADOOP-6241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Philip Zeyliger updated HADOOP-6241:
------------------------------------
Attachment: HADOOP-6241.patch.txt
I'm attaching a quick script I wrote for this purpose. The help is pasted in
below for lighter reading.
I'm very open to suggestions about what to name the script (split-config.py is
a bit generic). Is bin/ an appropriate place for this, or is there a better
place?
To run, the script requires that lxml for python is installed on your system.
It's not included and is BSD-licensed.
http://codespeak.net/lxml/index.html#license . There's a built-in test that
should be run with the nose test runner
(http://pypi.python.org/pypi/nose/0.11.1 -- LGPL), though that dependency could
be removed quite easily.
{noformat}
This script separates a single Hadoop XML configuration file
into multiple ones, by finding properties that are
in supplied templates and storing them in the designated
output files.
This script comes about to solve the problem of splitting
up "hadoop-site.xml" into "core-site.xml", "mapred-site.xml",
and "hdfs-site.xml", and, in fact, a common usage would be
split-config.py --input hadoop-site.xml \\
--template core-default.xml \\
--template hdfs-default.xml \\
--template mapred-default.xml \\
--output core-site.xml \\
--output hdfs-site.xml \\
--output mapred-site.xml
{noformat}
> Script to split configurations from one file into multiple, according to
> templates.
> -----------------------------------------------------------------------------------
>
> Key: HADOOP-6241
> URL: https://issues.apache.org/jira/browse/HADOOP-6241
> Project: Hadoop Common
> Issue Type: New Feature
> Reporter: Philip Zeyliger
> Attachments: HADOOP-6241.patch.txt
>
>
> This script moves properties from hadoop-site.xml into common-site,
> mapred-site, and hdfs-site in a reasonably generic way. This is useful for
> upgrading clusters from 0.18 to 0.20 and 0.21.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.