hadoop windows org.codehaus.mojo:exec-maven-plugin
Asked Answered
C

2

1

I am trying to install hadoop on my windows machine. I am following this guide: https://wiki.apache.org/hadoop/Hadoop2OnWindows but when I have to execute this line:

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.

Thank you in advance for your help.

Alex

Corollary answered 9/2, 2015 at 13:37 Comment(0)
N
3

You ran that command from a Windows SDK Command Prompt, right? Taking a look at this guide I wrote recently and make sure you have the proper tools installed.

Necrolatry answered 25/3, 2015 at 14:24 Comment(0)
T
-1

If you are using recent versions of Hadoop, i.e. 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.

Download & Install Java in c:/java/

make sure the path is this way, if java is installed in program files, then hadoop-env.cmd will not recognize java path

Download Hadoop binary distribution.

I am using binary distribution 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. Building the Hadoop-src(distribution) will create a Hadoop binary distribution, which will work as windows native version.

But if you don't want to do that, then download pre-builted winutils of Hadoop distribution. Here is a GitHub link, which has winutils of some versions of Hadoop.

if the version you are using is not in the list, the follow the conventional method for setting up Hadoop on windows - link

If you found your version, then copy paste all content of folder into path: /bin/

Set all the .xml configuration files - Link & set JAVA_HOME path in hadoop-env.cmd file

From cmd go to:

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

Hope this helps.

Tritium answered 5/12, 2017 at 8:44 Comment(10)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.Limewater
Thanks for mentioning. The link has my own answer, but still I will post the original answer.Tritium
Ok, it might not then be deleted from SO. I'm still not sure if copying is the best solution instead consider flagging question as a duplicate to the one you already answered.Limewater
That would probably be a optimistic way to answer the question. Thanks for the pointing out.Tritium
Also when you reach 50 rep you can put the link to answer as a comment if not dare to mark as duplicate.Limewater
Some times questions are not identically similar, but answers match, so I find it a bit unfair to mark it as duplicate or down vote.Tritium
It is true. Therefore commenting should be then considered.Limewater
Actually I did the same, but still I got down vote from you. :DTritium
It should not matter but it was not from me :) I prefer to give comments & advice to get this site better.Limewater
Anyways thanks for mentioning. Will improve in next answer.Tritium

© 2022 - 2024 — McMap. All rights reserved.