java.lang.Object org.supermind.crawl.util.MapFilePersister<java.lang.Long,org.apache.nutch.io.NullWritable> org.supermind.crawl.util.LongPersister
public class LongPersister
Saves Long values to a MapFile
.
Field Summary |
---|
Fields inherited from class org.supermind.crawl.util.MapFilePersister |
---|
baseDir, buffer, bufferIdx, LOG, mapdir, mapdirFile, maxBufferSize, nfs, overwrite, reader |
Constructor Summary | |
---|---|
LongPersister()
|
Method Summary | |
---|---|
void |
add(long value)
|
boolean |
contains(long value)
|
protected org.apache.nutch.io.WritableComparator |
getKeyComparator()
Get comparator for MapFile key class. |
org.apache.nutch.io.WritableComparable |
getKeyInstance(java.lang.Long aLong,
boolean throwaway)
Return a new instance of the key. |
java.util.Comparator<java.lang.Long> |
getTypeComparator()
Get comparator for type. |
Methods inherited from class org.supermind.crawl.util.MapFilePersister |
---|
add, close, flushToDisk, getValueInstance, init, setBaseDir, setMaxBufferSize, setNfs, setOverwrite |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LongPersister()
Method Detail |
---|
public void add(long value) throws java.io.IOException
java.io.IOException
public boolean contains(long value) throws java.io.IOException
java.io.IOException
protected org.apache.nutch.io.WritableComparator getKeyComparator()
MapFilePersister
getKeyComparator
in class MapFilePersister<java.lang.Long,org.apache.nutch.io.NullWritable>
public org.apache.nutch.io.WritableComparable getKeyInstance(java.lang.Long aLong, boolean throwaway)
MapFilePersister
getKeyInstance
in class MapFilePersister<java.lang.Long,org.apache.nutch.io.NullWritable>
public java.util.Comparator<java.lang.Long> getTypeComparator()
MapFilePersister
getTypeComparator
in class MapFilePersister<java.lang.Long,org.apache.nutch.io.NullWritable>