Package org.apache.hadoop.hbase.wal
Class NoEOFWALStreamReader
java.lang.Object
org.apache.hadoop.hbase.wal.NoEOFWALStreamReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.hadoop.hbase.wal.WALStreamReader
public final class NoEOFWALStreamReader
extends Object
implements org.apache.hadoop.hbase.wal.WALStreamReader
A helper class for writing UTs, where we will eat the EOF and return null when reaching EOF, so
in UTs we do not need to deal with partial WAL files if this does not affect the correctness. In
production code you usually you should not do this, as it may cause data loss if you always
ignore the EOFException.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
NoEOFWALStreamReader
(org.apache.hadoop.hbase.wal.WALStreamReader reader) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private int
count()
static int
count
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) static int
count
(org.apache.hadoop.hbase.wal.WALFactory walFactory, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) static NoEOFWALStreamReader
create
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) static NoEOFWALStreamReader
create
(org.apache.hadoop.hbase.wal.WALFactory walFactory, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) long
org.apache.hadoop.hbase.wal.WAL.Entry
next
(org.apache.hadoop.hbase.wal.WAL.Entry reuse) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.wal.WALStreamReader
next
-
Field Details
-
LOG
-
reader
-
-
Constructor Details
-
NoEOFWALStreamReader
-
-
Method Details
-
next
public org.apache.hadoop.hbase.wal.WAL.Entry next(org.apache.hadoop.hbase.wal.WAL.Entry reuse) throws IOException - Specified by:
next
in interfaceorg.apache.hadoop.hbase.wal.WALStreamReader
- Throws:
IOException
-
getPosition
- Specified by:
getPosition
in interfaceorg.apache.hadoop.hbase.wal.WALStreamReader
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.hadoop.hbase.wal.WALStreamReader
-
count
- Throws:
IOException
-
create
public static NoEOFWALStreamReader create(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
create
public static NoEOFWALStreamReader create(org.apache.hadoop.hbase.wal.WALFactory walFactory, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-
count
public static int count(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
count
public static int count(org.apache.hadoop.hbase.wal.WALFactory walFactory, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-