[ https://issues.apache.org/jira/browse/EAGLE-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15857200#comment-15857200 ]
ASF GitHub Bot commented on EAGLE-888: -------------------------------------- GitHub user DadanielZ opened a pull request: https://github.com/apache/eagle/pull/796 [EAGLE-888] Application submitted to Storm is always shown as “HBaseAuditLogApp” Reordered the "withFallBack" function to get user's topology configuration You can merge this pull request into a Git repository by running: $ git pull https://github.com/DadanielZ/eagle EAGLE-888 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/eagle/pull/796.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 #796 ---- commit 0cc2167e2f807fcd59e220916b4e0cdcc76e2563 Author: DadanielZ <daz...@apache.org> Date: 2017-02-08T01:35:34Z EAGLE-888 Application submitted to Storm is always shown as “HBaseAuditLogApp” Reordered the "withFallBack" function to get user's topology configuration ---- > Application submitted to Storm is always shown as “HBaseAuditLogApp” > --------------------------------------------------------------------- > > Key: EAGLE-888 > URL: https://issues.apache.org/jira/browse/EAGLE-888 > Project: Eagle > Issue Type: Bug > Components: Application Framework > Affects Versions: v0.5.0 > Reporter: DanielZhou > Assignee: DanielZhou > > *Issue*: > Steps to reproduce: > - Started application from Eagle UI (eg: alert engine) > - Go to Storm UI, topology name is shown as *"HBaseAuditLogApp"* > *Reason*: > In the constructor function of class *"ApplicationAction"*: > {quote} > this.effectiveConfig = ConfigFactory.parseMap(executionConfig) > .withFallback(serverConfig) > > .withFallback(ConfigFactory.parseMap(metadata.getContext())) > {quote} > According to the java doc of > [withFallBack(theOther)|http://typesafehub.github.io/config/latest/api/com/typesafe/config/Config.html#withFallback-com.typesafe.config.ConfigMergeable-] > : > {quote} > Returns a new value computed by merging this value with another, with keys in > this value "winning" over the other one. > {quote} > As a result, "serverConfig" will win over > "ConfigFactory.parseMap(metadata.getContext())" which means the default > "ConfigString(appId="HBaseAuditApp")" and "ConfigString(siteId="testSite")" > will win over the meta data of the user's topology. > *Fix*: > Change the order of "withFallBack" to: > {quote} > this.effectiveConfig = ConfigFactory.parseMap(executionConfig) > > .withFallback(ConfigFactory.parseMap(metadata.getContext())) > .withFallback(serverConfig) > {quote} -- This message was sent by Atlassian JIRA (v6.3.15#6346)