You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Jeff Zhang <zj...@gmail.com> on 2016/01/06 07:33:40 UTC

How to add non-standard configuration file to component ?

I'd like to add one configuration to spark, format like following. It is
neither hadoop xml nor property file. Is there any way to add this kind of
configuration file ?

<allocations>
  <pool name="default">
     <schedulingMode>FAIR</schedulingMode>
     <weight>1</weight>
     <minShare>2</minShare>
  </pool>
</allocations>




-- 
Best Regards

Jeff Zhang

Re: How to add non-standard configuration file to component ?

Posted by Mithun Mathew <mi...@gmail.com>.
Example of a .j2 template:
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/templates/slaves.j2

On Tue, Jan 5, 2016 at 10:48 PM, Sumit Mohanty <sm...@hortonworks.com>
wrote:

> You can use the jinja2 template support. Look for .j2 files and how they
> are used.
> ________________________________________
> From: Jeff Zhang <zj...@gmail.com>
> Sent: Tuesday, January 05, 2016 10:36 PM
> To: dev@ambari.apache.org
> Subject: Re: How to add non-standard configuration file to component ?
>
> If it can not be generated at runtime like other configuration files, I am
> fine with just copying this file to conf directory.
>
> On Wed, Jan 6, 2016 at 2:33 PM, Jeff Zhang <zj...@gmail.com> wrote:
>
> > I'd like to add one configuration to spark, format like following. It is
> > neither hadoop xml nor property file. Is there any way to add this kind
> of
> > configuration file ?
> >
> > <allocations>
> >   <pool name="default">
> >      <schedulingMode>FAIR</schedulingMode>
> >      <weight>1</weight>
> >      <minShare>2</minShare>
> >   </pool>
> > </allocations>
> >
> >
> >
> >
> > --
> > Best Regards
> >
> > Jeff Zhang
> >
>
>
>
> --
> Best Regards
>
> Jeff Zhang
>



-- 
*Mithun Mathew* (Matt)

   - www.linkedin.com/in/mithunmatt/

Re: How to add non-standard configuration file to component ?

Posted by Jeff Zhang <zj...@gmail.com>.
Thanks all, it works ☺

On Wed, Jan 6, 2016 at 2:53 PM, Jayush Luniya <jl...@hortonworks.com>
wrote:

> Here is an example:
> ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/packa
> ge/templates/auditLog.xml.j2
> Thanks
> Jayush
>
> On 1/5/16, 10:48 PM, "Sumit Mohanty" <sm...@hortonworks.com> wrote:
>
> >You can use the jinja2 template support. Look for .j2 files and how they
> >are used.
> >________________________________________
> >From: Jeff Zhang <zj...@gmail.com>
> >Sent: Tuesday, January 05, 2016 10:36 PM
> >To: dev@ambari.apache.org
> >Subject: Re: How to add non-standard configuration file to component ?
> >
> >If it can not be generated at runtime like other configuration files, I am
> >fine with just copying this file to conf directory.
> >
> >On Wed, Jan 6, 2016 at 2:33 PM, Jeff Zhang <zj...@gmail.com> wrote:
> >
> >> I'd like to add one configuration to spark, format like following. It is
> >> neither hadoop xml nor property file. Is there any way to add this kind
> >>of
> >> configuration file ?
> >>
> >> <allocations>
> >>   <pool name="default">
> >>      <schedulingMode>FAIR</schedulingMode>
> >>      <weight>1</weight>
> >>      <minShare>2</minShare>
> >>   </pool>
> >> </allocations>
> >>
> >>
> >>
> >>
> >> --
> >> Best Regards
> >>
> >> Jeff Zhang
> >>
> >
> >
> >
> >--
> >Best Regards
> >
> >Jeff Zhang
> >
>
>


-- 
Best Regards

Jeff Zhang

Re: How to add non-standard configuration file to component ?

Posted by Jayush Luniya <jl...@hortonworks.com>.
Here is an example:
ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/packa
ge/templates/auditLog.xml.j2
Thanks
Jayush

On 1/5/16, 10:48 PM, "Sumit Mohanty" <sm...@hortonworks.com> wrote:

>You can use the jinja2 template support. Look for .j2 files and how they
>are used.
>________________________________________
>From: Jeff Zhang <zj...@gmail.com>
>Sent: Tuesday, January 05, 2016 10:36 PM
>To: dev@ambari.apache.org
>Subject: Re: How to add non-standard configuration file to component ?
>
>If it can not be generated at runtime like other configuration files, I am
>fine with just copying this file to conf directory.
>
>On Wed, Jan 6, 2016 at 2:33 PM, Jeff Zhang <zj...@gmail.com> wrote:
>
>> I'd like to add one configuration to spark, format like following. It is
>> neither hadoop xml nor property file. Is there any way to add this kind
>>of
>> configuration file ?
>>
>> <allocations>
>>   <pool name="default">
>>      <schedulingMode>FAIR</schedulingMode>
>>      <weight>1</weight>
>>      <minShare>2</minShare>
>>   </pool>
>> </allocations>
>>
>>
>>
>>
>> --
>> Best Regards
>>
>> Jeff Zhang
>>
>
>
>
>--
>Best Regards
>
>Jeff Zhang
>


Re: How to add non-standard configuration file to component ?

Posted by Sumit Mohanty <sm...@hortonworks.com>.
You can use the jinja2 template support. Look for .j2 files and how they are used.
________________________________________
From: Jeff Zhang <zj...@gmail.com>
Sent: Tuesday, January 05, 2016 10:36 PM
To: dev@ambari.apache.org
Subject: Re: How to add non-standard configuration file to component ?

If it can not be generated at runtime like other configuration files, I am
fine with just copying this file to conf directory.

On Wed, Jan 6, 2016 at 2:33 PM, Jeff Zhang <zj...@gmail.com> wrote:

> I'd like to add one configuration to spark, format like following. It is
> neither hadoop xml nor property file. Is there any way to add this kind of
> configuration file ?
>
> <allocations>
>   <pool name="default">
>      <schedulingMode>FAIR</schedulingMode>
>      <weight>1</weight>
>      <minShare>2</minShare>
>   </pool>
> </allocations>
>
>
>
>
> --
> Best Regards
>
> Jeff Zhang
>



--
Best Regards

Jeff Zhang

Re: How to add non-standard configuration file to component ?

Posted by Jeff Zhang <zj...@gmail.com>.
If it can not be generated at runtime like other configuration files, I am
fine with just copying this file to conf directory.

On Wed, Jan 6, 2016 at 2:33 PM, Jeff Zhang <zj...@gmail.com> wrote:

> I'd like to add one configuration to spark, format like following. It is
> neither hadoop xml nor property file. Is there any way to add this kind of
> configuration file ?
>
> <allocations>
>   <pool name="default">
>      <schedulingMode>FAIR</schedulingMode>
>      <weight>1</weight>
>      <minShare>2</minShare>
>   </pool>
> </allocations>
>
>
>
>
> --
> Best Regards
>
> Jeff Zhang
>



-- 
Best Regards

Jeff Zhang