Skip to content
Snippets Groups Projects
Commit bd10eb81 authored by jerryshao's avatar jerryshao Committed by Andrew Or
Browse files

[EXAMPLE][MINOR] Add missing awaitTermination in click stream example

Author: jerryshao <sshao@hortonworks.com>

Closes #9730 from jerryshao/clickstream-fix.
parent 33a0ec93
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
// scalastyle:off println // scalastyle:off println
package org.apache.spark.examples.streaming.clickstream package org.apache.spark.examples.streaming.clickstream
import org.apache.spark.SparkContext._
import org.apache.spark.streaming.{Seconds, StreamingContext} import org.apache.spark.streaming.{Seconds, StreamingContext}
import org.apache.spark.examples.streaming.StreamingExamples import org.apache.spark.examples.streaming.StreamingExamples
// scalastyle:off // scalastyle:off
...@@ -88,7 +87,7 @@ object PageViewStream { ...@@ -88,7 +87,7 @@ object PageViewStream {
// An external dataset we want to join to this stream // An external dataset we want to join to this stream
val userList = ssc.sparkContext.parallelize( val userList = ssc.sparkContext.parallelize(
Map(1 -> "Patrick Wendell", 2->"Reynold Xin", 3->"Matei Zaharia").toSeq) Map(1 -> "Patrick Wendell", 2 -> "Reynold Xin", 3 -> "Matei Zaharia").toSeq)
metric match { metric match {
case "pageCounts" => pageCounts.print() case "pageCounts" => pageCounts.print()
...@@ -106,6 +105,7 @@ object PageViewStream { ...@@ -106,6 +105,7 @@ object PageViewStream {
} }
ssc.start() ssc.start()
ssc.awaitTermination()
} }
} }
// scalastyle:on println // scalastyle:on println
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment