eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From haoch <...@git.apache.org>
Subject [GitHub] incubator-eagle pull request #750: [EAGLE-843] Refactor application shared s...
Date Fri, 16 Dec 2016 09:36:25 GMT
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`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message