Dear Ankur, Thanks! :)
- from [1], and my understanding, the existing inactive feature in graphx pregel api is “if there is no in-edges, from active vertex, to this vertex, then we will say this one is inactive”, right? For instance, there is a graph in which every vertex has at least one in-edges, then we run static Pagerank on it for 10 iterations. During this calculation, is there any vertex would be set inactive? - for more “explicit active vertex tracking”, e.g. vote to halt, how to achieve it in existing api? (I am not sure I got the point of [2], that “vote” function has already been introduced in graphx pregel api? ) Best, Yifan LI On 15 Sep 2014, at 23:07, Ankur Dave <ankurd...@gmail.com> wrote: > At 2014-09-15 16:25:04 +0200, Yifan LI <iamyifa...@gmail.com> wrote: >> I am wondering if the vertex active/inactive(corresponding the change of its >> value between two supersteps) feature is introduced in Pregel API of GraphX? > > Vertex activeness in Pregel is controlled by messages: if a vertex did not > receive a message in the previous iteration, its vertex program will not run > in the current iteration. Also, inactive vertices will not be able to send > messages because by default the sendMsg function will only be run on edges > where at least one of the adjacent vertices received a message. You can > change this behavior -- see the documentation for the activeDirection > parameter to Pregel.apply [1]. > > There is also an open pull request to make active vertex tracking more > explicit by allowing vertices to vote to halt directly [2]. > > Ankur > > [1] > http://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.graphx.Pregel$ > [2] https://github.com/apache/spark/pull/1217