You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Eli Collins (Created) (JIRA)" <ji...@apache.org> on 2012/01/04 21:13:40 UTC
[jira] [Created] (HADOOP-7956) Remove duplicate definition of
default config values
Remove duplicate definition of default config values
----------------------------------------------------
Key: HADOOP-7956
URL: https://issues.apache.org/jira/browse/HADOOP-7956
Project: Hadoop Common
Issue Type: Improvement
Components: conf
Reporter: Eli Collins
We define default configuration values in two places:
#1 The default.xml files (eg core-default.xml)
#2 The _DEFAULT defines in *Keys.java
This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
#1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
#2 Remove one of the definitions entirely (possible to live w/o the default files?) or
#3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7956) Remove duplicate definition of
default config values
Posted by "Eli Collins (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180064#comment-13180064 ]
Eli Collins commented on HADOOP-7956:
-------------------------------------
Do we need to document them in the default.xml files? The public keys already documented in the javadocs by being public parts of the classes. If we put all the public keys in a single class than (eg put anything missing into CommonConfigurationKeysPublic.java) then I don't see why we need the default.xml files.
> Remove duplicate definition of default config values
> ----------------------------------------------------
>
> Key: HADOOP-7956
> URL: https://issues.apache.org/jira/browse/HADOOP-7956
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Eli Collins
>
> We define default configuration values in two places:
> #1 The default.xml files (eg core-default.xml)
> #2 The _DEFAULT defines in *Keys.java
> This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
> #1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
> #2 Remove one of the definitions entirely (possible to live w/o the default files?) or
> #3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7956) Remove duplicate definition of
default config values
Posted by "Eli Collins (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186446#comment-13186446 ]
Eli Collins commented on HADOOP-7956:
-------------------------------------
I like #2 as well. We can verify that the defaults in the code match up with the defaults in the xml files when we make the change.
> Remove duplicate definition of default config values
> ----------------------------------------------------
>
> Key: HADOOP-7956
> URL: https://issues.apache.org/jira/browse/HADOOP-7956
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Eli Collins
>
> We define default configuration values in two places:
> #1 The default.xml files (eg core-default.xml)
> #2 The _DEFAULT defines in *Keys.java
> This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
> #1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
> #2 Remove one of the definitions entirely (possible to live w/o the default files?) or
> #3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7956) Remove duplicate definition of
default config values
Posted by "Robert Joseph Evans (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179840#comment-13179840 ]
Robert Joseph Evans commented on HADOOP-7956:
---------------------------------------------
This is further complicated because not all of the defaults are stored in KeysPublic* files. I have seen several locations where the defaults are inlined in the config.get call. These are usually just for code that only one line ever reads the config, but it is still there.
I am +1 for anything that will help to clean up the configuration.
> Remove duplicate definition of default config values
> ----------------------------------------------------
>
> Key: HADOOP-7956
> URL: https://issues.apache.org/jira/browse/HADOOP-7956
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Eli Collins
>
> We define default configuration values in two places:
> #1 The default.xml files (eg core-default.xml)
> #2 The _DEFAULT defines in *Keys.java
> This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
> #1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
> #2 Remove one of the definitions entirely (possible to live w/o the default files?) or
> #3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7956) Remove duplicate definition of
default config values
Posted by "Harsh J (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186434#comment-13186434 ]
Harsh J commented on HADOOP-7956:
---------------------------------
I like #2.
#1 has a chance of breaking some behavior, given our _reconfiguration_ history.
One I can think of, and came up recently from Koji on the ML, is the MR child opts vs. map/reduce specific child opts -- if both get present in default.xml, then it voids the former, breaking behavior even if the user wants to specify it.
> Remove duplicate definition of default config values
> ----------------------------------------------------
>
> Key: HADOOP-7956
> URL: https://issues.apache.org/jira/browse/HADOOP-7956
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Eli Collins
>
> We define default configuration values in two places:
> #1 The default.xml files (eg core-default.xml)
> #2 The _DEFAULT defines in *Keys.java
> This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
> #1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
> #2 Remove one of the definitions entirely (possible to live w/o the default files?) or
> #3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7956) Remove duplicate definition of
default config values
Posted by "Robert Joseph Evans (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179882#comment-13179882 ]
Robert Joseph Evans commented on HADOOP-7956:
---------------------------------------------
Suresh, deleting the version in the code could cause backwards compatibility issues. CommonConfigurationKeysPublic.java is public not only in the java since but also @InterfaceAudience.Public.
> Remove duplicate definition of default config values
> ----------------------------------------------------
>
> Key: HADOOP-7956
> URL: https://issues.apache.org/jira/browse/HADOOP-7956
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Eli Collins
>
> We define default configuration values in two places:
> #1 The default.xml files (eg core-default.xml)
> #2 The _DEFAULT defines in *Keys.java
> This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
> #1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
> #2 Remove one of the definitions entirely (possible to live w/o the default files?) or
> #3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7956) Remove duplicate definition of
default config values
Posted by "Suresh Srinivas (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179870#comment-13179870 ]
Suresh Srinivas commented on HADOOP-7956:
-----------------------------------------
Eli, the default.xml serves as documentation of config parameters. Currently the ones that are not defined in that are hidden configs that used only by internal implementation. The defaults in the code currently serves in case default.xml gets edited. Though the duplication seems not clean, not sure how you can avoid that. Could we throw an exception if the default expected value from the config is missing and get rid of the default defined in the code? That seems like a lot of work.
> Remove duplicate definition of default config values
> ----------------------------------------------------
>
> Key: HADOOP-7956
> URL: https://issues.apache.org/jira/browse/HADOOP-7956
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Eli Collins
>
> We define default configuration values in two places:
> #1 The default.xml files (eg core-default.xml)
> #2 The _DEFAULT defines in *Keys.java
> This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
> #1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
> #2 Remove one of the definitions entirely (possible to live w/o the default files?) or
> #3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7956) Remove duplicate definition of
default config values
Posted by "Suresh Srinivas (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180230#comment-13180230 ]
Suresh Srinivas commented on HADOOP-7956:
-----------------------------------------
Assuming you are talking about files such as hdfs-default.xml, yes it does serve as docs for admins on config available and what can be overridden in *-site.xml. I am not sure if javadoc would come handy for such a target audience.
> Remove duplicate definition of default config values
> ----------------------------------------------------
>
> Key: HADOOP-7956
> URL: https://issues.apache.org/jira/browse/HADOOP-7956
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Eli Collins
>
> We define default configuration values in two places:
> #1 The default.xml files (eg core-default.xml)
> #2 The _DEFAULT defines in *Keys.java
> This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
> #1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
> #2 Remove one of the definitions entirely (possible to live w/o the default files?) or
> #3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-7956) Remove duplicate definition of
default config values
Posted by "Eli Collins (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180692#comment-13180692 ]
Eli Collins commented on HADOOP-7956:
-------------------------------------
How about:
#1 Generating the default.xml files from the PublicKeys.java files? or
#2 Making the default.xml files just documentation (don't load them as resources, rely on the values defined in the source which IMO should be authoritative)
> Remove duplicate definition of default config values
> ----------------------------------------------------
>
> Key: HADOOP-7956
> URL: https://issues.apache.org/jira/browse/HADOOP-7956
> Project: Hadoop Common
> Issue Type: Improvement
> Components: conf
> Reporter: Eli Collins
>
> We define default configuration values in two places:
> #1 The default.xml files (eg core-default.xml)
> #2 The _DEFAULT defines in *Keys.java
> This means the defaults used in the code may or may not be dead code based on whether the config is present in the default xml file. Would be good to define these in one place. Eg:
> #1 Just have the defines in the code and figure out how to make those accessible as a loadable resource (eg could generate the default files from the defines in the KeysPublic* files)
> #2 Remove one of the definitions entirely (possible to live w/o the default files?) or
> #3 Remove the overlap between the code and default files
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira