在 spark-env.sh中添加

export SPARK_LIBRARY_PATH=$SPARK_LIBRARY_PATH:/usr/hdp/current/share/lzo/0.6.0/lib/native/Linux-amd64-64/*

export SPARK_CLASSPATH=$SPARK_CLASSPATH:/usr/hdp/2.2.8.0-3150/spark/lib/hadoop-lzo-0.4.20-SNAPSHOT.jar