val filePath = "src/main/resources/millionsong.txt"
val rdd = sc.textFile(filePath)
val recordsRdd = rdd.map(line => line.split(","))
recordsRdd.foreach(println)
我剛剛開始與斯卡拉。我不明白爲什麼輸出是? ... [Ljava.lang.String; @ 116c19d8 ...斯卡拉線分裂問題
一個放射性散佈線是: 2001.0,0.884123733793,0.610454259079,0.600498416968,0.474669212493,0.247232680947,0.357306088914,0.344136412234,0.339641227335,0.600858840135,0.425704689024 ,0.60491501652,0.419193351817
我在想輸出應該是數組數組?
這是一個數組的典型'toString'。您可能需要向裏面尋找內容。 – maasg
它看到你問過一個python問題,爲什麼不使用PySpark? –