Class ScanAttribute
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.ScanAttribute
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SideEffectFree
@SupportsBatching
@InputRequirement(INPUT_REQUIRED)
@Tags({"scan","attributes","search","lookup","find","text"})
@CapabilityDescription("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 org.apache.nifi.processor.AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorprivate Patternstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate Patternprivate SynchronousFileWatcherstatic final Stringstatic final Stringstatic 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 TypeMethodDescriptionprivate booleanallMatch(org.apache.nifi.flowfile.FlowFile flowFile, Pattern attributePattern, Set<String> dictionary) private booleananyMatch(org.apache.nifi.flowfile.FlowFile flowFile, Pattern attributePattern, Set<String> dictionary) createDictionary(org.apache.nifi.processor.ProcessContext context) Set<org.apache.nifi.processor.Relationship> protected List<org.apache.nifi.components.PropertyDescriptor> voidonScheduled(org.apache.nifi.processor.ProcessContext context) voidonTrigger(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
customValidate, 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
-
MATCH_CRITERIA_ALL
- See Also:
-
MATCH_CRITERIA_ANY
- See Also:
-
MATCHING_CRITERIA
public static final org.apache.nifi.components.PropertyDescriptor MATCHING_CRITERIA -
ATTRIBUTE_PATTERN
public static final org.apache.nifi.components.PropertyDescriptor ATTRIBUTE_PATTERN -
DICTIONARY_FILE
public static final org.apache.nifi.components.PropertyDescriptor DICTIONARY_FILE -
DICTIONARY_FILTER
public static final org.apache.nifi.components.PropertyDescriptor DICTIONARY_FILTER -
PROPERTY_DESCRIPTORS
-
REL_MATCHED
public static final org.apache.nifi.processor.Relationship REL_MATCHED -
REL_UNMATCHED
public static final org.apache.nifi.processor.Relationship REL_UNMATCHED -
RELATIONSHIPS
-
dictionaryFilterPattern
-
attributePattern
-
dictionaryTerms
-
fileWatcher
-
-
Constructor Details
-
ScanAttribute
public ScanAttribute()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
onScheduled
@OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context) throws IOException - Throws:
IOException
-
createDictionary
private Set<String> createDictionary(org.apache.nifi.processor.ProcessContext context) throws IOException - Throws:
IOException
-
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
-
allMatch
-
anyMatch
-