Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop >> mail # user >> What's the diff btw setOutputKeyComparatorClass and setOutputValueGroupingComparator?


Copy link to this message
-
What's the diff btw setOutputKeyComparatorClass and setOutputValueGroupingComparator?
I tried to use one or another for secondary sort -- both options work fine
-- I get combined sorted result in reduce() iterator

Also I noticed that if I set both of them at the same time
then KeyComparatorClass.compare(O1, O2) never called,  hadoop calls
only ValueGroupingComparator.compare()

I run my tests on single node instillation.

Please help me understand the diff btw these two comparators.
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB