Mahout的例子中,我跟随亨利马乌在行动教程k均值clustring,我使用相同的代码中发现here: 具有相同的pom.xml也。 在我的本地机器上使用eclipse时,所有的东西都可以正常工作,所以我在创建jar文件(clustering-0.0.1-SNAPSHOT.jar)并将它带入群集(Hortonworks 2.3)时试图运行它:hadoop jar clustering-0.0.1-SNAPSHOT.jar com.digimarket.clustering.App
我的项目不同)我得到这个错误:java.lang.NoClassDefFoundError:上运行Hadoop集群
java.lang.NoClassDefFoundError: org/apache/mahout/common/distance/DistanceMeasure
我知道这是一个依赖的问题,我发现谁收到了这个问题,但不知道他们怎么解决的,用户提出的问题。 here和here
这是Mahout的目录在我的集群中的内容:
ls /usr/hdp/2.3.4.0-3485/mahout/
bin
conf
doc
lib
mahout-examples-0.9.0.2.3.4.0-3485.jar
mahout-examples-0.9.0.2.3.4.0-3485-job.jar
mahout-integration-0.9.0.2.3.4.0-3485.jar
mahout-math-0.9.0.2.3.4.0-3485.jar
mahout-mrlegacy-0.9.0.2.3.4.0-3485.jar
mahout-mrlegacy-0.9.0.2.3.4.0-3485-job.jar
感谢。
maven是否会生产两个罐子; 'clustering-0.0.1-SNAPSHOT.jar'和'clustering-0.0.1-SNAPSHOT-jar-with-dependencies.jar'? – rj93
它生成一个名为mia-0.5.jar的jar(本书的作者http://stackoverflow.com/a/11482253/5089324) – zaher
如何构建'clustering-0.0.1-SNAPSHOT.jar '? – rj93