<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Apache SPARK - Overwrite data file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-SPARK-Overwrite-data-file/m-p/105254#M42339</link>
    <description>&lt;P&gt;RDD's saveAsTextFile does not give us the opportunity to do that (DataFrame's have "save modes" for things like append/overwrite/ignore).  You'll have to control this prior before (maybe delete or rename existing data) or afterwards (write the RDD as a diff dir and then swap it out).&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2016 23:46:07 GMT</pubDate>
    <dc:creator>LesterMartin</dc:creator>
    <dc:date>2016-10-06T23:46:07Z</dc:date>
    <item>
      <title>Apache SPARK - Overwrite data file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-SPARK-Overwrite-data-file/m-p/105253#M42338</link>
      <description>&lt;P&gt;Hi experts,

How can I overwrite an existing file by a new one (data update). Imagine that I've this:

&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;result.map(pair =&amp;gt; pair.swap).sortByKey(true).saveAsTextFile("FILE/results")
&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;And Imagine that I want to do this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;test.map(pair =&amp;gt; pair.swap).sortByKey(false).saveAsTextFile("FILE/results")&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;
How can I overwrite the results of the var result to the results of the val test in same directory?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2016 01:38:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-SPARK-Overwrite-data-file/m-p/105253#M42338</guid>
      <dc:creator>prodgers125</dc:creator>
      <dc:date>2016-09-30T01:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Apache SPARK - Overwrite data file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-SPARK-Overwrite-data-file/m-p/105254#M42339</link>
      <description>&lt;P&gt;RDD's saveAsTextFile does not give us the opportunity to do that (DataFrame's have "save modes" for things like append/overwrite/ignore).  You'll have to control this prior before (maybe delete or rename existing data) or afterwards (write the RDD as a diff dir and then swap it out).&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 23:46:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Apache-SPARK-Overwrite-data-file/m-p/105254#M42339</guid>
      <dc:creator>LesterMartin</dc:creator>
      <dc:date>2016-10-06T23:46:07Z</dc:date>
    </item>
  </channel>
</rss>

