[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-06-20 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-8608:


Integrated in Hadoop-Mapreduce-trunk #1463 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1463/])
Move HADOOP-8608 to branch-2.1 (Revision 1494824)

 Result = SUCCESS
cdouglas : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1494824
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 2.1.0-beta
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-06-20 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-8608:


Integrated in Hadoop-Hdfs-trunk #1436 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/1436/])
Move HADOOP-8608 to branch-2.1 (Revision 1494824)

 Result = FAILURE
cdouglas : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1494824
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 2.1.0-beta
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-06-20 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-8608:


Integrated in Hadoop-Yarn-trunk #246 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk/246/])
Move HADOOP-8608 to branch-2.1 (Revision 1494824)

 Result = FAILURE
cdouglas : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1494824
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 2.1.0-beta
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-06-19 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-8608:


Integrated in Hadoop-trunk-Commit #3986 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/3986/])
Move HADOOP-8608 to branch-2.1 (Revision 1494824)

 Result = SUCCESS
cdouglas : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1494824
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 2.1.0-beta
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-06-19 Thread Chris Douglas (JIRA)

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

Chris Douglas commented on HADOOP-8608:
---

bq. This would be a good change to merge to branch-2 and branch-2.1.0-beta.

Soright; merged back

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 2.1.0-beta
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-06-19 Thread Suresh Srinivas (JIRA)

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

Suresh Srinivas commented on HADOOP-8608:
-

[~chris.douglas] This would be a good change to merge to branch-2 and 
branch-2.1.0-beta.

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-05-01 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-8608:


Integrated in Hadoop-Mapreduce-trunk #1416 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1416/])
HADOOP-8608. Add Configuration API for parsing time durations. (Revision 
1477869)

 Result = FAILURE
cdouglas : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1477869
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


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-05-01 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-8608:


Integrated in Hadoop-Hdfs-trunk #1389 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/1389/])
HADOOP-8608. Add Configuration API for parsing time durations. (Revision 
1477869)

 Result = FAILURE
cdouglas : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1477869
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


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-05-01 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-8608:


Integrated in Hadoop-Yarn-trunk #200 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk/200/])
HADOOP-8608. Add Configuration API for parsing time durations. (Revision 
1477869)

 Result = SUCCESS
cdouglas : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1477869
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


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2013-04-30 Thread Hudson (JIRA)

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

Hudson commented on HADOOP-8608:


Integrated in Hadoop-trunk-Commit #3703 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/3703/])
HADOOP-8608. Add Configuration API for parsing time durations. (Revision 
1477869)

 Result = SUCCESS
cdouglas : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1477869
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


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>Assignee: Chris Douglas
>Priority: Minor
> Fix For: 3.0.0
>
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-10-10 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HADOOP-8608:
---

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12548457/8608-2.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-common-project/hadoop-common.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

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

This message is automatically generated.

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>Priority: Minor
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-10-10 Thread Robert Joseph Evans (JIRA)

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

Robert Joseph Evans commented on HADOOP-8608:
-

I like the latest patch and I am +1 on it assuming that test-patch comes back 
OK with it.

I don't really see much of a use case where the API would need to change. If I 
specify 1d3h2s or 1.5 days in general with java I am probably going to be 
requesting the result in ms because that is what most time oriented APIs in 
java take.  Perhaps seconds for a few configs because that is the default units 
for the config.  Yes, the newer APIs take a TimeUnit as well but why request it 
in days if I know it is going to lose precision and make it potentially harder 
to write unit tests for? no one wants to wait around for 1 day in a unit test 
for something to happen.

If someone really wants a more thorough format we can add it in in a separate 
JIRA so long as it maintains backwards compatibility with the current format.

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>Priority: Minor
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-10-09 Thread Chris Douglas (JIRA)

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

Chris Douglas commented on HADOOP-8608:
---

But again: it's a matter of taste, so if someone wants to be more thorough, 
they should feel free take point. It may change the return type and we don't 
need multiple time-oriented APIs to configuration vars.

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>Priority: Minor
> Attachments: 8608-0.patch, 8608-1.patch, 8608-2.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-10-09 Thread Robert Joseph Evans (JIRA)

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

Robert Joseph Evans commented on HADOOP-8608:
-

I like the new API.  I do have a few minor comments, none of which I see as 
blocking this from going in.

The first is to not use StringBuilder for the warning.  It seems cleaner and 
more compact to have 

{code}
LOG.warn("No unit for " + name + " (" + vStr +") assuming " 
  + unit);
{code} over {code}
StringBuilder sb = new StringBuilder("No unit for ")
  .append(name).append(" (").append(vStr).append(") assuming ")
  .append(unit.toString());
LOG.warn(sb.toString());
{code}

I would also like to see more lenient parsing, but that is something that can 
come later as the need shows up.  I can see people wanting to write "1.5 days" 
over "36h".  But like I said before this is not a big deal because "36h" is a 
whole lot easier to understand and less error prone compared to 12960.

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
> Attachments: 8608-0.patch, 8608-1.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-10-04 Thread Chris Douglas (JIRA)

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

Chris Douglas commented on HADOOP-8608:
---

The caller requests a unit and the function returns {{long}}. Seems pretty 
straightforward.

bq. In ParsedTimeDuration.unitFor the return null; is never executed.

It's required.

bq. In the same method, you used "pdt". I guess you mean "ptd".

...

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
> Attachments: 8608-0.patch, 8608-1.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-10-04 Thread Jianbin Wei (JIRA)

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

Jianbin Wei commented on HADOOP-8608:
-

I am looking for some document like in TimeUnit.convert that includes examples 
and warning. Not warning in the code.

{code}
/**
  * Return time duration in the given time unit. Valid units are encoded in
  * properties as suffixes: nanoseconds (ns), microseconds (us), milliseconds
  * (ms), seconds (s), minutes (m), hours (h), and days (d).  
  * For example, the value can be 10ns, 10us, 10ms, 10s, and etc. 
  * Note getting time duration set in finer granularity as coarser granularity 
can lose precision.  
  * For example, if property "example.duration" is set to 999ms, 
  * getTimeDuration("example.duration", 1L, TimeUnit.SECONDS) returns 
0.
{code}

Some other minor points:
* In {{ParsedTimeDuration.unitFor}} the {{return null;}} is never executed.
* In the same method, you used "pdt". I guess you mean "ptd".

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
> Attachments: 8608-0.patch, 8608-1.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-10-04 Thread Jianbin Wei (JIRA)

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

Jianbin Wei commented on HADOOP-8608:
-

Comments as follows:

* I am kind of concerned about the "lose precision" from the conversion.  That 
is why I propose to give that control back to the caller to make the precision 
lose explicitly.  If we go this approach, at least I think we should document 
this precision lose.  Comments?
* The parsing of value is a bit loose.  For example, it cannot handle "10S" or 
"10 s".  A strict format can reduce errors but may be inflexible and the 
exception can be little harsh.  Or we need to document the expecting format is 
"10s" not "10 s" nor "10sec".
* Also the parsing part relies on the enum order implicitly.  It works now.  
But it may bite us later.  A Pattern instead?
* It would be better to add the value of the timeduration property into LOG.
* Can you please change test from "testTime" to "testTimeDuration" for 
consistency?

{code}
conf.setStrings("test.time.str", new String[]{"10S"});
assertEquals(1L, conf.getTimeDuration("test.time.str", 30, 
MILLISECONDS));
{code}

It logs

2012-10-04 00:29:37,172 WARN  conf.Configuration 
(Configuration.java:getTimeDuration(1212)) - No unit for test.time.str assuming 
MILLISECONDS

Better as "No unit for test.time.str (value: 10S), assuming MILLISECONDS" or 
something like that with property value




> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
> Attachments: 8608-0.patch
>
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-10-02 Thread Jianbin Wei (JIRA)

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

Jianbin Wei commented on HADOOP-8608:
-

I am thinking the API can be

{code}
// return the property value in millisecond.  The property value can be 
specified as "10ms", "10s", "10m", "10h", or "10d"
public long getTimeDurationInMillisecond(String name, long defaultValue);
{code}

After that developers can use methods like
{code}
java.util.concurrent.TimeUnit.MILLISECONDS.toSeconds(long duration)
{code}
to convert to duration in second or other time units.

However, the conversion from TimeUnit may lost precision, e.g., 70 seconds will 
be converted to 1 minute.

Any thoughts?  


> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a postfix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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


[jira] [Commented] (HADOOP-8608) Add Configuration API for parsing time durations

2012-08-01 Thread Kannan Muthukkaruppan (JIRA)

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

Kannan Muthukkaruppan commented on HADOOP-8608:
---

+1

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a prefix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

--
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-8608) Add Configuration API for parsing time durations

2012-07-19 Thread Robert Joseph Evans (JIRA)

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

Robert Joseph Evans commented on HADOOP-8608:
-

That would be a great API to add in. +1 for this idea.  

In the yarn code we standardized to put the units in the name of the config 
property i.e. yarn.am.liveness-monitor.expiry-interval-ms and 
yarn.resourcemanager.application-tokens.master-key-rolling-interval-secs.  We 
probably want to be able to supply a default unit when getting a config so we 
can deprecate/replace an old property and have both still be valid. 

> Add Configuration API for parsing time durations
> 
>
> Key: HADOOP-8608
> URL: https://issues.apache.org/jira/browse/HADOOP-8608
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: conf
>Affects Versions: 3.0.0
>Reporter: Todd Lipcon
>
> Hadoop has a lot of configurations which specify durations or intervals of 
> time. Unfortunately these different configurations have little consistency in 
> units - eg some are in milliseconds, some in seconds, and some in minutes. 
> This makes it difficult for users to configure, since they have to always 
> refer back to docs to remember the unit for each property.
> The proposed solution is to add an API like {{Configuration.getTimeDuration}} 
> which allows the user to specify the units with a prefix. For example, 
> "10ms", "10s", "10m", "10h", or even "10d". For backwards-compatibility, if 
> the user does not specify a unit, the API can specify the default unit, and 
> warn the user that they should specify an explicit unit instead.

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