Skip to content

Commit

Permalink
Update StatefulNetworkWordCount.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
watermen committed Aug 28, 2014
1 parent a7d145e commit 57e704c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object StatefulNetworkWordCount {
StreamingExamples.setStreamingLogLevels()

val updateFunc = (values: Seq[Int], state: Option[Int]) => {
val currentCount = values.foldLeft(0)(_ + _)
val currentCount = values.sum

val previousCount = state.getOrElse(0)

Expand Down

0 comments on commit 57e704c

Please sign in to comment.