[
https://issues.apache.org/jira/browse/NIFI-13075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joe Witt updated NIFI-13075:
----------------------------
Description:
apache nifi slack user reports:
The reporting task runs initially but when stopped and started again, it no
longer processes provenance events until nifi is restarted. I figured by
comparing the implementation to the SiteToSiteProvenance reporting tasks that
it's because the event consumer isn't properly re-initialized [(this if
statement is the
problem)|https://github.com/apache/nifi/blob/6ecc398d3f92425447e43242af4992757e25b3c5/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-reporting-task/src/main/java/org/apache/nifi/reporting/azure/loganalytics/AzureLogAnalyticsProvenanceReportingTask.java#L201].
The SiteToSite task always re-initializes the event consumer always in
onScheduled.
Additionally, not a bug but an enhancement for the
AzureLogAnalyticsProvenanceReportingTask is to keep state of the last processed
event id, like SiteToSite does.
AzureLogAnalyticsProvenanceReportingTask.java
if (consumer != null)
A bit more insight: the reporting task calls consumer.setScheduled(false) in
onUnscheduled, but in onTrigger, due to aforementioned if statement, it never
calls consumer.setScheduled(true), so this might the root cause.
was:
apache nifi slack user reports:
The reporting task runs initially but when stopped and started again, it no
longer processes provenance events until nifi is restarted. I figured by
comparing the implementation to the SiteToSiteProvenance reporting tasks that
it's because the event consumer isn't properly re-initialized [(this if
statement is the
problem)|https://github.com/apache/nifi/blob/6ecc398d3f92425447e43242af4992757e25b3c5/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-reporting-task/src/main/java/org/apache/nifi/reporting/azure/loganalytics/AzureLogAnalyticsProvenanceReportingTask.java#L201].
The SiteToSite task always re-initializes the event consumer always in
onScheduled.
Additionally, not a bug but an enhancement for the
AzureLogAnalyticsProvenanceReportingTask is to keep state of the last processed
event id, like SiteToSite does.
AzureLogAnalyticsProvenanceReportingTask.java
if (consumer != null)
> AzureLogAnalyticsReportingTask does not re-initialize properly
> --------------------------------------------------------------
>
> Key: NIFI-13075
> URL: https://issues.apache.org/jira/browse/NIFI-13075
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Joe Witt
> Priority: Major
>
> apache nifi slack user reports:
> The reporting task runs initially but when stopped and started again, it no
> longer processes provenance events until nifi is restarted. I figured by
> comparing the implementation to the SiteToSiteProvenance reporting tasks that
> it's because the event consumer isn't properly re-initialized [(this if
> statement is the
> problem)|https://github.com/apache/nifi/blob/6ecc398d3f92425447e43242af4992757e25b3c5/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-reporting-task/src/main/java/org/apache/nifi/reporting/azure/loganalytics/AzureLogAnalyticsProvenanceReportingTask.java#L201].
> The SiteToSite task always re-initializes the event consumer always in
> onScheduled.
> Additionally, not a bug but an enhancement for the
> AzureLogAnalyticsProvenanceReportingTask is to keep state of the last
> processed event id, like SiteToSite does.
> AzureLogAnalyticsProvenanceReportingTask.java
> if (consumer != null)
> A bit more insight: the reporting task calls consumer.setScheduled(false) in
> onUnscheduled, but in onTrigger, due to aforementioned if statement, it never
> calls consumer.setScheduled(true), so this might the root cause.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)