You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2014/10/25 16:48:22 UTC

Review Request 27194: Views: on deploy, validate view.xml

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

Review request for Ambari, Jonathan Hurley and Nate Cole.


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


Repository: ambari


Description
-------

On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
  ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
  ambari-server/src/test/resources/test_view.xml PRE-CREATION 

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


Testing
-------

Manual testing.  New unit tests added.  All existing pass ...


Results :

Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14

...


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36:45.663s
[INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
[INFO] Final Memory: 41M/344M
[INFO] ------------------------------------------------------------------------


Thanks,

Tom Beerbower


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27194/#review58610
-----------------------------------------------------------

Ship it!


Ship It!

- Jonathan Hurley


On Oct. 27, 2014, 6:15 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27194/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2014, 6:15 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-7964
>     https://issues.apache.org/jira/browse/AMBARI-7964
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
> Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
>   ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
>   ambari-server/src/test/resources/test_view.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27194/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.  New unit tests added.  All existing pass ...
> 
> 
> Results :
> 
> Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14
> 
> ...
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 36:45.663s
> [INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
> [INFO] Final Memory: 41M/344M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27194/#review58604
-----------------------------------------------------------

Ship it!


Ship It!

- Nate Cole


On Oct. 27, 2014, 6:15 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27194/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2014, 6:15 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-7964
>     https://issues.apache.org/jira/browse/AMBARI-7964
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
> Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
>   ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
>   ambari-server/src/test/resources/test_view.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27194/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.  New unit tests added.  All existing pass ...
> 
> 
> Results :
> 
> Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14
> 
> ...
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 36:45.663s
> [INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
> [INFO] Final Memory: 41M/344M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27194/
-----------------------------------------------------------

(Updated Oct. 27, 2014, 10:15 a.m.)


Review request for Ambari, Jonathan Hurley and Nate Cole.


Changes
-------

update patch


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


Repository: ambari


Description
-------

On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
  ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
  ambari-server/src/test/resources/test_view.xml PRE-CREATION 

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


Testing
-------

Manual testing.  New unit tests added.  All existing pass ...


Results :

Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14

...


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36:45.663s
[INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
[INFO] Final Memory: 41M/344M
[INFO] ------------------------------------------------------------------------


Thanks,

Tom Beerbower


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Tom Beerbower <tb...@hortonworks.com>.

> On Oct. 27, 2014, 2:52 a.m., Jonathan Hurley wrote:
> > This is one reason I like XML over JSON :) 
> > 
> > 2 minor comments; nothing that should hold up committing it. But if you agree with me and decide to change either point, I don't think it requires another +1 from me b/c they are so minor.

Thanks for reviewing!


- Tom


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


On Oct. 27, 2014, 10:15 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27194/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2014, 10:15 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-7964
>     https://issues.apache.org/jira/browse/AMBARI-7964
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
> Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
>   ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
>   ambari-server/src/test/resources/test_view.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27194/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.  New unit tests added.  All existing pass ...
> 
> 
> Results :
> 
> Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14
> 
> ...
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 36:45.663s
> [INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
> [INFO] Final Memory: 41M/344M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Tom Beerbower <tb...@hortonworks.com>.

> On Oct. 27, 2014, 2:52 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java, line 535
> > <https://reviews.apache.org/r/27194/diff/2/?file=733559#file733559line535>
> >
> >     Just a nit; I like to have boolean methods usually named with "is", such as isViewValidationEnabled()

I agree.  I thought I was following the convention for the class (i.e. boolean csrfProtectionEnabled()), but looking now I see that there really isn't a convention.  Your name is better.


> On Oct. 27, 2014, 2:52 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java, line 147
> > <https://reviews.apache.org/r/27194/diff/2/?file=733560#file733560line147>
> >
> >     Should the exception here be something other than a RuntimeException? Initially, I thought that IllegalStateException seemed wrong since calling this method at this time is a legal action; it's just the data that's invalid.
> >     
> >     But then I though that maybe this should be checked so that callers can decide how they want to handle the invalid view XML. Thoughts?
> >     
> >     I think it's good for now; no need to hold up the review on it, but it feels like a checked exception might be a better fit here.

Yes, I agree on this also.


- Tom


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


On Oct. 27, 2014, 12:42 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27194/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2014, 12:42 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-7964
>     https://issues.apache.org/jira/browse/AMBARI-7964
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
> Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
>   ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
>   ambari-server/src/test/resources/test_view.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27194/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.  New unit tests added.  All existing pass ...
> 
> 
> Results :
> 
> Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14
> 
> ...
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 36:45.663s
> [INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
> [INFO] Final Memory: 41M/344M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27194/#review58583
-----------------------------------------------------------

Ship it!


This is one reason I like XML over JSON :) 

2 minor comments; nothing that should hold up committing it. But if you agree with me and decide to change either point, I don't think it requires another +1 from me b/c they are so minor.


ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
<https://reviews.apache.org/r/27194/#comment99645>

    Just a nit; I like to have boolean methods usually named with "is", such as isViewValidationEnabled()



ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java
<https://reviews.apache.org/r/27194/#comment99646>

    Should the exception here be something other than a RuntimeException? Initially, I thought that IllegalStateException seemed wrong since calling this method at this time is a legal action; it's just the data that's invalid.
    
    But then I though that maybe this should be checked so that callers can decide how they want to handle the invalid view XML. Thoughts?
    
    I think it's good for now; no need to hold up the review on it, but it feels like a checked exception might be a better fit here.


- Jonathan Hurley


On Oct. 26, 2014, 8:42 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27194/
> -----------------------------------------------------------
> 
> (Updated Oct. 26, 2014, 8:42 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-7964
>     https://issues.apache.org/jira/browse/AMBARI-7964
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
> Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
>   ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
>   ambari-server/src/test/resources/test_view.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27194/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.  New unit tests added.  All existing pass ...
> 
> 
> Results :
> 
> Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14
> 
> ...
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 36:45.663s
> [INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
> [INFO] Final Memory: 41M/344M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27194/
-----------------------------------------------------------

(Updated Oct. 27, 2014, 12:42 a.m.)


Review request for Ambari, Jonathan Hurley and Nate Cole.


Changes
-------

patch updated


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


Repository: ambari


Description
-------

On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
  ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
  ambari-server/src/test/resources/test_view.xml PRE-CREATION 

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


Testing
-------

Manual testing.  New unit tests added.  All existing pass ...


Results :

Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14

...


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36:45.663s
[INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
[INFO] Final Memory: 41M/344M
[INFO] ------------------------------------------------------------------------


Thanks,

Tom Beerbower


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Tom Beerbower <tb...@hortonworks.com>.

> On Oct. 25, 2014, 4:18 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java, lines 64-65
> > <https://reviews.apache.org/r/27194/diff/1/?file=733332#file733332line64>
> >
> >     Default is the same value as the key name?  Comparison is with the string "true", so should the default be "false" or "true"?

Oops...  That evaluates to false which it what I was testing for so I didn't notice.  Thanks Nate!  Patch updated.


- Tom


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


On Oct. 27, 2014, 12:42 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27194/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2014, 12:42 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-7964
>     https://issues.apache.org/jira/browse/AMBARI-7964
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
> Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
>   ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
>   ambari-server/src/test/resources/test_view.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27194/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.  New unit tests added.  All existing pass ...
> 
> 
> Results :
> 
> Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14
> 
> ...
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 36:45.663s
> [INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
> [INFO] Final Memory: 41M/344M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 27194: Views: on deploy, validate view.xml

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27194/#review58513
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
<https://reviews.apache.org/r/27194/#comment99598>

    Default is the same value as the key name?  Comparison is with the string "true", so should the default be "false" or "true"?


- Nate Cole


On Oct. 25, 2014, 10:48 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27194/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2014, 10:48 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-7964
>     https://issues.apache.org/jira/browse/AMBARI-7964
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> On view deploy: perform validation of view.xml in view package and if the view.xml does not validate, provide a specific error to the log.
> Validation can be an optional operation that can be enabled/disabled in the ambari server (maybe just a prop in ambari.properties view.validation.enabled=true/false)?
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 535e569 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java f5f2732 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java c4da8b4 
>   ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java 12b5333 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewArchiveUtilityTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewExtractorTest.java 1b71c37 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 7c0cade 
>   ambari-server/src/test/resources/test_view.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27194/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.  New unit tests added.  All existing pass ...
> 
> 
> Results :
> 
> Tests run: 2202, Failures: 0, Errors: 0, Skipped: 14
> 
> ...
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 36:45.663s
> [INFO] Finished at: Sat Oct 25 08:06:24 EDT 2014
> [INFO] Final Memory: 41M/344M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>