Uploaded image for project: 'Eagle (Retired)'
  1. Eagle (Retired)
  2. EAGLE-382 Monitoring Application Framework
  3. EAGLE-442

Support to extend metastore DAO modules in SPI

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • v0.5.0
    • v0.5.0
    • None

    Description

      Module Registry Interfaces

      • ApplicationProvider
        ApplicationProvider{ 
           void register(ModuleRegistry) 
        }
        
      • ModuleRegistry
        ModuleRegistry { 
            void register(ModuleScope scope,Module module);
            default void register(Module moduel) {
                register(GlobalScope.class, module)
            }
        }
        
      • ModuleScope
      • Modules registered in scope of `GlobalScope` will be visible globally
      • Modules registered in `MySQLMetadataStore`/`MongodbMetadataStore`/`MemoryMetadataStore` will only be visible when selected MetadataStore is active (set in configuration file)
      ModuleScope
          |- GlobalScope
          |- MetadataStore
              |- MySQLMetadataStore
              |- MongodbMetadataStore
              |- MemoryMetadataStore
      

      Example

      • Registry: in `HBaseAuditLogAppProvider`
      @Override
          public void register(ModuleRegistry registry) {
              registry.register(MemoryMetadataStore.class, new AbstractModule() {
                  @Override
                  protected void configure() {
                      bind(ISecurityMetadataDAO.class).to(InMemMetadataDaoImpl.class);
                  }
              });
      
              registry.register(MySQLMetadataStore.class, new AbstractModule() {
                  @Override
                  protected void configure() {
                      bind(ISecurityMetadataDAO.class).to(JDBCSecurityMetadataDAO.class);
                  }
              });
          }
      
      @Inject
          public HbaseMetadataBrowseWebResource(ApplicationEntityService entityService, ISecurityMetadataDAO metadataDAO){
              this.entityService = entityService;
              this.dao = metadataDAO;
          }
      

      More Use Cases

      • ExampleResource
      • ExampleService
      • ExampleApplicationProviderTest#testApplicationExtensions

      Attachments

        Issue Links

          Activity

            People

              haoch Hao Chen
              haoch Hao Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: