earl
earl

Reputation: 768

Can a map side join have reducers?

I want to write a map-side join and want to include a reducer code as well. I have a smaller data set which I will send as distributed cache.

Can I write the map-side join with reducer code?

Upvotes: 0

Views: 163

Answers (1)

Aniruddha Sinha
Aniruddha Sinha

Reputation: 799

Yes!! Why not. Look, reducer is meant for aggregation of the key values emitted from the map. So you can always have a reducer in your code whenever you want to aggregate your result (say you want to count or find average or any numerical summarization) based on certain criteria that you've set in your code or in accordance with the problem statement. Map is just for filtering the data and emitting some useful key value pairs out of a LOT of data. Map side join is just needed when one of the dataset is small enough to fit the memory of the commodity machine. By the way reduce-side join serves your purpose too!!

Upvotes: 3

Related Questions