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 longLOG_TAILER_ACK_TIMEOUT_DEFAULTstatic StringLOG_TAILER_ACK_TIMEOUT_PROPstatic longLOG_TAILER_POLL_PAUSE_DEFAULTstatic StringLOG_TAILER_POLL_PAUSE_PROP -
Constructor Summary
Constructors Constructor Description DataImportServer(com.fishlib.io.logger.Logger logNotUsed, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration)DataImportServer(IrisLogCreator logCreator, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService)Construct aDataImportServer. -
Method Summary
Modifier and Type Method Description SimpleDataImportStreamProcessorcreateSimpleProcessor(String description, FullTableLocationKey streamKey, Runnable closeCallback, SimpleDataImportStreamProcessor.OnReject onReject)Create a SimpleDataImportStreamProcessor for importing data into this DataImportServer.static DataImportServergetDataImportServer(com.fishlib.io.logger.Logger log, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService)Deprecated.static DataImportServergetDataImportServer(IrisLogCreator logCreator, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService)Create a new DataImportServer instance, according to the configuration passed in.SchemaServicegetSchemaService()TableDataServicegetTableDataService()static voidmain(String... args)voidshutdown()voidstart()Deprecated.usestartInWorker()insteadvoidstart(com.fishlib.stats.StatsIntradayLogger statsIntradayLogger)Beginning tracking statistics and accepting connections.voidstartInWorker()Start accepting connections in-worker.Methods inherited from class com.fishlib.util.process.OnetimeShutdownTask
adapt, awaitShutdown, awaitShutdown, invoke, isShutdownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 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 DataImportServiceConfig disConfig, @NotNull com.fishlib.configuration.Configuration configuration) throws IOExceptionDeprecated.Delegate toDataImportServer(IrisLogCreator, 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:
getTableDataServicein interfaceIDataImportServer
-
getSchemaService
- Specified by:
getSchemaServicein interfaceIDataImportServer
-
start
Deprecated.usestartInWorker()instead- Throws:
IOException
-
startInWorker
Start accepting connections in-worker.- Specified by:
startInWorkerin 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:
shutdownin interfaceIDataImportServer- Specified by:
shutdownin 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:
createSimpleProcessorin 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, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService) throws IOExceptionDeprecated.Deprecated. UsegetDataImportServer(IrisLogCreator, DataImportServiceConfig, Configuration, SchemaService), passing a null IrisLogCreator if necessary.- Returns:
- a new DataImportServer instance
- Throws:
IOException
-
getDataImportServer
public static DataImportServer getDataImportServer(@Nullable IrisLogCreator logCreator, 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
-