@EventDriven @SupportsBatching @SideEffectFree @InputRequirement(value=INPUT_REQUIRED) @Tags(value={"grok","log","text","parse","delimit","extract"}) @CapabilityDescription(value="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(value=@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 AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
private static String |
APPLICATION_JSON |
private BlockingQueue<byte[]> |
bufferQueue |
static PropertyDescriptor |
CHARACTER_SET |
private static String |
DEFAULT_PATTERN_NAME |
private static List<PropertyDescriptor> |
descriptors |
static PropertyDescriptor |
DESTINATION |
static String |
FLOWFILE_ATTRIBUTE |
static String |
FLOWFILE_CONTENT |
private io.krakens.grok.api.Grok |
grok |
static PropertyDescriptor |
GROK_EXPRESSION |
static PropertyDescriptor |
GROK_PATTERNS |
static PropertyDescriptor |
KEEP_EMPTY_CAPTURES |
private AtomicBoolean |
keepEmptyCaputures |
static PropertyDescriptor |
MAX_BUFFER_SIZE |
static PropertyDescriptor |
NAMED_CAPTURES_ONLY |
static Relationship |
REL_MATCH |
static Relationship |
REL_NO_MATCH |
private static Set<Relationship> |
relationships |
| Constructor and Description |
|---|
ExtractGrok() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
Set<Relationship> |
getRelationships() |
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onScheduled(ProcessContext context) |
void |
onStopped() |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final String FLOWFILE_ATTRIBUTE
public static final String FLOWFILE_CONTENT
private static final String APPLICATION_JSON
private static final String DEFAULT_PATTERN_NAME
public static final PropertyDescriptor GROK_EXPRESSION
public static final PropertyDescriptor GROK_PATTERNS
public static final PropertyDescriptor KEEP_EMPTY_CAPTURES
public static final PropertyDescriptor DESTINATION
public static final PropertyDescriptor CHARACTER_SET
public static final PropertyDescriptor MAX_BUFFER_SIZE
public static final PropertyDescriptor NAMED_CAPTURES_ONLY
public static final Relationship REL_MATCH
public static final Relationship REL_NO_MATCH
private static final List<PropertyDescriptor> descriptors
private static final Set<Relationship> relationships
private volatile io.krakens.grok.api.Grok grok
private final BlockingQueue<byte[]> bufferQueue
private final AtomicBoolean keepEmptyCaputures
public Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic final List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnStopped public void onStopped()
protected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponent@OnScheduled public void onScheduled(ProcessContext context) throws io.krakens.grok.api.exception.GrokException, IOException
io.krakens.grok.api.exception.GrokExceptionIOExceptionpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionCopyright © 2023 Apache NiFi Project. All rights reserved.