It doesn't work that way.
Following is the correct way:

val table = sc.textFile(args(1))
val histMap = table.map(x => {
    x.split('|')(0).toInt,1
})




-----
Lalit Yadav
[email protected]
--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-add-elements-into-map-tp18395p18399.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to