Details
-
Bug
-
Status: In Progress
-
Critical
-
Resolution: Unresolved
-
3.0.0
-
None
Description
Service instance level configs are the ones that are associated with a serviceId while cluster level configurations are those which are not. Historically all configs were cluster level as there were no service instances. In the future all configs will be service instance level with the temporary exception of cluster-env.
Ambari code uses Cluster.getConfig(String configType) method almost everywhere which returns cluster level configurations only. Luckily, all configs on service instance level are also stored as cluster level configs in memory in ClusterImpl, this is why it has worked so far.
Double-storing service instance level configs on the cluster level will not work once multiple service instances will be enabled as ambiguity would occur.
The Cluster.getConfig(String configType) method should be eliminated and the Cluster.getConfig(String configType, Optional<Long> serviceId) method used instead. serviceId should be given in all cases except when not applicable (cluster-env)