@EventDriven @SideEffectFree @SupportsBatching @InputRequirement(value=INPUT_REQUIRED) @Tags(value={"scan","attributes","search","lookup","find","text"}) @CapabilityDescription(value="Scans the specified attributes of FlowFiles, checking to see if any of their values are present within the specified dictionary of terms") public class ScanAttribute extends AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
ATTRIBUTE_PATTERN |
private Pattern |
attributePattern |
static PropertyDescriptor |
DICTIONARY_FILE |
static PropertyDescriptor |
DICTIONARY_FILTER |
private Pattern |
dictionaryFilterPattern |
private Set<String> |
dictionaryTerms |
private SynchronousFileWatcher |
fileWatcher |
static String |
MATCH_CRITERIA_ALL |
static String |
MATCH_CRITERIA_ANY |
static PropertyDescriptor |
MATCHING_CRITERIA |
private List<PropertyDescriptor> |
properties |
static Relationship |
REL_MATCHED |
static Relationship |
REL_UNMATCHED |
private Set<Relationship> |
relationships |
| Constructor and Description |
|---|
ScanAttribute() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
allMatch(FlowFile flowFile,
Pattern attributePattern,
Set<String> dictionary) |
private boolean |
anyMatch(FlowFile flowFile,
Pattern attributePattern,
Set<String> dictionary) |
private Set<String> |
createDictionary(ProcessContext context) |
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onScheduled(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final String MATCH_CRITERIA_ALL
public static final String MATCH_CRITERIA_ANY
public static final PropertyDescriptor MATCHING_CRITERIA
public static final PropertyDescriptor ATTRIBUTE_PATTERN
public static final PropertyDescriptor DICTIONARY_FILE
public static final PropertyDescriptor DICTIONARY_FILTER
private List<PropertyDescriptor> properties
private Set<Relationship> relationships
private volatile Pattern dictionaryFilterPattern
private volatile Pattern attributePattern
private volatile SynchronousFileWatcher fileWatcher
public static final Relationship REL_MATCHED
public static final Relationship REL_UNMATCHED
protected void init(ProcessorInitializationContext context)
init in class AbstractSessionFactoryProcessorprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessor@OnScheduled public void onScheduled(ProcessContext context) throws IOException
IOExceptionprivate Set<String> createDictionary(ProcessContext context) throws IOException
IOExceptionpublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprivate boolean allMatch(FlowFile flowFile, Pattern attributePattern, Set<String> dictionary)
Copyright © 2023 Apache NiFi Project. All rights reserved.