Initial commit

This commit is contained in:
karthik 2020-07-09 09:21:43 -04:00
parent 398391c920
commit 87b0462cb0

View File

@ -23,7 +23,16 @@ object Driver {
.rdd.reduceByKey(_ + _) .rdd.reduceByKey(_ + _)
.toDF("word", "frequency") .toDF("word", "frequency")
wordFrequencies.write.option("header","true").csv(outputFilePath) // val wordFrequencies: DataFrame = words
// .groupBy(col("value")).count()
// .toDF("word", "frequency")
wordFrequencies
.coalesce(1)
.write
.option("header","true")
.csv(outputFilePath)
LOG.info(s"Result successfully written to $outputFilePath") LOG.info(s"Result successfully written to $outputFilePath")
} }