Package org.apache.hadoop.fs
Class AvroFSInput
java.lang.Object
org.apache.hadoop.fs.AvroFSInput
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.avro.file.SeekableInput
@Public
@Stable
public class AvroFSInput
extends Object
implements Closeable, org.apache.avro.file.SeekableInput
Adapts an
FSDataInputStream to Avro's SeekableInput interface.-
Constructor Summary
ConstructorsConstructorDescriptionAvroFSInput(FileContext fc, Path p) Construct given aFileContextand aPath.AvroFSInput(FSDataInputStream in, long len) Construct given anFSDataInputStreamand its length. -
Method Summary
-
Constructor Details
-
AvroFSInput
Construct given anFSDataInputStreamand its length.- Parameters:
in- inputstream.len- len.
-
AvroFSInput
Construct given aFileContextand aPath.- Parameters:
fc- filecontext.p- the path.- Throws:
IOException- If an I/O error occurred.
-
-
Method Details
-
length
public long length()- Specified by:
lengthin interfaceorg.apache.avro.file.SeekableInput
-
read
- Specified by:
readin interfaceorg.apache.avro.file.SeekableInput- Throws:
IOException
-
seek
- Specified by:
seekin interfaceorg.apache.avro.file.SeekableInput- Throws:
IOException
-
tell
- Specified by:
tellin interfaceorg.apache.avro.file.SeekableInput- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-