T
- the data model typepublic class SequenceFileModelOutput<T> extends Object implements ModelOutput<T>
ModelOutput
using SequenceFile
.Constructor and Description |
---|
SequenceFileModelOutput(org.apache.hadoop.io.SequenceFile.Writer writer)
Creates a new instance.
|
SequenceFileModelOutput(org.apache.hadoop.io.SequenceFile.Writer writer,
Closeable closeable)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(T model)
Writes the contents of the data model object.
|
public SequenceFileModelOutput(org.apache.hadoop.io.SequenceFile.Writer writer)
writer
- the target writerIllegalArgumentException
- if the parameter is null
public SequenceFileModelOutput(org.apache.hadoop.io.SequenceFile.Writer writer, Closeable closeable)
writer
- target writercloseable
- close target when close()
is invokedIllegalArgumentException
- if some parameters were null
public void write(T model) throws IOException
ModelOutput
write
in interface ModelOutput<T>
model
- the target data model objectIOException
- if error occurred while writing the data model objectpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.