T - value typepublic class SequenceFileModelInput<T extends org.apache.hadoop.io.Writable> extends Object implements ModelInput<T>
SequenceFile into ModelInput.
The key type of sequence file must be NullWritable.| Constructor and Description |
|---|
SequenceFileModelInput(org.apache.hadoop.io.SequenceFile.Reader reader)
Creates a new instance.
|
SequenceFileModelInput(org.apache.hadoop.io.SequenceFile.Reader reader,
Closeable closeable)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
readTo(T model)
Reads contents and write them into the target data model object.
|
public SequenceFileModelInput(org.apache.hadoop.io.SequenceFile.Reader reader)
reader - target readerIllegalArgumentException - if some parameters were nullpublic SequenceFileModelInput(org.apache.hadoop.io.SequenceFile.Reader reader,
Closeable closeable)
reader - target readercloseable - chained close target (nullable)IllegalArgumentException - if some parameters were nullpublic boolean readTo(T model) throws IOException
ModelInputreadTo in interface ModelInput<T extends org.apache.hadoop.io.Writable>model - the target data model objecttrue if the next data was successfully read, or false if there is no any moreIOException - if error occurred while reading the next datapublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.