Package com.illumon.iris.logfilemanager
Class BinaryLogFileManager
java.lang.Object
com.illumon.iris.logfilemanager.BinaryLogFileManager
- Direct Known Subclasses:
DateBinaryLogFileManager,StandardBinaryLogFileManager
Abstract class providing base logic and required methods to be implemented for classes which determine column partition information for binary log files.
Any implementation must include a constructor which takes the same parameters as
BinaryLogFileManager(Logger, DataRoutingService, LogtailerConfiguration.ConfigurationEntry, LogtailerMain.LogtailerRunDetails, LogtailerDestinationThrottles).
That constructor should call this constructor with super(...).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassContainer for status for each handledTableLocationIdentifier. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected File[]findAndSetMatchingFiles(BinaryLogFileManager.TableLocationIdentifierStatus tableLocationIdentifierStatus) Regenerate and return the matching-files-array for the specified TableLocationIdentifierStatusThis is for testing only.booleanhandleFile(Path newFilePath, boolean isStartup) Given a new file, see if it belongs to this BinaryLogFileManager, and if so, handle it.voidPrevent any new destination threads from being created, and request shutdown on all the existing threads.
-
Field Details
-
logDetails
-
-
Method Details
-
findAndSetMatchingFiles
protected File[] findAndSetMatchingFiles(BinaryLogFileManager.TableLocationIdentifierStatus tableLocationIdentifierStatus) Regenerate and return the matching-files-array for the specified TableLocationIdentifierStatus- Parameters:
tableLocationIdentifierStatus- the tableLocationIdentifierStatus for the event that triggered this call- Returns:
- the current array of matching files for this TableLocationIdentifierStatus
-
getTableLocationIdentifierStatusMap
@VisibleForTesting public Map<TableLocationIdentifier,BinaryLogFileManager.TableLocationIdentifierStatus> getTableLocationIdentifierStatusMap()This is for testing only.- Returns:
- the TableLocationIdentifier status map
-
handleFile
Given a new file, see if it belongs to this BinaryLogFileManager, and if so, handle it. This determination is based on the parsedTableLocationIdentifierfor the file.- Parameters:
newFilePath- the new file's fullPathisStartup- if true, this is a file found during startup- Returns:
- true if the file was consumed by this BinaryLogFileManager
-
requestShutdown
public void requestShutdown()Prevent any new destination threads from being created, and request shutdown on all the existing threads.
-