Apache Atlas的安装和编译
最近一直在做公司数据湖的项目,我们用的是Apache正在incubating的开源项目atlas, atlas在管理元数据方面的功能十分强大。
这篇blog是介绍如何在centos中编译和安装atlas
Atlas的安装和编译
编译Atlas
从git下载源码库
git clone https://git-wip-us.apache.org/repos/asf/incubator-atlas.git atlas git checkout altas-0.7-incubating
切换到atlas文件夹
cd atlas
编译atlas
export MAVEN_OPTS="-Xmx1536m -XX:MaxPermSize=512m" && mvn clean install -DskipTests -Drat.numUnapprovedLicenses=100
skip Licenses
http://stackoverflow.com/questions/30181154/skipping-some-license-tests-in-maven -Drat.numUnapprovedLicenses=100
Skip test cases
mvn install
Atlas编译要求
Atlas安装与配置
- mvn clean package -Pdist -DskipTests
编译完之后解压生成的tar包
tar -xzvf apache-atlas-${project.version}-bin.tar.gz cd atlas-${project.version}
配置atlas参数
所有atlas参数配置都在conf文件夹下,这里主要修改atlas-application.properties的配置
配置kafka相关参数
atlas.notification.embedded=false atlas.kafka.data=${sys:atlas.home}/data/kafka atlas.kafka.zookeeper.connect=localhost:2181 atlas.kafka.bootstrap.servers=fsdn1:6667
配置Zookeeper相关参数
atlas.audit.hbase.zookeeper.quorum={zookeeeper_host}:2181
启动atlas
bin/atlas_start.py
这样可在浏览器中输入:http://localhost:21000,就可以打开atlas的web页面
错误排查
Kafka启动失败
论坛提问: https://community.hortonworks.com/questions/67795/fail-to-start-kafka-when-starting-the-atlas.html
关闭Zookeeper,报错Connection Refused
开启Zookeeper,报错cannot assign requested address
Resolution:
修改Kafka相关参数:
atlas.notification.embedded=false
UI Keep Loading
如图:
Resolution:
根据论坛的回复,有两个解决方案,我用了第一种,就是下载hdp2.5然后把atlas web相关的文件夹覆盖掉0.7的文件夹
I have replaced web folder from Sandbox(HDP 2.5 with Atlas 0.7) and it worked fine.
下载HDP2.5,找到usr/hdp/2.5.0.0-1245/atlas文件夹,将其中的web相关文件夹copy and replace原本atlas的对应文件夹 ![](http://i.imgur.com/CEvYjx5.png)
Download the patch and git apply it – ATLAS-1199-PATCH
Git Apply Patch Failed (http://www.fwolf.com/blog/post/448)
$ git apply --reject 0001-BUG-Sybase.patch Checking patch source.php... error: while searching for: // 注释 // 以下为几行代码片断 error: patch failed: source.php:38 Applying patch source.php with 1 rejects... Rejected hunk #1.
Full Authentication needed to access the Atlas API
Per default, Atlas uses Basic Authentication. So use your Atlas user and password, e.g. like
curl -s -u admin:admin http://atlas-server:21000/api/atlas/types
Out of Memory
https://cwiki.apache.org//confluence/display/MAVEN/OutOfMemoryError