hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Yang <lin.yang.ja...@gmail.com>
Subject How to output according to the key in reducer?
Date Mon, 17 Sep 2012 07:16:57 GMT
Hi, all

I was wondering how to write all the input with the same key to a single
file in the reducer ?

say, I got some intermediate outputs from mappers like that:
key     value
--------------------
1   annie
2   Jason
1   andy
2   Joey
1   andrew
...

and I would like write all the intermediate outputs with key 1 to file
"ID_1.dat", and all the intermediate outputs with key 2 to file "ID_2.data".

how could I achieve that?

-- 
YANG, Lin

Mime
View raw message