Hi Jiacheng,What change did you make to your code? In particular, did you directly create an ExternalAppendOnlyMap, or did you use it through an RDD operation?
The error that you got simply means that your code calls next() on ExternalAppendOnlyMap's iterator when there are no more elements to be read (i.e. hasNext is false). This should not happen if you use ExternalAppendOnlyMap through the standard RDD operations such as reduceByKey or cogroup.