开发者

Combine MapReduce result with data

开发者 https://www.devze.com 2023-03-14 18:46 出处:网络
How could i combine with map/reduce these two files: File1. Data. 开发者_StackOverflow1name:foo1,position:bar1

How could i combine with map/reduce these two files:

File1. Data.

开发者_StackOverflow1   name:foo1,position:bar1
2   name:foo2,position:bar2
3   name:foo3,position:bar3
4   name:foo4,position:bar4
5   name:foo5,position:bar5

File2. MR computed result.

1   1,2
3   3,4,5

The goal is:

1   foo1,foo2
3   foo3,foo4,foo5


This looks like a join, which is definitely doable but a bit of a pain in straight map reduce. Have you taken a look at higher level languages like Pig or Hive to simplify this task?

0

精彩评论

暂无评论...
验证码 换一张
取 消