exceptionfactory commented on code in PR #11107:
URL: https://github.com/apache/nifi/pull/11107#discussion_r3105625298
##########
nifi-extension-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/SiteToSiteBulletinReportingTask.java:
##########
@@ -63,6 +63,16 @@
@DefaultSchedule(strategy = SchedulingStrategy.TIMER_DRIVEN, period = "1 min")
public class SiteToSiteBulletinReportingTask extends
AbstractSiteToSiteReportingTask {
+ static final PropertyDescriptor MINIMUM_BULLETIN_LEVEL = new
PropertyDescriptor.Builder()
+ .name("Minimum Bulletin Level")
+ .description("""
+ The minimum level of bulletins to report. Bulletins at
this level and above will be \
+ sent. For example, selecting WARNING will send WARNING and
ERROR bulletins, but not INFO.""")
+ .required(true)
+ .allowableValues(Severity.INFO.name(), Severity.WARNING.name(),
Severity.ERROR.name())
Review Comment:
It looks like `DEBUG` is missing.
##########
nifi-extension-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/SiteToSiteBulletinReportingTask.java:
##########
@@ -113,22 +124,30 @@ public void onTrigger(final ReportingContext context) {
final String platform =
context.getProperty(SiteToSiteUtils.PLATFORM).evaluateAttributeExpressions().getValue();
final Boolean allowNullValues =
context.getProperty(ALLOW_NULL_VALUES).asBoolean();
+ final String configuredLevel =
context.getProperty(MINIMUM_BULLETIN_LEVEL).getValue();
+ final Severity minimumSeverity = Severity.valueOf(configuredLevel);
Review Comment:
Retrieving the property value should use `asAllowableValue()` to return
`Severity` in one call.
--
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]