Changes between Initial Version and Version 1 of Hinet131022/Lab21


Ignore:
Timestamp:
Oct 22, 2013, 4:58:47 PM (11 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Hinet131022/Lab21

    v1 v1  
     1◢ <[wiki:Hinet131022/Lab20 實作二十]> | <[wiki:Hinet131022 回課程大綱]> ▲ | <[wiki:Hinet131022/Lab22 實作二十二] > ◣
     2
     3= 實作二十一 Lab21 =
     4
     5{{{
     6#!html
     7<p style="text-align: center;"><big style="font-weight: bold;"><big> 修改檔案輸入格式<br/> KeyValueTextInputFormat </big></big></p>
     8}}}
     9
     10[[PageOutline]]
     11
     12{{{
     13#!text
     14請先連線至 nodeN.3du.me , N 為您的報名編號
     15}}}
     16
     17{{{
     18cd ~/hadoop_labs/lab012
     19ant
     20mkdir -p kv_input
     21printf "A\t1\n" >  kv_input/input1
     22printf "B\t2\n" >> kv_input/input1
     23printf "C\t3\n" >> kv_input/input1
     24printf "A\t1\n" >  kv_input/input2
     25printf "C\t2\n" >> kv_input/input2
     26printf "B\t1\n" >> kv_input/input2
     27hadoop fs -put kv_input kv_input
     28hadoop jar WordCount.jar kv_input kv_output
     29hadoop fs -ls kv_output
     30hadoop fs -cat kv_output/part-*
     31
     32export HADOOP_CONF_DIR=~/hadoop/conf.local/
     33hadoop jar WordCount.jar kv_input kv_output
     34ls -al kv_output
     35cat kv_output/part-*
     36unset HADOOP_CONF_DIR
     37}}}
     38
     39== 實作習題 ==
     40
     41 <問題 1>