wiki:waue/2011/0426_5

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

--

cp -rf Example/itri/ /tmp bin/hadoop dfs -put /tmp/itri/income/ income bin/hadoop jar ItriMenu?.jar Itri1LoadFile

#text
create new table: itri
Put data :"GunLong" to Table: itri's Detail:Name
Put data :"01" to Table: itri's Detail:Locate
Put data :"20" to Table: itri's Products:P1
Put data :"40" to Table: itri's Products:P2
Put data :"30" to Table: itri's Products:P3
Put data :"50" to Table: itri's Products:P4

Put data :"Esing" to Table: itri's Detail:Name
Put data :"02" to Table: itri's Detail:Locate
Put data :"50" to Table: itri's Products:P1

Put data :"SunDon" to Table: itri's Detail:Name
Put data :"03" to Table: itri's Detail:Locate
Put data :"40" to Table: itri's Products:P1
Put data :"30" to Table: itri's Products:P2

Put data :"StarBucks" to Table: itri's Detail:Name
Put data :"04" to Table: itri's Detail:Locate
Put data :"50" to Table: itri's Products:P1
Put data :"50" to Table: itri's Products:P2
Put data :"20" to Table: itri's Products:P3

bin/hadoop jar ItriMenu?.jar Itri2Count

11/04/25 12:15:04 INFO input.FileInputFormat: Total input paths to process : 2
11/04/25 12:15:04 INFO mapred.JobClient: Running job: job_201104250959_0004
11/04/25 12:15:05 INFO mapred.JobClient:  map 0% reduce 0%
11/04/25 12:15:12 INFO mapred.JobClient:  map 100% reduce 0%
11/04/25 12:15:21 INFO mapred.JobClient:  map 100% reduce 100%

bin/hadoop jar ItriMenu?.jar Itri3CalculateM

11/04/25 12:16:18 INFO mapred.JobClient:  map 0% reduce 0%
11/04/25 12:16:27 INFO mapred.JobClient:  map 100% reduce 0%
11/04/25 12:16:36 INFO mapred.JobClient:  map 100% reduce 100%

bin/hadoop jar ItriMenu?.jar Itri4SortTurnover

bin/hadoop jar ItriMenu?.jar Itri5ShowReport 120

SunDon 's turnover is 120 $.
GunLong 's turnover is 140 $.
StarBucks 's turnover is 170 $.