title: How to save RDD data into json files, not folders
body: <p>I am receiving the streaming data <code>myDStream</code> (<code>DStream[String]</code>) that I want to save in S3 (basically, for this question, it doesn't matter where exactly do I want to save the outputs, but I am mentioning it just in case). </p>
  
  <p>The following code works well, but it saves folders with the names like <code>jsonFile-19-45-46.json</code>, and then inside the folders it saves files <code>_SUCCESS</code> and <code>part-00000</code>.</p>
  
  <p>Is it possible to save each <code>RDD[String]</code> (these are JSON strings) data into the JSON <strong>files</strong>, not the folders? I thought that <code>repartition(1)</code> had to make this trick, but it didn't.</p>
  
  <pre><code>    myDStream.foreachRDD { rdd =&gt; 
         // datetimeString = ....
         rdd.repartition(1).saveAsTextFile("s3n://mybucket/keys/jsonFile-"+datetimeString+".json")
      }
  </code></pre>