Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
ac0cd87a
Commit
ac0cd87a
authored
May 22, 2020
by
sidmishra
Committed by
Madhan Neethiraj
May 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3806: Classifications information missing in notification events during entity update/delete
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
00bef883
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
EntityMutationResponse.java
...g/apache/atlas/model/instance/EntityMutationResponse.java
+2
-2
EntityGraphMapper.java
...he/atlas/repository/store/graph/v2/EntityGraphMapper.java
+6
-11
No files found.
intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java
View file @
ac0cd87a
...
...
@@ -215,10 +215,10 @@ public class EntityMutationResponse {
@JsonIgnore
public
void
addEntity
(
EntityOperation
op
,
AtlasEntityHeader
header
)
{
// if an entity is already included in CREATE,
ignore subsequent UPDATE, PARTIAL_UPDATE
// if an entity is already included in CREATE,
update the header, to capture propagated classifications
if
(
op
==
EntityOperation
.
UPDATE
||
op
==
EntityOperation
.
PARTIAL_UPDATE
)
{
if
(
entityHeaderExists
(
getCreatedEntities
(),
header
.
getGuid
()))
{
return
;
op
=
EntityOperation
.
CREATE
;
}
}
...
...
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
View file @
ac0cd87a
...
...
@@ -277,7 +277,7 @@ public class EntityGraphMapper {
mapAttributes
(
createdEntity
,
entityType
,
vertex
,
CREATE
,
context
);
setCustomAttributes
(
vertex
,
createdEntity
);
resp
.
addEntity
(
CREATE
,
constructHeader
(
createdEntity
,
entityType
,
vertex
));
resp
.
addEntity
(
CREATE
,
constructHeader
(
createdEntity
,
vertex
));
addClassifications
(
context
,
guid
,
createdEntity
.
getClassifications
());
addOrUpdateBusinessAttributes
(
vertex
,
entityType
,
createdEntity
.
getBusinessAttributes
());
...
...
@@ -299,7 +299,7 @@ public class EntityGraphMapper {
mapAttributes
(
updatedEntity
,
entityType
,
vertex
,
updateType
,
context
);
setCustomAttributes
(
vertex
,
updatedEntity
);
resp
.
addEntity
(
updateType
,
constructHeader
(
updatedEntity
,
entityType
,
vertex
));
resp
.
addEntity
(
updateType
,
constructHeader
(
updatedEntity
,
vertex
));
if
(
replaceClassifications
)
{
deleteClassifications
(
guid
);
...
...
@@ -1853,15 +1853,10 @@ public class EntityGraphMapper {
}
}
private
AtlasEntityHeader
constructHeader
(
AtlasEntity
entity
,
final
AtlasEntityType
type
,
AtlasVertex
vertex
)
{
AtlasEntityHeader
header
=
new
AtlasEntityHeader
(
entity
.
getTypeName
());
header
.
setGuid
(
getIdFromVertex
(
vertex
));
header
.
setStatus
(
entity
.
getStatus
());
header
.
setIsIncomplete
(
entity
.
getIsIncomplete
());
for
(
AtlasAttribute
attribute
:
type
.
getUniqAttributes
().
values
())
{
header
.
setAttribute
(
attribute
.
getName
(),
entity
.
getAttribute
(
attribute
.
getName
()));
private
AtlasEntityHeader
constructHeader
(
AtlasEntity
entity
,
AtlasVertex
vertex
)
throws
AtlasBaseException
{
AtlasEntityHeader
header
=
entityRetriever
.
toAtlasEntityHeaderWithClassifications
(
vertex
);
if
(
entity
.
getClassifications
()
==
null
)
{
entity
.
setClassifications
(
header
.
getClassifications
());
}
return
header
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment