Solve CentOS Warning: $ HADOOP_HOME is deprecated

Source: Internet
Author: User

Solve CentOS Warning: $ HADOOP_HOME is deprecated

A warning message is reported when Hadoop is started. The Hadoop version I installed is hadoop1.0.4. The warning information is as follows:

[Plain] view plaincopy
  1. [Root@localhosthadoop-1.0.4] #./bin/start-all.sh
  2. Warning: $ HADOOP_HOMEisdeprecated.
The online statement is because Hadoop itself made a judgment on HADOOP_HOME, specifically in bin/hadoop and bin/hadoop-config.sh. There are the following configurations in the hadoop-config.sh:
[Plain] view plaincopy
  1. If ["$ HADOOP_HOME_WARN_SUPPRESS" = "] & [" $ HADOOP_HOME "! = ""]; Then
  2. Echo "Warning: \ $ HADOOP_HOMEisdeprecated." 1> & 2
  3. Echo1> & 2
  4. Fi
The solution to this warning is as follows:

1. comment out the if fi configuration given above in the hadoop-config.sh (not recommended)

2. Add an environment variable in/etc/profile:

Export HADOOP_HOME_WARN_SUPPRESS = 1

Note: After modifying the profile, you need to perform the source operation to make it take effect.

[Plain] view plaincopy
  1. Source/etc/profile
Note: Modify the/home/. bashrc file in ubuntu and add an export HADOOP_HOME_WARN_SUPPRESS = 1

After the execution, we can check whether the configuration is successful, re-execute the start-all.sh script:

[Plain] view plaincopy
  1. [Root@localhosthadoop-1.0.4] #./bin/start-all.sh
  2. Startingnamenode, loggingto/root/hadoop-1.0.4/libexec/../logs/hadoop-root-namenode-localhost.out
  3. Localhost: startingdatanode, loggingto/root/hadoop-1.0.4/libexec/../logs/hadoop-root-datanode-localhost.out
  4. Localhost: startingsecondarynamenode, loggingto/root/hadoop-1.0.4/libexec/../logs/hadoop-root-secondarynamenode-localhost.out
  5. Startingjobtracker, loggingto/root/hadoop-1.0.4/libexec/../logs/hadoop-root-jobtracker-localhost.out
  6. Localhost: startingtasktracker, loggingto/root/hadoop-1.0.4/libexec/../logs/hadoop-root-tasktracker-localhost.out
There is no Warning: $ HADOOP_HOME is deprecated, indicating that the problem has been resolved.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.