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

Additional Resources property pointing at a directory won't find new JARs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.2.0, 1.3.0, 1.4.0, 1.5.0
    • 1.6.0
    • None
    • None

    Description

      If you have a processor/Controller Service/Reporting Task that has a property with dynamicallyModifiesClasspath(true) and you set the value to a directory, the resources in that directory will only be calculated when that property changes. This means if you added JARs to the directory later, and stopped and started your processor, those new JARs still won't be available. You would have to change the property to a new directory, or back and forth to some other directory, to force a recalculation.

      The setProperties method in AbstractConfiguredComponent is where it looks at incoming property changes and determines if any were for classpath related properties and then calls reload accordingly.

      We would need to consider the case where setProperties is never even being called, someone just stops and starts the processor and would want to pick up any new JARs added.

      A possible solution might be to computer some kind of hash/fingerprint of the URLs each time reload is called, and then when starting the processor we could recompute the fingerprint and compare it to the previous one. If they are different then we call reload before starting the component.

      Attachments

        Activity

          People

            sivaprasanna Sivaprasanna Sethuraman
            bbende Bryan Bende
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: