|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.utils.vectors.io.SequenceFileVectorWriter
public class SequenceFileVectorWriter
Writes out Vectors to a SequenceFile. Closes the writer when done
Constructor Summary | |
---|---|
SequenceFileVectorWriter(org.apache.hadoop.io.SequenceFile.Writer writer)
|
Method Summary | |
---|---|
void |
close()
|
org.apache.hadoop.io.SequenceFile.Writer |
getWriter()
|
long |
write(Iterable<Vector> iterable)
Write all values in the Iterable to the output |
long |
write(Iterable<Vector> iterable,
long maxDocs)
Write the first maxDocs to the output. |
void |
write(Vector vector)
Write out a vector |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequenceFileVectorWriter(org.apache.hadoop.io.SequenceFile.Writer writer)
Method Detail |
---|
public long write(Iterable<Vector> iterable, long maxDocs) throws IOException
VectorWriter
maxDocs
to the output.
write
in interface VectorWriter
iterable
- The Iterable
to loop overmaxDocs
- the maximum number of docs to write
IOException
- if there was a problem writingpublic void write(Vector vector) throws IOException
VectorWriter
write
in interface VectorWriter
vector
- The Vector
to write
IOException
public long write(Iterable<Vector> iterable) throws IOException
VectorWriter
write
in interface VectorWriter
iterable
- The Iterable
to loop over
IOException
- if there was a problem writingpublic void close() throws IOException
close
in interface Closeable
IOException
public org.apache.hadoop.io.SequenceFile.Writer getWriter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |