JAVA _Home is not set in Hadoop

前端 未结 8 1225
耶瑟儿~
耶瑟儿~ 2021-01-05 00:03

I am a beginner with hadoop and trying to install and run hadoop in my Ubuntu as a single node cluster. This is my JAVA_HOME in my hadoop_env.sh

# The java          


        
8条回答
  •  失恋的感觉
    2021-01-05 00:25

    Above answers should work as long as you are using default conf directory $HADOOP_HOME/conf or $HADOOP_HOME/etc/hadoop. Here are a few things you should do if you're using a different conf folder.

    1. Copy the hadoop-env.sh file from the default conf directory to your conf folder, say /home/abc/hadoopConf.
    2. Replace the line

      #export JAVA_HOME=${JAVA_HOME}
      

      with the following:

      export JAVA_HOME=/usr/lib/jvm/java-8-oracle
      export HADOOP_CONF_DIR=/home/abc/hadoopConf
      

    Change the values appropriately. If you have any other environment variables related to hadoop configured in your .bashrc or .profile or .bash_profile consider adding them next to the above lines.

提交回复
热议问题