Database Reference
In-Depth Information
Setting Up the Development Environment
The first step is to create a project so you can build MapReduce programs and run them in
local (standalone) mode from the command line or within your IDE. The Maven Project
Object Model (POM) in Example 6-3 shows the dependencies needed for building and test-
ing MapReduce programs.
Example 6-3. A Maven POM for building and testing a MapReduce application
<project>
<modelVersion> 4.0.0 </modelVersion>
<groupId> com.hadoopbook </groupId>
<artifactId> hadoop-book-mr-dev </artifactId>
<version> 4.0 </version>
<properties>
<project.build.sourceEncoding> UTF-8 </project.build.sourceEncoding>
<hadoop.version> 2.5.1 </hadoop.version>
</properties>
<dependencies>
<!-- Hadoop main client artifact -->
<dependency>
<groupId> org.apache.hadoop </groupId>
<artifactId> hadoop-client </artifactId>
<version> ${hadoop.version} </version>
</dependency>
<!-- Unit test artifacts -->
<dependency>
<groupId> junit </groupId>
<artifactId> junit </artifactId>
<version> 4.11 </version>
<scope> test </scope>
</dependency>
<dependency>
<groupId> org.apache.mrunit </groupId>
<artifactId> mrunit </artifactId>
<version> 1.1.0 </version>
<classifier> hadoop2 </classifier>
<scope> test </scope>
</dependency>
<!-- Hadoop test artifact for running mini clusters -->
<dependency>
<groupId> org.apache.hadoop </groupId>
<artifactId> hadoop-minicluster </artifactId>
<version> ${hadoop.version} </version>
<scope> test </scope>
</dependency>
Search WWH ::




Custom Search