T
- the data model typepublic class OrcFileInput<T> extends Object implements ModelInput<T>
ModelInput
for reading ORCFile.Constructor and Description |
---|
OrcFileInput(DataModelDescriptor descriptor,
DataModelMapping configuration,
org.apache.hadoop.fs.FileSystem fileSystem,
org.apache.hadoop.fs.Path path,
long offset,
long fragmentSize,
Counter counter)
Creates a new instance.
|
OrcFileInput(DataModelDescriptor descriptor,
org.apache.hadoop.fs.FileSystem fileSystem,
org.apache.hadoop.fs.Path path,
long offset,
long fragmentSize,
Counter counter)
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 OrcFileInput(DataModelDescriptor descriptor, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path path, long offset, long fragmentSize, Counter counter)
descriptor
- the target data model descriptorfileSystem
- the file system to open the target pathpath
- the path to the target fileoffset
- starting stream offsetfragmentSize
- suggested fragment bytes countcounter
- the current counterpublic OrcFileInput(DataModelDescriptor descriptor, DataModelMapping configuration, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path path, long offset, long fragmentSize, Counter counter)
descriptor
- the target data model descriptorconfiguration
- the DataModelDriver
configurationfileSystem
- the file system to open the target pathpath
- the path to the target fileoffset
- starting stream offsetfragmentSize
- suggested fragment bytes countcounter
- the current counterpublic boolean readTo(T model) throws IOException
ModelInput
readTo
in interface ModelInput<T>
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 Closeable
close
in interface AutoCloseable
IOException
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.