spark cluster funtional