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
  • Field Details

    • ORIGINAL_DESCRIPTION_ATTRIBUTE_NAME

      public static final String 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

      private static final List<org.apache.nifi.components.PropertyDescriptor> 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

      private static final Set<org.apache.nifi.processor.Relationship> RELATIONSHIPS
    • keySerializer

      private final Serializer<String> keySerializer
    • valueSerializer

      private final Serializer<DetectDuplicate.CacheValue> valueSerializer
    • valueDeserializer

      private final Deserializer<DetectDuplicate.CacheValue> valueDeserializer
  • Constructor Details

    • DetectDuplicate

      public DetectDuplicate()
  • Method Details

    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • getRelationships

      public Set<org.apache.nifi.processor.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.nifi.processor.Processor
      Overrides:
      getRelationships in class org.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:
      onTrigger in class org.apache.nifi.processor.AbstractProcessor
      Throws:
      org.apache.nifi.processor.exception.ProcessException