[英]Mahout 0.11.1 Spark-Shell NoClassDefFoundError
I am trying to get the Mahout Spark-Shell to run on the Cloudera QuickStart VM 我正在尝试使Mahout Spark-Shell在Cloudera QuickStart VM上运行
Mahout: Version 0.11.1
Spark: Version 1.5.0-cdh5.5.1
Java: 1.7.0_67
.bashrc is set as .bashrc设置为
export MAHOUT_HOME=/home/cloudera/Desktop/Mahout_0_11_1
export MAHOUT_LOCAL=true
export SPARK_HOME=/usr/lib/spark
export JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera
When I run the Mahout Spark-Shell I get the following error message. 当我运行Mahout Spark-Shell时,出现以下错误消息。
java.lang.NoClassDefFoundError: com/sun/jersey/spi/container/servlet/ServletContainer
at org.apache.spark.status.api.v1.ApiRootResource$.getServletHandler(ApiRootResource.scala:187)
at org.apache.spark.ui.SparkUI.initialize(SparkUI.scala:68)
at org.apache.spark.ui.SparkUI.<init>(SparkUI.scala:74)
at org.apache.spark.ui.SparkUI$.create(SparkUI.scala:190)
at org.apache.spark.ui.SparkUI$.createLiveUI(SparkUI.scala:141)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:466)
at org.apache.mahout.sparkbindings.package$.mahoutSparkContext(package.scala:91)
at org.apache.mahout.sparkbindings.shell.MahoutSparkILoop.createSparkContext(MahoutSparkILoop.scala:89)
...
This is then followed by: 然后是:
Mahout distributed context is available as "implicit val sdc".
java.lang.NullPointerException
at org.apache.spark.sql.execution.ui.SQLListener.<init>(SQLListener.scala:34)
at org.apache.spark.sql.SQLContext.<init>(SQLContext.scala:77)
at org.apache.spark.repl.SparkILoop.createSQLContext(SparkILoop.scala:1033)
at $iwC$$iwC.<init>(<console>:11)
at $iwC.<init>(<console>:19)
in spark-env.sh, 在spark-env.sh中,
add 加
export SPARK_DIST_CLASSPATH=$(/path/to/hadoop/bin/hadoop classpath) 导出SPARK_DIST_CLASSPATH = $(/ path / to / hadoop / bin / hadoop类路径)
and make sure that jersey-servlet-1.9.jar is on the classpath. 并确保jersey-servlet-1.9.jar在类路径中。
go through all of your *-env.sh scripts and be as explicit as possible about setting the environment variables, checking each, and then checking the logs for errors. 请仔细阅读所有* -env.sh脚本,并尽可能明确地设置环境变量,检查每个环境变量,然后检查日志中是否有错误。
cd / find . cd /查找。 -name jersey-servlet-1.9.jar and make sure the path where this file is found is on your classpath
-name jersey-servlet-1.9.jar,并确保找到该文件的路径在您的类路径上
Edit: Add jersey-server-1.9.jar to $MAHOUT_HOME/lib/ directory. 编辑:将jersey-server-1.9.jar添加到$ MAHOUT_HOME / lib /目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.