wiki:NCTU110329
平行環境與程式設計
Parallel Environment and Programming

課程資訊 Course Info.

  • 上課時間: 2011/3/29 (二) ~ 2011/4/26 (二) 13:30 ~ 16:20
  • Date and Time: 13:30 to 16:20, from 29 March 2011 to 26 April. 2011, every Tuesday
  • 上課地點: 交通大學 工程三館 EC315 電腦教室 / EC305 電腦教室
  • Location: EC315, Natioanl Chiao-Tung University

課程大綱 Course Outline

時段
Date
分類
Section
課程內容 Topics 投影片
Slides
實作
Hands-On
補充資料
Notes
3/29 Introduction - 雲端運算的緣起、趨勢與定義
- Introduction to Cloud Computing Technologies
part-1 實作一
3/29 Introduction - 雲端運算核心技術一:運用虛擬化技術打造 IaaS
- Introduction to Virtualization
part-2 實作二
4/12 Hands-On - 雲端運算核心技術二:運用資料探勘技術打造 PaaS
- Introduction to Hadoop
- Introduction to HDFS
part-3 實作三
實作四
4/19 Hands-On - 雲端運算核心技術二:運用資料探勘技術打造 PaaS
- Introduction to MapReduce
- MapReduce 程式架構簡介與編譯練習
- MapReduce Programming 101
part-3
part-4
實作五
實作六
使用 Eclipse 開發 Hadoop 程式
4/26 Hands-On - Hadoop 相關專案簡介
- Introduction to Hadoop Ecosystem
- 大型網站架構與 HBase 分散式資料庫
- Large Scale Website and HBase distributed datastore
- Pig 簡介
- Introduction to Pig
- 雲端運算核心技術三:運用網頁技術打造 SaaS - 抓抓龍簡介
- Introduction to Crawlzilla
part-5
part-6
part-7
實作七
實作八

補充資料

Screen

  • 在網路不穩定的環境下,為了保持 SSH 連線的畫面,常常會使用 screen 來作為長時間登入伺服器的工具。使用 screen 後,就可以在 ssh client 不正常關閉或網路斷線後,仍可以接回原本的畫面。
  • screenrc 範例
    • [備註] 拿掉時鐘的部份,以免造成往上捲動會不斷被拉回的困擾。
      $ cat > .screenrc <<EOF
      caption always "%{= wk} %{= KY} [%n]%t @ %H %{-} %= %{= KR} %l %{-} | %{= KG} %Y-%m-%d %{-} "
      hardstatus alwayslastline " %-Lw%{= Bw}%n%f %t%{-}%+Lw %=|"
      EOF
      
    • 快速鍵
      • CTRL + a + 0 ~ 9 – 從第一個視窗切換到第九個視窗
      • CTRL + a + n – 切換到下一個(還存在)的視窗
      • CTRL + a + Backspace – Switches to the previous available
      • CTRL + a + a – 切換到跟最後一次切換的視窗
      • CTRL + a + A – 切換視窗"抬頭"
      • CTRL + a + K – 關閉目前視窗
      • CTRL + a + c – 開啟一個新的視窗
      • CTRL + a + [ - 進入 copy mode,方便上下捲動歷史紀錄(因為常用的 SHIFT + PgUp / PgDn 會失效)
      • CTRL + a + ESC - 進入 copy mode,方便上下捲動歷史紀錄(因為常用的 SHIFT + PgUp / PgDn 會失效)
      • Ctrl + a + S - 分割視窗
      • Ctrl + a + Tab - 在視窗中移動
      • Ctrl + a + Q - 取消分割

作業 Homework

  • 題目:請嘗試將 實作六 的 WordCount2.java 改成逆向索引(Reverse Index) ReverseIndex.java。使 ReverseIndex 執行之結果為「"關鍵字"\t"檔案名稱(用逗點隔開)"」型態。以實作六最後的執行方法,忽略句點(\.)與逗點(\,),並且忽略大小寫(case.sensitive=false),
  • Please try to modified WordCount2.java downloaded from Lab6. Rename it to ReverseIndex.java. Let ReverseIndex output as "Keyword <TAB> filename(separated by comma)". Try to run it by ignoring "\." and "\," pattern and case-insensitive.
  • 參考步驟:
    Here is the reference steps:
    $ wget http://hadoop.nchc.org.tw/WordCount2.java -O ReverseIndex.java
    $ vi ReverseIndex.java #### DO YOUR MODIFICATION - 修改對應的程式碼
    $ mkdir -p MyJava3
    $ javac -classpath hadoop-core.jar -d MyJava3 ReverseIndex.java
    $ jar -cvf reverseindex.jar -C MyJava3 .
    $ hadoop jar reverseindex.jar ReverseIndex -Dwordcount.case.sensitive=false lab6_input lab6_out4 -skip pattern.txt
    $ hadoop fs -cat lab6_out4/part-00000
    
  • 參考結果應該為:(路徑不限)
    The reference result should be as following:(no limitation for the format of "path")
    and     input2
    cloud   input1,input2
    course  input1,input2,input2
    enjoy   input2
    i       input1,input2
    like    input1,input2
    nctu    input1,input2
    this    input2
    we      input2
    
  • 繳交期限:2011年5月3日(二) 上午 11:59
  • Due date: 11:59 AM, Tuesday, May 3th, Year 2011
  • 繳交方式:將原始碼與報告以附件方式寄至 jazz _AT_ nchc _DOT_ org _DOT_ tw (1) 程式原始碼一份:以 ${學號}.zip 方式壓縮與命名 (2) 報告一份:以 ${學號} 命名。
  • Please e-mail the java source code and report (doc or PDF) to jazz _AT_ nchc _DOT_ org _DOT_ tw
  • 提示:
    Hint:
    • 請將 Mapper 輸出、Reducer 輸入輸出的 (Key,Value) 由原本的 (Text, IntWritable) 改成 (Text, Text)
    • Replace (Key,Value) pair from (Text, IntWritable) to (Text, Text)
  • 加分題:(Extra)
    • 試將出現次數統計加入結果,亦即參考結果如下:
      Try to add count of each file in the result, i.e. The reference result should be as following:
      and     input2(1)
      cloud   input1(1),input2(1)
      course  input1(1),input2(2)
      enjoy   input2(1)
      i       input1(1),input2(1)
      like    input1(1),input2(1)
      nctu    input1(1),input2(1)
      this    input2(1)
      we      input2(1)
      
  • 配分比例:
    • 標準題原始碼 Source Code:60%
    • 報告 Report :20%
      • 參考內容入下:Reference Items should be shown in your report
      • 封面 Cover : 姓名、學號 ( Your Name and ID )
      • 於 hadoop.nchc.org.tw 執行的擷圖(Screenshot of your program running on hadoop.nchc.org.tw)
      • 執行結果 The result of your program
    • 加分題:20%
Last modified 13 years ago Last modified on May 9, 2011, 9:00:30 AM

Attachments (7)