Spark losing println() on stdout
问题 I have the following code: val blueCount = sc.accumulator[Long](0) val output = input.map { data => for (value <- data.getValues()) { if (record.getEnum() == DataEnum.BLUE) { blueCount += 1 println(\"Enum = BLUE : \" + value.toString() } } data }.persist(StorageLevel.MEMORY_ONLY_SER) output.saveAsTextFile(\"myOutput\") Then the blueCount is not zero, but I got no println() output! Am I missing anything here? Thanks! 回答1: This is a conceptual question... Imagine You have a big cluster,