删除Atlas元数据进行物理删除

一、问题

想要删除Atlas元数据,Atlas组件默认是逻辑删除,但是我们想要进行物理删除

二、解决

1、修改配置文件

vim /opt/module/atlas/conf/atlas-application.properties

添加如下内容:

#开启物理删除
atlas.DeleteHandlerV1.impl=org.apache.atlas.repository.store.graph.v1.HardDeleteHandlerV1

2、重启Atlas

python2 /opt/module/atlas/bin/atlas_stop.py
python2 /opt/module/atlas/bin/atlas_start.py

3、调用AtlasAPI接口进行删除

如何清除软删除的实体

在Apache Atlas中,有没有办法在启用硬删除后删除/清除软删除的实体?

通过如下API即可达到要求:

Http请求方式:

----------------soft delete----------------

curl -iv -u admin:admin -X DELETE http://localhost:21000/api/atlas/v2/entity/guid/88f13750-f2f9-4e31-89f7-06d313fe5d39

---------------- than hard----------------

curl -i -X PUT  -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-u admin:admin 'http://loclahost:21000/api/atlas/admin/purge/' \
-d '["88f13750-f2f9-4e31-89f7-06d313fe5d39"]'

猜你喜欢

转载自blog.csdn.net/qq_43688472/article/details/132170585