Sample Transitive Closure / Connected Components implementation in Spark