DetectDuplicate

Description:

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'

Tags:

hash, dupe, duplicate, dedupe

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Cache Entry IdentifierCache Entry Identifier${hash.value}A FlowFile attribute, or the results of an Attribute Expression Language statement, which will be evaluated against a FlowFile in order to determine the value used to identify duplicates; it is this value that is cached
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
FlowFile DescriptionFlowFile DescriptionWhen a FlowFile is added to the cache, this value is stored along with it so that if a duplicate is found, this description of the original FlowFile will be added to the duplicate's "original.flowfile.description" attribute
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Age Off DurationAge Off DurationTime interval to age off cached FlowFiles
Distributed Cache ServiceDistributed Cache ServiceController Service API:
DistributedMapCacheClient
Implementations: CassandraDistributedMapCache
SimpleRedisDistributedMapCacheClientService
CouchbaseMapCacheClient
HBase_2_ClientMapCacheService
DistributedMapCacheClientService
RedisDistributedMapCacheClientService
HazelcastMapCacheClient
The Controller Service that is used to cache unique identifiers, used to determine duplicates
Cache The Entry IdentifierCache The Entry Identifiertrue
  • true
  • false
When true this cause the processor to check for duplicates and cache the Entry Identifier. When false, the processor would only check for duplicates and not cache the Entry Identifier, requiring another processor to add identifiers to the distributed cache.

Relationships:

NameDescription
duplicateIf a FlowFile has been detected to be a duplicate, it will be routed to this relationship
non-duplicateIf a FlowFile's Cache Entry Identifier was not found in the cache, it will be routed to this relationship
failureIf unable to communicate with the cache, the FlowFile will be penalized and routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
original.flowfile.descriptionAll 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.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

None specified.

See Also:

DistributedMapCacheClientService, DistributedMapCacheServer