◢ <[wiki:NTUOSS160412/Lab6 實作六]> | <[wiki:NTUOSS160412 回課程大綱]> ▲ | <[wiki:NTUOSS160412/HW1 作業]> ◣ = 實作七 Lab7 = {{{ #!html
編譯 WordCount 範例
}}} [[PageOutline]] * 在 lab007 與 lab008 範例程式中,我們可以發現 WordCount 範例程式都是以所謂的 Inner Class 語法撰寫而成,那是否可以改寫成多個 Public Class 呢?答案是可以的! {{{ cd ~/hadoop_labs/lab009 ant hadoop fs -rmr input output hadoop fs -put ~/hadoop/conf input hadoop jar WordCount.jar input output hadoop fs -ls output hadoop fs -cat output/part-r-00000 }}} == 實作習題 == <問題 1> 請比較 ${HOME}/hadoop_labs/lab007/class 與 ${HOME}/hadoop_labs/lab009/class 的內容,以下哪幾個陳述是正確的?(複選) <提示> {{{ diff ${HOME}/hadoop_labs/lab007/class ${HOME}/hadoop_labs/lab009/class }}} {{{ #!text (A) Only in ${HOME}/hadoop_labs/lab009/class/: IntSumReducer.class (B) Only in ${HOME}/hadoop_labs/lab009/class/: TokenizerMapper.class (C) Only in ${HOME}/hadoop_labs/lab007/class/: WordCount$IntSumReducer.class (D) Only in ${HOME}/hadoop_labs/lab007/class/: WordCount$TokenizerMapper.class (E) Only in ${HOME}/hadoop_labs/lab007/class/: WordCount.class }}} <問題 2> 請問執行任務時,同時有幾個 Mapper? {{{ #!text (A) 0 (B) 同 input 目錄檔案區塊個數 }}} <問題 3> 請問執行任務時,同時有幾個 Reducer? {{{ #!text (A) 0 (B) 1 (C) 2 (D) 3 }}} <問題 4> 請問執行任務時,同一個 Map Task 會有幾個 Task Attempt? {{{ #!text (A) 0 (B) 1 個(含)以上 }}}