Class ExtractGrok
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.ExtractGrok
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SupportsBatching
@SideEffectFree
@InputRequirement(INPUT_REQUIRED)
@Tags({"grok","log","text","parse","delimit","extract"})
@CapabilityDescription("Evaluates one or more Grok Expressions against the content of a FlowFile, adding the results as attributes or replacing the content of the FlowFile with a JSON notation of the matched content")
@WritesAttributes(@WritesAttribute(attribute="grok.XXX",description="When operating in flowfile-attribute mode, each of the Grok identifier that is matched in the flowfile will be added as an attribute, prefixed with \"grok.\" For example,if the grok identifier \"timestamp\" is matched, then the value will be added to an attribute named \"grok.timestamp\""))
@Restricted(restrictions=@Restriction(requiredPermission=REFERENCE_REMOTE_RESOURCES,explanation="Patterns can reference resources over HTTP"))
public class ExtractGrok
extends org.apache.nifi.processor.AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final BlockingQueue<byte[]> static final org.apache.nifi.components.PropertyDescriptorprivate static final Stringstatic final org.apache.nifi.components.PropertyDescriptorstatic final Stringstatic final Stringprivate io.krakens.grok.api.Grokstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate final AtomicBooleanstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final List<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipprivate static final Set<org.apache.nifi.processor.Relationship> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) Set<org.apache.nifi.processor.Relationship> final List<org.apache.nifi.components.PropertyDescriptor> voidonScheduled(org.apache.nifi.processor.ProcessContext context) voidvoidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) Methods inherited from class org.apache.nifi.processor.AbstractProcessor
onTriggerMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
FLOWFILE_ATTRIBUTE
- See Also:
-
FLOWFILE_CONTENT
- See Also:
-
APPLICATION_JSON
- See Also:
-
DEFAULT_PATTERN_NAME
- See Also:
-
GROK_EXPRESSION
public static final org.apache.nifi.components.PropertyDescriptor GROK_EXPRESSION -
GROK_PATTERNS
public static final org.apache.nifi.components.PropertyDescriptor GROK_PATTERNS -
KEEP_EMPTY_CAPTURES
public static final org.apache.nifi.components.PropertyDescriptor KEEP_EMPTY_CAPTURES -
DESTINATION
public static final org.apache.nifi.components.PropertyDescriptor DESTINATION -
CHARACTER_SET
public static final org.apache.nifi.components.PropertyDescriptor CHARACTER_SET -
MAX_BUFFER_SIZE
public static final org.apache.nifi.components.PropertyDescriptor MAX_BUFFER_SIZE -
NAMED_CAPTURES_ONLY
public static final org.apache.nifi.components.PropertyDescriptor NAMED_CAPTURES_ONLY -
PROPERTY_DESCRIPTORS
-
REL_MATCH
public static final org.apache.nifi.processor.Relationship REL_MATCH -
REL_NO_MATCH
public static final org.apache.nifi.processor.Relationship REL_NO_MATCH -
RELATIONSHIPS
-
grok
private volatile io.krakens.grok.api.Grok grok -
bufferQueue
-
keepEmptyCaputures
-
-
Constructor Details
-
ExtractGrok
public ExtractGrok()
-
-
Method Details
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onStopped
@OnStopped public void onStopped() -
customValidate
protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) - Overrides:
customValidatein classorg.apache.nifi.components.AbstractConfigurableComponent
-
onScheduled
@OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context) throws io.krakens.grok.api.exception.GrokException, IOException - Throws:
io.krakens.grok.api.exception.GrokExceptionIOException
-
onTrigger
public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException - Specified by:
onTriggerin classorg.apache.nifi.processor.AbstractProcessor- Throws:
org.apache.nifi.processor.exception.ProcessException
-