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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNoEOFWALStreamReader(org.apache.hadoop.hbase.wal.WALStreamReader reader) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private intcount()static intcount(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) static intcount(org.apache.hadoop.hbase.wal.WALFactory walFactory, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) static NoEOFWALStreamReadercreate(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) static NoEOFWALStreamReadercreate(org.apache.hadoop.hbase.wal.WALFactory walFactory, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) longorg.apache.hadoop.hbase.wal.WAL.Entrynext(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, waitMethods 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:
nextin interfaceorg.apache.hadoop.hbase.wal.WALStreamReader- Throws:
IOException
-
getPosition
- Specified by:
getPositionin interfaceorg.apache.hadoop.hbase.wal.WALStreamReader- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein 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
-