[ 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

Both sides previous revision Previous revision
courses:mapreduce-tutorial:making-your-job-configurable [2012/02/05 21:44]
straka
courses:mapreduce-tutorial:making-your-job-configurable [2012/02/05 21:45] (current)
straka
Line 6: Line 6:
     - 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, ...''​.     - 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, ...''​.
   * Perl: use environment variables:   * Perl: use environment variables:
-    - when constructing [[.:​perl-api#​hadooprunner|Hadoop::​Runner]],​ use ''​copy_environment => ['​VARIABLE1',​ '​VARIABLE2',​ ... ]''​.+    - when constructing [[.:​perl-api#​hadooprunner|Hadoop::​Runner]],​ use ''​copy_environment ​%%=>%% ['​VARIABLE1',​ '​VARIABLE2',​ ... ]''​.
     - run the job using ''​VARIABLE1=value1 VARIABLE2=value2 ... perl script.pl input output''​.     - run the job using ''​VARIABLE1=value1 VARIABLE2=value2 ... perl script.pl input output''​.
 +    - in the job, use ''​$ENV{VARIABLE1}''​ to access the value.

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