Win7+eclipse Configuring the Hadoop development Environment considerations

Source: Internet
Author: User

1, need to put Hadoop.dll and Winutils.exe into the bin directory of Hadoop, my is: E:\Hadoop\hadoop-2.4.0\bin


2. The hadoop_home and path paths need to be configured. I have the following:

hadoop_home--e:\hadoop\hadoop-2.4.0

PATH ——.; %hadoop_home%\bin;


The above two notes can solve the error of running the WordCount report null pointer exception.


3, need to create a new Log4j.properties file in the project src directory, or there will be log4j warning prompt, as follows:

Log4j:warn No Appenders could is found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory). Log4j:warn Initialize the log4j system Properly.log4j:WARN see http://logging.apache.org/log4j/1.2/faq.html#noconfig for More info.

And it is not convenient to find the error message (very important), the Log4j.properties file contents are as follows:

Log4j.rootlogger=debug,stdout,r Log4j.appender.stdout=org.apache.log4j.consoleappender Log4j.appender.stdout.layout=org.apache.log4j.patternlayout log4j.appender.stdout.layout.conversionpattern=%5p- %m%n Log4j.appender.r=org.apache.log4j.rollingfileappender Log4j.appender.r.file=mapreduce_test.log LOG4J.APPENDER.R.MAXFILESIZE=1MB log4j.appender.r.maxbackupindex=1 log4j.appender.r.layout= Org.apache.log4j.PatternLayout log4j.appender.r.layout.conversionpattern=%p%t%c-%m%n Log4j.logger.com.codefutures=debug


4, after configuring the log4j, I will be prompted to say that there is no permission to write HDFs error, because in the Hadoop location where the username I default is administrator, and HDFs on my new directory permissions is root, So I use the chown command to change the directory and subdirectories have changed to administrator permissions, at this point can be normal operation WordCount.


This article is from the "Cabbage" blog, please be sure to keep this source http://dreamylights.blog.51cto.com/1163218/1591617

Win7+eclipse Configuring Hadoop development Environment Considerations

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.