@Tags(value={"stats","log"}) @CapabilityDescription(value="Logs the 5-minute stats that are shown in the NiFi Summary Page for Processors and Connections, as well optionally logging the deltas between the previous iteration and the current iteration. Processors\' stats are logged using the org.apache.nifi.controller.ControllerStatusReportingTask.Processors logger, while Connections\' stats are logged using the org.apache.nifi.controller.ControllerStatusReportingTask.Connections logger. These can be configured in the NiFi logging configuration to log to different files, if desired.") public class ControllerStatusReportingTask extends AbstractReportingTask
| Modifier and Type | Field and Description |
|---|---|
private static String |
CONNECTION_LINE_FORMAT_NO_DELTA |
private static String |
CONNECTION_LINE_FORMAT_WITH_DELTA |
private String |
connectionBorderLine |
private String |
connectionHeader |
private String |
connectionLineFormat |
private static org.slf4j.Logger |
connectionLogger |
private Map<String,ConnectionStatus> |
lastConnectionStatus |
private Map<String,ProcessorStatus> |
lastProcessorStatus |
private static String |
PROCESSOR_LINE_FORMAT_NO_DELTA |
private static String |
PROCESSOR_LINE_FORMAT_WITH_DELTA |
private String |
processorBorderLine |
private String |
processorHeader |
private String |
processorLineFormat |
private static org.slf4j.Logger |
processorLogger |
static PropertyDescriptor |
SHOW_DELTAS |
| Constructor and Description |
|---|
ControllerStatusReportingTask() |
| Modifier and Type | Method and Description |
|---|---|
List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onConfigured(ConfigurationContext context) |
void |
onTrigger(ReportingContext context) |
private void |
populateConnectionStatuses(ProcessGroupStatus groupStatus,
List<ConnectionStatus> statuses) |
private void |
populateProcessorStatuses(ProcessGroupStatus groupStatus,
List<ProcessorStatus> statuses) |
private void |
printConnectionStatus(ProcessGroupStatus groupStatus,
StringBuilder builder,
boolean showDeltas)
Recursively prints the status of all connections in this group.
|
private void |
printProcessorStatus(ProcessGroupStatus groupStatus,
StringBuilder builder,
boolean showDeltas)
Recursively the status of all processors in this group.
|
private String |
toDiff(long oldValue,
long newValue) |
private String |
toDiff(long oldValue,
long newValue,
boolean formatDataSize,
boolean formatTime) |
private String |
toDiff(long oldCount,
long oldBytes,
long newCount,
long newBytes) |
getControllerServiceLookup, getIdentifier, getName, getSchedulingPeriod, init, initializecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor SHOW_DELTAS
private static final org.slf4j.Logger processorLogger
private static final org.slf4j.Logger connectionLogger
private static final String PROCESSOR_LINE_FORMAT_NO_DELTA
private static final String PROCESSOR_LINE_FORMAT_WITH_DELTA
private static final String CONNECTION_LINE_FORMAT_NO_DELTA
private static final String CONNECTION_LINE_FORMAT_WITH_DELTA
private volatile String processorLineFormat
private volatile String processorHeader
private volatile String processorBorderLine
private volatile String connectionLineFormat
private volatile String connectionHeader
private volatile String connectionBorderLine
private volatile Map<String,ProcessorStatus> lastProcessorStatus
private volatile Map<String,ConnectionStatus> lastConnectionStatus
public final List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void onConfigured(ConfigurationContext context)
public void onTrigger(ReportingContext context)
private void populateConnectionStatuses(ProcessGroupStatus groupStatus, List<ConnectionStatus> statuses)
private void populateProcessorStatuses(ProcessGroupStatus groupStatus, List<ProcessorStatus> statuses)
private void printConnectionStatus(ProcessGroupStatus groupStatus, StringBuilder builder, boolean showDeltas)
groupStatus - group - builder - private String toDiff(long oldValue, long newValue)
private String toDiff(long oldValue, long newValue, boolean formatDataSize, boolean formatTime)
private String toDiff(long oldCount, long oldBytes, long newCount, long newBytes)
private void printProcessorStatus(ProcessGroupStatus groupStatus, StringBuilder builder, boolean showDeltas)
groupStatus - group - builder - Copyright © 2015 Apache NiFi(incubating) Project. All rights reserved.