You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by karan alang <ka...@gmail.com> on 2018/02/24 19:34:09 UTC
scala question (in spark project)- not able to call getClassSchema
method in avro generated class
i’ve an Avro generated class - com.avro.Person which has a method ->
getClassSchema
I’m passing className to a method, and in the method - i need to get the
Avro schema . Here is the code i'm trying to use -
val pr = Class.forName(productCls) //where productCls =
classOf[Product].getName
How do i call the method - getClassSchema of this class ?
Pls. let me know.
thanks!