You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Nate Cole <nc...@hortonworks.com> on 2014/03/14 22:01:00 UTC
Review Request 19237: Add ability to read latest repo and provide from Ambari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19237/
-----------------------------------------------------------
Review request for Ambari, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
Bugs: AMBARI-5095
https://issues.apache.org/jira/browse/AMBARI-5095
Repository: ambari
Description
-------
* Add ability to read either a file or an http url specified in repoinfo.xml, that is used to load the latest repo information.
* By default, there are no links in current stacks, that will come later.
* Give a latest_base_url to the repo API such that the UI can consume it.
* Design choice: I use a Callable in order to do the heavy lifting of reading and parsing the URL. The idea is to not hold up loading stacks if there is a bad URL. Bad URLs should not manifest themselves in errors - only use the value defined in XML in that case.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java 8e1e787
ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryResponse.java bc3ee39
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java 878e7ef
ambari-server/src/main/java/org/apache/ambari/server/state/RepositoryInfo.java f612bb4
ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java PRE-CREATION
ambari-server/src/main/java/org/apache/ambari/server/state/stack/RepositoryXml.java abca8f9
ambari-server/src/main/resources/properties.json d2a949e
ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java 515fd68
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryResourceProviderTest.java 391ff99
ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/hdp.json PRE-CREATION
ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/repoinfo.xml 1025240
Diff: https://reviews.apache.org/r/19237/diff/
Testing
-------
Running org.apache.ambari.server.api.services.AmbariMetaInfoTest
Tests run: 55, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.812 sec
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:18.403s
[INFO] Finished at: Fri Mar 14 16:45:12 EDT 2014
[INFO] Final Memory: 18M/123M
[INFO] ------------------------------------------------------------------------
Thanks,
Nate Cole
Re: Review Request 19237: Add ability to read latest repo and provide from
Ambari
Posted by Sid Wagle <sw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19237/#review37273
-----------------------------------------------------------
Ship it!
Ship It!
- Sid Wagle
On March 14, 2014, 9 p.m., Nate Cole wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19237/
> -----------------------------------------------------------
>
> (Updated March 14, 2014, 9 p.m.)
>
>
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
>
>
> Bugs: AMBARI-5095
> https://issues.apache.org/jira/browse/AMBARI-5095
>
>
> Repository: ambari
>
>
> Description
> -------
>
> * Add ability to read either a file or an http url specified in repoinfo.xml, that is used to load the latest repo information.
> * By default, there are no links in current stacks, that will come later.
> * Give a latest_base_url to the repo API such that the UI can consume it.
>
> * Design choice: I use a Callable in order to do the heavy lifting of reading and parsing the URL. The idea is to not hold up loading stacks if there is a bad URL. Bad URLs should not manifest themselves in errors - only use the value defined in XML in that case.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java 8e1e787
> ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryResponse.java bc3ee39
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java 878e7ef
> ambari-server/src/main/java/org/apache/ambari/server/state/RepositoryInfo.java f612bb4
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/RepositoryXml.java abca8f9
> ambari-server/src/main/resources/properties.json d2a949e
> ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java 515fd68
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryResourceProviderTest.java 391ff99
> ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/hdp.json PRE-CREATION
> ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/repoinfo.xml 1025240
>
> Diff: https://reviews.apache.org/r/19237/diff/
>
>
> Testing
> -------
>
> Running org.apache.ambari.server.api.services.AmbariMetaInfoTest
> Tests run: 55, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.812 sec
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 13:18.403s
> [INFO] Finished at: Fri Mar 14 16:45:12 EDT 2014
> [INFO] Final Memory: 18M/123M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Nate Cole
>
>
Re: Review Request 19237: Add ability to read latest repo and provide from
Ambari
Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19237/#review37389
-----------------------------------------------------------
Ship it!
Ship It!
- Tom Beerbower
On March 14, 2014, 11:16 p.m., Nate Cole wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19237/
> -----------------------------------------------------------
>
> (Updated March 14, 2014, 11:16 p.m.)
>
>
> Review request for Ambari, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
>
>
> Bugs: AMBARI-5095
> https://issues.apache.org/jira/browse/AMBARI-5095
>
>
> Repository: ambari
>
>
> Description
> -------
>
> * Add ability to read either a file or an http url specified in repoinfo.xml, that is used to load the latest repo information.
> * By default, there are no links in current stacks, that will come later.
> * Give a latest_base_url to the repo API such that the UI can consume it.
>
> * Design choice: I use a Callable in order to do the heavy lifting of reading and parsing the URL. The idea is to not hold up loading stacks if there is a bad URL. Bad URLs should not manifest themselves in errors - only use the value defined in XML in that case.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java 8e1e787
> ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryResponse.java bc3ee39
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java 878e7ef
> ambari-server/src/main/java/org/apache/ambari/server/state/RepositoryInfo.java f612bb4
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/state/stack/RepositoryXml.java abca8f9
> ambari-server/src/main/resources/properties.json d2a949e
> ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java 515fd68
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryResourceProviderTest.java 391ff99
> ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/hdp.json PRE-CREATION
> ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/repoinfo.xml 1025240
>
> Diff: https://reviews.apache.org/r/19237/diff/
>
>
> Testing
> -------
>
> Running org.apache.ambari.server.api.services.AmbariMetaInfoTest
> Tests run: 55, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.812 sec
>
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 13:18.403s
> [INFO] Finished at: Fri Mar 14 16:45:12 EDT 2014
> [INFO] Final Memory: 18M/123M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Nate Cole
>
>
Re: Review Request 19237: Add ability to read latest repo and provide from
Ambari
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19237/
-----------------------------------------------------------
(Updated March 14, 2014, 7:16 p.m.)
Review request for Ambari, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
Changes
-------
Updated diff - found dead code.
Bugs: AMBARI-5095
https://issues.apache.org/jira/browse/AMBARI-5095
Repository: ambari
Description
-------
* Add ability to read either a file or an http url specified in repoinfo.xml, that is used to load the latest repo information.
* By default, there are no links in current stacks, that will come later.
* Give a latest_base_url to the repo API such that the UI can consume it.
* Design choice: I use a Callable in order to do the heavy lifting of reading and parsing the URL. The idea is to not hold up loading stacks if there is a bad URL. Bad URLs should not manifest themselves in errors - only use the value defined in XML in that case.
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java 8e1e787
ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryResponse.java bc3ee39
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java 878e7ef
ambari-server/src/main/java/org/apache/ambari/server/state/RepositoryInfo.java f612bb4
ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java PRE-CREATION
ambari-server/src/main/java/org/apache/ambari/server/state/stack/RepositoryXml.java abca8f9
ambari-server/src/main/resources/properties.json d2a949e
ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java 515fd68
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryResourceProviderTest.java 391ff99
ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/hdp.json PRE-CREATION
ambari-server/src/test/resources/stacks/HDP/2.1.1/repos/repoinfo.xml 1025240
Diff: https://reviews.apache.org/r/19237/diff/
Testing
-------
Running org.apache.ambari.server.api.services.AmbariMetaInfoTest
Tests run: 55, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.812 sec
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:18.403s
[INFO] Finished at: Fri Mar 14 16:45:12 EDT 2014
[INFO] Final Memory: 18M/123M
[INFO] ------------------------------------------------------------------------
Thanks,
Nate Cole