wiki:Hinet131022/Lab17

◢ <實作十六> | <回課程大綱> ▲ | <實作十八> ◣

實作十七 Lab17

將 WordCount 範例改成三個公開的類別
Inner Class v.s. Public Classes

請先連線至 nodeN.3du.me , N 為您的報名編號
  • 在前兩個範例中,我們可以發現 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 的內容,以下哪幾個陳述是正確的?(複選)

      (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
      (D) Only in ${HOME}/hadoop_labs/lab007/class/: WordCount.class

<問題 2> 請問執行任務時,同時有幾個 Mapper?

      (A) 0
      (B) 同 input 目錄檔案區塊個數

<問題 3> 請問執行任務時,同時有幾個 Reducer?

      (A) 0
      (B) 1
      (C) 2
      (D) 3

<問題 4> 請問執行任務時,同一個 Map Task 會有幾個 Task Attempt?

      (A) 0
      (B) 1 個(含)以上
Last modified 11 years ago Last modified on Oct 23, 2013, 2:24:55 PM