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 -
Constructor Summary
ConstructorsConstructorDescriptionDataImportServer
(com.fishlib.io.logger.Logger logNotUsed, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration) Deprecated.DataImportServer
(DataImportServerLogFactory logFactory, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService) Construct aDataImportServer
. -
Method Summary
Modifier and TypeMethodDescriptioncreateSimpleProcessor
(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, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService) Deprecated.static DataImportServer
getDataImportServer
(DataImportServerLogFactory logCreator, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService) Create a new DataImportServer instance, according to the configuration passed in.static void
void
shutdown()
void
start()
Deprecated.usestartInWorker()
insteadvoid
start
(com.fishlib.stats.StatsIntradayLogger statsIntradayLogger) Beginning tracking statistics and accepting connections.void
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:
-
LOG_TAILER_ACK_TIMEOUT_PROP
- See Also:
-
LOG_TAILER_POLL_PAUSE_DEFAULT
public static final long LOG_TAILER_POLL_PAUSE_DEFAULT- See Also:
-
LOG_TAILER_ACK_TIMEOUT_DEFAULT
public static final long LOG_TAILER_ACK_TIMEOUT_DEFAULT- See Also:
-
-
Constructor Details
-
DataImportServer
public DataImportServer(@Nullable DataImportServerLogFactory logFactory, @NotNull DataImportServiceConfig disConfig, @NotNull com.fishlib.configuration.Configuration configuration, @NotNull SchemaService schemaService) throws IOException Construct aDataImportServer
.- Parameters:
logFactory
- 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 IOException Deprecated.Delegate toDataImportServer(DataImportServerLogFactory, 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 IOException Beginning 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, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService) throws IOException Deprecated.Deprecated. UsegetDataImportServer(DataImportServerLogFactory, DataImportServiceConfig, Configuration, SchemaService)
, passing a null IrisLogCreator if necessary.- Returns:
- a new DataImportServer instance
- Throws:
IOException
-
getDataImportServer
public static DataImportServer getDataImportServer(@Nullable DataImportServerLogFactory logCreator, DataImportServiceConfig disConfig, com.fishlib.configuration.Configuration configuration, SchemaService schemaService) throws IOException Create 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
-
DataImportServer(DataImportServerLogFactory, DataImportServiceConfig, Configuration, SchemaService)