@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 List<GarbageCollectorMXBean> |
garbageCollectorBeans |
private long |
lastReportTime |
private boolean |
lastValueWasExceeded |
private static org.slf4j.Logger |
logger |
static PropertyDescriptor |
MEMORY_POOL_PROPERTY |
private MemoryPoolMXBean |
monitoredBean |
static Pattern |
PERCENTAGE_PATTERN |
static PropertyDescriptor |
REPORTING_INTERVAL |
private long |
reportingIntervalMillis |
private long |
schedulingPeriodMillis |
private String |
threshold |
static PropertyDescriptor |
THRESHOLD_PROPERTY |
static Pattern |
TIME_PERIOD_PATTERN |
| Constructor and Description |
|---|
MonitorMemory() |
| Modifier and Type | Method and Description |
|---|---|
private long |
calculateThresholdBytes(long maxBytes) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ReportingInitializationContext config) |
void |
onConfigured(ConfigurationContext config) |
void |
onTrigger(ReportingContext context) |
getControllerServiceLookup, getIdentifier, getName, getSchedulingPeriod, initializecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic 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 static final org.slf4j.Logger logger
private volatile MemoryPoolMXBean monitoredBean
private volatile String threshold
private volatile long lastReportTime
private volatile long reportingIntervalMillis
private volatile boolean lastValueWasExceeded
private final List<GarbageCollectorMXBean> garbageCollectorBeans
private long schedulingPeriodMillis
protected void init(ReportingInitializationContext config) throws InitializationException
init in class AbstractReportingTaskInitializationExceptionprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnScheduled public void onConfigured(ConfigurationContext config) throws InitializationException
InitializationExceptionprivate long calculateThresholdBytes(long maxBytes)
public void onTrigger(ReportingContext context)
Copyright © 2015 Apache NiFi(incubating) Project. All rights reserved.