-
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-11483 correctly use the DescribedValue enum for JsonQueryElasticsearch processor properties #7195
Conversation
…search processor properties
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 the adjustment @ChrisSamo632. As noted in the comments, it should be possible to use the direct class reference to the enum
that implements DescribedValue
, as opposed to introducing a new method to return an EnumSet
.
@@ -65,7 +65,7 @@ | |||
.name("el-rest-split-up-hits") | |||
.displayName("Search Results Split") | |||
.description("Output a flowfile containing all hits or one flowfile for each individual hit.") | |||
.allowableValues(ResultOutputStrategy.PER_RESPONSE.getValue(), ResultOutputStrategy.PER_HIT.getValue()) | |||
.allowableValues(ResultOutputStrategy.getNonPaginatedResponseOutputStrategies()) |
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.
It should be possible to use ResultOutputStrategy.class
:
.allowableValues(ResultOutputStrategy.getNonPaginatedResponseOutputStrategies()) | |
.allowableValues(ResultOutputStrategy.class) |
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.
Disagree - we don't want all three options here, just the 2, which is why I've put these in a non-paginated
method to provide the filtered EnumSet
The full set of options is needed for the properties of the PaginatedJsonQueryElasticsearch
processor where the COMBINED
option makes sense, but not for the non-paginated processors
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 the clarification @ChrisSamo632, I missed that important detail. In that light, the changes make sense as implemented.
...cessors/src/main/java/org/apache/nifi/processors/elasticsearch/api/ResultOutputStrategy.java
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 again for clarifying the approach @ChrisSamo632, the changes look good. +1 merging
Summary
NIFI-11483 correctly use the DescribedValue enum for JsonQueryElasticsearch processor properties
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
[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy[ ] New dependencies are documented in applicableLICENSE
andNOTICE
filesDocumentation
[ ] Documentation formatting appears as expected in rendered files