|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.nutch.io.SequenceFile.Sorter
Sorts key/value pairs in a sequence-format file.
For best performance, applications should make sure that the Writable.readFields(DataInput)
implementation of their keys is
very efficient. In particular, it should avoid allocating memory.
Constructor Summary | |
SequenceFile.Sorter(NutchFileSystem nfs,
Class keyClass,
Class valClass)
Sort and merge files containing the named classes. |
|
SequenceFile.Sorter(NutchFileSystem nfs,
WritableComparator comparator,
Class valClass)
Sort and merge using an arbitrary WritableComparator . |
Method Summary | |
int |
getFactor()
Get the number of streams to merge at once. |
int |
getMemory()
Get the total amount of buffer memory, in bytes. |
void |
merge(String[] inFiles,
String outFile)
Merge the provided files. |
void |
setFactor(int factor)
Set the number of streams to merge at once. |
void |
setMemory(int memory)
Set the total amount of buffer memory, in bytes. |
void |
sort(String inFile,
String outFile)
Perform a file sort. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SequenceFile.Sorter(NutchFileSystem nfs, Class keyClass, Class valClass)
public SequenceFile.Sorter(NutchFileSystem nfs, WritableComparator comparator, Class valClass)
WritableComparator
.
Method Detail |
public void setFactor(int factor)
public int getFactor()
public void setMemory(int memory)
public int getMemory()
public void sort(String inFile, String outFile) throws IOException
IOException
public void merge(String[] inFiles, String outFile) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |