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 "Ahmed Radwan (JIRA)" <ji...@apache.org> on 2012/06/05 04:46:22 UTC

[jira] [Created] (HADOOP-8484) Prevent Configuration getter methods that are passed a default value from throwing RuntimeException

Ahmed Radwan created HADOOP-8484:
------------------------------------

             Summary: Prevent Configuration getter methods that are passed a default value from throwing RuntimeException
                 Key: HADOOP-8484
                 URL: https://issues.apache.org/jira/browse/HADOOP-8484
             Project: Hadoop Common
          Issue Type: Bug
          Components: conf
    Affects Versions: 2.0.0-alpha
            Reporter: Ahmed Radwan
             Fix For: 2.0.1-alpha


Configuration getter methods that are passed default values can throw RuntimeExceptions if the value provided is invalid (e.g. NumberFormatException).
In many cases such exception results in more serious consequences (failure to sart a service, see for example NodeManager DeletionService). This can be avoided by returning the default value and just printing a warning message.

--
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-8484) Prevent Configuration getter methods that are passed a default value from throwing RuntimeException

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289120#comment-13289120 ] 

Todd Lipcon commented on HADOOP-8484:
-------------------------------------

In general I would prefer to have it crash than to silently ignore an incorrect configuration. Even if a warning is printed, it will end up deep in some logs and probably go un-noticed.
                
> Prevent Configuration getter methods that are passed a default value from throwing RuntimeException
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8484
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8484
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 2.0.0-alpha
>            Reporter: Ahmed Radwan
>             Fix For: 2.0.1-alpha
>
>
> Configuration getter methods that are passed default values can throw RuntimeExceptions if the value provided is invalid (e.g. NumberFormatException).
> In many cases such exception results in more serious consequences (failure to sart a service, see for example NodeManager DeletionService). This can be avoided by returning the default value and just printing a warning message.

--
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-8484) Prevent Configuration getter methods that are passed a default value from throwing RuntimeException

Posted by "Ahmed Radwan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289652#comment-13289652 ] 

Ahmed Radwan commented on HADOOP-8484:
--------------------------------------

The only issue I have is that there are cases where it is helpful for it to crash to alarm for the incorrect configuration and there are cases where picking the default is just appropriate and will enhance the fault-tolerance. But I agree with you, the generalization here in Configuration may not be the right choice, and it is better to handle this on a case-by-case basis, so the code reading the property can decide to catch the exception if needed. I am closing this one.
                
> Prevent Configuration getter methods that are passed a default value from throwing RuntimeException
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8484
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8484
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 2.0.0-alpha
>            Reporter: Ahmed Radwan
>             Fix For: 2.0.1-alpha
>
>
> Configuration getter methods that are passed default values can throw RuntimeExceptions if the value provided is invalid (e.g. NumberFormatException).
> In many cases such exception results in more serious consequences (failure to sart a service, see for example NodeManager DeletionService). This can be avoided by returning the default value and just printing a warning message.

--
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] [Resolved] (HADOOP-8484) Prevent Configuration getter methods that are passed a default value from throwing RuntimeException

Posted by "Ahmed Radwan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ahmed Radwan resolved HADOOP-8484.
----------------------------------

    Resolution: Invalid
    
> Prevent Configuration getter methods that are passed a default value from throwing RuntimeException
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8484
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8484
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 2.0.0-alpha
>            Reporter: Ahmed Radwan
>             Fix For: 2.0.1-alpha
>
>
> Configuration getter methods that are passed default values can throw RuntimeExceptions if the value provided is invalid (e.g. NumberFormatException).
> In many cases such exception results in more serious consequences (failure to sart a service, see for example NodeManager DeletionService). This can be avoided by returning the default value and just printing a warning message.

--
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] [Closed] (HADOOP-8484) Prevent Configuration getter methods that are passed a default value from throwing RuntimeException

Posted by "Arun C Murthy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-8484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arun C Murthy closed HADOOP-8484.
---------------------------------

    
> Prevent Configuration getter methods that are passed a default value from throwing RuntimeException
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8484
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8484
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 2.0.0-alpha
>            Reporter: Ahmed Radwan
>             Fix For: 2.0.2-alpha
>
>
> Configuration getter methods that are passed default values can throw RuntimeExceptions if the value provided is invalid (e.g. NumberFormatException).
> In many cases such exception results in more serious consequences (failure to sart a service, see for example NodeManager DeletionService). This can be avoided by returning the default value and just printing a warning message.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira