How about using the HDFS API to create a list of all the directories to read from, and passing them as a comma-joined string to sc.textFile?
On Fri, Dec 19, 2014 at 11:13 AM, Hafiz Mujadid <[email protected]> wrote: > Hi experts! > > what is efficient way to read all files using spark from directory and its > sub-directories as well.currently i move all files from directory and it > sub-directories into another temporary directory and then read them all > using sc.textFile method. But I want a method so that moving to temporary > directory cost may be saved. > > Thanks > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/reading-files-recursively-using-spark-tp20782.html > Sent from the Apache Spark User List mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
