Github user olegz commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/328#discussion_r67149454
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java
 ---
    @@ -91,12 +92,21 @@
             + " that the memory pool is exceeding this threshold.")
     public class MonitorMemory extends AbstractReportingTask {
     
    +    private static final AllowableValue[] memPoolAllowableValues;
    +
    +    static {
    +        List<MemoryPoolMXBean> memoryPoolBeans = 
ManagementFactory.getMemoryPoolMXBeans();
    +        memPoolAllowableValues = new 
AllowableValue[memoryPoolBeans.size()];
    +        for (int i = 0; i < memPoolAllowableValues.length; i++) {
    +            memPoolAllowableValues[i] = new 
AllowableValue(memoryPoolBeans.get(i).getName());
    +        }
    +    }
    +
         public static final PropertyDescriptor MEMORY_POOL_PROPERTY = new 
PropertyDescriptor.Builder()
                 .name("Memory Pool")
                 .description("The name of the JVM Memory Pool to monitor")
    --- End diff --
    
    One thing you and I always agreed on, so yeah, why not?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to