Apache Atlas


atlas
英 [ˈætləs] 阿特拉斯。 美 [ˈætləs]
n.
地圖集;〈比喻〉身負重擔的人

==

Apache Atlas

Version: 1.1.0

Last Published: 2018-09-18

 版本:1.1.0  最新出版:2018-09-18

==

Data Governance and Metadata framework for Hadoop

Hadoop的數據管理和元數據框架

Overview

概述

Atlas is a scalable and extensible set of core foundational governance services – enabling enterprises to effectively and efficiently meet their compliance requirements within Hadoop and allows integration with the whole enterprise data ecosystem.

 

Atlas是一組可伸縮和可擴展的核心基礎治理服務——使企業能夠有效和高效地滿足Hadoop中的遵從性需求,並允許與整個企業數據生態系統進行集成。

 

Apache Atlas provides open metadata management and governance capabilities for organizations to build a catalog of their data assets, classify and govern these assets and provide collaboration capabilities around these data assets for data scientists, analysts and the data governance team.

 

Apache Atlas為組織提供開放的元數據管理和治理能力,以建立其數據資產的目錄,對這些資產進行分類和管理,並為數據科學家、分析師和數據治理團隊提供圍繞這些數據資產的協作能力。

 

Features

特征

Metadata types & instances

 元數據類型和實例

  • Pre-defined types for various Hadoop and non-Hadoop metadata
  • Ability to define new types for the metadata to be managed
  • Types can have primitive attributes, complex attributes, object references; can inherit from other types
  • Instances of types, called entities, capture metadata object details and their relationships
  • REST APIs to work with types and instances allow easier integration

 

  • 各種Hadoop和非Hadoop元數據的預定義類型
  • 為要管理的元數據定義新類型的能力
  • 類型可以具有原始屬性、復雜屬性、對象引用;可以從其他類型繼承。
  • 類型的實例,稱為實體,捕獲元數據對象細節及其關系
  • REST API與類型和實例一起工作更容易集成

 

Classification

 分類

  • Ability to dynamically create classifications - like PII, EXPIRES_ON, DATA_QUALITY, SENSITIVE
  • Classifications can include attributes - like expiry_date attribute in EXPIRES_ON classification
  • Entities can be associated with multiple classifications, enabling easier discovery and security enforcement
  • Propagation of classifications via lineage - automatically ensures that classifications follow the data as it goes through various processing

 

  • 動態創建分類的能力,如PII、ExIPRESION、DATAAL質量、敏感
  • 分類可以包括屬性,如EXPIRES_ON分類中的expiry_date 屬性
  • 實體可以與多個分類相關聯,從而能夠更容易地發現和安全執行。
  • 通過譜系傳播分類-自動確保分類跟隨數據經過各種處理

 

Lineage

 血統

  • Intuitive UI to view lineage of data as it moves through various processes
  • REST APIs to access and update lineage

 

  • 直觀的UI,以查看數據的傳承,因為它通過各種處理
  • REST API訪問和更新血統

Search/Discovery

 搜索/發現

  • Intuitive UI to search entities by type, classification, attribute value or free-text
  • Rich REST APIs to search by complex criteria
  • SQL like query language to search entities - Domain Specific Language (DSL)

 

  • 通過類型、分類、屬性值或自由文本搜索實體的直觀UI
  •  豐富的 REST API 實現復雜的標准搜索
  • 搜索實體的SQL類查詢語言——領域特定語言(DSL)

Security & Data Masking

 安全與數據屏蔽

  • Fine grained security for metadata access, enabling controls on access to entity instances and operations like add/update/remove classifications
  • Integration with Apache Ranger enables authorization/data-masking on data access based on classifications associated with entities in Apache Atlas. For example:
    • who can access data classified as PII, SENSITIVE
    • customer-service users can only see last 4 digits of columns classified as NATIONAL_ID

 

  • 用於元數據訪問的細粒度安全性,允許對實體實例和操作(如添加/更新/刪除分類)的訪問進行控制
  • 與Apache Ranger的集成使得基於與Apache Atlas中的實體相關聯的分類的數據訪問的授權/數據屏蔽成為可能。例如:

                  誰可以訪問被分類為PII、敏感的數據

                  客戶服務用戶只能看到被列為國家標識的列的最后4位數字

Getting Started

 入門

 

  • Apache阿特拉斯1.1有什么新鮮事?
  • 建造與安裝
  • 快速啟動

Documentation

 文檔

 

  • REST API文檔
  • 進出口API文檔
  • 遺留API文檔

 

Developer Setup Documentation

 開發者安裝文檔

Licensing Information

許可證信息

Atlas is distributed under Apache License 2.0

阿特拉斯在Apache許可證2.0下發布

==

大數據元數據和數據管理框架
Apache Atlas實踐
atlas的強大的血緣關系管理能力震撼
 
•Apache Atlas簡介
•Apache Atlas架構
•Titan圖數據庫介紹
•ApachAtlas配置
•Apache Atlas案例
•總結
 

Apache Atlas簡介
•面對海量且持續增加的各式各樣的數據對象,你是否有信心知道哪些數據從哪里來以及它如何隨時間而變化?采用Hadoop必須考慮數據管理的實際情況,元數據與數據治理成為企業級數據湖的重要部分
•為尋求數據治理的開源解決方案,Hortonworks公司聯合其他廠商與用戶於2015年發起數據治理倡議,包括數據分類、集中策略引擎、數據血緣、安全和生命周期管理等方面。Apache Atlas 項目就是這個倡議的結果,社區伙伴持續的為該項目提供新的功能和特性。該項目用於管理共享元數據、數據分級、審計、安全性以及數據保護等方面,努力與Apache Ranger整合,用於數據權限控制策略。
---------------------

Atlas主要功能
•數據分類
        定義、注釋和自動捕獲數據集和底層之間的關系元素包括源、目標和派生過程

•安全審計
        數據訪問的日志審計

•搜索和血緣關系
       元數據信息及數據之間的血緣

•安全與策略引擎
       結合ApacheRanger來設置數據的訪問權限
---------------------

Atlas架構
==

Atlas Core
•Type System:Atlas 允許用戶為他們想要管理的元數據對象定義一個模型。該模型由稱為“類型” 的定義組成。“類型” (類)的 實例被稱為 “實體” 表示被管理的實際元數據對象。類型系統是一個組件,允許用戶定義和管理類型和實體。由 Atlas 管理的所有元數據對象(例如Hive表)都使用類型進行建模,並表示為實體(類對象,一條數據)。
•Ingest / Export:Ingest 組件允許將元數據添加到 Atlas。類似地,Export 組件暴露由 Atlas 檢測到的元數據更改,以作為事件引發,消費者可以使用這些更改事件來實時響應元數據更改。
•Graph Engine :在內部,Atlas 通過使用圖形模型管理元數據對象。以實現元數據對象之間的巨大靈活性和豐富的關系。圖形引擎是負責在類型系統的類型和實體之間進行轉換的組件,以及基礎圖形模型。除了管理圖形對象之外,圖形引擎還為元數據對象創建適當的索引,以便有效地搜索它們

---------------------

如何使用Atlas管理
   用戶可以使用兩種方法管理 Atlas中的元數據

•API:Atlas 的所有功能通過REST API 提供給最終用戶,允許創建,更新和刪除類型和實體。它也是查詢和發現通過Atlas 管理的類型和實體的主要方法。
    https://cwiki.apache.org/confluence/display/ATLAS/Atlas+REST+API

•Messaging:除了 API 之外,用戶還可以選擇使用基於 Kafka 的消息接口與 Atlas 集成。這對於將元數據對象傳輸到 Atlas 以及從 Atlas 使用可以構建應用程序的元數據更改事件都非常有用。如果希望使用與 Atlas 更松散耦合的集成,這可以允許更好的可擴展性,可靠性等,消息傳遞接口是特別有用的。Atlas 使用 Apache Kafka 作為通知服務器用於鈎子和元數據通知事件的下游消費者之間的通信。事件由鈎子和 Atlas 寫到不同的 Kafka 主題。


Titan介紹

•Titan:目前,Atlas 使用 Titan 圖數據庫來存儲元數據對象。 Titan 使用兩個存儲:默認情況下元數據存儲配置為 HBase,索引存儲配置為 Solr。也可以通過構建相應的配置文件將元數據存儲作為 BerkeleyDB和 Index 存儲使用為 ElasticSearch。元數據存儲用於存儲元數據對象本身,並且索引存儲用於存儲元數據屬性的索引,其允許高效搜索。
•目前基於Java使用最廣泛的有兩個開源框架
  (1) neo4j

  社區版 免費

  企業版 收費

    (2) Titan

  全開源

 Titan是一個分布式的圖數據庫,支持橫向擴展,可容納數千億個頂點和邊。 Titan支持事務,並且可以支撐上千並發用戶和 計算復雜圖形遍歷。

 


安裝

在安裝前需要確定,你運行titan的Java環境為1.8+ *

1) 將安裝包拷貝到安裝位置后解壓縮:

unzip titan-1.0.0-hadoop2.zip

2) 刪除並添加相關jar包

官方提供的hadoop2的安裝包有一些問題,如果想要順利的使用titan,必須刪除相關的jar包,並添加一些缺失的jar包:

a. 刪除異常jar包

hadoop-core-1.2.1.jar

b. 添加所需要的jar包,這些jar包可以通過maven進行下載

titan-hadoop-1.0.0.jar

titan-hadoop-core-1.0.0.jar


啟動

•titan安裝后,使用默認配置啟動titan服務。
•默認情況下,titan會啟動三個服務:

•Cassandra 作為后端數據庫存儲圖數據
•Elasticsearch作為索引,提高圖的檢索效率
•Gremlin-Server 圖數據庫引擎,支持gremlin數據查詢語法

 

測試

./bin/gremlin.sh

:remote connect tinkerpop.serverconf/remote.yaml


//初始化

graph=TitanFactory.open('conf/titan-cassandra-es.properties')

GraphOfTheGodsFactory.load(graph)

g=graph.traversal()


//獲取saturn點

saturn=g.V().has('name', 'saturn').next()

g.V(saturn).valueMap()


//查看saturn孫子

g.V(saturn).in('father').in('father').values('name')

 

//查看hercules父母

hercules = g.V().has('name', 'hercules').next()

g.V(hercules).out('father', 'mother').values('name')


Atlas配置
1,Atlas安裝后默認hbase和solr存儲,如果想修改存儲介質,需要修改

/usr/hdp/2.6.0.3-8/atlas/conf/atlas-application.properties

 

 

2,Atlas安裝完之后會在hive-site.xml文件中插入,是一個鈎子函數

 

Hive 在使用 hive hook 的hive 命令執行上支持偵聽器。 這用於在 Atlas 中使用org.apache.atlas.hive.model.HiveDataModelGenerator 中定義的模型添加/更新/刪除實體。 hive hook將請求提交給線程池執行器,以避免阻塞命令執行。 線程將實體作為消息提交給通知服務器,並且服務器讀取這些消息並注冊實體。

 

3,如果Atlas中沒有元數據,需要手動執行

/usr/hdp/2.6.0.3-8/atlas/hook-bin/import-hive.sh

 

4,Atlas高可用

要在 Atlas 中設置高可用性,必須在 atlas-application.properties文件中定義一些配置選項。

•高可用性是Atlas 的可選功能。因此,必須通過將配置選項atlas.server.ha.enabled設置為true 來啟用。
•接下來,定義標識符列表,為您為 Atlas Web Service 實例選擇的每個物理機器分配一個標識符。這些標識符可以是簡單的字符串,如id1,id2等。它們應該是唯一的,不應包含逗號。
•將這些標識符的逗號分隔列表定義為選項 atlas.server.ids的值。
•對於每個物理機,請列出IP地址/主機名和端口作為配置 atlas.server.address.id的值,其中 id指的是此物理機的標識符字符串。

•例如,如果您選擇了 2台主機名為 http://host1.company.com和 http://host2.company.com的計算機,則可以如下定義配置選項:
•  atlas.server.ids=id1,id2
• atlas.server.address.id1=host1.company.com:21000
• atlas.server.address.id2=host2.company.com:21000
•定義使用的 Zookeeper為 Atlas提供高可用性功能
atlas.server.ha.zookeeper.connect=zk1.company.com:2181,zk2.company.com:2181,zk3.comp

•要驗證高可用性是否正常工作,請在安裝了 Atlas Web Service 的每個實例上運行以下腳本。
   $ATLAS_HOME/bin/atlas_admin.py -status

 

以下hive 操作由 hive hook 當前捕獲

create database

create table/view, create table as select

load, import, export

DMLs (insert)

alter database

alter table (skewed table information, stored as, protection is notsupported)

alter view


案例


REST API
http://192.168.200.13:21000/api/atlas/lineage/hive/table/stg.stg_device_info_d@test/inputs/graph   

http://192.168.200.13:21000/api/atlas/lineage/hive/table/stg.stg_device_info_d@test/outputs/graph

注意:已經刪除的表,RESTAPI不能查詢,但是圖形化工具可以查詢


總結
ApacheAtlas可監控數據的流向

ApacheRanger統一授權管理


---------------------

大數據治理系統框架Apache Atlas實踐 - CSDN博客

==

Atlas 中文文檔

https://blog.csdn.net/m0_38103873/article/details/79959482

為初學者開發Atlas提供中文版文檔,在安裝Atlas后,會自動生成英文版文檔,為了便於初學者更好地理解Atlas,特將此翻譯成中文版下面為部分目錄,資源連接點擊打開鏈接

==

《大數據治理與服務》PDF版

點擊下載: 
《大數據治理與服務》 
這里寫圖片描述

==

大數據安全規范

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM