问题描述

class scala.collection.mutable.WrappedArray overrides final method toBuffer.本质上是因为我们使用的SDK和Spark版本不兼容导致的,例如我的spark版本是spark 2.3.4,而我使用了scala-sdk 2.13.2,就导致了这个错误。

PS: 吐槽一下sdk向后兼容做的真的不太好(CUDA也是)

解决办法

下载适合你的spark版本的scala-sdk版本,这里给出一份版本对应关系表。

spark版本 scala-sdk版本
2.2.X 2.11
2.3.0 2.11
2.3.1 2.11
2.3.4 2.12

本人使用的spark版本为2.3.4,故以2.3.4为例,介绍一下解决办法。

1、 进入‘project structure’

class scala.collection.mutable.WrappedArray overrides final method toBuffer错误

2、添加Scala SDK

class scala.collection.mutable.WrappedArray overrides final method toBuffer错误

3、下载对应的Scala SDK版本

class scala.collection.mutable.WrappedArray overrides final method toBuffer错误
class scala.collection.mutable.WrappedArray overrides final method toBuffer错误

4、选择模块

class scala.collection.mutable.WrappedArray overrides final method toBuffer错误

5、重启IDEA并运行

class scala.collection.mutable.WrappedArray overrides final method toBuffer错误

相关文章: