Skip to content

Commit

Permalink
DG-2002 Initial loggings
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbonte21 committed Jan 16, 2025
1 parent 396fb19 commit 438aa8c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
- master
- lineageondemand
- makerlogic
- jpmcglossarylogscanary

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1893,10 +1893,27 @@ private AtlasObjectId mapVertexToObjectId(AtlasVertex entityVertex, String edgeL
String relationshipTypeName = GraphHelper.getTypeName(edge);
boolean isRelationshipAttribute = typeRegistry.getRelationshipDefByName(relationshipTypeName) != null;
if (isRelationshipAttribute) {
AtlasRelationship relationship = mapEdgeToAtlasRelationship(edge);
Map<String, Object> relationshipAttributes = mapOf("typeName", relationshipTypeName);
relationshipAttributes.put("attributes", relationship.getAttributes());
ret.getAttributes().put("relationshipAttributes", relationshipAttributes);
LOG.info("CustomRelationship: ret is null: {} ", ret == null);
LOG.error("CustomRelationship: relTypeName: {}, assetGuid: {}", relationshipTypeName, GraphHelper.getGuid(entityVertex));

try {
LOG.info("CustomRelationship: Fetching relationshipAttributes for {}", relationshipTypeName);

AtlasRelationship relationship = mapEdgeToAtlasRelationship(edge);
LOG.info("CustomRelationship: relationship: {}", AtlasType.toJson(relationship));
LOG.info("CustomRelationship: relationship.getAttributes() is null: {}", relationship.getAttributes() == null);

Map<String, Object> relationshipAttributes = mapOf("typeName", relationshipTypeName);
relationshipAttributes.put("attributes", relationship.getAttributes());

LOG.info("CustomRelationship: ret.getAttributes() is null: {}", ret.getAttributes() == null);
ret.getAttributes().put("relationshipAttributes", relationshipAttributes);
} catch (Exception e) {
if (ret != null) {
LOG.error("CustomRelationship: relTypeName: {}, assetGuid: {}, assetTypeName: {}", relationshipTypeName, ret.getGuid(), ret.getTypeName());
}
throw e;
}
}
}
}
Expand Down

0 comments on commit 438aa8c

Please sign in to comment.