UnsatisfiedLinkError: no snappyjava in java.library.path when running Spark MLLib Unit test within Intellij

后端 未结 4 1314
悲哀的现实
悲哀的现实 2020-12-15 09:03

The following exception is occurring when running a spark unit test that requires snappy compression:

java.lang.reflect.InvocationTargetException
    at sun.         


        
4条回答
  •  没有蜡笔的小新
    2020-12-15 09:50

    Faced this problem with clean standalone installation of Spark 1.6.1. To solve it I had to:

    1) manually add libsnappyjava.jnilib (it's in the jar) to java.library.path (which includes multiple locations, ~/Library/Java/Extensions/ is fine)

    2) add snappy-java-1.1.2.4.jar to Spark's classpath (in spark-env.sh add "export SPARK_CLASSPATH=.../snappy-java-1.1.2.4.jar"

提交回复
热议问题