Class GrokDataFormat
- java.lang.Object
-
- org.apache.camel.model.IdentifiedType
-
- org.apache.camel.model.DataFormatDefinition
-
- org.apache.camel.model.dataformat.GrokDataFormat
-
@Metadata(label="dataformat,transformation", title="Grok", firstVersion="3.0.0") public class GrokDataFormat extends DataFormatDefinition
Unmarshal unstructured data to objects using Logstash based Grok patterns.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GrokDataFormat.Builder
Builder
is a specific builder forGrokDataFormat
.
-
Constructor Summary
Constructors Constructor Description GrokDataFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAllowMultipleMatchesPerLine()
String
getFlattened()
String
getNamedOnly()
String
getPattern()
void
setAllowMultipleMatchesPerLine(String allowMultipleMatchesPerLine)
If false, every line of input is matched for pattern only once.void
setFlattened(String flattened)
Turns on flattened mode.void
setNamedOnly(String namedOnly)
Whether to capture named expressions only or not (i.e.void
setPattern(String pattern)
The grok pattern to match lines of inputString
toString()
-
Methods inherited from class org.apache.camel.model.DataFormatDefinition
getDataFormat, getDataFormatName, getShortName, setDataFormat, setDataFormatName
-
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
-
-
-
-
Method Detail
-
getPattern
public String getPattern()
-
setPattern
public void setPattern(String pattern)
The grok pattern to match lines of input
-
getFlattened
public String getFlattened()
-
setFlattened
public void setFlattened(String flattened)
Turns on flattened mode. In flattened mode the exception is thrown when there are multiple pattern matches with same key.
-
getAllowMultipleMatchesPerLine
public String getAllowMultipleMatchesPerLine()
-
setAllowMultipleMatchesPerLine
public void setAllowMultipleMatchesPerLine(String allowMultipleMatchesPerLine)
If false, every line of input is matched for pattern only once. Otherwise the line can be scanned multiple times when non-terminal pattern is used.
-
getNamedOnly
public String getNamedOnly()
-
setNamedOnly
public void setNamedOnly(String namedOnly)
Whether to capture named expressions only or not (i.e. %{IP:ip} but not ${IP})
-
-