◢ <[wiki:III140705/Lab21 實作二十一]> | <[wiki:III140705 回課程大綱]> ▲ | <[wiki:III140705/Lab23 實作二十三] > ◣
= 實作二十二 Lab22 =
{{{
#!html
透過 MapReduce 的設定檔傳遞參數
Passing Arguments to Mapper and Reducer with Configuration
}}}
[[PageOutline]]
{{{
#!text
請先連線至 nodeN.3du.me , N 為您的報名編號
}}}
{{{
cd ~/hadoop_labs/lab013
ant
hadoop fs -put l13_input l13_input
hadoop jar WordCount.jar l13_input l13_output
hadoop fs -cat l13_output/part-r-00000
hadoop jar WordCount.jar -Dwordcount.case.sensitive=false l13_input l13_output2
hadoop fs -cat l13_output2/part-r-00000
}}}
* Reference:
* http://hadoop.apache.org/docs/r1.0.4/api/org/apache/hadoop/conf/Configuration.html
* org.apache.hadoop.conf.Configuration.setBoolean(String name, boolean value)
* org.apache.hadoop.conf.Configuration.getBoolean(String name, boolean defaultValue)
* [http://hadoop.apache.org/docs/r1.0.4/api/org/apache/hadoop/mapreduceMapper.html#setup%28org.apache.hadoop.mapreduce.Mapper.Context%29 org.apache.hadoop.mapreduce.Mapper.setup(Mapper.Context context)]
* [http://hadoop.apache.org/docs/r1.0.4/api/org/apache/hadoop/mapreduce/JobContext.html#getConfiguration%28%29 org.apache.hadoop.mapreduce.JobContext.getConfiguration()]
* http://www.cloudera.com/content/cloudera-content/cloudera-docs/HadoopTutorial/CDH4/Hadoop-Tutorial/ht_topic_7_1.html
== 實作習題 ==
<問題 1>