public class AlluxioHdfsPositionReader extends Object implements PositionReader
Constructor and Description |
---|
AlluxioHdfsPositionReader(org.apache.hadoop.fs.FSDataInputStream input,
long fileSize) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the positon reader and do cleanup job if any.
|
int |
readInternal(long position,
ReadTargetBuffer buffer,
int length) |
public AlluxioHdfsPositionReader(org.apache.hadoop.fs.FSDataInputStream input, long fileSize)
input
- Hadoop FileSystem FSDataInputStreamfileSize
- the file sizepublic int readInternal(long position, ReadTargetBuffer buffer, int length) throws IOException
readInternal
in interface PositionReader
position
- position of the file to start reading databuffer
- target byte bufferlength
- bytes to readIOException
public void close() throws IOException
PositionReader
close
in interface PositionReader
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2023. All Rights Reserved.