public class SequenceFileVectorWriter extends Object implements VectorWriter
Constructor and Description |
---|
SequenceFileVectorWriter(org.apache.hadoop.io.SequenceFile.Writer writer) |
Modifier and Type | Method and Description |
---|---|
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
|
public SequenceFileVectorWriter(org.apache.hadoop.io.SequenceFile.Writer writer)
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 writeIOException
- if there was a problem writingpublic void write(Vector vector) throws IOException
VectorWriter
write
in interface VectorWriter
vector
- The Vector
to writeIOException
public long write(Iterable<Vector> iterable) throws IOException
VectorWriter
write
in interface VectorWriter
iterable
- The Iterable
to loop overIOException
- if there was a problem writingpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public org.apache.hadoop.io.SequenceFile.Writer getWriter()
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.