MapReduce (secondary) sorting / filtering - how?

后端 未结 3 1886
忘了有多久
忘了有多久 2021-02-06 19:43

I have a logfile of timestamped values (concurrent users) of different \"zones\" of a chatroom webapp in the format \"Timestamp; Zone; Value\". For each zone exists one value pe

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-06 20:20

    Secondary sort in Map reduce is solved with composite key pattern, therefor you create key like (ZoneId, TImeStamp) and in reducer you will firstly iterate over time zone, and then over timestamps so you can easily evaluate per day maximum.

提交回复
热议问题