Re: Saving calculation to single local file

2015-06-05 Thread marcos rebelo
Hi all I have to say that this solution surprise me. For the fist time I have such a requirement but I would expect another more elegant solution. I'm sure that many persons are doing the some as I'm and they would love to have a better solution to such a problem. Best Regards Marcos On Fri, Ju

Re: Saving calculation to single local file

2015-06-05 Thread ayan guha
Another option is merge partfiles after your app ends. On 5 Jun 2015 20:37, "Akhil Das" wrote: > you can simply do rdd.repartition(1).saveAsTextFile(...), it might not be > efficient if your output data is huge since one task will be doing the > whole writing. > > Thanks > Best Regards > > On Fri

Re: Saving calculation to single local file

2015-06-05 Thread Akhil Das
you can simply do rdd.repartition(1).saveAsTextFile(...), it might not be efficient if your output data is huge since one task will be doing the whole writing. Thanks Best Regards On Fri, Jun 5, 2015 at 3:46 PM, marcos rebelo wrote: > Hi all > > I'm running spark in a single local machine, no h

Re: Saving calculation to single local file

2015-06-05 Thread ayan guha
Just repartition to 1 partition before writing. On Fri, Jun 5, 2015 at 3:46 PM, marcos rebelo wrote: > Hi all > > I'm running spark in a single local machine, no hadoop, just reading and > writing in local disk. > > I need to have a single file as output of my calculation. > > if I do "rdd.saveA

Saving calculation to single local file

2015-06-05 Thread marcos rebelo
Hi all I'm running spark in a single local machine, no hadoop, just reading and writing in local disk. I need to have a single file as output of my calculation. if I do "rdd.saveAsTextFile(...)" all runs ok but I get allot of files. Since I need a single file I was considering to do something li