Re: Review Request 53346: AMBARI-18765 - Services with invalid themes hang the UI when you attempt to add them

2016-11-03 Thread Tim Thorpe


> On Nov. 3, 2016, 4:21 p.m., Jayush Luniya wrote:
> > Ship It!
> 
> Jayush Luniya wrote:
> Ok with the change, but does this need to be in 2.4.2 or fine with 
> keeping this in 2.5.0?

Hi Jayush, Didn't see your reply until I had just finished pushing this into 
2.4.2, 2.5 and trunk.


- Tim


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


On Nov. 1, 2016, 6:47 p.m., Tim Thorpe wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53346/
> ---
> 
> (Updated Nov. 1, 2016, 6:47 p.m.)
> 
> 
> Review request for Ambari, Di Li and Jayush Luniya.
> 
> 
> Bugs: AMBARI-18765
> https://issues.apache.org/jira/browse/AMBARI-18765
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Description
> 
> For a given service if the theme.json file is not properly formatted, Ambari 
> server will still start 'successfully' but attempts to add that service to 
> the cluster will fail.
> 
> The Ambari server start will log the theme error. Although it neglects to 
> mention which theme file and service are in error.
> 
> When you attempt to add the service, it will query for the service's themes:
> 
> api/v1/stacks//versions//services?StackServices/service_name.in(HDFS,YARN,MAPREDUCE2,ZOOKEEPER,RANGER,RANGER_KMS,SLIDER)&themes/ThemeInfo/default=true&fields=themes/*
> 
> This will return something like the following for the invalid theme:
> 
> "ThemeInfo" :
> { "default" : true, "file_name" : "theme_version_2.json", "service_name" : 
> "RANGER_KMS", "stack_name" : "BigInsights", "stack_version" : "4.3", 
> "theme_data" : null }
> 
> where the theme_data is null.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java 
> 650bdf1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerExtensionTest.java
>  044f2c4 
>   
> ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/metainfo.xml
>  ab67178 
>   
> ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/themes/working_theme.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/metainfo.xml
>  9ae4f4b 
>   
> ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/themes/broken_theme.json
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53346/diff/
> 
> 
> Testing
> ---
> 
> mvn test -Dtest=StackManagerExtensionTest -DskipPythonTests
> 
> passes without errors
> 
> mvn test
> 
> Failed tests:
>   UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1107
>   Unexpected method call 
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
> org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service):
> AmbariManagementController.getClusters(): expected: at least 0, actual: 1
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
> interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service): expected: 1, actual: 0
>   DataStoreImplTest.testFind:526 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testRemove:475 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update:357 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update_longStringValue:426
>   Expectation failure on verify:
> DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
> Tests in error:
>   KerberosCheckerTest.testCheckFailed »  Unexpected exception, 
> expected   KerberosCheckerTest.testCheckPassed:62 » ClassCast class 
> sun.security.provider...
>   AmbariAuthenticationFilterTest.testOnSuccessfulAuthentication:98 » Linkage 
> loa...
> 
> Tests run: 4660, Failures: 5, Errors: 3, Skipped: 34
> 
> 
> Thanks,
> 
> Tim Thorpe
> 
>



Re: Review Request 53346: AMBARI-18765 - Services with invalid themes hang the UI when you attempt to add them

2016-11-03 Thread Jayush Luniya


> On Nov. 3, 2016, 4:21 p.m., Jayush Luniya wrote:
> > Ship It!

Ok with the change, but does this need to be in 2.4.2 or fine with keeping this 
in 2.5.0?


- Jayush


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


On Nov. 1, 2016, 6:47 p.m., Tim Thorpe wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53346/
> ---
> 
> (Updated Nov. 1, 2016, 6:47 p.m.)
> 
> 
> Review request for Ambari, Di Li and Jayush Luniya.
> 
> 
> Bugs: AMBARI-18765
> https://issues.apache.org/jira/browse/AMBARI-18765
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Description
> 
> For a given service if the theme.json file is not properly formatted, Ambari 
> server will still start 'successfully' but attempts to add that service to 
> the cluster will fail.
> 
> The Ambari server start will log the theme error. Although it neglects to 
> mention which theme file and service are in error.
> 
> When you attempt to add the service, it will query for the service's themes:
> 
> api/v1/stacks//versions//services?StackServices/service_name.in(HDFS,YARN,MAPREDUCE2,ZOOKEEPER,RANGER,RANGER_KMS,SLIDER)&themes/ThemeInfo/default=true&fields=themes/*
> 
> This will return something like the following for the invalid theme:
> 
> "ThemeInfo" :
> { "default" : true, "file_name" : "theme_version_2.json", "service_name" : 
> "RANGER_KMS", "stack_name" : "BigInsights", "stack_version" : "4.3", 
> "theme_data" : null }
> 
> where the theme_data is null.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java 
> 650bdf1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerExtensionTest.java
>  044f2c4 
>   
> ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/metainfo.xml
>  ab67178 
>   
> ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/themes/working_theme.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/metainfo.xml
>  9ae4f4b 
>   
> ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/themes/broken_theme.json
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53346/diff/
> 
> 
> Testing
> ---
> 
> mvn test -Dtest=StackManagerExtensionTest -DskipPythonTests
> 
> passes without errors
> 
> mvn test
> 
> Failed tests:
>   UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1107
>   Unexpected method call 
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
> org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service):
> AmbariManagementController.getClusters(): expected: at least 0, actual: 1
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
> interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service): expected: 1, actual: 0
>   DataStoreImplTest.testFind:526 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testRemove:475 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update:357 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update_longStringValue:426
>   Expectation failure on verify:
> DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
> Tests in error:
>   KerberosCheckerTest.testCheckFailed »  Unexpected exception, 
> expected   KerberosCheckerTest.testCheckPassed:62 » ClassCast class 
> sun.security.provider...
>   AmbariAuthenticationFilterTest.testOnSuccessfulAuthentication:98 » Linkage 
> loa...
> 
> Tests run: 4660, Failures: 5, Errors: 3, Skipped: 34
> 
> 
> Thanks,
> 
> Tim Thorpe
> 
>



Re: Review Request 53346: AMBARI-18765 - Services with invalid themes hang the UI when you attempt to add them

2016-11-03 Thread Jayush Luniya

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


Ship it!




Ship It!

- Jayush Luniya


On Nov. 1, 2016, 6:47 p.m., Tim Thorpe wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53346/
> ---
> 
> (Updated Nov. 1, 2016, 6:47 p.m.)
> 
> 
> Review request for Ambari, Di Li and Jayush Luniya.
> 
> 
> Bugs: AMBARI-18765
> https://issues.apache.org/jira/browse/AMBARI-18765
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Description
> 
> For a given service if the theme.json file is not properly formatted, Ambari 
> server will still start 'successfully' but attempts to add that service to 
> the cluster will fail.
> 
> The Ambari server start will log the theme error. Although it neglects to 
> mention which theme file and service are in error.
> 
> When you attempt to add the service, it will query for the service's themes:
> 
> api/v1/stacks//versions//services?StackServices/service_name.in(HDFS,YARN,MAPREDUCE2,ZOOKEEPER,RANGER,RANGER_KMS,SLIDER)&themes/ThemeInfo/default=true&fields=themes/*
> 
> This will return something like the following for the invalid theme:
> 
> "ThemeInfo" :
> { "default" : true, "file_name" : "theme_version_2.json", "service_name" : 
> "RANGER_KMS", "stack_name" : "BigInsights", "stack_version" : "4.3", 
> "theme_data" : null }
> 
> where the theme_data is null.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java 
> 650bdf1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerExtensionTest.java
>  044f2c4 
>   
> ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/metainfo.xml
>  ab67178 
>   
> ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/themes/working_theme.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/metainfo.xml
>  9ae4f4b 
>   
> ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/themes/broken_theme.json
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53346/diff/
> 
> 
> Testing
> ---
> 
> mvn test -Dtest=StackManagerExtensionTest -DskipPythonTests
> 
> passes without errors
> 
> mvn test
> 
> Failed tests:
>   UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1107
>   Unexpected method call 
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
> org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service):
> AmbariManagementController.getClusters(): expected: at least 0, actual: 1
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
> interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service): expected: 1, actual: 0
>   DataStoreImplTest.testFind:526 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testRemove:475 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update:357 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update_longStringValue:426
>   Expectation failure on verify:
> DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
> Tests in error:
>   KerberosCheckerTest.testCheckFailed »  Unexpected exception, 
> expected   KerberosCheckerTest.testCheckPassed:62 » ClassCast class 
> sun.security.provider...
>   AmbariAuthenticationFilterTest.testOnSuccessfulAuthentication:98 » Linkage 
> loa...
> 
> Tests run: 4660, Failures: 5, Errors: 3, Skipped: 34
> 
> 
> Thanks,
> 
> Tim Thorpe
> 
>



Re: Review Request 53346: AMBARI-18765 - Services with invalid themes hang the UI when you attempt to add them

2016-11-01 Thread Di Li

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


Ship it!




Ship It!

- Di Li


On Nov. 1, 2016, 6:47 p.m., Tim Thorpe wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53346/
> ---
> 
> (Updated Nov. 1, 2016, 6:47 p.m.)
> 
> 
> Review request for Ambari, Di Li and Jayush Luniya.
> 
> 
> Bugs: AMBARI-18765
> https://issues.apache.org/jira/browse/AMBARI-18765
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Description
> 
> For a given service if the theme.json file is not properly formatted, Ambari 
> server will still start 'successfully' but attempts to add that service to 
> the cluster will fail.
> 
> The Ambari server start will log the theme error. Although it neglects to 
> mention which theme file and service are in error.
> 
> When you attempt to add the service, it will query for the service's themes:
> 
> api/v1/stacks//versions//services?StackServices/service_name.in(HDFS,YARN,MAPREDUCE2,ZOOKEEPER,RANGER,RANGER_KMS,SLIDER)&themes/ThemeInfo/default=true&fields=themes/*
> 
> This will return something like the following for the invalid theme:
> 
> "ThemeInfo" :
> { "default" : true, "file_name" : "theme_version_2.json", "service_name" : 
> "RANGER_KMS", "stack_name" : "BigInsights", "stack_version" : "4.3", 
> "theme_data" : null }
> 
> where the theme_data is null.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java 
> 650bdf1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerExtensionTest.java
>  044f2c4 
>   
> ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/metainfo.xml
>  ab67178 
>   
> ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/themes/working_theme.json
>  PRE-CREATION 
>   
> ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/metainfo.xml
>  9ae4f4b 
>   
> ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/themes/broken_theme.json
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53346/diff/
> 
> 
> Testing
> ---
> 
> mvn test -Dtest=StackManagerExtensionTest -DskipPythonTests
> 
> passes without errors
> 
> mvn test
> 
> Failed tests:
>   UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1107
>   Unexpected method call 
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
> org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service):
> AmbariManagementController.getClusters(): expected: at least 0, actual: 1
> AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
> interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
> org.apache.ambari.server.state.Service): expected: 1, actual: 0
>   DataStoreImplTest.testFind:526 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testRemove:475 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update:357 expected: DS_DataStoreImplTest$TestEntity_1> but was: DS_DataStoreImplTest$TestSubEntity_1>
>   DataStoreImplTest.testStore_update_longStringValue:426
>   Expectation failure on verify:
> DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
> Tests in error:
>   KerberosCheckerTest.testCheckFailed »  Unexpected exception, 
> expected   KerberosCheckerTest.testCheckPassed:62 » ClassCast class 
> sun.security.provider...
>   AmbariAuthenticationFilterTest.testOnSuccessfulAuthentication:98 » Linkage 
> loa...
> 
> Tests run: 4660, Failures: 5, Errors: 3, Skipped: 34
> 
> 
> Thanks,
> 
> Tim Thorpe
> 
>



Review Request 53346: AMBARI-18765 - Services with invalid themes hang the UI when you attempt to add them

2016-11-01 Thread Tim Thorpe

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

Review request for Ambari, Di Li and Jayush Luniya.


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


Repository: ambari


Description
---

Description

For a given service if the theme.json file is not properly formatted, Ambari 
server will still start 'successfully' but attempts to add that service to the 
cluster will fail.

The Ambari server start will log the theme error. Although it neglects to 
mention which theme file and service are in error.

When you attempt to add the service, it will query for the service's themes:

api/v1/stacks//versions//services?StackServices/service_name.in(HDFS,YARN,MAPREDUCE2,ZOOKEEPER,RANGER,RANGER_KMS,SLIDER)&themes/ThemeInfo/default=true&fields=themes/*

This will return something like the following for the invalid theme:

"ThemeInfo" :
{ "default" : true, "file_name" : "theme_version_2.json", "service_name" : 
"RANGER_KMS", "stack_name" : "BigInsights", "stack_version" : "4.3", 
"theme_data" : null }

where the theme_data is null.


Diffs
-

  ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java 
650bdf1 
  
ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerExtensionTest.java
 044f2c4 
  
ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/metainfo.xml
 ab67178 
  
ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/themes/working_theme.json
 PRE-CREATION 
  
ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/metainfo.xml
 9ae4f4b 
  
ambari-server/src/test/resources/extensions/EXT/0.2/services/OOZIE2/themes/broken_theme.json
 PRE-CREATION 

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


Testing
---

mvn test -Dtest=StackManagerExtensionTest -DskipPythonTests

passes without errors

mvn test

Failed tests:
  UpgradeCatalog222Test.testInitializeStromAndKafkaWidgets:1107
  Unexpected method call 
AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for interface 
org.apache.ambari.server.state.Cluster, EasyMock for interface 
org.apache.ambari.server.state.Service):
AmbariManagementController.getClusters(): expected: at least 0, actual: 1
AmbariManagementController.initializeWidgetsAndLayouts(EasyMock for 
interface org.apache.ambari.server.state.Cluster, EasyMock for interface 
org.apache.ambari.server.state.Service): expected: 1, actual: 0
  DataStoreImplTest.testFind:526 expected: but was:
  DataStoreImplTest.testRemove:475 expected: but was:
  DataStoreImplTest.testStore_update:357 expected: but was:
  DataStoreImplTest.testStore_update_longStringValue:426
  Expectation failure on verify:
DynamicEntity.set("DS_id", 99): expected: 1, actual: 0
Tests in error:
  KerberosCheckerTest.testCheckFailed »  Unexpected exception, 
expected