ChrisSamo632 commented on code in PR #6544:
URL: https://github.com/apache/nifi/pull/6544#discussion_r1014633597
##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/ElasticsearchRestProcessor.java:
##########
@@ -117,13 +123,66 @@ default String getQuery(final FlowFile input, final
ProcessContext context, fina
}
default Map<String, String> getUrlQueryParameters(final ProcessContext
context, final FlowFile flowFile) {
+ return getUrlQueryParameters(context, flowFile != null ?
flowFile.getAttributes() : null);
+ }
+
+ default Map<String, String> getUrlQueryParameters(final ProcessContext
context, final Map<String, String> attributes) {
return context.getProperties().entrySet().stream()
// filter non-null dynamic properties
.filter(e -> e.getKey().isDynamic() && e.getValue() != null)
// convert to Map of URL parameter keys and values
.collect(Collectors.toMap(
- e -> e.getKey().getName(),
- e ->
context.getProperty(e.getKey()).evaluateAttributeExpressions(flowFile).getValue()
+ e -> e.getKey().getName(),
+ e ->
context.getProperty(e.getKey()).evaluateAttributeExpressions(attributes).getValue()
));
}
+
+ String VERIFICATION_STEP_INDEX_EXISTS = "Elasticsearch Index Exists";
+
+ @Override
+ default List<ConfigVerificationResult> verify(final ProcessContext
context, final ComponentLog verificationLogger, final Map<String, String>
attributes) {
Review Comment:
To be fair, maybe it should be a `FAILED` status for processors that
wouldn't create the index, e.g. Get or Query
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]