diff options
author | Tathagata Das <tathagata.das1565@gmail.com> | 2014-11-10 14:13:42 -0800 |
---|---|---|
committer | Tathagata Das <tathagata.das1565@gmail.com> | 2014-11-10 14:13:42 -0800 |
commit | 86b1bd0313832658070b22d5c01caab666546655 (patch) | |
tree | a8b1e3ad656ae44dbbdd1ac061ed73c4ef265e4b | |
parent | 254b135705b65a6a12937257bef5565d4f84919a (diff) | |
download | spark-86b1bd0313832658070b22d5c01caab666546655.tar.gz spark-86b1bd0313832658070b22d5c01caab666546655.tar.bz2 spark-86b1bd0313832658070b22d5c01caab666546655.zip |
[SPARK-2548][HOTFIX][Streaming] Removed use of o.a.s.streaming.Durations in branch 1.1
Author: Tathagata Das <tathagata.das1565@gmail.com>
Closes #3188 from tdas/branch-1.1 and squashes the following commits:
f1996d3 [Tathagata Das] [SPARK-2548][HOTFIX] Removed use of o.a.s.streaming.Durations
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/src/main/java/org/apache/spark/examples/streaming/JavaNetworkWordCount.java b/examples/src/main/java/org/apache/spark/examples/streaming/JavaNetworkWordCount.java index 3e9f0f4b8f..bcbea3b657 100644 --- a/examples/src/main/java/org/apache/spark/examples/streaming/JavaNetworkWordCount.java +++ b/examples/src/main/java/org/apache/spark/examples/streaming/JavaNetworkWordCount.java @@ -25,7 +25,7 @@ import org.apache.spark.api.java.function.FlatMapFunction; import org.apache.spark.api.java.function.Function2; import org.apache.spark.api.java.function.PairFunction; import org.apache.spark.api.java.StorageLevels; -import org.apache.spark.streaming.Durations; +import org.apache.spark.streaming.Duration; import org.apache.spark.streaming.api.java.JavaDStream; import org.apache.spark.streaming.api.java.JavaPairDStream; import org.apache.spark.streaming.api.java.JavaReceiverInputDStream; @@ -57,7 +57,7 @@ public final class JavaNetworkWordCount { // Create the context with a 1 second batch size SparkConf sparkConf = new SparkConf().setAppName("JavaNetworkWordCount"); - JavaStreamingContext ssc = new JavaStreamingContext(sparkConf, Durations.seconds(1)); + JavaStreamingContext ssc = new JavaStreamingContext(sparkConf, new Duration(1000)); // Create a JavaReceiverInputDStream on target ip:port and count the // words in input stream of \n delimited text (eg. generated by 'nc') diff --git a/examples/src/main/java/org/apache/spark/examples/streaming/JavaRecoverableNetworkWordCount.java b/examples/src/main/java/org/apache/spark/examples/streaming/JavaRecoverableNetworkWordCount.java index bceda97f05..0b8a1c38d8 100644 --- a/examples/src/main/java/org/apache/spark/examples/streaming/JavaRecoverableNetworkWordCount.java +++ b/examples/src/main/java/org/apache/spark/examples/streaming/JavaRecoverableNetworkWordCount.java @@ -32,7 +32,7 @@ import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.function.FlatMapFunction; import org.apache.spark.api.java.function.Function2; import org.apache.spark.api.java.function.PairFunction; -import org.apache.spark.streaming.Durations; +import org.apache.spark.streaming.Duration; import org.apache.spark.streaming.Time; import org.apache.spark.streaming.api.java.JavaDStream; import org.apache.spark.streaming.api.java.JavaPairDStream; @@ -83,7 +83,7 @@ public final class JavaRecoverableNetworkWordCount { } SparkConf sparkConf = new SparkConf().setAppName("JavaRecoverableNetworkWordCount"); // Create the context with a 1 second batch size - JavaStreamingContext ssc = new JavaStreamingContext(sparkConf, Durations.seconds(1)); + JavaStreamingContext ssc = new JavaStreamingContext(sparkConf, new Duration(1000)); ssc.checkpoint(checkpointDirectory); // Create a socket stream on target ip:port and count the |