Class StatefulTailer

java.lang.Object
com.arpnetworking.metrics.common.tailer.StatefulTailer
All Implemented Interfaces:
Tailer, Runnable

public final class StatefulTailer extends Object implements Tailer
A reimplementation of the Apache Commons IO tailer based on the 2.5 snapshot version. This version attempts to address several shortcomings of the Apache Commons implementation. In particular, more robust support for rename- recreate file rotations and some progress for copy-truncate cases. The major new feature is the PositionStore which is used to checkpoint the offset in the tailed file as identified by a hash of the file prefix.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot io), Ville Koskela (ville dot koskela at inscopemetrics dot io)
  • Method Details

    • stop

      public void stop()
      Description copied from interface: Tailer
      Stop the Tailer instance.
      Specified by:
      stop in interface Tailer
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • toLogValue

      public Object toLogValue()
      Generate a Steno log compatible representation.
      Returns:
      Steno log compatible representation.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isRunning

      protected boolean isRunning()
      Determine if the Tailer is running.
      Returns:
      True if and only if the Tailer is running.