简体   繁体   English

hadoop Windows org.codehaus.mojo:exec-maven-plugin

[英]hadoop windows org.codehaus.mojo:exec-maven-plugin

I am trying to install hadoop on my windows machine. 我正在尝试在Windows计算机上安装hadoop。 I am following this guide: https://wiki.apache.org/hadoop/Hadoop2OnWindows but when I have to execute this line: 我正在遵循此指南: https : //wiki.apache.org/hadoop/Hadoop2OnWindows,但是当我必须执行此行时:

mvn package -Pdist,native-win -DskipTests -Dtar 

I have this error: 我有这个错误:

 [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (com pile-ms-winutils) on project hadoop-common: Command execution failed. Process ex ited with an error: 1(Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE xception 
I already read this post build hadoop 2.2 on windows but I am not able to understand how to solve. 我已经在Windows上阅读了这篇关于build hadoop 2.2的文章,但是我不明白如何解决。

Thank you in advance for your help. 预先感谢您的帮助。

Alex 亚历克斯

You ran that command from a Windows SDK Command Prompt, right? 您是从Windows SDK命令提示符运行该命令的,对吧? Taking a look at this guide I wrote recently and make sure you have the proper tools installed. 看一下我最近写的本指南 ,并确保您安装了正确的工具。

If you are using recent versions of Hadoop, ie Hadoop-2.8, or 2.7 then there is no need to built the Hadoop-src using Maven, there is an easy way to configure (higher versions) Hadoop in windows. 如果您使用的是Hadoop的最新版本,即Hadoop-2.8或2.7,则无需使用Maven构建Hadoop-src,则有一种简单的方法可以在Windows中配置(更高版本)Hadoop。

Download & Install Java in c:/java/ c:/java/ 下载并安装Java

make sure the path is this way, if java is installed in program files, then hadoop-env.cmd will not recognize java path 确保路径是这种方式,如果将Java安装在程序文件中,那么hadoop-env.cmd将无法识别Java路径

Download Hadoop binary distribution. 下载 Hadoop二进制发行版。

I am using binary distribution Hadoop-2.8.1 我正在使用二进制分发版Hadoop-2.8.1

Set Environment Variables: 设置环境变量:

JAVA_HOME = "c:/Java"
HADOOP_HOME="<your hadoop home>"
Path= "JAVA_HOME/bin"
Path = "HADOOP_HOME/bin" 

Hadoop will work on windows if Hadoop-src is built using maven in your windows machine. 如果Hadoop-src是使用Windows计算机中的maven构建的,则Hadoop将在Windows上运行。 Building the Hadoop-src (distribution) will create a Hadoop binary distribution, which will work as windows native version. 构建Hadoop-src (发行版)将创建Hadoop二进制发行版,它将作为Windows本机版本使用。

But if you don't want to do that, then download pre-builted winutils of Hadoop distribution. 但是,如果您不想这样做,请下载winutils of Hadoop distribution.winutils of Hadoop distribution. Here is a GitHub link , which has winutils of some versions of Hadoop. 这是GitHub链接 ,其中包含某些Hadoop版本的winutils。

if the version you are using is not in the list, the follow the conventional method for setting up Hadoop on windows - link 如果您使用的版本不在列表中,请按照常规方法在Windows上设置Hadoop- 链接

If you found your version, then copy paste all content of folder into path: /bin/ 如果找到了版本,则将文件夹的所有内容复制粘贴到路径:/ bin /

Set all the .xml configuration files - Link & set JAVA_HOME path in hadoop-env.cmd file 设置所有.xml配置文件-在hadoop-env.cmd文件中链接并设置JAVA_HOME路径

From cmd go to: 从cmd转到:

<HADOOP_HOME>/bin/> hdfs namenode -format
<HADOOP_HOME>/sbin> start-all.cmd

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM