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 "Jan van der Lugt (JIRA)" <ji...@apache.org> on 2012/05/19 07:12:18 UTC

[jira] [Created] (HADOOP-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

Jan van der Lugt created HADOOP-8415:
----------------------------------------

             Summary: getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
                 Key: HADOOP-8415
                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
             Project: Hadoop Common
          Issue Type: Improvement
          Components: conf
    Affects Versions: 1.0.2
            Reporter: Jan van der Lugt
            Priority: Minor


In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, these are the missing functions:

  /** 
   * Get the value of the <code>name</code> property as a <code>double</code>.  
   * If no such property exists, the provided default value is returned,
   * or if the specified value is not a valid <code>double</code>,
   * then an error is thrown.
   *
   * @param name property name.
   * @param defaultValue default value.
   * @throws NumberFormatException when the value is invalid
   * @return property value as a <code>double</code>, 
   *         or <code>defaultValue</code>. 
   */
  public double getDouble(String name, double defaultValue) {
    String valueString = getTrimmed(name);
    if (valueString == null)
      return defaultValue;
    return Double.parseDouble(valueString);
  }
  /**
   * Set the value of the <code>name</code> property to a <code>double</code>.
   * 
   * @param name property name.
   * @param value property value.
   */
  public void setDouble(String name, double value) {
    set(name,Double.toString(value));
  }

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J commented on HADOOP-8415:
---------------------------------

Hey [~janlugt],

Sorry, should've been more precise. The test is called simply TestConfiguration (You'll find many tests for classes via Test[ClassName] in Hadoop, as a general pattern). You should see test methods in there for Float methods which you can simply ape for Double then.

Regarding the trunk patch, the same may apply but your patch's root ought to be the root trunk directory. Here it seems to be hadoop-common as root. This is required to be able to run the QA Bot for patch validation across the project automatically. Its not a big deal so long as you can ensure your patch applies cleanly to trunk, wherever its based. I can rebase it to the right directory for you afterwards.
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J commented on HADOOP-8415:
---------------------------------

P.s. If you can also find some spots within the framework itself where use of Double is very relevant (from via Configuration), do let us know! :)
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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] [Updated] (HADOOP-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Jan van der Lugt updated HADOOP-8415:
-------------------------------------

    Attachment:     (was: HADOOP-8415.patch)
    
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J commented on HADOOP-8415:
---------------------------------

This is good enough - just one nit: There are currently no tests that do setDouble() as well (the current test appends strings to baseconf), can you add a couple of ones for those too? Would be good to have that coverage.

Other than that +1, pending jenkins-run after new patch.
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

Posted by "Jan van der Lugt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283597#comment-13283597 ] 

Jan van der Lugt commented on HADOOP-8415:
------------------------------------------

Hurray! I'll file a separate JIRA for the set-functions on monday. Thanks for your help, Harsh!
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Hudson commented on HADOOP-8415:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk #1090 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1090/])
    HADOOP-8415. Add getDouble() and setDouble() in org.apache.hadoop.conf.Configuration. Contributed by Jan van der Lugt. (harsh) (Revision 1342501)

     Result = ABORTED
harsh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1342501
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java

                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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] [Updated] (HADOOP-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Jan van der Lugt updated HADOOP-8415:
-------------------------------------

    Description: In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.  (was: In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, these are the missing functions:

  /** 
   * Get the value of the <code>name</code> property as a <code>double</code>.  
   * If no such property exists, the provided default value is returned,
   * or if the specified value is not a valid <code>double</code>,
   * then an error is thrown.
   *
   * @param name property name.
   * @param defaultValue default value.
   * @throws NumberFormatException when the value is invalid
   * @return property value as a <code>double</code>, 
   *         or <code>defaultValue</code>. 
   */
  public double getDouble(String name, double defaultValue) {
    String valueString = getTrimmed(name);
    if (valueString == null)
      return defaultValue;
    return Double.parseDouble(valueString);
  }
  /**
   * Set the value of the <code>name</code> property to a <code>double</code>.
   * 
   * @param name property name.
   * @param value property value.
   */
  public void setDouble(String name, double value) {
    set(name,Double.toString(value));
  })
    
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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] [Updated] (HADOOP-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J updated HADOOP-8415:
----------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0
           Status: Resolved  (was: Patch Available)

Committed to trunk. Many thanks for contributing Jan van der Lugt! :)
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

Posted by "Jan van der Lugt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281911#comment-13281911 ] 

Jan van der Lugt commented on HADOOP-8415:
------------------------------------------

Hi Harsh,

I modified the patch file per your request, it now includes tests for doubles. I believe it is also patched from the root trunk directory. Please let me know if this version is fine.

- Jan
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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] [Updated] (HADOOP-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Jan van der Lugt updated HADOOP-8415:
-------------------------------------

    Attachment: HADOOP-8415.patch
    
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J commented on HADOOP-8415:
---------------------------------

I've already filed HADOOP-8434 for the setter methods.
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Hudson commented on HADOOP-8415:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #2288 (See [https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2288/])
    HADOOP-8415. Add getDouble() and setDouble() in org.apache.hadoop.conf.Configuration. Contributed by Jan van der Lugt. (harsh) (Revision 1342501)

     Result = SUCCESS
harsh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1342501
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java

                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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] [Updated] (HADOOP-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J updated HADOOP-8415:
----------------------------

    Hadoop Flags: Reviewed

Thanks for taking a deep look Jan. Please do open a new JIRA with that note. Meanwhile, marking this as P-A for QA bot to run.
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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] [Updated] (HADOOP-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Jan van der Lugt updated HADOOP-8415:
-------------------------------------

    Attachment: HADOOP-8415.patch
    
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Hadoop QA commented on HADOOP-8415:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12528779/HADOOP-8415.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 1 new or modified test files.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 eclipse:eclipse.  The patch built with eclipse:eclipse.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed unit tests in hadoop-common-project/hadoop-common.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1034//testReport/
Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1034//console

This message is automatically generated.
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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] [Updated] (HADOOP-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J updated HADOOP-8415:
----------------------------

    Status: Patch Available  (was: Open)
    
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Hudson commented on HADOOP-8415:
--------------------------------

Integrated in Hadoop-Hdfs-trunk #1056 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1056/])
    HADOOP-8415. Add getDouble() and setDouble() in org.apache.hadoop.conf.Configuration. Contributed by Jan van der Lugt. (harsh) (Revision 1342501)

     Result = SUCCESS
harsh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1342501
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java

                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Hudson commented on HADOOP-8415:
--------------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #2361 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2361/])
    HADOOP-8415. Add getDouble() and setDouble() in org.apache.hadoop.conf.Configuration. Contributed by Jan van der Lugt. (harsh) (Revision 1342501)

     Result = SUCCESS
harsh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1342501
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java

                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

Posted by "Jan van der Lugt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280408#comment-13280408 ] 

Jan van der Lugt commented on HADOOP-8415:
------------------------------------------

In my case I could fall back to floats as well (that's what I do now), but it just feels like when there's support for Integers, Longs, Boolean, Floats, Strings, Enums, etc., there should be support for Doubles as well. I don't know where I would add test cases. The patch works for trunk as well, as far as I understand. Please give me some pointers on how to do these things if they are required.
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

Posted by "Jan van der Lugt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-8415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283126#comment-13283126 ] 

Jan van der Lugt commented on HADOOP-8415:
------------------------------------------

Just FYI, there are no tests for setFloat, setInt, setLong, etc. Might be better to add all of those at the same time.
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J commented on HADOOP-8415:
---------------------------------

There's no reason we can't add it. However, have you a need for always using doubles (note that you can still use them via set(str, str), which is what happens in the end anyway) in your app code?

I've had a need once before, but in my case falling back to a float cast was OK: https://issues.apache.org/jira/browse/MAPREDUCE-2170?focusedCommentId=12927465&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12927465

Thanks for your patch against 1.x, can you please provide a patch against trunk, and also add test cases that test this new addition?
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Hudson commented on HADOOP-8415:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk-Commit #2307 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2307/])
    HADOOP-8415. Add getDouble() and setDouble() in org.apache.hadoop.conf.Configuration. Contributed by Jan van der Lugt. (harsh) (Revision 1342501)

     Result = FAILURE
harsh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1342501
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java

                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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-8415) getDouble() and setDouble() in org.apache.hadoop.conf.Configuration

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

Harsh J commented on HADOOP-8415:
---------------------------------

I filed HADOOP-8434 for the setter tests coverage. Thanks again.
                
> getDouble() and setDouble() in org.apache.hadoop.conf.Configuration
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8415
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 1.0.2
>            Reporter: Jan van der Lugt
>            Priority: Minor
>             Fix For: 3.0.0
>
>         Attachments: HADOOP-8415.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> In the org.apache.hadoop.conf.Configuration class, methods exist to set Integers, Longs, Booleans, Floats and Strings, but methods for Doubles are absent. Are they not there for a reason or should they be added? In the latter case, the attached patch contains the missing functions.

--
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