调用时,在Apache Spark 1.4.0中导致此序列化错误的原因是:
sc.parallelize(strList, 4)
Run Code Online (Sandbox Code Playgroud)
抛出此异常:
com.fasterxml.jackson.databind.JsonMappingException:
Could not find creator property with name 'id' (in class org.apache.spark.rdd.RDDOperationScope)
Run Code Online (Sandbox Code Playgroud)
从抛出该异常addBeanProps在杰克逊:com.fasterxml.jackson.databind.deser.BeanDeserializerFactory#addBeanProps
RDD是一个Seq [String],而#partitions似乎并不重要(试过1,2,4).
没有序列化堆栈跟踪,正常工作者闭包无法序列化.
跟踪此问题的另一种方法是什么?
我为SparkSQL编写了一个代码.我使用Eclipse Neon运行它.它工作正常.当我转移到IntelliJ Idea时,相同的代码没有运行.
这是代码:
SparkSession spark = SparkSession
.builder()
.appName("Java Spark Hive Example")
.master("local[*]")
.config("hive.metastore.uris", "thrift://localhost:9083")
.enableHiveSupport()
.getOrCreate();
spark.sql("select survey_response_value from health").show();
Run Code Online (Sandbox Code Playgroud)
我得到的例外是:
https://justpaste.it/13tsa
请告诉我为什么我会遇到这个问题.我怎么解决这个问题?我应该从一开始就使用IntelliJ编写代码,还是有任何帮助机制?