The dense to sparse conversion is inefficient and can be avoided. It should be easy to compute the column sums and center each column if the input is basically a RDD[Array[Double]]. Would it be better if we update the SVD algorithm to accept a dense but tall and skinny matrix as input and use BLAS's DSYR or DSPR to compute A^T A?

Also, though it is not hard to generate row indices (see RDD.zipWithIndex), row indices and number of rows are not necessary for the computation.