@Tags(value={"status","metrics","history","site","site to site"}) @CapabilityDescription(value="Publishes Status events using the Site To Site protocol. The component type and name filter regexes form a union: only components matching both regexes will be reported. However, all process groups are recursively searched for matching components, regardless of whether the process group matches the component filters.") public class SiteToSiteStatusReportingTask extends AbstractSiteToSiteReportingTask
| Modifier and Type | Field and Description |
|---|---|
(package private) static PropertyDescriptor |
COMPONENT_NAME_FILTER_REGEX |
(package private) static PropertyDescriptor |
COMPONENT_TYPE_FILTER_REGEX |
private Pattern |
componentNameFilter |
private Pattern |
componentTypeFilter |
(package private) static PropertyDescriptor |
PLATFORM |
private Map<String,String> |
processGroupIDToPath |
ALLOW_NULL_VALUES, DESTINATION_URL_PATH, LAST_EVENT_ID_KEY, RECORD_WRITER, recordSchema, siteToSiteClient, TIMESTAMP_FORMAT| Constructor and Description |
|---|
SiteToSiteStatusReportingTask() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addCommonFields(javax.json.JsonObjectBuilder builder,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
String componentType,
String componentName,
Boolean allowNullValues) |
private static void |
addField(javax.json.JsonObjectBuilder builder,
javax.json.JsonBuilderFactory factory,
String key,
Map<String,Long> values,
Boolean allowNullValues) |
private boolean |
componentMatchesFilters(String componentType,
String componentName)
Returns true only if the component type matches the component type filter
and the component name matches the component name filter.
|
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onTrigger(ReportingContext context) |
private void |
serializeConnectionStatus(javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
ConnectionStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues) |
private void |
serializePortStatus(String componentType,
javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
PortStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues) |
private void |
serializeProcessGroupStatus(javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
ProcessGroupStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues)
Serialize the ProcessGroupStatus and add it to the JsonArrayBuilder.
|
private void |
serializeProcessorStatus(javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
ProcessorStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues) |
private void |
serializeRemoteProcessGroupStatus(javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
RemoteProcessGroupStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues) |
addField, addField, addField, addField, getClient, getData, sendData, setup, shutdown, verifygetControllerServiceLookup, getIdentifier, getLogger, getName, getNodeTypeProvider, getSchedulingPeriod, init, initialize, setComponentInfocustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatestatic final PropertyDescriptor PLATFORM
static final PropertyDescriptor COMPONENT_TYPE_FILTER_REGEX
static final PropertyDescriptor COMPONENT_NAME_FILTER_REGEX
private volatile Pattern componentTypeFilter
private volatile Pattern componentNameFilter
public SiteToSiteStatusReportingTask()
throws IOException
IOExceptionprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractSiteToSiteReportingTaskpublic void onTrigger(ReportingContext context)
private boolean componentMatchesFilters(String componentType, String componentName)
componentType - The component typecomponentName - The component nameprivate void serializeProcessGroupStatus(javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
ProcessGroupStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues)
arrayBuilder - The JSON Array builderfactory - The JSON Builder Factorystatus - The ProcessGroupStatusdf - A date formathostname - The current hostnameapplicationName - The root process group nameplatform - The configured platformparent - The parent's process group status objectcurrentDate - The current dateallowNullValues - Allow null valuesprivate void serializeRemoteProcessGroupStatus(javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
RemoteProcessGroupStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues)
private void serializePortStatus(String componentType, javax.json.JsonArrayBuilder arrayBuilder, javax.json.JsonBuilderFactory factory, PortStatus status, DateFormat df, String hostname, String applicationName, String platform, ProcessGroupStatus parent, Date currentDate, Boolean allowNullValues)
private void serializeConnectionStatus(javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
ConnectionStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues)
private void serializeProcessorStatus(javax.json.JsonArrayBuilder arrayBuilder,
javax.json.JsonBuilderFactory factory,
ProcessorStatus status,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
Boolean allowNullValues)
private void addCommonFields(javax.json.JsonObjectBuilder builder,
DateFormat df,
String hostname,
String applicationName,
String platform,
ProcessGroupStatus parent,
Date currentDate,
String componentType,
String componentName,
Boolean allowNullValues)
Copyright © 2024 Apache NiFi Project. All rights reserved.