Can somebody share example of reading avro using java in spark?
Found scala examples but no luck with java.
Here is the code snippet which is part of code but running into compilation issues with the method ctx.newAPIHadoopFile
.
JavaSparkContext ctx = new JavaSparkContext(sparkConf);
Configuration hadoopConf = new Configuration();
JavaRDD<SampleAvro> lines = ctx.newAPIHadoopFile(path, AvroInputFormat.class, AvroKey.class, NullWritable.class, new Configuration());
Regards