Hi,

If it helps, we're using Lightbend's Config for that:

* https://github.com/lightbend/config
*
https://www.stubbornjava.com/posts/environment-aware-configuration-with-typesafe-config

Thanks,
Rafi


On Wed, Apr 17, 2019 at 7:07 AM Andy Hoang <a...@parcelperform.com> wrote:

> I have 3 different files for env: test, staging and production. Each of
> those has different parameters like: kafka host, endpoint urls, redis
> connection host…
> I read about `
> https://ci.apache.org/projects/flink/flink-docs-stable/dev/best_practices.html#register-the-parameters-globally`
>  but
> its has a few downside: If I have a model class (for transformation) and
> want to use a env variable, I have to pass it in the constructor (because
> the global paramters can only accessed inside context)
>
> I wonder if are there any better solution for accessing env anywhere in
> our jobs? I can be fine with having a class storing all the env values and
> if I can somehow spec the env as “prod” I can init the ProdEnv Class… I’m
> looking for any ideas here :)
>
> Thank a bunch,
>
> Andy,
>

Reply via email to