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 2015/01/21 19:28:42 UTC

Review Request 30132: Artifact resource doesn't properly preserve nested map structures for artifact data

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

Review request for Ambari, Jaimin Jetly, Robert Nettleton, and Tom Beerbower.


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


Repository: ambari


Description
-------

When an artifact resource is created with a nested map structure, the json representation of the resource flattens out the property names instead of preserving the original hierarchy.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java f4c5647 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java b3eb159 
  ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Request.java f937a4c 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java 4ed1a51 

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


Testing
-------

Functional tests using nexted artifact data.
Unit Tests:
All existing pass.
Added new unit tests for this scenario.


Thanks,

John Speidel


Re: Review Request 30132: Artifact resource doesn't properly preserve nested map structures for artifact data

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

Ship it!


Ship It!

- Tom Beerbower


On Jan. 21, 2015, 6:28 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30132/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 6:28 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Robert Nettleton, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9243
>     https://issues.apache.org/jira/browse/AMBARI-9243
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When an artifact resource is created with a nested map structure, the json representation of the resource flattens out the property names instead of preserving the original hierarchy.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java f4c5647 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java b3eb159 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Request.java f937a4c 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java 4ed1a51 
> 
> Diff: https://reviews.apache.org/r/30132/diff/
> 
> 
> Testing
> -------
> 
> Functional tests using nexted artifact data.
> Unit Tests:
> All existing pass.
> Added new unit tests for this scenario.
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 30132: Artifact resource doesn't properly preserve nested map structures for artifact data

Posted by John Speidel <js...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30132/#review69061
-----------------------------------------------------------


Merged to trunk

Tests run: 2581, Failures: 0, Errors: 0, Skipped: 15
...
Total run:588
Total errors:0
Total failures:0

- John Speidel


On Jan. 21, 2015, 6:28 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30132/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 6:28 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Robert Nettleton, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9243
>     https://issues.apache.org/jira/browse/AMBARI-9243
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When an artifact resource is created with a nested map structure, the json representation of the resource flattens out the property names instead of preserving the original hierarchy.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java f4c5647 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java b3eb159 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Request.java f937a4c 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java 4ed1a51 
> 
> Diff: https://reviews.apache.org/r/30132/diff/
> 
> 
> Testing
> -------
> 
> Functional tests using nexted artifact data.
> Unit Tests:
> All existing pass.
> Added new unit tests for this scenario.
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 30132: Artifact resource doesn't properly preserve nested map structures for artifact data

Posted by John Speidel <js...@hortonworks.com>.

> On Jan. 21, 2015, 8:19 p.m., Robert Nettleton wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java, line 154
> > <https://reviews.apache.org/r/30132/diff/1/?file=828581#file828581line154>
> >
> >     Minor issue:
> >     
> >     Shouldn't "RAW_REQUEST_BODY" be replaced with the constant defined in the Request class in this patch?

I was going to do so but the package that contains RequestBody is an api package and we don't want the api packages reaching down into the internal server packages.  So there currently isn't a good place to put a constant that could be used by both packages.


- John


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


On Jan. 21, 2015, 6:28 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30132/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 6:28 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Robert Nettleton, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9243
>     https://issues.apache.org/jira/browse/AMBARI-9243
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When an artifact resource is created with a nested map structure, the json representation of the resource flattens out the property names instead of preserving the original hierarchy.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java f4c5647 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java b3eb159 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Request.java f937a4c 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java 4ed1a51 
> 
> Diff: https://reviews.apache.org/r/30132/diff/
> 
> 
> Testing
> -------
> 
> Functional tests using nexted artifact data.
> Unit Tests:
> All existing pass.
> Added new unit tests for this scenario.
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 30132: Artifact resource doesn't properly preserve nested map structures for artifact data

Posted by Robert Nettleton <rn...@hortonworks.com>.

> On Jan. 21, 2015, 8:19 p.m., Robert Nettleton wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java, line 154
> > <https://reviews.apache.org/r/30132/diff/1/?file=828581#file828581line154>
> >
> >     Minor issue:
> >     
> >     Shouldn't "RAW_REQUEST_BODY" be replaced with the constant defined in the Request class in this patch?
> 
> John Speidel wrote:
>     I was going to do so but the package that contains RequestBody is an api package and we don't want the api packages reaching down into the internal server packages.  So there currently isn't a good place to put a constant that could be used by both packages.

Ok, thanks for the explanation.


- Robert


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


On Jan. 21, 2015, 6:28 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30132/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 6:28 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Robert Nettleton, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9243
>     https://issues.apache.org/jira/browse/AMBARI-9243
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When an artifact resource is created with a nested map structure, the json representation of the resource flattens out the property names instead of preserving the original hierarchy.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java f4c5647 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java b3eb159 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Request.java f937a4c 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java 4ed1a51 
> 
> Diff: https://reviews.apache.org/r/30132/diff/
> 
> 
> Testing
> -------
> 
> Functional tests using nexted artifact data.
> Unit Tests:
> All existing pass.
> Added new unit tests for this scenario.
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 30132: Artifact resource doesn't properly preserve nested map structures for artifact data

Posted by Robert Nettleton <rn...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30132/#review68994
-----------------------------------------------------------

Ship it!


Looks good. Just a small issue I noticed below.


ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java
<https://reviews.apache.org/r/30132/#comment113569>

    Minor issue:
    
    Shouldn't "RAW_REQUEST_BODY" be replaced with the constant defined in the Request class in this patch?


- Robert Nettleton


On Jan. 21, 2015, 6:28 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30132/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2015, 6:28 p.m.)
> 
> 
> Review request for Ambari, Jaimin Jetly, Robert Nettleton, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9243
>     https://issues.apache.org/jira/browse/AMBARI-9243
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When an artifact resource is created with a nested map structure, the json representation of the resource flattens out the property names instead of preserving the original hierarchy.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestBody.java f4c5647 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java b3eb159 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Request.java f937a4c 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ArtifactResourceProviderTest.java 4ed1a51 
> 
> Diff: https://reviews.apache.org/r/30132/diff/
> 
> 
> Testing
> -------
> 
> Functional tests using nexted artifact data.
> Unit Tests:
> All existing pass.
> Added new unit tests for this scenario.
> 
> 
> Thanks,
> 
> John Speidel
> 
>