Search code examples
hadoopjava-home

hadoop 1.1.2 installation on windows


I am trying to install hadoop 1.1.2 on window machine with cygwin.
From on-line videos and tutorials, I have set up all most everything.
Now problem is when i try to create folder with commands

cd /usr/local/hadoop-1.1.2/bin         --> this works proper and set proper path then
./hadoop dfs -mkdir input      --> when this execute i get error

in error i get issue related to JAVA_HOME path is not set proper also show me text like /Java/jre7/bin/bin/java which looks wrong path.

but i have set JAVA_HOME path properly its here,

enter image description here

I have set same path with /bin in path variable.
I don't know where i have made mistake.

EDIT
full Error

./hadoop: line 320: C:/Java/jre7/bin/bin/java: No such file or directory
./hadoop: line 390: C:/Java/jre7/bin/bin/java: No such file or directory
./hadoop: line 390: exec: C:/Java/jre7/bin/bin/java: cannot execute: No such file or directory

Solution

  • problems with its solution

    1. JAVA PATH ISSUE

    first is JAVA_PATH issue

    Note: Have to use JDK not JRE.
    For Hadoop try to use folder name without space

    In Environment variable

    JAVA_HOME = C:\Java\jdk1.7.0_25

    In path variable add below code with othres with ;sepration

    %JAVA_HOME%\bin

    In hadoop-env.sh file (you can find this file from C:\cygwin\usr\local\hadoop-1.1.2\conf if you are using windows machine).

    Note that, remove # from starting of line and USE \\ twice in file

    export JAVA_HOME=C:\\Java\\jdk1.7.0_25

    if everything OK with JAVA_PATH you can check from CYGWIN consol
    try below code to get javaPath which hadoop will use

    echo $JAVA_HOME

    here you will get java version path
    also can set JAVAPATH from runtime,try below code on CYGWIN treminal

    export JAVA_HOME=C:/JAVA/Jdk1.7.0_25

    2. USER ISSUE

    first of all Note that when you start with hadoop installation use same USER for MASTER and SALVE.

    If you have different user then have to generate one extra file with name config(without extension)

    if your MASTER's machine name is jubin-pc and username is jubinp and SLAVES machine name is trainees11 and username is trainees(have to do vice-verse for both)

    config file(for MASTER) Location C:\cygwin\home\jubinp\.ssh\

    Host trainees11
    User trainees
    

    config file(for SLAVE) Location C:\cygwin\home\trainees\.ssh\

    Host jubin-pc
    User jubinp