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

Expose task queue size for ExecutorService runners.

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • 19.1.0
    • 19.1.0, Meridian-2017.1.0
    • Architecture
    • Security Level: Default (Default Security Scheme)
    • 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

            ronald.roskens@gmail.com Ron Roskens (Inactive)
            ronald.roskens@biworldwide.com Ron Roskens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: