BTW, what is the practice for adding/removing property in the new version of component ? I think it is very common for each component. Is there any example I can refer ?
On Tue, Jan 12, 2016 at 7:57 PM, Jeff Zhang <[email protected]> wrote: > Hi Mithun, > > Is it supported for PropertyFile as well ? > > On Fri, Jan 8, 2016 at 12:56 AM, Mithun Mathew <[email protected]> wrote: > >> This is one way to do it: >> - Get the existing configurations, and assign a *copy *of it to a >> variable, >> let's call it config_copy. >> - Introduce the new parameter based on the version, as a key:value pair >> into config_copy >> - Write it back to file using XmlConfig resource >> >> Refer: >> >> https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/common.py#L86-#L107 >> >> On Fri, Jan 8, 2016 at 12:01 AM, Jeff Zhang <[email protected]> wrote: >> >> > I want to add one new property for spark's spark-defaults.xml, but I >> only >> > want it to be in the latest version. I try to add it in python code, but >> > seem the ConfigDictionary is immutable. Another way I can think of is >> using >> > template, but it seems too large change, and I afraid it may change the >> > configuration layout in UI. Anyone know How can I do it for specific >> > version ? Thanks >> > >> > -- >> > Best Regards >> > >> > Jeff Zhang >> > >> >> >> >> -- >> *Mithun Mathew* (Matt) >> >> - www.linkedin.com/in/mithunmatt/ >> > > > > -- > Best Regards > > Jeff Zhang > -- Best Regards Jeff Zhang
