@Tags(value={"provenance","lineage","tracking","site","site to site"})
@CapabilityDescription(value="Publishes Provenance events using the Site To Site protocol.")
@Stateful(scopes=LOCAL,
description="Stores the Reporting Task\'s last event Id so that on restart of MiNiFi the task knows where it left off.")
public class ProvenanceReportingTask
extends org.apache.nifi.reporting.AbstractReportingTask
| Modifier and Type | Class and Description |
|---|---|
private static class |
ProvenanceReportingTask.NiFiUrlValidator |
| Modifier and Type | Field and Description |
|---|---|
(package private) static org.apache.nifi.components.PropertyDescriptor |
BATCH_SIZE |
(package private) static org.apache.nifi.components.PropertyDescriptor |
COMPRESS |
(package private) static org.apache.nifi.components.PropertyDescriptor |
DESTINATION_URL |
private long |
firstEventId |
private static String |
LAST_EVENT_ID_KEY |
(package private) static org.apache.nifi.components.PropertyDescriptor |
MINIFI_URL |
(package private) static org.apache.nifi.components.PropertyDescriptor |
PORT_NAME |
private org.apache.nifi.remote.client.SiteToSiteClient |
siteToSiteClient |
(package private) static org.apache.nifi.components.PropertyDescriptor |
SSL_CONTEXT |
(package private) static org.apache.nifi.components.PropertyDescriptor |
TIMEOUT |
private static String |
TIMESTAMP_FORMAT |
| Constructor and Description |
|---|
ProvenanceReportingTask() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
addField(javax.json.JsonObjectBuilder builder,
javax.json.JsonBuilderFactory factory,
String key,
Collection<String> values) |
private static void |
addField(javax.json.JsonObjectBuilder builder,
javax.json.JsonBuilderFactory factory,
String key,
Map<String,String> values) |
private static void |
addField(javax.json.JsonObjectBuilder builder,
String key,
Long value) |
private static void |
addField(javax.json.JsonObjectBuilder builder,
String key,
String value) |
private static javax.json.JsonArrayBuilder |
createJsonArray(javax.json.JsonBuilderFactory factory,
Collection<String> values) |
protected org.apache.nifi.remote.client.SiteToSiteClient |
getClient() |
private String |
getComponentName(org.apache.nifi.controller.status.ProcessGroupStatus status,
org.apache.nifi.provenance.ProvenanceEventRecord event) |
protected List<org.apache.nifi.components.PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onTrigger(org.apache.nifi.reporting.ReportingContext context) |
(package private) static javax.json.JsonObject |
serialize(javax.json.JsonBuilderFactory factory,
javax.json.JsonObjectBuilder builder,
org.apache.nifi.provenance.ProvenanceEventRecord event,
String componentName,
String hostname,
URL nifiUrl,
String applicationName) |
void |
setup(org.apache.nifi.controller.ConfigurationContext context) |
void |
shutdown() |
getControllerServiceLookup, getIdentifier, getLogger, getName, getSchedulingPeriod, init, initializecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateprivate static final String TIMESTAMP_FORMAT
private static final String LAST_EVENT_ID_KEY
static final org.apache.nifi.components.PropertyDescriptor DESTINATION_URL
static final org.apache.nifi.components.PropertyDescriptor PORT_NAME
static final org.apache.nifi.components.PropertyDescriptor SSL_CONTEXT
static final org.apache.nifi.components.PropertyDescriptor MINIFI_URL
static final org.apache.nifi.components.PropertyDescriptor COMPRESS
static final org.apache.nifi.components.PropertyDescriptor TIMEOUT
static final org.apache.nifi.components.PropertyDescriptor BATCH_SIZE
private volatile long firstEventId
private volatile org.apache.nifi.remote.client.SiteToSiteClient siteToSiteClient
protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent@OnScheduled
public void setup(org.apache.nifi.controller.ConfigurationContext context)
throws IOException
IOException@OnStopped
public void shutdown()
throws IOException
IOExceptionprotected org.apache.nifi.remote.client.SiteToSiteClient getClient()
private String getComponentName(org.apache.nifi.controller.status.ProcessGroupStatus status, org.apache.nifi.provenance.ProvenanceEventRecord event)
public void onTrigger(org.apache.nifi.reporting.ReportingContext context)
static javax.json.JsonObject serialize(javax.json.JsonBuilderFactory factory,
javax.json.JsonObjectBuilder builder,
org.apache.nifi.provenance.ProvenanceEventRecord event,
String componentName,
String hostname,
URL nifiUrl,
String applicationName)
private static void addField(javax.json.JsonObjectBuilder builder,
javax.json.JsonBuilderFactory factory,
String key,
Map<String,String> values)
private static void addField(javax.json.JsonObjectBuilder builder,
javax.json.JsonBuilderFactory factory,
String key,
Collection<String> values)
private static void addField(javax.json.JsonObjectBuilder builder,
String key,
String value)
private static javax.json.JsonArrayBuilder createJsonArray(javax.json.JsonBuilderFactory factory,
Collection<String> values)
Copyright © 2016 Apache NiFi Project. All rights reserved.