T
- target data model typepublic class FileListModelInputProvider<T> extends Object implements ModelInputProvider<T>
ModelInputProvider
using FileList
.Constructor and Description |
---|
FileListModelInputProvider(org.apache.hadoop.conf.Configuration conf,
FileList.Reader fileList,
Class<T> dataModelClass)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
next()
Returns true iff the next temporary file exists,
and then the
ModelInputProvider.open() method returns it. |
ModelInput<T> |
open()
Opens the current temporary file prepared by the
ModelInputProvider.next() method. |
public FileListModelInputProvider(org.apache.hadoop.conf.Configuration conf, FileList.Reader fileList, Class<T> dataModelClass)
conf
- the configurationfileList
- target file listdataModelClass
- target data model classIllegalArgumentException
- if some parameters were null
public boolean next() throws IOException
ModelInputProvider
ModelInputProvider.open()
method returns it.next
in interface ModelInputProvider<T>
true
if the next data model object exists, otherwise false
IOException
- if failed to prepare the next datapublic ModelInput<T> open() throws IOException
ModelInputProvider
ModelInputProvider.next()
method.
This operation can perform only once for each temporary file.open
in interface ModelInputProvider<T>
IOException
- if failed to open the filepublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.