Search in sources :

Example 6 with EntityDeleteRequestV2

use of org.apache.atlas.model.notification.HookNotification.EntityDeleteRequestV2 in project atlas by apache.

the class DropTable method getNotificationMessages.

@Override
public List<HookNotification> getNotificationMessages() {
    List<HookNotification> ret = null;
    List<AtlasObjectId> entities = context.isMetastoreHook() ? getHiveMetastoreEntities() : getHiveEntities();
    if (CollectionUtils.isNotEmpty(entities)) {
        ret = new ArrayList<>(entities.size());
        for (AtlasObjectId entity : entities) {
            ret.add(new EntityDeleteRequestV2(getUserName(), Collections.singletonList(entity)));
        }
    }
    return ret;
}
Also used : HookNotification(org.apache.atlas.model.notification.HookNotification) AtlasObjectId(org.apache.atlas.model.instance.AtlasObjectId) EntityDeleteRequestV2(org.apache.atlas.model.notification.HookNotification.EntityDeleteRequestV2)

Aggregations

AtlasObjectId (org.apache.atlas.model.instance.AtlasObjectId)6 EntityDeleteRequestV2 (org.apache.atlas.model.notification.HookNotification.EntityDeleteRequestV2)6 HookNotification (org.apache.atlas.model.notification.HookNotification)3 TableName (org.apache.hadoop.hbase.TableName)2 ArrayList (java.util.ArrayList)1 AtlasEntity (org.apache.atlas.model.instance.AtlasEntity)1 Test (org.testng.annotations.Test)1