Is there a way to generate Java bean for a given avro schema file in spark
1.2 using spark-avro project 0.2.0 for following use case?
1. Topics from kafka read and stored in the form of avro generic records
:JavaDStream<GenericRecords>
2. Using spark avro project able to get the schema in the following way
    JavaSchemaRDD schemaRDD2 = AvroUtils.avroFile(sqlContext,
PathTofile.avro)
3. For each record in the above mentioned JavaDStream, need to apply schema
retrieved in step 2.
    Chose to do this
    JavaSchemaRDD schemaRDD = sqlContext.applySchema(genericRecordJavaRDD,
PathTofile.class)
   To generate Java bean class(PathTofile.class) chose to use avro maven
plugin. But the generated java bean using plugin includes field named SCHEMA
which is not supported my the applySchema method mentioned above.

Please let me know if there is a better solution for this.
 



-----
Thanks,
Yamini
--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-generate-Java-bean-class-for-avro-files-using-spark-avro-project-tp22413.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to