New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-6780: Add QueryNiFiReportingTask, RecordSinkService, S2S and DB impls #3826
Conversation
...-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
Outdated
Show resolved
Hide resolved
...-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/MetricsSqlQueryService.java
Outdated
Show resolved
Hide resolved
@mattyb149 I ran into an exception when I attempted to query the CONNECTION_STATUS_PREDICTIONS table when predictions were not enabled. Exception is below:
Recommend checking for the existence of this table first if possible and having an exception that aligns with the fact that the table is missing. |
import java.util.List; | ||
import java.util.Map; | ||
import java.util.concurrent.TimeUnit; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need tags, descriptions and other helpful notes for user config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂ forgot to add those, good catch, will do that now
@mattyb149 I've run several tests, confirming that the changes to existing Site-to-Site reporting task worked properly, testing queries for the QueryNiFiReporting task and testing both Site-to-Site Record Sink and Database Record Sink. Also included testing with security enabled. Beyond the areas I've highlighted things look great. Thanks for adding this feature! One thing to note is to review the size of the resulting nars from this contribution just to ensure there are no issues with builds/travis. |
…tion, refactor common S2S utils Added QueryNiFiReportingTask to SQL query NiFi status and metrics Add PROCESSOR_STATUS and PROCESS_GROUP_STATUS Add CONNECTION_STATUS_PREDICTIONS check for null predictions Add ConnectionStatusRecursiveIterator Fix issue w/ duplicate iterator outputs Refactored query interfaces, fixed assembly POM Rebased v master, fixed isBackPressureEnabled and Checkstyle/RAT errors Add DatabaseRecordSink service (#13) * Add DatabaseRecordSink service * Incorporated review comments
@mattyb149 changes look good I was able to retest scenarios and saw that queries with the prediction table (yet cluster predictions disabled) generate an appropriate exception. The last suggestion I have is to clarify in docs the details of the table's availability. After that (and happy travis build) it's a +1 for me. |
@mattyb149 thanks for the updates! +1 . Will merge shortly |
…impls (apache#3826) * NIFI-6780: Introduce RecordSinkService to separate format and destination, refactor common S2S utils Added QueryNiFiReportingTask to SQL query NiFi status and metrics Add PROCESSOR_STATUS and PROCESS_GROUP_STATUS Add CONNECTION_STATUS_PREDICTIONS check for null predictions Add ConnectionStatusRecursiveIterator Fix issue w/ duplicate iterator outputs Refactored query interfaces, fixed assembly POM Rebased v master, fixed isBackPressureEnabled and Checkstyle/RAT errors Add DatabaseRecordSink service (apache#13) * Add DatabaseRecordSink service * Incorporated review comments * NIFI-6780: Add/fix docs, cleanup warnings, fixed some table definitions * Added bundle profile, remove predictions table if not enabled * Added doc for which tables are available when This closes apache#3826.
Thank you for submitting a contribution to Apache NiFi.
Please provide a short description of the PR here:
Description of PR
Introduce RecordSinkService, to separate format and destination, refactor common S2S utils
Added QueryNiFiReportingTask to SQL query NiFi status and metrics
Expose PROCESSOR_STATUS, PROCESS_GROUP_STATUS, BULLETINS, JVM_METRICS, CONNECTION_STATUS_PREDICTIONS tables
Implement SiteToSiteReportingRecordSink and DatabaseRecordSink
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically
master
)?Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not
squash
or use--force
when pushing to allow for clean monitoring of changes.For code changes:
mvn -Pcontrib-check clean install
at the rootnifi
folder?LICENSE
file, including the mainLICENSE
file undernifi-assembly
?NOTICE
file, including the mainNOTICE
file found undernifi-assembly
?.displayName
in addition to .name (programmatic access) for each of the new properties?For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.