Atlas 安装
1)Atlas 官网地址:https://atlas.apache.org/
2)文档查看地址:https://atlas.apache.org/2.1.0/index.html
3)下载地址:https://www.apache.org/dyn/closer.cgi/atlas/2.1.0/apache-atlas-2.1.0-sources.tar.gz
1,把 apache-atlas-2.1.0-server.tar.gz 上传到 hadoop102 的/opt/software 目录下
2,解压 apache-atlas-2.1.0-server.tar.gz 到/opt/module/目录下面
[root@hadoop102 software]$ tar -zxvf apache-atlas-2.1.0-server.tar.gz -C /opt/module/
3。修改 apache-atlas-2.1.0 的名称为 atlas
[root@hadoop102 module]$ mv apache-atlas-2.1.0 atlas
Atlas 配置
Atlas 集成 Hbase
1,修改/opt/module/atlas/conf/atlas-application.properties 配置文件中的以下参数
atlas.graph.storage.hostname=hadoop102:2181,hadoop103:2181,hadoop104:2181
2,修改/opt/module/atlas/conf/atlas-env.sh 配置文件,增加以下内容
export HBASE_CONF_DIR=/opt/module/hbase/conf
Atlas 集成 Solr
1,修改/opt/module/atlas/conf/atlas-application.properties 配置文件中的以下参数
atlas.graph.index.search.backend=solr
atlas.graph.index.search.solr.mode=cloud
atlas.graph.index.search.solr.zookeeper-url=hadoop102:2181,hadoop103:2181,hadoop104:2181
2,创建 solr collection
[root@hadoop102 ~]$ sudo -i -u solr /opt/module/solr/bin/solr create -c vertex_index -d /opt/module/atlas/conf/solr -shards 3 -replicationFactor 2
[root@hadoop102 ~]$ sudo -i -u solr /opt/module/solr/bin/solr create -c edge_index -d /opt/module/atlas/conf/solr -shards 3 -replicationFactor 2
[root@hadoop102 ~]$ sudo -i -u solr /opt/module/solr/bin/solr create -c fulltext_index -d /opt/module/atlas/conf/solr -shards 3 -replicationFactor 2
Atlas 集成 Kafka
修改/opt/module/atlas/conf/atlas-application.properties 配置文件中的以下参数
atlas.notification.embedded=false
atlas.kafka.data=/opt/module/kafka/data
atlas.kafka.zookeeper.connect=hadoop102:2181,hadoop103:2181,hadoop104:2181/kafka
atlas.kafka.bootstrap.servers=hadoop102:9092,hadoop103:9092,hadoop104:9092
Atlas Server 配置
1,修改/opt/module/atlas/conf/atlas-application.properties 配置文件中的以下参数
######### Server Properties #########
atlas.rest.address=http://hadoop102:21000
# If enabled and set to true, this will run setup steps when the server starts
atlas.server.run.setup.on.start=false
######### Entity Audit Configs #########
atlas.audit.hbase.tablename=apache_atlas_entity_audit
atlas.audit.zookeeper.session.timeout.ms=1000
atlas.audit.hbase.zookeeper.quorum=hadoop102:2181,hadoop103:2181, hadoop104:2181
2,记录性能指标,进入/opt/module/atlas/conf/路径,修改当前目录下的 atlas-log4j.xml
[root@hadoop101 conf]$ vim atlas-log4j.xml
#去掉如下代码的注释
<appender name="perf_appender" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${atlas.log.dir}/atlas_perf.log" />
<param name="datePattern" value="'.'yyyy-MM-dd" />
<param name="append" value="true" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d|%t|%m%n" />
</layout>
</appender>
<logger name="org.apache.atlas.perf" additivity="false">
<level value="debug" />
<appender-ref ref="perf_appender" />
</logger>
Atlas 集成 Hive
1,修改/opt/module/atlas/conf/atlas-application.properties 配置文件中的以下参数
######### Hive Hook Configs #######
atlas.hook.hive.synchronous=false
atlas.hook.hive.numRetries=3
atlas.hook.hive.queueSize=10000
atlas.cluster.name=primary
2,修改 Hive 配置文件,在/opt/module/hive/conf/hive-site.xml 文件中增加以下参数,配置 Hive Hook。
<property>
<name>hive.exec.post.hooks</name>
<value>org.apache.atlas.hive.hook.HiveHook</value>
</property>
3,安装 Hive Hook
1)解压 Hive Hook
[root@hadoop102 software]$ tar -zxvf apache-atlas-2.1.0-hive-hook.tar.gz
2)将 Hive Hook 依赖复制到 Atlas 安装路径
[root@hadoop102 software]$ cp -r apache-atlas-hive-hook-2.1.0/* /opt/module/atlas/
3)修改/opt/module/hive/conf/hive-env.sh 配置文件
注:需先需改文件名
[root@hadoop102 conf]$ mv hive-env.sh.template hive-env.sh
增加如下参数
export HIVE_AUX_JARS_PATH=/opt/module/atlas/hook/hive
4)将 Atlas 配置文件/opt/module/atlas/conf/atlas-application.properties
拷贝到/opt/module/hive/conf 目录
[root@hadoop102 conf]$ cp /opt/module/atlas/conf/atlas-application.properties /opt/module/hive/conf/