Package com.illumon.iris.logfilemanager
Class BinaryLogFileManager
java.lang.Object
com.illumon.iris.logfilemanager.BinaryLogFileManager
- Direct Known Subclasses:
DateBinaryLogFileManager
,StandardBinaryLogFileManager
public abstract class BinaryLogFileManager extends Object
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, LogtailerConfiguration.ConfigurationEntry, LogtailerMain.LogtailerRunDetails, LogtailerDestinationThrottles)
.
That constructor should call this constructor with super(...)
.-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
BinaryLogFileManager.TableLocationIdentifierStatus
Container for status for each handledTableLocationIdentifier
. -
Method Summary
Modifier and Type Method Description protected File[]
findAndSetMatchingFiles(BinaryLogFileManager.TableLocationIdentifierStatus tableLocationIdentifierStatus)
Regenerate and return the matching-files-array for the specified TableLocationIdentifierStatusMap<TableLocationIdentifier,BinaryLogFileManager.TableLocationIdentifierStatus>
getTableLocationIdentifierStatusMap()
This is for testing only.boolean
handleFile(Path newFilePath, boolean isStartup)
Given a new file, see if it belongs to this BinaryLogFileManager, and if so, handle it.void
requestShutdown()
Prevent any new destination threads from being created, and request shutdown on all the existing threads.
-
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 parsedTableLocationIdentifier
for the file.- Parameters:
newFilePath
- the new file's fullPath
isStartup
- 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.
-