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/05/08 01:19:48 UTC
Review Request 21181: Ability to work on a view as "exploded" to support UI
dev
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21181/
-----------------------------------------------------------
Review request for Ambari, Nate Cole and Sumit Mohanty.
Bugs: AMBARI-5702
https://issues.apache.org/jira/browse/AMBARI-5702
Repository: ambari
Description
-------
After deploying view JAR, explode the view so that UI resources can be modified without requiring re-deploy or ambari-server restart.
Developer should be able to make changes to UI code and click "refresh" in browser to pick up the changes.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 532259b
ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 37862f0
Diff: https://reviews.apache.org/r/21181/diff/
Testing
-------
Added new unit test. All existing unit tests pass ...
Results :
Tests run: 1595, Failures: 0, Errors: 0, Skipped: 9
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22:19.667s
[INFO] Finished at: Wed May 07 18:19:17 EDT 2014
[INFO] Final Memory: 36M/123M
[INFO] ------------------------------------------------------------------------
Manual test ...
1. Under ambari-views/examples/helloworld-view, build the hello world view example : mvn clean install
2. Copy the hello world view archive from ambari-views/examples/helloworld-view/target/helloworld-view-1.0.0.jar to the views directory on the Ambari server : /var/lib/ambari-server/resources/views
3. Start the Ambari server : ambari-server start
4. Check to see that the hello world view has been exploded. Under /var/lib/ambari-server/resources/views/work you should see a new folder HELLO_WORLD{1.0.0}
5. Verify through the API that the view is deployed : http://c6401.ambari.apache.org:8080/api/v1/views/
6. Verify through the API that the view instance is available : http://c6401.ambari.apache.org:8080/api/v1/views/HELLO_WORLD/versions/1.0.0/instances/INSTANCE_1
7. Note the context path in the response : "context_path" : "/views/HELLO_WORLD/1.0.0/INSTANCE_1"
8. Access the view UI : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello world!' in the browser.
9. Modify the index.html file in the view : /var/lib/ambari-server/resources/views/work/HELLO_WORLD\{1.0.0\}/index.html. Change 'Hello world!' to 'Hello TOM!'
10. Refresh the browser : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello TOM!'.
Thanks,
Tom Beerbower
Re: Review Request 21181: Ability to work on a view as "exploded" to support
UI dev
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21181/#review42507
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On May 8, 2014, 10:50 a.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21181/
> -----------------------------------------------------------
>
> (Updated May 8, 2014, 10:50 a.m.)
>
>
> Review request for Ambari, Nate Cole and Sumit Mohanty.
>
>
> Bugs: AMBARI-5702
> https://issues.apache.org/jira/browse/AMBARI-5702
>
>
> Repository: ambari
>
>
> Description
> -------
>
> After deploying view JAR, explode the view so that UI resources can be modified without requiring re-deploy or ambari-server restart.
>
> Developer should be able to make changes to UI code and click "refresh" in browser to pick up the changes.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java f65e26c
> ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 532259b
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 37862f0
>
> Diff: https://reviews.apache.org/r/21181/diff/
>
>
> Testing
> -------
>
> Added new unit test. All existing unit tests pass ...
>
> Results :
>
> Tests run: 1595, Failures: 0, Errors: 0, Skipped: 9
> ...
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 22:19.667s
> [INFO] Finished at: Wed May 07 18:19:17 EDT 2014
> [INFO] Final Memory: 36M/123M
> [INFO] ------------------------------------------------------------------------
>
> Manual test ...
>
>
> 1. Under ambari-views/examples/helloworld-view, build the hello world view example : mvn clean install
> 2. Copy the hello world view archive from ambari-views/examples/helloworld-view/target/helloworld-view-1.0.0.jar to the views directory on the Ambari server : /var/lib/ambari-server/resources/views
> 3. Start the Ambari server : ambari-server start
> 4. Check to see that the hello world view has been exploded. Under /var/lib/ambari-server/resources/views/work you should see a new folder HELLO_WORLD{1.0.0}
> 5. Verify through the API that the view is deployed : http://c6401.ambari.apache.org:8080/api/v1/views/
> 6. Verify through the API that the view instance is available : http://c6401.ambari.apache.org:8080/api/v1/views/HELLO_WORLD/versions/1.0.0/instances/INSTANCE_1
> 7. Note the context path in the response : "context_path" : "/views/HELLO_WORLD/1.0.0/INSTANCE_1"
> 8. Access the view UI : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello world!' in the browser.
> 9. Modify the index.html file in the view : /var/lib/ambari-server/resources/views/work/HELLO_WORLD\{1.0.0\}/index.html. Change 'Hello world!' to 'Hello TOM!'
> 10. Refresh the browser : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello TOM!'.
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 21181: Ability to work on a view as "exploded" to support
UI dev
Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21181/
-----------------------------------------------------------
(Updated May 8, 2014, 2:50 p.m.)
Review request for Ambari, Nate Cole and Sumit Mohanty.
Bugs: AMBARI-5702
https://issues.apache.org/jira/browse/AMBARI-5702
Repository: ambari
Description
-------
After deploying view JAR, explode the view so that UI resources can be modified without requiring re-deploy or ambari-server restart.
Developer should be able to make changes to UI code and click "refresh" in browser to pick up the changes.
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java f65e26c
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 532259b
ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 37862f0
Diff: https://reviews.apache.org/r/21181/diff/
Testing
-------
Added new unit test. All existing unit tests pass ...
Results :
Tests run: 1595, Failures: 0, Errors: 0, Skipped: 9
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22:19.667s
[INFO] Finished at: Wed May 07 18:19:17 EDT 2014
[INFO] Final Memory: 36M/123M
[INFO] ------------------------------------------------------------------------
Manual test ...
1. Under ambari-views/examples/helloworld-view, build the hello world view example : mvn clean install
2. Copy the hello world view archive from ambari-views/examples/helloworld-view/target/helloworld-view-1.0.0.jar to the views directory on the Ambari server : /var/lib/ambari-server/resources/views
3. Start the Ambari server : ambari-server start
4. Check to see that the hello world view has been exploded. Under /var/lib/ambari-server/resources/views/work you should see a new folder HELLO_WORLD{1.0.0}
5. Verify through the API that the view is deployed : http://c6401.ambari.apache.org:8080/api/v1/views/
6. Verify through the API that the view instance is available : http://c6401.ambari.apache.org:8080/api/v1/views/HELLO_WORLD/versions/1.0.0/instances/INSTANCE_1
7. Note the context path in the response : "context_path" : "/views/HELLO_WORLD/1.0.0/INSTANCE_1"
8. Access the view UI : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello world!' in the browser.
9. Modify the index.html file in the view : /var/lib/ambari-server/resources/views/work/HELLO_WORLD\{1.0.0\}/index.html. Change 'Hello world!' to 'Hello TOM!'
10. Refresh the browser : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello TOM!'.
Thanks,
Tom Beerbower
Re: Review Request 21181: Ability to work on a view as "exploded" to support
UI dev
Posted by Tom Beerbower <tb...@hortonworks.com>.
> On May 8, 2014, 12:12 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java, lines 701-704
> > <https://reviews.apache.org/r/21181/diff/1/?file=576511#file576511line701>
> >
> > Will this return false on a write protected filesystem, or throw an Exception? For the case where Ambari is running non-root. If an Exception is thrown, it doesn't appear to be caught by the caller?
Yeah, good point. I think that it would just return false in that case which would result in an error logged and no views deployed. If a runtime exception is thrown, it will not be caught and the ambari server start will fail. I'll adjust the code and submit a new patch. Thanks!
- Tom
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21181/#review42497
-----------------------------------------------------------
On May 7, 2014, 11:19 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21181/
> -----------------------------------------------------------
>
> (Updated May 7, 2014, 11:19 p.m.)
>
>
> Review request for Ambari, Nate Cole and Sumit Mohanty.
>
>
> Bugs: AMBARI-5702
> https://issues.apache.org/jira/browse/AMBARI-5702
>
>
> Repository: ambari
>
>
> Description
> -------
>
> After deploying view JAR, explode the view so that UI resources can be modified without requiring re-deploy or ambari-server restart.
>
> Developer should be able to make changes to UI code and click "refresh" in browser to pick up the changes.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 532259b
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 37862f0
>
> Diff: https://reviews.apache.org/r/21181/diff/
>
>
> Testing
> -------
>
> Added new unit test. All existing unit tests pass ...
>
> Results :
>
> Tests run: 1595, Failures: 0, Errors: 0, Skipped: 9
> ...
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 22:19.667s
> [INFO] Finished at: Wed May 07 18:19:17 EDT 2014
> [INFO] Final Memory: 36M/123M
> [INFO] ------------------------------------------------------------------------
>
> Manual test ...
>
>
> 1. Under ambari-views/examples/helloworld-view, build the hello world view example : mvn clean install
> 2. Copy the hello world view archive from ambari-views/examples/helloworld-view/target/helloworld-view-1.0.0.jar to the views directory on the Ambari server : /var/lib/ambari-server/resources/views
> 3. Start the Ambari server : ambari-server start
> 4. Check to see that the hello world view has been exploded. Under /var/lib/ambari-server/resources/views/work you should see a new folder HELLO_WORLD{1.0.0}
> 5. Verify through the API that the view is deployed : http://c6401.ambari.apache.org:8080/api/v1/views/
> 6. Verify through the API that the view instance is available : http://c6401.ambari.apache.org:8080/api/v1/views/HELLO_WORLD/versions/1.0.0/instances/INSTANCE_1
> 7. Note the context path in the response : "context_path" : "/views/HELLO_WORLD/1.0.0/INSTANCE_1"
> 8. Access the view UI : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello world!' in the browser.
> 9. Modify the index.html file in the view : /var/lib/ambari-server/resources/views/work/HELLO_WORLD\{1.0.0\}/index.html. Change 'Hello world!' to 'Hello TOM!'
> 10. Refresh the browser : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello TOM!'.
>
>
> Thanks,
>
> Tom Beerbower
>
>
Re: Review Request 21181: Ability to work on a view as "exploded" to support
UI dev
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21181/#review42497
-----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
<https://reviews.apache.org/r/21181/#comment76288>
Will this return false on a write protected filesystem, or throw an Exception? For the case where Ambari is running non-root. If an Exception is thrown, it doesn't appear to be caught by the caller?
- Nate Cole
On May 7, 2014, 7:19 p.m., Tom Beerbower wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21181/
> -----------------------------------------------------------
>
> (Updated May 7, 2014, 7:19 p.m.)
>
>
> Review request for Ambari, Nate Cole and Sumit Mohanty.
>
>
> Bugs: AMBARI-5702
> https://issues.apache.org/jira/browse/AMBARI-5702
>
>
> Repository: ambari
>
>
> Description
> -------
>
> After deploying view JAR, explode the view so that UI resources can be modified without requiring re-deploy or ambari-server restart.
>
> Developer should be able to make changes to UI code and click "refresh" in browser to pick up the changes.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 532259b
> ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 37862f0
>
> Diff: https://reviews.apache.org/r/21181/diff/
>
>
> Testing
> -------
>
> Added new unit test. All existing unit tests pass ...
>
> Results :
>
> Tests run: 1595, Failures: 0, Errors: 0, Skipped: 9
> ...
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 22:19.667s
> [INFO] Finished at: Wed May 07 18:19:17 EDT 2014
> [INFO] Final Memory: 36M/123M
> [INFO] ------------------------------------------------------------------------
>
> Manual test ...
>
>
> 1. Under ambari-views/examples/helloworld-view, build the hello world view example : mvn clean install
> 2. Copy the hello world view archive from ambari-views/examples/helloworld-view/target/helloworld-view-1.0.0.jar to the views directory on the Ambari server : /var/lib/ambari-server/resources/views
> 3. Start the Ambari server : ambari-server start
> 4. Check to see that the hello world view has been exploded. Under /var/lib/ambari-server/resources/views/work you should see a new folder HELLO_WORLD{1.0.0}
> 5. Verify through the API that the view is deployed : http://c6401.ambari.apache.org:8080/api/v1/views/
> 6. Verify through the API that the view instance is available : http://c6401.ambari.apache.org:8080/api/v1/views/HELLO_WORLD/versions/1.0.0/instances/INSTANCE_1
> 7. Note the context path in the response : "context_path" : "/views/HELLO_WORLD/1.0.0/INSTANCE_1"
> 8. Access the view UI : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello world!' in the browser.
> 9. Modify the index.html file in the view : /var/lib/ambari-server/resources/views/work/HELLO_WORLD\{1.0.0\}/index.html. Change 'Hello world!' to 'Hello TOM!'
> 10. Refresh the browser : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello TOM!'.
>
>
> Thanks,
>
> Tom Beerbower
>
>