[ 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 Both sides next revision
courses:mapreduce-tutorial:making-your-job-configurable [2012/02/05 19:16]
straka vytvořeno
courses:mapreduce-tutorial:making-your-job-configurable [2012/02/05 21:40]
straka
Line 1: Line 1:
-====== MapReduce Tutorial : ======+====== MapReduce Tutorial : Making your job configurable ====== 
 + 
 +Sometimes it is desirable for a Hadoop job to be configurable without recompiling/rewriting the source. This can be achieved: 
 +  * both Perl and Java: use environment variables -- all environment variables are shared by the Hadoop job 
 +  * Java only: use [[.:step-9|Hadoop properties]]: 
 +    - when running the job, use ''/net/projects/hadoop/bin/hadoop job.jar -Dname1=value1 -Dname2=value2 ... input output'' 
 +    - in the job, use ''job.getConfiguration.get("name", default)'' to get the ''value'' as ''String'', or use one of ''getInt, getLong, getFloat, getRange, getFile, getStrings, ...'' 

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