net.nutch.db
Class WebDBWriter.PageInstruction.UrlComparator

java.lang.Object
  extended bynet.nutch.io.WritableComparator
      extended bynet.nutch.db.WebDBWriter.PageInstruction.UrlComparator
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 net.nutch.io.WritableComparator
compareBytes, getKeyClass, newKey, readFloat, readInt, readLong, readUnsignedShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 © 2004 The Nutch Organization.