[ https://issues.apache.org/jira/browse/EAGLE-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15857436#comment-15857436 ]
ASF GitHub Bot commented on EAGLE-888: -------------------------------------- Github user DadanielZ commented on the issue: https://github.com/apache/eagle/pull/796 @wujinhu here is what I observed: 1. In site "sandbox", I have "alert engine" started. In storm UI, topology is running as "HBaseAuditMonitor" 2.When run in Debug mode in Intellij, "server config" has "siteId = testSite", "appId = HBaseAuditLog", and config context has "siteId = sandbox" and "appId = ALERT_UNIT_TOPOLOGY_APP_SANDBOX". Because server config has higher priority, these context info are overridden. By the way, could you explain a little bit on "There are a lot of application.conf files in eagle. I think this is the root cause"? Thanks and regards, Da > 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)