Re: [DISCUSS] REST + ambari

2017-05-09 Thread Otto Fowler
Thank you everyone. The property I needed was actually already in the configuration, but not referenced in the code, so I missed it. I have refactored to use the configuration properly. On May 8, 2017 at 10:21:14, Simon Elliston Ball (si...@simonellistonball.com) wrote: Not from an ENV

Re: [DISCUSS] REST + ambari

2017-05-08 Thread Simon Elliston Ball
Not from an ENV variable per-se, but from the spring config. Hence anything in the application.yml can be pushed into a field in a REST service endpoint with the @Value annotation. Simon > On 8 May 2017, at 14:59, Otto Fowler wrote: > > So that stuff is read from

Re: [DISCUSS] REST + ambari

2017-05-08 Thread Otto Fowler
Can anyone describe the configuration flow from packaging/ambari to the rest application FooConfig? If I was going to add a new ambari variable from metron_env.xml and expose it to rest? On May 8, 2017 at 09:59:10, Otto Fowler (ottobackwa...@gmail.com) wrote: So that stuff is read from the

Re: [DISCUSS] REST + ambari

2017-05-08 Thread Otto Fowler
So that stuff is read from the environment variable? On May 8, 2017 at 09:27:48, Otto Fowler (ottobackwa...@gmail.com) wrote: OK, that is great. My works has bridged the move of rest into ambari. Mentally, I obviously haven’t caught up :) I’ll look for an example where we are reading

Re: [DISCUSS] REST + ambari

2017-05-08 Thread Otto Fowler
OK, that is great. My works has bridged the move of rest into ambari. Mentally, I obviously haven’t caught up :) I’ll look for an example where we are reading application configuration variables out in the rest service. Thanks! On May 8, 2017 at 09:08:46, Simon Elliston Ball

Re: [DISCUSS] REST + ambari

2017-05-08 Thread Ryan Merriman
It already works the way Simon describes. On Mon, May 8, 2017 at 8:08 AM, Simon Elliston Ball < si...@simonellistonball.com> wrote: > My proposal would be that the REST api use it’s application.yml for all > the parameters and have settings it needs included in that. E.g. the metron > directory

Re: [DISCUSS] REST + ambari

2017-05-08 Thread Simon Elliston Ball
My proposal would be that the REST api use it’s application.yml for all the parameters and have settings it needs included in that. E.g. the metron directory you need is set as a property of that yml, which is then accessible through the spring config auto-wiring - @Value(“${metron.directory}”)

Re: [DISCUSS] REST + ambari

2017-05-08 Thread Otto Fowler
The issue is that we have services that need to access the ambari rest api from inside the rest server. Technically, if someone changes the defaults for the metron directory etc, the rest won’t pick it up. I have a PR coming as a follow on to METRON-777 for installing extensions, and I write to