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 2016/02/01 19:39:56 UTC

Review Request 43054: Use entities for parent/child repository versions

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

Review request for Ambari, Dmitro Lisnichenko and Jonathan Hurley.


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


Repository: ambari


Description
-------

The UI wants to show Repo Versions in a hierarchical fashion with patches.

The API doesn't like subresources that are the same type.  Instead of rebuilding how the API works, this patch provides a has_children and parent_id attributes on the object.  This will allow the UI to efficiently determine whether a repo is "expandable" without bringing back huge amounts of data.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java 873733d 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java 4b0d3cc 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java fa2f905 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql a43211c 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1941331 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 75d2a4b 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 1a6c9c6 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql efaa7a9 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 267a1f0 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 828a3a3 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java f3cf954 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java PRE-CREATION 
  ambari-server/src/test/resources/version_definition_resource_provider.xml 735f91d 

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


Testing
-------

Manual.  Automated results pending.


Thanks,

Nate Cole


Re: Review Request 43054: Use entities for parent/child repository versions

Posted by Nate Cole <nc...@hortonworks.com>.

> On Feb. 1, 2016, 3:02 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java, line 273
> > <https://reviews.apache.org/r/43054/diff/2/?file=1228367#file1228367line273>
> >
> >     I've been asked to use `!children.isEmpty()` instead of `size() != 0`

Will fix.


> On Feb. 1, 2016, 3:02 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java, line 255
> > <https://reviews.apache.org/r/43054/diff/2/?file=1228368#file1228368line255>
> >
> >     Is lastIndexOf safer here? What if they put a dash as part of the distribution?

Will fix.


> On Feb. 1, 2016, 3:02 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java, line 304
> > <https://reviews.apache.org/r/43054/diff/2/?file=1228368#file1228368line304>
> >
> >     Hard coded timeouts are going to bite us eventually.

Will fix.


- Nate


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


On Feb. 1, 2016, 2:33 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43054/
> -----------------------------------------------------------
> 
> (Updated Feb. 1, 2016, 2:33 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-14867
>     https://issues.apache.org/jira/browse/AMBARI-14867
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The UI wants to show Repo Versions in a hierarchical fashion with patches.
> 
> The API doesn't like subresources that are the same type.  Instead of rebuilding how the API works, this patch provides a has_children and parent_id attributes on the object.  This will allow the UI to efficiently determine whether a repo is "expandable" without bringing back huge amounts of data.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java 873733d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java 4b0d3cc 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java fa2f905 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql a43211c 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1941331 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 75d2a4b 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 1a6c9c6 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql efaa7a9 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 267a1f0 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 828a3a3 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java f3cf954 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java PRE-CREATION 
>   ambari-server/src/test/resources/version_definition_resource_provider.xml 735f91d 
> 
> Diff: https://reviews.apache.org/r/43054/diff/
> 
> 
> Testing
> -------
> 
> Manual.  Automated results pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 43054: Use entities for parent/child repository versions

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java (line 273)
<https://reviews.apache.org/r/43054/#comment178380>

    I've been asked to use `!children.isEmpty()` instead of `size() != 0`



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java (line 255)
<https://reviews.apache.org/r/43054/#comment178381>

    Is lastIndexOf safer here? What if they put a dash as part of the distribution?



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java (line 304)
<https://reviews.apache.org/r/43054/#comment178382>

    Hard coded timeouts are going to bite us eventually.


- Jonathan Hurley


On Feb. 1, 2016, 2:33 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43054/
> -----------------------------------------------------------
> 
> (Updated Feb. 1, 2016, 2:33 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-14867
>     https://issues.apache.org/jira/browse/AMBARI-14867
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The UI wants to show Repo Versions in a hierarchical fashion with patches.
> 
> The API doesn't like subresources that are the same type.  Instead of rebuilding how the API works, this patch provides a has_children and parent_id attributes on the object.  This will allow the UI to efficiently determine whether a repo is "expandable" without bringing back huge amounts of data.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java 873733d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java 4b0d3cc 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java fa2f905 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql a43211c 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1941331 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 75d2a4b 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 1a6c9c6 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql efaa7a9 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 267a1f0 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 828a3a3 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java f3cf954 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java PRE-CREATION 
>   ambari-server/src/test/resources/version_definition_resource_provider.xml 735f91d 
> 
> Diff: https://reviews.apache.org/r/43054/diff/
> 
> 
> Testing
> -------
> 
> Manual.  Automated results pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 43054: Use entities for parent/child repository versions

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


Ship it!




Ship It!

- Jonathan Hurley


On Feb. 1, 2016, 3:47 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43054/
> -----------------------------------------------------------
> 
> (Updated Feb. 1, 2016, 3:47 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-14867
>     https://issues.apache.org/jira/browse/AMBARI-14867
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The UI wants to show Repo Versions in a hierarchical fashion with patches.
> 
> The API doesn't like subresources that are the same type.  Instead of rebuilding how the API works, this patch provides a has_children and parent_id attributes on the object.  This will allow the UI to efficiently determine whether a repo is "expandable" without bringing back huge amounts of data.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java d1453a0 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java 873733d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java 4b0d3cc 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java fa2f905 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql a43211c 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1941331 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 75d2a4b 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 1a6c9c6 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql efaa7a9 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 267a1f0 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 828a3a3 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java f3cf954 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java PRE-CREATION 
>   ambari-server/src/test/resources/version_definition_resource_provider.xml 735f91d 
> 
> Diff: https://reviews.apache.org/r/43054/diff/
> 
> 
> Testing
> -------
> 
> Manual.  Automated results pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 43054: Use entities for parent/child repository versions

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43054/#review117388
-----------------------------------------------------------


Ship it!




Ship It!

- Dmitro Lisnichenko


On Feb. 1, 2016, 10:47 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43054/
> -----------------------------------------------------------
> 
> (Updated Feb. 1, 2016, 10:47 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-14867
>     https://issues.apache.org/jira/browse/AMBARI-14867
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The UI wants to show Repo Versions in a hierarchical fashion with patches.
> 
> The API doesn't like subresources that are the same type.  Instead of rebuilding how the API works, this patch provides a has_children and parent_id attributes on the object.  This will allow the UI to efficiently determine whether a repo is "expandable" without bringing back huge amounts of data.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java d1453a0 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java 873733d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java 4b0d3cc 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java fa2f905 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql a43211c 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1941331 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 75d2a4b 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 1a6c9c6 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql efaa7a9 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 267a1f0 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 828a3a3 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java f3cf954 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java PRE-CREATION 
>   ambari-server/src/test/resources/version_definition_resource_provider.xml 735f91d 
> 
> Diff: https://reviews.apache.org/r/43054/diff/
> 
> 
> Testing
> -------
> 
> Manual.  Automated results pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 43054: Use entities for parent/child repository versions

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

(Updated Feb. 1, 2016, 3:47 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Jonathan Hurley.


Changes
-------

Update for comments


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


Repository: ambari


Description
-------

The UI wants to show Repo Versions in a hierarchical fashion with patches.

The API doesn't like subresources that are the same type.  Instead of rebuilding how the API works, this patch provides a has_children and parent_id attributes on the object.  This will allow the UI to efficiently determine whether a repo is "expandable" without bringing back huge amounts of data.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java d1453a0 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java 873733d 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java 4b0d3cc 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java fa2f905 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql a43211c 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1941331 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 75d2a4b 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 1a6c9c6 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql efaa7a9 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 267a1f0 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 828a3a3 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java f3cf954 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java PRE-CREATION 
  ambari-server/src/test/resources/version_definition_resource_provider.xml 735f91d 

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


Testing
-------

Manual.  Automated results pending.


Thanks,

Nate Cole


Re: Review Request 43054: Use entities for parent/child repository versions

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

(Updated Feb. 1, 2016, 2:33 p.m.)


Review request for Ambari, Dmitro Lisnichenko and Jonathan Hurley.


Changes
-------

Updated for test fixes


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


Repository: ambari


Description
-------

The UI wants to show Repo Versions in a hierarchical fashion with patches.

The API doesn't like subresources that are the same type.  Instead of rebuilding how the API works, this patch provides a has_children and parent_id attributes on the object.  This will allow the UI to efficiently determine whether a repo is "expandable" without bringing back huge amounts of data.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java 873733d 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java 4b0d3cc 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java fa2f905 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql a43211c 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 1941331 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 75d2a4b 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 1a6c9c6 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql efaa7a9 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 267a1f0 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 828a3a3 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java f3cf954 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java PRE-CREATION 
  ambari-server/src/test/resources/version_definition_resource_provider.xml 735f91d 

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


Testing
-------

Manual.  Automated results pending.


Thanks,

Nate Cole