Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-1429

PropertiesFileConfigurationProvider is not extendable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.2.0
    • None
    • Node
    • None

    Description

      PropertiesFileConfigurationProvider extends AbstractFileConfiguration. AbstractFileConfiguration doesn't really do much but provide getters and setters for a few things. The main logic is in PropertiesFileConfigurationProvider in the form of the loadChannels, loadSources and loadSinks methods. However, these methods are all private. PropertiesFileConfigurationProvider exposes the load method as protected, which should allow a class extending PropertiesFileConfigurationProvider to override it. However, since the previously mentioned methods in PropertiesFileConfigurationProvider are all private they can't be accessed from the extending class.

      In addition, classes extending PropertiesFileConfigurationProvider should be provided a load method that accepts a Reader or an InputStream so that they can dynamically create the configuration.

      I am building an "embedded Appender" for Log4j 2 and I am essentially having to write my configuration handling from scratch since there is not good way to extend these classes. Similarly, a JMX implementation would encounter the same problems.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rgoers Ralph Goers
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: