[
https://issues.apache.org/jira/browse/NIFI-1829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15332380#comment-15332380
]
ASF GitHub Bot commented on NIFI-1829:
--------------------------------------
Github user mosermw commented on a diff in the pull request:
https://github.com/apache/nifi/pull/458#discussion_r67230167
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DebugFlow.java
---
@@ -0,0 +1,499 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.standard;
+
+import org.apache.http.annotation.ThreadSafe;
+import org.apache.nifi.annotation.behavior.EventDriven;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.components.ValidationContext;
+import org.apache.nifi.components.ValidationResult;
+import org.apache.nifi.components.Validator;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.flowfile.attributes.CoreAttributes;
+import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+@ThreadSafe()
+@EventDriven()
+@Tags({"test", "debug", "processor", "utility", "flow", "FlowFile"})
+@CapabilityDescription("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.\n"
+ + "\n"
+ + "When triggered, the processor loops through the appropriate
response list (based on whether or not it "
+ + "received a FlowFile). A response is produced the configured
number of times for each pass through its"
+ + "response list, as long as the processor is running.\n"
+ + "\n"
+ + "Triggered by a FlowFile, the processor can produce the
following responses."
+ + " 1. transfer FlowFile to success relationship.\n"
+ + " 2. transfer FlowFile to failure relationship.\n"
+ + " 3. rollback the FlowFile without penalty.\n"
+ + " 4. rollback the FlowFile and yield the context.\n"
+ + " 5. rollback the FlowFile with penalty.\n"
+ + " 6. throw an exception.\n"
+ + "\n"
+ + "Triggered without a FlowFile, the processor can produce the
following responses."
+ + " 1. do nothing and return.\n"
+ + " 2. throw an exception.\n"
+ + " 3. yield the context.\n")
--- End diff --
Formatting with \n doesn't work inside a CapabilityDescription annotation.
It just gets smashed together. If you are OK with that @jskora then we can
leave it.
> Create FlowDebugger processor
> -----------------------------
>
> Key: NIFI-1829
> URL: https://issues.apache.org/jira/browse/NIFI-1829
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Joe Skora
> Assignee: Joe Skora
> Priority: Minor
> Fix For: 1.0.0, 0.7.0
>
>
> The FlowDebugger processor allows a variety of Processor responses and
> failures to be simulated for testing, debugging, and troubleshooting the
> framework.
> Responses it can produce on receipt of a flowfile include Transfer to
> Success, Transfer to Failure, Rollback without Penalty, Rollback and Yield,
> Rollback with Penalty, and Throw an Exception. The properties indicate how
> many times that response should be thrown, for example if configured with
> Success=10 and Failure=40, it will transfer the first 10 flowfiles to
> Success, transfer the next 40 to Failure, and then repeat.
> Similarly, responses it can produce when triggered without a flowfile include
> Throw an Exception, Yield, and Return (do nothing).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)