public class NcftpReformatProcessor extends LogReformatProcessor
LogReformatProcessor
, allowing flags.
The output line specification can use the following log details:
date_time (must have the date-time flag)
child_process
operation
requested_resource
bytes_transfered
bytes_received
time_taken
transfer_rate
username
email
client_ip
suffix
transfer_status
transfer_protocol
transfer_notes
transfer_start_time
session_id
file_size
offset
wildcard_pattern
recursion
file_mode
symlink_target
new_filename
You can find more information about the NcFTP log format and the details
that NcFTP logs contain at http://www.ncftp.com/ncftpd/doc/xferlog.html.Modifier and Type | Field and Description |
---|---|
static String |
OUTPUT_DIR_NAME |
DEFAULT_ERRORS_ALLOWED, errorLinesAllowed, inputDetailMap, outputDetailMap, segmentedInput, segmentedOutput
Constructor and Description |
---|
NcftpReformatProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Properties props)
Configure the Processor, providing the details needed to process logs.
|
String |
getDirName()
Get the name of the directory where the output of the processor is
placed.
|
String |
getOutputFileName(String inputFileName)
Get the name that will be assigned to an output file, given the input
file name.
|
protected void |
parseInputLine(String line)
Parse a line from an input file and extract the values for presented
details (e.g.
|
void |
process(File in,
File out)
Read in a log file, reformat it as per configured, and place the output
in the given directory.
|
void |
process(List<File> in,
File out)
Reformat all of the NcFTP logs in the given list and place them in
the given output directory.
|
boolean |
verifyConfiguration()
Verify that the Processor has been properly configured.
|
configure, determineErrorTolerance, formatOutputLine, parseInputSpec, parseOutputSpec, processFile, processFileList, processLine, resetDetailMaps, validateLineSpecs
public static final String OUTPUT_DIR_NAME
public void process(File in, File out) throws ProcessingException
LogReformatProcessor
process
in interface Processor
process
in class LogReformatProcessor
in
- The File
that will be reformatted.out
- The directory where output will be placed,
represented as a File
.ProcessingException
- If any parameters are null or invalid, if
the processor hasn't been configured, or if
an error occurs during processing.public void process(List<File> in, File out) throws ProcessingException
process
in interface Processor
process
in class LogReformatProcessor
in
- A List
of File
s,
representing the logs to be reformatted.out
- The directory where output is placed, given
as a File
.ProcessingException
- If the Processor has not been properly
configured or if an error occurs during
processing.public String getDirName()
Processor
public void configure(Properties props) throws ProcessingException
Processor
props
- A Properties
containing the needed
configuration values.ProcessingException
- If the provided Properties do not contain
the needed configuration values.public String getOutputFileName(String inputFileName)
Processor
inputFileName
- The name of the input filegov.nasa.pds.report.processing.LogReformatProcessor.getOutputFileName()
public boolean verifyConfiguration()
Processor
verifyConfiguration
in interface Processor
verifyConfiguration
in class LogReformatProcessor
gov.nasa.pds.report.processing.Processor.verifyConfiguration()
protected void parseInputLine(String line) throws ProcessingException
LogReformatProcessor
parseInputLine
in class LogReformatProcessor
line
- The input line, presented as a String.ProcessingException
- If a required detail is not defined, or if
the line cannot be properly parsed using
the pattern provided during configuration.gov.nasa.pds.report.processing.LogReformatProcessor.parseInputLine()
Copyright © 2010–2019 Planetary Data System. All rights reserved.