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
eef89a77
Commit
eef89a77
authored
Apr 13, 2020
by
sidmishra
Committed by
Sarath Subramanian
Apr 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3730: In case of hard delete and purge set the entity status to Purged at classification
Signed-off-by:
Sarath Subramanian
<
sarath@apache.org
>
parent
80135a8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
AtlasEntity.java
...ain/java/org/apache/atlas/model/instance/AtlasEntity.java
+1
-1
DeleteHandlerV1.java
...ache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
+4
-1
No files found.
intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
View file @
eef89a77
...
...
@@ -75,7 +75,7 @@ public class AtlasEntity extends AtlasStruct implements Serializable {
/**
* Status of the entity - can be active or deleted. Deleted entities are not removed from Atlas store.
*/
public
enum
Status
{
ACTIVE
,
DELETED
}
public
enum
Status
{
ACTIVE
,
DELETED
,
PURGED
}
private
String
guid
=
null
;
private
String
homeId
=
null
;
...
...
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java
View file @
eef89a77
...
...
@@ -35,6 +35,7 @@ import org.apache.atlas.repository.graphdb.AtlasEdgeDirection;
import
org.apache.atlas.repository.graphdb.AtlasVertex
;
import
org.apache.atlas.repository.store.graph.v2.AtlasGraphUtilsV2
;
import
org.apache.atlas.repository.store.graph.v2.EntityGraphRetriever
;
import
org.apache.atlas.store.DeleteType
;
import
org.apache.atlas.type.*
;
import
org.apache.atlas.type.AtlasStructType.AtlasAttribute
;
import
org.apache.atlas.type.AtlasStructType.AtlasAttribute.AtlasRelationshipEdgeDirection
;
...
...
@@ -50,6 +51,7 @@ import java.util.*;
import
static
org
.
apache
.
atlas
.
model
.
TypeCategory
.*;
import
static
org
.
apache
.
atlas
.
model
.
instance
.
AtlasEntity
.
Status
.
ACTIVE
;
import
static
org
.
apache
.
atlas
.
model
.
instance
.
AtlasEntity
.
Status
.
DELETED
;
import
static
org
.
apache
.
atlas
.
model
.
instance
.
AtlasEntity
.
Status
.
PURGED
;
import
static
org
.
apache
.
atlas
.
model
.
typedef
.
AtlasRelationshipDef
.
PropagateTags
.
ONE_TO_TWO
;
import
static
org
.
apache
.
atlas
.
repository
.
Constants
.*;
import
static
org
.
apache
.
atlas
.
repository
.
graph
.
GraphHelper
.
getTypeName
;
...
...
@@ -700,7 +702,8 @@ public abstract class DeleteHandlerV1 {
if
(
isClassificationEdge
(
edge
))
{
AtlasVertex
classificationVertex
=
edge
.
getInVertex
();
AtlasGraphUtilsV2
.
setEncodedProperty
(
classificationVertex
,
CLASSIFICATION_ENTITY_STATUS
,
DELETED
.
name
());
AtlasGraphUtilsV2
.
setEncodedProperty
(
classificationVertex
,
CLASSIFICATION_ENTITY_STATUS
,
RequestContext
.
get
().
getDeleteType
()
==
DeleteType
.
HARD
?
PURGED
.
name
()
:
DELETED
.
name
());
}
deleteEdge
(
edge
,
force
);
...
...
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