Suppose I have a RowMatrix.
 How can I transpose it. The API documentation does not seem to have a transpose method.
 The Matrix has the transpose() method. But it is not distributed. If I have a large matrix greater that the memory how can I transpose it?

I have converted a RowMatrix to DenseMatrix as follows
DenseMatrix Mat = new DenseMatrix(m,n,MatArr);
which requires converting the RowMatrix to JavaRDD and converting JavaRDD to an array.
Is there any other convenient way to do the conversion?
Thanks in advance
Best Solution
If anybody interested, I've implemented the distributed version @javadba had proposed.