Hello, I'm trying to put all the values in pair rdd into an array (or list) for later storing, however even if I'm collecting the data then pushing it to the array the array size after the run is 0.
Any idea on what I'm missing? Thanks in advance scala> val tpdist: Array[Array[Double]] = Array() tpdist: Array[Array[Double]] = Array() scala> ldaModel.asInstanceOf[DistributedLDAModel].topicDistributions.sortByKey().collect().foreach(doc => tpdist :+ doc._2.toArray ) scala> tpdist.size res27: Int = 0