val result=data.select("termIndices").rdd.map {
case Row(termIndices: mutable.WrappedArray[int]) =>
val res=termIndices.iterator.map{
t=>termMap.get(t)
}
res.toArray
}
result.saveAsTextFile("file:///D:/data/ld/ld3")
打开文件,文件中的内容结果为
[Lscala.Option;@7af280cd
[Lscala.Option;@12e3ec85
[Lscala.Option;@4aaab25e
[Lscala.Option;@6bbfebcf
[Lscala.Option;@7bc42a7a