The Configuration
object isn't linked to the System properties - if you want to change the value of z
in the configuration, then use conf.set('z', 'SystemProp_mz')
instead of System.setProperty(..)
Update
The Configuration object can use variable expansion as outlined in http://hadoop.apache.org/docs/current/api/org/apache/hadoop/conf/Configuration.html, but this requires you to have defined an entry as follows:
<configuration>
<property>
<name>z</name>
<value>${z}</value>
</property>
</configuration>
If you have don't have the above entry, then just calling conf.get("z")
will not resolve to system properties. The following unit test block demonstrates this:
@Test
public void testConfSystemProps() {
System.setProperty("sysProp", "value");
Configuration conf = new Configuration();
conf.set("prop", "${sysProp}");
Assert.assertNull(conf.get("sysProp"));
Assert.assertEquals(conf.get("prop"), "value");
}