I have the following code:
val blueCount = sc.accumulator[Long](0) val output = input.map { data => for (value <- data.getValues()) { if (record.
I was able to work it around by making a utility function:
object PrintUtiltity { def print(data:String) = { println(data) } }