Giraph Pattern matching implementation