Spark saveAsTextFile to Azure Blob creates a blob instead of a text file

Viewed 4019

I am trying to save an RDD to a text file. My instance of Spark is running on Linux and connected to Azure Blob

   val rdd = sc.textFile("wasb:///HdiSamples/HdiSamples/SensorSampleData/hvac/HVAC.csv")

//find the rows which have only one digit in the 7th column in the CSV
val rdd1 =  rdd.filter(s => s.split(",")(6).length() == 1)

rdd1.saveAsTextFile("wasb:///HVACOut")

When I look at the output, it is not as a single text file but as a series of application/octet-stream files in a folder called HVACOut.

How can I output it as a single text file instead?

2 Answers
Related