elek commented on pull request #989:
URL: https://github.com/apache/hadoop-ozone/pull/989#issuecomment-637528740


   > , I think it's a little complex because it depends on the maven compile. 
my suggestion is to make a unify configuration class and put default value on 
it, this way we don't need to generate configuration value during compile, just 
like what HiveConf.java in hive project does , what do you think ? @elek
   
   I am not sure if I understand the fully (I sorry if I misunderstood). 
   
    1. Strictly speaking it depends on java compile not maven compile, 
annotation processors can work together with any javac
    2. I think one goal was to keep the defaults **and** the configuration 
definitions at same place (earlier we had Constants + XML. We kept it to 
different place.). I think the compilation step adds only a little complexity, 
but it has huge benefit to keep all the defaults together with the 
configuraiton.
   
   One possible usage: With this approach we can print out easily all the 
default configuration (or all the configuration which have no default) for each 
of the projects (om/scm/common/client...)
   
   If we would like to avoid the compilation phase, we can try to override the 
initialization of `Configuration`. As of now we load them from the fragments 
(`OzoneConfiguration.loadDefaults`), but it would be possible to directly read 
from the `@ConfigGroup` classes instead of parsing XML. (Yes, we need the list 
of the annotated classes in this case which either requires annotation 
processor or a list of the annotated classes). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to