boguszj commented on code in PR #11748:
URL: https://github.com/apache/nifi/pull/11748#discussion_r4182097559
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UpdateCounter.java:
##########
@@ -105,4 +130,21 @@ public void migrateProperties(PropertyConfiguration
config) {
config.renameProperty("counter-name", COUNTER_NAME.getName());
config.renameProperty("delta", DELTA.getName());
}
+
+ private Map<String, String> getMetricAttributes(final ProcessContext
context, final FlowFile flowFile) {
+ final Map<String, String> metricAttributes = new HashMap<>();
+ for (final Map.Entry<PropertyDescriptor, String> entry :
context.getProperties().entrySet()) {
+ final PropertyDescriptor descriptor = entry.getKey();
+ if (!descriptor.isDynamic()) {
+ continue;
+ }
+
+ final String attributeValue =
context.getProperty(descriptor).evaluateAttributeExpressions(flowFile).getValue();
+ if (attributeValue != null) {
Review Comment:
Good point, done 👍
--
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]