HashMap<Object, Writable> vertexset = new HashMap();
while (iter.hasNext()) {
next = iter.next();
// Apply reduce on vertex
if (next.flag() == VertexEdgeUnionType.VERTEXVAL) {
Object vid = next.vertex().vid();
if (vertexset.containsKey(vid)) { // duplicate vertex
if (VertexFunc != null)
vertexset.put(vid,
VertexFunc.reduce(next.vertex().vdata(), vertexset.get(vid)));