Flume
  1. Flume
  2. FLUME-575

Refactor Flume to have no static state

    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.

        Issue Links

          Issues in Epic

          There are no issues in this epic.

            Activity

            Mark Thomas made changes -
            Project Import Tue Aug 02 16:57:12 UTC 2011 [ 1312304232406 ]
            Jonathan Hsieh made changes -
            Link This issue relates to FLUME-576 [ FLUME-576 ]
            Jonathan Hsieh made changes -
            Field Original Value New Value
            Issue Type Improvement [ 4 ] Epic [ 6 ]
            E. Sammer created issue -

              People

              • Assignee:
                Unassigned
                Reporter:
                E. Sammer
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Development