Best way to create Mutliple files into a single RDD val fileRDD = sc.textFile(filename).repartition(1) Where the filename is the location of your directory only.