Repository: nifi Updated Branches: refs/heads/master 68715a0dd -> fb94e983b
NIFI-2938 Added Write Attributes to RouteText doc and edited Grouping Regular Expression property description Signed-off-by: Pierre Villard <[email protected]> This closes #2232. Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/fb94e983 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/fb94e983 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/fb94e983 Branch: refs/heads/master Commit: fb94e983b66772cd7a8e30ab08e82d2364b21176 Parents: 68715a0 Author: Andrew Lim <[email protected]> Authored: Fri Oct 27 22:15:52 2017 -0400 Committer: Pierre Villard <[email protected]> Committed: Mon Oct 30 09:29:52 2017 +0100 ---------------------------------------------------------------------- .../org/apache/nifi/processors/standard/RouteText.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/fb94e983/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteText.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteText.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteText.java index 01148f2..6872e41 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteText.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteText.java @@ -42,6 +42,8 @@ import org.apache.nifi.annotation.behavior.EventDriven; import org.apache.nifi.annotation.behavior.InputRequirement; import org.apache.nifi.annotation.behavior.SideEffectFree; import org.apache.nifi.annotation.behavior.SupportsBatching; +import org.apache.nifi.annotation.behavior.WritesAttribute; +import org.apache.nifi.annotation.behavior.WritesAttributes; import org.apache.nifi.annotation.behavior.InputRequirement.Requirement; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; @@ -77,6 +79,11 @@ import org.apache.nifi.processors.standard.util.NLKBufferedReader; @DynamicProperty(name = "Relationship Name", value = "value to match against", description = "Routes data that matches the value specified in the Dynamic Property Value to the " + "Relationship specified in the Dynamic Property Key.") @DynamicRelationship(name = "Name from Dynamic Property", description = "FlowFiles that match the Dynamic Property's value") +@WritesAttributes({ + @WritesAttribute(attribute = "RouteText.Route", description = "The name of the relationship to which the FlowFile was routed."), + @WritesAttribute(attribute = "RouteText.Group", description = "The value captured by all capturing groups in the 'Grouping Regular Expression' property. " + + "If this property is not set or contains no capturing groups, this attribute will not be added.") +}) public class RouteText extends AbstractProcessor { public static final String ROUTE_ATTRIBUTE_KEY = "RouteText.Route"; @@ -158,8 +165,8 @@ public class RouteText extends AbstractProcessor { static final PropertyDescriptor GROUPING_REGEX = new PropertyDescriptor.Builder() .name("Grouping Regular Expression") .description("Specifies a Regular Expression to evaluate against each line to determine which Group the line should be placed in. " - + "The Regular Expression must have at least one Capturing Group that defines the line's Group. If multiple Capturing Groups exist in the Regular Expression, the Group from all " - + "Capturing Groups. Two lines will not be placed into the same FlowFile unless the they both have the same value for the Group " + + "The Regular Expression must have at least one Capturing Group that defines the line's Group. If multiple Capturing Groups exist in the Regular Expression, the values from all " + + "Capturing Groups will be concatenated together. Two lines will not be placed into the same FlowFile unless they both have the same value for the Group " + "(or neither line matches the Regular Expression). For example, to group together all lines in a CSV File by the first column, we can set this value to \"(.*?),.*\". " + "Two lines that have the same Group but different Relationships will never be placed into the same FlowFile.") .addValidator(StandardValidators.createRegexValidator(1, Integer.MAX_VALUE, false)) @@ -635,4 +642,4 @@ public class RouteText extends AbstractProcessor { return true; } } -} \ No newline at end of file +}
