[
https://issues.apache.org/jira/browse/NIFI-13422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard updated NIFI-13422:
----------------------------------
Fix Version/s: 1.27.0
(was: 1.26.1)
> QueryNiFiReportingTask gives error when joining tables
> ------------------------------------------------------
>
> Key: NIFI-13422
> URL: https://issues.apache.org/jira/browse/NIFI-13422
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Matt Burgess
> Assignee: Matt Burgess
> Priority: Major
> Fix For: 1.27.0
>
>
> Using QueryNiFiReportingTask in 1.x, an error occurs when doing a join on
> tables, such as:
> SELECT
> CONNECTION_STATUS.id,
> CONNECTION_STATUS.name,
> CONNECTION_STATUS.sourceName,
> CONNECTION_STATUS.destinationName,
> CONNECTION_STATUS.queuedCount,
> CONNECTION_STATUS.backPressureObjectThreshold,
> CONNECTION_STATUS_PREDICTIONS.predictedTimeToCountBackpressureMillis
> FROM CONNECTION_STATUS
> JOIN CONNECTION_STATUS_PREDICTIONS ON
> CONNECTION_STATUS_PREDICTIONS.connectionId = CONNECTION_STATUS.id
> WHERE
> predictedTimeToCountBackpressureMillis < 300000
> OR (backPressureObjectThreshold <> 0 AND queuedCount * 100 /
> backPressureObjectThreshold > 75)
> The error is:
> 2024-06-13 17:26:03,034 INFO
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent:
> QueryNiFiReportingTask[id=1229bc0c-0190-1000-ffff-ffffca3d5135] started.
> 2024-06-13 17:26:03,048 ERROR
> org.apache.nifi.reporting.sql.QueryNiFiReportingTask:
> QueryNiFiReportingTask[id=1229bc0c-0190-1000-ffff-ffffca3d5135] Error running
> task QueryNiFiReportingTask[id=1229bc0c-0190-1000-ffff-ffffca3d5135] due to
> java.lang.AssertionError: Rule's description should be unique; existing
> rule=ConnectionStatusProjectTableScanRule; new
> rule=ConnectionStatusProjectTableScanRule
> 2024-06-13 17:26:06,437 INFO
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent: Stopped
> scheduling QueryNiFiReportingTask[id=1229bc0c-0190-1000-ffff-ffffca3d5135] to
> run
> This is because the ScanRules use a singleton instance. The main (2.x) branch
> does not suffer from this because that bundle has been since refactored, but
> we should fix it on the 1.x branch. The ScanRule implementations should
> create new instances as necessary, and the description field is not necessary.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)