How to store the result generated from an action like: count in an output directory, in apache Spark Scala?
val countval= data.map((_,"")).reduceByKey((_+_)).count
The below command does not work as count is not stored as RDD:
countval.saveAsTextFile("OUTPUT LOCATION")
Is there any way to store countval into local/hdfs location?