You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eagle.apache.org by yonzhang <gi...@git.apache.org> on 2016/08/06 05:34:48 UTC

[GitHub] incubator-eagle pull request #308: HBase audit monitoring with new app frame...

GitHub user yonzhang opened a pull request:

    https://github.com/apache/incubator-eagle/pull/308

    HBase audit monitoring with new app framework

    https://issues.apache.org/jira/browse/EAGLE-420

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yonzhang/incubator-eagle develop

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-eagle/pull/308.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #308
    
----
commit c5ddb64d507549cfa62d3ee4fe3af7b0fb354ab8
Author: yonzhang <yo...@gmail.com>
Date:   2016-08-05T16:19:28Z

    remove state feature related unit test as state mgmt will be removed in eagle 0.5

commit ba6ad6d936baac6f5ec6a0141b27819ea6722e33
Author: yonzhang <yo...@gmail.com>
Date:   2016-08-05T23:31:48Z

    hbase monitor app with new app framework

commit 38e9b725febaae57ae467708e689bf055a1a5451
Author: yonzhang <yo...@gmail.com>
Date:   2016-08-06T00:35:18Z

    hbase monitoring unified development time and app mgmt time

commit f70b0642c846ff91a764cf673c97d69a0c2bdc7e
Author: yonzhang <yo...@gmail.com>
Date:   2016-08-06T05:37:21Z

    unit test fix for application lifecycle

----


---
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.
---

[GitHub] incubator-eagle issue #308: HBase audit monitoring with new app framework

Posted by yonzhang <gi...@git.apache.org>.
Github user yonzhang commented on the issue:

    https://github.com/apache/incubator-eagle/pull/308
  
    merged


---
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.
---

[GitHub] incubator-eagle pull request #308: HBase audit monitoring with new app frame...

Posted by yonzhang <gi...@git.apache.org>.
Github user yonzhang closed the pull request at:

    https://github.com/apache/incubator-eagle/pull/308


---
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.
---

[GitHub] incubator-eagle issue #308: HBase audit monitoring with new app framework

Posted by yonzhang <gi...@git.apache.org>.
Github user yonzhang commented on the issue:

    https://github.com/apache/incubator-eagle/pull/308
  
    That is right, we don't need notify application of the web related configuration. Web application should do it by itself by querying ApplicationEntity, I will modify the PR


---
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.
---

[GitHub] incubator-eagle pull request #308: HBase audit monitoring with new app frame...

Posted by haoch <gi...@git.apache.org>.
Github user haoch commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/308#discussion_r73804186
  
    --- Diff: eagle-core/eagle-app/eagle-app-base/src/main/java/org/apache/eagle/app/service/impl/ApplicationManagementServiceImpl.java ---
    @@ -63,16 +71,40 @@ public ApplicationEntity install(ApplicationOperations.InstallOperation operatio
             ApplicationEntity applicationEntity = new ApplicationEntity();
             applicationEntity.setDescriptor(appDesc);
             applicationEntity.setSite(siteEntity);
    -        applicationEntity.setConfiguration(operation.getConfiguration());
    +
    +        /**
    +         *  calculate application config based on
    +         *   1) default values in metadata.xml
    +         *   2) user's config value
    +         *   3) some metadata, for example siteId, mode, appId
    +         */
    +        Map<String, Object> appConfig = new HashMap<>();
    +        ApplicationProvider provider = applicationProviderService.getApplicationProviderByType(operation.getAppType());
    +        List<Property> propertyList = provider.getApplicationDesc().getConfiguration().getProperties();
    +        for(Property p : propertyList){
    +            appConfig.put(p.getName(), p.getValue());
    +        }
    +        if(operation.getConfiguration() != null) {
    +            appConfig.putAll(operation.getConfiguration());
    +        }
    +        appConfig.put("siteId", operation.getSiteId());
    +        appConfig.put("mode", operation.getMode().name());
    +        appConfig.put("appId", operation.getAppType());
    +
    +        applicationEntity.setConfiguration(appConfig);
             applicationEntity.setMode(operation.getMode());
             ApplicationContext applicationContext = new ApplicationContext(
                     applicationProviderService.getApplicationProviderByType(applicationEntity.getDescriptor().getType()).getApplication(),
                     applicationEntity,config);
             applicationContext.onInstall();
             applicationEntityService.create(applicationEntity);
    +
    +        // initialize web config
    +        provider.installWebConfig(ConfigFactory.parseMap(appConfig));
    --- End diff --
    
    Not sure the difference between `installWebConfig ` with `applicationEntity.setConfiguration(appConfig);` ?



---
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.
---