[ 
https://issues.apache.org/jira/browse/HDDS-2808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17025518#comment-17025518
 ] 

Siddharth Wagle edited comment on HDDS-2808 at 1/29/20 1:19 AM:
----------------------------------------------------------------

Hi [~maobaolong], can you please add more details about why you did not get 
this to work? I am able to specify the -conf <filepath> and see the db created 
at a custom location.

The way it works is, Configuration instance is bound by ReconControllerModule 
before it installs the JooqPersistenceModule and the Datasource gets this 
configuration object. 
So although we inject the Datasource it will get our own Configuration, the way 
we get around with injecting customized configuration instance is using a 
ConfigurationProvider class and setting an ugly static reference, but that's, 
unfortunately, the result of mixing non-DI and DI code.


was (Author: swagle):
Hi [~maobaolong], can you please add more details about why you did not get 
this to work? I am able to specify the -conf and see the db created at a custom 
location.

The way it works is, Configuration instance is bound by ReconControllerModule 
before it installs the JooqPersistenceModule and the Datasource gets this 
configuration object. 
So although we inject the Datasource it will get our own Configuration, the way 
we get around with injecting customized configuration instance is using a 
ConfigurationProvider class and setting an ugly static reference, but that's, 
unfortunately, the result of mixing non-DI and DI code.

> Inject annotation make DefaultDataSourceProvider.configuration miss the 
> configurationPath from -conf argument
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-2808
>                 URL: https://issues.apache.org/jira/browse/HDDS-2808
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Recon
>    Affects Versions: 0.5.0
>            Reporter: maobaolong
>            Assignee: Siddharth Wagle
>            Priority: Critical
>         Attachments: image-2019-12-25-23-38-01-403.png, ozone-site.xml
>
>
> This issue make the -conf do not work well with ReconServer.
> *reproduction*
> Run ReconServer with Intellj idea.
> Main class: org.apache.hadoop.ozone.recon.ReconServer
> -conf 
> /Users/mbl/projects/github/hadoop-ozone/hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/etc/hadoop/ozone-site.xml
>  !image-2019-12-25-23-38-01-403.png! 
> the ozone-site.xml which i use conf option to specify is upload as an 
> attachment.



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

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

Reply via email to