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
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
    private org.apache.hadoop.hbase.wal.WALStreamReader
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    NoEOFWALStreamReader(org.apache.hadoop.hbase.wal.WALStreamReader reader)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    private int
     
    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)
     
    create(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
     
    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

      private static final org.slf4j.Logger LOG
    • reader

      private org.apache.hadoop.hbase.wal.WALStreamReader reader
  • Constructor Details

    • NoEOFWALStreamReader

      private NoEOFWALStreamReader(org.apache.hadoop.hbase.wal.WALStreamReader reader)
  • 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 interface org.apache.hadoop.hbase.wal.WALStreamReader
      Throws:
      IOException
    • getPosition

      public long getPosition() throws IOException
      Specified by:
      getPosition in interface org.apache.hadoop.hbase.wal.WALStreamReader
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.hadoop.hbase.wal.WALStreamReader
    • count

      private int count() throws IOException
      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