[ https://issues.apache.org/jira/browse/AMBARI-22945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Swapan Shridhar updated AMBARI-22945: ------------------------------------- Description: *BACKGROUND:* Given that in Ambari, we refer components of a services in 2 ways: - *1.* One from the Service component APIs : *http://<AmbariServerHost>:8080/api/v1/clusters/<clusterName>/services/<ServiceName>/components/<componentName>* - *2.*From the host component APIs (which tell us the host on which the current component is resides) *http://<AmbariServerHost>:8080/api/v1/clusters/<clusterName>/hosts/<hostName>/host_components/<hostComponentName>* _Note that, we of now, we are referring both 1and 2 using the component names_ But in the multi-component world for Ambari, we will come up with a situation like this, as shown below: - *A.* If *core* _Service Group_ has its *HDFS_CLIENT* type component named as *HDFS_CLIENT* *Core -> HDFS -> HDFS_CLIENT* - *B.* And at the same time, we have *edw* _Service Group_ having its *HDFS_CLIENT* type component named as *HDFS_CLIENT* : *edw -> HDFS -> HDFS_CLIENT* There is no good way to distinguish a given host component in *A* and *B*, if we continue to refer them with the component name end point (No. *2* API call). However, No. *1* call is still fine as we will not allow 2 names for the same component within a given service, thus making it unique and allowing us to continue using the component names endpoint. *****************************************************************WORK DONE :******************************************************************* In order to support multi-instance for components of a given service, we need to enhance the *Host Components API* so that they can distinguish *one component instance of a service* from *another component instance of a service* with the same Name. The way to achieve this is to move Host Components API to be *ID* (number) based end point, compared to earlier being a name based endpoint. This will allow us to distinguish *Core -> HDFS -> HDFS_CLIENT* from *edw -> HDFS -> HDFS_CLIENT*, as an example. Thus, following changes are required: - New field : *component_type* (eg: HDFS_CLIENT, HIVE_SERVER, ZOOKEEPER_SERVER etc) - Existing field : *component_name* will now hold the actual name given for the component at the time of install. For example: - *HDFS_CLIENT_EDW* for component_type *HDFS_CLIENT* - *HIVE_SERVER* FOR component_type *HIVE_SERVER* _(name can be same as type also)_ - *HIVE_SERVER1* for component_type *HIVE_SERVER* - *ZOOKEEPER_SERVER_FOR_KAFKA* for component_type *ZOOKEEPER_SERVER*, and so forth. - A way to identify the HOST component uniquely via API calls, by way of referring them by *ID* instead of name. *MODIFIED API CALLs:* was: *BACKGROUND:* Given that in Ambari, we refer components of a services in 2 ways: - *1.* One from the Service component APIs : *http://<AmbariServerHost>:8080/api/v1/clusters/<clusterName>/services/<ServiceName>/components/<componentName>* - *2.*From the host component APIs (which tell us the host on which the current component is resides) *http://<AmbariServerHost>:8080/api/v1/clusters/<clusterName>/hosts/<hostName>/host_components/<hostComponentName>* _Note that, we of now, we are referring both 1and 2 using the component names_ But in the multi-component world for Ambari, we will come up with a situation like this, as shown below: - *A.* If *core* _Service Group_ has its *HDFS_CLIENT* type component named as *HDFS_CLIENT* *Core -> HDFS -> HDFS_CLIENT* - *B.* And at the same time, we have *edw* _Service Group_ having its *HDFS_CLIENT* type component named as *HDFS_CLIENT* : *edw -> HDFS -> HDFS_CLIENT* There is no good way to distinguish a given host component in *A* and *B*, if we continue to refer them with the component name end point (No. *2* API call). However, No. *1* call is still fine as we will not allow 2 names for the same component within a given service, thus making it unique and allowing us to continue using the component names endpoint. *****************************************************************WORK DONE :****************************************************** In order to support multi-instance for components of a given service, we need to enhance the *Host Components API* so that they can distinguish *one component instance of a service* from *another component instance of a service* with the same Name. The way to achieve this is to move Host Components API to be *ID* (number) based end point, compared to earlier being a name based endpoint. This will allow us to distinguish *Core -> HDFS -> HDFS_CLIENT* from *edw -> HDFS -> HDFS_CLIENT*, as an example. Thus, following changes are required: - New field : *component_type* (eg: HDFS_CLIENT, HIVE_SERVER, ZOOKEEPER_SERVER etc) - Existing field : *component_name* will now hold the actual name given for the component at the time of install. For example: - *HDFS_CLIENT_EDW* for component_type *HDFS_CLIENT* - *HIVE_SERVER* FOR component_type *HIVE_SERVER* _(name can be same as type also)_ - *HIVE_SERVER1* for component_type *HIVE_SERVER* - *ZOOKEEPER_SERVER_FOR_KAFKA* for component_type *ZOOKEEPER_SERVER*, and so forth. - A way to identify the HOST component uniquely via API calls, by way of referring them by *ID* instead of name. *MODIFIED API CALLs:* > Enhance host components API to support multiple host component instances. > ------------------------------------------------------------------------- > > Key: AMBARI-22945 > URL: https://issues.apache.org/jira/browse/AMBARI-22945 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Reporter: Swapan Shridhar > Assignee: Swapan Shridhar > Priority: Critical > Fix For: 3.0.0 > > > *BACKGROUND:* > Given that in Ambari, we refer components of a services in 2 ways: > - *1.* One from the Service component APIs : > > *http://<AmbariServerHost>:8080/api/v1/clusters/<clusterName>/services/<ServiceName>/components/<componentName>* > - *2.*From the host component APIs (which tell us the host on which the > current component is resides) > > *http://<AmbariServerHost>:8080/api/v1/clusters/<clusterName>/hosts/<hostName>/host_components/<hostComponentName>* > _Note that, we of now, we are referring both 1and 2 using the component names_ > But in the multi-component world for Ambari, we will come up with a situation > like this, as shown below: > - *A.* If *core* _Service Group_ has its *HDFS_CLIENT* type component named > as *HDFS_CLIENT* > *Core -> HDFS -> HDFS_CLIENT* > - *B.* And at the same time, we have *edw* _Service Group_ having its > *HDFS_CLIENT* type component named as *HDFS_CLIENT* : > *edw -> HDFS -> HDFS_CLIENT* > There is no good way to distinguish a given host component in *A* and *B*, > if we continue to refer them with the component name end point (No. *2* API > call). > However, No. *1* call is still fine as we will not allow 2 names for the same > component within a given service, thus making it unique and allowing us to > continue using the component names endpoint. > *****************************************************************WORK DONE > :******************************************************************* > In order to support multi-instance for components of a given service, we need > to enhance the *Host Components API* so that they can distinguish *one > component instance of a service* from *another component instance of a > service* with the same Name. > The way to achieve this is to move Host Components API to be *ID* (number) > based end point, compared to earlier being a name based endpoint. This will > allow us to distinguish *Core -> HDFS -> HDFS_CLIENT* from *edw -> HDFS -> > HDFS_CLIENT*, as an example. > Thus, following changes are required: > - New field : *component_type* (eg: HDFS_CLIENT, HIVE_SERVER, > ZOOKEEPER_SERVER etc) > - Existing field : *component_name* will now hold the actual name given for > the component at the time of install. For example: > - *HDFS_CLIENT_EDW* for component_type *HDFS_CLIENT* > - *HIVE_SERVER* FOR component_type *HIVE_SERVER* _(name can be same as > type also)_ > - *HIVE_SERVER1* for component_type *HIVE_SERVER* > - *ZOOKEEPER_SERVER_FOR_KAFKA* for component_type *ZOOKEEPER_SERVER*, > and so forth. > > - A way to identify the HOST component uniquely via API calls, by way of > referring them by *ID* instead of name. > *MODIFIED API CALLs:* -- This message was sent by Atlassian JIRA (v7.6.3#76005)