No hadoop-env.sh in Hadoop 0.23 December 8th, 2011

The first thing to do after downloading and extracting Hadoop is to set JAVA_HOME in the $HADOOP_HOME/conf/hadoop-env.sh file. Almost all documentation on Hadoop site expects the above configuration but I guess that was for version 0.20. When I downloaded Hadoop 0.23 today and looked for the hadoop-env.sh file, I could not find it anywhere in the extracted archive.

After a bit of Googling I realized that things have changed in 0.23 version and now I will have to look for the file in the $HADOOP_HOME/etc/hadoop directory instead. Unfortunately I couldn’t find the file there either.

As a last resort I created a file named hadoop-env.sh in the $HADOOP_HOME/etc/hadoop directory and set my JAVA_HOME there. The one and only line in that file is given below. Fortunately after that addition, the hadoop command started working and everything went normal again.

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/

8 Responses to “No hadoop-env.sh in Hadoop 0.23”

  1. 1. Shantanu Kumar on December 8th, 2011 at 12:49 pm

    Thanks, that’s useful info. Maybe you can cover a complete blog post on how to setup Hadoop 0.23 with HBase 0.93 (or 0.94) sometime?

  2. 2. Rajasekharan Vengalil on December 8th, 2011 at 2:45 pm

    This seems to be pretty much the standard operating procedure while working with open source software no?!

    [1] Google/Bing it
    [2] Do what the blog says
    [3] If it still doesn’t work go to step

  3. 3. Rajasekharan Vengalil on December 8th, 2011 at 2:46 pm

    :) Here’s step 3 again – this time in full:

    [3] If it still doesn’t work, go to step 1

  4. 4. Ganeshji Marwaha on December 8th, 2011 at 3:14 pm

    @Shantanu – Sure. Will do one soon…

    @Raj – Well said, except for the [Bing] part ;-)

  5. 5. Rajasekharan Vengalil on December 9th, 2011 at 5:37 am

    More choice is always good no? DuckDuckGo is another search engine that seems to be gaining notoriety…

  6. 6. Ilias Tsagklis on December 18th, 2011 at 2:07 pm

    Hi Ganeshji,

    Nice blog! Is there an email address I can contact you in private?

  7. 7. Ganeshji Marwaha on December 19th, 2011 at 7:53 am

    Sure, @Ilias Tsagklis. Email me at ganeshread [at the rate of] gmail

  8. 8. bathtub sink refinishing long island on January 9th, 2012 at 4:46 pm

    I guess you are a computer genius.I could never think of such an addition.Its really unbelievable.Great job.