reading/writing avro file in spark core using java
<p>I need to access avro file data in a program written in java on spark core. I can use the MapReduce InputFormat class but it gives me a tuple containing each line of file as a key. It's very hard to parse it as i am not using scala.</p>

<pre><code>JavaPairRDD&lt;AvroKey&lt;GenericRecord&gt;, AvroValue&gt; avroRDD = sc.newAPIHadoopFile("dataset/testfile.avro", AvroKeyInputFormat.class, AvroKey.class, NullWritable.class,new Configuration()); 
</code></pre>

<p>Is there any utility class or jar available which i can use to map avro data directly into java classes. E.g. the codehaus.jackson package has a provision for mapping json to java class.</p>

<p>Otherwise is there any other method to easily parse fields present in avro file to java classes or RDDs.  </p>