com.datasalt.pangool.tuplemr.mapred
Class GroupComparator

java.lang.Object
  extended by com.datasalt.pangool.tuplemr.mapred.SortComparator
      extended by com.datasalt.pangool.tuplemr.mapred.GroupComparator
All Implemented Interfaces:
Comparator<ITuple>, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.RawComparator<ITuple>

public class GroupComparator
extends SortComparator

Tuple-based MapRed jobs binary group comparator. Used to group tuples according to TupleMRConfigBuilder.setGroupByFields(String...)


Field Summary
 
Fields inherited from class com.datasalt.pangool.tuplemr.mapred.SortComparator
conf, isMultipleSources, nulls, offsets, serializerComparator, serInfo, tupleMRConf
 
Constructor Summary
GroupComparator()
           
 
Method Summary
 int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
           
 int compare(ITuple w1, ITuple w2)
          Never called in MapRed jobs.
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class com.datasalt.pangool.tuplemr.mapred.SortComparator
compare, compare, compareMultipleSources, compareObjects, compareObjects, getConf, getConfig, nullCompare
 
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

GroupComparator

public GroupComparator()
Method Detail

compare

public int compare(ITuple w1,
                   ITuple w2)
Never called in MapRed jobs. Just for completion and test purposes

Specified by:
compare in interface Comparator<ITuple>
Overrides:
compare in class SortComparator

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<ITuple>
Overrides:
compare in class SortComparator

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable
Overrides:
setConf in class SortComparator


Copyright © –2014 Datasalt Systems S.L.. All rights reserved.