IllegalArgumentException thrown when count and collect function in spark

ⅰ亾dé卋堺 提交于 2019-12-05 07:19:32

Are you using Java 9? There are so many issues using Java9 with Apache projects now.

If that is the case and this is a Mac OS, do the following:

cd /usr/libexec
./java_home -V

And you will be able to see the java versions you have. Pick up an older version as your new JAVA_HOME.

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.{YourVersion}.jdk/Contents/Home"

If this works (I am not sure because information is missing), add the export command to your profile init script.

Had this trouble for 3 hours and in the end, What worked for me is to switch to Spark 2.2.0 instead of Spark 2.2.1, Give it a try.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!