Class RetryFlowFile
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.RetryFlowFile
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@Tags({"Retry","FlowFile"})
@CapabilityDescription("FlowFiles passed to this Processor have a \'Retry Attribute\' value checked against a configured \'Maximum Retries\' value. If the current attribute value is below the configured maximum, the FlowFile is passed to a retry relationship. The FlowFile may or may not be penalized in that condition. If the FlowFile\'s attribute value exceeds the configured maximum, the FlowFile will be passed to a \'retries_exceeded\' relationship. WARNING: If the incoming FlowFile has a non-numeric value in the configured \'Retry Attribute\' attribute, it will be reset to \'1\'. You may choose to fail the FlowFile instead of performing the reset. Additional dynamic properties can be defined for any attributes you wish to add to the FlowFiles transferred to \'retries_exceeded\'. These attributes support attribute expression language.")
@InputRequirement(INPUT_REQUIRED)
@SupportsBatching
@SideEffectFree
@ReadsAttribute(attribute="Retry Attribute",
description="Will read the attribute or attribute expression language result as defined in \'Retry Attribute\'")
@WritesAttribute(attribute="Retry Attribute",description="User defined retry attribute is updated with the current retry count") @WritesAttribute(attribute="Retry Attribute .uuid",description="User defined retry attribute with .uuid that determines what processor retried the FlowFile last")
@DynamicProperty(name="Exceeded FlowFile Attribute Key",
value="The value of the attribute added to the FlowFile",
description="One or more dynamic properties can be used to add attributes to FlowFiles passed to the \'retries_exceeded\' relationship",
expressionLanguageScope=FLOWFILE_ATTRIBUTES)
public class RetryFlowFile
extends org.apache.nifi.processor.AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.AllowableValueprivate Booleanstatic final org.apache.nifi.processor.Relationshipprivate Stringstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate Booleanprivate static final List<org.apache.nifi.components.PropertyDescriptor> private static final Set<org.apache.nifi.processor.Relationship> static final org.apache.nifi.components.AllowableValuestatic final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.components.PropertyDescriptorprivate Stringstatic final org.apache.nifi.components.PropertyDescriptorprivate Stringstatic final org.apache.nifi.components.AllowableValue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<org.apache.nifi.processor.Relationship> protected org.apache.nifi.components.PropertyDescriptorgetSupportedDynamicPropertyDescriptor(String propertyDescriptorName) 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, 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
-
RETRY_ATTRIBUTE
public static final org.apache.nifi.components.PropertyDescriptor RETRY_ATTRIBUTE -
MAXIMUM_RETRIES
public static final org.apache.nifi.components.PropertyDescriptor MAXIMUM_RETRIES -
PENALIZE_RETRIED
public static final org.apache.nifi.components.PropertyDescriptor PENALIZE_RETRIED -
FAIL_ON_OVERWRITE
public static final org.apache.nifi.components.PropertyDescriptor FAIL_ON_OVERWRITE -
FAIL_ON_REUSE
public static final org.apache.nifi.components.AllowableValue FAIL_ON_REUSE -
WARN_ON_REUSE
public static final org.apache.nifi.components.AllowableValue WARN_ON_REUSE -
RESET_ON_REUSE
public static final org.apache.nifi.components.AllowableValue RESET_ON_REUSE -
REUSE_MODE
public static final org.apache.nifi.components.PropertyDescriptor REUSE_MODE -
PROPERTY_DESCRIPTORS
-
RETRY
public static final org.apache.nifi.processor.Relationship RETRY -
RETRIES_EXCEEDED
public static final org.apache.nifi.processor.Relationship RETRIES_EXCEEDED -
FAILURE
public static final org.apache.nifi.processor.Relationship FAILURE -
RELATIONSHIPS
-
retryAttribute
-
penalizeRetried
-
failOnOverwrite
-
reuseMode
-
lastRetriedBy
-
-
Constructor Details
-
RetryFlowFile
public RetryFlowFile()
-
-
Method Details
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
getSupportedDynamicPropertyDescriptor
protected org.apache.nifi.components.PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) - Overrides:
getSupportedDynamicPropertyDescriptorin classorg.apache.nifi.components.AbstractConfigurableComponent
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onScheduled
@OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context) -
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
-