Package org.apache.avro.mapred
Class FsInput
java.lang.Object
org.apache.avro.mapred.FsInput
- All Implemented Interfaces:
Closeable
,AutoCloseable
,SeekableInput
Adapt an
FSDataInputStream
to SeekableInput
.-
Constructor Summary
ConstructorDescriptionFsInput
(Path path, Configuration conf) Construct given a path and a configuration.FsInput
(Path path, FileSystem fileSystem) Construct given a path and aFileSystem
. -
Method Summary
-
Constructor Details
-
FsInput
Construct given a path and a configuration.- Throws:
IOException
-
FsInput
Construct given a path and aFileSystem
.- Throws:
IOException
-
-
Method Details
-
length
public long length()Description copied from interface:SeekableInput
Return the length of the file.- Specified by:
length
in interfaceSeekableInput
-
read
Description copied from interface:SeekableInput
Equivalent toInputStream.read(byte[],int,int)
.- Specified by:
read
in interfaceSeekableInput
- Throws:
IOException
-
seek
Description copied from interface:SeekableInput
Set the position for the nextread()
.- Specified by:
seek
in interfaceSeekableInput
- Throws:
IOException
-
tell
Description copied from interface:SeekableInput
Return the position of the nextread()
.- Specified by:
tell
in interfaceSeekableInput
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-