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
e7aec335
Commit
e7aec335
authored
Apr 30, 2018
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2631: Tag Propagation : Change in behavior of tag propagation for DELETED entities
parent
e4205b3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
DeleteHandlerV1.java
...ache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
+14
-3
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
View file @
e7aec335
...
...
@@ -59,6 +59,7 @@ import static org.apache.atlas.repository.Constants.PROPAGATED_TRAIT_NAMES_PROPE
import
static
org
.
apache
.
atlas
.
repository
.
Constants
.
TRAIT_NAMES_PROPERTY_KEY
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
EDGE_LABEL_PREFIX
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
addToPropagatedTraitNames
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
getAllClassificationEdges
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
getAssociatedEntityVertex
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
getClassificationEdge
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
getClassificationEdgeState
;
...
...
@@ -72,6 +73,7 @@ import static org.apache.atlas.repository.graph.GraphHelper.getPropagationEnable
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
getRelationshipGuid
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
getTraitNames
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
getTypeName
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
isPropagatedClassificationEdge
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
isRelationshipEdge
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
string
;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
updateModificationMetadata
;
...
...
@@ -917,10 +919,19 @@ public abstract class DeleteHandlerV1 {
* @throws AtlasException
*/
private
void
deleteAllClassifications
(
AtlasVertex
instanceVertex
)
throws
AtlasBaseException
{
List
<
AtlasEdge
>
classificationEdges
=
get
ClassificationEdges
(
instanceVertex
);
List
<
AtlasEdge
>
allClassificationEdges
=
getAll
ClassificationEdges
(
instanceVertex
);
for
(
AtlasEdge
edge
:
classificationEdges
)
{
deleteEdgeReference
(
edge
,
TypeCategory
.
CLASSIFICATION
,
false
,
false
,
instanceVertex
);
for
(
AtlasEdge
edge
:
allClassificationEdges
)
{
if
(
isPropagatedClassificationEdge
(
edge
))
{
// when entity is deleted force delete its propagated classifications
deleteEdge
(
edge
,
true
);
}
else
{
AtlasVertex
classificationVertex
=
edge
.
getInVertex
();
removeTagPropagation
(
classificationVertex
);
deleteEdgeReference
(
edge
,
TypeCategory
.
CLASSIFICATION
,
false
,
false
,
instanceVertex
);
}
}
//remove traitNames and propagatedTraitNames property from instanceVertex
...
...
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