You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/12/05 16:36:00 UTC

[jira] [Updated] (HDDS-4494) Provide Guice module to inject configuration to annotated fields

     [ https://issues.apache.org/jira/browse/HDDS-4494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HDDS-4494:
---------------------------------
    Labels: pull-request-available  (was: )

> Provide Guice module to inject configuration to annotated fields
> ----------------------------------------------------------------
>
>                 Key: HDDS-4494
>                 URL: https://issues.apache.org/jira/browse/HDDS-4494
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>            Reporter: Marton Elek
>            Assignee: Marton Elek
>            Priority: Major
>              Labels: pull-request-available
>
> hadoop-hdds/config project provides a light-weight annotation based configuration interface. It supports to create an object with injection:
> {code:java}
> ReplicationConfig replicationConfig := ozoneConfig.getObject(replicationConfig); {code}
> However, it seems to be hard to inject configuration to the service itself as usually we inject a lot of other dependencies to the constructor, not just the configuration.
>  
> One possible solution is using a Guice module. Guice is already used by recon, and this patch adds some optional modules to inject configuration variables to any service / instance if required.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org