功能特性

通知

qianmoQqianmoQ· 更新于 2026-09-28· 阅读 6 分钟· 0 次阅读

登录后可跨设备保存划线和私人笔记登录

通知

来自 Apache Atlas 的通知

Apache Atlas 会将元数据变更的通知发送到名为 ATLAS_ENTITIES 的 Kafka 主题。关注元数据变更的应用可以监听这些通知。例如,Apache Ranger 会处理这些通知,以便根据分类结果对数据访问进行授权。

通知 - V2:Apache Atlas 1.0 版本

Apache Atlas 1.0 会针对以下元数据操作发送通知。

ENTITY_CREATE:         sent when an entity instance is created
      ENTITY_UPDATE:         sent when an entity instance is updated
      ENTITY_DELETE:         sent when an entity instance is deleted
      CLASSIFICATION_ADD:    sent when classifications are added to an entity instance
      CLASSIFICATION_UPDATE: sent when classifications of an entity instance are updated
      CLASSIFICATION_DELETE: sent when classifications are removed from an entity instance

通知包含以下数据。

AtlasEntity  entity;
   OperationType operationType;
   List<AtlasClassification>  classifications;

通知 - V1:Apache Atlas 0.8.x 及更早版本

Apache Atlas 0.8.x 及更早版本产生的通知,其内容格式有所不同,详情如下。

操作

ENTITY_CREATE: sent when an entity instance is created
      ENTITY_UPDATE: sent when an entity instance is updated
      ENTITY_DELETE: sent when an entity instance is deleted
      TRAIT_ADD:     sent when classifications are added to an entity instance
      TRAIT_UPDATE:  sent when classifications of an entity instance are updated
      TRAIT_DELETE:  sent when classifications are removed from an entity instance

通知包含以下数据。

Referenceable entity;
   OperationType operationType;
   List<Struct>  traits;

Apache Atlas 1.0 可以配置为按旧版本格式发送通知,而不是最新的版本格式。这对于尚无法处理最新版本格式通知的部署环境非常有帮助。要配置 Apache Atlas 1.0 以按较早的版本格式发送通知,请在 atlas-application.properties 中设置以下配置:

atlas.notification.entity.version=v1

通知 Apache Atlas

Apache Atlas 可以通过向名为 ATLAS_HOOK 的 Kafka 主题发送通知,来获知元数据变更和血缘信息。Apache Hive、Apache HBase、Apache Storm、Apache Sqoop 的 Atlas 钩子(hook)使用该机制向 Apache Atlas 通知其关注的事件。

ENTITY_CREATE            : create an entity. For more details, refer to Java class HookNotificationV1.EntityCreateRequest
ENTITY_FULL_UPDATE       : update an entity. For more details, refer to Java class HookNotificationV1.EntityUpdateRequest
ENTITY_PARTIAL_UPDATE    : update specific attributes of an entity. For more details, refer to HookNotificationV1.EntityPartialUpdateRequest
ENTITY_DELETE            : delete an entity. For more details, refer to Java class HookNotificationV1.EntityDeleteRequest
ENTITY_CREATE_V2         : create an entity. For more details, refer to Java class HookNotification.EntityCreateRequestV2
ENTITY_FULL_UPDATE_V2    : update an entity. For more details, refer to Java class HookNotification.EntityUpdateRequestV2
ENTITY_PARTIAL_UPDATE_V2 : update specific attributes of an entity. For more details, refer to HookNotification.EntityPartialUpdateRequestV2
ENTITY_DELETE_V2         : delete one or more entities. For more details, refer to Java class HookNotification.EntityDeleteRequestV2

评论

登录后参与评论

正在加载评论…