Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop, mail # dev - making a hadoop-common test run if a property is set


+
Steve Loughran 2012-12-14, 17:56
+
Colin McCabe 2012-12-14, 18:57
+
Steve Loughran 2012-12-17, 10:06
+
Tom White 2012-12-17, 16:06
+
Steve Loughran 2012-12-17, 19:03
+
Colin McCabe 2012-12-18, 09:05
Copy link to this message
-
Re: making a hadoop-common test run if a property is set
Steve Loughran 2012-12-18, 10:32
On 18 December 2012 09:05, Colin McCabe <[EMAIL PROTECTED]> wrote:

>
> I think the way to go is to have one XML file include another.
>
> <?xml version="1.0"?>
> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
> <configuration xmlns:xi="http://www.w3.org/2001/XInclude">
>   <property>
>      <name>boring.config.1</name>
>      <value>boring-value</value>
>      ... etc, etc...
>   <xi:include href="../secret-stuff.xml" />
> </configuration>
>
> That way, you can keep the boring configuration under version control,
> and still have your password sitting in a small separate
> non-version-controlled XML file.
>
> We use this trick a bunch with the HA configuration stuff-- 99% of the
> configuration is the same between the Active and Standby Namenodes,
> but you can't give them the same dfs.ha.namenode.id or dfs.name.dir.
> Includes help a lot here.
>
> I like this approach -we could even have xi:fallback within the include
element to say "include this other file if nothing is checked in".

the default, checked in, -site.xml could then go

<xi:include href="../custom-stuff.xml><xi:fallback href="../empty.xml"
/></xi:include>

I'll try this on my tests to see how well it holds up, because if it does
work it is something to consider checking in. (Yes, I know xinclude isn't
there 100% of the time client side, but that's not going to happen on test
runs - https://issues.apache.org/jira/browse/HADOOP-5254 )
+
Colin McCabe 2012-12-18, 09:11
+
Steve Loughran 2012-12-18, 10:25
+
Steve Loughran 2012-12-18, 16:42