I'm trying to load and parse json files (Tweets) but I get back the below error
error: not found: value mapper
Some(mapper.readValue(record, classOf[Tweet]))
And this is the scala script
import com.fasterxml.jackson.module.scala.DefaultScalaModule
import com.fasterxml.jackson.module.scala.experimental.ScalaObjectMapper
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.DeserializationFeature
case class Tweet(tweet_id: Int, created_unixtime: Long, created_time: String, lang: String, displayname: String, time_zone: String, msg: String)
val = input.textFile("hdfs://localhost:54310/tmp/data_staging/tweets*") // tweets well loaded
// Parsing them
val result = input.flatMap(record => {
try {
Some(mapper.readValue(record, classOf[Tweet]))
} catch {
case e: Exception => None
}
})