[ https://issues.apache.org/jira/browse/STORM-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15363719#comment-15363719 ]
ASF GitHub Bot commented on STORM-1932: --------------------------------------- Github user arunmahadevan commented on a diff in the pull request: https://github.com/apache/storm/pull/1527#discussion_r69672262 --- Diff: storm-core/src/jvm/org/apache/storm/topology/base/BaseWindowedBolt.java --- @@ -66,10 +66,14 @@ public String toString() { * Holds a Time duration for time based windows and sliding intervals. */ public static class Duration { - public final int value; + public final long value; public Duration(int value, TimeUnit timeUnit) { - this.value = (int) timeUnit.toMillis(value); + this.value = timeUnit.toMillis(value); + } + + public Duration(long value) { --- End diff -- Please add TimeUnit as a second arg instead of automatically assuming the time unit. Also have an overloaded `public static Duration of(long milliseconds)`. For other static factories long does not make much sense. > Change Duration's value data type > ---------------------------------- > > Key: STORM-1932 > URL: https://issues.apache.org/jira/browse/STORM-1932 > Project: Apache Storm > Issue Type: Improvement > Components: storm-core > Reporter: darion yaphet > Assignee: darion yaphet > > BaseWindowedBolt Duration value is integer now . Use long to express time > interval maybe better -- This message was sent by Atlassian JIRA (v6.3.4#6332)