Re: Review Request 73731: ATLAS-4495 Glossary section takes longer time to load when Glossaries have large number of Categories and Terms associated with them

2022-03-05 Thread Ashutosh Mestry

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




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
Lines 1542 (patched)


Rename: populateGlorraryAttributesIfApplicable



repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
Lines 1550 (patched)


Consider being defensive here. Doing this will make it explicit about what 
is happening.

if (StringUtils.notEquals(entityName, GLOSSARY_CATEGORY) {
return;
}


- Ashutosh Mestry


On March 3, 2022, 12:44 p.m., Mandar Ambawane wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73731/
> ---
> 
> (Updated March 3, 2022, 12:44 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Jayendra Parab, Radhika Kundam, 
> and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4495
> https://issues.apache.org/jira/browse/ATLAS-4495
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> It is observed that, due to existing framework Glossary GET api takes longer 
> time.
> 
> This patch avoids the unnecessary db calls and improve the performance when 
> there is large number of data associated with the Glossary (say 10K terms or 
> categories)
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java 
> f81b53854 
>   repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java 
> f902b2afb 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AbstractGlossaryDTO.java
>  bee88c61f 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
>  9671df994 
> 
> 
> Diff: https://reviews.apache.org/r/73731/diff/3/
> 
> 
> Testing
> ---
> 
> Manual testing is done.
> 
> PreCommit: 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1009/consoleFull
> 
> PreCommit: 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1049/consoleFull
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>



Re: Review Request 73731: ATLAS-4495 Glossary section takes longer time to load when Glossaries have large number of Categories and Terms associated with them

2022-03-05 Thread Ashutosh Mestry

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



Can you please add metrics about the improvement you are seeing.


repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java
Line 96 (original), 98 (patched)


Rename: atlasGlossaryDTO to glossaryDTO, this will keep it consistent with 
the rest.



repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
Lines 1550 (patched)


Consider declaring AtlasGlossaryCategory.class.getSimpleName() as static 
const. Doing  that will avoid fuction call.



repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
Lines 1556 (patched)


Consider declaring the string to static field.


- Ashutosh Mestry


On March 3, 2022, 12:44 p.m., Mandar Ambawane wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73731/
> ---
> 
> (Updated March 3, 2022, 12:44 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Jayendra Parab, Radhika Kundam, 
> and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-4495
> https://issues.apache.org/jira/browse/ATLAS-4495
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> It is observed that, due to existing framework Glossary GET api takes longer 
> time.
> 
> This patch avoids the unnecessary db calls and improve the performance when 
> there is large number of data associated with the Glossary (say 10K terms or 
> categories)
> 
> 
> Diffs
> -
> 
>   repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java 
> f81b53854 
>   repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java 
> f902b2afb 
>   
> repository/src/main/java/org/apache/atlas/repository/ogm/glossary/AbstractGlossaryDTO.java
>  bee88c61f 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
>  9671df994 
> 
> 
> Diff: https://reviews.apache.org/r/73731/diff/3/
> 
> 
> Testing
> ---
> 
> Manual testing is done.
> 
> PreCommit: 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1009/consoleFull
> 
> PreCommit: 
> https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1049/consoleFull
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>