mirror of https://github.com/apache/nifi.git
NIFI-4814 - Add distinctive attribute to S2S reporting tasks
NIFI-4814 - added UUID attribute NIFI-4814 - added type attribute Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #2431
This commit is contained in:
parent
b4b970b876
commit
bc37015693
|
@ -159,6 +159,9 @@ public class SiteToSiteBulletinReportingTask extends AbstractSiteToSiteReporting
|
|||
final Map<String, String> attributes = new HashMap<>();
|
||||
final String transactionId = UUID.randomUUID().toString();
|
||||
attributes.put("reporting.task.transaction.id", transactionId);
|
||||
attributes.put("reporting.task.name", getName());
|
||||
attributes.put("reporting.task.uuid", getIdentifier());
|
||||
attributes.put("reporting.task.type", this.getClass().getSimpleName());
|
||||
attributes.put("mime.type", "application/json");
|
||||
|
||||
final byte[] data = jsonArray.toString().getBytes(StandardCharsets.UTF_8);
|
||||
|
|
|
@ -277,6 +277,9 @@ public class SiteToSiteProvenanceReportingTask extends AbstractSiteToSiteReporti
|
|||
final Map<String, String> attributes = new HashMap<>();
|
||||
final String transactionId = UUID.randomUUID().toString();
|
||||
attributes.put("reporting.task.transaction.id", transactionId);
|
||||
attributes.put("reporting.task.name", getName());
|
||||
attributes.put("reporting.task.uuid", getIdentifier());
|
||||
attributes.put("reporting.task.type", this.getClass().getSimpleName());
|
||||
attributes.put("mime.type", "application/json");
|
||||
|
||||
final byte[] data = jsonArray.toString().getBytes(StandardCharsets.UTF_8);
|
||||
|
|
|
@ -158,6 +158,9 @@ public class SiteToSiteStatusReportingTask extends AbstractSiteToSiteReportingTa
|
|||
final Map<String, String> attributes = new HashMap<>();
|
||||
final String transactionId = UUID.randomUUID().toString();
|
||||
attributes.put("reporting.task.transaction.id", transactionId);
|
||||
attributes.put("reporting.task.name", getName());
|
||||
attributes.put("reporting.task.uuid", getIdentifier());
|
||||
attributes.put("reporting.task.type", this.getClass().getSimpleName());
|
||||
attributes.put("mime.type", "application/json");
|
||||
|
||||
JsonArrayBuilder jsonBatchArrayBuilder = factory.createArrayBuilder();
|
||||
|
|
Loading…
Reference in New Issue