Reputation: 385
Does saveAsTextFile
create the directories, if I am saving a text file and directory or path on a Linux machine does not exist? Would the below Scala code create the test1
directory if it is not there?
rdd.saveAsTextFile ("file:///test1/textfile.txt");
Upvotes: 0
Views: 622
Reputation: 37852
Well, yes - as a quick test of the code you pasted shows. Of course, the user must have the necessary permissions to create the directory.
Upvotes: 1