@EventDriven @Tags(value={"test","debug","processor","utility","flow","FlowFile"}) @CapabilityDescription(value="The DebugFlow processor aids testing and debugging the FlowFile framework by allowing various responses to be explicitly triggered in response to the receipt of a FlowFile or a timer event without a FlowFile if using timer or cron based scheduling. It can force responses needed to exercise or test various failure modes that can occur when a processor runs.") public class DebugFlow extends AbstractProcessor
Modifier and Type | Class and Description |
---|---|
private class |
DebugFlow.FlowFileResponse |
private static class |
DebugFlow.FlowFileResponseState |
private class |
DebugFlow.NoFlowFileResponse |
private static class |
DebugFlow.NoFlowFileResponseState |
private static class |
DebugFlow.RuntimeExceptionValidator |
Constructor and Description |
---|
DebugFlow() |
Modifier and Type | Method and Description |
---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
private void |
fail(boolean isAppropriate,
Class<?> annotationClass) |
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onScheduled(ProcessContext context) |
void |
onStopped(ProcessContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
void |
onUnscheduled(ProcessContext context) |
private void |
sleep(long millis,
boolean ignoreInterrupts) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
private final AtomicReference<Set<Relationship>> relationships
static final Relationship REL_SUCCESS
static final Relationship REL_FAILURE
private final AtomicReference<List<PropertyDescriptor>> propertyDescriptors
static final PropertyDescriptor FF_SUCCESS_ITERATIONS
static final PropertyDescriptor FF_FAILURE_ITERATIONS
static final PropertyDescriptor FF_ROLLBACK_ITERATIONS
static final PropertyDescriptor FF_ROLLBACK_YIELD_ITERATIONS
static final PropertyDescriptor FF_ROLLBACK_PENALTY_ITERATIONS
static final PropertyDescriptor FF_EXCEPTION_ITERATIONS
static final PropertyDescriptor FF_EXCEPTION_CLASS
static final PropertyDescriptor NO_FF_SKIP_ITERATIONS
static final PropertyDescriptor NO_FF_EXCEPTION_ITERATIONS
static final PropertyDescriptor NO_FF_YIELD_ITERATIONS
static final PropertyDescriptor NO_FF_EXCEPTION_CLASS
static final PropertyDescriptor WRITE_ITERATIONS
static final PropertyDescriptor CONTENT_SIZE
static final PropertyDescriptor ON_SCHEDULED_SLEEP_TIME
static final PropertyDescriptor ON_SCHEDULED_FAIL
static final PropertyDescriptor ON_UNSCHEDULED_SLEEP_TIME
static final PropertyDescriptor ON_UNSCHEDULED_FAIL
static final PropertyDescriptor ON_STOPPED_SLEEP_TIME
static final PropertyDescriptor ON_STOPPED_FAIL
static final PropertyDescriptor ON_TRIGGER_SLEEP_TIME
static final PropertyDescriptor CUSTOM_VALIDATE_SLEEP_TIME
static final PropertyDescriptor IGNORE_INTERRUPTS
private volatile Integer flowFileMaxSuccess
private volatile Integer flowFileMaxFailure
private volatile Integer flowFileMaxRollback
private volatile Integer flowFileMaxYield
private volatile Integer flowFileMaxPenalty
private volatile Integer flowFileMaxException
private volatile Integer noFlowFileMaxSkip
private volatile Integer noFlowFileMaxException
private volatile Integer noFlowFileMaxYield
private volatile Integer flowFileCurrSuccess
private volatile Integer flowFileCurrFailure
private volatile Integer flowFileCurrRollback
private volatile Integer flowFileCurrYield
private volatile Integer flowFileCurrPenalty
private volatile Integer flowFileCurrException
private volatile Integer noFlowFileCurrSkip
private volatile Integer noFlowFileCurrException
private volatile Integer noFlowFileCurrYield
private volatile Class<? extends RuntimeException> flowFileExceptionClass
private volatile Class<? extends RuntimeException> noFlowFileExceptionClass
private final DebugFlow.FlowFileResponse curr_ff_resp
private final DebugFlow.NoFlowFileResponse curr_noff_resp
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
@OnScheduled public void onScheduled(ProcessContext context) throws ClassNotFoundException, InterruptedException
@OnUnscheduled public void onUnscheduled(ProcessContext context) throws InterruptedException
InterruptedException
@OnStopped public void onStopped(ProcessContext context) throws InterruptedException
InterruptedException
protected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate
in class AbstractConfigurableComponent
private void sleep(long millis, boolean ignoreInterrupts) throws InterruptedException
InterruptedException
private void fail(boolean isAppropriate, Class<?> annotationClass)
public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger
in class AbstractProcessor
ProcessException
Copyright © 2020 Apache NiFi Project. All rights reserved.