How to read a .text file in edge node using Scala.
def main(args: Array[String]) {
val srcFile=sc.textFile("file://home//viji.palanisamy//dev//kpi_library//EDI//Prof_test1").toString()
readFile(srcFile)
}
def readFile(filename: String) = {
val bufferedSource = Source.fromFile(filename)
println("bufferedSource"+bufferedSource)
}
Got an error like file not found. Is there any solution to read text from node using Scala.