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

Refactor Flume to have no static state

    XMLWordPrintableJSON

Details

    Description

      Flume uses static state in a number of places. Some instances cause significant pain during testing or extension. Flume should be refactored to push static state down to instances (Factories, Registries, and similar patterns) and then use DI to make these instances available where needed.

      Examples:

      • FlumeBuilder uses a static SourceFactory and SinkFactory. Modifications to the static instances during testing pollute the JVM. Setting and resetting is extremely error prone.
      • FlumeMaster pushes a new instance into a static member on each invocation of the constructor. This is one step worse than a singleton in that subsequent construction disrupts existing captures of the shared instance.
      • The web application JSPs follow the inside-out invocation scheme in that they capture a reference to the FlumeMaster static instance in an attempt to get at current state (rather than having an instance injected or passed). This is fragile and subject to construction practices.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              esammer Eric Sammer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: