You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "jrsteinebrey (via GitHub)" <gi...@apache.org> on 2024/06/07 19:43:29 UTC
[PR] NIFI-13198 Update RouteText not to write to FlowFiles for auto-terminated relationships [nifi]
jrsteinebrey opened a new pull request, #8939:
URL: https://github.com/apache/nifi/pull/8939
<!-- 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. -->
# Summary
[NIFI-13198](https://issues.apache.org/jira/browse/NIFI-13198)
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI-13198) issue created
### Pull Request Tracking
- [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-13198`
- [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-13198`
### Pull Request Formatting
- [X] Pull Request based on current revision of the `main` branch
- [X] Pull Request refers to a feature branch with one commit containing changes
# Verification
Ran unit tests.
Tested the RouteText processor in the UI.
### Build
- [X] Build completed using `mvn clean install -P contrib-check`
- [X] JDK 21
### Licensing
No new files or dependencies
### Documentation
No documentation changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13198 Update RouteText not to write to FlowFiles for auto-terminated relationships [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #8939:
URL: https://github.com/apache/nifi/pull/8939#issuecomment-2173553058
To qualify my previous comment, this could be useful in some specific scenarios, when dealing with the content specifically, so removing the conditional around the attribute change and retaining the conditional around the content handling might be useful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13198 Update RouteText not to write to FlowFiles for auto-terminated relationships [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #8939:
URL: https://github.com/apache/nifi/pull/8939#discussion_r1642886871
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteText.java:
##########
@@ -549,7 +550,9 @@ public void process(final InputStream in) throws IOException {
FlowFile flowFile = originalFlowFile;
logger.info("Routing {} to {}", flowFile, REL_ORIGINAL);
session.getProvenanceReporter().route(originalFlowFile, REL_ORIGINAL);
- flowFile = session.putAttribute(flowFile, ROUTE_ATTRIBUTE_KEY, REL_ORIGINAL.getName());
+ if (!context.isAutoTerminated(REL_ORIGINAL)) {
+ flowFile = session.putAttribute(flowFile, ROUTE_ATTRIBUTE_KEY, REL_ORIGINAL.getName());
+ }
Review Comment:
I recommend removing this check and only retaining the conditional for the content-based processing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13198 Update RouteText not to write to FlowFiles for auto-terminated relationships [nifi]
Posted by "jrsteinebrey (via GitHub)" <gi...@apache.org>.
jrsteinebrey commented on code in PR #8939:
URL: https://github.com/apache/nifi/pull/8939#discussion_r1643091531
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteText.java:
##########
@@ -549,7 +550,9 @@ public void process(final InputStream in) throws IOException {
FlowFile flowFile = originalFlowFile;
logger.info("Routing {} to {}", flowFile, REL_ORIGINAL);
session.getProvenanceReporter().route(originalFlowFile, REL_ORIGINAL);
- flowFile = session.putAttribute(flowFile, ROUTE_ATTRIBUTE_KEY, REL_ORIGINAL.getName());
+ if (!context.isAutoTerminated(REL_ORIGINAL)) {
+ flowFile = session.putAttribute(flowFile, ROUTE_ATTRIBUTE_KEY, REL_ORIGINAL.getName());
+ }
Review Comment:
@exceptionfactory I removed the isAutoTerminated check for REL_ORIGINAL
and retained the conditional for the content-based processing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13198 Update RouteText not to write to FlowFiles for auto-terminated relationships [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory closed pull request #8939: NIFI-13198 Update RouteText not to write to FlowFiles for auto-terminated relationships
URL: https://github.com/apache/nifi/pull/8939
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org