让mahout0.7在hadoop2.0环境下运行
来源:互联网 发布:java实现word文档打印 编辑:程序博客网 时间:2024/05/15 02:17
由于官方打的jar包是用1.0环境下的,所以要想在2.0下运行,必须重新打包,重新打包前修改几个pom文件就可以,现已经测试通过:
1、根pom文件修改如下:
<hadoop.version>2.5.0</hadoop.version><!-- 将原来的1.0改为2.0版本--><!-- 并注释掉hadoop1.0的依赖--> <!--dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-core</artifactId> <version>${hadoop.version}</version> <exclusions> <exclusion> <groupId>net.sf.kosmosfs</groupId> <artifactId>kfs</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-util</artifactId> </exclusion> <exclusion> <groupId>hsqldb</groupId> <artifactId>hsqldb</artifactId> </exclusion> <exclusion> <groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> <exclusion> <groupId>oro</groupId> <artifactId>oro</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jsp-2.1</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jsp-api-2.1</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>servlet-api-2.5</artifactId> </exclusion> <exclusion> <groupId>tomcat</groupId> <artifactId>jasper-runtime</artifactId> </exclusion> <exclusion> <groupId>tomcat</groupId> <artifactId>jasper-compiler</artifactId> </exclusion> <exclusion> <groupId>xmlenc</groupId> <artifactId>xmlenc</artifactId> </exclusion> <exclusion> <groupId>net.java.dev.jets3t</groupId> <artifactId>jets3t</artifactId> </exclusion> <exclusion> <groupId>org.eclipse.jdt</groupId> <artifactId>core</artifactId> </exclusion> </exclusions> </dependency-->
2、在mahout-core、mahout-examples、mahout-integration工程的pom文件中增加如下代码
<profiles> <profile> <id>hadoop1</id> <!--activation> <property> <name>!hadoop.version</name> </property> </activation--> <dependencies> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-core</artifactId> <version>1.0.0</version> <scope>compile</scope> <exclusions> <exclusion> <groupId>net.sf.kosmosfs</groupId> <artifactId>kfs</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-util</artifactId> </exclusion> <exclusion> <groupId>hsqldb</groupId> <artifactId>hsqldb</artifactId> </exclusion> <exclusion> <groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> <exclusion> <groupId>oro</groupId> <artifactId>oro</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jsp-2.1</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jsp-api-2.1</artifactId> </exclusion> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>servlet-api-2.5</artifactId> </exclusion> <exclusion> <groupId>tomcat</groupId> <artifactId>jasper-runtime</artifactId> </exclusion> <exclusion> <groupId>tomcat</groupId> <artifactId>jasper-compiler</artifactId> </exclusion> <exclusion> <groupId>xmlenc</groupId> <artifactId>xmlenc</artifactId> </exclusion> <exclusion> <groupId>net.java.dev.jets3t</groupId> <artifactId>jets3t</artifactId> </exclusion> <exclusion> <groupId>org.eclipse.jdt</groupId> <artifactId>core</artifactId> </exclusion> </exclusions> </dependency> </dependencies> </profile> <profile> <id>hadoop2</id> <activation> <property> <name>hadoop.version</name> </property> </activation> <dependencies> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-common</artifactId> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-core</artifactId> </dependency> </dependencies> </profile> </profiles>
3、在根目录下执行 mvn package -Phadoop2 -DskipTests 重新生成jar包
0 0
- 让mahout0.7在hadoop2.0环境下运行
- hadoop2.7+mahout0.13.0在数据集synthetic_control.data具体操作
- Linux CentOS 7下在Hadoop2.7.3全分布式环境编译运行WordCount.java
- centos hadoop2.7 环境下配置运行环境
- mahout0.7示例运行纪实
- mahout0.7 示例运行纪实
- 基于hadoop2.7集群的Spark2.0,Sqoop1.4.6,Mahout0.12.2完全分布式安装
- 基于hadoop2.7集群的Spark2.0,Sqoop1.4.6,Mahout0.12.2完全分布式安装
- 基于hadoop2.7集群的Spark2.0,Sqoop1.4.6,Mahout0.12.2完全分布式安装
- 在Hadoop1.2.1分布式集群环境下安装Mahout0.9框架
- Ubuntu系统下使用Eclipse搭建hadoop2.4运行环境
- Ubuntu系统下使用eclipse搭建Hadoop2.7.1运行环境
- hadoop2.2+mahout0.9实战
- hadoop2.2+mahout0.9实战
- hadoop2.2+mahout0.9问题
- Mahout0.9安装(Hadoop2.6.0)
- mahout0.9 hadoop2.x 编译
- fedora17中hadoop2.2.0在eclipse下运行wordcount
- UL完美居中的方法[转]
- javascript中getmonth()的问题
- IE使用滤镜后链接无法触发点击、hover等事件
- 解决使用Iframe无刷新提交后IE进度条一直在加载的问题
- 解决IE 下div与img重叠无法触发鼠标事件的问题
- 让mahout0.7在hadoop2.0环境下运行
- Guava中TreeRangeMap基本使用
- 浏览器缩放后,flashcanvas内部绘图时坐标错位的解决方案
- xmpp客户端,服务器搭建要点
- 【CODEFORCES】 B. Random Teams
- 负载均衡原理与实践学习笔记(一)
- POI导入2007EXCEL中遇到的文件描述符错误的问题
- JXL通过相对路径插入超链接的完美解决方案
- 想想你在form表单提交时,如果参数包含双引号怎么办