[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
courses:mapreduce-tutorial:step-21 [2012/01/26 23:28]
straka vytvořeno
courses:mapreduce-tutorial:step-21 [2012/01/26 23:45]
straka
Line 1: Line 1:
-====== MapReduce Tutorial :  ======+====== 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: 
 + 
 +  - Create a directory for the Java sources. 
 +  - Create a ''Makefile'' containing <file Makefile Makefile>include /net/projects/hadoop/java/Makefile</file> 
 + 
 +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 file1.jar file2.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 {{:courses:mapreduce-tutorial:step-21.txt|WordCount.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/vim 
 +instead of ''vim''
 + 
 +This configuration of VIM 
 +  * can run ''make'' in current directory by pressing F7 (both in normal and insert mode). The file being edited is automatically saved.

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