org.apache.avro.hadoop.io
Class AvroKeyComparator<T>

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.avro.hadoop.io.AvroKeyComparator<T>
All Implemented Interfaces:
Comparator<AvroKey<T>>, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.RawComparator<AvroKey<T>>

public class AvroKeyComparator<T>
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.io.RawComparator<AvroKey<T>>

The RawComparator used by jobs configured with AvroJob.

Compares AvroKeys output from the map phase for sorting.


Constructor Summary
AvroKeyComparator()
           
 
Method Summary
 int compare(AvroKey<T> x, AvroKey<T> y)
          
 int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
          
 void setConf(org.apache.hadoop.conf.Configuration conf)
          
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

AvroKeyComparator

public AvroKeyComparator()
Method Detail

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)

Specified by:
setConf in interface org.apache.hadoop.conf.Configurable
Overrides:
setConf in class org.apache.hadoop.conf.Configured

compare

public int compare(byte[] b1,
                   int s1,
                   int l1,
                   byte[] b2,
                   int s2,
                   int l2)

Specified by:
compare in interface org.apache.hadoop.io.RawComparator<AvroKey<T>>

compare

public int compare(AvroKey<T> x,
                   AvroKey<T> y)

Specified by:
compare in interface Comparator<AvroKey<T>>


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.