@Tags(value={"monitor","memory","heap","jvm","gc","garbage collection","warning"}) @CapabilityDescription(value="Checks the amount of Java Heap available in the JVM for a particular JVM Memory Pool. If the amount of space used exceeds some configurable threshold, will warn (via a log message and System-Level Bulletin) that the memory pool is exceeding this threshold.") public class MonitorMemory extends AbstractReportingTask
The following values are typically supported:
| Modifier and Type | Class and Description |
|---|---|
private static class |
MonitorMemory.ThresholdValidator |
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
DATA_SIZE_PATTERN |
private static String |
defaultMemoryPool |
private static List<String> |
GC_OLD_GEN_POOLS |
private long |
lastReportTime |
private boolean |
lastValueWasExceeded |
static PropertyDescriptor |
MEMORY_POOL_PROPERTY |
private static AllowableValue[] |
memPoolAllowableValues |
private MemoryPoolMXBean |
monitoredBean |
static Pattern |
PERCENTAGE_PATTERN |
private static List<PropertyDescriptor> |
propertyDescriptors |
static PropertyDescriptor |
REPORTING_INTERVAL |
private long |
reportingIntervalMillis |
private String |
threshold |
static PropertyDescriptor |
THRESHOLD_PROPERTY |
static Pattern |
TIME_PERIOD_PATTERN |
| Constructor and Description |
|---|
MonitorMemory() |
| Modifier and Type | Method and Description |
|---|---|
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onConfigured(ConfigurationContext config) |
void |
onStopped() |
void |
onTrigger(ReportingContext context) |
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, validateprivate static final AllowableValue[] memPoolAllowableValues
private static String defaultMemoryPool
public static final PropertyDescriptor MEMORY_POOL_PROPERTY
public static final PropertyDescriptor THRESHOLD_PROPERTY
public static final PropertyDescriptor REPORTING_INTERVAL
public static final Pattern PERCENTAGE_PATTERN
public static final Pattern DATA_SIZE_PATTERN
public static final Pattern TIME_PERIOD_PATTERN
private volatile MemoryPoolMXBean monitoredBean
private volatile String threshold
private volatile long lastReportTime
private volatile long reportingIntervalMillis
private volatile boolean lastValueWasExceeded
private static final List<PropertyDescriptor> propertyDescriptors
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void onConfigured(ConfigurationContext config) throws InitializationException
InitializationExceptionpublic void onTrigger(ReportingContext context)
@OnStopped public void onStopped()
Copyright © 2022 Apache NiFi Project. All rights reserved.