Changes between Version 2 and Version 3 of III110813/Lab8


Ignore:
Timestamp:
Oct 21, 2011, 2:52:48 PM (13 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • III110813/Lab8

    v2 v3  
    1212 * 上傳內容到 HDFS 內[[BR]]upload data to HDFS
    1313{{{
    14 $ mkdir lab6_input
    15 $ echo "I like NCTU Cloud Course." > lab6_input/input1
    16 $ echo "I like nctu Cloud Course, and we enjoy this course." > lab6_input/input2
    17 $ hadoop fs -put lab6_input lab6_input
    18 $ hadoop fs -ls lab6_input
     14$ mkdir lab8_input
     15$ echo "I like NCTU Cloud Course." > lab8_input/input1
     16$ echo "I like nctu Cloud Course, and we enjoy this course." > lab8_input/input2
     17$ hadoop fs -put lab8_input lab8_input
     18$ hadoop fs -ls lab8_input
    1919Found 2 items
    20 -rw-r--r--   2 hXXXX supergroup         26 2011-04-19 10:07 /user/hXXXX/lab6_input/input1
    21 -rw-r--r--   2 hXXXX supergroup         52 2011-04-19 10:07 /user/hXXXX/lab6_input/input2
     20-rw-r--r--   2 hXXXX supergroup         26 2011-04-19 10:07 /user/hXXXX/lab8_input/input1
     21-rw-r--r--   2 hXXXX supergroup         52 2011-04-19 10:07 /user/hXXXX/lab8_input/input2
    2222}}}
    2323
     
    3434$ javac -classpath hadoop-core.jar -d MyJava WordCount.java
    3535$ jar -cvf wordcount.jar -C MyJava .
    36 $ hadoop jar wordcount.jar WordCount lab6_input/ lab6_out1/
    37 $ hadoop fs -cat lab6_out1/part-00000
     36$ hadoop jar wordcount.jar WordCount lab8_input/ lab8_out1/
     37$ hadoop fs -cat lab8_out1/part-00000
    3838}}}
    3939
    40  * lab6_out1 執行結果 [[BR]]You should see results like this :
     40 * lab8_out1 執行結果 [[BR]]You should see results like this :
    4141{{{
    4242#!text
     
    7373$ javac -classpath hadoop-core.jar -d MyJava2 WordCount2.java
    7474$ jar -cvf wordcount2.jar -C MyJava2 .
    75 $ hadoop jar wordcount2.jar WordCount2 lab6_input lab6_out2 -skip pattern.txt
    76 $ hadoop fs -cat lab6_out2/part-00000
     75$ hadoop jar wordcount2.jar WordCount2 lab8_input lab8_out2 -skip pattern.txt
     76$ hadoop fs -cat lab8_out2/part-00000
    7777}}}
    7878
    79  * lab6_out2 執行結果[[BR]]You should see results like this:
     79 * lab8_out2 執行結果[[BR]]You should see results like this:
    8080{{{
    8181#!text
     
    9595 * Let's given case insensitive and ignore pattern for this example
    9696{{{
    97 $ hadoop jar wordcount2.jar WordCount2 -Dwordcount.case.sensitive=false lab6_input lab6_out3 -skip pattern.txt
    98 $ hadoop fs -cat lab6_out3/part-00000
     97$ hadoop jar wordcount2.jar WordCount2 -Dwordcount.case.sensitive=false lab8_input lab8_out3 -skip pattern.txt
     98$ hadoop fs -cat lab8_out3/part-00000
    9999}}}
    100100
    101  * lab6_out3 執行結果[[BR]]You should see results like this:
     101 * lab8_out3 執行結果[[BR]]You should see results like this:
    102102{{{
    103103#!text