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

Andras Piros commented on OOZIE-3462:
-------------------------------------

Thanks for caring [~asalamon74]!

I think removing duplicates like default configuration values in the code and 
in {{oozie-default.xml}} is a good idea. I'm for removing default values in the 
code.

We need to pay attention to missing / diverging default values; the ones 
present only in the code, or present at both places, but contradictory. 
{{oozie-default.xml}} should be the single source of truth. On the other hand, 
since {{ConfigurationService}} is not part of any public API, I think we can 
just remove those unnecessary calls from both the service and the caller code 
as part of upcoming {{5.2.0}} release.

> Reconcile defaults between oozie-default.xml and the code
> ---------------------------------------------------------
>
>                 Key: OOZIE-3462
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3462
>             Project: Oozie
>          Issue Type: Improvement
>            Reporter: Andras Salamon
>            Priority: Major
>
> OOZIE-1890 addressed the issues of config default values with the following 
> steps:
>  * make {{oozie-site.xml}} empty
>  * put (almost) all configuration from {{oozie-default.xml}}
>  * remove default values from the code
> It left the following confusing text at the 
> [beginning|https://github.com/apache/oozie/blob/master/core/src/main/resources/oozie-default.xml#L22-L25]
>  of the oozie-default.xml site:
> {noformat}
> This file is in the Oozie configuration directory only for reference.
> It is not loaded by Oozie, Oozie uses its own privatecopy.{noformat}
> Maybe it's referring to the {{oozie-site.xml}} or assumes that all the 
> default values are specified in the code. I think this text is misleading, we 
> should delete it.
> Although OOZIE-1890 removed all the defaults from the source code (replacing 
> code like {{getInt(name, defaultValue)}} with {{getInt(name))}} later 
> defaults were introduced again into the code.
> I think we need to revisit the issue again:
>  # remove default values from the code
>  # modify {{ConfigurationService}} to avoid using default values in the code 
> (at least make those methods deprecated, maybe throw 
> {{IllegalArgumentException}} but I'm afraid that would be too strict.
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to