[ 
https://issues.apache.org/jira/browse/AMBARI-23905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wei-Chiu Chuang updated AMBARI-23905:
-------------------------------------
    Fix Version/s: 3.1.0
                       (was: 3.0.0)

> Better handling of legacy stacks in StackServiceDirectory.java while 
> preparing "advisorClassName".
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-23905
>                 URL: https://issues.apache.org/jira/browse/AMBARI-23905
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>            Reporter: Swapan Shridhar
>            Assignee: Swapan Shridhar
>            Priority: Major
>             Fix For: 3.1.0
>
>
> https://github.com/apache/ambari/pull/1296 added code where we give different 
> treatment while forming "advisorClassName" based on whether the stack is 
> coming out of 3.0 Mpacks or is the old supported stacks. The current fix has 
> shortcoming as there can be other stacks also like "IOP" and any other 3rd 
> party one. 
> {code}
> 1.    List<String> legacyStackNames = new ArrayList<>(Arrays.asList("HDP", 
> "HDF")); // Old stacks.
> 2.    String advisorClassName = "";
> 3.     if (legacyStackNames.contains(stackName)) {
> 4.       advisorClassName = stackName + versionString + serviceName + 
> "ServiceAdvisor";
> 5.     } else {
> 6.       // Mpack world and its corresponding Stacks, where we shouldn't have
> 7.       // stackName + versionString prefixed.
> 8.       advisorClassName = serviceName + "ServiceAdvisor";
> 9.    }
> 10.
> {code}
> Thus, we should avoid hardcoding and should do better handling while figuring 
> old old stack and new stack (coming from Mpack).
> CC [~jluniya]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to