Changing Pregel API to use mapReduceTriplets instead of aggregateNeighbors