@InterfaceAudience.Private public class ReplicationWALReaderManager extends Object
Constructor and Description |
---|
ReplicationWALReaderManager(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf)
Creates the helper but doesn't open any file
Use setInitialPosition after using the constructor if some content needs to be skipped
|
Modifier and Type | Method and Description |
---|---|
void |
closeReader()
Close the current reader
|
long |
currentTrailerSize() |
long |
getPosition()
Get the position that we stopped reading at
|
WAL.Reader |
openReader(org.apache.hadoop.fs.Path path)
Opens the file at the current position
|
WAL.Entry |
readNextAndSetPosition()
Get the next entry, returned and also added in the array
|
void |
seek()
Advance the reader to the current position
|
void |
setPosition(long pos) |
public ReplicationWALReaderManager(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf)
fs
- conf
- public WAL.Reader openReader(org.apache.hadoop.fs.Path path) throws IOException
path
- IOException
public WAL.Entry readNextAndSetPosition() throws IOException
IOException
public void seek() throws IOException
IOException
public long getPosition()
public void setPosition(long pos)
public long currentTrailerSize()
public void closeReader() throws IOException
IOException
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.