Class BinaryStoreImportProcessor
java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.BinaryStoreImportProcessor
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
,DataImportProcessor
,CheckpointRecord.SourceFileSizeRecord
public class BinaryStoreImportProcessor extends Object implements DataImportProcessor
Processes binary store files, with the ability to store headers and resume processing.
-
Field Summary
Fields Modifier and Type Field Description static String
STORED_HEADER_FILE_SUFFIX
Fields inherited from interface com.illumon.iris.db.tables.dataimport.logtailer.DataImportProcessor
END_OF_DATA_FLAG, TRUNCATED_FLAG
-
Method Summary
Modifier and Type Method Description String
getName()
long
getSize()
boolean
isDirty()
Does this import processor contain inconsistent state that should prevent checkpointing?void
onNewFile(FilePosition filePosition)
Notify the import processor that a new file is available.int
processContent(ByteBuffer dataBuffer, long bufferSentTimestamp)
Request that the import processor consume data from the supplied buffer, the first byte of which is associated with the supplied filePosition.void
setContext(DataImportStreamContext newContext)
After truncating a partition, a new context might be required to update checkpoints and file writers.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.DataImportProcessor
shouldBeginTransaction, shouldEndTransaction
-
Field Details
-
Method Details
-
setContext
Description copied from interface:DataImportProcessor
After truncating a partition, a new context might be required to update checkpoints and file writers.- Specified by:
setContext
in interfaceDataImportProcessor
- Parameters:
newContext
- The replacement DataImportStreamContext
-
isDirty
public boolean isDirty()Description copied from interface:DataImportProcessor
Does this import processor contain inconsistent state that should prevent checkpointing?- Specified by:
isDirty
in interfaceDataImportProcessor
- Returns:
- Whether this import processor contains inconsistent state that should prevent checkpointing
-
getName
-
getSize
public long getSize() -
onNewFile
Description copied from interface:DataImportProcessor
Notify the import processor that a new file is available.- Specified by:
onNewFile
in interfaceDataImportProcessor
- Parameters:
filePosition
- The new file's initial position
-
processContent
Description copied from interface:DataImportProcessor
Request that the import processor consume data from the supplied buffer, the first byte of which is associated with the supplied filePosition.- Specified by:
processContent
in interfaceDataImportProcessor
- Parameters:
dataBuffer
- The data to process- Returns:
- the reason flags for returning from the method
-