Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9161

Expose task queue size for ExecutorService runners.

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 19.1.0, Meridian-2017.1.0
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      The LegacyScheduler class creates an ExecutorService object to run tasks. This FixedThreadPool has a task queue that contains the list of pending tasks to execute. We should expose the number of items on its queue for Pollerd and Collectd so users can get an idea of how much pending work is there for these services.

          public LegacyScheduler(final String parent, final int maxSize) {
              m_status = START_PENDING;
              m_runner = Executors.newFixedThreadPool(maxSize, new LogPreservingThreadFactory(parent, maxSize));
              m_queues = new ConcurrentSkipListMap<Long, BlockingQueue<ReadyRunnable>>();
              m_scheduled = 0;
              m_worker = null;
          }
      

      Having the task queue size would be important in the case when ActiveThreads == PeekPoolThreads == MaxPoolThreads.

        Attachments

          Activity

            People

            • Assignee:
              ronald.roskens@gmail.com Ron Roskens
              Reporter:
              ronald.roskens@biworldwide.com Ron Roskens
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: