【Spark】object not serializable (class: A)

NoSuchKey