You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by John Speidel <js...@hortonworks.com> on 2014/01/13 17:33:38 UTC
Review Request 16820: Update '/stacks' endpoint to use the api framework
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16820/
-----------------------------------------------------------
Review request for Ambari, Mahadev Konar and Tom Beerbower.
Bugs: AMBARI-4277
https://issues.apache.org/jira/browse/AMBARI-4277
Repository: ambari
Description
-------
Part of the work being done to implement blueprints.
As a result of the blueprint work, the stacks api will be exposed to users and therefore needs to be updated to use the api framework to be consistent with the other api endpoints.
We currently have '/stacks' and '/stacks2' endpoints. The '/stacks' endpoint is very old and doesn't use the api framework and is inconsistent with the rest of the api. This endpoint isn't used by the UI or any other internal component and has never been documented. The 'stacks2' endpoint does use the api framework and is consistent with the other endpoints in it's usage except for the naming of the endpoint and some of it's children. This endpoint is currently used by the UI.
This task will basically clone the functionality of the 'stacks2' endpoint in the 'stacks' endpoint. The 'stacks' endpoint will be augmented with additional information in future tasks as needed by blueprints. Examples are component dependencies and topology tokens in config properties. After this work the 'stacks2' endpoint should basically be deprecated and the UI should eventually be phased over to the new 'stacks' endpoint.
Diffs
-----
Diff: https://reviews.apache.org/r/16820/diff/
Testing
-------
- Functional testing of patch
-- Both /stacks2 and /stacks endpoints work as expected
- All unit tests
----------------------------------------------------------------------
Ran 173 tests in 1.562s
OK
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17:28.211s
[INFO] Finished at: Mon Jan 13 11:13:13 EST 2014
[INFO] Final Memory: 23M/337M
[INFO] ------------------------------------------------------------------------
Thanks,
John Speidel
Re: Review Request 16820: Update '/stacks' endpoint to use the api framework
Posted by John Speidel <js...@hortonworks.com>.
> On Jan. 14, 2014, 7:35 p.m., Nate Cole wrote:
> > Why are we even bothering with a 'stacks2' endpoint? I highly doubt anyone is using the old 'stacks'.
stacks2 is a currently existing endpoint. The stacks2 endpoint is currently used by the Ambari UI. This patch changed the behavior of the old /stacks endpoint. The new behavior is initially identical to the /stacks2 endpoint but will diverge quickly. Basically, as of now the /stacks2 endpoint should be considered deprecated and the UI should switch over when possible.
- John
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16820/#review31770
-----------------------------------------------------------
On Jan. 14, 2014, 7:24 p.m., John Speidel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16820/
> -----------------------------------------------------------
>
> (Updated Jan. 14, 2014, 7:24 p.m.)
>
>
> Review request for Ambari, Mahadev Konar, Nate Cole, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
>
>
> Bugs: AMBARI-4277
> https://issues.apache.org/jira/browse/AMBARI-4277
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Part of the work being done to implement blueprints.
> As a result of the blueprint work, the stacks api will be exposed to users and therefore needs to be updated to use the api framework to be consistent with the other api endpoints.
>
> We currently have '/stacks' and '/stacks2' endpoints. The '/stacks' endpoint is very old and doesn't use the api framework and is inconsistent with the rest of the api. This endpoint isn't used by the UI or any other internal component and has never been documented. The 'stacks2' endpoint does use the api framework and is consistent with the other endpoints in it's usage except for the naming of the endpoint and some of it's children. This endpoint is currently used by the UI.
>
> This task will basically clone the functionality of the 'stacks2' endpoint in the 'stacks' endpoint. The 'stacks' endpoint will be augmented with additional information in future tasks as needed by blueprints. Examples are component dependencies and topology tokens in config properties. After this work the 'stacks2' endpoint should basically be deprecated and the UI should eventually be phased over to the new 'stacks' endpoint.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaService.java 7a2d2e5
> ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java 31c4c31
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java 7ca3ea1
> ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaServiceTest.java f60c08e
> ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java PRE-CREATION
> ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 9454993
>
> Diff: https://reviews.apache.org/r/16820/diff/
>
>
> Testing
> -------
>
> - Functional testing of patch
> -- Both /stacks2 and /stacks endpoints work as expected
>
> - All unit tests
>
> ----------------------------------------------------------------------
> Ran 173 tests in 1.562s
>
> OK
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:28.211s
> [INFO] Finished at: Mon Jan 13 11:13:13 EST 2014
> [INFO] Final Memory: 23M/337M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> John Speidel
>
>
Re: Review Request 16820: Update '/stacks' endpoint to use the api framework
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16820/#review31770
-----------------------------------------------------------
Why are we even bothering with a 'stacks2' endpoint? I highly doubt anyone is using the old 'stacks'.
- Nate Cole
On Jan. 14, 2014, 2:24 p.m., John Speidel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16820/
> -----------------------------------------------------------
>
> (Updated Jan. 14, 2014, 2:24 p.m.)
>
>
> Review request for Ambari, Mahadev Konar, Nate Cole, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
>
>
> Bugs: AMBARI-4277
> https://issues.apache.org/jira/browse/AMBARI-4277
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Part of the work being done to implement blueprints.
> As a result of the blueprint work, the stacks api will be exposed to users and therefore needs to be updated to use the api framework to be consistent with the other api endpoints.
>
> We currently have '/stacks' and '/stacks2' endpoints. The '/stacks' endpoint is very old and doesn't use the api framework and is inconsistent with the rest of the api. This endpoint isn't used by the UI or any other internal component and has never been documented. The 'stacks2' endpoint does use the api framework and is consistent with the other endpoints in it's usage except for the naming of the endpoint and some of it's children. This endpoint is currently used by the UI.
>
> This task will basically clone the functionality of the 'stacks2' endpoint in the 'stacks' endpoint. The 'stacks' endpoint will be augmented with additional information in future tasks as needed by blueprints. Examples are component dependencies and topology tokens in config properties. After this work the 'stacks2' endpoint should basically be deprecated and the UI should eventually be phased over to the new 'stacks' endpoint.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaService.java 7a2d2e5
> ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java 31c4c31
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java 7ca3ea1
> ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaServiceTest.java f60c08e
> ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java PRE-CREATION
> ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 9454993
>
> Diff: https://reviews.apache.org/r/16820/diff/
>
>
> Testing
> -------
>
> - Functional testing of patch
> -- Both /stacks2 and /stacks endpoints work as expected
>
> - All unit tests
>
> ----------------------------------------------------------------------
> Ran 173 tests in 1.562s
>
> OK
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:28.211s
> [INFO] Finished at: Mon Jan 13 11:13:13 EST 2014
> [INFO] Final Memory: 23M/337M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> John Speidel
>
>
Re: Review Request 16820: Update '/stacks' endpoint to use the api framework
Posted by John Speidel <js...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16820/
-----------------------------------------------------------
(Updated Jan. 14, 2014, 7:24 p.m.)
Review request for Ambari, Mahadev Konar, Nate Cole, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
Changes
-------
Uploaded patch for completeness
Bugs: AMBARI-4277
https://issues.apache.org/jira/browse/AMBARI-4277
Repository: ambari
Description
-------
Part of the work being done to implement blueprints.
As a result of the blueprint work, the stacks api will be exposed to users and therefore needs to be updated to use the api framework to be consistent with the other api endpoints.
We currently have '/stacks' and '/stacks2' endpoints. The '/stacks' endpoint is very old and doesn't use the api framework and is inconsistent with the rest of the api. This endpoint isn't used by the UI or any other internal component and has never been documented. The 'stacks2' endpoint does use the api framework and is consistent with the other endpoints in it's usage except for the naming of the endpoint and some of it's children. This endpoint is currently used by the UI.
This task will basically clone the functionality of the 'stacks2' endpoint in the 'stacks' endpoint. The 'stacks' endpoint will be augmented with additional information in future tasks as needed by blueprints. Examples are component dependencies and topology tokens in config properties. After this work the 'stacks2' endpoint should basically be deprecated and the UI should eventually be phased over to the new 'stacks' endpoint.
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaService.java 7a2d2e5
ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java PRE-CREATION
ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java 31c4c31
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java 7ca3ea1
ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaServiceTest.java f60c08e
ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java PRE-CREATION
ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 9454993
Diff: https://reviews.apache.org/r/16820/diff/
Testing
-------
- Functional testing of patch
-- Both /stacks2 and /stacks endpoints work as expected
- All unit tests
----------------------------------------------------------------------
Ran 173 tests in 1.562s
OK
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17:28.211s
[INFO] Finished at: Mon Jan 13 11:13:13 EST 2014
[INFO] Final Memory: 23M/337M
[INFO] ------------------------------------------------------------------------
Thanks,
John Speidel
Re: Review Request 16820: Update '/stacks' endpoint to use the api framework
Posted by Sumit Mohanty <sm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16820/#review31761
-----------------------------------------------------------
Ship it!
Ship It!
- Sumit Mohanty
On Jan. 14, 2014, 4:24 p.m., John Speidel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16820/
> -----------------------------------------------------------
>
> (Updated Jan. 14, 2014, 4:24 p.m.)
>
>
> Review request for Ambari, Mahadev Konar, Nate Cole, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
>
>
> Bugs: AMBARI-4277
> https://issues.apache.org/jira/browse/AMBARI-4277
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Part of the work being done to implement blueprints.
> As a result of the blueprint work, the stacks api will be exposed to users and therefore needs to be updated to use the api framework to be consistent with the other api endpoints.
>
> We currently have '/stacks' and '/stacks2' endpoints. The '/stacks' endpoint is very old and doesn't use the api framework and is inconsistent with the rest of the api. This endpoint isn't used by the UI or any other internal component and has never been documented. The 'stacks2' endpoint does use the api framework and is consistent with the other endpoints in it's usage except for the naming of the endpoint and some of it's children. This endpoint is currently used by the UI.
>
> This task will basically clone the functionality of the 'stacks2' endpoint in the 'stacks' endpoint. The 'stacks' endpoint will be augmented with additional information in future tasks as needed by blueprints. Examples are component dependencies and topology tokens in config properties. After this work the 'stacks2' endpoint should basically be deprecated and the UI should eventually be phased over to the new 'stacks' endpoint.
>
>
> Diffs
> -----
>
>
> Diff: https://reviews.apache.org/r/16820/diff/
>
>
> Testing
> -------
>
> - Functional testing of patch
> -- Both /stacks2 and /stacks endpoints work as expected
>
> - All unit tests
>
> ----------------------------------------------------------------------
> Ran 173 tests in 1.562s
>
> OK
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:28.211s
> [INFO] Finished at: Mon Jan 13 11:13:13 EST 2014
> [INFO] Final Memory: 23M/337M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> John Speidel
>
>
Re: Review Request 16820: Update '/stacks' endpoint to use the api framework
Posted by John Speidel <js...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16820/
-----------------------------------------------------------
(Updated Jan. 14, 2014, 4:24 p.m.)
Review request for Ambari, Mahadev Konar, Nate Cole, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
Bugs: AMBARI-4277
https://issues.apache.org/jira/browse/AMBARI-4277
Repository: ambari
Description
-------
Part of the work being done to implement blueprints.
As a result of the blueprint work, the stacks api will be exposed to users and therefore needs to be updated to use the api framework to be consistent with the other api endpoints.
We currently have '/stacks' and '/stacks2' endpoints. The '/stacks' endpoint is very old and doesn't use the api framework and is inconsistent with the rest of the api. This endpoint isn't used by the UI or any other internal component and has never been documented. The 'stacks2' endpoint does use the api framework and is consistent with the other endpoints in it's usage except for the naming of the endpoint and some of it's children. This endpoint is currently used by the UI.
This task will basically clone the functionality of the 'stacks2' endpoint in the 'stacks' endpoint. The 'stacks' endpoint will be augmented with additional information in future tasks as needed by blueprints. Examples are component dependencies and topology tokens in config properties. After this work the 'stacks2' endpoint should basically be deprecated and the UI should eventually be phased over to the new 'stacks' endpoint.
Diffs
-----
Diff: https://reviews.apache.org/r/16820/diff/
Testing
-------
- Functional testing of patch
-- Both /stacks2 and /stacks endpoints work as expected
- All unit tests
----------------------------------------------------------------------
Ran 173 tests in 1.562s
OK
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17:28.211s
[INFO] Finished at: Mon Jan 13 11:13:13 EST 2014
[INFO] Final Memory: 23M/337M
[INFO] ------------------------------------------------------------------------
Thanks,
John Speidel
Re: Review Request 16820: Update '/stacks' endpoint to use the api framework
Posted by John Speidel <js...@hortonworks.com>.
> On Jan. 13, 2014, 8:27 p.m., Tom Beerbower wrote:
> > The patch looks good. +1
> >
> > I wonder if we should have a big comment at the top of StacksService and Stacks2Service to make developers aware of the duplicated code and APIs. Otherwise the 2 stacks may get out of sync.
> >
> > Is there some sort of deprecation process for the stacks2 API? I guess that we can just live with the dual stacks API until we bump the API to v2?
Agreed. At a minimum, we should comment the stacks2 service that says that it is basically frozen. I guess the formal deprecation mechanism is by way of new API versions.
- John
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16820/#review31651
-----------------------------------------------------------
On Jan. 14, 2014, 7:24 p.m., John Speidel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16820/
> -----------------------------------------------------------
>
> (Updated Jan. 14, 2014, 7:24 p.m.)
>
>
> Review request for Ambari, Mahadev Konar, Nate Cole, Sumit Mohanty, Sid Wagle, and Tom Beerbower.
>
>
> Bugs: AMBARI-4277
> https://issues.apache.org/jira/browse/AMBARI-4277
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Part of the work being done to implement blueprints.
> As a result of the blueprint work, the stacks api will be exposed to users and therefore needs to be updated to use the api framework to be consistent with the other api endpoints.
>
> We currently have '/stacks' and '/stacks2' endpoints. The '/stacks' endpoint is very old and doesn't use the api framework and is inconsistent with the rest of the api. This endpoint isn't used by the UI or any other internal component and has never been documented. The 'stacks2' endpoint does use the api framework and is consistent with the other endpoints in it's usage except for the naming of the endpoint and some of it's children. This endpoint is currently used by the UI.
>
> This task will basically clone the functionality of the 'stacks2' endpoint in the 'stacks' endpoint. The 'stacks' endpoint will be augmented with additional information in future tasks as needed by blueprints. Examples are component dependencies and topology tokens in config properties. After this work the 'stacks2' endpoint should basically be deprecated and the UI should eventually be phased over to the new 'stacks' endpoint.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaService.java 7a2d2e5
> ambari-server/src/main/java/org/apache/ambari/server/api/services/Stacks2Service.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java 31c4c31
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java 7ca3ea1
> ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaServiceTest.java f60c08e
> ambari-server/src/test/java/org/apache/ambari/server/api/services/Stacks2ServiceTest.java PRE-CREATION
> ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 9454993
>
> Diff: https://reviews.apache.org/r/16820/diff/
>
>
> Testing
> -------
>
> - Functional testing of patch
> -- Both /stacks2 and /stacks endpoints work as expected
>
> - All unit tests
>
> ----------------------------------------------------------------------
> Ran 173 tests in 1.562s
>
> OK
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:28.211s
> [INFO] Finished at: Mon Jan 13 11:13:13 EST 2014
> [INFO] Final Memory: 23M/337M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> John Speidel
>
>
Re: Review Request 16820: Update '/stacks' endpoint to use the api framework
Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16820/#review31651
-----------------------------------------------------------
Ship it!
The patch looks good. +1
I wonder if we should have a big comment at the top of StacksService and Stacks2Service to make developers aware of the duplicated code and APIs. Otherwise the 2 stacks may get out of sync.
Is there some sort of deprecation process for the stacks2 API? I guess that we can just live with the dual stacks API until we bump the API to v2?
- Tom Beerbower
On Jan. 13, 2014, 4:33 p.m., John Speidel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16820/
> -----------------------------------------------------------
>
> (Updated Jan. 13, 2014, 4:33 p.m.)
>
>
> Review request for Ambari, Mahadev Konar and Tom Beerbower.
>
>
> Bugs: AMBARI-4277
> https://issues.apache.org/jira/browse/AMBARI-4277
>
>
> Repository: ambari
>
>
> Description
> -------
>
> Part of the work being done to implement blueprints.
> As a result of the blueprint work, the stacks api will be exposed to users and therefore needs to be updated to use the api framework to be consistent with the other api endpoints.
>
> We currently have '/stacks' and '/stacks2' endpoints. The '/stacks' endpoint is very old and doesn't use the api framework and is inconsistent with the rest of the api. This endpoint isn't used by the UI or any other internal component and has never been documented. The 'stacks2' endpoint does use the api framework and is consistent with the other endpoints in it's usage except for the naming of the endpoint and some of it's children. This endpoint is currently used by the UI.
>
> This task will basically clone the functionality of the 'stacks2' endpoint in the 'stacks' endpoint. The 'stacks' endpoint will be augmented with additional information in future tasks as needed by blueprints. Examples are component dependencies and topology tokens in config properties. After this work the 'stacks2' endpoint should basically be deprecated and the UI should eventually be phased over to the new 'stacks' endpoint.
>
>
> Diffs
> -----
>
>
> Diff: https://reviews.apache.org/r/16820/diff/
>
>
> Testing
> -------
>
> - Functional testing of patch
> -- Both /stacks2 and /stacks endpoints work as expected
>
> - All unit tests
>
> ----------------------------------------------------------------------
> Ran 173 tests in 1.562s
>
> OK
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:28.211s
> [INFO] Finished at: Mon Jan 13 11:13:13 EST 2014
> [INFO] Final Memory: 23M/337M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> John Speidel
>
>