title: Spark saving RDD[(Int, Array[Double])] to text file got strange result
body: <p>I am trying to save the userFeature of a <a href="https://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.mllib.recommendation.MatrixFactorizationModel" rel="nofollow">MatrixFactorizationModel</a> to textFile, which according to the doc is a RDD of type [(Int, Array[Double])]. So I just called</p>
  
  <pre><code>model.userFeature.saveAsTextFile("feature")
  </code></pre>
  
  <p>However, the results I got are something like:</p>
  
  <pre><code>(1,[D@4b7707f1)
  (5,[D@513e9aca)
  (9,[D@7d09bcab)
  (13,[D@31058458)
  (17,[D@2a5df2a7)
  (21,[D@5372efd7)
  (25,[D@59d1c59a)
  (29,[D@53ee5e25)
  (33,[D@498f5a34)
  (37,[D@4f9967eb)
  (41,[D@5560afb)
  (45,[D@2dc7f659)
  (49,[D@b46fcc)
  (53,[D@38098dd1)
  (57,[D@77090fb5)
  (61,[D@64769e18)
  </code></pre>
  
  <p>What I am expecting is something like:</p>
  
  <pre><code>(1, [1.1, 2.3, 0.4, ...])
  (2, [0.1, 0.3, 0.4, ...])
  ...
  </code></pre>
  
  <p>So what's wrong?</p>