spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niko Stahl <>
Subject ClassCastException when using saveAsTextFile
Date Tue, 25 Mar 2014 17:55:11 GMT

I'm trying to save an RDD to HDFS with the saveAsTextFile method on my ec2
cluster and am encountering the following exception (the app is called

Exception failure: java.lang.ClassCastException: cannot assign instance of
GraphTest$$anonfun$3 to field org.apache.spark.rdd.MappedRDD.f of type
scala.Function1 in instance of org.apache.spark.rdd.MappedRDD

The RDD is simply a list of strings. Strangely enough the same sequence of
commands when executed in the Spark shell does not cause the above error.
Any thoughts on what might be going on here?


View raw message