java.lang.Objectorg.supermind.crawl.util.MapFilePersister<org.apache.nutch.io.MD5Hash,org.apache.nutch.io.NullWritable>
org.supermind.crawl.util.MD5Persister
public class MD5Persister
Saves MD5Hash values to a MapFile
.
Field Summary |
---|
Fields inherited from class org.supermind.crawl.MapFilePersister |
---|
buffer, maxBufferSize, sorter, tmpWriter |
Constructor Summary | |
---|---|
MD5Persister()
|
Method Summary | |
---|---|
void |
add(org.apache.nutch.io.MD5Hash hash)
|
boolean |
contains(org.apache.nutch.io.MD5Hash hash)
|
protected org.apache.nutch.io.WritableComparator |
getKeyComparator()
Get comparator for MapFile key class. |
org.apache.nutch.io.WritableComparable |
getKeyInstance()
Return a new instance of the key. |
protected java.lang.Class<? extends org.apache.nutch.io.WritableComparable> |
getMapFileKeyClass()
Get key class. |
java.util.Comparator |
getTypeComparator()
Get comparator for type. |
void |
writeBufferToTmp()
Write contents of buffer to tmpfile. |
Methods inherited from class org.supermind.crawl.MapFilePersister |
---|
add, close, flushToDisk, getMapFileValueClass, getValueInstance, init, initTmpWriter, setMapdir, setNfs, setOverwrite, setTmpfile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MD5Persister()
Method Detail |
---|
public void add(org.apache.nutch.io.MD5Hash hash) throws java.io.IOException
java.io.IOException
public boolean contains(org.apache.nutch.io.MD5Hash hash) throws java.io.IOException
java.io.IOException
protected org.apache.nutch.io.WritableComparator getKeyComparator()
MapFilePersister
getKeyComparator
in class MapFilePersister<org.apache.nutch.io.MD5Hash,org.apache.nutch.io.NullWritable>
public org.apache.nutch.io.WritableComparable getKeyInstance()
MapFilePersister
getKeyInstance
in class MapFilePersister<org.apache.nutch.io.MD5Hash,org.apache.nutch.io.NullWritable>
protected java.lang.Class<? extends org.apache.nutch.io.WritableComparable> getMapFileKeyClass()
MapFilePersister
getMapFileKeyClass
in class MapFilePersister<org.apache.nutch.io.MD5Hash,org.apache.nutch.io.NullWritable>
public java.util.Comparator getTypeComparator()
MapFilePersister
getTypeComparator
in class MapFilePersister<org.apache.nutch.io.MD5Hash,org.apache.nutch.io.NullWritable>
public void writeBufferToTmp() throws java.io.IOException
MapFilePersister
MapFilePersister.tmpWriter
to do this.
writeBufferToTmp
in class MapFilePersister<org.apache.nutch.io.MD5Hash,org.apache.nutch.io.NullWritable>
java.io.IOException