在spark-env.cmd添加一行
FOR /F %%i IN ('hadoop classpath') DO @set SPARK_DIST_CLASSPATH=%%i
修改:log4j.properties,去掉spark-shell退出的报错信息bug
log4j.logger.org.apache.spark.util.ShutdownHookManager=OFF