@InterfaceAudience.Private public class ReplicationHLogReaderManager extends Object
Constructor and Description |
---|
ReplicationHLogReaderManager(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 |
getPosition()
Get the position that we stopped reading at
|
HLog.Reader |
openReader(org.apache.hadoop.fs.Path path)
Opens the file at the current position
|
HLog.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 ReplicationHLogReaderManager(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf)
fs
- conf
- public HLog.Reader openReader(org.apache.hadoop.fs.Path path) throws IOException
path
- IOException
public HLog.Entry readNextAndSetPosition() throws IOException
IOException
public void seek() throws IOException
IOException
public long getPosition()
public void setPosition(long pos)
public void closeReader() throws IOException
IOException
Copyright © 2014 The Apache Software Foundation. All rights reserved.