Atlas 2.1.0 實踐(2)—— 安裝Atlas
在完成Atlas編譯以後,就可以進行Atlas的安裝了。Atlas的安裝主要是安裝Atlas的Server端,也就Atlas的管理頁面,並確保Atlas與Kafka Hbase Solr等組件的集成。
Atlas的系統架構如下,在確保 底層存儲與UI介面正常後,之後就可以進行與Hive等組件的集成調試了。
一、環境準備
安裝之前 先要準備好
JDK1.8
Zookeeper
Kafka
Hbase
Solr
在啟動Atlas時會配置這些環境變數的地址,所以一定要確保以上組件正常運行。
由於在編譯時可以選擇內部集成,所以這些Atlas是可以自帶的,但是JDK一定要安裝好。
在安裝Altas中,需要Solr 預先創建好collection
bin/solr create -c vertex_index -shards 3 -replicationFactor 2
bin/solr create -c edge_index -shards 3 -replicationFactor 2
bin/solr create -c fulltext_index -shards 3 -replicationFactor 2
在solr中驗證創建成功。
二、安裝Atlas
到編譯好的包的路徑下 apache-atlas-sources-2.1.0/distro/target
將生成好的安裝包 apache-atlas-2.1.0-server.tar.gz 拷貝到目標路徑下。
解壓:
tar -zxvf apache-atlas-2.1.0-server.tar.gz
三、修改配置
進入conf目錄下:
vi atlas-env.sh
在此指定JAVA_HOME和是否要用內嵌啟動
export JAVA_HOME=/opt/jdk1.8.0_191/
export MANAGE_LOCAL_HBASE=true
export MANAGE_LOCAL_SOLR=true
如果使用內嵌,那麼配置結束,直接去 啟動Atlas
但是大部分時候,需要使用已經有的組件進行集成,所以設置為false。
export JAVA_HOME=/opt/jdk1.8.0_191/
export MANAGE_LOCAL_HBASE=false
export MANAGE_LOCAL_SOLR=false
#注意修改Hbase配置文件路徑
export HBASE_CONF_DIR=/opt/hbase/conf
修改其他配置
vim atlas-application.properties
這裡就是設置Hbase Solr等配置
#Hbase地址 就是Hbase配置的zookeeper地址
atlas.graph.storage.hostname=slave01:2181,slave02:2181,slave03:2181
atlas.audit.hbase.zookeeper.quorum=slave01:2181,slave02:2181,slave03:2181
#solr伺服器地址
atlas.graph.index.search.solr.http-urls=//slave01:8984/solr
#kafka地址
atlas.notification.embedded=false
atlas.kafka.zookeeper.connect=slave01:2181,slave02:2181,slave03:2181
atlas.kafka.bootstrap.servers=slave01:9092,slave02:9092,slave03:9092
#atlas地址
atlas.rest.address=//slave01:21000
四、啟動Atlas
bin/atlas_start.py
啟動成功後訪問:
admin/admin登錄
成功!!
踩坑全紀錄
HBase: apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /hbase/hbaseid
hbase的問題 我的是因為沒有指定對hbase的配置文件
hbase配置文件的 zookeeper.znode.parent 並不是 /hbase/hbaseid
could not instantiate implementation: org.janusgraph.diskstorage.solr.Solr6Index
cannot connect to cluster at … cluster not found /not ready
提示無法找到solr,在填寫atlas.graph.index.search.solr.zookeeper-url時需要添加znode,如2181/solr
具體是什麼去solr配置文件里,或者頁面上找
could not register new index field with index backend
Solr有問題,檢查Solr 確保Solr正常啟動了
Can not find the specified config set: vertex_index
solr需要先建 三個索引 vertex_index
, edge_index
, fulltext_index
了解大數據實時計算 感受數據流動之美 歡迎關注 實時流式計算