diff options
-rw-r--r-- | examples/src/main/scala/org/apache/spark/examples/streaming/TwitterHashTagJoinSentiments.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterHashTagJoinSentiments.scala b/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterHashTagJoinSentiments.scala index edf0e0b7b2..a8d392ca35 100644 --- a/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterHashTagJoinSentiments.scala +++ b/examples/src/main/scala/org/apache/spark/examples/streaming/TwitterHashTagJoinSentiments.scala @@ -56,8 +56,8 @@ object TwitterHashTagJoinSentiments { val wordSentimentFilePath = "data/streaming/AFINN-111.txt" val wordSentiments = ssc.sparkContext.textFile(wordSentimentFilePath).map { line => val Array(word, happinessValue) = line.split("\t") - (word, happinessValue) - } cache() + (word, happinessValue.toInt) + }.cache() // Determine the hash tags with the highest sentiment values by joining the streaming RDD // with the static RDD inside the transform() method and then multiplying |