安装Solr(单节点)
-
下载地址:https://solr.apache.org/downloads.html -
解压后直接启动 bin/solr start -c -z <zookeeper_host:port> -p 8983
kafka安装
kafka安装连接
安装Maven并配置MAVEN_HOME
(配置maven镜像)
下载Atlas源码文件并编译(独立Hbase、Solr)
-
http://atlas.apache.org/#/Downloads -
解压 tar -zxvf apache-atlas-2.1.0-sources.tar.gz
-
进入Atlas文件夹编译
export MAVEN_OPTS="-Xms2g -Xmx2g"
mvn clean -DskipTests install
mvn clean -DskipTests package -Pdist
-
将Atlas文件夹cp至自定义文件夹下 cp -r apache-atlas-sources-2.1.0/distro/target/apache-atlas-2.1.0-bin /usr/local/service/
配置Atlas
-
配置atlas-env
export MANAGE_EMBEDDED_CASSANDRA=false
export MANAGE_LOCAL_ELASTICSEARCH=false
export HBASE_CONF_DIR=/usr/local/service/hbase/conf
-
修改atlas-application.properties atlas.graph.storage.backend=hbase
atlas.graph.storage.hbase.table=atlas
atlas.graph.storage.hostname=namenode:2181
atlas.graph.storage.hbase.regions-per-server=1
atlas.graph.storage.lock.wait-time=10000
#Solr
#Solr cloud mode properties
atlas.graph.index.search.solr.mode=cloud
atlas.graph.index.search.solr.zookeeper-url=namenode:2181
atlas.graph.index.search.solr.zookeeper-connect-timeout=60000
atlas.graph.index.search.solr.zookeeper-session-timeout=60000
atlas.graph.index.search.solr.wait-searcher=true
######### Notification Configs #########
atlas.notification.embedded=false
atlas.kafka.data=${sys:atlas.home}/data/kafka
atlas.kafka.zookeeper.connect=namenode:2181
atlas.kafka.bootstrap.servers=namenode:9092
atlas.kafka.zookeeper.session.timeout.ms=400
atlas.kafka.zookeeper.connection.timeout.ms=200
atlas.kafka.zookeeper.sync.time.ms=20
atlas.kafka.auto.commit.interval.ms=1000
atlas.kafka.hook.group.id=atlas
atlas.kafka.enable.auto.commit=false
atlas.kafka.auto.offset.reset=earliest
atlas.kafka.session.timeout.ms=30000
atlas.kafka.offsets.topic.replication.factor=1
atlas.kafka.poll.timeout.ms=1000
atlas.notification.create.topics=true
atlas.notification.replicas=1
atlas.notification.topics=ATLAS_HOOK,ATLAS_ENTITIES
atlas.notification.log.failed.messages=true
atlas.notification.consumer.retry.interval=500
atlas.notification.hook.retry.interval=1000
######### Entity Audit Configs #########
atlas.audit.hbase.tablename=apache_atlas_entity_audit
atlas.audit.zookeeper.session.timeout.ms=5000
atlas.audit.hbase.zookeeper.quorum=namenode:2181
-
启动 bin/atlas_start.py
配置Hive Hook
-
修改hive-env export HIVE_AUX_JARS_PATH=/usr/local/service/apache-atlas-2.1.0/hook/hive
-
修改hive-site.xml <property>
<name>hive.exec.post.hooks</name>
<value>org.apache.atlas.hive.hook.HiveHook</value>
</property>
-
修改Atlas的 atlas-application.properties # 新增
######## Hive Hook ########
atlas.hook.hive.synchronous=true
atlas.hook.hive.numRetries=3
atlas.hook.hive.queueSize=10000
atlas.cluster.name=atlas
atlas.rest.address=http://namenode:21000
-
将Atlas的 atlas-application.properties文件分发至所有节点HIVE_HOME/conf -
重启Hive、Atlas(有Hue重启Hue) -
在atlas目录下执行倒入命令 bin/import-hive.sh
|