Thanks for the quick review Sebastian! I think I still need a +1 from a Giraph committer before I can commit.


On 12/20/11 11:58 PM, Sebastian Schelter wrote:
This is an automatically generated e-mail. To reply, visit:

Ship it!

I ran into the same issue yesterday and the solution presented here is correct. 
For reasons of efficiency, list.elements() returns the internal underlying 
array for the list, which might be bigger than the number of elements stored in 
the list. Therefore you should only iterate until list.size() or use the 
foreachKey() callback.

- Sebastian

On December 21st, 2011, 7:50 a.m., Avery Ching wrote:

Review request for giraph.
By Avery Ching.

/Updated 2011-12-21 07:50:20/


As pointed out by YuanYua, the array returned by elements() cannot have its 
length used since the array contains all the elements currently stored in the 
mahout collections, even including invalid elements between size and capacity.

Whenever possible I converted elements() into forEach(), forEachKey(), 
forEachPair().  Used size() in other cases.

Fixed some formatting violations as well in


Local unittests and MR unittests.

*Bugs: * GIRAPH-112 <>



View Diff <>

Reply via email to