java.lang.Object org.supermind.crawl.util.MapFilePersister<java.lang.Long,java.lang.Long> org.supermind.crawl.util.LongLongPersister
public class LongLongPersister
Field Summary |
---|
Fields inherited from class org.supermind.crawl.MapFilePersister |
---|
buffer, maxBufferSize, sorter, tmpWriter |
Constructor Summary | |
---|---|
LongLongPersister()
|
Method Summary | |
---|---|
boolean |
contains(long key)
|
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.lang.Class |
getMapFileValueClass()
Get value class. |
java.util.Comparator<java.lang.Long> |
getTypeComparator()
Get comparator for type. |
long |
getValue(long key)
Get value for key. |
org.apache.nutch.io.Writable |
getValueInstance()
Return a new instance of the value. |
protected void |
writeBufferToTmp()
Write contents of buffer to tmpfile. |
Methods inherited from class org.supermind.crawl.MapFilePersister |
---|
add, close, flushToDisk, 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 LongLongPersister()
Method Detail |
---|
public boolean contains(long key) throws java.io.IOException
java.io.IOException
protected org.apache.nutch.io.WritableComparator getKeyComparator()
MapFilePersister
getKeyComparator
in class MapFilePersister<java.lang.Long,java.lang.Long>
public org.apache.nutch.io.WritableComparable getKeyInstance()
MapFilePersister
getKeyInstance
in class MapFilePersister<java.lang.Long,java.lang.Long>
protected java.lang.Class<? extends org.apache.nutch.io.WritableComparable> getMapFileKeyClass()
MapFilePersister
getMapFileKeyClass
in class MapFilePersister<java.lang.Long,java.lang.Long>
public java.lang.Class getMapFileValueClass()
MapFilePersister
NullWritable
.
getMapFileValueClass
in class MapFilePersister<java.lang.Long,java.lang.Long>
public java.util.Comparator<java.lang.Long> getTypeComparator()
MapFilePersister
getTypeComparator
in class MapFilePersister<java.lang.Long,java.lang.Long>
public long getValue(long key) throws java.io.IOException
key
-
java.io.IOException
public org.apache.nutch.io.Writable getValueInstance()
MapFilePersister
NullWritable.get()
.
getValueInstance
in class MapFilePersister<java.lang.Long,java.lang.Long>
protected void writeBufferToTmp() throws java.io.IOException
MapFilePersister
MapFilePersister.tmpWriter
to do this.
writeBufferToTmp
in class MapFilePersister<java.lang.Long,java.lang.Long>
java.io.IOException