Class DataImportServer
java.lang.Object
com.fishlib.util.process.OnetimeShutdownTask
com.illumon.iris.db.tables.dataimport.logtailer.DataImportServer
- All Implemented Interfaces:
com.fishlib.util.process.ShutdownManager.Task
,IDataImportServer
public class DataImportServer extends com.fishlib.util.process.OnetimeShutdownTask implements IDataImportServer
Data Import Server: Consumes row-oriented data from log tailers (or similar data sources) and persists Iris'
column-oriented table format, simultaneously serving said data consistently to remote table data clients.
-
Field Summary
Fields Modifier and Type Field Description static long
LOG_TAILER_ACK_TIMEOUT_DEFAULT
static String
LOG_TAILER_ACK_TIMEOUT_PROP
static long
LOG_TAILER_POLL_PAUSE_DEFAULT
static String
LOG_TAILER_POLL_PAUSE_PROP
-
Constructor Summary
Constructors Constructor Description DataImportServer(com.fishlib.io.logger.Logger logNotUsed, DataRoutingService.DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration)
DataImportServer(IrisLogCreator logCreator, DataRoutingService.DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService)
Construct aDataImportServer
. -
Method Summary
Modifier and Type Method Description SimpleDataImportStreamProcessor
createSimpleProcessor(String description, FullTableLocationKey streamKey, Runnable closeCallback, SimpleDataImportStreamProcessor.OnReject onReject)
Create a SimpleDataImportStreamProcessor for importing data into this DataImportServer.static DataImportServer
getDataImportServer(com.fishlib.io.logger.Logger log, DataRoutingService.DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService)
Deprecated.static DataImportServer
getDataImportServer(IrisLogCreator logCreator, DataRoutingService.DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService)
Create a new DataImportServer instance, according to the configuration passed in.SchemaService
getSchemaService()
TableDataService
getTableDataService()
static void
main(String... args)
void
shutdown()
void
start()
Deprecated.usestartInWorker()
insteadvoid
start(com.fishlib.stats.StatsIntradayLogger statsIntradayLogger)
Beginning tracking statistics and accepting connections.void
startInWorker()
Start accepting connections in-worker.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
Methods inherited from interface com.illumon.iris.db.tables.dataimport.logtailer.IDataImportServer
isShutdown
-
Field Details
-
LOG_TAILER_POLL_PAUSE_PROP
- See Also:
- Constant Field Values
-
LOG_TAILER_ACK_TIMEOUT_PROP
- See Also:
- Constant Field Values
-
LOG_TAILER_POLL_PAUSE_DEFAULT
public static final long LOG_TAILER_POLL_PAUSE_DEFAULT- See Also:
- Constant Field Values
-
LOG_TAILER_ACK_TIMEOUT_DEFAULT
public static final long LOG_TAILER_ACK_TIMEOUT_DEFAULT- See Also:
- Constant Field Values
-
-
Constructor Details
-
DataImportServer
public DataImportServer(@Nullable IrisLogCreator logCreator, @NotNull DataRoutingService.DataImportServiceConfig disConfig, @NotNull com.fishlib.configuration.Configuration configuration, @NotNull SchemaService schemaService) throws IOExceptionConstruct aDataImportServer
.- Parameters:
logCreator
- optional IrisLogCreator for access to loggersdisConfig
- the parameters that define this DIS instanceconfiguration
- the configuration to use when fetching settings that aren't included in disConfigschemaService
- the SchemaService to use- Throws:
IOException
-
DataImportServer
@Deprecated public DataImportServer(@Nullable com.fishlib.io.logger.Logger logNotUsed, @NotNull DataRoutingService.DataImportServiceConfig disConfig, @NotNull com.fishlib.configuration.Configuration configuration) throws IOExceptionDeprecated.Delegate toDataImportServer(IrisLogCreator, DataRoutingService.DataImportServiceConfig, Configuration, SchemaService)
with the default schema service.- Parameters:
logNotUsed
- not used - the non-deprecated method uses optional IrisLogCreator insteaddisConfig
- the parameters that define this DIS instanceconfiguration
- the configuration to use when fetching settings that aren't included in disConfig- Throws:
IOException
-
-
Method Details
-
getTableDataService
- Specified by:
getTableDataService
in interfaceIDataImportServer
-
getSchemaService
- Specified by:
getSchemaService
in interfaceIDataImportServer
-
start
Deprecated.usestartInWorker()
instead- Throws:
IOException
-
startInWorker
Start accepting connections in-worker.- Specified by:
startInWorker
in interfaceIDataImportServer
- Throws:
IOException
-
start
public void start(@NotNull com.fishlib.stats.StatsIntradayLogger statsIntradayLogger) throws IOExceptionBeginning tracking statistics and accepting connections.- Parameters:
statsIntradayLogger
- the stats intraday logger- Throws:
IOException
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceIDataImportServer
- Specified by:
shutdown
in classcom.fishlib.util.process.OnetimeShutdownTask
-
createSimpleProcessor
public SimpleDataImportStreamProcessor createSimpleProcessor(@NotNull String description, @NotNull FullTableLocationKey streamKey, @NotNull Runnable closeCallback, @NotNull SimpleDataImportStreamProcessor.OnReject onReject)Create a SimpleDataImportStreamProcessor for importing data into this DataImportServer.- Specified by:
createSimpleProcessor
in interfaceIDataImportServer
- Parameters:
description
- a description for the data connectionstreamKey
- destination informationcloseCallback
- callback to be invoked when the simple data stream is closedonReject
- callback to be invoked if the simple data stream is rejected- Returns:
- a new SimpleDataImportStreamProcessor
-
main
- Throws:
IOException
-
getDataImportServer
@Deprecated public static DataImportServer getDataImportServer(com.fishlib.io.logger.Logger log, DataRoutingService.DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService) throws IOExceptionDeprecated.Deprecated. UsegetDataImportServer(IrisLogCreator, DataRoutingService.DataImportServiceConfig, Configuration, SchemaService)
, passing a null IrisLogCreator if necessary.- Returns:
- a new DataImportServer instance
- Throws:
IOException
-
getDataImportServer
public static DataImportServer getDataImportServer(@Nullable IrisLogCreator logCreator, DataRoutingService.DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService) throws IOExceptionCreate a new DataImportServer instance, according to the configuration passed in.- Parameters:
logCreator
- optional IrisLogCreator, will be used to create logger. If null, a global instance will be used, if available.disConfig
- the parameters that define this DIS instanceconfiguration
- the configuration to use when fetching settings that aren't included in disConfigschemaService
- the SchemaService to use- Returns:
- a new DataImportServer instance
- Throws:
IOException
-