一、安装前环境准备
软件版本 | |
---|---|
1 | JDK8 |
2 | Hadoop 2.7.2 / Hadoop 3.1.3 |
3 | Kafka 0.11.0.2 |
4 | HBase 1.3.1 |
5 | Solr 5.2.1 |
6 | Hive 2.3.1 / Hive 3.1.2 |
7 | Azkaban 2.5.0 |
8 | Atlas 0.8.4 / Atlas 2.0.0 |
二、安装 solr-5.2.1
在安装 Atlas 的时候对 Solr 的版本有严格的要求,必须是 5.2.1 版本的。
tar -zxvf solr-5.2.1.tgz -C /opt/module/
mv solr-5.2.1/ solr
进入到 solr/bin 目录,修改 bin/solr.in.sh 文件:
#添加下列指令
ZK_HOST="hadoop102:2181,hadoop103:2181,hadoop104:2181"
SOLR_HOST="hadoop102"
# Sets the port Solr binds to, default is 8983
#可修改端口号
SOLR_PORT=8983
分发 solr 到 hadoop103 和 hadoop104 两台机器:
xsync solr
Web 访问 8983 端口,可指定三台节点中的任意一台IP
http://hadoop102:8983/solr/#/
三、Atlas 集成外部框架
3.1 Atlas 集成 Hbase
1、进入到 /opt/module/atlas/conf 目录下:
vim atlas-application.properties
修改配置信息如下所示:
atlas.graph.storage.hostname=hadoop102:2181,hadoop103:2181,hadoop104:2181
2、进入到 /opt/module/atlas/conf/hbase 路径
ln -s /opt/module/hbase/conf/ /opt/module/atlas/conf/hbase/
3、修改 /opt/module/atlas/conf/atlas-env.sh
vim atlas-env.sh
修改配置信息如下所示:
export HBASE_CONF_DIR=/opt/module/atlas/conf/hbase/conf
3.2 Atlas 集成 Solr
1、进入 /opt/module/atlas/conf 目录下:
vim atlas-application.properties
修改配置信息如下图所示:
atlas.graph.index.search.solr.zookeeper-url=hadoop102:2181,hadoop103:2181,hadoop104:2181
2、进行如下操作:
cp -r /opt/module/atlas/conf/solr /opt/module/solr/
mv solr atlas_conf
3、启动 Solr,并创建 Collection
bin/solr create -c vertex_index -d /opt/module/solr/atlas_conf -shards 3 -replicationFactor 2
效果如下所示:
Creating new collection 'vertex_index' using command:
http://hadoop102:8983/solr/admin/collections?action=CREATE&name=vertex_index&numShards=3&replicationFactor=2&maxShardsPerNode=6&collection.configName=