EditLogTailer (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.namenode.ha, class: EditLogTailer

Package org.apache.hadoop.hdfs.server.namenode.ha

# Class EditLogTailer

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer

@Private @Evolving public class EditLogTailer extends Object
EditLogTailer represents a thread which periodically reads from edits journals and applies the transactions contained within to a given FSNamesystem.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final long`
  `DFS_HA_TAILEDITS_MAX_TXNS_PER_LOCK_DEFAULT`
  `static final String`
  `DFS_HA_TAILEDITS_MAX_TXNS_PER_LOCK_KEY`
  StandbyNode will hold namesystem lock to apply at most this many journal transactions.
  `static final org.slf4j.Logger`
  `LOG`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EditLogTailer(FSNamesystem namesystem, org.apache.hadoop.conf.Configuration conf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `catchupDuringFailover()`
  `long`
  `doTailEdits()`
  `NamenodeProtocol`
  `getCachedActiveProxy()`
  `RemoteNameNodeInfo`
  `getCurrentNN()`
  `long`
  `getLastLoadTimeMs()`
  `long`
  `getLastRollTimeMs()`
  `void`
  `setEditLog(FSEditLog editLog)`
  `void`
  `setShouldRunForTest(boolean shouldRun)`
  `void`
  `start()`
  `void`
  `stop()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### LOG

    public static final org.slf4j.Logger LOG

  - ### DFS_HA_TAILEDITS_MAX_TXNS_PER_LOCK_KEY

    public static final String DFS_HA_TAILEDITS_MAX_TXNS_PER_LOCK_KEY
    StandbyNode will hold namesystem lock to apply at most this many journal transactions. It will then release the lock and re-acquire it to load more transactions. By default the write lock is held for the entire journal segment. Fine-grained locking allows read requests to get through.
    See Also:
      - Constant Field Values

  - ### DFS_HA_TAILEDITS_MAX_TXNS_PER_LOCK_DEFAULT

    public static final long DFS_HA_TAILEDITS_MAX_TXNS_PER_LOCK_DEFAULT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### EditLogTailer

    public EditLogTailer(FSNamesystem namesystem, org.apache.hadoop.conf.Configuration conf)

- ## Method Details

  - ### start

    public void start()

  - ### stop

    public void stop() throws IOException
    Throws:
      `IOException`

  - ### setEditLog

    @VisibleForTesting public void setEditLog(FSEditLog editLog)

  - ### catchupDuringFailover

    public void catchupDuringFailover() throws IOException
    Throws:
      `IOException`

  - ### doTailEdits

    @VisibleForTesting public long doTailEdits() throws IOException, InterruptedException
    Throws:
      `IOException`
      `InterruptedException`

  - ### getLastLoadTimeMs

    public long getLastLoadTimeMs()
    Returns:
      time in msec of when we last loaded a non-zero number of edits.

  - ### getCachedActiveProxy

    @VisibleForTesting public NamenodeProtocol getCachedActiveProxy()

  - ### getLastRollTimeMs

    @VisibleForTesting public long getLastRollTimeMs()

  - ### getCurrentNN

    @VisibleForTesting public RemoteNameNodeInfo getCurrentNN()

  - ### setShouldRunForTest

    @VisibleForTesting public void setShouldRunForTest(boolean shouldRun)