You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by David Kantor <dk...@us.ibm.com> on 2016/07/12 22:24:24 UTC
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/
-----------------------------------------------------------
(Updated July 12, 2016, 10:24 p.m.)
Review request for atlas.
Bugs: ATLAS-991
https://issues.apache.org/jira/browse/ATLAS-991
Repository: atlas
Description
-------
When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
Diffs
-----
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 91f9bd008a6939dfe78656f5c1845637a30ee9eb
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e5c0e46e2ed1d9e0be987c30b9a0613784c82627
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 4f531e28173f79d63dc3642f2aedd69df2fa12a6
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/49869/diff/
Testing
-------
Ran all unit and integration tests with no regressions.
Thanks,
David Kantor
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by Shwetha GS <ss...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/#review145185
-----------------------------------------------------------
Fix it, then Ship it!
Minor comment. You can make the change and commit. Thanks
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java (line 476)
<https://reviews.apache.org/r/49869/#comment211345>
There is no requirement of get() on the returned map. So, this can be just a set<GuidAndVertex> (GuidAndVertex can be renamed to VertexDetails and contain typeName).
GuidAndVertex.equals() can check equals on just guid
- Shwetha GS
On Aug. 9, 2016, 12:36 a.m., David Kantor wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49869/
> -----------------------------------------------------------
>
> (Updated Aug. 9, 2016, 12:36 a.m.)
>
>
> Review request for atlas.
>
>
> Bugs: ATLAS-991
> https://issues.apache.org/jira/browse/ATLAS-991
>
>
> Repository: atlas
>
>
> Description
> -------
>
> When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
>
>
> Diffs
> -----
>
> repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 8d31c1b079a11291a87569fde6f2cb21d4258ca9
> repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e301a00b16ad316a85714cbda4af43d01f11f4ad
> repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 0a90bda72e90569c1d9d8fdef2c9df9827742874
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
> repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java 8a0a6bc60818c3dd58e12386c55a471de2508b5e
>
> Diff: https://reviews.apache.org/r/49869/diff/
>
>
> Testing
> -------
>
> Ran all unit and integration tests with no regressions.
>
>
> Thanks,
>
> David Kantor
>
>
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by David Kantor <dk...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/
-----------------------------------------------------------
(Updated Aug. 9, 2016, 6:07 p.m.)
Review request for atlas.
Changes
-------
Address Shwetha's second review comments.
Bugs: ATLAS-991
https://issues.apache.org/jira/browse/ATLAS-991
Repository: atlas
Description
-------
When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
Diffs (updated)
-----
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 8d31c1b079a11291a87569fde6f2cb21d4258ca9
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e301a00b16ad316a85714cbda4af43d01f11f4ad
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 26ebbb18fd7fea53e1afdcf5ae1ad78eee4bff3b
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java 428846f1bc83dcdb5ed9737294fde67f611f83e8
Diff: https://reviews.apache.org/r/49869/diff/
Testing
-------
Ran all unit and integration tests with no regressions.
Thanks,
David Kantor
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by David Kantor <dk...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/
-----------------------------------------------------------
(Updated Aug. 9, 2016, 12:36 a.m.)
Review request for atlas.
Bugs: ATLAS-991
https://issues.apache.org/jira/browse/ATLAS-991
Repository: atlas
Description
-------
When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
Diffs (updated)
-----
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 8d31c1b079a11291a87569fde6f2cb21d4258ca9
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e301a00b16ad316a85714cbda4af43d01f11f4ad
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 0a90bda72e90569c1d9d8fdef2c9df9827742874
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java 8a0a6bc60818c3dd58e12386c55a471de2508b5e
Diff: https://reviews.apache.org/r/49869/diff/
Testing
-------
Ran all unit and integration tests with no regressions.
Thanks,
David Kantor
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by David Kantor <dk...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/
-----------------------------------------------------------
(Updated Aug. 8, 2016, 10:39 p.m.)
Review request for atlas.
Changes
-------
Added test case per Shwetha's review comment.
Bugs: ATLAS-991
https://issues.apache.org/jira/browse/ATLAS-991
Repository: atlas
Description
-------
When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
Diffs (updated)
-----
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 8d31c1b079a11291a87569fde6f2cb21d4258ca9
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e301a00b16ad316a85714cbda4af43d01f11f4ad
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 0a90bda72e90569c1d9d8fdef2c9df9827742874
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java 8a0a6bc60818c3dd58e12386c55a471de2508b5e
Diff: https://reviews.apache.org/r/49869/diff/
Testing
-------
Ran all unit and integration tests with no regressions.
Thanks,
David Kantor
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by David Kantor <dk...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/
-----------------------------------------------------------
(Updated Aug. 5, 2016, 3:12 a.m.)
Review request for atlas.
Changes
-------
Address Shwetha's comments
Bugs: ATLAS-991
https://issues.apache.org/jira/browse/ATLAS-991
Repository: atlas
Description
-------
When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
Diffs (updated)
-----
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 8d31c1b079a11291a87569fde6f2cb21d4258ca9
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e301a00b16ad316a85714cbda4af43d01f11f4ad
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 81fb76e27019012fada88a70a13b4c5264c236bf
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java 8a0a6bc60818c3dd58e12386c55a471de2508b5e
Diff: https://reviews.apache.org/r/49869/diff/
Testing
-------
Ran all unit and integration tests with no regressions.
Thanks,
David Kantor
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by David Kantor <dk...@us.ibm.com>.
> On Aug. 4, 2016, 7:17 a.m., Shwetha GS wrote:
> > repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java, line 886
> > <https://reviews.apache.org/r/49869/diff/4/?file=1448757#file1448757line886>
> >
> > Add tests with lower bounds on map as well
I will add a testcase as suggested.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/#review144724
-----------------------------------------------------------
On Aug. 5, 2016, 3:12 a.m., David Kantor wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49869/
> -----------------------------------------------------------
>
> (Updated Aug. 5, 2016, 3:12 a.m.)
>
>
> Review request for atlas.
>
>
> Bugs: ATLAS-991
> https://issues.apache.org/jira/browse/ATLAS-991
>
>
> Repository: atlas
>
>
> Description
> -------
>
> When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
>
>
> Diffs
> -----
>
> repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 8d31c1b079a11291a87569fde6f2cb21d4258ca9
> repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e301a00b16ad316a85714cbda4af43d01f11f4ad
> repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 81fb76e27019012fada88a70a13b4c5264c236bf
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
> repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java 8a0a6bc60818c3dd58e12386c55a471de2508b5e
>
> Diff: https://reviews.apache.org/r/49869/diff/
>
>
> Testing
> -------
>
> Ran all unit and integration tests with no regressions.
>
>
> Thanks,
>
> David Kantor
>
>
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by Shwetha GS <ss...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/#review144724
-----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java (line 442)
<https://reviews.apache.org/r/49869/#comment210793>
This has to be a set to make sure there are no duplicates. The loop later can exit if already added to set.
Instead of adding multiple data structures here, just stack<vertex> and set<vertex> will do?
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java (line 446)
<https://reviews.apache.org/r/49869/#comment210788>
Why two levels of loop - use stack instead
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java (line 503)
<https://reviews.apache.org/r/49869/#comment210787>
should be mapEdgeLabel
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java (line 886)
<https://reviews.apache.org/r/49869/#comment210794>
Add tests with lower bounds on map as well
- Shwetha GS
On July 21, 2016, 12:28 a.m., David Kantor wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49869/
> -----------------------------------------------------------
>
> (Updated July 21, 2016, 12:28 a.m.)
>
>
> Review request for atlas.
>
>
> Bugs: ATLAS-991
> https://issues.apache.org/jira/browse/ATLAS-991
>
>
> Repository: atlas
>
>
> Description
> -------
>
> When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
>
>
> Diffs
> -----
>
> repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 8d31c1b079a11291a87569fde6f2cb21d4258ca9
> repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e301a00b16ad316a85714cbda4af43d01f11f4ad
> repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 81fb76e27019012fada88a70a13b4c5264c236bf
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
> repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
> repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java 8a0a6bc60818c3dd58e12386c55a471de2508b5e
>
> Diff: https://reviews.apache.org/r/49869/diff/
>
>
> Testing
> -------
>
> Ran all unit and integration tests with no regressions.
>
>
> Thanks,
>
> David Kantor
>
>
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by David Kantor <dk...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/
-----------------------------------------------------------
(Updated July 21, 2016, 12:28 a.m.)
Review request for atlas.
Changes
-------
Rebased with trunk
Bugs: ATLAS-991
https://issues.apache.org/jira/browse/ATLAS-991
Repository: atlas
Description
-------
When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
Diffs (updated)
-----
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 8d31c1b079a11291a87569fde6f2cb21d4258ca9
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e301a00b16ad316a85714cbda4af43d01f11f4ad
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 81fb76e27019012fada88a70a13b4c5264c236bf
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java 8a0a6bc60818c3dd58e12386c55a471de2508b5e
Diff: https://reviews.apache.org/r/49869/diff/
Testing
-------
Ran all unit and integration tests with no regressions.
Thanks,
David Kantor
Re: Review Request 49869: ATLAS-991: avoid enforcing required
attributes on deleted entities
Posted by David Kantor <dk...@us.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49869/
-----------------------------------------------------------
(Updated July 18, 2016, 1:53 p.m.)
Review request for atlas.
Changes
-------
Added test logic
Bugs: ATLAS-991
https://issues.apache.org/jira/browse/ATLAS-991
Repository: atlas
Description
-------
When deleting entities, avoid enforcing lower bound constraints (i.e. required attributes) on all entities being deleted. Previously, only the entities that were specifically requested for deletion were skipped when enforcing required attributes, but any composite entities that were owned by 'root' deletion candidates were not skipped, causing NullRequiredAttributeException to be thrown unnecessarily.
Diffs (updated)
-----
repository/src/main/java/org/apache/atlas/repository/graph/DeleteHandler.java 91f9bd008a6939dfe78656f5c1845637a30ee9eb
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java e5c0e46e2ed1d9e0be987c30b9a0613784c82627
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 4f531e28173f79d63dc3642f2aedd69df2fa12a6
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepositoryDeleteTestBase.java 34842c3dc2904b123fecb5087aee357678b00156
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositoryHardDeleteTest.java cc6026461bcd38b83dde0bcec2e835f5824e894f
repository/src/test/java/org/apache/atlas/repository/graph/GraphBackedRepositorySoftDeleteTest.java 90bb635126a02cd38c045bd5332499c4481d3751
repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/49869/diff/
Testing
-------
Ran all unit and integration tests with no regressions.
Thanks,
David Kantor