how to save Matrix type result to hdfs file using java

2016-01-24 Thread zhangjp
Hi all,
 I have calculated a  covariance?? it's a Matrix type ,now i want to save 
the result to hdfs, how  can i do it?  
thx

Re: how to save Matrix type result to hdfs file using java

2016-01-24 Thread Yanbo Liang
Matrix can be save as column of type MatrixUDT.


?????? how to save Matrix type result to hdfs file using java

2016-01-24 Thread zhangjp
Hi  Yanbo,
  I'm using java language and the environment is spark 1.4.1.  
  
  Can u tell me how to do it more detail , the follows is my code, how can 
i save the cov to hdfs file ?
 "
 RowMatrix mat = new RowMatrix(rows.rdd());
  Matrix cov = mat.computeCovariance();   "
   The cov is  localMatrix, if the Matrix is much more than 5G , is there 
any better way to do it.
  
THX.
 
 
 --  --
  ??: "Yanbo Liang";<yblia...@gmail.com>;
 : 2016??1??25??(??) 1:31
 ??: "zhangjp"<592426...@qq.com>; 
 : "user"<user@spark.apache.org>; 
 ????: Re: how to save Matrix type result to hdfs file using java

 

 Matrix can be save as column of type MatrixUDT.