T
- the type of target data modelpublic abstract class HadoopFileFormat<T> extends org.apache.hadoop.conf.Configured implements FragmentableDataFormat<T>
InputStream
/ OutputStream
.
This implementation class must have a public constructor without any parameters.Constructor and Description |
---|
HadoopFileFormat()
Creates a new instance without configuration.
|
HadoopFileFormat(org.apache.hadoop.conf.Configuration conf)
Creates a new instance with configuration.
|
Modifier and Type | Method and Description |
---|---|
ModelInput<T> |
createInput(Class<? extends T> dataType,
org.apache.hadoop.fs.FileSystem fileSystem,
org.apache.hadoop.fs.Path path,
Counter counter)
Creates a new
ModelInput for the specified properties. |
abstract ModelInput<T> |
createInput(Class<? extends T> dataType,
org.apache.hadoop.fs.FileSystem fileSystem,
org.apache.hadoop.fs.Path path,
long offset,
long fragmentSize,
Counter counter)
Creates a new
ModelInput for the specified properties. |
abstract ModelOutput<T> |
createOutput(Class<? extends T> dataType,
org.apache.hadoop.fs.FileSystem fileSystem,
org.apache.hadoop.fs.Path path,
Counter counter)
Creates a new
ModelOutput for the specified properties. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMinimumFragmentSize, getPreferredFragmentSize
getSupportedType
public HadoopFileFormat()
public HadoopFileFormat(org.apache.hadoop.conf.Configuration conf)
conf
- configurationpublic ModelInput<T> createInput(Class<? extends T> dataType, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path path, Counter counter) throws IOException, InterruptedException
ModelInput
for the specified properties.dataType
- the target data typefileSystem
- the file system to open the target pathpath
- the path to the target filecounter
- the current counterIOException
- if failed to create readerInterruptedException
- if interruptedIllegalArgumentException
- if this does not support target property sequence,
or any parameter is null
public abstract ModelInput<T> createInput(Class<? extends T> dataType, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path path, long offset, long fragmentSize, Counter counter) throws IOException, InterruptedException
ModelInput
for the specified properties.dataType
- the target data typefileSystem
- the file system to open the target pathpath
- the path to the target fileoffset
- starting stream offsetfragmentSize
- suggested fragment bytes count, or -1
as infinitecounter
- the current counterIOException
- if failed to create readerInterruptedException
- if interruptedIllegalArgumentException
- if this does not support target property sequence,
or any parameter is null
public abstract ModelOutput<T> createOutput(Class<? extends T> dataType, org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path path, Counter counter) throws IOException, InterruptedException
ModelOutput
for the specified properties.dataType
- the target data typefileSystem
- the file system to open the target pathpath
- the path to the target filecounter
- the current counterIOException
- if failed to create writerInterruptedException
- if interruptedIllegalArgumentException
- if this does not support property sequence,
or any parameter is null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.