Spark implementation of PageRank algorithm