Class LogtailerMain

java.lang.Object
com.fishlib.util.process.OnetimeShutdownTask
com.illumon.iris.logtailer.LogtailerMain
All Implemented Interfaces:
com.fishlib.util.process.ShutdownManager.Task

public class LogtailerMain
extends com.fishlib.util.process.OnetimeShutdownTask
LogtailerMain is a class to tail binary log files and send the data therein to a Data Import Server (DIS). Files are processed by BinaryLogFileManager instances which handle table location determination, including internal and column partition values, based on the filenames and tailer configuration. Some basic partition terminology:
  • Internal partitions are the highest level of partitioning and usually correspond to a source. Internal partitions are not schema-related.
  • Column partitions are the partitioning level which divides the data based on the column specified in the table's schema. These are frequently dates.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  LogtailerMain.LogtailerRunDetails
    Container for the tailer's run-time configuration.
    static class  LogtailerMain.RunType
    Specifies the type of run for this LogTailer
  • Constructor Summary

    Constructors 
    Constructor Description
    LogtailerMain​(com.fishlib.io.logger.Logger log, String intradayTailerId, com.fishlib.configuration.Configuration configuration, DataRoutingService routingService, com.fishlib.stats.StatsIntradayLogger statsIntradayLogger, boolean readConfigsOnly, boolean isInWorker)
    Constructor intended for normal usage.
  • Method Summary

    Modifier and Type Method Description
    static void loadLoggerConfig​(com.fishlib.io.logger.Logger log, String date, String tailerId)
    Load the tailer's configuration.
    static void main​(String[] args)  
    void runTailer()
    Start the tailer.
    void shutdown()  

    Methods inherited from class com.fishlib.util.process.OnetimeShutdownTask

    adapt, awaitShutdown, awaitShutdown, invoke, isShutdown

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogtailerMain

      public LogtailerMain​(@NotNull com.fishlib.io.logger.Logger log, @NotNull String intradayTailerId, @NotNull com.fishlib.configuration.Configuration configuration, @NotNull DataRoutingService routingService, @NotNull com.fishlib.stats.StatsIntradayLogger statsIntradayLogger, boolean readConfigsOnly, boolean isInWorker) throws IOException
      Constructor intended for normal usage. This will determine the configuration but not start threads to tail files.
      Throws:
      IOException
  • Method Details

    • loadLoggerConfig

      public static void loadLoggerConfig​(com.fishlib.io.logger.Logger log, @Nullable String date, String tailerId) throws IOException
      Load the tailer's configuration. This is available for unit tests in other repos.
      Parameters:
      log - the Logger
      date - the date for the run, unused but left to not break customer code
      tailerId - the tailer ID
      Throws:
      IOException - from the tailer calls
    • runTailer

      public void runTailer() throws Exception
      Start the tailer. This method returns once the tailer is started, and it is up to the caller to await shutdown.
      Throws:
      Exception - from underlying calls
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in class com.fishlib.util.process.OnetimeShutdownTask
    • main

      public static void main​(String[] args)