`

Could not find creator property with name 'id'(local spark debug)

阅读更多

       spark本地IDE调试模式下:

JavaRDD<String> textFile = sc.textFile("E:\\json.txt",1);

 

执行异常:

com.fasterxml.jackson.databind.JsonMappingException: Could not find creator property with name 'id' (in class org.apache.spark.rdd.RDDOperationScope))

 

原因:

https://issues.apache.org/jira/browse/SPARK-8332 写道
Jonathan Kelly added a comment - 20/Oct/15 18:06
Oh, you might be right. I was thinking that I had tried compiling Spark with a newer version of Jackson (2.5.3) and still ran into problems, but now I'm second guessing myself. It might have only been that my classpath had both versions.
Jonathan Kelly added a comment - 20/Oct/15 20:38
Good news! I tried compiling Spark with Jackson 2.5.3 instead of 2.4.4, and it seems to work just fine (as long as this is the only version of Jackson 2.x in the classpath; the issue described above does indeed only occur when multiple versions are in the classpath). Would it be possible to upgrade to Jackson 2.5.3 in Spark 1.6.0? If so, should I cut an issue for this?
Sean Owen added a comment - 20/Oct/15 21:40
How about 2.6, just out of curiosity?
The other issue is colliding with Hadoop's Jackson, which I'm pretty sure is also not shaded. Of course, shading is an answer there, for Spark, also worth a try. It may be that it just pushes the problem around, and now your app still has to shade its Jackson to dodge Hadoop's copy, until Hadoop 3 at least.
What a mess eh?

 

原因是:jackJson版本冲突,换成2.4以前的就好了

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics