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 nullpublic boolean next()
throws IOException
ModelInputProviderModelInputProvider.open() method returns it.next in interface ModelInputProvider<T>true if the next data model object exists, otherwise falseIOException - if failed to prepare the next datapublic ModelInput<T> open() throws IOException
ModelInputProviderModelInputProvider.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 Closeableclose in interface AutoCloseableIOExceptionCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.