@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
| Constructor and Description |
|---|
ControllerStatusReportingTask() |
| Modifier and Type | Method and Description |
|---|---|
private String |
createLine(String valueToUnderscore) |
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,
long divisor) |
private void |
printConnectionStatuses(ProcessGroupStatus controllerStatus,
boolean showDeltas,
long divisor) |
private void |
printCounters(ProcessGroupStatus controllerStatus,
boolean showDeltas,
long divisor) |
private void |
printCounterStatus(ProcessGroupStatus status,
StringBuilder builder,
boolean showDeltas,
long divisor) |
private void |
printProcessorStatus(ProcessGroupStatus groupStatus,
StringBuilder builder,
boolean showDeltas,
long divisor) |
private void |
printProcessorStatuses(ProcessGroupStatus controllerStatus,
boolean showDeltas,
long divisor) |
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, 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 AllowableValue FIVE_MINUTE_GRANULARITY
static final AllowableValue ONE_SECOND_GRANULARITY
public static final PropertyDescriptor SHOW_DELTAS
static final PropertyDescriptor REPORTING_GRANULARITY
private static final org.slf4j.Logger processorLogger
private static final org.slf4j.Logger connectionLogger
private static final org.slf4j.Logger counterLogger
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 static final String COUNTER_LINE_FORMAT
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 String counterHeader
private volatile String counterBorderLine
private volatile Map<String,ProcessorStatus> lastProcessorStatus
private volatile Map<String,ConnectionStatus> lastConnectionStatus
private final long startTimestamp
public final List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void onConfigured(ConfigurationContext context)
public void onTrigger(ReportingContext context)
private void printProcessorStatuses(ProcessGroupStatus controllerStatus, boolean showDeltas, long divisor)
private void printConnectionStatuses(ProcessGroupStatus controllerStatus, boolean showDeltas, long divisor)
private void printCounters(ProcessGroupStatus controllerStatus, boolean showDeltas, long divisor)
private void printCounterStatus(ProcessGroupStatus status, StringBuilder builder, boolean showDeltas, long divisor)
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, long divisor)
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, long divisor)
Copyright © 2023 Apache NiFi Project. All rights reserved.