You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Hlib Mykhailenko <hl...@inria.fr> on 2014/11/26 14:25:10 UTC

how to force graphx to execute transfomtation

Hello, 

I work with Graphx. When I call "graph.partitionBy(..)" nothing happens, because, as I understood, that all transformation are lazy and partitionBy is built using transformations. 
Is there way how to force spark to actually execute this transformation and not use any action? 

-- 
Cordialement, 
Hlib Mykhailenko 
Doctorant à INRIA Sophia-Antipolis Méditerranée 
2004 Route des Lucioles BP93 
06902 SOPHIA ANTIPOLIS cedex 



Re: how to force graphx to execute transfomtation

Posted by Ankur Dave <an...@gmail.com>.
At 2014-11-26 05:25:10 -0800, Hlib Mykhailenko <hl...@inria.fr> wrote:
> I work with Graphx. When I call "graph.partitionBy(..)" nothing happens, because, as I understood, that all transformation are lazy and partitionBy is built using transformations. 
> Is there way how to force spark to actually execute this transformation and not use any action? 

If you just want the transformation to run without returning anything, such as for benchmarking, you can use graph.partitionBy(...).foreachPartition(x => {}).

Ankur

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Re: how to force graphx to execute transfomtation

Posted by Jörg Schad <jo...@gmail.com>.
Hi,
can't you just use graph.partitionBy(..).collect()?

Cheers,
Joerg

On Wed, Nov 26, 2014 at 2:25 PM, Hlib Mykhailenko <hlib.mykhailenko@inria.fr
> wrote:

> Hello,
>
> I work with Graphx. When I call "graph.partitionBy(..)" nothing happens,
> because, as I understood, that all transformation are lazy and partitionBy
> is built using transformations.
> Is there way how to force spark to actually execute this transformation
> and not use any action?
>
> --
> Cordialement,
> *Hlib Mykhailenko*
> Doctorant à INRIA Sophia-Antipolis Méditerranée
> <http://www.inria.fr/centre/sophia/>
> 2004 Route des Lucioles BP93
> 06902 SOPHIA ANTIPOLIS cedex
>
>
>