Computing summary statistics with MLlib