1

I want to configure hadoop to run in pseudo-distributed mode. My configuration files:

core-site.xml:

<configuration>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost/</value>
    </property>
</configuration>

hdfs-site.xml:

<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

mapred-site.xml:

<configuration>
    <property>
        <name>mapred.job.tracker</name>
        <value>localhost:8021</value>
    </property>
</configuration>

the hadoop version I'm using command hadoop version is:

Hadoop 0.20.203.0
Subversion http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203 -r 1099333
Compiled by oom on Wed May  4 07:57:50 PDT 2011

I have set the JAVA_HOME environmental variable to:(I'm using fedora 15)

/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64

the output of export $JAVA_HOME is:

/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64

But when I run start-dfs.sh it says:

localhost: Error: JAVA_HOME is not set.

The only thing that log files show is the above statement. Could anyone help?

3

Check the hadoop-env.sh file in the Hadoop conf directory. Ensure the line exporting JAVA_HOME has been uncommented and set appropriately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.