Accumulo
  1. Accumulo
  2. ACCUMULO-2615

Simplify server configuration caching and ZK watchers

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.1, 1.7.0
    • Component/s: None
    • Labels:
      None

      Description

      The mechanism used for caching server-related configuration objects and processing ZK events could do with some simplification. For example:

      • The watcher objects obtain their corresponding configuration objects by reaching through the ServerConfiguration cache, instead of just having a more direct reference.
      • The watcher objects set log4j logging levels for both ZK and o.a.hadoop.io.compress to WARN, which prohibits debugging when needed. That should be done in log4j properties/XML instead.
      • Possible bug: NamespaceConfWatcher expires table configuration observers, not namespace configuration observers.
      • There is high duplication between the static and instance methods of ServerConfiguration. The class serves as both a cache container and a factory. Moreover, despite its name, it isn't actually a configuration object.

      I may be missing some subtleties of why things are as they are, so please fill me in as needed.

        Issue Links

          Activity

          ASF subversion and git services logged work - 14/Jul/14 19:30
          • Time Spent:
            10m
             
            Commit d53d45ccd3002765cf05aef0540666eccbd63dc1 in accumulo's branch refs/heads/1.6.1-SNAPSHOT from [~bhavanki]
            [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=d53d45c ]

            ACCUMULO-2615 Refactor server configurations

            * ServerConfiguration is deprecated in favor of the new ServerConfigurationFactory.
            * ServerConfigurationFactory caches configurations not just but namespace or table ID, but
              also by instance ID.
            * ZooConfigurationFactory takes over the creation logic from ZooConfiguration. A
              ZooConfiguration instance is no longer a singleton, but an ordinary instance.
              ZooConfigurationFactory caches created ones by instance ID.
            * NamespaceConfiguration and TableConfiguration each keep a static map of ZooCache instances,
              rather than a single static instance. The map is keyed by instance ID and namespace/table
              (resp.) ID.
            * getParentConfiguration() was added to all appropriate configurations.
            * The logic for retrieving properties from ZooCache instances is refactored to a new
              ZooCachePropertyAccessor object.
          ASF subversion and git services logged work - 14/Jul/14 19:30
          • Time Spent:
            10m
             
            Commit d53d45ccd3002765cf05aef0540666eccbd63dc1 in accumulo's branch refs/heads/master from [~bhavanki]
            [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=d53d45c ]

            ACCUMULO-2615 Refactor server configurations

            * ServerConfiguration is deprecated in favor of the new ServerConfigurationFactory.
            * ServerConfigurationFactory caches configurations not just but namespace or table ID, but
              also by instance ID.
            * ZooConfigurationFactory takes over the creation logic from ZooConfiguration. A
              ZooConfiguration instance is no longer a singleton, but an ordinary instance.
              ZooConfigurationFactory caches created ones by instance ID.
            * NamespaceConfiguration and TableConfiguration each keep a static map of ZooCache instances,
              rather than a single static instance. The map is keyed by instance ID and namespace/table
              (resp.) ID.
            * getParentConfiguration() was added to all appropriate configurations.
            * The logic for retrieving properties from ZooCache instances is refactored to a new
              ZooCachePropertyAccessor object.
          ASF subversion and git services logged work - 14/Jul/14 19:30
          ASF subversion and git services logged work - 22/Jul/14 22:26
          ASF subversion and git services logged work - 22/Jul/14 22:27
          ASF subversion and git services logged work - 22/Jul/14 22:27
          ASF subversion and git services logged work - 23/Aug/14 01:37
          ASF subversion and git services logged work - 23/Aug/14 01:38

            People

            • Assignee:
              Eric Newton
              Reporter:
              Bill Havanki
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2.5h
                2.5h

                  Development