Github user rjurney commented on the pull request:

    https://github.com/apache/spark/pull/455#issuecomment-50420550
  
    @ericgarcia I am running CDH 4.4 with mapreduce 1, and when I run this on a 
cluster running Spark master in standalone mode:
    
       avroRdd = 
sc.newAPIHadoopFile("hdfs://hivecluster2:8020/e8/dev/web_proxy_mef/2014/07/28", 
       "org.apache.avro.mapreduce.AvroKeyInputFormat", 
       "org.apache.avro.mapred.AvroKey", 
       "org.apache.hadoop.io.NullWritable",
       
keyConverter="org.apache.spark.examples.pythonconverters.AvroGenericConverter")
    
    The error is the well known hadoop 1 vs hadoop 2 issue. 
    
       Py4JJavaError: An error occurred while calling 
z:org.apache.spark.api.python.PythonRDD.newAPIHadoopFile.
       : org.apache.hadoop.ipc.RemoteException: Server IPC version 7 cannot 
communicate with client version 4
    
    So I also tried hadoopFile, instead of newAPIHadoopFile. I run:
    
       avroRdd = 
sc.hadoopFile("hdfs://hivecluster2:8020/e8/dev/web_proxy_mef/2014/07/28/20/part-m-00000.avro",
 
       "org.apache.avro.mapreduce.AvroKeyInputFormat", 
       "org.apache.avro.mapred.AvroKey", 
       "org.apache.hadoop.io.NullWritable",
       
keyConverter="org.apache.spark.examples.pythonconverters.AvroGenericConverter")
    
    And I get:
    
       Py4JJavaError: An error occurred while calling 
z:org.apache.spark.api.python.PythonRDD.hadoopFile.
       : java.lang.ClassCastException: 
org.apache.avro.mapreduce.AvroKeyInputFormat cannot be cast to 
org.apache.hadoop.mapred.InputFormat
    
    What am I to do? :(


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to