eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EAGLE-843) Refactor application shared service registry framework
Date Fri, 16 Dec 2016 09:36:58 GMT

    [ https://issues.apache.org/jira/browse/EAGLE-843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15753942#comment-15753942
] 

ASF GitHub Bot commented on EAGLE-843:
--------------------------------------

Github user haoch commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/750#discussion_r92778778
  
    --- Diff: eagle-server/src/main/java/org/apache/eagle/server/ServerApplication.java ---
    @@ -107,18 +111,31 @@ public void run(ServerConfig configuration, Environment environment)
throws Exce
             // Context listener
             environment.servlets().addServletListeners(new CoordinatorListener());
     
    +        registerAppServices(environment);
    +    }
    +
    +    private void registerAppServices(Environment environment) {
             // Run application status service in background
    -        Managed updateAppStatusTask = new ApplicationTask(applicationStatusUpdateService);
    +        LOG.debug("Registering ApplicationStatusUpdateService");
    +        Managed updateAppStatusTask = new ManagedService(applicationStatusUpdateService);
             environment.lifecycle().manage(updateAppStatusTask);
     
    -        // Initialize application health check environment
    +        // Initialize application extended health checks.
    +        LOG.debug("Registering ApplicationHealthCheckService");
             applicationHealthCheckService.init(environment);
    -        Managed appHealthCheckTask = new ApplicationTask(applicationHealthCheckService);
    -        environment.lifecycle().manage(appHealthCheckTask);
    -
    -        if (config.hasPath(MRHistoryJobDailyReporter.SERVICE_PATH)) {
    -            Managed jobReportTask = new ApplicationTask(mrHistoryJobDailyReporter);
    -            environment.lifecycle().manage(jobReportTask);
    +        environment.lifecycle().manage(new ManagedService(applicationHealthCheckService));
    +
    +        // Load application shared extension services.
    +        LOG.debug("Registering application shared extension services");
    +        for (ApplicationProvider<?> applicationProvider : applicationProviderService.getProviders())
{
    --- End diff --
    
    Change#3, Register `getSharedServices` from `ApplicationProvider` to `Environment` in
`ServerApplication`


> Refactor application shared service registry framework
> ------------------------------------------------------
>
>                 Key: EAGLE-843
>                 URL: https://issues.apache.org/jira/browse/EAGLE-843
>             Project: Eagle
>          Issue Type: Improvement
>            Reporter: Hao Chen
>            Assignee: Hao Chen
>
> Refactor application shared service registry framework



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message