achandel-01 commented on code in PR #406:
URL: https://github.com/apache/atlas/pull/406#discussion_r2317928489
##########
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java:
##########
@@ -577,6 +577,53 @@ public EntityMutationResponse purgeByIds(Set<String>
guids) throws AtlasBaseExce
return ret;
}
+ @Override
+ @GraphTransaction
+ public EntityMutationResponse
schedulePurgeEntities(Set<String>purgeCandidates) throws AtlasBaseException {
+ LOG.info("==> schedulePurgeEntities()");
+
+ Collection<AtlasVertex>purgeVertices = new ArrayList<>();
+ EntityMutationResponse response = new EntityMutationResponse();
+
+ RequestContext requestContext = RequestContext.get();
+ requestContext.setDeleteType(DeleteType.HARD);// hard deleter
+ requestContext.setPurgeRequested(true);
+
+ for (String guid : purgeCandidates) {
+ AtlasVertex vertex = AtlasGraphUtilsV2.findByGuid(graph, guid);
+ if( vertex != null ) {
+ AtlasEntityHeader entityHeader =
entityRetriever.toAtlasEntityHeader(vertex);
Review Comment:
Yes it is expensive.But we need it show this information to the admin audit
side, regardless of what type of entity it is, basic information is shown for
every purged guid.Also the existing purge api stores all the entity headers.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]