Github user rnowling commented on the pull request:

    https://github.com/apache/spark/pull/2439#issuecomment-56269533
  
    I looke at the Pregel paper but it doesn't specify and doesn't cite other
    papers.  I know it's a common method, though.
    
    After some thought, I think your solution is correct. With round(), integer
    values 1 through maxVal - 1 have a range of 1 but 0 and maxVal have ranges
    of 0.5. With floor(), 0 will have a range of 1 and maxVal won't be
    encountered.
    
    I vote for the change. :)
    
    On Saturday, September 20, 2014, Ankur Dave <notificati...@github.com>
    wrote:
    
    > @rnowling <https://github.com/rnowling> Hmm, maybe you're right about
    > that -- I'm not familiar enough with the algorithm to know whether it
    > specifies rounding behavior in the first place.
    >
    > I think the unit test you wrote does do the range check
    > 
<https://github.com/apache/spark/blob/master/graphx/src/test/scala/org/apache/spark/graphx/util/GraphGeneratorsSuite.scala#L68>.
    > In fact that's how I found this bug in the first place: the test failed in
    > Jenkins in an unrelated PR.
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/spark/pull/2439#issuecomment-56258349>.
    >
    
    
    -- 
    em rnowl...@gmail.com
    c 954.496.2314


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to