葡萄皮的个人空间分享 http://blog.sciencenet.cn/u/Hadron74

博文

安装hadoop2.2.0 到Windows 7笔记

已有 8303 次阅读 2014-1-15 13:12 |个人分类:大数据|系统分类:科研笔记| windows, Hadoop

                                                 

          最近工作中可能用到大数据分析,对MapReduce很感兴趣就准备学习Hadoop,先在自己电脑上安装了一下。大体安装成功,还有一些问题。先记录在这里。

主要参考文献:

Build, Install, Configure and Run Apache Hadoop 2.2.0 in Microsoft Windows OS By Abhijit Ghosh

http://www.srccodes.com/p/article/38/build-install-configure-run-apache-hadoop-2.2.0-microsoft-windows-os

我主要是按照这个文档进行安装,这里记录下遇到的问题及解决方案。

1,SDK安装错误:

安装SDKv7.1时,系统报错5100,“Installation of the “Microsoft Windows SDKfor Windows 7” product has reported the following error: Please refer to SamplesSetupHTMLConfigDetails.htm document for further information.”。

网上搜索,是这个错误:http://support.microsoft.com/kb/2717426/de

解决方案:卸载

    • Microsoft Visual C++ 2010 x86 Redistributable

    • Microsoft Visual C++ 2010 x64 Redistributable

                   由于在Windows的程序中,找不到这两个程序,需要用卸载工具,见:

                   http://support.microsoft.com/mats/Program_Install_and_Uninstall

        卸载后可直接安装。

2,jdk安装:

     注意一定要安装jdk而不是jre,把jdk装在根目录如c:Javajdk… 而不要在Program Files中,否则会有系统错误。

3,系统环境变量设置注意事项:

注意路径的顺序,否则会有版本问题带来编译报错。

a)      注意c:javajdk..bin 要在c:windows前,验证用which java

b)      注意c:protobuf要在c:cygwin64bin前,验证which protoc

确定protoc –version 显示libprotoc 2.5.0

c)       确定msbuild的版本是4…..,验证运行 msbuild

     4mvn 之前,注意2.2.0 有个bug需要改正

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hadoop-auth: Compilation failure: Compilation failure:

[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[84,13] cannot access org.mortbay.component.AbstractLifeCycle

[ERROR] class file for org.mortbay.component.AbstractLifeCycle not found

解决方案:

https://issues.apache.org/jira/i#browse/HADOOP-10110

 就是编辑hadoop-common-project/hadoop-auth/pom.xml在适当的位置加入:    

<dependency> 

     <groupId>org.mortbay.jetty</groupId>  

   <artifactId>jetty-util</artifactId>  

   <scope>test</scope></dependency> 

 

 但是,编译成功后运行

>hadoop fs –ls /

仍然显示错误:

The system cannot find the batch label specified - make_command_arguments

RunJar jarFile [mainClass] args... 

 

这是遗留问题,正在研究中,有高手来帮忙指点一下,谢谢!

 

 命令“hadoop fs”用hdfs dfs替代,“hadoop jar”用“yarn jar”替代可以完成wordcount的例子。如下链接所示:http://www.cnblogs.com/hutou/p/Hadoop4.html      

 

 

 

 

 



https://blog.sciencenet.cn/blog-565112-759340.html

上一篇:Python for Bioinformatics 为生物信息学设计的Python教程
下一篇:学习算法的那点事儿
收藏 IP: 155.91.136.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (4 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-19 16:07

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部