相关疑难解决方法(0)

Spark数据集:示例:无法生成编码器问题

新的火花世界和尝试用我在网上找到的scala编写的数据集示例

在通过SBT运行时,我继续收到以下错误

org.apache.spark.sql.AnalysisException: Unable to generate an encoder for inner class

知道我在俯瞰什么

也可以随意指出编写相同数据集示例的更好方法

谢谢

> sbt>  runMain DatasetExample

Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
16/10/25 01:06:39 INFO Remoting: Starting remoting
16/10/25 01:06:46 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriverActorSystem@192.168.150.130:50555]
[error] (run-main-6) org.apache.spark.sql.AnalysisException: Unable to generate an encoder for inner class `DatasetExample$Student` without access to the scope that this class was defined in. Try moving this class out of its parent class.;
org.apache.spark.sql.AnalysisException: Unable to generate an encoder for inner …
Run Code Online (Sandbox Code Playgroud)

scala apache-spark apache-spark-sql apache-spark-dataset apache-spark-encoders

7
推荐指数
1
解决办法
3471
查看次数