Github user ericgarcia commented on the pull request:

    https://github.com/apache/spark/pull/455#issuecomment-49687447
  
    @rjurney I saved the above to 
    
`spark/examples/src/main/scala/org/apache/spark/examples/pythonconverters/AvroGenericConverter.scala`
    rebuilt spark with 
    `./sbt/sbt assembly` 
    and then loaded pyspark with 
    
`SPARK_CLASSPATH=examples/target/scala-2.10/spark-examples-1.1.0-SNAPSHOT-hadoop1.0.4.jar
 IPYTHON=1 bin/pyspark` 
    Inside of pyspark you should be able to load up yourAvro file with:
    
        avroRdd = sc.newAPIHadoopFile(<full_path_to_your_avro_file>, 
                    "org.apache.avro.mapreduce.AvroKeyInputFormat", 
                    "org.apache.avro.mapred.AvroKey", 
                    "org.apache.hadoop.io.NullWritable",
                    
keyConverter="org.apache.spark.examples.pythonconverters.AvroGenericConverter")
    
    Let me know if it works for you : )


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to