Based on the pseudo code. Seems like you are trying to do the loop by yourself and not suing the iterative.map() function.
I think you would need to specify the "map" function in order to use the iterative stream. and there should be a clear definition on
which data is iterative. In this case you have label & vertices interlacing each other but no specific loop back.
I would suggest something close to the example in , like
labelsVerticesGroup = DataStream<initial_label, vertices>
labels = labelsVerticesGroup.map(...)
vertices = labelsVerticesGroup.map(...)
updatedLabelsVerticesGroup = vertices.join(labels).where(VertexId).equalTo(VertexId)
Is this what you are looking for?