org.apache.nutch.db
Class EditSectionWriter

java.lang.Object
  extended byorg.apache.nutch.db.EditSectionWriter

public class EditSectionWriter
extends Object

EditSectionWriter writes a discrete portion of a WebDB. The WebDBWriter class may instantiate many EditSectionWriter objects to do its work (and always instantiates at least one).

Author:
Mike Cafarella

Field Summary
static String EDITS_PREFIX
           
static String WRITE_METAINFO_PREFIX
           
 
Constructor Summary
EditSectionWriter(NutchFileSystem nfs, String label, int targetNum, int writerNum, Class keyClass, Class valClass)
          Make a EditSectionWriter for the appropriate file.
 
Method Summary
 void append(WritableComparable key, Writable val)
          Add a key/val pair
 void close()
          Close down the EditSectionWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WRITE_METAINFO_PREFIX

public static final String WRITE_METAINFO_PREFIX
See Also:
Constant Field Values

EDITS_PREFIX

public static final String EDITS_PREFIX
See Also:
Constant Field Values
Constructor Detail

EditSectionWriter

public EditSectionWriter(NutchFileSystem nfs,
                         String label,
                         int targetNum,
                         int writerNum,
                         Class keyClass,
                         Class valClass)
                  throws IOException
Make a EditSectionWriter for the appropriate file.

Method Detail

append

public void append(WritableComparable key,
                   Writable val)
            throws IOException
Add a key/val pair

Throws:
IOException

close

public void close()
           throws IOException
Close down the EditSectionWriter. Afterwards, write down the completion file (including the number of edits inside).

Throws:
IOException


Copyright © 2006 The Apache Software Foundation