Package com.illumon.iris.logtailer
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
-
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 IOExceptionConstructor 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 IOExceptionLoad the tailer's configuration. This is available for unit tests in other repos.- Parameters:
log
- the Loggerdate
- the date for the run, unused but left to not break customer codetailerId
- the tailer ID- Throws:
IOException
- from the tailer calls
-
runTailer
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 classcom.fishlib.util.process.OnetimeShutdownTask
-
main
-