[
https://issues.apache.org/jira/browse/NIFI-5122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16456819#comment-16456819
]
ASF GitHub Bot commented on NIFI-5122:
--------------------------------------
Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2663#discussion_r184757759
--- Diff:
nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/SiteToSiteBulletinReportingTask.java
---
@@ -153,8 +164,12 @@ public void onTrigger(final ReportingContext context) {
attributes.put("reporting.task.type",
this.getClass().getSimpleName());
attributes.put("mime.type", "application/json");
- final byte[] data =
jsonArray.toString().getBytes(StandardCharsets.UTF_8);
- transaction.send(data, attributes);
+ if(context.getProperty(RECORD_WRITER).isSet()) {
--- End diff --
The first one you did also has a customValidate method, can we put that
logic into the base class (not necessarily in the exact customValidate() method
but something all of these can call)? If we add the property to the base class,
then it could be in the base class's customValidate(), your call :)
> Add record writer to S2S Reporting Tasks
> ----------------------------------------
>
> Key: NIFI-5122
> URL: https://issues.apache.org/jira/browse/NIFI-5122
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Pierre Villard
> Assignee: Pierre Villard
> Priority: Major
>
> Just like we have the option to specify a record writer for the new Site To
> Site Metrics Reporting Task, there should be the possibility to specify an
> optional record writer for the other S2S reporting tasks.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)