| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
LogCopier.Builder |
acceptsLogFileExtensions(Set<String> logFileExtensions)
Set the set of acceptable log file extensions.
|
LogCopier |
build()
Build a new
LogCopier instance. |
LogCopier.Builder |
readFrom(Path srcLogDir)
Set the path of the source log file directory to read from.
|
LogCopier.Builder |
useCopyInterval(long copyInterval)
Set the copy interval between two iterations of copies.
|
LogCopier.Builder |
useDestFileSystem(FileSystem destFs)
Set the destination
FileSystem for writing the destination log file. |
LogCopier.Builder |
useExcludingRegexPatterns(String regexList)
Set the regex patterns used to filter logs that should not be copied.
|
LogCopier.Builder |
useIncludingRegexPatterns(String regexList)
Set the regex patterns used to filter logs that should be copied.
|
LogCopier.Builder |
useLinesWrittenBeforeFlush(int linesWrittenBeforeFlush)
Set the number of lines written before they are flushed to disk.
|
LogCopier.Builder |
useLogFileNamePrefix(String logFileNamePrefix)
Set the log file name prefix at the destination.
|
LogCopier.Builder |
useMaxBytesPerLogFile(long maxBytesPerLogFile)
Set the max bytes per log file.
|
LogCopier.Builder |
useMaxMinutesPerLogFile(long maxMinutesPerLogFile)
Set the max minutes per log file.
|
LogCopier.Builder |
useScheduler(String schedulerName)
Set the scheduler to use for scheduling copy tasks.
|
LogCopier.Builder |
useSourceLogFileMonitorInterval(long sourceLogFileMonitorInterval)
Set the interval between two checks for the source log file monitor.
|
LogCopier.Builder |
useSrcFileSystem(FileSystem srcFs)
Set the source
FileSystem for reading the source log file. |
LogCopier.Builder |
useTimeUnit(TimeUnit timeUnit)
Set the
TimeUnit used for the source log file monitor interval, initial delay, copy interval. |
LogCopier.Builder |
writeTo(Path destLogDir)
Set the path of the destination log file directory to write to.
|
public LogCopier.Builder useSourceLogFileMonitorInterval(long sourceLogFileMonitorInterval)
sourceLogFileMonitorInterval - the interval between two checks for the source log file monitorLogCopier.Builder instancepublic LogCopier.Builder useCopyInterval(long copyInterval)
copyInterval - the copy interval between two iterations of copiesLogCopier.Builder instancepublic LogCopier.Builder useMaxMinutesPerLogFile(long maxMinutesPerLogFile)
maxMinutesPerLogFile - the maximum minutes of logs a log file containsLogCopier.Builder instancepublic LogCopier.Builder useMaxBytesPerLogFile(long maxBytesPerLogFile)
maxBytesPerLogFile - the maximum bytes of a log fileLogCopier.Builder instancepublic LogCopier.Builder useTimeUnit(TimeUnit timeUnit)
TimeUnit used for the source log file monitor interval, initial delay, copy interval.timeUnit - the TimeUnit used for the initial delay and copy intervalLogCopier.Builder instancepublic LogCopier.Builder acceptsLogFileExtensions(Set<String> logFileExtensions)
logFileExtensions - the set of acceptable log file extensionsLogCopier.Builder instancepublic LogCopier.Builder useIncludingRegexPatterns(String regexList)
regexList - a comma-separated list of regex patternsLogCopier.Builder instancepublic LogCopier.Builder useExcludingRegexPatterns(String regexList)
regexList - a comma-separated list of regex patternsLogCopier.Builder instancepublic LogCopier.Builder useSrcFileSystem(FileSystem srcFs)
FileSystem for reading the source log file.srcFs - the source FileSystem for reading the source log fileLogCopier.Builder instancepublic LogCopier.Builder useDestFileSystem(FileSystem destFs)
FileSystem for writing the destination log file.destFs - the destination FileSystem for writing the destination log fileLogCopier.Builder instancepublic LogCopier.Builder readFrom(Path srcLogDir)
srcLogDir - the path of the source log file directory to read fromLogCopier.Builder instancepublic LogCopier.Builder writeTo(Path destLogDir)
destLogDir - the path of the destination log file directory to write toLogCopier.Builder instancepublic LogCopier.Builder useLogFileNamePrefix(String logFileNamePrefix)
logFileNamePrefix - the log file name prefix at the destinationLogCopier.Builder instancepublic LogCopier.Builder useLinesWrittenBeforeFlush(int linesWrittenBeforeFlush)
linesWrittenBeforeFlush - the number of lines written before they are flushed to diskLogCopier.Builder instancepublic LogCopier.Builder useScheduler(String schedulerName)
schedulerName - the name of the schedulerLogCopier.Builder instance