diff options
author | Patrick Wendell <pwendell@gmail.com> | 2013-02-16 16:43:23 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2013-02-19 08:32:38 -0800 |
commit | fed1122d74c9d92ce26c28b0bf429e556dcc9bdd (patch) | |
tree | 2759ba992bc45d29f7c92a59576383459bd173dc /streaming/src | |
parent | 35880de42edb30cf705036083710c85a74a351fa (diff) | |
download | spark-fed1122d74c9d92ce26c28b0bf429e556dcc9bdd.tar.gz spark-fed1122d74c9d92ce26c28b0bf429e556dcc9bdd.tar.bz2 spark-fed1122d74c9d92ce26c28b0bf429e556dcc9bdd.zip |
Use RDD type for `slice` operator in Java.
This commit uses the RDD type in `slice`, making it available to both normal
and pair RDD's in java. It also updates the signature for `slice` to match
changes in the Scala API.
Diffstat (limited to 'streaming/src')
-rw-r--r-- | streaming/src/main/scala/spark/streaming/api/java/JavaDStreamLike.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/streaming/src/main/scala/spark/streaming/api/java/JavaDStreamLike.scala b/streaming/src/main/scala/spark/streaming/api/java/JavaDStreamLike.scala index f7b1704884..8be36200ec 100644 --- a/streaming/src/main/scala/spark/streaming/api/java/JavaDStreamLike.scala +++ b/streaming/src/main/scala/spark/streaming/api/java/JavaDStreamLike.scala @@ -215,8 +215,8 @@ trait JavaDStreamLike[T, This <: JavaDStreamLike[T, This, R], R <: JavaRDDLike[T /** * Return all the RDDs between 'fromDuration' to 'toDuration' (both included) */ - def slice(fromDuration: Duration, toDuration: Duration): JList[JavaRDD[T]] = { - new util.ArrayList(dstream.slice(fromDuration, toDuration).map(new JavaRDD(_)).toSeq) + def slice(fromTime: Time, toTime: Time): JList[R] = { + new util.ArrayList(dstream.slice(fromTime, toTime).map(wrapRDD(_)).toSeq) } /** |