-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-14141 Accept Expression Language statement in GenerateFlowFile, … #9620
Conversation
…File Size property allowing FlowFiles of variable sizes to be generated. Included some examples of EL statements in Additional Details for GenerateFlowFile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting forward the expression language-based approach @markobean.
I noted a couple things on the validator configuration, and I also recommend simplifying the unit test to avoid using the random()
function. The Additional Details documentation is great, and provides very useful examples, but it isn't necessary to introduce that complexity in the unit test because it is a feature of expression language itself.
...-standard-processors/src/main/java/org/apache/nifi/processors/standard/GenerateFlowFile.java
Outdated
Show resolved
Hide resolved
...ndard-processors/src/test/java/org/apache/nifi/processors/standard/TestGenerateFlowFile.java
Outdated
Show resolved
Hide resolved
...ndard-processors/src/test/java/org/apache/nifi/processors/standard/TestGenerateFlowFile.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the updates @markobean, the simplified unit test approach looks good.
I tested reverting the validator changes and the DATA_SIZE_VALIDATOR
works with and without EL configured in the property, based on the unit tests included. Please review that behavior as it should be possible to revert that change. If you are still seeing an error, there could be something else going on.
...-standard-processors/src/main/java/org/apache/nifi/processors/standard/GenerateFlowFile.java
Outdated
Show resolved
Hide resolved
...-standard-processors/src/main/java/org/apache/nifi/processors/standard/GenerateFlowFile.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working through the feedback @markobean, the latest version looks good! +1 merging
…File Size property allowing FlowFiles of variable sizes to be generated. Included some examples of EL statements in Additional Details for GenerateFlowFile.
Summary
NIFI-14141
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation