Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-2178][gelly] Fixed groupReduceOnNeighbors bug #799

Closed
wants to merge 1 commit into from

Conversation

andralungu
Copy link
Contributor

This PR adds an iterator.hasNext() check in the groupReduceOnNeighbors method, fixing the NoSuchElementException bug reported in FLINK-2178.

@vasia , @StephanEwen, maybe we can merge this before the upcoming 0.9 release :)
Thanks!

@andralungu
Copy link
Contributor Author

uhmm, guys! IMO this should be merged before the release!
Thanks!

@vasia
Copy link
Contributor

vasia commented Jun 13, 2015

Hey @andralungu,

I'm not sure I understand this one. It's a coGroup of vertices with the edges. For the vertex iterator to be empty, doesn't it mean that there's an edge with an invalid id?

@andralungu
Copy link
Contributor Author

Yup, exactly! The use case was: I modified something in the edge data set, called groupReduceOnNeighbors on the result and got NPE, exception that could have been avoided with this check, just like was the case for the Degree NPE.

Making sure that the iterator is not null can save some people lots of headaches, IMO :) And it doesn't hurt anyone who has a correct data set.

@vasia
Copy link
Contributor

vasia commented Jun 13, 2015

Then shouldn't we throw an exception like we do in degrees with a "The edge src/trg id is invalid" or something, instead of hiding the exception?

@andralungu
Copy link
Contributor Author

PR updated.

@vasia
Copy link
Contributor

vasia commented Jun 15, 2015

@andralungu, I believe the same issue appears in ApplyCoGroupFunctionOnAllEdges and ApplyCoGroupFunction. Could you check if that's the case and fix those too if needed?
Also, adding a test might be a good idea :) Thanks!

@andralungu
Copy link
Contributor Author

PR updated to test the same issue in ApplyCoGroupFunctionOnAllEdges and ApplyCoGroupFunction.
Also added tests.

@vasia
Copy link
Contributor

vasia commented Jun 17, 2015

Perfect, thanks @andralungu! +1

@andralungu andralungu force-pushed the groupReduceOnBug branch 2 times, most recently from 2576bd9 to 3192ada Compare June 21, 2015 09:45
@andralungu
Copy link
Contributor Author

Merging...

[FLINK-2178][gelly] Threw exception when iterator did not have next

[FLINK-2178][gelly] Added further checks and tests
@asfgit asfgit closed this in cdde553 Jun 21, 2015
nikste pushed a commit to nikste/flink that referenced this pull request Sep 29, 2015
This PR adds an iterator.hasNext() check in the groupReduceOnNeighbors method, fixing the NoSuchElementException bug reported in FLINK-2178.

@vasia , @StephanEwen, maybe we can merge this before the upcoming 0.9 release :)
Thanks!

Author: andralungu <lungu.andra@gmail.com>

Closes apache#799 from andralungu/groupReduceOnBug and squashes the following commits:

0a09e85 [andralungu] [FLINK-2178][gelly] Fixed groupReduceOnNeighbors bug
nltran pushed a commit to nltran/flink that referenced this pull request Jan 8, 2016
This PR adds an iterator.hasNext() check in the groupReduceOnNeighbors method, fixing the NoSuchElementException bug reported in FLINK-2178.

@vasia , @StephanEwen, maybe we can merge this before the upcoming 0.9 release :)
Thanks!

Author: andralungu <lungu.andra@gmail.com>

Closes apache#799 from andralungu/groupReduceOnBug and squashes the following commits:

0a09e85 [andralungu] [FLINK-2178][gelly] Fixed groupReduceOnNeighbors bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants