org.apache.nutch.db
Class EditSectionGroupReader

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

public class EditSectionGroupReader
extends Object

The EditSectionGroupReader will read in an edits-file that was built in a distributed way. It acts as a "meta-SequenceFile", incorporating knowledge of Section numbering as well as process-synchronization. If you had different ideas about how to make the db-edits distributed (apart from using NFS), you'd implement them here.

Author:
Mike Cafarella

Constructor Summary
EditSectionGroupReader(NutchFileSystem nfs, String label, int readerNum, int totalMachines)
          Open the EditSectionGroupReader for the appropriate file.
 
Method Summary
 void delete()
          Get rid of the edits encapsulated by this file.
 void mergeSectionComponents(File mergedEditsFile)
          Merge all the components of the Section into a single file and return the location.
 int numEdits()
          Return how many edits there are in this section.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditSectionGroupReader

public EditSectionGroupReader(NutchFileSystem nfs,
                              String label,
                              int readerNum,
                              int totalMachines)
Open the EditSectionGroupReader for the appropriate file.

Method Detail

numEdits

public int numEdits()
             throws IOException
Return how many edits there are in this section. This method requires total section-completion before executing.

Throws:
IOException

mergeSectionComponents

public void mergeSectionComponents(File mergedEditsFile)
                            throws IOException
Merge all the components of the Section into a single file and return the location. This method requires total section- completion before executing.

Throws:
IOException

delete

public void delete()
            throws IOException
Get rid of the edits encapsulated by this file.

Throws:
IOException


Copyright © 2006 The Apache Software Foundation