org.apache.nutch.io
Class SetFile.Writer

java.lang.Object
  extended byorg.apache.nutch.io.MapFile.Writer
      extended byorg.apache.nutch.io.SetFile.Writer
Enclosing class:
SetFile

public static class SetFile.Writer
extends MapFile.Writer

Write a new set file.


Constructor Summary
SetFile.Writer(NutchFileSystem nfs, String dirName, Class keyClass)
          Create the named set for keys of the named class.
SetFile.Writer(NutchFileSystem nfs, String dirName, WritableComparator comparator)
          Create the named set using the named key comparator.
 
Method Summary
 void append(WritableComparable key)
          Append a key to a set.
 
Methods inherited from class org.apache.nutch.io.MapFile.Writer
append, close, getIndexInterval, setIndexInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetFile.Writer

public SetFile.Writer(NutchFileSystem nfs,
                      String dirName,
                      Class keyClass)
               throws IOException
Create the named set for keys of the named class.


SetFile.Writer

public SetFile.Writer(NutchFileSystem nfs,
                      String dirName,
                      WritableComparator comparator)
               throws IOException
Create the named set using the named key comparator.

Method Detail

append

public void append(WritableComparable key)
            throws IOException
Append a key to a set. The key must be strictly greater than the previous key added to the set.

Throws:
IOException


Copyright © 2006 The Apache Software Foundation