Class HttpdLogRecord
java.lang.Object
org.apache.drill.exec.store.httpd.HttpdLogRecord
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addField
(nl.basjes.parse.core.Parser<HttpdLogRecord> parser, RowSetLoader rowWriter, Map<String, nl.basjes.parse.core.Casts> columnCasts, String parserFieldName, String drillFieldName, Map<String, TypeProtos.MinorType> mappedColumns) This record will be used with a single parser.void
Call this method after a record has been parsed.getLongs()
void
This method is referenced and called via reflection.void
This method is referenced and called via reflection.void
This method is referenced and called via reflection.void
This method is referenced and called via reflection.void
This method is referenced and called via reflection.void
setTimestamp
(String field, String value) This method is referenced and called via reflection.void
setTimestampFromEpoch
(String field, Long value) This method is referenced and called via reflection.void
setWildcard
(String field, Double value) This method is referenced and called via reflection.void
setWildcard
(String field, Long value) This method is referenced and called via reflection.void
setWildcard
(String field, String value) This method is referenced and called via reflection.
-
Constructor Details
-
HttpdLogRecord
-
-
Method Details
-
finishRecord
public void finishRecord()Call this method after a record has been parsed. This finished the lifecycle of any maps that were written and removes all the entries for the next record to be able to work. -
set
This method is referenced and called via reflection. This is added as a parsing target for the parser. It will get called when the value of a log field is a String data type.- Parameters:
field
- name of fieldvalue
- value of field
-
set
This method is referenced and called via reflection. This is added as a parsing target for the parser. It will get called when the value of a log field is a Long data type.- Parameters:
field
- name of fieldvalue
- value of field
-
setDate
This method is referenced and called via reflection. This is added as a parsing target for the parser. It will get called when the value of a log field is a Date data type.- Parameters:
field
- name of fieldvalue
- value of field
-
setTime
This method is referenced and called via reflection. This is added as a parsing target for the parser. It will get called when the value of a log field is a Time data type.- Parameters:
field
- name of fieldvalue
- value of field
-
setTimestampFromEpoch
This method is referenced and called via reflection. This is added as a parsing target for the parser. It will get called when the value of a log field is a timestamp data type.- Parameters:
field
- name of fieldvalue
- value of field
-
setTimestamp
This method is referenced and called via reflection. This is added as a parsing target for the parser. It will get called when the value of a log field is a timestamp data type.- Parameters:
field
- name of fieldvalue
- value of field
-
set
This method is referenced and called via reflection. This is added as a parsing target for the parser. It will get called when the value of a log field is a Double data type.- Parameters:
field
- name of fieldvalue
- value of field
-
setWildcard
This method is referenced and called via reflection. When the parser processes a field like: HTTP.URI:request.firstline.uri.query.* where star is an arbitrary field that the parser found this method will be invoked.- Parameters:
field
- name of fieldvalue
- value of field
-
setWildcard
This method is referenced and called via reflection. When the parser processes a field like: HTTP.URI:request.firstline.uri.query.* where star is an arbitrary field that the parser found this method will be invoked.- Parameters:
field
- name of fieldvalue
- value of field
-
setWildcard
This method is referenced and called via reflection. When the parser processes a field like: HTTP.URI:request.firstline.uri.query.* where star is an arbitrary field that the parser found this method will be invoked.- Parameters:
field
- name of fieldvalue
- value of field
-
getStrings
-
getLongs
-
getDoubles
-
getTimestamps
-
addField
public void addField(nl.basjes.parse.core.Parser<HttpdLogRecord> parser, RowSetLoader rowWriter, Map<String, nl.basjes.parse.core.Casts> columnCasts, String parserFieldName, String drillFieldName, Map<String, throws NoSuchMethodExceptionTypeProtos.MinorType> mappedColumns) This record will be used with a single parser. For each field that is to be parsed a setter will be called. It registers a setter method for each field being parsed. It also builds the data writers to hold the data beings parsed.- Parameters:
parser
- The initialized HttpdParserrowWriter
- An initialized RowSetLoader objectcolumnCasts
- The logparser casts used to get the right data from the parserparserFieldName
- The field name which is generated by the Httpd Parser. These are not "Drill safe"drillFieldName
- The Drill safe field namemappedColumns
- A list of columns mapped to their correct Drill data type- Throws:
NoSuchMethodException
- Thrown in the event that the parser does not have a correct setter method
-