Eclipse+maven Build Hadoop Local development environment

Source: Internet
Author: User

Our goal is to build a Hadoop development environment that can be used everywhere.

Create a MAVEN project

Create a MAVEN project, what type of project to introduce Hadoop dependencies to your own needs, in Pom.xml.

Introducing a Hadoop configuration file

Copy the Hadoop configuration file into the Src/main/resources file, only the useful on the line, Core-site.xml,hdfs-site.xml,mapred-site.xml,yarn-site.xml and so on.

Setting environment variables

The configuration files in the Hadoop configuration folder can be divided into two categories: XML (. properties), a type of. SH (. cmd), XML-typed files introduced by the top way, and. SH type files are mainly set environment variables, cannot be introduced, if you use the environment variable, Then this setting:
When you run the Main method, select Run configuration and set the required environment variables in environment.
There is an environment variable that must be set: Hadoop_user_name=hdfs
See the following links for reasons:
Http://www.linuxidc.com/Linux/2014-08/105335.htm

This way, when you get the congratulation object in the program, just use the following code:

ConfigurationnewConfiguration();

Eclipse+maven Build Hadoop Local development environment

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.