Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-4629

Non-existing attribute in ControlRate configuration causes NullPointerException

    XMLWordPrintableJSON

Details

    Description

      When using the ControlRate processor, defining the "Grouping Attribute" with a missing/non-existing attribute name produces NullPointerException errors.

      Processor configuration:

      Rate Control Criteria: flowfile count
      Maximum rate: 10
      Rate Controlled Attributes: (No value set)
      Time Duration: 1 min
      Grouping Attribute: foobar

      ControlRate with the following configuration when sent a flowfile without the attribute foobar generates the following error:

      ControlRate[id=dff05b32-015f-1000-db55-5957a9298bab] ControlRate[id=dff05b32-015f-1000-db55-5957a9298bab] failed to process due to java.lang.NullPointerException; rolling back session: null

      Additionally, the incoming flowfiles now ends up in some "dead" state where I'm unable to even empty the queue.

      A simple template for reproduction is attached.

      Attachments

        1. ControlRate-NP.xml
          9 kB
          Fredrik Skolmli

        Issue Links

          Activity

            People

              Unassigned Unassigned
              frsk Fredrik Skolmli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: