我运行时收到以下Stack-Trace错误
./mahout spark-itemsimilarity –input input-file –output / output_dir –master spark:// …
Mahout 0.10.0支持Spark 1.1.1或更低版本。如果您从source构建并在mahout / pom.xml中更改主pom中的Spark版本号,则可以为Spark 1.2构建,但您必须使用下面描述的解决方法。名称中带有“dependency-reduced”的jar将在mahout / spark / target中。正在开发Spark 1.2分支,因此不需要上述修复。这可能是一周准备尝试。
Spark 1.2中存在一个错误,不确定它是否已在1.3中修复。
在这里看到: https://issues.apache.org/jira/browse/SPARK-6069
对我有用的是在所有工人上放入带有番石榴的罐子(它将被称为mahout-spark_2.10-0.11.0-SNAPSHOT-dependency-reduced.jar或类似的东西),然后使用该位置将该位置传递给Mahout作业:
spark-itemsimilarity -D:spark.executor.extraClassPath=/path/to/mahout/spark/target/mahout-spark_2.10-0.11-dependency-reduced.jar
路径必须包含jar 的 对所有工人 强>
代码解决方案将在下周左右进入spark-1.2分支,这将使得 -D:spark.executor.extraClassPath=/path/to/mahout... 不需要。
-D:spark.executor.extraClassPath=/path/to/mahout...