标签:spark empty nbsp get mfile nes rom dong learn
scala读文件:
example:
scala> import scala.io.Source
import scala.io.Source
scala> var inputFile = Source.fromFile("text.txt")
inputFile: scala.io.BufferedSource = non-empty iterator
scala> for ( line <- inputFile.getLines()) println(line)
hello panzidong
spark is good
scala> inputFile.close()
标签:spark empty nbsp get mfile nes rom dong learn
原文地址:https://www.cnblogs.com/lianghong881018/p/10338992.html