DanielZhou created EAGLE-888:
--------------------------------
Summary: 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)