org.apache.nutch.db
Class WebDBWriter.PageInstruction.UrlComparator

java.lang.Object
  extended byorg.apache.nutch.io.WritableComparator
      extended byorg.apache.nutch.db.WebDBWriter.PageInstruction.UrlComparator
All Implemented Interfaces:
Comparator
Enclosing class:
WebDBWriter.PageInstruction

public static class WebDBWriter.PageInstruction.UrlComparator
extends WritableComparator

Sorts the instruction first by url, then by opcode.


Constructor Summary
WebDBWriter.PageInstruction.UrlComparator()
           
 
Method Summary
 int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
          Optimized comparator.
 int compare(WritableComparable a, WritableComparable b)
          We need to sort by ordered URLs.
 
Methods inherited from class org.apache.nutch.io.WritableComparator
compare, compareBytes, define, get, getKeyClass, newKey, readFloat, readInt, readLong, readUnsignedShort
 
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

WebDBWriter.PageInstruction.UrlComparator

public WebDBWriter.PageInstruction.UrlComparator()
Method Detail

compare

public int compare(WritableComparable a,
                   WritableComparable b)
We need to sort by ordered URLs. First, we sort by URL, then by opcode.

Overrides:
compare in class WritableComparator

compare

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

Overrides:
compare in class WritableComparator


Copyright © 2006 The Apache Software Foundation