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 Threaded View
MapReduce >> mail # user >> WritableComparable.compareTo vs RawComparator.compareTo


Copy link to this message
-
Re: WritableComparable.compareTo vs RawComparator.compareTo
Also, if both are defined , the framework will use RawComparator . I hope
you have registered the comparator in a static block as follows

static
{
WritableComparator.define(PairOfInts.class, new Comparator());
}

Regards
Ravi Magham
On Sat, Aug 31, 2013 at 1:23 PM, Ravi Kiran <[EMAIL PROTECTED]>wrote:

> Hi Adeel,
>
>     The RawComparator is the fastest between the two as you avoid the need
> to convert the byte stream to Writable objects for comparison .
>
> Regards
> Ravi Magham
>
>
> On Fri, Aug 30, 2013 at 11:16 PM, Adeel Qureshi <[EMAIL PROTECTED]>wrote:
>
>> For secondary sort I am implementing a RawComparator and providing that
>> as sortComparator .. is that the faster way or using a WritableComparable
>> as mapper output and defining a compareTo method on the key itself
>>
>> also what happens if both are defined, is one ignored
>>
>
>
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