At 2014-08-02 19:04:22 +0200, Yifan LI <iamyifa...@gmail.com> wrote:
> But I am thinking of if I can compute only some selected vertexes(hubs), not 
> to do "update" on every vertex…
>
> is it possible to do this using Pregel API?

The Pregel API already only runs vprog on vertices that received messages in 
the previous iteration. Is there some other selection criteria that you'd like 
to express?

Depending on the criteria, the easiest thing might be to move off the Pregel 
API and write against the lower-level GraphX API. I did this for PageRank 
recently [1].

> or, more realistically, only hubs can receive messages and compute results in 
> the LAST iteration? since we don't need the final result of non-hub vertices.

For this it might be easiest to duplicate the Pregel API implementation and 
special-case the last iteration.

Ankur

[1] 
https://github.com/ankurdave/spark/blob/3231a8efadbb45227dea63011c1a8dd856595475/graphx/src/main/scala/org/apache/spark/graphx/impl/GraphImpl.scala#L274

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

Reply via email to