[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Table of Contents

MapReduce Tutorial : Preparing the environment

To use the Hadoop Java API, you must be able to compile the Java sources with the Hadoop library. An easy way is to use a prepared Makefile:

  1. Create a directory for the Java sources.
  2. Create a Makefile containing
    Makefile
    include /net/projects/hadoop/java/Makefile

Compiling

When typing make, every Java file is compiled (with the Hadoop library and some extra classes) to a jar file. It is of course possible to compile just selected sources using:

make ClassName1.jar ClassName2.jar

or

make -f /net/projects/hadoop/java/Makefile ClassName1.jar

Command make clean remove for every Java file its jar file and subdirectory with compiled classes.

Exercise

Create a directory and a Makefile as described and download CompileTest.java. Try compiling it using make.

Using VIM

If you like using VIM, there is a special configuration available for editing Hadoop java files. Just execute

/net/projects/hadoop/bin/vim

instead of vim.

This configuration of VIM has following features:


Overview Step 22: Optional – Setting Eclipse.

1)
The make command can be customized by :set mp=“make file.jar”

[ Back to the navigation ] [ Back to the content ]