Class LogAggregatorService
java.lang.Object
com.fishlib.util.process.OnetimeShutdownTask
com.illumon.iris.db.v2.logaggregator.LogAggregatorService
- All Implemented Interfaces:
com.fishlib.util.process.ShutdownManager.Task
public class LogAggregatorService
extends com.fishlib.util.process.OnetimeShutdownTask
Service to allow binary logging over the network.
Any client that can log to a file can log to this service instead, by changing the BinaryStoreWriterFactory in use.
Multiple clients producing data for the same identifying 4-tuple may be combined into a single file.
-
Field Summary
Fields Modifier and Type Field Description static String
AUTH_SERVICE_NAME
protected ThreadLocal<DateFormat>
dateFormat
-
Constructor Summary
Constructors Constructor Description LogAggregatorService(com.fishlib.configuration.Configuration configuration, com.fishlib.io.logger.Logger log, DataRoutingService.LogAggregatorConfig lasConfig)
-
Method Summary
Modifier and Type Method Description static void
main(String[] args)
protected RollingFileManager
makeChannelManager(FullTableLocationKey tk, ByteBuffer headerBuffer)
Create a RollingFileManager for the output file.protected void
shutdown()
protected void
signalReady(int actualPort)
Extension point for testing.void
start(SocketAddress listeningAddress)
Deprecated.usestartInWorker(SocketAddress)
} insteadvoid
start(SocketAddress listeningAddress, com.fishlib.stats.StatsIntradayLogger statsIntradayLogger)
Run the LogAggregatorService.void
startInWorker(SocketAddress listeningAddress)
Run the LogAggregatorService in-worker.
-
Field Details
-
AUTH_SERVICE_NAME
- See Also:
- Constant Field Values
-
dateFormat
-
-
Constructor Details
-
LogAggregatorService
public LogAggregatorService(@NotNull com.fishlib.configuration.Configuration configuration, @NotNull com.fishlib.io.logger.Logger log, @NotNull DataRoutingService.LogAggregatorConfig lasConfig)
-
-
Method Details
-
shutdown
protected void shutdown()- Specified by:
shutdown
in classcom.fishlib.util.process.OnetimeShutdownTask
-
makeChannelManager
protected RollingFileManager makeChannelManager(FullTableLocationKey tk, ByteBuffer headerBuffer) throws IOExceptionCreate a RollingFileManager for the output file. This is an extension point for testing.- Parameters:
tk
- FullTableLocationKey identifying this stream.headerBuffer
- the header buffer- Returns:
- a new channel manager
- Throws:
IOException
-
signalReady
protected void signalReady(int actualPort)Extension point for testing. This will be called when the service has started.- Parameters:
actualPort
- the actual port the service is bound to
-
start
Deprecated.usestartInWorker(SocketAddress)
} instead- Throws:
IOException
-
startInWorker
Run the LogAggregatorService in-worker.- Parameters:
listeningAddress
- listen on this address- Throws:
IOException
-
start
public void start(SocketAddress listeningAddress, com.fishlib.stats.StatsIntradayLogger statsIntradayLogger) throws IOExceptionRun the LogAggregatorService.- Parameters:
listeningAddress
- listen on this addressstatsIntradayLogger
- the stats intraday logger- Throws:
IOException
-
main
- Throws:
IOException
-