What are the differences between Sort Comparator and Group Comparator in Hadoop?

前端 未结 2 884
攒了一身酷
攒了一身酷 2020-12-14 21:09

What are the differences between Sort Comparator and Group Comparator in Hadoop?

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 21:42

    Group Comparator decides which map output keys will be united(grouped) into one key, and of course all collections of values will be grouped too. Usually it takes a first key as the only one for summary collection.

    SortComparator decides how keys will be sorted in input of reduce. By default it uses natural ordering.

提交回复
热议问题