This is an automated email from the ASF dual-hosted git repository.
nixon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new eb513c3 ATLAS-3316 getResolvedEntityVertex returns null if
AtlasRelatedObjectId is referenced with AtlasObjectId
eb513c3 is described below
commit eb513c315607946825831f2f80542b02b9476213
Author: Mandar Ambawane <[email protected]>
AuthorDate: Fri Jul 5 12:04:45 2019 +0530
ATLAS-3316 getResolvedEntityVertex returns null if AtlasRelatedObjectId is
referenced with AtlasObjectId
Signed-off-by: nixonrodrigues <[email protected]>
---
.../atlas/repository/store/graph/EntityGraphDiscoveryContext.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/repository/src/main/java/org/apache/atlas/repository/store/graph/EntityGraphDiscoveryContext.java
b/repository/src/main/java/org/apache/atlas/repository/store/graph/EntityGraphDiscoveryContext.java
index bd05c98..2221ac4 100644
---
a/repository/src/main/java/org/apache/atlas/repository/store/graph/EntityGraphDiscoveryContext.java
+++
b/repository/src/main/java/org/apache/atlas/repository/store/graph/EntityGraphDiscoveryContext.java
@@ -19,6 +19,7 @@ package org.apache.atlas.repository.store.graph;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.instance.AtlasObjectId;
+import org.apache.atlas.model.instance.AtlasRelatedObjectId;
import org.apache.atlas.repository.graphdb.AtlasVertex;
import org.apache.atlas.repository.store.graph.v2.EntityStream;
import org.apache.atlas.type.AtlasEntityType;
@@ -95,6 +96,9 @@ public final class EntityGraphDiscoveryContext {
}
public AtlasVertex getResolvedEntityVertex(AtlasObjectId objId) {
+ if (objId instanceof AtlasRelatedObjectId) {
+ objId = new AtlasObjectId(objId.getGuid(), objId.getTypeName(),
objId.getUniqueAttributes());
+ }
AtlasVertex vertex = resolvedIdsByUniqAttribs.get(objId);
// check also for sub-types; ref={typeName=Asset; guid=abcd} should
match {typeName=hive_table; guid=abcd}