-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51092/
-----------------------------------------------------------
(Updated Jan. 23, 2017, 8:32 p.m.)
Review request for atlas and David Kantor.
Repository: atlas
Description
-------
Apply performance fixes for create/update entities from IBM fork to Atlas.
During our performance profiling, we found a number of performance hotspots in
JProfiler. Our main findings were
- multiple queries were being executed for each instance being
created/updated to find matches by unique attribute.
- one query was being executed for each instance being created/updated to
find the corresponding vertex if there is one
- Calculating the value of the full text property was taking a significant
portion of the time to create/update entities, mainly due to its calls to
getVertexForGUID
The changes we put in do the following:
- batch lookups by guid when create/update entities. Execute one
AtlasGraphQuery to find them all.
- batch lookups by unique attribute when create/update entities. Execute
one AtlasGraphQuery per class to find unique attribute matches.
- find all existing vertices up front during create/update entity. Use
those vertices during the graph mapping process to avoid running unnecessary
graph queries
- reuse reference vertices from instance to graph mapping when computing
full text property
Diffs
-----
repository/src/main/java/org/apache/atlas/repository/graph/FullTextMapper.java
911b1adbad92a76ce15f49ce023b56aeca8b4f94
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java
b9671b27530b6abc0c648df34e950fccb9ef61a0
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
889236ca805142a93d9d4e63789fb0cc9aea05aa
repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java
4e55bbcab91b8572d13345cec61e8df2f195ee4f
repository/src/main/java/org/apache/atlas/repository/graph/VertexLookupContext.java
PRE-CREATION
repository/src/main/java/org/apache/atlas/util/AttributeValueMap.java
PRE-CREATION
repository/src/main/java/org/apache/atlas/util/IndexedInstance.java
PRE-CREATION
repository/src/test/java/org/apache/atlas/repository/graph/GraphHelperTest.java
a7dc13db72fb4ff268312c106df1b6c41f46962f
Diff: https://reviews.apache.org/r/51092/diff/
Testing
-------
Ran complete build on linux, all tests passed
Thanks,
Jeff Hagelberg