val spark = SparkSession.builder().appName("Wordcount").master("local[*]").getOrCreate()
val textf = spark.read.textFile("in/fruits.txt")
import spark.implicits._
val textf2 = textf.flatMap( x => x.split(" ") )
val textf3 = textf2.filter ( x => x.length > 0)
val textf4 = textf3.map( x => (x,1)) // I get only reduce() function