Class DataImportChannelProcessor
java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.DataImportProcessorBaseImpl
com.illumon.iris.db.tables.dataimport.logtailer.DataImportStreamProcessor
com.illumon.iris.db.tables.dataimport.logtailer.DataImportChannelProcessor
- All Implemented Interfaces:
DataImportChannelProcessorBase
,DataImportProcessorBase
public class DataImportChannelProcessor extends DataImportStreamProcessor implements DataImportChannelProcessorBase
Process data from at most one concurrent tailer for a given local table location.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.tables.dataimport.logtailer.DataImportStreamProcessor
DataImportStreamProcessor.Context
-
Field Summary
Fields inherited from class com.illumon.iris.db.tables.dataimport.logtailer.DataImportProcessorBaseImpl
CHECKPOINT_INTERVAL_MILLIS_SUFFIX, dataStreamProcessorDirectory, DISP_DEFAULT_PREFIX, DISP_PREFIX, FLUSH_INTERVAL_SUFFIX, log, logPrefix, MAX_SHUTDOWN_DELAY_MILLIS_SUFFIX, PROFILING_LEVEL_SUFFIX, schemaService
Fields inherited from interface com.illumon.iris.db.tables.dataimport.logtailer.DataImportChannelProcessorBase
NEW_LINE
-
Method Summary
Modifier and Type Method Description protected Boolean
checkLiveness()
Test "liveness" for this stream processor.protected void
close(String reason)
com.illumon.iris.db.tables.dataimport.logtailer.DataImportChannel
getChannel()
Get the DataImportChannel for this channel processor.protected String
getDescription()
void
handleApplicationMessage(com.illumon.iris.db.tables.dataimport.logtailer.DataImportChannel channel, DataImportChannelItem item)
protected DataImportStreamProcessor.Context
initializeContext(boolean reinitializing)
protected boolean
onInitialization()
Methods inherited from class com.illumon.iris.db.tables.dataimport.logtailer.DataImportStreamProcessor
addPostCommitCallback, addPostPrepareCallback, initialize, shutdown, toString
Methods inherited from class com.illumon.iris.db.tables.dataimport.logtailer.DataImportProcessorBaseImpl
getLog, getLogPrefix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.tables.dataimport.logtailer.DataImportChannelProcessorBase
handleDisconnection, handleProtocolError, handleReadException, handleReject, handleUnexpectedMessage, initializeApplicationHandler, sendReject, sendReject, sendReject
Methods inherited from interface com.illumon.iris.db.tables.dataimport.logtailer.DataImportProcessorBase
getLog, getLogPrefix, shutdown
-
Method Details
-
getChannel
@NotNull public com.illumon.iris.db.tables.dataimport.logtailer.DataImportChannel getChannel()Description copied from interface:DataImportChannelProcessorBase
Get the DataImportChannel for this channel processor.- Specified by:
getChannel
in interfaceDataImportChannelProcessorBase
- Returns:
- the DataImportChannel
-
initializeContext
-
onInitialization
protected boolean onInitialization() -
close
-
handleApplicationMessage
public void handleApplicationMessage(@NotNull com.illumon.iris.db.tables.dataimport.logtailer.DataImportChannel channel, @NotNull DataImportChannelItem item) -
checkLiveness
Test "liveness" for this stream processor. Not a perfect implementation, correctness-wise, but suitable for our purpose. If the stream processor is not alive, try to wait for it to be done.- Specified by:
checkLiveness
in classDataImportStreamProcessor
- Returns:
- True if alive, false if not, null if uncertain
- Throws:
InterruptedException
- if the thread is interrupted while waitingTimeoutException
- if the stream processor doesn't go to DONE state within the configured time limit
-
getDescription
-