You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Di Li <di...@ca.ibm.com> on 2016/03/18 22:46:25 UTC

Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/
-----------------------------------------------------------

Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.


Bugs: AMBARI-15443
    https://issues.apache.org/jira/browse/AMBARI-15443


Repository: ambari


Description
-------

The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.

The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.

components: function () {
var serviceNames = App.Service.find().mapProperty('serviceName');
var menuItems = [
O.create(
{ serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }

),
O.create(
{ serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }

),
O.create(
{ serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }

),
O.create(
{ serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }

)];

return menuItems.filter(function (item)
{ return serviceNames.contains(item.serviceName); }

);
}.property(),


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
  ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
  ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 770ee5c 
  ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
  ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml 057e126 
  ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 75d3bea 
  ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
  ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 804374a 
  ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 0f71585 
  ambari-server/src/main/resources/properties.json 01c15f2 
  ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
  ambari-web/app/mappers/stack_service_mapper.js 8a65055 
  ambari-web/app/models/stack_service_component.js 26ff1b8 
  ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
  ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 

Diff: https://reviews.apache.org/r/45054/diff/


Testing
-------

unit test
patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.


Thanks,

Di Li


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by "Zhe (Joe) Wang" <jw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/#review124333
-----------------------------------------------------------


Ship it!




Ship It!

- Zhe (Joe) Wang


On March 18, 2016, 9:46 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45054/
> -----------------------------------------------------------
> 
> (Updated March 18, 2016, 9:46 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15443
>     https://issues.apache.org/jira/browse/AMBARI-15443
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.
> 
> The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.
> 
> components: function () {
> var serviceNames = App.Service.find().mapProperty('serviceName');
> var menuItems = [
> O.create(
> { serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }
> 
> ),
> O.create(
> { serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }
> 
> ),
> O.create(
> { serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }
> 
> ),
> O.create(
> { serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }
> 
> )];
> 
> return menuItems.filter(function (item)
> { return serviceNames.contains(item.serviceName); }
> 
> );
> }.property(),
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
>   ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 770ee5c 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml 057e126 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 75d3bea 
>   ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 804374a 
>   ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 0f71585 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
>   ambari-web/app/mappers/stack_service_mapper.js 8a65055 
>   ambari-web/app/models/stack_service_component.js 26ff1b8 
>   ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
>   ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 
> 
> Diff: https://reviews.apache.org/r/45054/diff/
> 
> 
> Testing
> -------
> 
> unit test
> patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.
> 
> 
> Thanks,
> 
> Di Li
> 
>


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by "Zhe (Joe) Wang" <jw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/#review124335
-----------------------------------------------------------



There are some assumptions about certain operations for certain slave components. So please verify the ops are valid before add new components to this list. (Current ones are ok)
One example is that adding NFS_GATEWAY requires HDFS_CLIENT on the same host. But we don't do dependency check here when add components as it's not needed for current components in the list. But adding NFS_GATEWAY to this list may cause problem.

- Zhe (Joe) Wang


On March 18, 2016, 9:46 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45054/
> -----------------------------------------------------------
> 
> (Updated March 18, 2016, 9:46 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15443
>     https://issues.apache.org/jira/browse/AMBARI-15443
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.
> 
> The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.
> 
> components: function () {
> var serviceNames = App.Service.find().mapProperty('serviceName');
> var menuItems = [
> O.create(
> { serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }
> 
> ),
> O.create(
> { serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }
> 
> ),
> O.create(
> { serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }
> 
> ),
> O.create(
> { serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }
> 
> )];
> 
> return menuItems.filter(function (item)
> { return serviceNames.contains(item.serviceName); }
> 
> );
> }.property(),
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
>   ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 770ee5c 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml 057e126 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 75d3bea 
>   ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 804374a 
>   ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 0f71585 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
>   ambari-web/app/mappers/stack_service_mapper.js 8a65055 
>   ambari-web/app/models/stack_service_component.js 26ff1b8 
>   ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
>   ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 
> 
> Diff: https://reviews.apache.org/r/45054/diff/
> 
> 
> Testing
> -------
> 
> unit test
> patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.
> 
> 
> Thanks,
> 
> Di Li
> 
>


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by Di Li <di...@ca.ibm.com>.

> On March 18, 2016, 10:07 p.m., Alejandro Fernandez wrote:
> > Thank you for adding this. Any unit tests?

yes, unit tests for both UI and java backend. I also added more unit tests to the latest patch.


- Di


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/#review124303
-----------------------------------------------------------


On March 29, 2016, 5:03 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45054/
> -----------------------------------------------------------
> 
> (Updated March 29, 2016, 5:03 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15443
>     https://issues.apache.org/jira/browse/AMBARI-15443
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.
> 
> The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.
> 
> components: function () {
> var serviceNames = App.Service.find().mapProperty('serviceName');
> var menuItems = [
> O.create(
> { serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }
> 
> ),
> O.create(
> { serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }
> 
> ),
> O.create(
> { serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }
> 
> ),
> O.create(
> { serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }
> 
> )];
> 
> return menuItems.filter(function (item)
> { return serviceNames.contains(item.serviceName); }
> 
> );
> }.property(),
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
>   ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 770ee5c 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml 057e126 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 75d3bea 
>   ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 804374a 
>   ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 0f71585 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java ca062c0 
>   ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HBASE/metainfo.xml 0942428 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml 7c0dc74 
>   ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml 3043b1e 
>   ambari-web/app/mappers/stack_service_mapper.js 8a65055 
>   ambari-web/app/models/stack_service_component.js 26ff1b8 
>   ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
>   ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 
> 
> Diff: https://reviews.apache.org/r/45054/diff/
> 
> 
> Testing
> -------
> 
> unit test
> patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.
> 
> 
> Thanks,
> 
> Di Li
> 
>


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/#review124303
-----------------------------------------------------------


Fix it, then Ship it!




Thank you for adding this. Any unit tests?


ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java (line 144)
<https://reviews.apache.org/r/45054/#comment186774>

    Style, prefer to use braces after "if"
    Add java doc


- Alejandro Fernandez


On March 18, 2016, 9:46 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45054/
> -----------------------------------------------------------
> 
> (Updated March 18, 2016, 9:46 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15443
>     https://issues.apache.org/jira/browse/AMBARI-15443
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.
> 
> The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.
> 
> components: function () {
> var serviceNames = App.Service.find().mapProperty('serviceName');
> var menuItems = [
> O.create(
> { serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }
> 
> ),
> O.create(
> { serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }
> 
> ),
> O.create(
> { serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }
> 
> ),
> O.create(
> { serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }
> 
> )];
> 
> return menuItems.filter(function (item)
> { return serviceNames.contains(item.serviceName); }
> 
> );
> }.property(),
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
>   ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 770ee5c 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml 057e126 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 75d3bea 
>   ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 804374a 
>   ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 0f71585 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
>   ambari-web/app/mappers/stack_service_mapper.js 8a65055 
>   ambari-web/app/models/stack_service_component.js 26ff1b8 
>   ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
>   ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 
> 
> Diff: https://reviews.apache.org/r/45054/diff/
> 
> 
> Testing
> -------
> 
> unit test
> patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.
> 
> 
> Thanks,
> 
> Di Li
> 
>


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by Di Li <di...@ca.ibm.com>.

> On March 31, 2016, 1:54 a.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java, line 70
> > <https://reviews.apache.org/r/45054/diff/2/?file=1318104#file1318104line70>
> >
> >     May want to check these these are not null.

Hello Alejandro,

HashCodeBuilder is able to generate a  hash against null. so I didn't do null check against the displayName and masterComponent here.


- Di


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/#review126240
-----------------------------------------------------------


On March 29, 2016, 5:03 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45054/
> -----------------------------------------------------------
> 
> (Updated March 29, 2016, 5:03 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15443
>     https://issues.apache.org/jira/browse/AMBARI-15443
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.
> 
> The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.
> 
> components: function () {
> var serviceNames = App.Service.find().mapProperty('serviceName');
> var menuItems = [
> O.create(
> { serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }
> 
> ),
> O.create(
> { serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }
> 
> ),
> O.create(
> { serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }
> 
> ),
> O.create(
> { serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }
> 
> )];
> 
> return menuItems.filter(function (item)
> { return serviceNames.contains(item.serviceName); }
> 
> );
> }.property(),
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
>   ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 770ee5c 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml 057e126 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 75d3bea 
>   ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 804374a 
>   ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 0f71585 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java ca062c0 
>   ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HBASE/metainfo.xml 0942428 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml 7c0dc74 
>   ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml 3043b1e 
>   ambari-web/app/mappers/stack_service_mapper.js 8a65055 
>   ambari-web/app/models/stack_service_component.js 26ff1b8 
>   ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
>   ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 
> 
> Diff: https://reviews.apache.org/r/45054/diff/
> 
> 
> Testing
> -------
> 
> unit test
> patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.
> 
> 
> Thanks,
> 
> Di Li
> 
>


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/#review126240
-----------------------------------------------------------


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java (line 70)
<https://reviews.apache.org/r/45054/#comment189161>

    May want to check these these are not null.


- Alejandro Fernandez


On March 29, 2016, 5:03 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45054/
> -----------------------------------------------------------
> 
> (Updated March 29, 2016, 5:03 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15443
>     https://issues.apache.org/jira/browse/AMBARI-15443
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.
> 
> The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.
> 
> components: function () {
> var serviceNames = App.Service.find().mapProperty('serviceName');
> var menuItems = [
> O.create(
> { serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }
> 
> ),
> O.create(
> { serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }
> 
> ),
> O.create(
> { serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }
> 
> ),
> O.create(
> { serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }
> 
> )];
> 
> return menuItems.filter(function (item)
> { return serviceNames.contains(item.serviceName); }
> 
> );
> }.property(),
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
>   ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 770ee5c 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml 057e126 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 75d3bea 
>   ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 804374a 
>   ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 0f71585 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java ca062c0 
>   ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HBASE/metainfo.xml 0942428 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml 7c0dc74 
>   ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml 3043b1e 
>   ambari-web/app/mappers/stack_service_mapper.js 8a65055 
>   ambari-web/app/models/stack_service_component.js 26ff1b8 
>   ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
>   ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 
> 
> Diff: https://reviews.apache.org/r/45054/diff/
> 
> 
> Testing
> -------
> 
> unit test
> patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.
> 
> 
> Thanks,
> 
> Di Li
> 
>


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/#review126362
-----------------------------------------------------------


Ship it!




Ship It!

- Alejandro Fernandez


On March 31, 2016, 4:44 p.m., Di Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45054/
> -----------------------------------------------------------
> 
> (Updated March 31, 2016, 4:44 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15443
>     https://issues.apache.org/jira/browse/AMBARI-15443
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.
> 
> The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.
> 
> components: function () {
> var serviceNames = App.Service.find().mapProperty('serviceName');
> var menuItems = [
> O.create(
> { serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }
> 
> ),
> O.create(
> { serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }
> 
> ),
> O.create(
> { serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }
> 
> ),
> O.create(
> { serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }
> 
> )];
> 
> return menuItems.filter(function (item)
> { return serviceNames.contains(item.serviceName); }
> 
> );
> }.property(),
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
>   ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 0d2053c 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
>   ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml d96c6fb 
>   ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 0ffd8f5 
>   ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
>   ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 08286f3 
>   ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 592631e 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java af51baf 
>   ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HBASE/metainfo.xml 0942428 
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml 7c0dc74 
>   ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml 3043b1e 
>   ambari-web/app/mappers/stack_service_mapper.js 8a65055 
>   ambari-web/app/models/stack_service_component.js 26ff1b8 
>   ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
>   ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 
> 
> Diff: https://reviews.apache.org/r/45054/diff/
> 
> 
> Testing
> -------
> 
> unit test
> patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.
> 
> 
> Thanks,
> 
> Di Li
> 
>


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by Di Li <di...@ca.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/
-----------------------------------------------------------

(Updated March 31, 2016, 4:44 p.m.)


Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.


Changes
-------

rebase patch against the latest trunk code, due to the introduction of the logs section in the metainfo.xml


Bugs: AMBARI-15443
    https://issues.apache.org/jira/browse/AMBARI-15443


Repository: ambari


Description
-------

The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.

The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.

components: function () {
var serviceNames = App.Service.find().mapProperty('serviceName');
var menuItems = [
O.create(
{ serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }

),
O.create(
{ serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }

),
O.create(
{ serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }

),
O.create(
{ serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }

)];

return menuItems.filter(function (item)
{ return serviceNames.contains(item.serviceName); }

);
}.property(),


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
  ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
  ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 0d2053c 
  ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
  ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml d96c6fb 
  ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 0ffd8f5 
  ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
  ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 08286f3 
  ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 592631e 
  ambari-server/src/main/resources/properties.json 01c15f2 
  ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java af51baf 
  ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
  ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HBASE/metainfo.xml 0942428 
  ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml 7c0dc74 
  ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml 3043b1e 
  ambari-web/app/mappers/stack_service_mapper.js 8a65055 
  ambari-web/app/models/stack_service_component.js 26ff1b8 
  ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
  ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 

Diff: https://reviews.apache.org/r/45054/diff/


Testing
-------

unit test
patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.


Thanks,

Di Li


Re: Review Request 45054: AMBARI-15443:Make Host bulk command menu item list stack driven instead of a hardcoded list in UI code

Posted by Di Li <di...@ca.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45054/
-----------------------------------------------------------

(Updated March 29, 2016, 5:03 p.m.)


Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, and Yusaku Sako.


Bugs: AMBARI-15443
    https://issues.apache.org/jira/browse/AMBARI-15443


Repository: ambari


Description
-------

The items described here are the ones on the Hosts tab, in the Actions drop-down list where the UI shows entries such as All Hosts. If user mouses over the All Hosts, it shows a sub-list including Hosts and slave components.

The slave component items are hardcoded in hosts_table_menu_view.js as shown below. This jira is to put this info into each service's metainfo.xml so that the slave component items can be stack driven.

components: function () {
var serviceNames = App.Service.find().mapProperty('serviceName');
var menuItems = [
O.create(
{ serviceName: 'HDFS', componentName: 'DATANODE', masterComponentName: 'NAMENODE', componentNameFormatted: Em.I18n.t('dashboard.services.hdfs.datanodes') }

),
O.create(
{ serviceName: 'YARN', componentName: 'NODEMANAGER', masterComponentName: 'RESOURCEMANAGER', componentNameFormatted: Em.I18n.t('dashboard.services.yarn.nodeManagers') }

),
O.create(
{ serviceName: 'HBASE', componentName: 'HBASE_REGIONSERVER', masterComponentName: 'HBASE_MASTER', componentNameFormatted: Em.I18n.t('dashboard.services.hbase.regionServers') }

),
O.create(
{ serviceName: 'STORM', componentName: 'SUPERVISOR', masterComponentName: 'SUPERVISOR', componentNameFormatted: Em.I18n.t('dashboard.services.storm.supervisors') }

)];

return menuItems.filter(function (item)
{ return serviceNames.contains(item.serviceName); }

);
}.property(),


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java cfd4e7b 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java 70945ba 
  ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java a122dc6 
  ambari-server/src/main/java/org/apache/ambari/server/state/BulkCommandDefinition.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ComponentInfo.java 770ee5c 
  ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml e35b7d8 
  ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metainfo.xml 057e126 
  ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml 75d3bea 
  ambari-server/src/main/resources/common-services/PXF/3.0.0/metainfo.xml afe27ec 
  ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml 804374a 
  ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml 0f71585 
  ambari-server/src/main/resources/properties.json 01c15f2 
  ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java ca062c0 
  ambari-server/src/test/java/org/apache/ambari/server/stack/ComponentModuleTest.java 2f84f04 
  ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HBASE/metainfo.xml 0942428 
  ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml 7c0dc74 
  ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml 3043b1e 
  ambari-web/app/mappers/stack_service_mapper.js 8a65055 
  ambari-web/app/models/stack_service_component.js 26ff1b8 
  ambari-web/app/views/main/host/hosts_table_menu_view.js e75b643 
  ambari-web/test/mappers/stack_service_mapper_test.js 4bc36fe 

Diff: https://reviews.apache.org/r/45054/diff/


Testing
-------

unit test
patch a trunk cluster with code change, verify the host bulk command list shown for DataNode, HBase Region server, storm supervisor, etc.


Thanks,

Di Li