wiki:waue/2012/0117

Version 3 (modified by waue, 13 years ago) (diff)

--

  • 資料夾
/tmp/ProductEmp/conf/store.txt 商品資訊檔
/tmp/ProductEmp/input/ 銷售紀錄資料夾
/tmp/ProductEmp/hdfs/ hadoop運算資料夾
/tmp/ProductEmp/out/ hadoop 輸出
/tmp/ProductEmp/result/db.js 最後結果檔

設定初始內容

  • /tmp/ProductEmp/conf/store.txt
    01 ; 微波爐 ; 3000
    02 ; 烤箱   ; 800
    03 ; 電暖氣 ; 1000
    04 ; 收音機 ; 300
    05 ; 冷氣機 ; 30000
    
  • /tmp/ProductEmp/input/0102.txt
    jazz:   01
    jazz:   02
    jazz:   02
    jazz:   03
    jazz:   05
    jazz:   01
    lia:    02
    lia:    03
    waue:   02
    shun:   02
    len:    02
    

運算後最後結果將會呈現

  • /tmp/ProductEmp/result/db.js
    var aDataSet = [
            ['01','微波爐','3000','2','6000'],
            ['02','烤箱','800','6','4800'],
            ['03','電暖氣','1000','3','3000'],
            ['04','收音機','300','0','0'],
            ['05','冷氣機','30000','1','30000']
    ];
    
    

Attachments (3)