-
- Downloads
SPARK-2745 [STREAMING] Add Java friendly methods to Duration class
tdas is this what you had in mind for this JIRA? I saw this one and thought it would be easy to take care of, and helpful as I use streaming from Java. I could do the same for `Time`? Happy to do so. Author: Sean Owen <sowen@cloudera.com> Closes #2403 from srowen/SPARK-2745 and squashes the following commits: 5a9e706 [Sean Owen] Change "Duration" to "Durations" to avoid changing Duration case class API bda301c [Sean Owen] Just delegate to Scala binary operator syntax to avoid scalastyle warning 7dde949 [Sean Owen] Disable scalastyle for false positives. Add Java static factory methods seconds(), minutes() to Duration. Add Java-friendly methods to Time too, and unit tests. Remove unnecessary math.floor from Time.floor() 4dee32e [Sean Owen] Add named methods to Duration in parallel to symbolic methods for Java-friendliness. Also add unit tests for Duration, in Scala and Java.
Showing
- streaming/src/main/scala/org/apache/spark/streaming/Duration.scala 39 additions, 0 deletions.../src/main/scala/org/apache/spark/streaming/Duration.scala
- streaming/src/main/scala/org/apache/spark/streaming/Time.scala 18 additions, 2 deletions...ming/src/main/scala/org/apache/spark/streaming/Time.scala
- streaming/src/test/java/org/apache/spark/streaming/JavaDurationSuite.java 84 additions, 0 deletions...st/java/org/apache/spark/streaming/JavaDurationSuite.java
- streaming/src/test/java/org/apache/spark/streaming/JavaTimeSuite.java 63 additions, 0 deletions...c/test/java/org/apache/spark/streaming/JavaTimeSuite.java
- streaming/src/test/scala/org/apache/spark/streaming/DurationSuite.scala 110 additions, 0 deletions...test/scala/org/apache/spark/streaming/DurationSuite.scala
- streaming/src/test/scala/org/apache/spark/streaming/TimeSuite.scala 111 additions, 0 deletions...src/test/scala/org/apache/spark/streaming/TimeSuite.scala
Loading
Please register or sign in to comment