Class DetectDuplicate
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.DetectDuplicate
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SupportsBatching(defaultDuration=TWENTY_FIVE_MILLIS)
@Tags({"hash","dupe","duplicate","dedupe"})
@InputRequirement(INPUT_REQUIRED)
@CapabilityDescription("Caches a value, computed from FlowFile attributes, for each incoming FlowFile and determines if the cached value has already been seen. If so, routes the FlowFile to \'duplicate\' with an attribute named \'original.identifier\' that specifies the original FlowFile\'s \"description\", which is specified in the <FlowFile Description> property. If the FlowFile is not determined to be a duplicate, the Processor routes the FlowFile to \'non-duplicate\'")
@WritesAttribute(attribute="original.flowfile.description",
description="All FlowFiles routed to the duplicate relationship will have an attribute added named original.flowfile.description. The value of this attribute is determined by the attributes of the original copy of the data and by the FlowFile Description property.")
@SeeAlso(classNames={"org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService","org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer"})
public class DetectDuplicate
extends org.apache.nifi.processor.AbstractProcessor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate final Serializer<String> static final Stringprivate static final List<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipprivate static final Set<org.apache.nifi.processor.Relationship> private final Deserializer<DetectDuplicate.CacheValue> private final Serializer<DetectDuplicate.CacheValue> -
Constructor Summary
Constructors -
Method Summary
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
-
ORIGINAL_DESCRIPTION_ATTRIBUTE_NAME
- See Also:
-
DISTRIBUTED_CACHE_SERVICE
public static final org.apache.nifi.components.PropertyDescriptor DISTRIBUTED_CACHE_SERVICE -
CACHE_ENTRY_IDENTIFIER
public static final org.apache.nifi.components.PropertyDescriptor CACHE_ENTRY_IDENTIFIER -
FLOWFILE_DESCRIPTION
public static final org.apache.nifi.components.PropertyDescriptor FLOWFILE_DESCRIPTION -
AGE_OFF_DURATION
public static final org.apache.nifi.components.PropertyDescriptor AGE_OFF_DURATION -
CACHE_IDENTIFIER
public static final org.apache.nifi.components.PropertyDescriptor CACHE_IDENTIFIER -
PROPERTY_DESCRIPTORS
-
REL_DUPLICATE
public static final org.apache.nifi.processor.Relationship REL_DUPLICATE -
REL_NON_DUPLICATE
public static final org.apache.nifi.processor.Relationship REL_NON_DUPLICATE -
REL_FAILURE
public static final org.apache.nifi.processor.Relationship REL_FAILURE -
RELATIONSHIPS
-
keySerializer
-
valueSerializer
-
valueDeserializer
-
-
Constructor Details
-
DetectDuplicate
public DetectDuplicate()
-
-
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
-
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
-