Flume
  1. Flume
  2. FLUME-1429

PropertiesFileConfigurationProvider is not extendable

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: v1.2.0
    • Fix Version/s: None
    • Component/s: Node
    • Labels:
      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.

        Issue Links

          Activity

          Brock Noland made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          Brock Noland made changes -
          Field Original Value New Value
          Link This issue is duplicated by FLUME-1630 [ FLUME-1630 ]
          Ralph Goers created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Ralph Goers
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development